Google_Service_ShoppingContent_Resource_Orders
extends Google_Service_Resource
in package
The "orders" collection of methods.
Typical usage is:
$contentService = new Google_Service_ShoppingContent(...);
$orders = $contentService->orders;
Table of Contents
- $client : Google_Client
- $methods : array<string|int, mixed>
- $resourceName : string
- $rootUrl : string
- $serviceName : string
- $servicePath : string
- $stackParameters : mixed
- __construct() : mixed
- acknowledge() : Google_Service_ShoppingContent_OrdersAcknowledgeResponse
- Marks an order as acknowledged. (orders.acknowledge)
- advancetestorder() : Google_Service_ShoppingContent_OrdersAdvanceTestOrderResponse
- Sandbox only. Moves a test order from state "`inProgress`" to state "`pendingShipment`". (orders.advancetestorder)
- call() : Google_Http_Request|expectedClass
- TODO: This function needs simplifying.
- cancel() : Google_Service_ShoppingContent_OrdersCancelResponse
- Cancels all line items in an order, making a full refund. (orders.cancel)
- cancellineitem() : Google_Service_ShoppingContent_OrdersCancelLineItemResponse
- Cancels a line item, making a full refund. (orders.cancellineitem)
- canceltestorderbycustomer() : Google_Service_ShoppingContent_OrdersCancelTestOrderByCustomerResponse
- Sandbox only. Cancels a test order for customer-initiated cancellation.
- createRequestUri() : string
- Parse/expand request parameters and create a fully qualified request uri.
- createtestorder() : Google_Service_ShoppingContent_OrdersCreateTestOrderResponse
- Sandbox only. Creates a test order. (orders.createtestorder)
- createtestreturn() : Google_Service_ShoppingContent_OrdersCreateTestReturnResponse
- Sandbox only. Creates a test return. (orders.createtestreturn)
- get() : Google_Service_ShoppingContent_Order
- Retrieves an order from your Merchant Center account. (orders.get)
- getbymerchantorderid() : Google_Service_ShoppingContent_OrdersGetByMerchantOrderIdResponse
- Retrieves an order using merchant order ID. (orders.getbymerchantorderid)
- gettestordertemplate() : Google_Service_ShoppingContent_OrdersGetTestOrderTemplateResponse
- Sandbox only. Retrieves an order template that can be used to quickly create a new order in sandbox. (orders.gettestordertemplate)
- instorerefundlineitem() : Google_Service_ShoppingContent_OrdersInStoreRefundLineItemResponse
- Deprecated. Notifies that item return and refund was handled directly by merchant outside of Google payments processing (e.g. cash refund done in store). Note: We recommend calling the returnrefundlineitem method to refund in-store returns. We will issue the refund directly to the customer. This helps to prevent possible differences arising between merchant and Google transaction records. We also recommend having the point of sale system communicate with Google to ensure that customers do not receive a double refund by first refunding via Google then via an in-store return.
- listOrders() : Google_Service_ShoppingContent_OrdersListResponse
- Lists the orders in your Merchant Center account. (orders.listOrders)
- refunditem() : Google_Service_ShoppingContent_OrdersRefundItemResponse
- Issues a partial or total refund for items and shipment. (orders.refunditem)
- refundorder() : Google_Service_ShoppingContent_OrdersRefundOrderResponse
- Issues a partial or total refund for an order. (orders.refundorder)
- rejectreturnlineitem() : Google_Service_ShoppingContent_OrdersRejectReturnLineItemResponse
- Rejects return on an line item. (orders.rejectreturnlineitem)
- returnrefundlineitem() : Google_Service_ShoppingContent_OrdersReturnRefundLineItemResponse
- Returns and refunds a line item. Note that this method can only be called on fully shipped orders. Please also note that the Orderreturns API is the preferred way to handle returns after you receive a return from a customer.
- setlineitemmetadata() : Google_Service_ShoppingContent_OrdersSetLineItemMetadataResponse
- Sets (or overrides if it already exists) merchant provided annotations in the form of key-value pairs. A common use case would be to supply us with additional structured information about a line item that cannot be provided via other methods. Submitted key-value pairs can be retrieved as part of the orders resource. (orders.setlineitemmetadata)
- shiplineitems() : Google_Service_ShoppingContent_OrdersShipLineItemsResponse
- Marks line item(s) as shipped. (orders.shiplineitems)
- updatelineitemshippingdetails() : Google_Service_ShoppingContent_OrdersUpdateLineItemShippingDetailsResponse
- Updates ship by and delivery by dates for a line item.
- updatemerchantorderid() : Google_Service_ShoppingContent_OrdersUpdateMerchantOrderIdResponse
- Updates the merchant order ID for a given order.
- updateshipment() : Google_Service_ShoppingContent_OrdersUpdateShipmentResponse
- Updates a shipment's status, carrier, and/or tracking ID.
- convertToArrayAndStripNulls() : mixed
Properties
$client
private
Google_Client
$client
$methods
private
array<string|int, mixed>
$methods
$resourceName
private
string
$resourceName
$rootUrl
private
string
$rootUrl
$serviceName
private
string
$serviceName
$servicePath
private
string
$servicePath
$stackParameters
private
mixed
$stackParameters
= array('alt' => array('type' => 'string', 'location' => 'query'), 'fields' => array('type' => 'string', 'location' => 'query'), 'trace' => array('type' => 'string', 'location' => 'query'), 'userIp' => array('type' => 'string', 'location' => 'query'), 'quotaUser' => array('type' => 'string', 'location' => 'query'), 'data' => array('type' => 'string', 'location' => 'body'), 'mimeType' => array('type' => 'string', 'location' => 'header'), 'uploadType' => array('type' => 'string', 'location' => 'query'), 'mediaUpload' => array('type' => 'complex', 'location' => 'query'), 'prettyPrint' => array('type' => 'string', 'location' => 'query'))
Methods
__construct()
public
__construct(mixed $service, mixed $serviceName, mixed $resourceName, mixed $resource) : mixed
Parameters
- $service : mixed
- $serviceName : mixed
- $resourceName : mixed
- $resource : mixed
Return values
mixed —acknowledge()
Marks an order as acknowledged. (orders.acknowledge)
public
acknowledge(string $merchantId, string $orderId, Google_Service_ShoppingContent_OrdersAcknowledgeRequest $postBody[, array<string|int, mixed> $optParams = array() ]) : Google_Service_ShoppingContent_OrdersAcknowledgeResponse
Parameters
- $merchantId : string
-
The ID of the account that manages the order. This cannot be a multi-client account.
- $orderId : string
-
The ID of the order.
- $postBody : Google_Service_ShoppingContent_OrdersAcknowledgeRequest
- $optParams : array<string|int, mixed> = array()
-
Optional parameters.
Return values
Google_Service_ShoppingContent_OrdersAcknowledgeResponse —advancetestorder()
Sandbox only. Moves a test order from state "`inProgress`" to state "`pendingShipment`". (orders.advancetestorder)
public
advancetestorder(string $merchantId, string $orderId[, array<string|int, mixed> $optParams = array() ]) : Google_Service_ShoppingContent_OrdersAdvanceTestOrderResponse
Parameters
- $merchantId : string
-
The ID of the account that manages the order. This cannot be a multi-client account.
- $orderId : string
-
The ID of the test order to modify.
- $optParams : array<string|int, mixed> = array()
-
Optional parameters.
Return values
Google_Service_ShoppingContent_OrdersAdvanceTestOrderResponse —call()
TODO: This function needs simplifying.
public
call( $name, $arguments[, $expectedClass = null ]) : Google_Http_Request|expectedClass
Parameters
Tags
Return values
Google_Http_Request|expectedClass —cancel()
Cancels all line items in an order, making a full refund. (orders.cancel)
public
cancel(string $merchantId, string $orderId, Google_Service_ShoppingContent_OrdersCancelRequest $postBody[, array<string|int, mixed> $optParams = array() ]) : Google_Service_ShoppingContent_OrdersCancelResponse
Parameters
- $merchantId : string
-
The ID of the account that manages the order. This cannot be a multi-client account.
- $orderId : string
-
The ID of the order to cancel.
- $postBody : Google_Service_ShoppingContent_OrdersCancelRequest
- $optParams : array<string|int, mixed> = array()
-
Optional parameters.
Return values
Google_Service_ShoppingContent_OrdersCancelResponse —cancellineitem()
Cancels a line item, making a full refund. (orders.cancellineitem)
public
cancellineitem(string $merchantId, string $orderId, Google_Service_ShoppingContent_OrdersCancelLineItemRequest $postBody[, array<string|int, mixed> $optParams = array() ]) : Google_Service_ShoppingContent_OrdersCancelLineItemResponse
Parameters
- $merchantId : string
-
The ID of the account that manages the order. This cannot be a multi-client account.
- $orderId : string
-
The ID of the order.
- $postBody : Google_Service_ShoppingContent_OrdersCancelLineItemRequest
- $optParams : array<string|int, mixed> = array()
-
Optional parameters.
Return values
Google_Service_ShoppingContent_OrdersCancelLineItemResponse —canceltestorderbycustomer()
Sandbox only. Cancels a test order for customer-initiated cancellation.
public
canceltestorderbycustomer(string $merchantId, string $orderId, Google_Service_ShoppingContent_OrdersCancelTestOrderByCustomerRequest $postBody[, array<string|int, mixed> $optParams = array() ]) : Google_Service_ShoppingContent_OrdersCancelTestOrderByCustomerResponse
(orders.canceltestorderbycustomer)
Parameters
- $merchantId : string
-
The ID of the account that manages the order. This cannot be a multi-client account.
- $orderId : string
-
The ID of the test order to cancel.
- $postBody : Google_Service_ShoppingContent_OrdersCancelTestOrderByCustomerRequest
- $optParams : array<string|int, mixed> = array()
-
Optional parameters.
Return values
Google_Service_ShoppingContent_OrdersCancelTestOrderByCustomerResponse —createRequestUri()
Parse/expand request parameters and create a fully qualified request uri.
public
createRequestUri(string $restPath, array<string|int, mixed> $params) : string
Parameters
- $restPath : string
- $params : array<string|int, mixed>
Tags
Return values
string —$requestUrl
createtestorder()
Sandbox only. Creates a test order. (orders.createtestorder)
public
createtestorder(string $merchantId, Google_Service_ShoppingContent_OrdersCreateTestOrderRequest $postBody[, array<string|int, mixed> $optParams = array() ]) : Google_Service_ShoppingContent_OrdersCreateTestOrderResponse
Parameters
- $merchantId : string
-
The ID of the account that should manage the order. This cannot be a multi-client account.
- $postBody : Google_Service_ShoppingContent_OrdersCreateTestOrderRequest
- $optParams : array<string|int, mixed> = array()
-
Optional parameters.
Return values
Google_Service_ShoppingContent_OrdersCreateTestOrderResponse —createtestreturn()
Sandbox only. Creates a test return. (orders.createtestreturn)
public
createtestreturn(string $merchantId, string $orderId, Google_Service_ShoppingContent_OrdersCreateTestReturnRequest $postBody[, array<string|int, mixed> $optParams = array() ]) : Google_Service_ShoppingContent_OrdersCreateTestReturnResponse
Parameters
- $merchantId : string
-
The ID of the account that manages the order. This cannot be a multi-client account.
- $orderId : string
-
The ID of the order.
- $postBody : Google_Service_ShoppingContent_OrdersCreateTestReturnRequest
- $optParams : array<string|int, mixed> = array()
-
Optional parameters.
Return values
Google_Service_ShoppingContent_OrdersCreateTestReturnResponse —get()
Retrieves an order from your Merchant Center account. (orders.get)
public
get(string $merchantId, string $orderId[, array<string|int, mixed> $optParams = array() ]) : Google_Service_ShoppingContent_Order
Parameters
- $merchantId : string
-
The ID of the account that manages the order. This cannot be a multi-client account.
- $orderId : string
-
The ID of the order.
- $optParams : array<string|int, mixed> = array()
-
Optional parameters.
Return values
Google_Service_ShoppingContent_Order —getbymerchantorderid()
Retrieves an order using merchant order ID. (orders.getbymerchantorderid)
public
getbymerchantorderid(string $merchantId, string $merchantOrderId[, array<string|int, mixed> $optParams = array() ]) : Google_Service_ShoppingContent_OrdersGetByMerchantOrderIdResponse
Parameters
- $merchantId : string
-
The ID of the account that manages the order. This cannot be a multi-client account.
- $merchantOrderId : string
-
The merchant order ID to be looked for.
- $optParams : array<string|int, mixed> = array()
-
Optional parameters.
Return values
Google_Service_ShoppingContent_OrdersGetByMerchantOrderIdResponse —gettestordertemplate()
Sandbox only. Retrieves an order template that can be used to quickly create a new order in sandbox. (orders.gettestordertemplate)
public
gettestordertemplate(string $merchantId, string $templateName[, array<string|int, mixed> $optParams = array() ]) : Google_Service_ShoppingContent_OrdersGetTestOrderTemplateResponse
Parameters
- $merchantId : string
-
The ID of the account that should manage the order. This cannot be a multi-client account.
- $templateName : string
-
The name of the template to retrieve.
- $optParams : array<string|int, mixed> = array()
-
Optional parameters.
Tags
Return values
Google_Service_ShoppingContent_OrdersGetTestOrderTemplateResponse —instorerefundlineitem()
Deprecated. Notifies that item return and refund was handled directly by merchant outside of Google payments processing (e.g. cash refund done in store). Note: We recommend calling the returnrefundlineitem method to refund in-store returns. We will issue the refund directly to the customer. This helps to prevent possible differences arising between merchant and Google transaction records. We also recommend having the point of sale system communicate with Google to ensure that customers do not receive a double refund by first refunding via Google then via an in-store return.
public
instorerefundlineitem(string $merchantId, string $orderId, Google_Service_ShoppingContent_OrdersInStoreRefundLineItemRequest $postBody[, array<string|int, mixed> $optParams = array() ]) : Google_Service_ShoppingContent_OrdersInStoreRefundLineItemResponse
(orders.instorerefundlineitem)
Parameters
- $merchantId : string
-
The ID of the account that manages the order. This cannot be a multi-client account.
- $orderId : string
-
The ID of the order.
- $postBody : Google_Service_ShoppingContent_OrdersInStoreRefundLineItemRequest
- $optParams : array<string|int, mixed> = array()
-
Optional parameters.
Return values
Google_Service_ShoppingContent_OrdersInStoreRefundLineItemResponse —listOrders()
Lists the orders in your Merchant Center account. (orders.listOrders)
public
listOrders(string $merchantId[, array<string|int, mixed> $optParams = array() ]) : Google_Service_ShoppingContent_OrdersListResponse
Parameters
- $merchantId : string
-
The ID of the account that manages the order. This cannot be a multi-client account.
- $optParams : array<string|int, mixed> = array()
-
Optional parameters.
Tags
Return values
Google_Service_ShoppingContent_OrdersListResponse —refunditem()
Issues a partial or total refund for items and shipment. (orders.refunditem)
public
refunditem(string $merchantId, string $orderId, Google_Service_ShoppingContent_OrdersRefundItemRequest $postBody[, array<string|int, mixed> $optParams = array() ]) : Google_Service_ShoppingContent_OrdersRefundItemResponse
Parameters
- $merchantId : string
-
The ID of the account that manages the order. This cannot be a multi-client account.
- $orderId : string
-
The ID of the order to refund.
- $postBody : Google_Service_ShoppingContent_OrdersRefundItemRequest
- $optParams : array<string|int, mixed> = array()
-
Optional parameters.
Return values
Google_Service_ShoppingContent_OrdersRefundItemResponse —refundorder()
Issues a partial or total refund for an order. (orders.refundorder)
public
refundorder(string $merchantId, string $orderId, Google_Service_ShoppingContent_OrdersRefundOrderRequest $postBody[, array<string|int, mixed> $optParams = array() ]) : Google_Service_ShoppingContent_OrdersRefundOrderResponse
Parameters
- $merchantId : string
-
The ID of the account that manages the order. This cannot be a multi-client account.
- $orderId : string
-
The ID of the order to refund.
- $postBody : Google_Service_ShoppingContent_OrdersRefundOrderRequest
- $optParams : array<string|int, mixed> = array()
-
Optional parameters.
Return values
Google_Service_ShoppingContent_OrdersRefundOrderResponse —rejectreturnlineitem()
Rejects return on an line item. (orders.rejectreturnlineitem)
public
rejectreturnlineitem(string $merchantId, string $orderId, Google_Service_ShoppingContent_OrdersRejectReturnLineItemRequest $postBody[, array<string|int, mixed> $optParams = array() ]) : Google_Service_ShoppingContent_OrdersRejectReturnLineItemResponse
Parameters
- $merchantId : string
-
The ID of the account that manages the order. This cannot be a multi-client account.
- $orderId : string
-
The ID of the order.
- $postBody : Google_Service_ShoppingContent_OrdersRejectReturnLineItemRequest
- $optParams : array<string|int, mixed> = array()
-
Optional parameters.
Return values
Google_Service_ShoppingContent_OrdersRejectReturnLineItemResponse —returnrefundlineitem()
Returns and refunds a line item. Note that this method can only be called on fully shipped orders. Please also note that the Orderreturns API is the preferred way to handle returns after you receive a return from a customer.
public
returnrefundlineitem(string $merchantId, string $orderId, Google_Service_ShoppingContent_OrdersReturnRefundLineItemRequest $postBody[, array<string|int, mixed> $optParams = array() ]) : Google_Service_ShoppingContent_OrdersReturnRefundLineItemResponse
You can use Orderreturns.list or Orderreturns.get to search for the return, and then use Orderreturns.processreturn to issue the refund. If the return cannot be found, then we recommend using this API to issue a refund. (orders.returnrefundlineitem)
Parameters
- $merchantId : string
-
The ID of the account that manages the order. This cannot be a multi-client account.
- $orderId : string
-
The ID of the order.
- $postBody : Google_Service_ShoppingContent_OrdersReturnRefundLineItemRequest
- $optParams : array<string|int, mixed> = array()
-
Optional parameters.
Return values
Google_Service_ShoppingContent_OrdersReturnRefundLineItemResponse —setlineitemmetadata()
Sets (or overrides if it already exists) merchant provided annotations in the form of key-value pairs. A common use case would be to supply us with additional structured information about a line item that cannot be provided via other methods. Submitted key-value pairs can be retrieved as part of the orders resource. (orders.setlineitemmetadata)
public
setlineitemmetadata(string $merchantId, string $orderId, Google_Service_ShoppingContent_OrdersSetLineItemMetadataRequest $postBody[, array<string|int, mixed> $optParams = array() ]) : Google_Service_ShoppingContent_OrdersSetLineItemMetadataResponse
Parameters
- $merchantId : string
-
The ID of the account that manages the order. This cannot be a multi-client account.
- $orderId : string
-
The ID of the order.
- $postBody : Google_Service_ShoppingContent_OrdersSetLineItemMetadataRequest
- $optParams : array<string|int, mixed> = array()
-
Optional parameters.
Return values
Google_Service_ShoppingContent_OrdersSetLineItemMetadataResponse —shiplineitems()
Marks line item(s) as shipped. (orders.shiplineitems)
public
shiplineitems(string $merchantId, string $orderId, Google_Service_ShoppingContent_OrdersShipLineItemsRequest $postBody[, array<string|int, mixed> $optParams = array() ]) : Google_Service_ShoppingContent_OrdersShipLineItemsResponse
Parameters
- $merchantId : string
-
The ID of the account that manages the order. This cannot be a multi-client account.
- $orderId : string
-
The ID of the order.
- $postBody : Google_Service_ShoppingContent_OrdersShipLineItemsRequest
- $optParams : array<string|int, mixed> = array()
-
Optional parameters.
Return values
Google_Service_ShoppingContent_OrdersShipLineItemsResponse —updatelineitemshippingdetails()
Updates ship by and delivery by dates for a line item.
public
updatelineitemshippingdetails(string $merchantId, string $orderId, Google_Service_ShoppingContent_OrdersUpdateLineItemShippingDetailsRequest $postBody[, array<string|int, mixed> $optParams = array() ]) : Google_Service_ShoppingContent_OrdersUpdateLineItemShippingDetailsResponse
(orders.updatelineitemshippingdetails)
Parameters
- $merchantId : string
-
The ID of the account that manages the order. This cannot be a multi-client account.
- $orderId : string
-
The ID of the order.
- $postBody : Google_Service_ShoppingContent_OrdersUpdateLineItemShippingDetailsRequest
- $optParams : array<string|int, mixed> = array()
-
Optional parameters.
Return values
Google_Service_ShoppingContent_OrdersUpdateLineItemShippingDetailsResponse —updatemerchantorderid()
Updates the merchant order ID for a given order.
public
updatemerchantorderid(string $merchantId, string $orderId, Google_Service_ShoppingContent_OrdersUpdateMerchantOrderIdRequest $postBody[, array<string|int, mixed> $optParams = array() ]) : Google_Service_ShoppingContent_OrdersUpdateMerchantOrderIdResponse
(orders.updatemerchantorderid)
Parameters
- $merchantId : string
-
The ID of the account that manages the order. This cannot be a multi-client account.
- $orderId : string
-
The ID of the order.
- $postBody : Google_Service_ShoppingContent_OrdersUpdateMerchantOrderIdRequest
- $optParams : array<string|int, mixed> = array()
-
Optional parameters.
Return values
Google_Service_ShoppingContent_OrdersUpdateMerchantOrderIdResponse —updateshipment()
Updates a shipment's status, carrier, and/or tracking ID.
public
updateshipment(string $merchantId, string $orderId, Google_Service_ShoppingContent_OrdersUpdateShipmentRequest $postBody[, array<string|int, mixed> $optParams = array() ]) : Google_Service_ShoppingContent_OrdersUpdateShipmentResponse
(orders.updateshipment)
Parameters
- $merchantId : string
-
The ID of the account that manages the order. This cannot be a multi-client account.
- $orderId : string
-
The ID of the order.
- $postBody : Google_Service_ShoppingContent_OrdersUpdateShipmentRequest
- $optParams : array<string|int, mixed> = array()
-
Optional parameters.
Return values
Google_Service_ShoppingContent_OrdersUpdateShipmentResponse —convertToArrayAndStripNulls()
protected
convertToArrayAndStripNulls(mixed $o) : mixed
Parameters
- $o : mixed