Class: MuffinMan::FulfillmentInbound::V20240320

Inherits:
SpApiClient
  • Object
show all
Defined in:
lib/muffin_man/fulfillment_inbound/v20240320.rb

Constant Summary collapse

INBOUND_PATH =
"/inbound/fba/2024-03-20"

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

#initialize

Constructor Details

This class inherits a constructor from MuffinMan::SpApiClient

Instance Method Details

#confirm_packing_option(inbound_plan_id, packing_option_id) ⇒ Object



87
88
89
90
91
# File 'lib/muffin_man/fulfillment_inbound/v20240320.rb', line 87

def confirm_packing_option(inbound_plan_id, packing_option_id)
  @local_var_path = "#{INBOUND_PATH}/inboundPlans/#{inbound_plan_id}/packingOptions/#{packing_option_id}/confirmation" # rubocop:disable Layout/LineLength
  @request_type = "POST"
  call_api
end

#confirm_transportation_options(inbound_plan_id, body) ⇒ Object



172
173
174
175
176
177
# File 'lib/muffin_man/fulfillment_inbound/v20240320.rb', line 172

def confirm_transportation_options(inbound_plan_id, body)
  @local_var_path = "#{INBOUND_PATH}/inboundPlans/#{inbound_plan_id}/transportationOptions/confirmation"
  @request_body = body
  @request_type = "POST"
  call_api
end

#create_inbound_plan(destination_marketplaces, items, source_address, name: nil) ⇒ Object



50
51
52
53
54
55
56
57
58
59
60
61
# File 'lib/muffin_man/fulfillment_inbound/v20240320.rb', line 50

def create_inbound_plan(destination_marketplaces, items, source_address, name: nil)
  @local_var_path = "#{INBOUND_PATH}/inboundPlans"
  @query_params = {}
  @request_body = {
    destinationMarketplaces: Array.wrap(destination_marketplaces),
    items: items,
    sourceAddress: source_address
  }
  @request_body["name"] = name if name
  @request_type = "POST"
  call_api
end

#create_marketplace_item_labels(body) ⇒ Object



197
198
199
200
201
202
# File 'lib/muffin_man/fulfillment_inbound/v20240320.rb', line 197

def create_marketplace_item_labels(body)
  @local_var_path = "#{INBOUND_PATH}/items/labels"
  @request_body = body
  @request_type = "POST"
  call_api
end

#generate_packing_options(inbound_plan_id) ⇒ Object



63
64
65
66
67
# File 'lib/muffin_man/fulfillment_inbound/v20240320.rb', line 63

def generate_packing_options(inbound_plan_id)
  @local_var_path = "#{INBOUND_PATH}/inboundPlans/#{inbound_plan_id}/packingOptions"
  @request_type = "POST"
  call_api
end

#generate_placement_options(inbound_plan_id) ⇒ Object



100
101
102
103
104
# File 'lib/muffin_man/fulfillment_inbound/v20240320.rb', line 100

def generate_placement_options(inbound_plan_id)
  @local_var_path = "#{INBOUND_PATH}/inboundPlans/#{inbound_plan_id}/placementOptions"
  @request_type = "POST"
  call_api
end

#generate_self_ship_appointment_slots(inbound_plan_id, shipment_id, body) ⇒ Object



139
140
141
142
143
144
# File 'lib/muffin_man/fulfillment_inbound/v20240320.rb', line 139

def generate_self_ship_appointment_slots(inbound_plan_id, shipment_id, body)
  @local_var_path = "#{INBOUND_PATH}/inboundPlans/#{inbound_plan_id}/shipments/#{shipment_id}/selfShipAppointmentSlots" # rubocop:disable Layout/LineLength
  @request_body = body
  @request_type = "POST"
  call_api
end

#generate_transportation_options(inbound_plan_id, body) ⇒ Object



165
166
167
168
169
170
# File 'lib/muffin_man/fulfillment_inbound/v20240320.rb', line 165

def generate_transportation_options(inbound_plan_id, body)
  @local_var_path = "#{INBOUND_PATH}/inboundPlans/#{inbound_plan_id}/transportationOptions"
  @request_body = body
  @request_type = "POST"
  call_api
end

#get_inbound_operation_status(operation_id) ⇒ Object



115
116
117
118
119
# File 'lib/muffin_man/fulfillment_inbound/v20240320.rb', line 115

def get_inbound_operation_status(operation_id)
  @local_var_path = "#{INBOUND_PATH}/operations/#{operation_id}"
  @request_type = "GET"
  call_api
end

#get_inbound_plan(inbound_plan_id) ⇒ Object



29
30
31
32
33
# File 'lib/muffin_man/fulfillment_inbound/v20240320.rb', line 29

def get_inbound_plan(inbound_plan_id)
  @local_var_path = "#{INBOUND_PATH}/inboundPlans/#{inbound_plan_id}"
  @request_type = "GET"
  call_api
end

