walmart-apimatic-sdk 0.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +7 -0
- data/LICENSE +28 -0
- data/README.md +176 -0
- data/bin/console +15 -0
- data/lib/walmart_ap_is/api_helper.rb +10 -0
- data/lib/walmart_ap_is/apis/base_api.rb +67 -0
- data/lib/walmart_ap_is/apis/cppreference_api.rb +60 -0
- data/lib/walmart_ap_is/apis/detail_api.rb +58 -0
- data/lib/walmart_ap_is/apis/feeds_api.rb +79 -0
- data/lib/walmart_ap_is/apis/feeds_feed_type_incentive_enrollment_api.rb +66 -0
- data/lib/walmart_ap_is/apis/feeds_feed_type_price_and_promotion_api.rb +86 -0
- data/lib/walmart_ap_is/apis/feeds_feed_type_walmart_funded_incentives_enrollment_api.rb +75 -0
- data/lib/walmart_ap_is/apis/get_pricing_insights_api.rb +60 -0
- data/lib/walmart_ap_is/apis/incentives_api.rb +93 -0
- data/lib/walmart_ap_is/apis/m_strategy_collection_id_api.rb +118 -0
- data/lib/walmart_ap_is/apis/misc_api.rb +23 -0
- data/lib/walmart_ap_is/apis/price_api.rb +63 -0
- data/lib/walmart_ap_is/apis/repricer_feeds_api.rb +64 -0
- data/lib/walmart_ap_is/apis/strategies_api.rb +56 -0
- data/lib/walmart_ap_is/apis/strategy_api.rb +63 -0
- data/lib/walmart_ap_is/apis/token_api.rb +98 -0
- data/lib/walmart_ap_is/apis/wfpreference_api.rb +68 -0
- data/lib/walmart_ap_is/client.rb +163 -0
- data/lib/walmart_ap_is/configuration.rb +165 -0
- data/lib/walmart_ap_is/exceptions/api_exception.rb +21 -0
- data/lib/walmart_ap_is/http/api_response.rb +19 -0
- data/lib/walmart_ap_is/http/auth/basic_auth.rb +62 -0
- data/lib/walmart_ap_is/http/http_call_back.rb +10 -0
- data/lib/walmart_ap_is/http/http_method_enum.rb +10 -0
- data/lib/walmart_ap_is/http/http_request.rb +10 -0
- data/lib/walmart_ap_is/http/http_response.rb +10 -0
- data/lib/walmart_ap_is/http/proxy_settings.rb +22 -0
- data/lib/walmart_ap_is/logging/configuration/api_logging_configuration.rb +186 -0
- data/lib/walmart_ap_is/logging/sdk_logger.rb +17 -0
- data/lib/walmart_ap_is/models/assign_unassign_items_to_from_repricer_strategy_request.rb +92 -0
- data/lib/walmart_ap_is/models/base_model.rb +110 -0
- data/lib/walmart_ap_is/models/client_credentials_res.rb +82 -0
- data/lib/walmart_ap_is/models/create_repricer_strategy_request.rb +149 -0
- data/lib/walmart_ap_is/models/current_price.rb +82 -0
- data/lib/walmart_ap_is/models/filter.rb +90 -0
- data/lib/walmart_ap_is/models/get_pricing_insights_request.rb +109 -0
- data/lib/walmart_ap_is/models/incentives_enrollment.rb +95 -0
- data/lib/walmart_ap_is/models/item.rb +239 -0
- data/lib/walmart_ap_is/models/item1.rb +73 -0
- data/lib/walmart_ap_is/models/item_feed_header.rb +119 -0
- data/lib/walmart_ap_is/models/item_identifiers.rb +72 -0
- data/lib/walmart_ap_is/models/item_price_response.rb +90 -0
- data/lib/walmart_ap_is/models/json1.rb +73 -0
- data/lib/walmart_ap_is/models/mp_item.rb +74 -0
- data/lib/walmart_ap_is/models/mp_item_feed_header.rb +91 -0
- data/lib/walmart_ap_is/models/page_context.rb +102 -0
- data/lib/walmart_ap_is/models/pricing.rb +84 -0
- data/lib/walmart_ap_is/models/pricing_insights_response_list.rb +328 -0
- data/lib/walmart_ap_is/models/program_action.rb +83 -0
- data/lib/walmart_ap_is/models/program_action1.rb +83 -0
- data/lib/walmart_ap_is/models/program_action_feed_header.rb +147 -0
- data/lib/walmart_ap_is/models/programs.rb +80 -0
- data/lib/walmart_ap_is/models/programs1.rb +75 -0
- data/lib/walmart_ap_is/models/promo_discount.rb +90 -0
- data/lib/walmart_ap_is/models/refresh_token_res.rb +82 -0
- data/lib/walmart_ap_is/models/scopes.rb +142 -0
- data/lib/walmart_ap_is/models/search_criteria.rb +82 -0
- data/lib/walmart_ap_is/models/set_up_cap_sku_all_legacy_request.rb +85 -0
- data/lib/walmart_ap_is/models/sort.rb +82 -0
- data/lib/walmart_ap_is/models/status_info.rb +85 -0
- data/lib/walmart_ap_is/models/strategy.rb +94 -0
- data/lib/walmart_ap_is/models/strategy5.rb +106 -0
- data/lib/walmart_ap_is/models/strategy_collection.rb +169 -0
- data/lib/walmart_ap_is/models/successful_operation.rb +159 -0
- data/lib/walmart_ap_is/models/successful_operation1.rb +73 -0
- data/lib/walmart_ap_is/models/successful_operation11.rb +82 -0
- data/lib/walmart_ap_is/models/successful_operation12.rb +82 -0
- data/lib/walmart_ap_is/models/successful_operation2.rb +100 -0
- data/lib/walmart_ap_is/models/successful_operation3.rb +92 -0
- data/lib/walmart_ap_is/models/successful_operation4.rb +84 -0
- data/lib/walmart_ap_is/models/successful_operation5.rb +91 -0
- data/lib/walmart_ap_is/models/successful_operation6.rb +93 -0
- data/lib/walmart_ap_is/models/successful_operation7.rb +75 -0
- data/lib/walmart_ap_is/models/successful_operation8.rb +73 -0
- data/lib/walmart_ap_is/models/token_api_authorization_code.rb +122 -0
- data/lib/walmart_ap_is/models/token_api_client_credentials.rb +122 -0
- data/lib/walmart_ap_is/models/token_api_refresh_token.rb +122 -0
- data/lib/walmart_ap_is/models/token_api_res.rb +82 -0
- data/lib/walmart_ap_is/models/update_pricing_for_a_single_item_request.rb +91 -0
- data/lib/walmart_ap_is/models/update_pricing_for_multiple_items_in_bulk_new_request.rb +92 -0
- data/lib/walmart_ap_is/models/update_reduced_referral_fee_incentives_enrollment_request.rb +95 -0
- data/lib/walmart_ap_is/models/update_repricer_strategy_request.rb +149 -0
- data/lib/walmart_ap_is/models/update_walmart_funded_incentives_enrollment_for_specific_items_request.rb +95 -0
- data/lib/walmart_ap_is/models/value.rb +91 -0
- data/lib/walmart_ap_is/models/value1.rb +101 -0
- data/lib/walmart_ap_is/models/walmart_funded_incentives_enrollment.rb +79 -0
- data/lib/walmart_ap_is/models/xml1.rb +73 -0
- data/lib/walmart_ap_is/utilities/date_time_helper.rb +11 -0
- data/lib/walmart_ap_is/utilities/file_wrapper.rb +28 -0
- data/lib/walmart_ap_is.rb +122 -0
- metadata +179 -0
checksums.yaml
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
---
|
|
2
|
+
SHA256:
|
|
3
|
+
metadata.gz: 030a9f8be10d9c9d71424928e401e9dd77646c5e29f8b0bb204b48be3389e426
|
|
4
|
+
data.tar.gz: aa758f5d251336f59288536aaa5394c82cd42f3fe68e67011390f476ce8c6158
|
|
5
|
+
SHA512:
|
|
6
|
+
metadata.gz: 630983ef7497fa47e01c709d8f2d9fcc410f8d3634ea29d7912bd19d58dcdf11030e61b5e5db632e0e29a645824b3d470eda6ef3ee66cd8308634da7500a5cb8
|
|
7
|
+
data.tar.gz: a32f5745c2f1771c9857587d525958f04ec22bfca3fa09bace880a3ff720f59fe710eb5e19811d0aebe4c4181be815edda751ac25ccf60ea0a549d9b1635ba45
|
data/LICENSE
ADDED
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
License:
|
|
2
|
+
========
|
|
3
|
+
The MIT License (MIT)
|
|
4
|
+
http://opensource.org/licenses/MIT
|
|
5
|
+
|
|
6
|
+
Copyright (c) 2014 - 2026 APIMATIC Limited
|
|
7
|
+
|
|
8
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
9
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
10
|
+
in the Software without restriction, including without limitation the rights
|
|
11
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
12
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
13
|
+
furnished to do so, subject to the following conditions:
|
|
14
|
+
|
|
15
|
+
The above copyright notice and this permission notice shall be included in
|
|
16
|
+
all copies or substantial portions of the Software.
|
|
17
|
+
|
|
18
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
19
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
20
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
21
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
22
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
23
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
24
|
+
THE SOFTWARE.
|
|
25
|
+
|
|
26
|
+
Trade Mark:
|
|
27
|
+
==========
|
|
28
|
+
APIMATIC is a trade mark for APIMATIC Limited
|
data/README.md
ADDED
|
@@ -0,0 +1,176 @@
|
|
|
1
|
+
|
|
2
|
+
# Getting Started with Walmart APIs
|
|
3
|
+
|
|
4
|
+
## Introduction
|
|
5
|
+
|
|
6
|
+
The price is a fundamental building block for your listing on Walmart.com. You can use the price management APIs to set up and manage the price for a given item, The Walmart Marketplace APIs use OAuth for token-based authentication and authorization.
|
|
7
|
+
We also introduced OAuth 2.0 for solution providers to enable new authorizations using authorization code grant type. Sellers can now connect with solution provider apps seamlessly through this new Walmart's OAuth 2.0 user experience. Refer to the [Guide section](https:///doc/us/mp/us-mp-auth2/#606) for comprehensive instructions. Existing seller connections using the previous authorization method will remain operational.
|
|
8
|
+
|
|
9
|
+
## Install the Package
|
|
10
|
+
|
|
11
|
+
Install the gem from the command line:
|
|
12
|
+
|
|
13
|
+
```bash
|
|
14
|
+
gem install walmart-apimatic-sdk -v 0.0.1
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
Or add the gem to your Gemfile and run `bundle`:
|
|
18
|
+
|
|
19
|
+
```ruby
|
|
20
|
+
gem 'walmart-apimatic-sdk', '0.0.1'
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
For additional gem details, see the [RubyGems page for the walmart-apimatic-sdk gem](https://rubygems.org/gems/walmart-apimatic-sdk/versions/0.0.1).
|
|
24
|
+
|
|
25
|
+
## IRB Console Usage
|
|
26
|
+
|
|
27
|
+
You can explore the SDK interactively using IRB in two ways
|
|
28
|
+
|
|
29
|
+
### 1. Use IRB with Installed Gem
|
|
30
|
+
|
|
31
|
+
Open your system terminal (Command Prompt, Git Bash or macOS Terminal) and type the following command to start the irb console.
|
|
32
|
+
|
|
33
|
+
```bash
|
|
34
|
+
irb
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
Now you can load the SDK in the IRB
|
|
38
|
+
|
|
39
|
+
```ruby
|
|
40
|
+
require 'walmart_ap_is'
|
|
41
|
+
include WalmartApIs
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
### 2. Use IRB within SDK
|
|
45
|
+
|
|
46
|
+
Open your system terminal (Command Prompt, Git Bash or macOS Terminal) and navigate to the root folder of SDK.
|
|
47
|
+
|
|
48
|
+
```
|
|
49
|
+
cd path/to/walmart_ap_is
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
Now you can start the preconfigured irb console by running the following command
|
|
53
|
+
|
|
54
|
+
```bash
|
|
55
|
+
ruby bin/console
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
**_Note:_** This automatically loads the SDK from lib/
|
|
59
|
+
|
|
60
|
+
## Initialize the API Client
|
|
61
|
+
|
|
62
|
+
**_Note:_** Documentation for the client can be found [here.](https://www.github.com/sdks-io/walmart-apimatic-ruby-sdk/tree/0.0.1/doc/client.md)
|
|
63
|
+
|
|
64
|
+
The following parameters are configurable for the API Client:
|
|
65
|
+
|
|
66
|
+
| Parameter | Type | Description |
|
|
67
|
+
| --- | --- | --- |
|
|
68
|
+
| environment | [`Environment`](https://www.github.com/sdks-io/walmart-apimatic-ruby-sdk/tree/0.0.1/README.md#environments) | The API environment. <br> **Default: `Environment.PRODUCTION`** |
|
|
69
|
+
| connection | `Faraday::Connection` | The Faraday connection object passed by the SDK user for making requests |
|
|
70
|
+
| adapter | `Faraday::Adapter` | The Faraday adapter object passed by the SDK user for performing http requests |
|
|
71
|
+
| timeout | `Float` | The value to use for connection timeout. <br> **Default: 30** |
|
|
72
|
+
| max_retries | `Integer` | The number of times to retry an endpoint call if it fails. <br> **Default: 0** |
|
|
73
|
+
| retry_interval | `Float` | Pause in seconds between retries. <br> **Default: 1** |
|
|
74
|
+
| backoff_factor | `Float` | The amount to multiply each successive retry's interval amount by in order to provide backoff. <br> **Default: 2** |
|
|
75
|
+
| retry_statuses | `Array` | A list of HTTP statuses to retry. <br> **Default: [408, 413, 429, 500, 502, 503, 504, 521, 522, 524]** |
|
|
76
|
+
| retry_methods | `Array` | A list of HTTP methods to retry. <br> **Default: %i[get put]** |
|
|
77
|
+
| http_callback | `HttpCallBack` | The Http CallBack allows defining callables for pre and post API calls. |
|
|
78
|
+
| proxy_settings | [`ProxySettings`](https://www.github.com/sdks-io/walmart-apimatic-ruby-sdk/tree/0.0.1/doc/proxy-settings.md) | Optional proxy configuration to route HTTP requests through a proxy server. |
|
|
79
|
+
| logging_configuration | [`LoggingConfiguration`](https://www.github.com/sdks-io/walmart-apimatic-ruby-sdk/tree/0.0.1/doc/logging-configuration.md) | The SDK logging configuration for API calls |
|
|
80
|
+
| basic_auth_credentials | [`BasicAuthCredentials`](https://www.github.com/sdks-io/walmart-apimatic-ruby-sdk/tree/0.0.1/doc/auth/basic-authentication.md) | The credential object for Basic Authentication |
|
|
81
|
+
|
|
82
|
+
The API client can be initialized as follows:
|
|
83
|
+
|
|
84
|
+
### Code-Based Client Initialization
|
|
85
|
+
|
|
86
|
+
```ruby
|
|
87
|
+
require 'walmart_ap_is'
|
|
88
|
+
include WalmartApIs
|
|
89
|
+
|
|
90
|
+
client = Client.new(
|
|
91
|
+
basic_auth_credentials: BasicAuthCredentials.new(
|
|
92
|
+
username: 'username',
|
|
93
|
+
password: 'password'
|
|
94
|
+
),
|
|
95
|
+
environment: Environment::PRODUCTION,
|
|
96
|
+
logging_configuration: LoggingConfiguration.new(
|
|
97
|
+
log_level: Logger::INFO,
|
|
98
|
+
request_logging_config: RequestLoggingConfiguration.new(
|
|
99
|
+
log_body: true
|
|
100
|
+
),
|
|
101
|
+
response_logging_config: ResponseLoggingConfiguration.new(
|
|
102
|
+
log_headers: true
|
|
103
|
+
)
|
|
104
|
+
)
|
|
105
|
+
)
|
|
106
|
+
```
|
|
107
|
+
|
|
108
|
+
### Environment-Based Client Initialization
|
|
109
|
+
|
|
110
|
+
```ruby
|
|
111
|
+
require 'walmart_ap_is'
|
|
112
|
+
include WalmartApIs
|
|
113
|
+
|
|
114
|
+
# Create client from environment
|
|
115
|
+
client = Client.from_env
|
|
116
|
+
```
|
|
117
|
+
|
|
118
|
+
See the [`Environment-Based Client Initialization`](https://www.github.com/sdks-io/walmart-apimatic-ruby-sdk/tree/0.0.1/doc/environment-based-client-initialization.md) section for details.
|
|
119
|
+
|
|
120
|
+
## Environments
|
|
121
|
+
|
|
122
|
+
The SDK can be configured to use a different environment for making API calls. Available environments are:
|
|
123
|
+
|
|
124
|
+
### Fields
|
|
125
|
+
|
|
126
|
+
| Name | Description |
|
|
127
|
+
| --- | --- |
|
|
128
|
+
| PRODUCTION | **Default** |
|
|
129
|
+
|
|
130
|
+
## Authorization
|
|
131
|
+
|
|
132
|
+
This API uses the following authentication schemes.
|
|
133
|
+
|
|
134
|
+
* [`basic (Basic Authentication)`](https://www.github.com/sdks-io/walmart-apimatic-ruby-sdk/tree/0.0.1/doc/auth/basic-authentication.md)
|
|
135
|
+
|
|
136
|
+
## List of APIs
|
|
137
|
+
|
|
138
|
+
* [Strategy Collection Id](https://www.github.com/sdks-io/walmart-apimatic-ruby-sdk/tree/0.0.1/doc/controllers/strategy-collection-id.md)
|
|
139
|
+
* [Strategy](https://www.github.com/sdks-io/walmart-apimatic-ruby-sdk/tree/0.0.1/doc/controllers/strategy.md)
|
|
140
|
+
* [Strategies](https://www.github.com/sdks-io/walmart-apimatic-ruby-sdk/tree/0.0.1/doc/controllers/strategies.md)
|
|
141
|
+
* [Wfpreference](https://www.github.com/sdks-io/walmart-apimatic-ruby-sdk/tree/0.0.1/doc/controllers/wfpreference.md)
|
|
142
|
+
* [Incentives](https://www.github.com/sdks-io/walmart-apimatic-ruby-sdk/tree/0.0.1/doc/controllers/incentives.md)
|
|
143
|
+
* [Get Pricing Insights](https://www.github.com/sdks-io/walmart-apimatic-ruby-sdk/tree/0.0.1/doc/controllers/get-pricing-insights.md)
|
|
144
|
+
* [Price](https://www.github.com/sdks-io/walmart-apimatic-ruby-sdk/tree/0.0.1/doc/controllers/price.md)
|
|
145
|
+
* [Repricer Feeds](https://www.github.com/sdks-io/walmart-apimatic-ruby-sdk/tree/0.0.1/doc/controllers/repricer-feeds.md)
|
|
146
|
+
* [Feeds](https://www.github.com/sdks-io/walmart-apimatic-ruby-sdk/tree/0.0.1/doc/controllers/feeds.md)
|
|
147
|
+
* [Feeds ? Feed Type PRICE and PROMOTION](https://www.github.com/sdks-io/walmart-apimatic-ruby-sdk/tree/0.0.1/doc/controllers/feeds-feed-type-price-and-promotion.md)
|
|
148
|
+
* [Feeds ? Feed Type WALMART FUNDED INCENTIVES ENROLLMENT](https://www.github.com/sdks-io/walmart-apimatic-ruby-sdk/tree/0.0.1/doc/controllers/feeds-feed-type-walmart-funded-incentives-enrollment.md)
|
|
149
|
+
* [Feeds ? Feed Type INCENTIVE ENROLLMENT](https://www.github.com/sdks-io/walmart-apimatic-ruby-sdk/tree/0.0.1/doc/controllers/feeds-feed-type-incentive-enrollment.md)
|
|
150
|
+
* [Cppreference](https://www.github.com/sdks-io/walmart-apimatic-ruby-sdk/tree/0.0.1/doc/controllers/cppreference.md)
|
|
151
|
+
* [Detail](https://www.github.com/sdks-io/walmart-apimatic-ruby-sdk/tree/0.0.1/doc/controllers/detail.md)
|
|
152
|
+
* [Token](https://www.github.com/sdks-io/walmart-apimatic-ruby-sdk/tree/0.0.1/doc/controllers/token.md)
|
|
153
|
+
* [Misc](https://www.github.com/sdks-io/walmart-apimatic-ruby-sdk/tree/0.0.1/doc/controllers/misc.md)
|
|
154
|
+
|
|
155
|
+
## SDK Infrastructure
|
|
156
|
+
|
|
157
|
+
### Configuration
|
|
158
|
+
|
|
159
|
+
* [ProxySettings](https://www.github.com/sdks-io/walmart-apimatic-ruby-sdk/tree/0.0.1/doc/proxy-settings.md)
|
|
160
|
+
* [Environment-Based Client Initialization](https://www.github.com/sdks-io/walmart-apimatic-ruby-sdk/tree/0.0.1/doc/environment-based-client-initialization.md)
|
|
161
|
+
* [AbstractLogger](https://www.github.com/sdks-io/walmart-apimatic-ruby-sdk/tree/0.0.1/doc/abstract-logger.md)
|
|
162
|
+
* [LoggingConfiguration](https://www.github.com/sdks-io/walmart-apimatic-ruby-sdk/tree/0.0.1/doc/logging-configuration.md)
|
|
163
|
+
* [RequestLoggingConfiguration](https://www.github.com/sdks-io/walmart-apimatic-ruby-sdk/tree/0.0.1/doc/request-logging-configuration.md)
|
|
164
|
+
* [ResponseLoggingConfiguration](https://www.github.com/sdks-io/walmart-apimatic-ruby-sdk/tree/0.0.1/doc/response-logging-configuration.md)
|
|
165
|
+
|
|
166
|
+
### HTTP
|
|
167
|
+
|
|
168
|
+
* [HttpResponse](https://www.github.com/sdks-io/walmart-apimatic-ruby-sdk/tree/0.0.1/doc/http-response.md)
|
|
169
|
+
* [HttpRequest](https://www.github.com/sdks-io/walmart-apimatic-ruby-sdk/tree/0.0.1/doc/http-request.md)
|
|
170
|
+
|
|
171
|
+
### Utilities
|
|
172
|
+
|
|
173
|
+
* [ApiResponse](https://www.github.com/sdks-io/walmart-apimatic-ruby-sdk/tree/0.0.1/doc/api-response.md)
|
|
174
|
+
* [ApiHelper](https://www.github.com/sdks-io/walmart-apimatic-ruby-sdk/tree/0.0.1/doc/api-helper.md)
|
|
175
|
+
* [DateTimeHelper](https://www.github.com/sdks-io/walmart-apimatic-ruby-sdk/tree/0.0.1/doc/date-time-helper.md)
|
|
176
|
+
|
data/bin/console
ADDED
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
#!/usr/bin/env ruby
|
|
2
|
+
|
|
3
|
+
# Load the lib folder into Ruby's load path
|
|
4
|
+
$LOAD_PATH.unshift(File.expand_path('../lib', __dir__))
|
|
5
|
+
|
|
6
|
+
# Require the gem
|
|
7
|
+
require 'walmart_ap_is'
|
|
8
|
+
|
|
9
|
+
puts 'WalmartApIs SDK loaded!'
|
|
10
|
+
puts 'You can now create a client with: client = WalmartApIs::Client.new'
|
|
11
|
+
puts 'Or use from_env: client = WalmartApIs::Client.from_env'
|
|
12
|
+
|
|
13
|
+
# Start an interactive IRB session
|
|
14
|
+
require 'irb'
|
|
15
|
+
IRB.start
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
# walmart_ap_is
|
|
2
|
+
#
|
|
3
|
+
# This file was automatically generated by APIMATIC v3.0 (
|
|
4
|
+
# https://www.apimatic.io ).
|
|
5
|
+
|
|
6
|
+
module WalmartApIs
|
|
7
|
+
# BaseApi.
|
|
8
|
+
class BaseApi
|
|
9
|
+
include CoreLibrary
|
|
10
|
+
attr_accessor :config, :http_call_back
|
|
11
|
+
|
|
12
|
+
def self.user_agent
|
|
13
|
+
'Ruby-SDK/0.0.1 (OS: {os-info}, Engine: {engine}/{engine-version})'
|
|
14
|
+
end
|
|
15
|
+
|
|
16
|
+
def self.user_agent_parameters
|
|
17
|
+
{
|
|
18
|
+
'{engine}' => { 'value' => RUBY_ENGINE, 'encode' => false },
|
|
19
|
+
'{engine-version}' => { 'value' => RUBY_ENGINE_VERSION, 'encode' => false },
|
|
20
|
+
'{os-info}' => { 'value' => RUBY_PLATFORM, 'encode' => false }
|
|
21
|
+
}
|
|
22
|
+
end
|
|
23
|
+
|
|
24
|
+
GLOBAL_ERRORS = {
|
|
25
|
+
'default' => ErrorCase.new
|
|
26
|
+
.error_message('HTTP response not OK.')
|
|
27
|
+
.exception_type(APIException)
|
|
28
|
+
}.freeze
|
|
29
|
+
|
|
30
|
+
# Initialization constructor.
|
|
31
|
+
# @param [GlobalConfiguration] global_configuration The instance of GlobalConfiguration.
|
|
32
|
+
def initialize(global_configuration)
|
|
33
|
+
@global_configuration = global_configuration
|
|
34
|
+
@config = @global_configuration.client_configuration
|
|
35
|
+
@http_call_back = @config.http_callback
|
|
36
|
+
@api_call = ApiCall.new(@global_configuration)
|
|
37
|
+
end
|
|
38
|
+
|
|
39
|
+
# Creates a new instance of the request builder.
|
|
40
|
+
# @param [String] http_method The HTTP method to use in the request.
|
|
41
|
+
# @param [String] path The endpoint path to use in the request.
|
|
42
|
+
# @param [String] server The server to extract the base uri for the request.
|
|
43
|
+
# @return [RequestBuilder] The instance of RequestBuilder.
|
|
44
|
+
def new_request_builder(http_method, path, server)
|
|
45
|
+
RequestBuilder.new
|
|
46
|
+
.http_method(http_method)
|
|
47
|
+
.path(path)
|
|
48
|
+
.server(server)
|
|
49
|
+
end
|
|
50
|
+
|
|
51
|
+
# Creates a new instance of the response handler.
|
|
52
|
+
# @return [ResponseHandler] The instance of ResponseHandler.
|
|
53
|
+
def new_response_handler
|
|
54
|
+
ResponseHandler.new
|
|
55
|
+
end
|
|
56
|
+
|
|
57
|
+
# Creates a new instance of the parameter.
|
|
58
|
+
# @param [String|optional] key The key of the parameter.
|
|
59
|
+
# @param [Object] value The value of the parameter.
|
|
60
|
+
# @return [Parameter] The instance of Parameter.
|
|
61
|
+
def new_parameter(value, key: nil)
|
|
62
|
+
Parameter.new
|
|
63
|
+
.key(key)
|
|
64
|
+
.value(value)
|
|
65
|
+
end
|
|
66
|
+
end
|
|
67
|
+
end
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
# walmart_ap_is
|
|
2
|
+
#
|
|
3
|
+
# This file was automatically generated by APIMATIC v3.0 (
|
|
4
|
+
# https://www.apimatic.io ).
|
|
5
|
+
|
|
6
|
+
module WalmartApIs
|
|
7
|
+
# CppreferenceApi
|
|
8
|
+
class CppreferenceApi < BaseApi
|
|
9
|
+
# This API helps Sellers to completely opt-in or opt-out from CAP program.
|
|
10
|
+
# If the subsidyEnrolled value = "true", the Seller enrolls in the CAP
|
|
11
|
+
# program. All eligible SKUs (current and future) are by default opt-in.
|
|
12
|
+
# Seller should use the SKU opt-in/opt-out API to opt-out individual items.
|
|
13
|
+
# If the subsidyEnrolled value = "false", the Seller stops participating in
|
|
14
|
+
# the CAP program and all eligible SKUs (current and future) are opt-out of
|
|
15
|
+
# the CAP program.
|
|
16
|
+
# @param [String] wm_sec_access_token Required parameter: The access token
|
|
17
|
+
# retrieved in the Token API call
|
|
18
|
+
# @param [String] wm_consumer_channel_type Required parameter: A unique ID
|
|
19
|
+
# to track the consumer request by channel. Use the Consumer Channel Type
|
|
20
|
+
# received during onboarding
|
|
21
|
+
# @param [String] wm_qos_correlation_id Required parameter: A unique ID
|
|
22
|
+
# which identifies each API call and used to track and debug issues; use a
|
|
23
|
+
# random generated GUID for this ID
|
|
24
|
+
# @param [String] wm_svc_name Required parameter: Walmart Service Name
|
|
25
|
+
# @param [String] accept Required parameter: TODO: type description here
|
|
26
|
+
# @param [SetUpCapSkuAllLegacyRequest] body Required parameter: TODO: type
|
|
27
|
+
# description here
|
|
28
|
+
# @return [ApiResponse] Complete http response with raw body and status code.
|
|
29
|
+
def set_up_cap_sku_all_legacy(wm_sec_access_token,
|
|
30
|
+
wm_consumer_channel_type,
|
|
31
|
+
wm_qos_correlation_id,
|
|
32
|
+
wm_svc_name,
|
|
33
|
+
accept,
|
|
34
|
+
body)
|
|
35
|
+
@api_call
|
|
36
|
+
.request(new_request_builder(HttpMethodEnum::POST,
|
|
37
|
+
'/cppreference',
|
|
38
|
+
Server::SERVER_1)
|
|
39
|
+
.header_param(new_parameter(wm_sec_access_token, key: 'WM_SEC.ACCESS_TOKEN')
|
|
40
|
+
.is_required(true))
|
|
41
|
+
.header_param(new_parameter(wm_consumer_channel_type, key: 'WM_CONSUMER.CHANNEL.TYPE')
|
|
42
|
+
.is_required(true))
|
|
43
|
+
.header_param(new_parameter(wm_qos_correlation_id, key: 'WM_QOS.CORRELATION_ID')
|
|
44
|
+
.is_required(true))
|
|
45
|
+
.header_param(new_parameter(wm_svc_name, key: 'WM_SVC.NAME')
|
|
46
|
+
.is_required(true))
|
|
47
|
+
.header_param(new_parameter('application/json', key: 'Content-Type'))
|
|
48
|
+
.header_param(new_parameter(accept, key: 'Accept')
|
|
49
|
+
.is_required(true))
|
|
50
|
+
.body_param(new_parameter(body)
|
|
51
|
+
.is_required(true))
|
|
52
|
+
.body_serializer(proc do |param| param.to_json unless param.nil? end))
|
|
53
|
+
.response(new_response_handler
|
|
54
|
+
.deserializer(APIHelper.method(:custom_type_deserializer))
|
|
55
|
+
.deserialize_into(SuccessfulOperation12.method(:from_hash))
|
|
56
|
+
.is_api_response(true))
|
|
57
|
+
.execute
|
|
58
|
+
end
|
|
59
|
+
end
|
|
60
|
+
end
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
# walmart_ap_is
|
|
2
|
+
#
|
|
3
|
+
# This file was automatically generated by APIMATIC v3.0 (
|
|
4
|
+
# https://www.apimatic.io ).
|
|
5
|
+
|
|
6
|
+
module WalmartApIs
|
|
7
|
+
# DetailApi
|
|
8
|
+
class DetailApi < BaseApi
|
|
9
|
+
# Returns OAuth token metadata and scopes granted by the seller to your
|
|
10
|
+
# application. Use this to verify whether a token is valid, when it expires,
|
|
11
|
+
# and which API categories are allowed (full_access, view_only, no_access).
|
|
12
|
+
# Send the access token in the `WM_SEC.ACCESS_TOKEN` header.
|
|
13
|
+
# You can also use this API for troubleshooting access failures and
|
|
14
|
+
# rendering “connected account” permissions in your UI. For more information
|
|
15
|
+
# and usage examples, refer to <a
|
|
16
|
+
# href="https://developer.walmart.com/us-marketplace/docs/retrieve-access-to
|
|
17
|
+
# ken-details">Retrieve access token details.</a>
|
|
18
|
+
# @param [String] wm_sec_access_token Required parameter: Access token
|
|
19
|
+
# obtained from the Token API. This is required for authenticating requests
|
|
20
|
+
# to Walmart Marketplace APIs.
|
|
21
|
+
# @param [String] wm_consumer_channel_type Required parameter: A unique ID
|
|
22
|
+
# to track the consumer request by channel. Use the Consumer Channel Type
|
|
23
|
+
# received during onboarding.
|
|
24
|
+
# @param [String] wm_qos_correlation_id Required parameter: A unique ID that
|
|
25
|
+
# identifies each API call and is used to track and debug issues. Use a
|
|
26
|
+
# randomly generated GUID for this ID.
|
|
27
|
+
# @param [String] wm_svc_name Required parameter: Specifies the name of the
|
|
28
|
+
# Walmart service being called.
|
|
29
|
+
# @param [String] accept Required parameter: TODO: type description here
|
|
30
|
+
# @return [ApiResponse] Complete http response with raw body and status code.
|
|
31
|
+
def token_detail(wm_sec_access_token,
|
|
32
|
+
wm_consumer_channel_type,
|
|
33
|
+
wm_qos_correlation_id,
|
|
34
|
+
wm_svc_name,
|
|
35
|
+
accept)
|
|
36
|
+
@api_call
|
|
37
|
+
.request(new_request_builder(HttpMethodEnum::GET,
|
|
38
|
+
'/token/detail',
|
|
39
|
+
Server::SERVER_1)
|
|
40
|
+
.header_param(new_parameter(wm_sec_access_token, key: 'WM_SEC.ACCESS_TOKEN')
|
|
41
|
+
.is_required(true))
|
|
42
|
+
.header_param(new_parameter(wm_consumer_channel_type, key: 'WM_CONSUMER.CHANNEL.TYPE')
|
|
43
|
+
.is_required(true))
|
|
44
|
+
.header_param(new_parameter(wm_qos_correlation_id, key: 'WM_QOS.CORRELATION_ID')
|
|
45
|
+
.is_required(true))
|
|
46
|
+
.header_param(new_parameter(wm_svc_name, key: 'WM_SVC.NAME')
|
|
47
|
+
.is_required(true))
|
|
48
|
+
.header_param(new_parameter(accept, key: 'Accept')
|
|
49
|
+
.is_required(true))
|
|
50
|
+
.auth(Single.new('basic')))
|
|
51
|
+
.response(new_response_handler
|
|
52
|
+
.deserializer(APIHelper.method(:custom_type_deserializer))
|
|
53
|
+
.deserialize_into(SuccessfulOperation2.method(:from_hash))
|
|
54
|
+
.is_api_response(true))
|
|
55
|
+
.execute
|
|
56
|
+
end
|
|
57
|
+
end
|
|
58
|
+
end
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
# walmart_ap_is
|
|
2
|
+
#
|
|
3
|
+
# This file was automatically generated by APIMATIC v3.0 (
|
|
4
|
+
# https://www.apimatic.io ).
|
|
5
|
+
|
|
6
|
+
module WalmartApIs
|
|
7
|
+
# FeedsApi
|
|
8
|
+
class FeedsApi < BaseApi
|
|
9
|
+
# Updates prices in bulk.
|
|
10
|
+
# In one Feed you can update up to 10,000 items in bulk. To ensure optimal
|
|
11
|
+
# Feed processing time, we recommend sending no more than 1000 items in one
|
|
12
|
+
# Feed and keeping the Feed sizes below 10 MB.
|
|
13
|
+
# The price sequence guarantee is observed by the bulk price update
|
|
14
|
+
# functionality, subject to the following rules:
|
|
15
|
+
# The timestamp used to determine precedence is passed in the request
|
|
16
|
+
# headers. All price updates in the feed are considered to have the same
|
|
17
|
+
# timestamp. The timestamp in the XML file is used only for auditing.
|
|
18
|
+
# You can send a single SKU multiple times in one Feed. If a SKU is repeated
|
|
19
|
+
# in a Feed, the price will be set for that SKU on Walmart.com, but there is
|
|
20
|
+
# no guarantee as to which SKU's price within that feed will be used.
|
|
21
|
+
# This API should be used in preference to the update a price. It should be
|
|
22
|
+
# called no sooner than 24 hours after a new item is set up and a wpid
|
|
23
|
+
# (Walmart Part ID) is available. Thereafter, the bulk price update has an
|
|
24
|
+
# service level agreement (SLA) of 15 minutes.
|
|
25
|
+
# After the update is submitted, wait for at least five minutes before
|
|
26
|
+
# verifying whether the bulk price update was successful. Individual SKU
|
|
27
|
+
# price update success or failure is only available after the entire feed is
|
|
28
|
+
# processed.
|
|
29
|
+
# If a SKU's price update fails (for example, multiple price updates were
|
|
30
|
+
# sent for the same SKU in a single feed), an error will be returned.
|
|
31
|
+
# <b>You can download the request body sample from <a
|
|
32
|
+
# href="/file/mp/us/price-feed.zip">here</a></b>
|
|
33
|
+
# @param [String] feed_type Required parameter: The feed Type
|
|
34
|
+
# @param [String] wm_sec_access_token Required parameter: The access token
|
|
35
|
+
# retrieved in the Token API call
|
|
36
|
+
# @param [String] wm_consumer_channel_type Required parameter: A unique ID
|
|
37
|
+
# to track the consumer request by channel. Use the Consumer Channel Type
|
|
38
|
+
# received during onboarding
|
|
39
|
+
# @param [String] wm_qos_correlation_id Required parameter: A unique ID
|
|
40
|
+
# which identifies each API call and used to track and debug issues; use a
|
|
41
|
+
# random generated GUID for this ID
|
|
42
|
+
# @param [String] wm_svc_name Required parameter: Walmart Service Name
|
|
43
|
+
# @param [String] accept Required parameter: TODO: type description here
|
|
44
|
+
# @param [File | UploadIO] file Required parameter: Feed file to upload
|
|
45
|
+
# @return [ApiResponse] Complete http response with raw body and status code.
|
|
46
|
+
def update_bulk_prices_legacy(feed_type,
|
|
47
|
+
wm_sec_access_token,
|
|
48
|
+
wm_consumer_channel_type,
|
|
49
|
+
wm_qos_correlation_id,
|
|
50
|
+
wm_svc_name,
|
|
51
|
+
accept,
|
|
52
|
+
file)
|
|
53
|
+
@api_call
|
|
54
|
+
.request(new_request_builder(HttpMethodEnum::POST,
|
|
55
|
+
'/feeds',
|
|
56
|
+
Server::SERVER_1)
|
|
57
|
+
.query_param(new_parameter(feed_type, key: 'feedType')
|
|
58
|
+
.is_required(true))
|
|
59
|
+
.header_param(new_parameter(wm_sec_access_token, key: 'WM_SEC.ACCESS_TOKEN')
|
|
60
|
+
.is_required(true))
|
|
61
|
+
.header_param(new_parameter(wm_consumer_channel_type, key: 'WM_CONSUMER.CHANNEL.TYPE')
|
|
62
|
+
.is_required(true))
|
|
63
|
+
.header_param(new_parameter(wm_qos_correlation_id, key: 'WM_QOS.CORRELATION_ID')
|
|
64
|
+
.is_required(true))
|
|
65
|
+
.header_param(new_parameter(wm_svc_name, key: 'WM_SVC.NAME')
|
|
66
|
+
.is_required(true))
|
|
67
|
+
.header_param(new_parameter(accept, key: 'Accept')
|
|
68
|
+
.is_required(true))
|
|
69
|
+
.multipart_param(new_parameter(file, key: 'file')
|
|
70
|
+
.is_required(true)
|
|
71
|
+
.default_content_type('application/octet-stream')))
|
|
72
|
+
.response(new_response_handler
|
|
73
|
+
.deserializer(APIHelper.method(:custom_type_deserializer))
|
|
74
|
+
.deserialize_into(Json1.method(:from_hash))
|
|
75
|
+
.is_api_response(true))
|
|
76
|
+
.execute
|
|
77
|
+
end
|
|
78
|
+
end
|
|
79
|
+
end
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
# walmart_ap_is
|
|
2
|
+
#
|
|
3
|
+
# This file was automatically generated by APIMATIC v3.0 (
|
|
4
|
+
# https://www.apimatic.io ).
|
|
5
|
+
|
|
6
|
+
module WalmartApIs
|
|
7
|
+
# FeedsFeedTypeIncentiveEnrollmentApi
|
|
8
|
+
class FeedsFeedTypeIncentiveEnrollmentApi < BaseApi
|
|
9
|
+
# You can use this API endpoint to enroll any eligible item to Reduced
|
|
10
|
+
# Referral Fee incentive. You can also use this endpoint to unenroll any
|
|
11
|
+
# items from active Reduced Referral Fee incentives.
|
|
12
|
+
# For more information and usage examples, refer to the <a
|
|
13
|
+
# href="https://developer.walmart.com/us-marketplace/docs/enroll-in-reduced-
|
|
14
|
+
# referral-fee-incentives">Pricing API Guide</a>.
|
|
15
|
+
# @param [String] feed_type Required parameter: TODO: type description
|
|
16
|
+
# here
|
|
17
|
+
# @param [String] wm_sec_access_token Required parameter: Access token
|
|
18
|
+
# obtained from the Token API. This is required for authenticating requests
|
|
19
|
+
# to Walmart Marketplace APIs.
|
|
20
|
+
# @param [String] wm_consumer_channel_type Required parameter: A unique ID
|
|
21
|
+
# to track the consumer request by channel. Use the Consumer Channel Type
|
|
22
|
+
# received during onboarding.
|
|
23
|
+
# @param [String] wm_qos_correlation_id Required parameter: A unique ID that
|
|
24
|
+
# identifies each API call and is used to track and debug issues. Use a
|
|
25
|
+
# randomly generated GUID for this ID.
|
|
26
|
+
# @param [String] wm_svc_name Required parameter: Specifies the name of the
|
|
27
|
+
# Walmart service being called.
|
|
28
|
+
# @param [String] accept Required parameter: TODO: type description here
|
|
29
|
+
# @param [UpdateReducedReferralFeeIncentivesEnrollmentRequest] body Required
|
|
30
|
+
# parameter: TODO: type description here
|
|
31
|
+
# @return [ApiResponse] Complete http response with raw body and status code.
|
|
32
|
+
def update_reduced_referral_fee_incentives_enrollment(feed_type,
|
|
33
|
+
wm_sec_access_token,
|
|
34
|
+
wm_consumer_channel_type,
|
|
35
|
+
wm_qos_correlation_id,
|
|
36
|
+
wm_svc_name,
|
|
37
|
+
accept,
|
|
38
|
+
body)
|
|
39
|
+
@api_call
|
|
40
|
+
.request(new_request_builder(HttpMethodEnum::POST,
|
|
41
|
+
'/feeds',
|
|
42
|
+
Server::SERVER_1)
|
|
43
|
+
.query_param(new_parameter(feed_type, key: 'feedType')
|
|
44
|
+
.is_required(true))
|
|
45
|
+
.header_param(new_parameter(wm_sec_access_token, key: 'WM_SEC.ACCESS_TOKEN')
|
|
46
|
+
.is_required(true))
|
|
47
|
+
.header_param(new_parameter(wm_consumer_channel_type, key: 'WM_CONSUMER.CHANNEL.TYPE')
|
|
48
|
+
.is_required(true))
|
|
49
|
+
.header_param(new_parameter(wm_qos_correlation_id, key: 'WM_QOS.CORRELATION_ID')
|
|
50
|
+
.is_required(true))
|
|
51
|
+
.header_param(new_parameter(wm_svc_name, key: 'WM_SVC.NAME')
|
|
52
|
+
.is_required(true))
|
|
53
|
+
.header_param(new_parameter('application/json', key: 'Content-Type'))
|
|
54
|
+
.header_param(new_parameter(accept, key: 'Accept')
|
|
55
|
+
.is_required(true))
|
|
56
|
+
.body_param(new_parameter(body)
|
|
57
|
+
.is_required(true))
|
|
58
|
+
.body_serializer(proc do |param| param.to_json unless param.nil? end))
|
|
59
|
+
.response(new_response_handler
|
|
60
|
+
.deserializer(APIHelper.method(:custom_type_deserializer))
|
|
61
|
+
.deserialize_into(SuccessfulOperation11.method(:from_hash))
|
|
62
|
+
.is_api_response(true))
|
|
63
|
+
.execute
|
|
64
|
+
end
|
|
65
|
+
end
|
|
66
|
+
end
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
# walmart_ap_is
|
|
2
|
+
#
|
|
3
|
+
# This file was automatically generated by APIMATIC v3.0 (
|
|
4
|
+
# https://www.apimatic.io ).
|
|
5
|
+
|
|
6
|
+
module WalmartApIs
|
|
7
|
+
# FeedsFeedTypePriceAndPromotionApi
|
|
8
|
+
class FeedsFeedTypePriceAndPromotionApi < BaseApi
|
|
9
|
+
# Updates the price and promotions in bulk for multiple items. You can
|
|
10
|
+
# modify the prices of multiple items in bulk using a price feed. This is
|
|
11
|
+
# useful for implementing pricing strategies across your catalog, such as
|
|
12
|
+
# seasonal discounts, competitive pricing adjustments, or clearance sales.
|
|
13
|
+
# Each price feed can contain up to 10,000 items. To ensure optimal
|
|
14
|
+
# performance (feed processing time), we recommend limiting the feeds to
|
|
15
|
+
# 1,000 items and keeping the payload under 10 MB.
|
|
16
|
+
# The price sequence guarantee is observed by the bulk price update
|
|
17
|
+
# functionality, subject to the following rules:
|
|
18
|
+
# Use this API instead of the single price update API, especially if a new
|
|
19
|
+
# item has been set up and a Walmart Part ID (wpid) is available. Ensure to
|
|
20
|
+
# wait at least 24 hours after item creation to use the bulk price update
|
|
21
|
+
# API. The bulk price update Service Level Agreement (SLA) is 15 minutes.
|
|
22
|
+
# You may include the same Stock Keeping Unit (SKU) multiple times in a
|
|
23
|
+
# single feed. However, if a SKU is repeated in a feed, only on price will
|
|
24
|
+
# be applied. The price sequence guarantee ensures that the latest price
|
|
25
|
+
# update, based on its creation timestamp, is the one that changes the price
|
|
26
|
+
# of the item, overwriting the previous version. Price updates received with
|
|
27
|
+
# an earlier timestamp are ignored. As a result, we recommend all feed-based
|
|
28
|
+
# bulk updates base the value of `feedDate` on UTC.
|
|
29
|
+
# After submitting the price feed, wait at least 5 minutes before checking
|
|
30
|
+
# whether the bulk price update was successful. If a price update fails, for
|
|
31
|
+
# example due to duplicate SKU entries, an error response will be returned.
|
|
32
|
+
# For more information and usage examples, refer to the <a
|
|
33
|
+
# href="https://developer.walmart.com/us-marketplace/reference/priceandpromo
|
|
34
|
+
# tionbulkuploads">Pricing API Guide</a>.
|
|
35
|
+
# @param [String] feed_type Required parameter: TODO: type description
|
|
36
|
+
# here
|
|
37
|
+
# @param [String] wm_sec_access_token Required parameter: Access token
|
|
38
|
+
# obtained from the Token API. This is required for authenticating requests
|
|
39
|
+
# to Walmart Marketplace APIs.
|
|
40
|
+
# @param [String] wm_consumer_channel_type Required parameter: A unique ID
|
|
41
|
+
# to track the consumer request by channel. Use the Consumer Channel Type
|
|
42
|
+
# received during onboarding.
|
|
43
|
+
# @param [String] wm_qos_correlation_id Required parameter: A unique ID that
|
|
44
|
+
# identifies each API call and is used to track and debug issues. Use a
|
|
45
|
+
# randomly generated GUID for this ID.
|
|
46
|
+
# @param [String] wm_svc_name Required parameter: Specifies the name of the
|
|
47
|
+
# Walmart service being called.
|
|
48
|
+
# @param [String] accept Required parameter: TODO: type description here
|
|
49
|
+
# @param [UpdatePricingForMultipleItemsInBulkNewRequest] body Required
|
|
50
|
+
# parameter: TODO: type description here
|
|
51
|
+
# @return [ApiResponse] Complete http response with raw body and status code.
|
|
52
|
+
def update_pricing_for_multiple_items_in_bulk_new(feed_type,
|
|
53
|
+
wm_sec_access_token,
|
|
54
|
+
wm_consumer_channel_type,
|
|
55
|
+
wm_qos_correlation_id,
|
|
56
|
+
wm_svc_name,
|
|
57
|
+
accept,
|
|
58
|
+
body)
|
|
59
|
+
@api_call
|
|
60
|
+
.request(new_request_builder(HttpMethodEnum::POST,
|
|
61
|
+
'/feeds',
|
|
62
|
+
Server::SERVER_1)
|
|
63
|
+
.query_param(new_parameter(feed_type, key: 'feedType')
|
|
64
|
+
.is_required(true))
|
|
65
|
+
.header_param(new_parameter(wm_sec_access_token, key: 'WM_SEC.ACCESS_TOKEN')
|
|
66
|
+
.is_required(true))
|
|
67
|
+
.header_param(new_parameter(wm_consumer_channel_type, key: 'WM_CONSUMER.CHANNEL.TYPE')
|
|
68
|
+
.is_required(true))
|
|
69
|
+
.header_param(new_parameter(wm_qos_correlation_id, key: 'WM_QOS.CORRELATION_ID')
|
|
70
|
+
.is_required(true))
|
|
71
|
+
.header_param(new_parameter(wm_svc_name, key: 'WM_SVC.NAME')
|
|
72
|
+
.is_required(true))
|
|
73
|
+
.header_param(new_parameter('application/json', key: 'Content-Type'))
|
|
74
|
+
.header_param(new_parameter(accept, key: 'Accept')
|
|
75
|
+
.is_required(true))
|
|
76
|
+
.body_param(new_parameter(body)
|
|
77
|
+
.is_required(true))
|
|
78
|
+
.body_serializer(proc do |param| param.to_json unless param.nil? end))
|
|
79
|
+
.response(new_response_handler
|
|
80
|
+
.deserializer(APIHelper.method(:custom_type_deserializer))
|
|
81
|
+
.deserialize_into(SuccessfulOperation8.method(:from_hash))
|
|
82
|
+
.is_api_response(true))
|
|
83
|
+
.execute
|
|
84
|
+
end
|
|
85
|
+
end
|
|
86
|
+
end
|