cbdesk / ebay_fullfilment
1.0.1.x-dev
2023-07-30 14:22 UTC
Requires
- php: >=5.5
- ext-curl: *
- ext-json: *
- ext-mbstring: *
- guzzlehttp/guzzle: ^7.0
Requires (Dev)
- friendsofphp/php-cs-fixer: ~1.12
- phpunit/phpunit: ^4.8
- squizlabs/php_codesniffer: ~2.6
This package is not auto-updated.
Last update: 2024-09-30 09:01:39 UTC
README
使用履行API,根据结账时指定的支付方式和时间,代表卖家完成每个订单的包装、地址、处理和发货过程。
此PHP包由Swagger Codegen项目自动生成
- API版本:v1.19.17
- 包版本:1.19.17
- 构建包:io.swagger.codegen.v3.generators.php.PhpClientCodegen
要求
PHP 5.5 及以上
安装与使用
Composer
要使用Composer安装绑定,请将以下内容添加到composer.json
{
"repositories": [
{
"type": "git",
"url": "https://github.com/cbdesk/ebay_fullfilment.git"
}
],
"require": {
"cbdesk/ebay_fullfilment": "*@dev"
}
}
然后运行composer install
手动安装
下载文件并包含autoload.php
require_once('/path/to/SwaggerClient-php/vendor/autoload.php');
测试
要运行单元测试
composer install
./vendor/bin/phpunit
入门
请按照安装步骤进行,然后运行以下命令
<?php require_once(__DIR__ . '/vendor/autoload.php'); // Configure OAuth2 access token for authorization: api_auth $config = cbdesk\ebay_fullfilment\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN'); $apiInstance = new cbdesk\ebay_fullfilment\\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 ); $field_groups = "field_groups_example"; // string | The response type associated with the order. The only presently supported value is <code>TAX_BREAKDOWN</code>. This type returns a breakdown of tax and fee values associated with the order. $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 <b>getOrders</b> method in the <b>orders.orderId</b> field. try { $result = $apiInstance->getOrder($field_groups, $order_id); print_r($result); } catch (Exception $e) { echo 'Exception when calling OrderApi->getOrder: ', $e->getMessage(), PHP_EOL; } // Configure OAuth2 access token for authorization: api_auth $config = cbdesk\ebay_fullfilment\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN'); $apiInstance = new cbdesk\ebay_fullfilment\\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 ); $field_groups = "field_groups_example"; // string | The response type associated with the order. The only presently supported value is <code>TAX_BREAKDOWN</code>. This type returns a breakdown of tax and fee values associated with the order. $filter = "filter_example"; // string | One or more comma-separated criteria for narrowing down the collection of orders returned by this call. These criteria correspond to specific fields in the response payload. Multiple filter criteria combine to further restrict the results. <br /><br /> <span class=\"tablenote\"><strong>Note:</strong> Currently, <b>filter</b> returns data from only the last 90 days. If the <b>orderIds</b> parameter is included in the request, the <b>filter</b> parameter will be ignored.</span> <br /><br /> The available criteria are as follows: <dl> <dt><code><b>creationdate</b></code></dt> <dd>The time period during which qualifying orders were created (the <b>orders.creationDate</b> field). In the URI, this is expressed as a starting timestamp, with or without an ending timestamp (in brackets). The timestamps are in ISO 8601 format, which uses the 24-hour Universal Coordinated Time (UTC) clock.For example: <ul> <li><code>creationdate:[2016-02-21T08:25:43.511Z..]</code> identifies orders created on or after the given timestamp.</li> <li><code>creationdate:[2016-02-21T08:25:43.511Z..2016-04-21T08:25:43.511Z]</code> identifies orders created between the given timestamps, inclusive.</li> </ul> </dd> <dt><code><b>lastmodifieddate</b></code></dt> <dd>The time period during which qualifying orders were last modified (the <b>orders.modifiedDate</b> field). In the URI, this is expressed as a starting timestamp, with or without an ending timestamp (in brackets). The timestamps are in ISO 8601 format, which uses the 24-hour Universal Coordinated Time (UTC) clock.For example: <ul> <li><code>lastmodifieddate:[2016-05-15T08:25:43.511Z..]</code> identifies orders modified on or after the given timestamp.</li> <li><code>lastmodifieddate:[2016-05-15T08:25:43.511Z..2016-05-31T08:25:43.511Z]</code> identifies orders modified between the given timestamps, inclusive.</li> </ul> <span class=\"tablenote\"><strong>Note:</strong> If <b>creationdate</b> and <b>lastmodifieddate</b> are both included, only <b>creationdate</b> is used.</span> <br /><br /></dd> <dt><code><b>orderfulfillmentstatus</b></code></dt> <dd>The degree to which qualifying orders have been shipped (the <b>orders.orderFulfillmentStatus</b> field). In the URI, this is expressed as one of the following value combinations: <ul> <li><code>orderfulfillmentstatus:{NOT_STARTED|IN_PROGRESS}</code> specifies orders for which no shipping fulfillments have been started, plus orders for which at least one shipping fulfillment has been started but not completed.</li> <li><code>orderfulfillmentstatus:{FULFILLED|IN_PROGRESS}</code> specifies orders for which all shipping fulfillments have been completed, plus orders for which at least one shipping fulfillment has been started but not completed.</li> </ul> <span class=\"tablenote\"><strong>Note:</strong> The values <code>NOT_STARTED</code>, <code>IN_PROGRESS</code>, and <code>FULFILLED</code> can be used in various combinations, but only the combinations shown here are currently supported.</span> </dd> </dl> Here is an example of a <b>getOrders</b> call using all of these filters: <br /><br /> <code>GET https://api.ebay.com/sell/v1/order?<br />filter=<b>creationdate</b>:%5B2016-03-21T08:25:43.511Z..2016-04-21T08:25:43.511Z%5D,<br /><b>lastmodifieddate</b>:%5B2016-05-15T08:25:43.511Z..%5D,<br /><b>orderfulfillmentstatus</b>:%7BNOT_STARTED%7CIN_PROGRESS%7D</code> <br /><br /> <span class=\"tablenote\"><strong>Note:</strong> This call requires that certain special characters in the URI query string be percent-encoded: <br /> <code>[</code> = <code>%5B</code> <code>]</code> = <code>%5D</code> <code>{</code> = <code>%7B</code> <code>|</code> = <code>%7C</code> <code>}</code> = <code>%7D</code> <br /> This query filter example uses these codes.</span> For implementation help, refer to eBay API documentation at https://developer.ebay.com/api-docs/sell/fulfillment/types/api:FilterField $limit = "limit_example"; // string | The number of orders to return per page of the result set. Use this parameter in conjunction with the <b>offset</b> parameter to control the pagination of the output. <br /><br />For example, if <b>offset</b> is set to <code>10</code> and <b>limit</b> is set to <code>10</code>, the call retrieves orders 11 thru 20 from the result set. <br /><br /> If a limit is not set, the <b>limit</b> defaults to 50 and returns up to 50 orders. If a requested limit is more than 200, the call fails and returns an error.<br ><br> <span class=\"tablenote\"><strong>Note:</strong> This feature employs a zero-based list, where the first item in the list has an offset of <code>0</code>. If the <b>orderIds</b> parameter is included in the request, this parameter will be ignored.</span> <br /><br /> <b>Maximum:</b> <code>200</code> <br /> <b>Default:</b> <code>50</code> $offset = "offset_example"; // string | Specifies the number of orders to skip in the result set before returning the first order in the paginated response. <p>Combine <b>offset</b> with the <b>limit</b> query parameter to control the items returned in the response. For example, if you supply an <b>offset</b> of <code>0</code> and a <b>limit</b> of <code>10</code>, the first page of the response contains the first 10 items from the complete list of items retrieved by the call. If <b>offset</b> is <code>10</code> and <b>limit</b> is <code>20</code>, the first page of the response contains items 11-30 from the complete result set.</p> <p><b>Default:</b> 0</p> $order_ids = "order_ids_example"; // string | A comma-separated list of the unique identifiers of the orders to retrieve (maximum 50). If one or more order ID values are specified through the <b>orderIds</b> query parameter, all other query parameters will be ignored. try { $result = $apiInstance->getOrders($field_groups, $filter, $limit, $offset, $order_ids); print_r($result); } catch (Exception $e) { echo 'Exception when calling OrderApi->getOrders: ', $e->getMessage(), PHP_EOL; } // Configure OAuth2 access token for authorization: api_auth $config = cbdesk\ebay_fullfilment\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN'); $apiInstance = new cbdesk\ebay_fullfilment\\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 IDs are returned in the <b>getOrders</b> method (and <b>GetOrders</b> call of Trading API). The <b>issueRefund</b> method supports the legacy API Order IDs and REST API order IDs. $body = new \cbdesk\ebay_fullfilment\Model\IssueRefundRequest(); // \cbdesk\ebay_fullfilment\Model\IssueRefundRequest | try { $result = $apiInstance->issueRefund($order_id, $body); print_r($result); } catch (Exception $e) { echo 'Exception when calling OrderApi->issueRefund: ', $e->getMessage(), PHP_EOL; } ?>
API端点文档
所有URI都是相对于https://api.ebay.com{basePath}
模型文档
- AcceptPaymentDisputeRequest
- AddEvidencePaymentDisputeRequest
- AddEvidencePaymentDisputeResponse
- Address
- Amount
- AppliedPromotion
- 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
- 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:查看您的订单履行情况