Class: WalmartApIs::FulfillmentOutboundApi

Inherits:
BaseApi
  • Object
show all
Defined in:
lib/walmart_ap_is/apis/fulfillment_outbound_api.rb

Overview

FulfillmentOutboundApi

Constant Summary

Constants inherited from BaseApi

BaseApi::GLOBAL_ERRORS

Instance Attribute Summary

Attributes inherited from BaseApi

#config, #http_call_back

Instance Method Summary collapse

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

#cancel_fulfillment_order(seller_fulfillment_order_id) ⇒ ApiResponse

TODO: type endpoint description here description here

Parameters:

  • seller_fulfillment_order_id (String)

    Required parameter: TODO: type

Returns:

  • (ApiResponse)

    Complete http response with raw body and status code.



196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
# File 'lib/walmart_ap_is/apis/fulfillment_outbound_api.rb', line 196

def cancel_fulfillment_order(seller_fulfillment_order_id)
  @api_call
    .request(new_request_builder(HttpMethodEnum::PUT,
                                 '/wfs/outbound/v4/fulfillmentOrders/{sellerFulfillmentOrderId}/cancel',
                                 Server::DEFAULT1)
               .template_param(new_parameter(seller_fulfillment_order_id, key: 'sellerFulfillmentOrderId')
                                .is_required(true)
                                .should_encode(true))
               .header_param(new_parameter('application/json', key: 'accept'))
               .auth(Single.new('walletAuth')))
    .response(new_response_handler
                .deserializer(APIHelper.method(:custom_type_deserializer))
                .deserialize_into(CancelFulfillmentOrderResponse.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

#create_fulfillment_order(body) ⇒ ApiResponse

TODO: type endpoint description here description here

Parameters:

Returns:

  • (ApiResponse)

    Complete http response with raw body and status code.



83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
# File 'lib/walmart_ap_is/apis/fulfillment_outbound_api.rb', line 83

def create_fulfillment_order(body)
  @api_call
    .request(new_request_builder(HttpMethodEnum::POST,
                                 '/wfs/outbound/v4/fulfillmentOrders',
                                 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(CreateFulfillmentOrderResponse.method(:from_hash))
                .is_api_response(true)
                .local_error('400',
                             'Bad Request',
                             ErrorListErrorException)
                .local_error('403',
                             'Forbidden',
                             ErrorListErrorException)
                .local_error('429',
                             'Rate limit exceeded',
                             ErrorListErrorException)
                .local_error('500',
                             'Internal Server Error',
                             ErrorListErrorException))
    .execute
end

#get_fulfillment_order(seller_fulfillment_order_id) ⇒ ApiResponse

TODO: type endpoint description here description here

Parameters:

  • seller_fulfillment_order_id (String)

    Required parameter: TODO: type

Returns:

  • (ApiResponse)

    Complete http response with raw body and status code.



117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
# File 'lib/walmart_ap_is/apis/fulfillment_outbound_api.rb', line 117

def get_fulfillment_order(seller_fulfillment_order_id)
  @api_call
    .request(new_request_builder(HttpMethodEnum::GET,
                                 '/wfs/outbound/v4/fulfillmentOrders/{sellerFulfillmentOrderId}',
                                 Server::DEFAULT1)
               .template_param(new_parameter(seller_fulfillment_order_id, key: 'sellerFulfillmentOrderId')
                                .is_required(true)
                                .should_encode(true))
               .header_param(new_parameter('application/json', key: 'accept'))
               .auth(Single.new('walletAuth')))
    .response(new_response_handler
                .deserializer(APIHelper.method(:custom_type_deserializer))
                .deserialize_into(GetFulfillmentOrderResponse.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_fulfillment_order_shipments(seller_fulfillment_order_id) ⇒ ApiResponse

TODO: type endpoint description here description here

Parameters:

  • seller_fulfillment_order_id (String)

    Required parameter: TODO: type

Returns:

  • (ApiResponse)

    Complete http response with raw body and status code.



232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
# File 'lib/walmart_ap_is/apis/fulfillment_outbound_api.rb', line 232

def get_fulfillment_order_shipments(seller_fulfillment_order_id)
  @api_call
    .request(new_request_builder(HttpMethodEnum::GET,
                                 '/wfs/outbound/v4/fulfillmentOrders/{sellerFulfillmentOrderId}/shipments',
                                 Server::DEFAULT1)
               .template_param(new_parameter(seller_fulfillment_order_id, key: 'sellerFulfillmentOrderId')
                                .is_required(true)
                                .should_encode(true))
               .header_param(new_parameter('application/json', key: 'accept'))
               .auth(Single.new('walletAuth')))
    .response(new_response_handler
                .deserializer(APIHelper.method(:custom_type_deserializer))
                .deserialize_into(GetFulfillmentOrderShipmentsResponse.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_fulfillment_preview(body) ⇒ ApiResponse

Returns estimated delivery dates, shipping costs, and available ship nodes for a prospective fulfillment order. Use before creating the order. description here

Parameters:

Returns:

  • (ApiResponse)

    Complete http response with raw body and status code.



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
# File 'lib/walmart_ap_is/apis/fulfillment_outbound_api.rb', line 14

def get_fulfillment_preview(body)
  @api_call
    .request(new_request_builder(HttpMethodEnum::POST,
                                 '/wfs/outbound/v4/fulfillmentOrders/preview',
                                 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(GetFulfillmentPreviewResponse.method(:from_hash))
                .is_api_response(true)
                .local_error('400',
                             'Bad Request',
                             ErrorListErrorException)
                .local_error('403',
                             'Forbidden',
                             ErrorListErrorException)
                .local_error('429',
                             'Rate limit exceeded',
                             ErrorListErrorException)
                .local_error('500',
                             'Internal Server Error',
                             ErrorListErrorException))
    .execute
end

#list_all_fulfillment_orders(query_start_date: nil, next_token: nil) ⇒ ApiResponse

TODO: type endpoint description here description here here

Parameters:

  • query_start_date (DateTime) (defaults to: nil)

    Optional parameter: TODO: type

  • next_token (String) (defaults to: nil)

    Optional parameter: TODO: type description

Returns:

  • (ApiResponse)

    Complete http response with raw body and status code.



50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
# File 'lib/walmart_ap_is/apis/fulfillment_outbound_api.rb', line 50

def list_all_fulfillment_orders(query_start_date: nil,
                                next_token: nil)
  @api_call
    .request(new_request_builder(HttpMethodEnum::GET,
                                 '/wfs/outbound/v4/fulfillmentOrders',
                                 Server::DEFAULT1)
               .query_param(new_parameter(query_start_date, key: 'queryStartDate'))
               .query_param(new_parameter(next_token, key: 'nextToken'))
               .header_param(new_parameter('application/json', key: 'accept'))
               .auth(Single.new('walletAuth')))
    .response(new_response_handler
                .deserializer(APIHelper.method(:custom_type_deserializer))
                .deserialize_into(ListAllFulfillmentOrdersResponse.method(:from_hash))
                .is_api_response(true)
                .local_error('400',
                             'Bad Request',
                             ErrorListErrorException)
                .local_error('403',
                             'Forbidden',
                             ErrorListErrorException)
                .local_error('429',
                             'Rate limit exceeded',
                             ErrorListErrorException)
                .local_error('500',
                             'Internal Server Error',
                             ErrorListErrorException))
    .execute
end

#update_fulfillment_order(seller_fulfillment_order_id, body) ⇒ ApiResponse

TODO: type endpoint description here description here description here

Parameters:

  • seller_fulfillment_order_id (String)

    Required parameter: TODO: type

  • body (UpdateFulfillmentOrderRequest)

    Required parameter: TODO: type

Returns:

  • (ApiResponse)

    Complete http response with raw body and status code.



155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
# File 'lib/walmart_ap_is/apis/fulfillment_outbound_api.rb', line 155

def update_fulfillment_order(seller_fulfillment_order_id,
                             body)
  @api_call
    .request(new_request_builder(HttpMethodEnum::PUT,
                                 '/wfs/outbound/v4/fulfillmentOrders/{sellerFulfillmentOrderId}',
                                 Server::DEFAULT1)
               .template_param(new_parameter(seller_fulfillment_order_id, key: 'sellerFulfillmentOrderId')
                                .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(UpdateFulfillmentOrderResponse.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