cdma-numiscorner / ebay-fulfillment-api
使用Fulfillment API代表卖家根据结账时指定的支付方式和时间完成包装、地址、处理和发货的每个订单的过程。
1.3
2021-03-26 13:51 UTC
Requires
- php: >=7.2
- ext-curl: *
- ext-json: *
- ext-mbstring: *
- guzzlehttp/guzzle: ^6.2
Requires (Dev)
- friendsofphp/php-cs-fixer: ^2.12
- phpunit/phpunit: ^8.0 || ^9.0
This package is auto-updated.
Last update: 2024-09-26 22:39:52 UTC
README
使用Fulfillment API代表卖家根据结账时指定的支付方式和时间完成包装、地址、处理和发货的每个订单的过程。
安装与使用
需求
PHP 7.2 及以上版本。
Composer
要通过Composer安装绑定,请在 composer.json
中添加以下内容
{ "repositories": [ { "type": "vcs", "url": "https://github.com/cdma-numiscorner/EbayFulFillmentApi.git" } ], "require": { "cdma-numiscorner/EbayFulFillmentApi": "*@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 = OpenAPI\EbayFulFillmentClient\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN'); $apiInstance = new OpenAPI\EbayFulFillmentClient\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 | The unique identifier of the order. Order ID values are shown in My eBay/Seller Hub, and are also returned by the getOrders method in the orders.orderId field. Note: A new order ID format was introduced to all eBay APIs (legacy and REST) in June 2019. In REST APIs that return Order IDs, including the Fulfillment API, all order IDs are returned in the new format, but the getOrder method will accept both the legacy and new format order ID. The new format is a non-parsable string, globally unique across all eBay marketplaces, and consistent for both single line item and multiple line item orders. These order identifiers will be automatically generated after buyer payment, and unlike in the past, instead of just being known and exposed to the seller, these unique order identifiers will also be known and used/referenced by the buyer and eBay customer support. $field_groups = 'field_groups_example'; // string | The response type associated with the order. The only presently supported value is TAX_BREAKDOWN. This type returns a breakdown of tax and fee values associated with the order. 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
- Buyer
- CancelRequest
- CancelStatus
- ContestPaymentDisputeRequest
- DeliveryCost
- DisputeAmount
- DisputeEvidence
- DisputeSummaryResponse
- EbayCollectAndRemitTax
- Error
- ErrorParameter
- EvidenceRequest
- ExtendedContact
- FileEvidence
- FileInfo
- FulfillmentStartInstruction
- GiftDetails
- InfoFromBuyer
- IssueRefundRequest
- LegacyReference
- LineItem
- LineItemFulfillmentInstructions
- LineItemProperties
- LineItemReference
- LineItemRefund
- MonetaryTransaction
- 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.19.3
- 包版本:
1.0
- 包版本:
- 构建包:
org.openapitools.codegen.languages.PhpClientCodegen