<?php
|
/**
|
* This class is autogenerated by the Spapi class generator
|
* Date of generation: 2022-05-26
|
* Specification: https://github.com/amzn/selling-partner-api-models/blob/main/models/messaging-api-model/messaging.json
|
* Source MD5 signature: 0563da0595dadeb62903c1ece72cd625
|
*
|
*
|
* Selling Partner API for Messaging
|
* With the Messaging API you can build applications that send messages to buyers. You can get a list of message types that are available for an order that you specify, then call an operation that sends a message to the buyer for that order. The Messaging API returns responses that are formed according to the <a href=https://tools.ietf.org/html/draft-kelly-json-hal-08>JSON Hypertext Application Language</a> (HAL) standard.
|
*/
|
namespace DoubleBreak\Spapi\Api;
|
use DoubleBreak\Spapi\Client;
|
|
class Messaging extends Client {
|
|
/**
|
* Operation getMessagingActionsForOrder
|
*
|
* @param string $amazonOrderId An Amazon order identifier. This specifies the order for which you want a list of available message types.
|
*
|
* @param array $queryParams
|
* - *marketplaceIds* array - A marketplace identifier. This specifies the marketplace in which the order was placed. Only one marketplace can be specified.
|
*
|
*/
|
public function getMessagingActionsForOrder($amazonOrderId, $queryParams = [])
|
{
|
return $this->send("/messaging/v1/orders/{$amazonOrderId}", [
|
'method' => 'GET',
|
'query' => $queryParams,
|
]);
|
}
|
|
public function getMessagingActionsForOrderAsync($amazonOrderId, $queryParams = [])
|
{
|
return $this->sendAsync("/messaging/v1/orders/{$amazonOrderId}", [
|
'method' => 'GET',
|
'query' => $queryParams,
|
]);
|
}
|
|
/**
|
* Operation confirmCustomizationDetails
|
*
|
* @param string $amazonOrderId An Amazon order identifier. This specifies the order for which a message is sent.
|
*
|
* @param array $queryParams
|
* - *marketplaceIds* array - A marketplace identifier. This specifies the marketplace in which the order was placed. Only one marketplace can be specified.
|
*
|
*/
|
public function confirmCustomizationDetails($amazonOrderId, $queryParams = [], $body = [])
|
{
|
return $this->send("/messaging/v1/orders/{$amazonOrderId}/messages/confirmCustomizationDetails", [
|
'method' => 'POST',
|
'query' => $queryParams,
|
'json' => $body
|
]);
|
}
|
|
public function confirmCustomizationDetailsAsync($amazonOrderId, $queryParams = [], $body = [])
|
{
|
return $this->sendAsync("/messaging/v1/orders/{$amazonOrderId}/messages/confirmCustomizationDetails", [
|
'method' => 'POST',
|
'query' => $queryParams,
|
'json' => $body
|
]);
|
}
|
|
/**
|
* Operation createConfirmDeliveryDetails
|
*
|
* @param string $amazonOrderId An Amazon order identifier. This specifies the order for which a message is sent.
|
*
|
* @param array $queryParams
|
* - *marketplaceIds* array - A marketplace identifier. This specifies the marketplace in which the order was placed. Only one marketplace can be specified.
|
*
|
*/
|
public function createConfirmDeliveryDetails($amazonOrderId, $queryParams = [], $body = [])
|
{
|
return $this->send("/messaging/v1/orders/{$amazonOrderId}/messages/confirmDeliveryDetails", [
|
'method' => 'POST',
|
'query' => $queryParams,
|
'json' => $body
|
]);
|
}
|
|
public function createConfirmDeliveryDetailsAsync($amazonOrderId, $queryParams = [], $body = [])
|
{
|
return $this->sendAsync("/messaging/v1/orders/{$amazonOrderId}/messages/confirmDeliveryDetails", [
|
'method' => 'POST',
|
'query' => $queryParams,
|
'json' => $body
|
]);
|
}
|
|
/**
|
* Operation createLegalDisclosure
|
*
|
* @param string $amazonOrderId An Amazon order identifier. This specifies the order for which a message is sent.
|
*
|
* @param array $queryParams
|
* - *marketplaceIds* array - A marketplace identifier. This specifies the marketplace in which the order was placed. Only one marketplace can be specified.
|
*
|
*/
|
public function createLegalDisclosure($amazonOrderId, $queryParams = [], $body = [])
|
{
|
return $this->send("/messaging/v1/orders/{$amazonOrderId}/messages/legalDisclosure", [
|
'method' => 'POST',
|
'query' => $queryParams,
|
'json' => $body
|
]);
|
}
|
|
public function createLegalDisclosureAsync($amazonOrderId, $queryParams = [], $body = [])
|
{
|
return $this->sendAsync("/messaging/v1/orders/{$amazonOrderId}/messages/legalDisclosure", [
|
'method' => 'POST',
|
'query' => $queryParams,
|
'json' => $body
|
]);
|
}
|
|
/**
|
* Operation createNegativeFeedbackRemoval
|
*
|
* @param string $amazonOrderId An Amazon order identifier. This specifies the order for which a message is sent.
|
*
|
* @param array $queryParams
|
* - *marketplaceIds* array - A marketplace identifier. This specifies the marketplace in which the order was placed. Only one marketplace can be specified.
|
*
|
*/
|
public function createNegativeFeedbackRemoval($amazonOrderId, $queryParams = [])
|
{
|
return $this->send("/messaging/v1/orders/{$amazonOrderId}/messages/negativeFeedbackRemoval", [
|
'method' => 'POST',
|
'query' => $queryParams,
|
]);
|
}
|
|
public function createNegativeFeedbackRemovalAsync($amazonOrderId, $queryParams = [])
|
{
|
return $this->sendAsync("/messaging/v1/orders/{$amazonOrderId}/messages/negativeFeedbackRemoval", [
|
'method' => 'POST',
|
'query' => $queryParams,
|
]);
|
}
|
|
/**
|
* Operation createConfirmOrderDetails
|
*
|
* @param string $amazonOrderId An Amazon order identifier. This specifies the order for which a message is sent.
|
*
|
* @param array $queryParams
|
* - *marketplaceIds* array - A marketplace identifier. This specifies the marketplace in which the order was placed. Only one marketplace can be specified.
|
*
|
*/
|
public function createConfirmOrderDetails($amazonOrderId, $queryParams = [], $body = [])
|
{
|
return $this->send("/messaging/v1/orders/{$amazonOrderId}/messages/confirmOrderDetails", [
|
'method' => 'POST',
|
'query' => $queryParams,
|
'json' => $body
|
]);
|
}
|
|
public function createConfirmOrderDetailsAsync($amazonOrderId, $queryParams = [], $body = [])
|
{
|
return $this->sendAsync("/messaging/v1/orders/{$amazonOrderId}/messages/confirmOrderDetails", [
|
'method' => 'POST',
|
'query' => $queryParams,
|
'json' => $body
|
]);
|
}
|
|
/**
|
* Operation createConfirmServiceDetails
|
*
|
* @param string $amazonOrderId An Amazon order identifier. This specifies the order for which a message is sent.
|
*
|
* @param array $queryParams
|
* - *marketplaceIds* array - A marketplace identifier. This specifies the marketplace in which the order was placed. Only one marketplace can be specified.
|
*
|
*/
|
public function createConfirmServiceDetails($amazonOrderId, $queryParams = [], $body = [])
|
{
|
return $this->send("/messaging/v1/orders/{$amazonOrderId}/messages/confirmServiceDetails", [
|
'method' => 'POST',
|
'query' => $queryParams,
|
'json' => $body
|
]);
|
}
|
|
public function createConfirmServiceDetailsAsync($amazonOrderId, $queryParams = [], $body = [])
|
{
|
return $this->sendAsync("/messaging/v1/orders/{$amazonOrderId}/messages/confirmServiceDetails", [
|
'method' => 'POST',
|
'query' => $queryParams,
|
'json' => $body
|
]);
|
}
|
|
/**
|
* Operation CreateAmazonMotors
|
*
|
* @param string $amazonOrderId An Amazon order identifier. This specifies the order for which a message is sent.
|
*
|
* @param array $queryParams
|
* - *marketplaceIds* array - A marketplace identifier. This specifies the marketplace in which the order was placed. Only one marketplace can be specified.
|
*
|
*/
|
public function CreateAmazonMotors($amazonOrderId, $queryParams = [], $body = [])
|
{
|
return $this->send("/messaging/v1/orders/{$amazonOrderId}/messages/amazonMotors", [
|
'method' => 'POST',
|
'query' => $queryParams,
|
'json' => $body
|
]);
|
}
|
|
public function CreateAmazonMotorsAsync($amazonOrderId, $queryParams = [], $body = [])
|
{
|
return $this->sendAsync("/messaging/v1/orders/{$amazonOrderId}/messages/amazonMotors", [
|
'method' => 'POST',
|
'query' => $queryParams,
|
'json' => $body
|
]);
|
}
|
|
/**
|
* Operation CreateWarranty
|
*
|
* @param string $amazonOrderId An Amazon order identifier. This specifies the order for which a message is sent.
|
*
|
* @param array $queryParams
|
* - *marketplaceIds* array - A marketplace identifier. This specifies the marketplace in which the order was placed. Only one marketplace can be specified.
|
*
|
*/
|
public function CreateWarranty($amazonOrderId, $queryParams = [], $body = [])
|
{
|
return $this->send("/messaging/v1/orders/{$amazonOrderId}/messages/warranty", [
|
'method' => 'POST',
|
'query' => $queryParams,
|
'json' => $body
|
]);
|
}
|
|
public function CreateWarrantyAsync($amazonOrderId, $queryParams = [], $body = [])
|
{
|
return $this->sendAsync("/messaging/v1/orders/{$amazonOrderId}/messages/warranty", [
|
'method' => 'POST',
|
'query' => $queryParams,
|
'json' => $body
|
]);
|
}
|
|
/**
|
* Operation GetAttributes
|
*
|
* @param string $amazonOrderId An Amazon order identifier. This specifies the order for which a message is sent.
|
*
|
* @param array $queryParams
|
* - *marketplaceIds* array - A marketplace identifier. This specifies the marketplace in which the order was placed. Only one marketplace can be specified.
|
*
|
*/
|
public function GetAttributes($amazonOrderId, $queryParams = [])
|
{
|
return $this->send("/messaging/v1/orders/{$amazonOrderId}/attributes", [
|
'method' => 'GET',
|
'query' => $queryParams,
|
]);
|
}
|
|
public function GetAttributesAsync($amazonOrderId, $queryParams = [])
|
{
|
return $this->sendAsync("/messaging/v1/orders/{$amazonOrderId}/attributes", [
|
'method' => 'GET',
|
'query' => $queryParams,
|
]);
|
}
|
|
/**
|
* Operation createDigitalAccessKey
|
*
|
* @param string $amazonOrderId An Amazon order identifier. This specifies the order for which a message is sent.
|
*
|
* @param array $queryParams
|
* - *marketplaceIds* array - A marketplace identifier. This specifies the marketplace in which the order was placed. Only one marketplace can be specified.
|
*
|
*/
|
public function createDigitalAccessKey($amazonOrderId, $queryParams = [], $body = [])
|
{
|
return $this->send("/messaging/v1/orders/{$amazonOrderId}/messages/digitalAccessKey", [
|
'method' => 'POST',
|
'query' => $queryParams,
|
'json' => $body
|
]);
|
}
|
|
public function createDigitalAccessKeyAsync($amazonOrderId, $queryParams = [], $body = [])
|
{
|
return $this->sendAsync("/messaging/v1/orders/{$amazonOrderId}/messages/digitalAccessKey", [
|
'method' => 'POST',
|
'query' => $queryParams,
|
'json' => $body
|
]);
|
}
|
|
/**
|
* Operation createUnexpectedProblem
|
*
|
* @param string $amazonOrderId An Amazon order identifier. This specifies the order for which a message is sent.
|
*
|
* @param array $queryParams
|
* - *marketplaceIds* array - A marketplace identifier. This specifies the marketplace in which the order was placed. Only one marketplace can be specified.
|
*
|
*/
|
public function createUnexpectedProblem($amazonOrderId, $queryParams = [], $body = [])
|
{
|
return $this->send("/messaging/v1/orders/{$amazonOrderId}/messages/unexpectedProblem", [
|
'method' => 'POST',
|
'query' => $queryParams,
|
'json' => $body
|
]);
|
}
|
|
public function createUnexpectedProblemAsync($amazonOrderId, $queryParams = [], $body = [])
|
{
|
return $this->sendAsync("/messaging/v1/orders/{$amazonOrderId}/messages/unexpectedProblem", [
|
'method' => 'POST',
|
'query' => $queryParams,
|
'json' => $body
|
]);
|
}
|
}
|