Class: WalmartApIs::ProductFeesApi
- Defined in:
- lib/walmart_ap_is/apis/product_fees_api.rb
Overview
ProductFeesApi
Constant Summary
Constants inherited from BaseApi
Instance Attribute Summary
Attributes inherited from BaseApi
Instance Method Summary collapse
-
#get_my_fees_estimate_for_item(walmart_item_id, body) ⇒ ApiResponse
Returns an estimated fee for a single item identified by Walmart Item ID.
-
#get_my_fees_estimate_for_sku(seller_sku, marketplace_id, body) ⇒ ApiResponse
Returns an estimated fee for a seller listing identified by Seller SKU.
-
#get_my_fees_estimates(body) ⇒ ApiResponse
Returns estimated Walmart fees for a list of items identified by Walmart Item ID or Seller SKU.
Methods inherited from BaseApi
#initialize, #new_parameter, #new_request_builder, #new_response_handler, user_agent, user_agent_parameters
Constructor Details
This class inherits a constructor from WalmartApIs::BaseApi
Instance Method Details
#get_my_fees_estimate_for_item(walmart_item_id, body) ⇒ ApiResponse
Returns an estimated fee for a single item identified by Walmart Item ID. Walmart Item ID replaces the SP-API ASIN path parameter per ADR-029. the item. Replaces SP-API ASIN per ADR-029. description here
55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 |
# File 'lib/walmart_ap_is/apis/product_fees_api.rb', line 55 def get_my_fees_estimate_for_item(walmart_item_id, body) @api_call .request(new_request_builder(HttpMethodEnum::POST, '/products/fees/v4/items/{WalmartItemId}/feesEstimate', Server::DEFAULT1) .template_param(new_parameter(walmart_item_id, key: 'WalmartItemId') .is_required(true) .should_encode(true)) .header_param(new_parameter('application/json', key: 'Content-Type')) .body_param(new_parameter(body) .is_required(true)) .header_param(new_parameter('application/json', key: 'accept')) .body_serializer(proc do |param| param.to_json unless param.nil? end) .auth(Single.new('walletAuth'))) .response(new_response_handler .deserializer(APIHelper.method(:custom_type_deserializer)) .deserialize_into(GetMyFeesEstimateResponse.method(:from_hash)) .is_api_response(true) .local_error('400', 'Bad Request', ErrorListErrorException) .local_error('403', 'Forbidden', ErrorListErrorException) .local_error('404', 'Not Found', ErrorListErrorException) .local_error('429', 'Rate limit exceeded', ErrorListErrorException) .local_error('500', 'Internal Server Error', ErrorListErrorException)) .execute end |
#get_my_fees_estimate_for_sku(seller_sku, marketplace_id, body) ⇒ ApiResponse
Returns an estimated fee for a seller listing identified by Seller SKU. listing. Scoped to the authenticated seller. identifier. description here
100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 |
# File 'lib/walmart_ap_is/apis/product_fees_api.rb', line 100 def get_my_fees_estimate_for_sku(seller_sku, marketplace_id, body) @api_call .request(new_request_builder(HttpMethodEnum::POST, '/products/fees/v4/listings/{SellerSKU}/feesEstimate', Server::DEFAULT1) .template_param(new_parameter(seller_sku, key: 'SellerSKU') .is_required(true) .should_encode(true)) .query_param(new_parameter(marketplace_id, key: 'MarketplaceId') .is_required(true)) .header_param(new_parameter('application/json', key: 'Content-Type')) .body_param(new_parameter(body) .is_required(true)) .header_param(new_parameter('application/json', key: 'accept')) .body_serializer(proc do |param| param.to_json unless param.nil? end) .auth(Single.new('walletAuth'))) .response(new_response_handler .deserializer(APIHelper.method(:custom_type_deserializer)) .deserialize_into(GetMyFeesEstimateResponse.method(:from_hash)) .is_api_response(true) .local_error('400', 'Bad Request', ErrorListErrorException) .local_error('403', 'Forbidden', ErrorListErrorException) .local_error('404', 'Not Found', ErrorListErrorException) .local_error('429', 'Rate limit exceeded', ErrorListErrorException) .local_error('500', 'Internal Server Error', ErrorListErrorException)) .execute end |
#get_my_fees_estimates(body) ⇒ ApiResponse
Returns estimated Walmart fees for a list of items identified by Walmart Item ID or Seller SKU. type description here
14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 |
# File 'lib/walmart_ap_is/apis/product_fees_api.rb', line 14 def get_my_fees_estimates(body) @api_call .request(new_request_builder(HttpMethodEnum::POST, '/products/fees/v4/feesEstimate', Server::DEFAULT1) .header_param(new_parameter('application/json', key: 'Content-Type')) .body_param(new_parameter(body) .is_required(true)) .header_param(new_parameter('application/json', key: 'accept')) .body_serializer(proc do |param| param.to_json unless param.nil? end) .auth(Single.new('walletAuth'))) .response(new_response_handler .deserializer(APIHelper.method(:custom_type_deserializer)) .deserialize_into(FeesEstimateResult.method(:from_hash)) .is_api_response(true) .is_response_array(true) .local_error('400', 'Bad Request', ErrorListErrorException) .local_error('403', 'Forbidden', ErrorListErrorException) .local_error('404', 'Not Found', ErrorListErrorException) .local_error('429', 'Rate limit exceeded', ErrorListErrorException) .local_error('500', 'Internal Server Error', ErrorListErrorException)) .execute end |