Skip to content

Commit

Permalink
feat(content): update the API
Browse files Browse the repository at this point in the history
#### content:v2.1

The following keys were added:
- schemas.AccountsLinkRequest.properties.eCommercePlatformLinkInfo.$ref
- schemas.AccountsLinkRequest.properties.eCommercePlatformLinkInfo.description
- schemas.ECommercePlatformLinkInfo.description
- schemas.ECommercePlatformLinkInfo.id
- schemas.ECommercePlatformLinkInfo.properties.externalAccountId.description
- schemas.ECommercePlatformLinkInfo.properties.externalAccountId.type
- schemas.ECommercePlatformLinkInfo.type

The following keys were changed:
- resources.orders.methods.captureOrder.description
- schemas.OrderCancellation.properties.reason.description
- schemas.OrdersCancelLineItemRequest.properties.reason.description
- schemas.OrdersCancelRequest.properties.reason.description
  • Loading branch information
yoshi-automation authored and sofisl committed Sep 23, 2021
1 parent afcff68 commit 2ff28d2
Show file tree
Hide file tree
Showing 2 changed files with 38 additions and 9 deletions.
25 changes: 20 additions & 5 deletions discovery/content-v2.1.json
Expand Up @@ -3067,7 +3067,7 @@
]
},
"captureOrder": {
"description": "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.",
"description": "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.",
"flatPath": "{merchantId}/orders/{orderId}/captureOrder",
"httpMethod": "POST",
"id": "content.orders.captureOrder",
Expand Down Expand Up @@ -5783,7 +5783,7 @@
}
}
},
"revision": "20210911",
"revision": "20210917",
"rootUrl": "https://shoppingcontent.googleapis.com/",
"schemas": {
"Account": {
Expand Down Expand Up @@ -6517,6 +6517,10 @@
"description": "Action to perform for this link. The `\"request\"` action is only available to select merchants. Acceptable values are: - \"`approve`\" - \"`remove`\" - \"`request`\" ",
"type": "string"
},
"eCommercePlatformLinkInfo": {
"$ref": "ECommercePlatformLinkInfo",
"description": "Additional information required for `eCommercePlatform` link type."
},
"linkType": {
"description": "Type of the link between the two accounts. Acceptable values are: - \"`channelPartner`\" - \"`eCommercePlatform`\" - \"`paymentServiceProvider`\" ",
"type": "string"
Expand Down Expand Up @@ -7893,6 +7897,17 @@
},
"type": "object"
},
"ECommercePlatformLinkInfo": {
"description": "Additional information required for E_COMMERCE_PLATFORM link type.",
"id": "ECommercePlatformLinkInfo",
"properties": {
"externalAccountId": {
"description": "The id used by the third party service provider to identify the merchant.",
"type": "string"
}
},
"type": "object"
},
"Error": {
"description": "An error returned by the API.",
"id": "Error",
Expand Down Expand Up @@ -9433,7 +9448,7 @@
"type": "integer"
},
"reason": {
"description": "The reason for the cancellation. Orders that are canceled with a noInventory reason will lead to the removal of the product from Buy on Google until you make an update to that product. This will not affect your Shopping ads. Acceptable values are: - \"`autoPostInternal`\" - \"`autoPostInvalidBillingAddress`\" - \"`autoPostNoInventory`\" - \"`autoPostPriceError`\" - \"`autoPostUndeliverableShippingAddress`\" - \"`couponAbuse`\" - \"`customerCanceled`\" - \"`customerInitiatedCancel`\" - \"`customerSupportRequested`\" - \"`failToPushOrderGoogleError`\" - \"`failToPushOrderMerchantError`\" - \"`failToPushOrderMerchantFulfillmentError`\" - \"`failToPushOrderToMerchant`\" - \"`failToPushOrderToMerchantOutOfStock`\" - \"`invalidCoupon`\" - \"`malformedShippingAddress`\" - \"`merchantDidNotShipOnTime`\" - \"`noInventory`\" - \"`orderTimeout`\" - \"`other`\" - \"`paymentAbuse`\" - \"`paymentDeclined`\" - \"`priceError`\" - \"`returnRefundAbuse`\" - \"`shippingPriceError`\" - \"`taxError`\" - \"`undeliverableShippingAddress`\" - \"`unsupportedPoBoxAddress`\" ",
"description": "The reason for the cancellation. Orders that are canceled with a noInventory reason will lead to the removal of the product from Buy on Google until you make an update to that product. This will not affect your Shopping ads. Acceptable values are: - \"`autoPostInternal`\" - \"`autoPostInvalidBillingAddress`\" - \"`autoPostNoInventory`\" - \"`autoPostPriceError`\" - \"`autoPostUndeliverableShippingAddress`\" - \"`couponAbuse`\" - \"`customerCanceled`\" - \"`customerInitiatedCancel`\" - \"`customerSupportRequested`\" - \"`failToPushOrderGoogleError`\" - \"`failToPushOrderMerchantError`\" - \"`failToPushOrderMerchantFulfillmentError`\" - \"`failToPushOrderToMerchant`\" - \"`failToPushOrderToMerchantOutOfStock`\" - \"`invalidCoupon`\" - \"`malformedShippingAddress`\" - \"`merchantDidNotShipOnTime`\" - \"`noInventory`\" - \"`orderTimeout`\" - \"`other`\" - \"`paymentAbuse`\" - \"`paymentDeclined`\" - \"`priceError`\" - \"`returnRefundAbuse`\" - \"`shippingPriceError`\" - \"`taxError`\" - \"`undeliverableShippingAddress`\" - \"`unsupportedPoBoxAddress`\" - \"`failedToCaptureFunds`\" ",
"type": "string"
},
"reasonText": {
Expand Down Expand Up @@ -10745,7 +10760,7 @@
"type": "integer"
},
"reason": {
"description": "The reason for the cancellation. Acceptable values are: - \"`customerInitiatedCancel`\" - \"`invalidCoupon`\" - \"`malformedShippingAddress`\" - \"`noInventory`\" - \"`other`\" - \"`priceError`\" - \"`shippingPriceError`\" - \"`taxError`\" - \"`undeliverableShippingAddress`\" - \"`unsupportedPoBoxAddress`\" ",
"description": "The reason for the cancellation. Acceptable values are: - \"`customerInitiatedCancel`\" - \"`invalidCoupon`\" - \"`malformedShippingAddress`\" - \"`noInventory`\" - \"`other`\" - \"`priceError`\" - \"`shippingPriceError`\" - \"`taxError`\" - \"`undeliverableShippingAddress`\" - \"`unsupportedPoBoxAddress`\" - \"`failedToCaptureFunds`\" ",
"type": "string"
},
"reasonText": {
Expand Down Expand Up @@ -10777,7 +10792,7 @@
"type": "string"
},
"reason": {
"description": "The reason for the cancellation. Acceptable values are: - \"`customerInitiatedCancel`\" - \"`invalidCoupon`\" - \"`malformedShippingAddress`\" - \"`noInventory`\" - \"`other`\" - \"`priceError`\" - \"`shippingPriceError`\" - \"`taxError`\" - \"`undeliverableShippingAddress`\" - \"`unsupportedPoBoxAddress`\" ",
"description": "The reason for the cancellation. Acceptable values are: - \"`customerInitiatedCancel`\" - \"`invalidCoupon`\" - \"`malformedShippingAddress`\" - \"`noInventory`\" - \"`other`\" - \"`priceError`\" - \"`shippingPriceError`\" - \"`taxError`\" - \"`undeliverableShippingAddress`\" - \"`unsupportedPoBoxAddress`\" - \"`failedToCaptureFunds`\" ",
"type": "string"
},
"reasonText": {
Expand Down
22 changes: 18 additions & 4 deletions src/apis/content/v2.1.ts
Expand Up @@ -532,6 +532,10 @@ export namespace content_v2_1 {
* Action to perform for this link. The `"request"` action is only available to select merchants. Acceptable values are: - "`approve`" - "`remove`" - "`request`"
*/
action?: string | null;
/**
* Additional information required for `eCommercePlatform` link type.
*/
eCommercePlatformLinkInfo?: Schema$ECommercePlatformLinkInfo;
/**
* The ID of the linked account.
*/
Expand Down Expand Up @@ -1720,6 +1724,15 @@ export namespace content_v2_1 {
*/
warehouseBasedDeliveryTimes?: Schema$WarehouseBasedDeliveryTime[];
}
/**
* Additional information required for E_COMMERCE_PLATFORM link type.
*/
export interface Schema$ECommercePlatformLinkInfo {
/**
* The id used by the third party service provider to identify the merchant.
*/
externalAccountId?: string | null;
}
/**
* An error returned by the API.
*/
Expand Down Expand Up @@ -2807,7 +2820,7 @@ export namespace content_v2_1 {
*/
quantity?: number | null;
/**
* The reason for the cancellation. Orders that are canceled with a noInventory reason will lead to the removal of the product from Buy on Google until you make an update to that product. This will not affect your Shopping ads. Acceptable values are: - "`autoPostInternal`" - "`autoPostInvalidBillingAddress`" - "`autoPostNoInventory`" - "`autoPostPriceError`" - "`autoPostUndeliverableShippingAddress`" - "`couponAbuse`" - "`customerCanceled`" - "`customerInitiatedCancel`" - "`customerSupportRequested`" - "`failToPushOrderGoogleError`" - "`failToPushOrderMerchantError`" - "`failToPushOrderMerchantFulfillmentError`" - "`failToPushOrderToMerchant`" - "`failToPushOrderToMerchantOutOfStock`" - "`invalidCoupon`" - "`malformedShippingAddress`" - "`merchantDidNotShipOnTime`" - "`noInventory`" - "`orderTimeout`" - "`other`" - "`paymentAbuse`" - "`paymentDeclined`" - "`priceError`" - "`returnRefundAbuse`" - "`shippingPriceError`" - "`taxError`" - "`undeliverableShippingAddress`" - "`unsupportedPoBoxAddress`"
* The reason for the cancellation. Orders that are canceled with a noInventory reason will lead to the removal of the product from Buy on Google until you make an update to that product. This will not affect your Shopping ads. Acceptable values are: - "`autoPostInternal`" - "`autoPostInvalidBillingAddress`" - "`autoPostNoInventory`" - "`autoPostPriceError`" - "`autoPostUndeliverableShippingAddress`" - "`couponAbuse`" - "`customerCanceled`" - "`customerInitiatedCancel`" - "`customerSupportRequested`" - "`failToPushOrderGoogleError`" - "`failToPushOrderMerchantError`" - "`failToPushOrderMerchantFulfillmentError`" - "`failToPushOrderToMerchant`" - "`failToPushOrderToMerchantOutOfStock`" - "`invalidCoupon`" - "`malformedShippingAddress`" - "`merchantDidNotShipOnTime`" - "`noInventory`" - "`orderTimeout`" - "`other`" - "`paymentAbuse`" - "`paymentDeclined`" - "`priceError`" - "`returnRefundAbuse`" - "`shippingPriceError`" - "`taxError`" - "`undeliverableShippingAddress`" - "`unsupportedPoBoxAddress`" - "`failedToCaptureFunds`"
*/
reason?: string | null;
/**
Expand Down Expand Up @@ -3623,7 +3636,7 @@ export namespace content_v2_1 {
*/
quantity?: number | null;
/**
* The reason for the cancellation. Acceptable values are: - "`customerInitiatedCancel`" - "`invalidCoupon`" - "`malformedShippingAddress`" - "`noInventory`" - "`other`" - "`priceError`" - "`shippingPriceError`" - "`taxError`" - "`undeliverableShippingAddress`" - "`unsupportedPoBoxAddress`"
* The reason for the cancellation. Acceptable values are: - "`customerInitiatedCancel`" - "`invalidCoupon`" - "`malformedShippingAddress`" - "`noInventory`" - "`other`" - "`priceError`" - "`shippingPriceError`" - "`taxError`" - "`undeliverableShippingAddress`" - "`unsupportedPoBoxAddress`" - "`failedToCaptureFunds`"
*/
reason?: string | null;
/**
Expand All @@ -3647,7 +3660,7 @@ export namespace content_v2_1 {
*/
operationId?: string | null;
/**
* The reason for the cancellation. Acceptable values are: - "`customerInitiatedCancel`" - "`invalidCoupon`" - "`malformedShippingAddress`" - "`noInventory`" - "`other`" - "`priceError`" - "`shippingPriceError`" - "`taxError`" - "`undeliverableShippingAddress`" - "`unsupportedPoBoxAddress`"
* The reason for the cancellation. Acceptable values are: - "`customerInitiatedCancel`" - "`invalidCoupon`" - "`malformedShippingAddress`" - "`noInventory`" - "`other`" - "`priceError`" - "`shippingPriceError`" - "`taxError`" - "`undeliverableShippingAddress`" - "`unsupportedPoBoxAddress`" - "`failedToCaptureFunds`"
*/
reason?: string | null;
/**
Expand Down Expand Up @@ -8518,6 +8531,7 @@ export namespace content_v2_1 {
* // request body parameters
* // {
* // "action": "my_action",
* // "eCommercePlatformLinkInfo": {},
* // "linkType": "my_linkType",
* // "linkedAccountId": "my_linkedAccountId",
* // "paymentServiceProviderLinkInfo": {},
Expand Down Expand Up @@ -20811,7 +20825,7 @@ export namespace content_v2_1 {
}

/**
* 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.
* 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.
* @example
* ```js
* // Before running the sample:
Expand Down

0 comments on commit 2ff28d2

Please sign in to comment.