ebay-api 8.5.1 → 8.6.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +2 -2
- package/dist/api/apiFactory.d.ts +0 -3
- package/dist/api/apiFactory.js +0 -4
- package/dist/api/base.d.ts +0 -3
- package/dist/api/base.js +0 -3
- package/dist/api/digitalSignature.d.ts +0 -33
- package/dist/api/digitalSignature.js +1 -41
- package/dist/api/index.d.ts +0 -3
- package/dist/api/index.js +0 -3
- package/dist/api/restful/buy/browse/index.d.ts +0 -66
- package/dist/api/restful/buy/browse/index.js +0 -73
- package/dist/api/restful/buy/deal/index.d.ts +0 -32
- package/dist/api/restful/buy/deal/index.js +0 -32
- package/dist/api/restful/buy/feed/index.d.ts +0 -33
- package/dist/api/restful/buy/feed/index.js +0 -33
- package/dist/api/restful/buy/marketing/index.d.ts +0 -18
- package/dist/api/restful/buy/marketing/index.js +0 -22
- package/dist/api/restful/buy/marketplaceInsights/index.d.ts +0 -21
- package/dist/api/restful/buy/marketplaceInsights/index.js +0 -21
- package/dist/api/restful/buy/offer/index.d.ts +0 -15
- package/dist/api/restful/buy/offer/index.js +0 -15
- package/dist/api/restful/buy/order/index.d.ts +0 -227
- package/dist/api/restful/buy/order/index.js +0 -227
- package/dist/api/restful/commerce/catalog/index.d.ts +0 -54
- package/dist/api/restful/commerce/catalog/index.js +0 -54
- package/dist/api/restful/commerce/charity/index.d.ts +0 -21
- package/dist/api/restful/commerce/charity/index.js +0 -21
- package/dist/api/restful/commerce/identity/index.d.ts +0 -7
- package/dist/api/restful/commerce/identity/index.js +0 -7
- package/dist/api/restful/commerce/notification/index.d.ts +0 -93
- package/dist/api/restful/commerce/notification/index.js +0 -93
- package/dist/api/restful/commerce/taxonomy/index.d.ts +0 -64
- package/dist/api/restful/commerce/taxonomy/index.js +0 -64
- package/dist/api/restful/commerce/translation/index.d.ts +0 -8
- package/dist/api/restful/commerce/translation/index.js +0 -8
- package/dist/api/restful/developer/analytics/index.d.ts +0 -15
- package/dist/api/restful/developer/analytics/index.js +0 -15
- package/dist/api/restful/developer/keyManagement/index.d.ts +0 -15
- package/dist/api/restful/developer/keyManagement/index.js +0 -15
- package/dist/api/restful/index.d.ts +0 -16
- package/dist/api/restful/index.js +1 -23
- package/dist/api/restful/postOrder/cancellation/index.d.ts +0 -43
- package/dist/api/restful/postOrder/cancellation/index.js +1 -46
- package/dist/api/restful/postOrder/case/index.d.ts +0 -46
- package/dist/api/restful/postOrder/case/index.js +0 -46
- package/dist/api/restful/postOrder/inquiry/index.d.ts +0 -64
- package/dist/api/restful/postOrder/inquiry/index.js +0 -64
- package/dist/api/restful/postOrder/return/index.d.ts +0 -190
- package/dist/api/restful/postOrder/return/index.js +0 -190
- package/dist/api/restful/sell/account/index.d.ts +0 -241
- package/dist/api/restful/sell/account/index.js +0 -241
- package/dist/api/restful/sell/analytics/index.d.ts +0 -26
- package/dist/api/restful/sell/analytics/index.js +0 -26
- package/dist/api/restful/sell/compliance/index.d.ts +0 -23
- package/dist/api/restful/sell/compliance/index.js +0 -23
- package/dist/api/restful/sell/feed/index.d.ts +0 -135
- package/dist/api/restful/sell/feed/index.js +0 -135
- package/dist/api/restful/sell/finances/index.d.ts +0 -51
- package/dist/api/restful/sell/finances/index.js +0 -51
- package/dist/api/restful/sell/fulfillment/index.d.ts +0 -108
- package/dist/api/restful/sell/fulfillment/index.js +0 -108
- package/dist/api/restful/sell/inventory/index.d.ts +0 -197
- package/dist/api/restful/sell/inventory/index.js +0 -197
- package/dist/api/restful/sell/listing/index.d.ts +0 -8
- package/dist/api/restful/sell/listing/index.js +0 -8
- package/dist/api/restful/sell/logistics/index.d.ts +0 -33
- package/dist/api/restful/sell/logistics/index.js +0 -33
- package/dist/api/restful/sell/marketing/index.d.ts +16 -495
- package/dist/api/restful/sell/marketing/index.js +48 -494
- package/dist/api/restful/sell/metadata/index.d.ts +0 -65
- package/dist/api/restful/sell/metadata/index.js +0 -65
- package/dist/api/restful/sell/negotiation/index.d.ts +0 -14
- package/dist/api/restful/sell/negotiation/index.js +0 -14
- package/dist/api/restful/sell/recommendation/index.d.ts +0 -15
- package/dist/api/restful/sell/recommendation/index.js +0 -15
- package/dist/api/traditional/XMLRequest.d.ts +0 -44
- package/dist/api/traditional/XMLRequest.js +0 -46
- package/dist/api/traditional/clientAlerts/index.js +0 -1
- package/dist/api/traditional/index.d.ts +0 -3
- package/dist/api/traditional/index.js +0 -5
- package/dist/api/traditional/shopping/index.js +0 -1
- package/dist/auth/authNAuth.d.ts +0 -5
- package/dist/auth/authNAuth.js +0 -5
- package/dist/auth/index.d.ts +0 -3
- package/dist/auth/index.js +0 -3
- package/dist/auth/oAuth2.d.ts +0 -52
- package/dist/auth/oAuth2.js +0 -53
- package/dist/eBayApi.d.ts +0 -11
- package/dist/eBayApi.js +0 -14
- package/dist/ebay-api.min.mjs +1 -1
- package/dist/enums/restfulEnums.d.ts +0 -5
- package/dist/enums/restfulEnums.js +0 -5
- package/dist/errors/index.d.ts +0 -19
- package/dist/errors/index.js +1 -21
- package/dist/types/restful/specs/buy_browse_v1_oas3.d.ts +0 -697
- package/dist/types/restful/specs/buy_browse_v1_oas3.js +0 -4
- package/dist/types/restful/specs/buy_deal_v1_oas3.d.ts +0 -189
- package/dist/types/restful/specs/buy_deal_v1_oas3.js +0 -4
- package/dist/types/restful/specs/buy_feed_v1_beta_oas3.d.ts +0 -229
- package/dist/types/restful/specs/buy_feed_v1_beta_oas3.js +0 -4
- package/dist/types/restful/specs/buy_marketing_v1_beta_oas3.d.ts +0 -101
- package/dist/types/restful/specs/buy_marketing_v1_beta_oas3.js +0 -4
- package/dist/types/restful/specs/buy_marketplace_insights_v1_beta_oas3.d.ts +0 -150
- package/dist/types/restful/specs/buy_marketplace_insights_v1_beta_oas3.js +0 -4
- package/dist/types/restful/specs/buy_offer_v1_beta_oas3.d.ts +0 -62
- package/dist/types/restful/specs/buy_offer_v1_beta_oas3.js +0 -4
- package/dist/types/restful/specs/buy_order_v1_beta_oas3.d.ts +0 -600
- package/dist/types/restful/specs/buy_order_v1_beta_oas3.js +0 -4
- package/dist/types/restful/specs/cancellation_oas3.d.ts +0 -29
- package/dist/types/restful/specs/cancellation_oas3.js +0 -4
- package/dist/types/restful/specs/case_oas3.d.ts +0 -31
- package/dist/types/restful/specs/case_oas3.js +0 -4
- package/dist/types/restful/specs/commerce_catalog_v1_beta_oas3.d.ts +0 -331
- package/dist/types/restful/specs/commerce_catalog_v1_beta_oas3.js +0 -4
- package/dist/types/restful/specs/commerce_charity_v1_oas3.d.ts +0 -85
- package/dist/types/restful/specs/commerce_charity_v1_oas3.js +0 -4
- package/dist/types/restful/specs/commerce_identity_v1_oas3.d.ts +0 -63
- package/dist/types/restful/specs/commerce_identity_v1_oas3.js +0 -4
- package/dist/types/restful/specs/commerce_notification_v1_oas3.d.ts +0 -236
- package/dist/types/restful/specs/commerce_notification_v1_oas3.js +0 -4
- package/dist/types/restful/specs/commerce_taxonomy_v1_oas3.d.ts +0 -219
- package/dist/types/restful/specs/commerce_taxonomy_v1_oas3.js +0 -4
- package/dist/types/restful/specs/commerce_translation_v1_beta_oas3.d.ts +0 -36
- package/dist/types/restful/specs/commerce_translation_v1_beta_oas3.js +0 -4
- package/dist/types/restful/specs/developer_analytics_v1_beta_oas3.d.ts +0 -57
- package/dist/types/restful/specs/developer_analytics_v1_beta_oas3.js +0 -4
- package/dist/types/restful/specs/developer_key_management_v1_oas3.d.ts +0 -60
- package/dist/types/restful/specs/developer_key_management_v1_oas3.js +0 -4
- package/dist/types/restful/specs/inquiry_oas3.d.ts +0 -45
- package/dist/types/restful/specs/inquiry_oas3.js +0 -4
- package/dist/types/restful/specs/return_oas3.d.ts +0 -130
- package/dist/types/restful/specs/return_oas3.js +0 -4
- package/dist/types/restful/specs/sell_account_v1_oas3.d.ts +0 -751
- package/dist/types/restful/specs/sell_account_v1_oas3.js +0 -4
- package/dist/types/restful/specs/sell_analytics_v1_oas3.d.ts +0 -130
- package/dist/types/restful/specs/sell_analytics_v1_oas3.js +0 -4
- package/dist/types/restful/specs/sell_compliance_v1_oas3.d.ts +0 -102
- package/dist/types/restful/specs/sell_compliance_v1_oas3.js +0 -4
- package/dist/types/restful/specs/sell_feed_v1_oas3.d.ts +0 -461
- package/dist/types/restful/specs/sell_feed_v1_oas3.js +0 -4
- package/dist/types/restful/specs/sell_finances_v1_oas3.d.ts +0 -255
- package/dist/types/restful/specs/sell_finances_v1_oas3.js +0 -4
- package/dist/types/restful/specs/sell_fulfillment_v1_oas3.d.ts +0 -595
- package/dist/types/restful/specs/sell_fulfillment_v1_oas3.js +0 -4
- package/dist/types/restful/specs/sell_inventory_v1_oas3.d.ts +0 -844
- package/dist/types/restful/specs/sell_inventory_v1_oas3.js +0 -4
- package/dist/types/restful/specs/sell_listing_v1_beta_oas3.d.ts +0 -57
- package/dist/types/restful/specs/sell_listing_v1_beta_oas3.js +0 -4
- package/dist/types/restful/specs/sell_logistics_v1_oas3.d.ts +0 -173
- package/dist/types/restful/specs/sell_logistics_v1_oas3.js +0 -4
- package/dist/types/restful/specs/sell_marketing_v1_oas3.d.ts +454 -1411
- package/dist/types/restful/specs/sell_marketing_v1_oas3.js +0 -4
- package/dist/types/restful/specs/sell_metadata_v1_oas3.d.ts +0 -147
- package/dist/types/restful/specs/sell_metadata_v1_oas3.js +0 -4
- package/dist/types/restful/specs/sell_negotiation_v1_oas3.d.ts +0 -94
- package/dist/types/restful/specs/sell_negotiation_v1_oas3.js +0 -4
- package/dist/types/restful/specs/sell_recommendation_v1_oas3.d.ts +0 -60
- package/dist/types/restful/specs/sell_recommendation_v1_oas3.js +0 -4
- package/dist/types/restfulTypes.d.ts +3 -0
- package/lib/api/apiFactory.d.ts +0 -3
- package/lib/api/apiFactory.js +0 -4
- package/lib/api/base.d.ts +0 -3
- package/lib/api/base.js +0 -3
- package/lib/api/digitalSignature.d.ts +0 -33
- package/lib/api/digitalSignature.js +1 -41
- package/lib/api/index.d.ts +0 -3
- package/lib/api/index.js +0 -3
- package/lib/api/restful/buy/browse/index.d.ts +0 -66
- package/lib/api/restful/buy/browse/index.js +0 -73
- package/lib/api/restful/buy/deal/index.d.ts +0 -32
- package/lib/api/restful/buy/deal/index.js +0 -32
- package/lib/api/restful/buy/feed/index.d.ts +0 -33
- package/lib/api/restful/buy/feed/index.js +0 -33
- package/lib/api/restful/buy/marketing/index.d.ts +0 -18
- package/lib/api/restful/buy/marketing/index.js +0 -22
- package/lib/api/restful/buy/marketplaceInsights/index.d.ts +0 -21
- package/lib/api/restful/buy/marketplaceInsights/index.js +0 -21
- package/lib/api/restful/buy/offer/index.d.ts +0 -15
- package/lib/api/restful/buy/offer/index.js +0 -15
- package/lib/api/restful/buy/order/index.d.ts +0 -227
- package/lib/api/restful/buy/order/index.js +0 -227
- package/lib/api/restful/commerce/catalog/index.d.ts +0 -54
- package/lib/api/restful/commerce/catalog/index.js +0 -54
- package/lib/api/restful/commerce/charity/index.d.ts +0 -21
- package/lib/api/restful/commerce/charity/index.js +0 -21
- package/lib/api/restful/commerce/identity/index.d.ts +0 -7
- package/lib/api/restful/commerce/identity/index.js +0 -7
- package/lib/api/restful/commerce/notification/index.d.ts +0 -93
- package/lib/api/restful/commerce/notification/index.js +0 -93
- package/lib/api/restful/commerce/taxonomy/index.d.ts +0 -64
- package/lib/api/restful/commerce/taxonomy/index.js +0 -64
- package/lib/api/restful/commerce/translation/index.d.ts +0 -8
- package/lib/api/restful/commerce/translation/index.js +0 -8
- package/lib/api/restful/developer/analytics/index.d.ts +0 -15
- package/lib/api/restful/developer/analytics/index.js +0 -15
- package/lib/api/restful/developer/keyManagement/index.d.ts +0 -15
- package/lib/api/restful/developer/keyManagement/index.js +0 -15
- package/lib/api/restful/index.d.ts +0 -16
- package/lib/api/restful/index.js +1 -23
- package/lib/api/restful/postOrder/cancellation/index.d.ts +0 -43
- package/lib/api/restful/postOrder/cancellation/index.js +1 -46
- package/lib/api/restful/postOrder/case/index.d.ts +0 -46
- package/lib/api/restful/postOrder/case/index.js +0 -46
- package/lib/api/restful/postOrder/inquiry/index.d.ts +0 -64
- package/lib/api/restful/postOrder/inquiry/index.js +0 -64
- package/lib/api/restful/postOrder/return/index.d.ts +0 -190
- package/lib/api/restful/postOrder/return/index.js +0 -190
- package/lib/api/restful/sell/account/index.d.ts +0 -241
- package/lib/api/restful/sell/account/index.js +0 -241
- package/lib/api/restful/sell/analytics/index.d.ts +0 -26
- package/lib/api/restful/sell/analytics/index.js +0 -26
- package/lib/api/restful/sell/compliance/index.d.ts +0 -23
- package/lib/api/restful/sell/compliance/index.js +0 -23
- package/lib/api/restful/sell/feed/index.d.ts +0 -135
- package/lib/api/restful/sell/feed/index.js +0 -135
- package/lib/api/restful/sell/finances/index.d.ts +0 -51
- package/lib/api/restful/sell/finances/index.js +0 -51
- package/lib/api/restful/sell/fulfillment/index.d.ts +0 -108
- package/lib/api/restful/sell/fulfillment/index.js +0 -108
- package/lib/api/restful/sell/inventory/index.d.ts +0 -197
- package/lib/api/restful/sell/inventory/index.js +0 -197
- package/lib/api/restful/sell/listing/index.d.ts +0 -8
- package/lib/api/restful/sell/listing/index.js +0 -8
- package/lib/api/restful/sell/logistics/index.d.ts +0 -33
- package/lib/api/restful/sell/logistics/index.js +0 -33
- package/lib/api/restful/sell/marketing/index.d.ts +16 -495
- package/lib/api/restful/sell/marketing/index.js +48 -494
- package/lib/api/restful/sell/metadata/index.d.ts +0 -65
- package/lib/api/restful/sell/metadata/index.js +0 -65
- package/lib/api/restful/sell/negotiation/index.d.ts +0 -14
- package/lib/api/restful/sell/negotiation/index.js +0 -14
- package/lib/api/restful/sell/recommendation/index.d.ts +0 -15
- package/lib/api/restful/sell/recommendation/index.js +0 -15
- package/lib/api/traditional/XMLRequest.d.ts +0 -44
- package/lib/api/traditional/XMLRequest.js +0 -46
- package/lib/api/traditional/clientAlerts/index.js +0 -1
- package/lib/api/traditional/index.d.ts +0 -3
- package/lib/api/traditional/index.js +0 -5
- package/lib/api/traditional/shopping/index.js +0 -1
- package/lib/auth/authNAuth.d.ts +0 -5
- package/lib/auth/authNAuth.js +0 -5
- package/lib/auth/index.d.ts +0 -3
- package/lib/auth/index.js +0 -3
- package/lib/auth/oAuth2.d.ts +0 -52
- package/lib/auth/oAuth2.js +0 -53
- package/lib/eBayApi.d.ts +0 -11
- package/lib/eBayApi.js +0 -14
- package/lib/ebay-api.min.js +1 -1
- package/lib/enums/restfulEnums.d.ts +0 -5
- package/lib/enums/restfulEnums.js +0 -5
- package/lib/errors/index.d.ts +0 -19
- package/lib/errors/index.js +1 -21
- package/lib/types/restful/specs/buy_browse_v1_oas3.d.ts +0 -697
- package/lib/types/restful/specs/buy_browse_v1_oas3.js +0 -4
- package/lib/types/restful/specs/buy_deal_v1_oas3.d.ts +0 -189
- package/lib/types/restful/specs/buy_deal_v1_oas3.js +0 -4
- package/lib/types/restful/specs/buy_feed_v1_beta_oas3.d.ts +0 -229
- package/lib/types/restful/specs/buy_feed_v1_beta_oas3.js +0 -4
- package/lib/types/restful/specs/buy_marketing_v1_beta_oas3.d.ts +0 -101
- package/lib/types/restful/specs/buy_marketing_v1_beta_oas3.js +0 -4
- package/lib/types/restful/specs/buy_marketplace_insights_v1_beta_oas3.d.ts +0 -150
- package/lib/types/restful/specs/buy_marketplace_insights_v1_beta_oas3.js +0 -4
- package/lib/types/restful/specs/buy_offer_v1_beta_oas3.d.ts +0 -62
- package/lib/types/restful/specs/buy_offer_v1_beta_oas3.js +0 -4
- package/lib/types/restful/specs/buy_order_v1_beta_oas3.d.ts +0 -600
- package/lib/types/restful/specs/buy_order_v1_beta_oas3.js +0 -4
- package/lib/types/restful/specs/cancellation_oas3.d.ts +0 -29
- package/lib/types/restful/specs/cancellation_oas3.js +0 -4
- package/lib/types/restful/specs/case_oas3.d.ts +0 -31
- package/lib/types/restful/specs/case_oas3.js +0 -4
- package/lib/types/restful/specs/commerce_catalog_v1_beta_oas3.d.ts +0 -331
- package/lib/types/restful/specs/commerce_catalog_v1_beta_oas3.js +0 -4
- package/lib/types/restful/specs/commerce_charity_v1_oas3.d.ts +0 -85
- package/lib/types/restful/specs/commerce_charity_v1_oas3.js +0 -4
- package/lib/types/restful/specs/commerce_identity_v1_oas3.d.ts +0 -63
- package/lib/types/restful/specs/commerce_identity_v1_oas3.js +0 -4
- package/lib/types/restful/specs/commerce_notification_v1_oas3.d.ts +0 -236
- package/lib/types/restful/specs/commerce_notification_v1_oas3.js +0 -4
- package/lib/types/restful/specs/commerce_taxonomy_v1_oas3.d.ts +0 -219
- package/lib/types/restful/specs/commerce_taxonomy_v1_oas3.js +0 -4
- package/lib/types/restful/specs/commerce_translation_v1_beta_oas3.d.ts +0 -36
- package/lib/types/restful/specs/commerce_translation_v1_beta_oas3.js +0 -4
- package/lib/types/restful/specs/developer_analytics_v1_beta_oas3.d.ts +0 -57
- package/lib/types/restful/specs/developer_analytics_v1_beta_oas3.js +0 -4
- package/lib/types/restful/specs/developer_key_management_v1_oas3.d.ts +0 -60
- package/lib/types/restful/specs/developer_key_management_v1_oas3.js +0 -4
- package/lib/types/restful/specs/inquiry_oas3.d.ts +0 -45
- package/lib/types/restful/specs/inquiry_oas3.js +0 -4
- package/lib/types/restful/specs/return_oas3.d.ts +0 -130
- package/lib/types/restful/specs/return_oas3.js +0 -4
- package/lib/types/restful/specs/sell_account_v1_oas3.d.ts +0 -751
- package/lib/types/restful/specs/sell_account_v1_oas3.js +0 -4
- package/lib/types/restful/specs/sell_analytics_v1_oas3.d.ts +0 -130
- package/lib/types/restful/specs/sell_analytics_v1_oas3.js +0 -4
- package/lib/types/restful/specs/sell_compliance_v1_oas3.d.ts +0 -102
- package/lib/types/restful/specs/sell_compliance_v1_oas3.js +0 -4
- package/lib/types/restful/specs/sell_feed_v1_oas3.d.ts +0 -461
- package/lib/types/restful/specs/sell_feed_v1_oas3.js +0 -4
- package/lib/types/restful/specs/sell_finances_v1_oas3.d.ts +0 -255
- package/lib/types/restful/specs/sell_finances_v1_oas3.js +0 -4
- package/lib/types/restful/specs/sell_fulfillment_v1_oas3.d.ts +0 -595
- package/lib/types/restful/specs/sell_fulfillment_v1_oas3.js +0 -4
- package/lib/types/restful/specs/sell_inventory_v1_oas3.d.ts +0 -844
- package/lib/types/restful/specs/sell_inventory_v1_oas3.js +0 -4
- package/lib/types/restful/specs/sell_listing_v1_beta_oas3.d.ts +0 -57
- package/lib/types/restful/specs/sell_listing_v1_beta_oas3.js +0 -4
- package/lib/types/restful/specs/sell_logistics_v1_oas3.d.ts +0 -173
- package/lib/types/restful/specs/sell_logistics_v1_oas3.js +0 -4
- package/lib/types/restful/specs/sell_marketing_v1_oas3.d.ts +454 -1411
- package/lib/types/restful/specs/sell_marketing_v1_oas3.js +0 -4
- package/lib/types/restful/specs/sell_metadata_v1_oas3.d.ts +0 -147
- package/lib/types/restful/specs/sell_metadata_v1_oas3.js +0 -4
- package/lib/types/restful/specs/sell_negotiation_v1_oas3.d.ts +0 -94
- package/lib/types/restful/specs/sell_negotiation_v1_oas3.js +0 -4
- package/lib/types/restful/specs/sell_recommendation_v1_oas3.d.ts +0 -60
- package/lib/types/restful/specs/sell_recommendation_v1_oas3.js +0 -4
- package/lib/types/restfulTypes.d.ts +3 -0
- package/package.json +2 -2
|
@@ -3,7 +3,6 @@ import Api from '../index.js';
|
|
|
3
3
|
export const defaultApiHeaders = {
|
|
4
4
|
'Content-Type': 'application/json',
|
|
5
5
|
'Cache-Control': 'no-cache',
|
|
6
|
-
// @ts-ignore
|
|
7
6
|
...(typeof window === 'undefined' ? {
|
|
8
7
|
'Accept-Encoding': 'application/gzip'
|
|
9
8
|
} : {})
|
|
@@ -25,9 +24,6 @@ export default class Restful extends Api {
|
|
|
25
24
|
static buildServerUrl(schema, subdomain, sandbox, tld) {
|
|
26
25
|
return `${schema}${subdomain}.${sandbox ? 'sandbox.' : ''}${tld}`;
|
|
27
26
|
}
|
|
28
|
-
/**
|
|
29
|
-
* Enable to supports the use of OAuth tokens for user authorization.
|
|
30
|
-
*/
|
|
31
27
|
get useIaf() {
|
|
32
28
|
return false;
|
|
33
29
|
}
|
|
@@ -60,29 +56,15 @@ export default class Restful extends Api {
|
|
|
60
56
|
get baseUrl() {
|
|
61
57
|
return this.getServerUrl(this.apiConfig);
|
|
62
58
|
}
|
|
63
|
-
/**
|
|
64
|
-
* Create a new instances of it self with specified api config.
|
|
65
|
-
* @param apiConfig
|
|
66
|
-
*/
|
|
67
59
|
api(apiConfig) {
|
|
68
|
-
// @ts-ignore
|
|
69
60
|
return new this.constructor(this.config, this.req, this.auth, apiConfig);
|
|
70
61
|
}
|
|
71
|
-
/**
|
|
72
|
-
* Use "apix" subdomain
|
|
73
|
-
*/
|
|
74
62
|
get apix() {
|
|
75
63
|
return this.api({ subdomain: 'apix' });
|
|
76
64
|
}
|
|
77
|
-
/**
|
|
78
|
-
* Use "apiz" subdomain
|
|
79
|
-
*/
|
|
80
65
|
get apiz() {
|
|
81
66
|
return this.api({ subdomain: 'apiz' });
|
|
82
67
|
}
|
|
83
|
-
/**
|
|
84
|
-
* Sign request
|
|
85
|
-
*/
|
|
86
68
|
get sign() {
|
|
87
69
|
return this.api({ sign: true });
|
|
88
70
|
}
|
|
@@ -100,10 +82,8 @@ export default class Restful extends Api {
|
|
|
100
82
|
}
|
|
101
83
|
get additionalHeaders() {
|
|
102
84
|
return Object.keys(additionalHeaders)
|
|
103
|
-
// @ts-ignore
|
|
104
85
|
.filter(key => typeof this.config[key] !== 'undefined')
|
|
105
86
|
.reduce((headers, key) => {
|
|
106
|
-
// @ts-ignore
|
|
107
87
|
headers[additionalHeaders[key]] = this.config[key];
|
|
108
88
|
return headers;
|
|
109
89
|
}, {});
|
|
@@ -136,8 +116,7 @@ export default class Restful extends Api {
|
|
|
136
116
|
}
|
|
137
117
|
catch (error) {
|
|
138
118
|
if (this.shouldRefreshToken(error)) {
|
|
139
|
-
|
|
140
|
-
return await this.request(payload, apiConfig, true /* refresh token */);
|
|
119
|
+
return await this.request(payload, apiConfig, true);
|
|
141
120
|
}
|
|
142
121
|
throw error;
|
|
143
122
|
}
|
|
@@ -164,7 +143,6 @@ export default class Restful extends Api {
|
|
|
164
143
|
}
|
|
165
144
|
const enrichedConfig = await this.enrichRequestConfig(apiRequest, data, apiCfg);
|
|
166
145
|
const args = ['get', 'delete'].includes(method) ? [enrichedConfig] : [data, enrichedConfig];
|
|
167
|
-
// @ts-ignore
|
|
168
146
|
const response = await this.req[method](endpoint, ...args);
|
|
169
147
|
if (this.apiConfig.returnResponse) {
|
|
170
148
|
return response;
|
|
@@ -1,57 +1,14 @@
|
|
|
1
1
|
import Restful from '../../index.js';
|
|
2
2
|
import { CancellationSearchParams, ConfirmRefundRequest, CreateCancelRequest, RejectCancelRequest } from '../../../../types/index.js';
|
|
3
|
-
/**
|
|
4
|
-
* Post-Order Cancellation API
|
|
5
|
-
*/
|
|
6
3
|
export default class Cancellation extends Restful {
|
|
7
4
|
static id: string;
|
|
8
5
|
get basePath(): string;
|
|
9
6
|
get useIaf(): boolean;
|
|
10
|
-
/**
|
|
11
|
-
* Seller approves a cancellation request
|
|
12
|
-
*
|
|
13
|
-
* @param cancelId The unique eBay-assigned identifier of the cancellation request to be approved.
|
|
14
|
-
*/
|
|
15
7
|
approveCancellationRequest(cancelId: string): Promise<any>;
|
|
16
|
-
/**
|
|
17
|
-
* Check the eligibility of an order cancellation
|
|
18
|
-
*
|
|
19
|
-
* @param legacyOrderId The unique ID of the order being canceled or the order being considered for cancellation.
|
|
20
|
-
*/
|
|
21
8
|
checkCancellationEligibility(legacyOrderId: string): Promise<any>;
|
|
22
|
-
/**
|
|
23
|
-
* Buyer confirms the refund from a cancellation was received
|
|
24
|
-
*
|
|
25
|
-
* @param cancelId The unique eBay-assigned identifier of the cancellation/refund being confirmed.
|
|
26
|
-
* @param payload the ConfirmRefundReceivedPayload
|
|
27
|
-
*/
|
|
28
9
|
confirmRefundReceived(cancelId: string, payload?: ConfirmRefundRequest): Promise<any>;
|
|
29
|
-
/**
|
|
30
|
-
* Request or perform an order cancellation.
|
|
31
|
-
*
|
|
32
|
-
* @param payload the CreateCancelRequest
|
|
33
|
-
*/
|
|
34
10
|
createCancellation(payload: CreateCancelRequest): Promise<any>;
|
|
35
|
-
/**
|
|
36
|
-
* Retrieve the details of an order cancellation.
|
|
37
|
-
*
|
|
38
|
-
* @param cancelId Supply in this path parameter the unique eBay-assigned ID of the cancellation request to
|
|
39
|
-
* retrieve.
|
|
40
|
-
* @param fieldGroups The value set in this query parameter controls the level of detail that is returned in the
|
|
41
|
-
* response.
|
|
42
|
-
*/
|
|
43
11
|
getCancellation(cancelId: string, fieldGroups?: string): Promise<any>;
|
|
44
|
-
/**
|
|
45
|
-
* Seller rejects a cancellation request.
|
|
46
|
-
*
|
|
47
|
-
* @param cancelId The unique eBay-assigned identifier of the cancellation request to be rejected.
|
|
48
|
-
* @param payload the RejectCancelRequest
|
|
49
|
-
*/
|
|
50
12
|
rejectCancellationRequest(cancelId: string, payload?: RejectCancelRequest): Promise<any>;
|
|
51
|
-
/**
|
|
52
|
-
* Search for cancellations.
|
|
53
|
-
*
|
|
54
|
-
* @param params the SearchParams
|
|
55
|
-
*/
|
|
56
13
|
search(params: CancellationSearchParams): Promise<any>;
|
|
57
14
|
}
|
|
@@ -1,7 +1,4 @@
|
|
|
1
1
|
import Restful from '../../index.js';
|
|
2
|
-
/**
|
|
3
|
-
* Post-Order Cancellation API
|
|
4
|
-
*/
|
|
5
2
|
class Cancellation extends Restful {
|
|
6
3
|
get basePath() {
|
|
7
4
|
return '/post-order/v2';
|
|
@@ -9,51 +6,22 @@ class Cancellation extends Restful {
|
|
|
9
6
|
get useIaf() {
|
|
10
7
|
return true;
|
|
11
8
|
}
|
|
12
|
-
/**
|
|
13
|
-
* Seller approves a cancellation request
|
|
14
|
-
*
|
|
15
|
-
* @param cancelId The unique eBay-assigned identifier of the cancellation request to be approved.
|
|
16
|
-
*/
|
|
17
9
|
approveCancellationRequest(cancelId) {
|
|
18
10
|
cancelId = encodeURIComponent(cancelId);
|
|
19
11
|
return this.post(`/cancellation/${cancelId}/approve`);
|
|
20
12
|
}
|
|
21
|
-
/**
|
|
22
|
-
* Check the eligibility of an order cancellation
|
|
23
|
-
*
|
|
24
|
-
* @param legacyOrderId The unique ID of the order being canceled or the order being considered for cancellation.
|
|
25
|
-
*/
|
|
26
13
|
checkCancellationEligibility(legacyOrderId) {
|
|
27
14
|
return this.post(`/cancellation/check_eligibility`, {
|
|
28
15
|
legacyOrderId
|
|
29
16
|
});
|
|
30
17
|
}
|
|
31
|
-
/**
|
|
32
|
-
* Buyer confirms the refund from a cancellation was received
|
|
33
|
-
*
|
|
34
|
-
* @param cancelId The unique eBay-assigned identifier of the cancellation/refund being confirmed.
|
|
35
|
-
* @param payload the ConfirmRefundReceivedPayload
|
|
36
|
-
*/
|
|
37
18
|
confirmRefundReceived(cancelId, payload) {
|
|
38
19
|
cancelId = encodeURIComponent(cancelId);
|
|
39
20
|
return this.post(`/cancellation/${cancelId}/confirm`, payload);
|
|
40
21
|
}
|
|
41
|
-
/**
|
|
42
|
-
* Request or perform an order cancellation.
|
|
43
|
-
*
|
|
44
|
-
* @param payload the CreateCancelRequest
|
|
45
|
-
*/
|
|
46
22
|
createCancellation(payload) {
|
|
47
23
|
return this.post(`/cancellation`, payload);
|
|
48
24
|
}
|
|
49
|
-
/**
|
|
50
|
-
* Retrieve the details of an order cancellation.
|
|
51
|
-
*
|
|
52
|
-
* @param cancelId Supply in this path parameter the unique eBay-assigned ID of the cancellation request to
|
|
53
|
-
* retrieve.
|
|
54
|
-
* @param fieldGroups The value set in this query parameter controls the level of detail that is returned in the
|
|
55
|
-
* response.
|
|
56
|
-
*/
|
|
57
25
|
getCancellation(cancelId, fieldGroups) {
|
|
58
26
|
cancelId = encodeURIComponent(cancelId);
|
|
59
27
|
return this.get(`/cancellation/${cancelId}`, {
|
|
@@ -62,26 +30,13 @@ class Cancellation extends Restful {
|
|
|
62
30
|
}
|
|
63
31
|
});
|
|
64
32
|
}
|
|
65
|
-
/**
|
|
66
|
-
* Seller rejects a cancellation request.
|
|
67
|
-
*
|
|
68
|
-
* @param cancelId The unique eBay-assigned identifier of the cancellation request to be rejected.
|
|
69
|
-
* @param payload the RejectCancelRequest
|
|
70
|
-
*/
|
|
71
33
|
rejectCancellationRequest(cancelId, payload) {
|
|
72
34
|
cancelId = encodeURIComponent(cancelId);
|
|
73
35
|
return this.post(`/cancellation/${cancelId}/reject`, payload);
|
|
74
36
|
}
|
|
75
|
-
/**
|
|
76
|
-
* Search for cancellations.
|
|
77
|
-
*
|
|
78
|
-
* @param params the SearchParams
|
|
79
|
-
*/
|
|
80
37
|
search(params) {
|
|
81
38
|
return this.get(`/cancellation/search`, {
|
|
82
|
-
params
|
|
83
|
-
params
|
|
84
|
-
}
|
|
39
|
+
params
|
|
85
40
|
});
|
|
86
41
|
}
|
|
87
42
|
}
|
|
@@ -1,63 +1,17 @@
|
|
|
1
1
|
import { AppealRequest, BuyerCloseCaseRequest, CaseSearchParams, ReturnAddressRequest, Text } from '../../../../types/index.js';
|
|
2
2
|
import Restful from '../../index.js';
|
|
3
|
-
/**
|
|
4
|
-
* Post-Order Case Management API
|
|
5
|
-
*/
|
|
6
3
|
export default class Case extends Restful {
|
|
7
4
|
static id: string;
|
|
8
5
|
get basePath(): string;
|
|
9
6
|
get useIaf(): boolean;
|
|
10
|
-
/**
|
|
11
|
-
* Buyer or seller appeals a case decision.
|
|
12
|
-
*
|
|
13
|
-
* @param caseId The unique identifier of a case.
|
|
14
|
-
* @param payload the AppealRequest
|
|
15
|
-
*/
|
|
16
7
|
appealCaseDecision(caseId: string, payload?: AppealRequest): Promise<any>;
|
|
17
|
-
/**
|
|
18
|
-
* Check the eligibility of an order cancellation.
|
|
19
|
-
*
|
|
20
|
-
* @param caseId The unique identifier of a case.
|
|
21
|
-
* @param payload the BuyerCloseCaseRequest
|
|
22
|
-
*/
|
|
23
8
|
closeCase(caseId: string, payload: BuyerCloseCaseRequest): Promise<any>;
|
|
24
|
-
/**
|
|
25
|
-
* Retrieve the details related to a specific case.
|
|
26
|
-
*
|
|
27
|
-
* @param caseId The unique identifier of a case.
|
|
28
|
-
*/
|
|
29
9
|
getCase(caseId: string): Promise<any>;
|
|
30
|
-
/**
|
|
31
|
-
* Seller issues a refund for a case.
|
|
32
|
-
*
|
|
33
|
-
* @param caseId The unique identifier of a case.
|
|
34
|
-
* @param payload the CaseVoluntaryRefundRequest (Text)
|
|
35
|
-
*/
|
|
36
10
|
issueCaseRefund(caseId: string, payload?: Text): Promise<any>;
|
|
37
|
-
/**
|
|
38
|
-
* This call allows the buyer to provide shipment tracking information for the item that is being returned to the
|
|
39
|
-
* seller.
|
|
40
|
-
*
|
|
41
|
-
* @param caseId The unique identifier of a case.
|
|
42
|
-
* @param shippingCarrierName The shipping carrier that is used to ship the item, such as 'FedEx', 'UPS', or
|
|
43
|
-
* 'USPS'.
|
|
44
|
-
* @param trackingNumber The tracking number assigned by the shipping carrier to the item shipment.
|
|
45
|
-
*/
|
|
46
11
|
provideReturnShipmentInfo(caseId: string, { shippingCarrierName, trackingNumber }: {
|
|
47
12
|
shippingCarrierName: string;
|
|
48
13
|
trackingNumber: string;
|
|
49
14
|
}): Promise<any>;
|
|
50
|
-
/**
|
|
51
|
-
* Seller provides a return address to the buyer.
|
|
52
|
-
*
|
|
53
|
-
* @param cancelId The unique eBay-assigned identifier of the cancellation request to be rejected.
|
|
54
|
-
* @param payload the ReturnAddressRequest
|
|
55
|
-
*/
|
|
56
15
|
providesReturnAddress(cancelId: string, payload?: ReturnAddressRequest): Promise<any>;
|
|
57
|
-
/**
|
|
58
|
-
* This call is used to search for cases using multiple filter types.
|
|
59
|
-
*
|
|
60
|
-
* @param params the SearchParams
|
|
61
|
-
*/
|
|
62
16
|
search(params: CaseSearchParams): Promise<any>;
|
|
63
17
|
}
|
|
@@ -1,7 +1,4 @@
|
|
|
1
1
|
import Restful from '../../index.js';
|
|
2
|
-
/**
|
|
3
|
-
* Post-Order Case Management API
|
|
4
|
-
*/
|
|
5
2
|
class Case extends Restful {
|
|
6
3
|
get basePath() {
|
|
7
4
|
return '/post-order/v2';
|
|
@@ -9,54 +6,22 @@ class Case extends Restful {
|
|
|
9
6
|
get useIaf() {
|
|
10
7
|
return true;
|
|
11
8
|
}
|
|
12
|
-
/**
|
|
13
|
-
* Buyer or seller appeals a case decision.
|
|
14
|
-
*
|
|
15
|
-
* @param caseId The unique identifier of a case.
|
|
16
|
-
* @param payload the AppealRequest
|
|
17
|
-
*/
|
|
18
9
|
appealCaseDecision(caseId, payload) {
|
|
19
10
|
const id = encodeURIComponent(caseId);
|
|
20
11
|
return this.post(`/casemanagement/${id}/appeal`, payload);
|
|
21
12
|
}
|
|
22
|
-
/**
|
|
23
|
-
* Check the eligibility of an order cancellation.
|
|
24
|
-
*
|
|
25
|
-
* @param caseId The unique identifier of a case.
|
|
26
|
-
* @param payload the BuyerCloseCaseRequest
|
|
27
|
-
*/
|
|
28
13
|
closeCase(caseId, payload) {
|
|
29
14
|
const id = encodeURIComponent(caseId);
|
|
30
15
|
return this.post(`/casemanagement/${id}/close`, payload);
|
|
31
16
|
}
|
|
32
|
-
/**
|
|
33
|
-
* Retrieve the details related to a specific case.
|
|
34
|
-
*
|
|
35
|
-
* @param caseId The unique identifier of a case.
|
|
36
|
-
*/
|
|
37
17
|
getCase(caseId) {
|
|
38
18
|
const id = encodeURIComponent(caseId);
|
|
39
19
|
return this.get(`/casemanagement/${id}`);
|
|
40
20
|
}
|
|
41
|
-
/**
|
|
42
|
-
* Seller issues a refund for a case.
|
|
43
|
-
*
|
|
44
|
-
* @param caseId The unique identifier of a case.
|
|
45
|
-
* @param payload the CaseVoluntaryRefundRequest (Text)
|
|
46
|
-
*/
|
|
47
21
|
issueCaseRefund(caseId, payload) {
|
|
48
22
|
const id = encodeURIComponent(caseId);
|
|
49
23
|
return this.post(`/casemanagement/${id}/issue_refund`, payload);
|
|
50
24
|
}
|
|
51
|
-
/**
|
|
52
|
-
* This call allows the buyer to provide shipment tracking information for the item that is being returned to the
|
|
53
|
-
* seller.
|
|
54
|
-
*
|
|
55
|
-
* @param caseId The unique identifier of a case.
|
|
56
|
-
* @param shippingCarrierName The shipping carrier that is used to ship the item, such as 'FedEx', 'UPS', or
|
|
57
|
-
* 'USPS'.
|
|
58
|
-
* @param trackingNumber The tracking number assigned by the shipping carrier to the item shipment.
|
|
59
|
-
*/
|
|
60
25
|
provideReturnShipmentInfo(caseId, { shippingCarrierName, trackingNumber }) {
|
|
61
26
|
const id = encodeURIComponent(caseId);
|
|
62
27
|
return this.post(`/casemanagement/${id}/provide_shipment_info`, {
|
|
@@ -64,21 +29,10 @@ class Case extends Restful {
|
|
|
64
29
|
trackingNumber
|
|
65
30
|
});
|
|
66
31
|
}
|
|
67
|
-
/**
|
|
68
|
-
* Seller provides a return address to the buyer.
|
|
69
|
-
*
|
|
70
|
-
* @param cancelId The unique eBay-assigned identifier of the cancellation request to be rejected.
|
|
71
|
-
* @param payload the ReturnAddressRequest
|
|
72
|
-
*/
|
|
73
32
|
providesReturnAddress(cancelId, payload) {
|
|
74
33
|
const id = encodeURIComponent(cancelId);
|
|
75
34
|
return this.post(`/casemanagement/${id}/provide_return_address`, payload);
|
|
76
35
|
}
|
|
77
|
-
/**
|
|
78
|
-
* This call is used to search for cases using multiple filter types.
|
|
79
|
-
*
|
|
80
|
-
* @param params the SearchParams
|
|
81
|
-
*/
|
|
82
36
|
search(params) {
|
|
83
37
|
return this.get(`/casemanagement/search`, {
|
|
84
38
|
params
|
|
@@ -1,82 +1,18 @@
|
|
|
1
1
|
import Restful from '../../index.js';
|
|
2
2
|
import { BuyerCloseInquiryRequest, CheckInquiryEligibilityRequest, CreateInquiryRequest, EscalateInquiryRequest, InquirySearchParams, InquiryVoluntaryRefundRequest, SellerProvideRefundInfoRequest, SendMessageRequest, ShipmentInfoRequest } from '../../../../types/index.js';
|
|
3
|
-
/**
|
|
4
|
-
* Post-Order Inquiry API
|
|
5
|
-
*/
|
|
6
3
|
export default class Inquiry extends Restful {
|
|
7
4
|
static id: string;
|
|
8
5
|
get basePath(): string;
|
|
9
6
|
get useIaf(): boolean;
|
|
10
|
-
/**
|
|
11
|
-
* Check if a buyer is eligible to open an inquiry on an order.
|
|
12
|
-
*
|
|
13
|
-
* @param payload the CheckInquiryEligibilityRequest
|
|
14
|
-
*/
|
|
15
7
|
checkInquiryEligibility(payload: CheckInquiryEligibilityRequest): Promise<any>;
|
|
16
|
-
/**
|
|
17
|
-
* Close an inquiry for the buyer
|
|
18
|
-
*
|
|
19
|
-
* @param inquiryId The unique ID of the inquiry to be closed.
|
|
20
|
-
* @param payload the BuyerCloseInquiryRequest
|
|
21
|
-
*/
|
|
22
8
|
closeInquiry(inquiryId: string, payload?: BuyerCloseInquiryRequest): Promise<any>;
|
|
23
|
-
/**
|
|
24
|
-
* Buyer confirms the refund from an inquiry was received
|
|
25
|
-
*
|
|
26
|
-
* @param inquiryId The unique identifier of a case.
|
|
27
|
-
*/
|
|
28
9
|
confirmInquiryRefund(inquiryId: string): Promise<any>;
|
|
29
|
-
/**
|
|
30
|
-
* Create an inquiry for the buyer.
|
|
31
|
-
*
|
|
32
|
-
* @param payload the CreateInquiryRequest
|
|
33
|
-
*/
|
|
34
10
|
createInquiry(payload: CreateInquiryRequest): Promise<any>;
|
|
35
|
-
/**
|
|
36
|
-
* Escalate an inquiry to an INR case.
|
|
37
|
-
*
|
|
38
|
-
* @param inquiryId the unique identifier of the inquiry to be escalated.
|
|
39
|
-
* @param payload the EscalateInquiryRequest
|
|
40
|
-
*/
|
|
41
11
|
escalateInquiry(inquiryId: string, payload: EscalateInquiryRequest): Promise<any>;
|
|
42
|
-
/**
|
|
43
|
-
* Retrieve the history and details related to a specific inquiry.
|
|
44
|
-
*
|
|
45
|
-
* @param inquiryId the unique ID of the inquiry for which details and history are to be retrieved.
|
|
46
|
-
*/
|
|
47
12
|
getInquiry(inquiryId: string): Promise<any>;
|
|
48
|
-
/**
|
|
49
|
-
* Issue a refund for an inquiry.
|
|
50
|
-
*
|
|
51
|
-
* @param inquiryId the unique ID of the inquiry for which a refund is to be issued.
|
|
52
|
-
* @param payload the InquiryVoluntaryRefundRequest
|
|
53
|
-
*/
|
|
54
13
|
issueInquiryRefund(inquiryId: string, payload?: InquiryVoluntaryRefundRequest): Promise<any>;
|
|
55
|
-
/**
|
|
56
|
-
* Provide refund information about an inquiry to the buyer.
|
|
57
|
-
*
|
|
58
|
-
* @param inquiryId The unique ID of the inquiry for which to provide refund information.
|
|
59
|
-
* @param payload the InquiryVoluntaryRefundRequest
|
|
60
|
-
*/
|
|
61
14
|
provideInquiryRefundInfo(inquiryId: string, payload: SellerProvideRefundInfoRequest): Promise<any>;
|
|
62
|
-
/**
|
|
63
|
-
* Provide shipment information for an inquiry.
|
|
64
|
-
*
|
|
65
|
-
* @param inquiryId The unique ID of the inquiry for which to provide shipment information.
|
|
66
|
-
* @param payload the ShipmentInfoRequest
|
|
67
|
-
*/
|
|
68
15
|
provideInquiryShipmentInfo(inquiryId: string, payload?: ShipmentInfoRequest): Promise<any>;
|
|
69
|
-
/**
|
|
70
|
-
* This call is used to search for inquiries using multiple filter types.
|
|
71
|
-
*
|
|
72
|
-
* @param params the InquirySearchParams
|
|
73
|
-
*/
|
|
74
16
|
search(params?: InquirySearchParams): Promise<any>;
|
|
75
|
-
/**
|
|
76
|
-
* Contact the buyer or seller about an inquiry.
|
|
77
|
-
*
|
|
78
|
-
* @param inquiryId The unique ID of the inquiry being discussed.
|
|
79
|
-
* @param payload the SendMessageRequest
|
|
80
|
-
*/
|
|
81
17
|
sendInquiryMessage(inquiryId: string, payload: SendMessageRequest): Promise<any>;
|
|
82
18
|
}
|
|
@@ -1,7 +1,4 @@
|
|
|
1
1
|
import Restful from '../../index.js';
|
|
2
|
-
/**
|
|
3
|
-
* Post-Order Inquiry API
|
|
4
|
-
*/
|
|
5
2
|
class Inquiry extends Restful {
|
|
6
3
|
get basePath() {
|
|
7
4
|
return '/post-order/v2';
|
|
@@ -9,20 +6,9 @@ class Inquiry extends Restful {
|
|
|
9
6
|
get useIaf() {
|
|
10
7
|
return true;
|
|
11
8
|
}
|
|
12
|
-
/**
|
|
13
|
-
* Check if a buyer is eligible to open an inquiry on an order.
|
|
14
|
-
*
|
|
15
|
-
* @param payload the CheckInquiryEligibilityRequest
|
|
16
|
-
*/
|
|
17
9
|
checkInquiryEligibility(payload) {
|
|
18
10
|
return this.post(`/inquiry/check_eligibility`, payload);
|
|
19
11
|
}
|
|
20
|
-
/**
|
|
21
|
-
* Close an inquiry for the buyer
|
|
22
|
-
*
|
|
23
|
-
* @param inquiryId The unique ID of the inquiry to be closed.
|
|
24
|
-
* @param payload the BuyerCloseInquiryRequest
|
|
25
|
-
*/
|
|
26
12
|
closeInquiry(inquiryId, payload) {
|
|
27
13
|
inquiryId = encodeURIComponent(inquiryId);
|
|
28
14
|
if (typeof payload?.closeReason === 'string') {
|
|
@@ -30,92 +16,42 @@ class Inquiry extends Restful {
|
|
|
30
16
|
}
|
|
31
17
|
return this.post(`/inquiry/${inquiryId}/close`, payload);
|
|
32
18
|
}
|
|
33
|
-
/**
|
|
34
|
-
* Buyer confirms the refund from an inquiry was received
|
|
35
|
-
*
|
|
36
|
-
* @param inquiryId The unique identifier of a case.
|
|
37
|
-
*/
|
|
38
19
|
confirmInquiryRefund(inquiryId) {
|
|
39
20
|
inquiryId = encodeURIComponent(inquiryId);
|
|
40
21
|
return this.post(`/inquiry/${inquiryId}/confirm_refund`);
|
|
41
22
|
}
|
|
42
|
-
/**
|
|
43
|
-
* Create an inquiry for the buyer.
|
|
44
|
-
*
|
|
45
|
-
* @param payload the CreateInquiryRequest
|
|
46
|
-
*/
|
|
47
23
|
createInquiry(payload) {
|
|
48
24
|
if (typeof payload.desiredOutcome === 'string') {
|
|
49
25
|
payload.desiredOutcome = payload.desiredOutcome.trim();
|
|
50
26
|
}
|
|
51
27
|
return this.post(`/inquiry`, payload);
|
|
52
28
|
}
|
|
53
|
-
/**
|
|
54
|
-
* Escalate an inquiry to an INR case.
|
|
55
|
-
*
|
|
56
|
-
* @param inquiryId the unique identifier of the inquiry to be escalated.
|
|
57
|
-
* @param payload the EscalateInquiryRequest
|
|
58
|
-
*/
|
|
59
29
|
escalateInquiry(inquiryId, payload) {
|
|
60
30
|
inquiryId = encodeURIComponent(inquiryId);
|
|
61
31
|
payload.escalateInquiryReason = payload.escalateInquiryReason.trim();
|
|
62
32
|
return this.post(`/inquiry/${inquiryId}/escalate`, payload);
|
|
63
33
|
}
|
|
64
|
-
/**
|
|
65
|
-
* Retrieve the history and details related to a specific inquiry.
|
|
66
|
-
*
|
|
67
|
-
* @param inquiryId the unique ID of the inquiry for which details and history are to be retrieved.
|
|
68
|
-
*/
|
|
69
34
|
getInquiry(inquiryId) {
|
|
70
35
|
inquiryId = encodeURIComponent(inquiryId);
|
|
71
36
|
return this.get(`/inquiry/${inquiryId}`);
|
|
72
37
|
}
|
|
73
|
-
/**
|
|
74
|
-
* Issue a refund for an inquiry.
|
|
75
|
-
*
|
|
76
|
-
* @param inquiryId the unique ID of the inquiry for which a refund is to be issued.
|
|
77
|
-
* @param payload the InquiryVoluntaryRefundRequest
|
|
78
|
-
*/
|
|
79
38
|
issueInquiryRefund(inquiryId, payload) {
|
|
80
39
|
inquiryId = encodeURIComponent(inquiryId);
|
|
81
40
|
return this.post(`/inquiry/${inquiryId}/issue_refund`, payload);
|
|
82
41
|
}
|
|
83
|
-
/**
|
|
84
|
-
* Provide refund information about an inquiry to the buyer.
|
|
85
|
-
*
|
|
86
|
-
* @param inquiryId The unique ID of the inquiry for which to provide refund information.
|
|
87
|
-
* @param payload the InquiryVoluntaryRefundRequest
|
|
88
|
-
*/
|
|
89
42
|
provideInquiryRefundInfo(inquiryId, payload) {
|
|
90
43
|
inquiryId = encodeURIComponent(inquiryId);
|
|
91
44
|
return this.post(`/inquiry/${inquiryId}/provide_refund_info`, payload);
|
|
92
45
|
}
|
|
93
|
-
/**
|
|
94
|
-
* Provide shipment information for an inquiry.
|
|
95
|
-
*
|
|
96
|
-
* @param inquiryId The unique ID of the inquiry for which to provide shipment information.
|
|
97
|
-
* @param payload the ShipmentInfoRequest
|
|
98
|
-
*/
|
|
99
46
|
provideInquiryShipmentInfo(inquiryId, payload) {
|
|
100
47
|
inquiryId = encodeURIComponent(inquiryId);
|
|
101
48
|
return this.post(`/inquiry/${inquiryId}/provide_shipment_info`, payload);
|
|
102
49
|
}
|
|
103
|
-
/**
|
|
104
|
-
* This call is used to search for inquiries using multiple filter types.
|
|
105
|
-
*
|
|
106
|
-
* @param params the InquirySearchParams
|
|
107
|
-
*/
|
|
108
50
|
search(params) {
|
|
109
51
|
return this.get(`/inquiry/search`, {
|
|
110
52
|
params
|
|
111
53
|
});
|
|
112
54
|
}
|
|
113
|
-
/**
|
|
114
|
-
* Contact the buyer or seller about an inquiry.
|
|
115
|
-
*
|
|
116
|
-
* @param inquiryId The unique ID of the inquiry being discussed.
|
|
117
|
-
* @param payload the SendMessageRequest
|
|
118
|
-
*/
|
|
119
55
|
sendInquiryMessage(inquiryId, payload) {
|
|
120
56
|
inquiryId = encodeURIComponent(inquiryId);
|
|
121
57
|
return this.post(`/inquiry/${inquiryId}/send_message`, payload);
|