nogrod / ebay-sell-fulfillment-php-sdk
使用履行API代表卖家根据结账时指定的支付方式和时间完成包装、地址、处理和发货每个订单的过程。
v0.2.2
2024-05-30 19:05 UTC
Requires
- php: ^8.1
- ext-curl: *
- ext-json: *
- ext-mbstring: *
- guzzlehttp/guzzle: ^7.4.5
- guzzlehttp/psr7: ^2.0
Requires (Dev)
- friendsofphp/php-cs-fixer: ^3.5
- overtrue/phplint: ^9.0
- phpunit/phpunit: ^9.0
README
使用履行API代表卖家根据结账时指定的支付方式和时间完成包装、地址、处理和发货每个订单的过程。
安装与使用
要求
PHP 8.1 及更高版本。
Composer
要通过Composer安装绑定,请将以下内容添加到 composer.json
{ "repositories": [ { "type": "vcs", "url": "https://github.com/nogrod/ebay-sell-fulfillment-php-sdk.git" } ], "require": { "nogrod/ebay-sell-fulfillment-php-sdk": "*@dev" } }
然后运行 composer install
手动安装
下载文件并包含 autoload.php
<?php require_once('/path/to/OpenAPIClient-php/vendor/autoload.php');
入门指南
请按照 安装过程 进行操作,然后运行以下命令
<?php require_once(__DIR__ . '/vendor/autoload.php'); // Configure OAuth2 access token for authorization: api_auth $config = eBay\Sell\Fulfillment\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN'); $apiInstance = new eBay\Sell\Fulfillment\Api\OrderApi( // 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 ); $order_id = 'order_id_example'; // string | This path parameter is used to specify the unique identifier of the order being retrieved.<br><br> Use the <a href=\"/api-docs/sell/fulfillment/resources/order/methods/getOrders\" target=\"_blank \">getOrders</a> method to retrieve order IDs. Order ID values are also shown in My eBay/Seller Hub.<br><br><span class=\"tablenote\"><strong>Note:</strong> <b>getOrders</b> can return orders up to two years old. Do not provide the <b>orderId</b> for an order created more than two years in the past.</span> $field_groups = 'field_groups_example'; // string | This parameter lets you control what is returned in the response.<br><br><span class=\"tablenote\"><b>Note:</b> The only presently supported value is <code>TAX_BREAKDOWN</code>. This field group adds addition fields to the response that return a breakdown of taxes and fees.</span> try { $result = $apiInstance->getOrder($order_id, $field_groups); print_r($result); } catch (Exception $e) { echo 'Exception when calling OrderApi->getOrder: ', $e->getMessage(), PHP_EOL; }
API端点
所有URI都相对于 https://api.ebay.com/sell/fulfillment/v1
模型
- AcceptPaymentDisputeRequest
- AddEvidencePaymentDisputeRequest
- AddEvidencePaymentDisputeResponse
- Address
- Amount
- AppliedPromotion
- AppointmentDetails
- Buyer
- CancelRequest
- CancelStatus
- ContestPaymentDisputeRequest
- DeliveryCost
- DisputeAmount
- DisputeEvidence
- DisputeSummaryResponse
- EbayCollectAndRemitTax
- EbayCollectedCharges
- EbayFulfillmentProgram
- EbayInternationalShipping
- EbayShipping
- EbayTaxReference
- EbayVaultProgram
- Error
- ErrorParameter
- EvidenceRequest
- ExtendedContact
- FileEvidence
- FileInfo
- FulfillmentStartInstruction
- GiftDetails
- InfoFromBuyer
- IssueRefundRequest
- ItemLocation
- LegacyReference
- LineItem
- LineItemFulfillmentInstructions
- LineItemProperties
- LineItemReference
- LineItemRefund
- LinkedOrderLineItem
- MonetaryTransaction
- NameValuePair
- Order
- OrderLineItems
- OrderRefund
- OrderSearchPagedCollection
- Payment
- PaymentDispute
- PaymentDisputeActivity
- PaymentDisputeActivityHistory
- PaymentDisputeOutcomeDetail
- PaymentDisputeSummary
- PaymentHold
- PaymentSummary
- Phone
- PhoneNumber
- PickupStep
- PostSaleAuthenticationProgram
- PricingSummary
- Program
- Refund
- RefundItem
- ReturnAddress
- SellerActionsToRelease
- ShippingFulfillment
- ShippingFulfillmentDetails
- ShippingFulfillmentPagedCollection
- ShippingStep
- SimpleAmount
- Tax
- TaxAddress
- TaxIdentifier
- TrackingInfo
- UpdateEvidencePaymentDisputeRequest
授权
api_auth
- 类型:
OAuth
- 流程:
accessCode
- 授权URL:
https://auth.ebay.com/oauth2/authorize
- 作用域:
- https://api.ebay.com/oauth/api_scope/sell.fulfillment: 查看和管理您的订单履行情况
- https://api.ebay.com/oauth/api_scope/sell.finances: 查看和管理您的支付和订单信息,以便将其显示给您并允许您使用第三方应用程序启动退款
- https://api.ebay.com/oauth/api_scope/sell.payment.dispute: 查看和管理争议及相关详细信息(包括支付和订单信息)。
- https://api.ebay.com/oauth/api_scope/sell.fulfillment.readonly: 查看您的订单履行情况
测试
要运行测试,请使用:
composer install vendor/bin/phpunit
作者:
关于此包:
此PHP包由OpenAPI Generator项目自动生成
- API版本:
v1.20.4
- 包版本:
0.0.1
- 生成器版本:
7.6.0
- 包版本:
- 构建包:
org.openapitools.codegen.languages.PhpNextgenClientCodegen