Class: WalmartApIs::FeesApi

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

Overview

FeesApi

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

#get_my_fees_estimate_for_asin(asin, body) ⇒ ApiResponse

TODO: type endpoint description here Identification Number (ASIN) of the item.

Parameters:

  • asin (String)

    Required parameter: The SP-API Standard

  • body (Object)

    Required parameter: TODO: type description here

Returns:

  • (ApiResponse)

    Complete http response with raw body and status code.



49
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
78
79
80
81
82
83
# File 'lib/walmart_ap_is/apis/fees_api.rb', line 49

def get_my_fees_estimate_for_asin(asin,
                                  body)
  @api_call
    .request(new_request_builder(HttpMethodEnum::POST,
                                 '/products/fees/v4/items/{Asin}/feesEstimate',
                                 Server::DEFAULT1)
               .template_param(new_parameter(asin, key: 'Asin')
                                .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(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_my_fees_estimate_for_sku(seller_sku, body) ⇒ ApiResponse

TODO: type endpoint description here the given marketplace. SellerSKU is qualified by the seller's SellerId, which is included wi

Parameters:

  • seller_sku (String)

    Required parameter: Used to identify an item in

  • body (Object)

    Required parameter: TODO: type description here

Returns:

  • (ApiResponse)

    Complete http response with raw body and status code.



91
92
93
94
95
96
97
98
99
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
# File 'lib/walmart_ap_is/apis/fees_api.rb', line 91

def get_my_fees_estimate_for_sku(seller_sku,
                                 body)
  @api_call
    .request(new_request_builder(HttpMethodEnum::POST,
                                 '/products/fees/v4/listings/{SellerSKU}/feesEstimate',
                                 Server::DEFAULT1)
               .template_param(new_parameter(seller_sku, key: 'SellerSKU')
                                .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(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_my_fees_estimates(body) ⇒ ApiResponse

TODO: type endpoint description here

Parameters:

  • body (Object)

    Required parameter: TODO: type description here

Returns:

  • (ApiResponse)

    Complete http response with raw body and status code.



12
13
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/fees_api.rb', line 12

def get_my_fees_estimates(body)
  @api_call
    .request(new_request_builder(HttpMethodEnum::POST,
                                 '/products/fees/v4/feesEstimate',
                                 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(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