#get_self_ship_appointment_slots(inbound_plan_id, shipment_id, page_size: nil, pagination_token: nil) ⇒ Object



130
131
132
133
134
135
136
137
# File 'lib/muffin_man/fulfillment_inbound/v20240320.rb', line 130

def get_self_ship_appointment_slots(inbound_plan_id, shipment_id, page_size: nil, pagination_token: nil)
  @local_var_path = "#{INBOUND_PATH}/inboundPlans/#{inbound_plan_id}/shipments/#{shipment_id}/selfShipAppointmentSlots" # rubocop:disable Layout/LineLength
  @query_params = {}
  @query_params["pageSize"] = page_size if page_size
  @query_params["paginationToken"] = pagination_token if pagination_token
  @request_type = "GET"
  call_api
end

#get_shipment(inbound_plan_id, shipment_id) ⇒ Object



35
36
37
38
39
# File 'lib/muffin_man/fulfillment_inbound/v20240320.rb', line 35

def get_shipment(inbound_plan_id, shipment_id)
  @local_var_path = "#{INBOUND_PATH}/inboundPlans/#{inbound_plan_id}/shipments/#{shipment_id}"
  @request_type = "GET"
  call_api
end

#list_inbound_plan_items(inbound_plan_id, page_size: nil, pagination_token: nil) ⇒ Object



20
21
22
23
24
25
26
27
# File 'lib/muffin_man/fulfillment_inbound/v20240320.rb', line 20

def list_inbound_plan_items(inbound_plan_id, page_size: nil, pagination_token: nil)
  @local_var_path = "#{INBOUND_PATH}/inboundPlans/#{inbound_plan_id}/items"
  @query_params = {}
  @query_params["pageSize"] = page_size if page_size
  @query_params["paginationToken"] = pagination_token if pagination_token
  @request_type = "GET"
  call_api
end

#list_inbound_plans(page_size: nil, pagination_token: nil, status: nil, sort_by: nil, sort_order: nil) ⇒ Object



8
9
10
11
12
13
14
15
16
17
18
# File 'lib/muffin_man/fulfillment_inbound/v20240320.rb', line 8

def list_inbound_plans(page_size: nil, pagination_token: nil, status: nil, sort_by: nil, sort_order: nil)
  @local_var_path = "#{INBOUND_PATH}/inboundPlans"
  @query_params = {}
  @query_params["pageSize"] = page_size if page_size
  @query_params["paginationToken"] = pagination_token if pagination_token
  @query_params["status"] = status if status
  @query_params["sortBy"] = sort_by if sort_by
  @query_params["sortOrder"] = sort_order if sort_order
  @request_type = "GET"
  call_api
end

#list_item_compliance_details(mskus, marketplace_id) ⇒ Object



179
180
181
182
183
184
185
186
# File 'lib/muffin_man/fulfillment_inbound/v20240320.rb', line 179

def list_item_compliance_details(mskus, marketplace_id)
  @local_var_path = "#{INBOUND_PATH}/items/compliance"
  @query_params = {}
  @query_params["mskus"] = mskus
  @query_params["marketplaceId"] = marketplace_id
  @request_type = "GET"
  call_api
end

#list_packing_group_items(inbound_plan_id, packing_group_id, page_size: nil, pagination_token: nil) ⇒ Object



78
79
80
81
82
83
84
85
# File 'lib/muffin_man/fulfillment_inbound/v20240320.rb', line 78

def list_packing_group_items(inbound_plan_id, packing_group_id, page_size: nil, pagination_token: nil)
  @local_var_path = "#{INBOUND_PATH}/inboundPlans/#{inbound_plan_id}/packingGroups/#{packing_group_id}/items"
  @query_params = {}
  @query_params["pageSize"] = page_size if page_size
  @query_params["paginationToken"] = pagination_token if pagination_token
  @request_type = "GET"
  call_api
end

#list_packing_options(inbound_plan_id, page_size: nil, pagination_token: nil) ⇒ Object



69
70
71
72
73
74
75
76
# File 'lib/muffin_man/fulfillment_inbound/v20240320.rb', line 69

def list_packing_options(inbound_plan_id, page_size: nil, pagination_token: nil)
  @local_var_path = "#{INBOUND_PATH}/inboundPlans/#{inbound_plan_id}/packingOptions"
  @query_params = {}
  @query_params["pageSize"] = page_size if page_size
  @query_params["paginationToken"] = pagination_token if pagination_token
  @request_type = "GET"
  call_api
end

#list_placement_options(inbound_plan_id, page_size: nil, pagination_token: nil) ⇒ Object



106
107
108
109
110
111
112
113
# File 'lib/muffin_man/fulfillment_inbound/v20240320.rb', line 106

def list_placement_options(inbound_plan_id, page_size: nil, pagination_token: nil)
  @local_var_path = "#{INBOUND_PATH}/inboundPlans/#{inbound_plan_id}/placementOptions"
  @query_params = {}
  @query_params["pageSize"] = page_size if page_size
  @query_params["paginationToken"] = pagination_token if pagination_token
  @request_type = "GET"
  call_api
