Class: MuffinMan::FulfillmentInbound::V0
- Inherits:
-
SpApiClient
- Object
- SpApiClient
- MuffinMan::FulfillmentInbound::V0
- Defined in:
- lib/muffin_man/fulfillment_inbound/v0.rb
Constant Summary
Constants inherited from SpApiClient
SpApiClient::ACCESS_TOKEN_URL, SpApiClient::AWS_REGION_MAP, SpApiClient::SERVICE_NAME
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
- #create_inbound_shipment(shipment_id, marketplace_id, inbound_shipment_header, inbound_shipment_items) ⇒ Object
- #create_inbound_shipment_plan(ship_from_address, label_prep_preference, inbound_shipment_plan_request_items, ship_to_country_code: nil, ship_to_country_subdivision_code: nil) ⇒ Object
- #get_prep_instructions(ship_to_country_code, seller_sku_list: [], asin_list: []) ⇒ Object
Methods inherited from SpApiClient
Constructor Details
This class inherits a constructor from MuffinMan::SpApiClient
Instance Method Details
#create_inbound_shipment(shipment_id, marketplace_id, inbound_shipment_header, inbound_shipment_items) ⇒ Object
28 29 30 31 32 33 34 35 36 37 |
# File 'lib/muffin_man/fulfillment_inbound/v0.rb', line 28 def create_inbound_shipment(shipment_id, marketplace_id, inbound_shipment_header, inbound_shipment_items) @local_var_path = "/fba/inbound/v0/shipments/#{shipment_id}" @request_body = { "MarketplaceId": marketplace_id, "InboundShipmentHeader": inbound_shipment_header, "InboundShipmentItems": inbound_shipment_items, } @request_type = "POST" call_api end |
#create_inbound_shipment_plan(ship_from_address, label_prep_preference, inbound_shipment_plan_request_items, ship_to_country_code: nil, ship_to_country_subdivision_code: nil) ⇒ Object
15 16 17 18 19 20 21 22 23 24 25 26 |
# File 'lib/muffin_man/fulfillment_inbound/v0.rb', line 15 def create_inbound_shipment_plan(ship_from_address, label_prep_preference, inbound_shipment_plan_request_items, ship_to_country_code: nil, ship_to_country_subdivision_code: nil) @local_var_path = "/fba/inbound/v0/plans" @request_body = { "ShipFromAddress" => ship_from_address, "LabelPrepPreference" => label_prep_preference, "InboundShipmentPlanRequestItems" => inbound_shipment_plan_request_items, } @request_body["ShipToCountryCode"] = ship_to_country_code unless ship_to_country_code.nil? @request_body["ShipToCountrySubdivisionCode"] = ship_to_country_subdivision_code unless ship_to_country_subdivision_code.nil? @request_type = "POST" call_api end |
#get_prep_instructions(ship_to_country_code, seller_sku_list: [], asin_list: []) ⇒ Object
4 5 6 7 8 9 10 11 12 13 |
# File 'lib/muffin_man/fulfillment_inbound/v0.rb', line 4 def get_prep_instructions(ship_to_country_code, seller_sku_list: [], asin_list: []) @local_var_path = "/fba/inbound/v0/prepInstructions" @query_params = { "ShipToCountryCode" => ship_to_country_code } @query_params["SellerSKUList"] = seller_sku_list.join(",") if seller_sku_list.any? @query_params["ASINList"] = asin_list.join(",") if asin_list.any? @request_type = "GET" call_api end |