<?php
/**
* FbaInboundApi
* PHP version 7.2
*
* @category Class
* @package Webcom\Amazon\Rest\FulfillmentInboundApi
* @author OpenAPI Generator team
* @link https://openapi-generator.tech
*/
/**
* Selling Partner API for Fulfillment Inbound
*
* The Selling Partner API for Fulfillment Inbound lets you create applications that create and update inbound shipments of inventory to Amazon's fulfillment network.
*
* The version of the OpenAPI document: v0
*
* Generated by: https://openapi-generator.tech
* OpenAPI Generator version: 5.0.0
*/
/**
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
namespace Webcom\Amazon\Rest\FulfillmentInboundApi\Api;
use GuzzleHttp\Client;
use GuzzleHttp\ClientInterface;
use GuzzleHttp\Exception\RequestException;
use GuzzleHttp\Psr7\MultipartStream;
use GuzzleHttp\Psr7\Request;
use GuzzleHttp\RequestOptions;
use Webcom\Amazon\Rest\FulfillmentInboundApi\ApiException;
use Webcom\Amazon\Rest\Configuration;
use Webcom\Amazon\Rest\HeaderSelector;
use Webcom\Amazon\Rest\ObjectSerializer;
/**
* FbaInboundApi Class Doc Comment
*
* @category Class
* @package Webcom\Amazon\Rest\FulfillmentInboundApi
* @author OpenAPI Generator team
* @link https://openapi-generator.tech
*/
class FbaInboundApi
{
/**
* @var ClientInterface
*/
protected $client;
/**
* @var Configuration
*/
protected $config;
/**
* @var HeaderSelector
*/
protected $headerSelector;
/**
* @var int Host index
*/
protected $hostIndex;
/**
* @param ClientInterface $client
* @param Configuration $config
* @param HeaderSelector $selector
* @param int $hostIndex (Optional) host index to select the list of hosts if defined in the OpenAPI spec
*/
public function __construct(
ClientInterface $client = null,
Configuration $config = null,
HeaderSelector $selector = null,
$hostIndex = 0
) {
$this->client = $client ?: new Client();
$this->config = $config ?: new Configuration();
$this->headerSelector = $selector ?: new HeaderSelector();
$this->hostIndex = $hostIndex;
}
/**
* Set the host index
*
* @param int $hostIndex Host index (required)
*/
public function setHostIndex($hostIndex)
{
$this->hostIndex = $hostIndex;
}
/**
* Get the host index
*
* @return int Host index
*/
public function getHostIndex()
{
return $this->hostIndex;
}
/**
* @return Configuration
*/
public function getConfig()
{
return $this->config;
}
/**
* Operation confirmPreorder
*
* @param string $shipmentId A shipment identifier originally returned by the createInboundShipmentPlan operation. (required)
* @param \DateTime $needByDate Date that the shipment must arrive at the Amazon fulfillment center to avoid delivery promise breaks for pre-ordered items. Must be in YYYY-MM-DD format. The response to the getPreorderInfo operation returns this value. (required)
* @param string $marketplaceId A marketplace identifier. Specifies the marketplace the shipment is tied to. (required)
*
* @throws \Webcom\Amazon\Rest\FulfillmentInboundApi\ApiException on non-2xx response
* @throws \InvalidArgumentException
* @return \Webcom\Amazon\Rest\FulfillmentInboundApi\Model\ConfirmPreorderResponse|\Webcom\Amazon\Rest\FulfillmentInboundApi\Model\ConfirmPreorderResponse|\Webcom\Amazon\Rest\FulfillmentInboundApi\Model\ConfirmPreorderResponse|\Webcom\Amazon\Rest\FulfillmentInboundApi\Model\ConfirmPreorderResponse|\Webcom\Amazon\Rest\FulfillmentInboundApi\Model\ConfirmPreorderResponse|\Webcom\Amazon\Rest\FulfillmentInboundApi\Model\ConfirmPreorderResponse|\Webcom\Amazon\Rest\FulfillmentInboundApi\Model\ConfirmPreorderResponse|\Webcom\Amazon\Rest\FulfillmentInboundApi\Model\ConfirmPreorderResponse
*/
public function confirmPreorder($shipmentId, $needByDate, $marketplaceId)
{
list($response) = $this->confirmPreorderWithHttpInfo($shipmentId, $needByDate, $marketplaceId);
return $response;
}
/**
* Operation confirmPreorderWithHttpInfo
*
* @param string $shipmentId A shipment identifier originally returned by the createInboundShipmentPlan operation. (required)
* @param \DateTime $needByDate Date that the shipment must arrive at the Amazon fulfillment center to avoid delivery promise breaks for pre-ordered items. Must be in YYYY-MM-DD format. The response to the getPreorderInfo operation returns this value. (required)
* @param string $marketplaceId A marketplace identifier. Specifies the marketplace the shipment is tied to. (required)
*
* @throws \Webcom\Amazon\Rest\FulfillmentInboundApi\ApiException on non-2xx response
* @throws \InvalidArgumentException
* @return array of \Webcom\Amazon\Rest\FulfillmentInboundApi\Model\ConfirmPreorderResponse|\Webcom\Amazon\Rest\FulfillmentInboundApi\Model\ConfirmPreorderResponse|\Webcom\Amazon\Rest\FulfillmentInboundApi\Model\ConfirmPreorderResponse|\Webcom\Amazon\Rest\FulfillmentInboundApi\Model\ConfirmPreorderResponse|\Webcom\Amazon\Rest\FulfillmentInboundApi\Model\ConfirmPreorderResponse|\Webcom\Amazon\Rest\FulfillmentInboundApi\Model\ConfirmPreorderResponse|\Webcom\Amazon\Rest\FulfillmentInboundApi\Model\ConfirmPreorderResponse|\Webcom\Amazon\Rest\FulfillmentInboundApi\Model\ConfirmPreorderResponse, HTTP status code, HTTP response headers (array of strings)
*/
public function confirmPreorderWithHttpInfo($shipmentId, $needByDate, $marketplaceId)
{
$request = $this->confirmPreorderRequest($shipmentId, $needByDate, $marketplaceId);
try {
$options = $this->createHttpClientOption();
try {
$response = $this->client->send($request, $options);
} catch (RequestException $e) {
throw new ApiException(
"[{$e->getCode()}] {$e->getMessage()}",
$e->getCode(),
$e->getResponse() ? $e->getResponse()->getHeaders() : null,
$e->getResponse() ? (string) $e->getResponse()->getBody() : null
);
}
$statusCode = $response->getStatusCode();
if ($statusCode < 200 || $statusCode > 299) {
throw new ApiException(
sprintf(
'[%d] Error connecting to the API (%s)',
$statusCode,
$request->getUri()
),
$statusCode,
$response->getHeaders(),
$response->getBody()
);
}
$responseBody = $response->getBody();
switch($statusCode) {
case 200:
if ('\Webcom\Amazon\Rest\FulfillmentInboundApi\Model\ConfirmPreorderResponse' === '\SplFileObject') {
$content = $responseBody; //stream goes to serializer
} else {
$content = (string) $responseBody;
}
return [
ObjectSerializer::deserialize($content, '\Webcom\Amazon\Rest\FulfillmentInboundApi\Model\ConfirmPreorderResponse', []),
$response->getStatusCode(),
$response->getHeaders()
];
case 400:
if ('\Webcom\Amazon\Rest\FulfillmentInboundApi\Model\ConfirmPreorderResponse' === '\SplFileObject') {
$content = $responseBody; //stream goes to serializer
} else {
$content = (string) $responseBody;
}
没有合适的资源?快使用搜索试试~ 我知道了~
amazon-selling-partner-api-php:亚马逊销售合作伙伴API PHP客户端
共604个文件
php:598个
json:3个
license:1个
5星 · 超过95%的资源 需积分: 18 10 下载量 146 浏览量
2021-02-09
21:44:45
上传
评论 1
收藏 1.35MB ZIP 举报
温馨提示
这是Amazon Selling Partner API for PHP的示例 此示例使您可以处理SP API OAuth2.0,签名请求,调用基于swagger的源。 要求 PHP 7.4以上 通信基于 和 。 资料来源
资源推荐
资源详情
资源评论
收起资源包目录
amazon-selling-partner-api-php:亚马逊销售合作伙伴API PHP客户端 (604个子文件)
.gitignore 71B
endpoints.json 10KB
config-example.json 1KB
composer.json 453B
LICENSE 1KB
README.md 931B
FbaInboundApi.php 344KB
MessagingApi.php 258KB
FbaOutboundApi.php 230KB
ReportsApi.php 175KB
NotificationsApi.php 161KB
ShippingApi.php 153KB
ServiceApi.php 144KB
MerchantFulfillmentApi.php 144KB
OrdersV0Api.php 127KB
FeedsApi.php 118KB
SmallAndLightApi.php 91KB
ProductPricingApi.php 88KB
DefaultApi.php 84KB
AttributeSetListType.php 79KB
CatalogApi.php 67KB
SolicitationsApi.php 47KB
Order.php 44KB
SalesApi.php 41KB
FeesApi.php 40KB
OrderItem.php 34KB
FinancialEvents.php 32KB
FbaInventoryApi.php 28KB
UploadsApi.php 27KB
FbaInboundApi.php 24KB
CreateFulfillmentOrderRequest.php 24KB
FulfillmentOrder.php 23KB
RelationshipType.php 23KB
Address.php 22KB
ServiceJob.php 21KB
PartneredLtlDataOutput.php 21KB
SellersApi.php 21KB
Shipment.php 20KB
ShippingService.php 20KB
UpdateFulfillmentOrderRequest.php 19KB
FulfillmentOrderItem.php 19KB
ShipmentItem.php 19KB
ShipmentEvent.php 19KB
PackageTrackingDetails.php 18KB
Address.php 18KB
FulfillmentPreview.php 18KB
ItemEligibilityPreview.php 18KB
ReturnItem.php 17KB
Report.php 17KB
EndpointLocator.php 17KB
UpdateFulfillmentOrderItem.php 17KB
CreateFulfillmentOrderItem.php 17KB
Address.php 16KB
ShipmentRequestDetails.php 16KB
FulfillmentShipment.php 16KB
RentalTransactionEvent.php 16KB
OfferDetail.php 16KB
FinancialEventGroup.php 16KB
InboundShipmentInfo.php 16KB
Address.php 16KB
SolutionProviderCreditEvent.php 15KB
Appointment.php 15KB
Feed.php 15KB
PayWithAmazonEvent.php 15KB
InboundShipmentHeader.php 14KB
AffordabilityExpenseEvent.php 14KB
Address.php 14KB
Summary.php 14KB
Address.php 14KB
AdditionalSellerInput.php 14KB
GetFulfillmentPreviewRequest.php 14KB
ObjectSerializer.php 14KB
InventoryDetails.php 13KB
AssociatedItem.php 13KB
RemovalShipmentItem.php 13KB
InboundShipmentItem.php 13KB
FulfillmentPreviewItem.php 13KB
CouponPaymentEvent.php 13KB
PurchaseShipmentRequest.php 13KB
Container.php 13KB
NetworkComminglingTransactionEvent.php 13KB
UnfulfillableQuantity.php 13KB
CreateReportScheduleSpecification.php 13KB
CreateInboundShipmentPlanRequest.php 13KB
SellerInputDefinition.php 13KB
QualifiersType.php 13KB
GetOffersResult.php 13KB
CreateShipmentRequest.php 13KB
InboundShipmentPlan.php 13KB
Shipment.php 13KB
RetrochargeEvent.php 12KB
CreateReturnItem.php 12KB
PartneredLtlDataInput.php 12KB
SellerDealPaymentEvent.php 12KB
InventorySummary.php 12KB
GetFulfillmentOrderResult.php 12KB
Poa.php 12KB
Marketplace.php 12KB
OfferType.php 12KB
FulfillmentPreviewShipment.php 12KB
共 604 条
- 1
- 2
- 3
- 4
- 5
- 6
- 7
资源评论
- dzy137684340522021-08-12用户下载后在一定时间内未进行评价,系统默认好评。
铭哲友野
- 粉丝: 28
- 资源: 4534
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功