end

#list_prep_details(marketplace_id, mskus) ⇒ Object



204
205
206
207
208
209
210
211
# File 'lib/muffin_man/fulfillment_inbound/v20240320.rb', line 204

def list_prep_details(marketplace_id, mskus)
  @local_var_path = "#{INBOUND_PATH}/items/prepDetails"
  @query_params = {}
  @query_params["marketplaceId"] = marketplace_id
  @query_params["mskus"] = mskus
  @request_type = "GET"
  call_api
end

#list_shipment_boxes(inbound_plan_id, shipment_id, page_size: nil, pagination_token: nil) ⇒ Object



41
42
43
44
45
46
47
48
# File 'lib/muffin_man/fulfillment_inbound/v20240320.rb', line 41

def list_shipment_boxes(inbound_plan_id, shipment_id, page_size: nil, pagination_token: nil)
  @local_var_path = "#{INBOUND_PATH}/inboundPlans/#{inbound_plan_id}/shipments/#{shipment_id}/boxes"
  @query_params = {}
  @query_params["pageSize"] = page_size if page_size
  @query_params["paginationToken"] = pagination_token if pagination_token
  @request_type = "GET"
  call_api
end

#list_shipment_pallets(inbound_plan_id, shipment_id, page_size: nil, pagination_token: nil) ⇒ Object



121
122
123
124
125
126
127
128
# File 'lib/muffin_man/fulfillment_inbound/v20240320.rb', line 121

def list_shipment_pallets(inbound_plan_id, shipment_id, page_size: nil, pagination_token: nil)
  @local_var_path = "#{INBOUND_PATH}/inboundPlans/#{inbound_plan_id}/shipments/#{shipment_id}/pallets"
  @query_params = {}
  @query_params["pageSize"] = page_size if page_size
  @query_params["paginationToken"] = pagination_token if pagination_token
  @request_type = "GET"
  call_api
end

#list_transportation_options(inbound_plan_id, page_size: nil, pagination_token: nil, placement_option_id: nil, shipment_id: nil) ⇒ Object



153
154
155
156
157
158
159
160
161
162
163
# File 'lib/muffin_man/fulfillment_inbound/v20240320.rb', line 153

def list_transportation_options(inbound_plan_id, page_size: nil, pagination_token: nil, placement_option_id: nil,
                                shipment_id: nil)
  @local_var_path = "#{INBOUND_PATH}/inboundPlans/#{inbound_plan_id}/transportationOptions"
  @query_params = {}
  @query_params["pageSize"] = page_size if page_size
  @query_params["paginationToken"] = pagination_token if pagination_token
  @query_params["placementOptionId"] = placement_option_id if placement_option_id
  @query_params["shipmentId"] = shipment_id if shipment_id
  @request_type = "GET"
  call_api
end

#schedule_self_ship_appointment(inbound_plan_id, shipment_id, slot_id, body) ⇒ Object



146
147
148
149
150
151
# File 'lib/muffin_man/fulfillment_inbound/v20240320.rb', line 146

def schedule_self_ship_appointment(inbound_plan_id, shipment_id, slot_id, body)
  @local_var_path = "#{INBOUND_PATH}/inboundPlans/#{inbound_plan_id}/shipments/#{shipment_id}/selfShipAppointmentSlots/#{slot_id}/schedule" # rubocop:disable Layout/LineLength
  @request_body = body
  @request_type = "POST"
  call_api
end

#set_packing_information(inbound_plan_id, body) ⇒ Object



93
94
95
96
97
98
# File 'lib/muffin_man/fulfillment_inbound/v20240320.rb', line 93

def set_packing_information(inbound_plan_id, body)
  @local_var_path = "#{INBOUND_PATH}/inboundPlans/#{inbound_plan_id}/packingInformation"
  @request_body = body
  @request_type = "POST"
  call_api
end

#set_prep_details(body) ⇒ Object

rubocop:disable Naming/AccessorMethodName



213
214
215
216
217
218
# File 'lib/muffin_man/fulfillment_inbound/v20240320.rb', line 213

def set_prep_details(body) # rubocop:disable Naming/AccessorMethodName
  @local_var_path = "#{INBOUND_PATH}/items/prepDetails"
  @request_body = body
  @request_type = "POST"
  call_api
end

#update_item_compliance_details(marketplace_id, body) ⇒ Object



188
189
190
191
192
193
194
195
# File 'lib/muffin_man/fulfillment_inbound/v20240320.rb', line 188

def update_item_compliance_details(marketplace_id, body)
  @local_var_path = "#{INBOUND_PATH}/items/compliance"
  @query_params = {}
  @query_params["marketplaceId"] = marketplace_id
  @request_body = body
  @request_type = "PUT"
  call_api
end