Class: WalmartApIs::MessagingApi

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

Overview

MessagingApi

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

#confirm_customization_details(sp_api_order_id, marketplace_ids, body) ⇒ ApiResponse

TODO: type endpoint description here identifier. This identifies the order for which a message is sent. identifier. This identifies the marketplace in which the order was placed. You can only specify one market

Parameters:

  • sp_api_order_id (String)

    Required parameter: A marketplace order

  • marketplace_ids (Array[String])

    Required parameter: A marketplace

  • body (Object)

    Required parameter: TODO: type description here

Returns:

  • (ApiResponse)

    Complete http response with raw body and status code.



100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
# File 'lib/walmart_ap_is/apis/messaging_api.rb', line 100

def confirm_customization_details(sp_api_order_id,
                                  marketplace_ids,
                                  body)
  @api_call
    .request(new_request_builder(HttpMethodEnum::POST,
                                 '/messaging/v4/orders/{sp-apiOrderId}/messages/confirmCustomizationDetails',
                                 Server::DEFAULT1)
               .template_param(new_parameter(sp_api_order_id, key: 'sp-apiOrderId')
                                .is_required(true)
                                .should_encode(true))
               .query_param(new_parameter(marketplace_ids, key: 'marketplaceIds')
                             .is_required(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(APIHelper.method(:json_serialize))
               .auth(Single.new('walletAuth')))
    .response(new_response_handler
                .deserializer(APIHelper.method(:json_deserialize))
                .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_confirm_delivery_details(sp_api_order_id, marketplace_ids, body) ⇒ ApiResponse

TODO: type endpoint description here identifier. This identifies the order for which a message is sent. identifier. This identifies the marketplace in which the order was placed. You can only specify one market

Parameters:

  • sp_api_order_id (String)

    Required parameter: A marketplace order

  • marketplace_ids (Array[String])

    Required parameter: A marketplace

  • body (Object)

    Required parameter: TODO: type description here

Returns:

  • (ApiResponse)

    Complete http response with raw body and status code.



147
148
149
150
151
152
153
154
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
# File 'lib/walmart_ap_is/apis/messaging_api.rb', line 147

def create_confirm_delivery_details(sp_api_order_id,
                                    marketplace_ids,
                                    body)
  @api_call
    .request(new_request_builder(HttpMethodEnum::POST,
                                 '/messaging/v4/orders/{sp-apiOrderId}/messages/confirmDeliveryDetails',
                                 Server::DEFAULT1)
               .template_param(new_parameter(sp_api_order_id, key: 'sp-apiOrderId')
                                .is_required(true)
                                .should_encode(true))
               .query_param(new_parameter(marketplace_ids, key: 'marketplaceIds')
                             .is_required(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(APIHelper.method(:json_serialize))
               .auth(Single.new('walletAuth')))
    .response(new_response_handler
                .deserializer(APIHelper.method(:json_deserialize))
                .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_confirm_order_details(sp_api_order_id, marketplace_ids, body) ⇒ ApiResponse

TODO: type endpoint description here identifier. This identifies the order for which a message is sent. identifier. This identifies the marketplace in which the order was placed. You can only specify one market

Parameters:

  • sp_api_order_id (String)

    Required parameter: A marketplace order

  • marketplace_ids (Array[String])

    Required parameter: A marketplace

  • body (Object)

    Required parameter: TODO: type description here

Returns:

  • (ApiResponse)

    Complete http response with raw body and status code.



194
195
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
227
228
229
230
231
# File 'lib/walmart_ap_is/apis/messaging_api.rb', line 194

def create_confirm_order_details(sp_api_order_id,
                                 marketplace_ids,
                                 body)
  @api_call
    .request(new_request_builder(HttpMethodEnum::POST,
                                 '/messaging/v4/orders/{sp-apiOrderId}/messages/confirmOrderDetails',
                                 Server::DEFAULT1)
               .template_param(new_parameter(sp_api_order_id, key: 'sp-apiOrderId')
                                .is_required(true)
                                .should_encode(true))
               .query_param(new_parameter(marketplace_ids, key: 'marketplaceIds')
                             .is_required(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(APIHelper.method(:json_serialize))
               .auth(Single.new('walletAuth')))
    .response(new_response_handler
                .deserializer(APIHelper.method(:json_deserialize))
                .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_confirm_service_details(sp_api_order_id, marketplace_ids, body) ⇒ ApiResponse

TODO: type endpoint description here identifier. This identifies the order for which a message is sent. identifier. This identifies the marketplace in which the order was placed. You can only specify one market

Parameters:

  • sp_api_order_id (String)

    Required parameter: A marketplace order

  • marketplace_ids (Array[String])

    Required parameter: A marketplace

  • body (Object)

    Required parameter: TODO: type description here

Returns:

  • (ApiResponse)

    Complete http response with raw body and status code.



241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
# File 'lib/walmart_ap_is/apis/messaging_api.rb', line 241

def create_confirm_service_details(sp_api_order_id,
                                   marketplace_ids,
                                   body)
  @api_call
    .request(new_request_builder(HttpMethodEnum::POST,
                                 '/messaging/v4/orders/{sp-apiOrderId}/messages/confirmServiceDetails',
                                 Server::DEFAULT1)
               .template_param(new_parameter(sp_api_order_id, key: 'sp-apiOrderId')
                                .is_required(true)
                                .should_encode(true))
               .query_param(new_parameter(marketplace_ids, key: 'marketplaceIds')
                             .is_required(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(APIHelper.method(:json_serialize))
               .auth(Single.new('walletAuth')))
    .response(new_response_handler
                .deserializer(APIHelper.method(:json_deserialize))
                .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_digital_access_key(sp_api_order_id, marketplace_ids, body) ⇒ ApiResponse

TODO: type endpoint description here identifier. This identifies the order for which a message is sent. identifier. This identifies the marketplace in which the order was placed. You can only specify one market

Parameters:

  • sp_api_order_id (String)

    Required parameter: A marketplace order

  • marketplace_ids (Array[String])

    Required parameter: A marketplace

  • body (Object)

    Required parameter: TODO: type description here

Returns:

  • (ApiResponse)

    Complete http response with raw body and status code.



288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
# File 'lib/walmart_ap_is/apis/messaging_api.rb', line 288

def create_digital_access_key(sp_api_order_id,
                              marketplace_ids,
                              body)
  @api_call
    .request(new_request_builder(HttpMethodEnum::POST,
                                 '/messaging/v4/orders/{sp-apiOrderId}/messages/digitalAccessKey',
                                 Server::DEFAULT1)
               .template_param(new_parameter(sp_api_order_id, key: 'sp-apiOrderId')
                                .is_required(true)
                                .should_encode(true))
               .query_param(new_parameter(marketplace_ids, key: 'marketplaceIds')
                             .is_required(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(APIHelper.method(:json_serialize))
               .auth(Single.new('walletAuth')))
    .response(new_response_handler
                .deserializer(APIHelper.method(:json_deserialize))
                .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

TODO: type endpoint description here identifier. This identifies the order for which a message is sent. identifier. This identifies the marketplace in which the order was placed. You can only specify one market

Parameters:

  • sp_api_order_id (String)

    Required parameter: A marketplace order

  • marketplace_ids (Array[String])

    Required parameter: A marketplace

  • body (Object)

    Required parameter: TODO: type description here

Returns:

  • (ApiResponse)

    Complete http response with raw body and status code.



382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
# File 'lib/walmart_ap_is/apis/messaging_api.rb', line 382

def create_legal_disclosure(sp_api_order_id,
                            marketplace_ids,
                            body)
  @api_call
    .request(new_request_builder(HttpMethodEnum::POST,
                                 '/messaging/v4/orders/{sp-apiOrderId}/messages/legalDisclosure',
                                 Server::DEFAULT1)
               .template_param(new_parameter(sp_api_order_id, key: 'sp-apiOrderId')
                                .is_required(true)
                                .should_encode(true))
               .query_param(new_parameter(marketplace_ids, key: 'marketplaceIds')
                             .is_required(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(APIHelper.method(:json_serialize))
               .auth(Single.new('walletAuth')))
    .response(new_response_handler
                .deserializer(APIHelper.method(:json_deserialize))
                .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_unexpected_problem(sp_api_order_id, marketplace_ids, body) ⇒ ApiResponse

TODO: type endpoint description here identifier. This identifies the order for which a message is sent. identifier. This identifies the marketplace in which the order was placed. You can only specify one market

Parameters:

  • sp_api_order_id (String)

    Required parameter: A marketplace order

  • marketplace_ids (Array[String])

    Required parameter: A marketplace

  • body (Object)

    Required parameter: TODO: type description here

Returns:

  • (ApiResponse)

    Complete http response with raw body and status code.



429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
# File 'lib/walmart_ap_is/apis/messaging_api.rb', line 429

def create_unexpected_problem(sp_api_order_id,
                              marketplace_ids,
                              body)
  @api_call
    .request(new_request_builder(HttpMethodEnum::POST,
                                 '/messaging/v4/orders/{sp-apiOrderId}/messages/unexpectedProblem',
                                 Server::DEFAULT1)
               .template_param(new_parameter(sp_api_order_id, key: 'sp-apiOrderId')
                                .is_required(true)
                                .should_encode(true))
               .query_param(new_parameter(marketplace_ids, key: 'marketplaceIds')
                             .is_required(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(APIHelper.method(:json_serialize))
               .auth(Single.new('walletAuth')))
    .response(new_response_handler
                .deserializer(APIHelper.method(:json_deserialize))
                .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_warranty(sp_api_order_id, marketplace_ids, body) ⇒ ApiResponse

TODO: type endpoint description here identifier. This identifies the order for which a message is sent. identifier. This identifies the marketplace in which the order was placed. You can only specify one market

Parameters:

  • sp_api_order_id (String)

    Required parameter: A marketplace order

  • marketplace_ids (Array[String])

    Required parameter: A marketplace

  • body (Object)

    Required parameter: TODO: type description here

Returns:

  • (ApiResponse)

    Complete http response with raw body and status code.



476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
# File 'lib/walmart_ap_is/apis/messaging_api.rb', line 476

def create_warranty(sp_api_order_id,
                    marketplace_ids,
                    body)
  @api_call
    .request(new_request_builder(HttpMethodEnum::POST,
                                 '/messaging/v4/orders/{sp-apiOrderId}/messages/warranty',
                                 Server::DEFAULT1)
               .template_param(new_parameter(sp_api_order_id, key: 'sp-apiOrderId')
                                .is_required(true)
                                .should_encode(true))
               .query_param(new_parameter(marketplace_ids, key: 'marketplaceIds')
                             .is_required(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(APIHelper.method(:json_serialize))
               .auth(Single.new('walletAuth')))
    .response(new_response_handler
                .deserializer(APIHelper.method(:json_deserialize))
                .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_attributes(sp_api_order_id, marketplace_ids) ⇒ ApiResponse

TODO: type endpoint description here identifier. This identifies the order for which a message is sent. identifier. This identifies the marketplace in which the order was placed. You can only specify one market

Parameters:

  • sp_api_order_id (String)

    Required parameter: A marketplace order

  • marketplace_ids (Array[String])

    Required parameter: A marketplace

Returns:

  • (ApiResponse)

    Complete http response with raw body and status code.



58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
# File 'lib/walmart_ap_is/apis/messaging_api.rb', line 58

def get_attributes(sp_api_order_id,
                   marketplace_ids)
  @api_call
    .request(new_request_builder(HttpMethodEnum::GET,
                                 '/messaging/v4/orders/{sp-apiOrderId}/attributes',
                                 Server::DEFAULT1)
               .template_param(new_parameter(sp_api_order_id, key: 'sp-apiOrderId')
                                .is_required(true)
                                .should_encode(true))
               .query_param(new_parameter(marketplace_ids, key: 'marketplaceIds')
                             .is_required(true))
               .header_param(new_parameter('application/json', key: 'accept'))
               .auth(Single.new('walletAuth')))
    .response(new_response_handler
                .deserializer(APIHelper.method(:json_deserialize))
                .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_messaging_actions_for_order(sp_api_order_id, marketplace_ids) ⇒ ApiResponse

TODO: type endpoint description here identifier. This specifies the order for which you want a list of available message types. identifier. This identifies the marketplace in which the order was placed. You can only specify one market

Parameters:

  • sp_api_order_id (String)

    Required parameter: A marketplace order

  • marketplace_ids (Array[String])

    Required parameter: A marketplace

Returns:

  • (ApiResponse)

    Complete http response with raw body and status code.



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
43
44
45
46
47
48
49
# File 'lib/walmart_ap_is/apis/messaging_api.rb', line 17

def get_messaging_actions_for_order(sp_api_order_id,
                                    marketplace_ids)
  @api_call
    .request(new_request_builder(HttpMethodEnum::GET,
                                 '/messaging/v4/orders/{sp-apiOrderId}',
                                 Server::DEFAULT1)
               .template_param(new_parameter(sp_api_order_id, key: 'sp-apiOrderId')
                                .is_required(true)
                                .should_encode(true))
               .query_param(new_parameter(marketplace_ids, key: 'marketplaceIds')
                             .is_required(true))
               .header_param(new_parameter('application/json', key: 'accept'))
               .auth(Single.new('walletAuth')))
    .response(new_response_handler
                .deserializer(APIHelper.method(:json_deserialize))
                .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

#send_invoice(sp_api_order_id, marketplace_ids, body) ⇒ ApiResponse

TODO: type endpoint description here identifier. This identifies the order for which a message is sent. identifier. This identifies the marketplace in which the order was placed. You can only specify one market

Parameters:

  • sp_api_order_id (String)

    Required parameter: A marketplace order

  • marketplace_ids (Array[String])

    Required parameter: A marketplace

  • body (Object)

    Required parameter: TODO: type description here

Returns:

  • (ApiResponse)

    Complete http response with raw body and status code.



335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
# File 'lib/walmart_ap_is/apis/messaging_api.rb', line 335

def send_invoice(sp_api_order_id,
                 marketplace_ids,
                 body)
  @api_call
    .request(new_request_builder(HttpMethodEnum::POST,
                                 '/messaging/v4/orders/{sp-apiOrderId}/messages/invoice',
                                 Server::DEFAULT1)
               .template_param(new_parameter(sp_api_order_id, key: 'sp-apiOrderId')
                                .is_required(true)
                                .should_encode(true))
               .query_param(new_parameter(marketplace_ids, key: 'marketplaceIds')
                             .is_required(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(APIHelper.method(:json_serialize))
               .auth(Single.new('walletAuth')))
    .response(new_response_handler
                .deserializer(APIHelper.method(:json_deserialize))
                .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