Class: MuffinMan::ListingsRestrictions::V20210801
- Inherits:
-
SpApiClient
- Object
- SpApiClient
- MuffinMan::ListingsRestrictions::V20210801
- Defined in:
- lib/muffin_man/listings_restrictions/v20210801.rb
Constant Summary
Constants inherited from SpApiClient
SpApiClient::ACCESS_TOKEN_URL, SpApiClient::AWS_REGION_MAP, SpApiClient::SERVICE_NAME, SpApiClient::UNPROCESSABLE_ENTITY_STATUS_CODE
Instance Attribute Summary
Attributes inherited from SpApiClient
#access_token_cache_key, #aws_access_key_id, #aws_secret_access_key, #client_id, #client_secret, #config, #credentials, #local_var_path, #pii_data_elements, #query_params, #refresh_token, #region, #request_body, #request_type, #sandbox, #scope, #sts_iam_role_arn
Instance Method Summary collapse
Methods inherited from SpApiClient
Constructor Details
This class inherits a constructor from MuffinMan::SpApiClient
Instance Method Details
#get_listings_restrictions(asin, seller_id, marketplace_ids, condition_type = nil, reason_locale = nil) ⇒ Object
6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 |
# File 'lib/muffin_man/listings_restrictions/v20210801.rb', line 6 def get_listings_restrictions(asin, seller_id, marketplace_ids, condition_type = nil, reason_locale = nil) # Options for condition_type: # new_new # new_open_box # new_oem # refurbished_refurbished # used_like_new # used_very_good # used_good # used_acceptable # collectible_like_new # collectible_very_good # collectible_good # collectible_acceptable # club_club @local_var_path = "/listings/2021-08-01/restrictions" @marketplace_ids = marketplace_ids.is_a?(Array) ? marketplace_ids : [marketplace_ids] @query_params = { "marketplaceIds" => @marketplace_ids.join(",") } @query_params["asin"] = asin if asin @query_params["conditionType"] = condition_type if condition_type @query_params["sellerId"] = seller_id if seller_id @query_params["reason_locale"] = reason_locale if reason_locale @request_type = "GET" call_api end |