Orders
class Orders extends Resource (View source)
The "orders" collection of methods.
Typical usage is:
$contentService = new Google\Service\ShoppingContent(...);
$orders = $contentService->orders;
Methods
Marks an order as acknowledged. (orders.acknowledge)
Sandbox only. Moves a test order from state "inProgress
" to state
"pendingShipment
". (orders.advancetestorder)
Cancels all line items in an order, making a full refund. (orders.cancel)
Cancels a line item, making a full refund. (orders.cancellineitem)
Sandbox only. Cancels a test order for customer-initiated cancellation.
Capture funds from the customer for the current order total. This method
should be called after the merchant verifies that they are able and ready to
start shipping the order. This method blocks until a response is received
from the payment processsor. If this method succeeds, the merchant is
guaranteed to receive funds for the order after shipment. If the request
fails, it can be retried or the order may be cancelled. This method cannot be
called after the entire order is already shipped. A rejected error code is
returned when the payment service provider has declined the charge. This
indicates a problem between the PSP and either the merchant's or customer's
account. Sometimes this error will be resolved by the customer. We recommend
retrying these errors once per day or cancelling the order with reason
failedToCaptureFunds
if the items cannot be held. (orders.captureOrder)
Sandbox only. Creates a test order. (orders.createtestorder)
Sandbox only. Creates a test return. (orders.createtestreturn)
Retrieves an order from your Merchant Center account. (orders.get)
Retrieves an order using merchant order ID. (orders.getbymerchantorderid)
Sandbox only. Retrieves an order template that can be used to quickly create a new order in sandbox. (orders.gettestordertemplate)
Deprecated. Notifies that item return and refund was handled directly by merchant outside of Google payments processing (for example, 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.
Lists the orders in your Merchant Center account. (orders.listOrders)
Issues a partial or total refund for items and shipment. (orders.refunditem)
Issues a partial or total refund for an order. (orders.refundorder)
Rejects return on an line item. (orders.rejectreturnlineitem)
Returns and refunds a line item. Note that this method can only be called on fully shipped orders. The Orderreturns API is the preferred way to handle returns after you receive a return from a customer. 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.
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 through other methods. Submitted key-value pairs can be retrieved as part of the orders resource. (orders.setlineitemmetadata)
Marks line item(s) as shipped. (orders.shiplineitems)
Updates ship by and delivery by dates for a line item.
Updates the merchant order ID for a given order.
Updates a shipment's status, carrier, and/or tracking ID.
Details
OrdersAcknowledgeResponse
acknowledge(string $merchantId, string $orderId, OrdersAcknowledgeRequest $postBody, array $optParams = [])
Marks an order as acknowledged. (orders.acknowledge)
OrdersAdvanceTestOrderResponse
advancetestorder(string $merchantId, string $orderId, array $optParams = [])
Sandbox only. Moves a test order from state "inProgress
" to state
"pendingShipment
". (orders.advancetestorder)
OrdersCancelResponse
cancel(string $merchantId, string $orderId, OrdersCancelRequest $postBody, array $optParams = [])
Cancels all line items in an order, making a full refund. (orders.cancel)
OrdersCancelLineItemResponse
cancellineitem(string $merchantId, string $orderId, OrdersCancelLineItemRequest $postBody, array $optParams = [])
Cancels a line item, making a full refund. (orders.cancellineitem)
OrdersCancelTestOrderByCustomerResponse
canceltestorderbycustomer(string $merchantId, string $orderId, OrdersCancelTestOrderByCustomerRequest $postBody, array $optParams = [])
Sandbox only. Cancels a test order for customer-initiated cancellation.
(orders.canceltestorderbycustomer)
CaptureOrderResponse
captureOrder(string $merchantId, string $orderId, CaptureOrderRequest $postBody, array $optParams = [])
Capture funds from the customer for the current order total. This method
should be called after the merchant verifies that they are able and ready to
start shipping the order. This method blocks until a response is received
from the payment processsor. If this method succeeds, the merchant is
guaranteed to receive funds for the order after shipment. If the request
fails, it can be retried or the order may be cancelled. This method cannot be
called after the entire order is already shipped. A rejected error code is
returned when the payment service provider has declined the charge. This
indicates a problem between the PSP and either the merchant's or customer's
account. Sometimes this error will be resolved by the customer. We recommend
retrying these errors once per day or cancelling the order with reason
failedToCaptureFunds
if the items cannot be held. (orders.captureOrder)
OrdersCreateTestOrderResponse
createtestorder(string $merchantId, OrdersCreateTestOrderRequest $postBody, array $optParams = [])
Sandbox only. Creates a test order. (orders.createtestorder)
OrdersCreateTestReturnResponse
createtestreturn(string $merchantId, string $orderId, OrdersCreateTestReturnRequest $postBody, array $optParams = [])
Sandbox only. Creates a test return. (orders.createtestreturn)
Order
get(string $merchantId, string $orderId, array $optParams = [])
Retrieves an order from your Merchant Center account. (orders.get)
OrdersGetByMerchantOrderIdResponse
getbymerchantorderid(string $merchantId, string $merchantOrderId, array $optParams = [])
Retrieves an order using merchant order ID. (orders.getbymerchantorderid)
OrdersGetTestOrderTemplateResponse
gettestordertemplate(string $merchantId, string $templateName, array $optParams = [])
Sandbox only. Retrieves an order template that can be used to quickly create a new order in sandbox. (orders.gettestordertemplate)
OrdersInStoreRefundLineItemResponse
instorerefundlineitem(string $merchantId, string $orderId, OrdersInStoreRefundLineItemRequest $postBody, array $optParams = [])
Deprecated. Notifies that item return and refund was handled directly by merchant outside of Google payments processing (for example, 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 through Google then through an in-store return. (orders.instorerefundlineitem)
OrdersListResponse
listOrders(string $merchantId, array $optParams = [])
Lists the orders in your Merchant Center account. (orders.listOrders)
OrdersRefundItemResponse
refunditem(string $merchantId, string $orderId, OrdersRefundItemRequest $postBody, array $optParams = [])
Issues a partial or total refund for items and shipment. (orders.refunditem)
OrdersRefundOrderResponse
refundorder(string $merchantId, string $orderId, OrdersRefundOrderRequest $postBody, array $optParams = [])
Issues a partial or total refund for an order. (orders.refundorder)
OrdersRejectReturnLineItemResponse
rejectreturnlineitem(string $merchantId, string $orderId, OrdersRejectReturnLineItemRequest $postBody, array $optParams = [])
Rejects return on an line item. (orders.rejectreturnlineitem)
OrdersReturnRefundLineItemResponse
returnrefundlineitem(string $merchantId, string $orderId, OrdersReturnRefundLineItemRequest $postBody, array $optParams = [])
Returns and refunds a line item. Note that this method can only be called on fully shipped orders. The Orderreturns API is the preferred way to handle returns after you receive a return from a customer. 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)
OrdersSetLineItemMetadataResponse
setlineitemmetadata(string $merchantId, string $orderId, OrdersSetLineItemMetadataRequest $postBody, array $optParams = [])
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 through other methods. Submitted key-value pairs can be retrieved as part of the orders resource. (orders.setlineitemmetadata)
OrdersShipLineItemsResponse
shiplineitems(string $merchantId, string $orderId, OrdersShipLineItemsRequest $postBody, array $optParams = [])
Marks line item(s) as shipped. (orders.shiplineitems)
OrdersUpdateLineItemShippingDetailsResponse
updatelineitemshippingdetails(string $merchantId, string $orderId, OrdersUpdateLineItemShippingDetailsRequest $postBody, array $optParams = [])
Updates ship by and delivery by dates for a line item.
(orders.updatelineitemshippingdetails)
OrdersUpdateMerchantOrderIdResponse
updatemerchantorderid(string $merchantId, string $orderId, OrdersUpdateMerchantOrderIdRequest $postBody, array $optParams = [])
Updates the merchant order ID for a given order.
(orders.updatemerchantorderid)
OrdersUpdateShipmentResponse
updateshipment(string $merchantId, string $orderId, OrdersUpdateShipmentRequest $postBody, array $optParams = [])
Updates a shipment's status, carrier, and/or tracking ID.
(orders.updateshipment)