Sha256: 70bf1d2df55eea5643b35a687a25df4940c69ac7f22ca64590438bdc8ac7595d
Contents?: true
Size: 1.53 KB
Versions: 1
Compression:
Stored size: 1.53 KB
Contents
module MuffinMan module Listings class V20210801 < SpApiClient def get_listings_item(seller_id, sku, marketplace_ids, issue_locale: nil, included_data: []) # Options for included_data: # summaries # attributes # issues # offers # fulfillmentAvailability # procurement @local_var_path = "/listings/2021-08-01/items/#{seller_id}/#{sku}" @marketplace_ids = marketplace_ids.is_a?(Array) ? marketplace_ids : [marketplace_ids] @query_params = { "marketplaceIds" => @marketplace_ids.join(",") } @query_params["issueLocale"] = issue_locale if issue_locale @query_params["includedData"] = included_data.join(",") if included_data.any? @request_type = "GET" call_api end def put_listings_item(seller_id, sku, marketplace_ids, product_type, attributes, issue_locale: nil, requirements: nil) @local_var_path = "/listings/2021-08-01/items/#{seller_id}/#{sku}" @marketplace_ids = marketplace_ids.is_a?(Array) ? marketplace_ids : [marketplace_ids] @query_params = { "marketplaceIds" => @marketplace_ids.join(",") } @query_params["issueLocale"] = issue_locale if issue_locale @request_body = { "productType" => product_type, "attributes" => attributes } @request_body["requirements"] = requirements if requirements @request_type = "PUT" call_api end end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
muffin_man-2.0.3 | lib/muffin_man/listings/v20210801.rb |