christian71-stack/ebay-account-api

dev-master 2023-12-23 12:26 UTC

This package is not auto-updated.

Last update: 2024-06-23 13:16:37 UTC


README

SwaggerClient-php

The Account API gives sellers the ability to configure their eBay seller accounts, including the seller's policies (eBay business policies and seller-defined custom policies), opt in and out of eBay seller programs, configure sales tax tables, and get account information.

For details on the availability of the methods in this API, see <a href="/api-docs/sell/account/overview.html#requirements">Account API requirements and restrictions.

This PHP package is automatically generated by the Swagger Codegen project:

  • API version: v1.9.1
  • Build package: io.swagger.codegen.v3.generators.php.PhpClientCodegen

Requirements

PHP 5.5 and later

Installation & Usage

Composer

To install the bindings via Composer, add the following to composer.json:

{
  "repositories": [
    {
      "type": "git",
      "url": "https://github.com/christian71-stack/ebay-account-api.git"
    }
  ],
  "require": {
    "christian71-stack/ebay-account-api": "*@dev"
  }
}

Then run composer install

Manual Installation

Download the files and include autoload.php:

    require_once('/path/to/SwaggerClient-php/vendor/autoload.php');

Tests

To run the unit tests:

composer install
./vendor/bin/phpunit

Getting Started

Please follow the installation procedure and then run the following:

<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure OAuth2 access token for authorization: api_auth
$config = Ebay\Sell\Account\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');

$apiInstance = new Ebay\Sell\Account\Api\AdvertisingEligibilityApi(
    // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
    // This is optional, `GuzzleHttp\Client` will be used as default.
    new GuzzleHttp\Client(),
    $config
);
$x_ebay_c_marketplace_id = "x_ebay_c_marketplace_id_example"; // string | The unique identifier of the eBay marketplace for which the seller eligibility status shall be checked. This header is required or the call will fail.<br><br>See the <a href=\"/api-docs/sell/account/types/ba:MarketplaceIdEnum \" target=\"_blank \">MarketplaceIdEnum</a> type for the supported marketplace ID values.
$program_types = "program_types_example"; // string | A comma-separated list of eBay advertising programs for which eligibility status will be returned.<br><br> See the <a href=\"/api-docs/sell/account/types/plser:AdvertisingProgramEnum\" target=\"_blank\"> AdvertisingProgramEnum</a> type for a list of supported values.<br><br>If no programs are specified, the results will be returned for all programs.

try {
    $result = $apiInstance->getAdvertisingEligibility($x_ebay_c_marketplace_id, $program_types);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling AdvertisingEligibilityApi->getAdvertisingEligibility: ', $e->getMessage(), PHP_EOL;
}
?>

Documentation for API Endpoints

All URIs are relative to https://api.ebay.com{basePath}

Class Method HTTP request Description
AdvertisingEligibilityApi getAdvertisingEligibility GET /advertising_eligibility
CustomPolicyApi createCustomPolicy POST /custom_policy/
CustomPolicyApi getCustomPolicies GET /custom_policy/
CustomPolicyApi getCustomPolicy GET /custom_policy/{custom_policy_id}
CustomPolicyApi updateCustomPolicy PUT /custom_policy/{custom_policy_id}
FulfillmentPolicyApi createFulfillmentPolicy POST /fulfillment_policy/
FulfillmentPolicyApi deleteFulfillmentPolicy DELETE /fulfillment_policy/{fulfillmentPolicyId}
FulfillmentPolicyApi getFulfillmentPolicies GET /fulfillment_policy
FulfillmentPolicyApi getFulfillmentPolicy GET /fulfillment_policy/{fulfillmentPolicyId}
FulfillmentPolicyApi getFulfillmentPolicyByName GET /fulfillment_policy/get_by_policy_name
FulfillmentPolicyApi updateFulfillmentPolicy PUT /fulfillment_policy/{fulfillmentPolicyId}
KycApi getKYC GET /kyc
OnboardingApi getPaymentsProgramOnboarding GET /payments_program/{marketplace_id}/{payments_program_type}/onboarding
PaymentPolicyApi createPaymentPolicy POST /payment_policy
PaymentPolicyApi deletePaymentPolicy DELETE /payment_policy/{payment_policy_id}
PaymentPolicyApi getPaymentPolicies GET /payment_policy
PaymentPolicyApi getPaymentPolicy GET /payment_policy/{payment_policy_id}
PaymentPolicyApi getPaymentPolicyByName GET /payment_policy/get_by_policy_name
PaymentPolicyApi updatePaymentPolicy PUT /payment_policy/{payment_policy_id}
PaymentsProgramApi getPaymentsProgram GET /payments_program/{marketplace_id}/{payments_program_type}
PrivilegeApi getPrivileges GET /privilege
ProgramApi getOptedInPrograms GET /program/get_opted_in_programs
ProgramApi optInToProgram POST /program/opt_in
ProgramApi optOutOfProgram POST /program/opt_out
RateTableApi getRateTables GET /rate_table
ReturnPolicyApi createReturnPolicy POST /return_policy
ReturnPolicyApi deleteReturnPolicy DELETE /return_policy/{return_policy_id}
ReturnPolicyApi getReturnPolicies GET /return_policy
ReturnPolicyApi getReturnPolicy GET /return_policy/{return_policy_id}
ReturnPolicyApi getReturnPolicyByName GET /return_policy/get_by_policy_name
ReturnPolicyApi updateReturnPolicy PUT /return_policy/{return_policy_id}
SalesTaxApi createOrReplaceSalesTax PUT /sales_tax/{countryCode}/{jurisdictionId}
SalesTaxApi deleteSalesTax DELETE /sales_tax/{countryCode}/{jurisdictionId}
SalesTaxApi getSalesTax GET /sales_tax/{countryCode}/{jurisdictionId}
SalesTaxApi getSalesTaxes GET /sales_tax
SubscriptionApi getSubscription GET /subscription

Documentation For Models

Documentation For Authorization

api_auth

Author