muffin_man 1.5.1 → 1.5.3
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 +4 -4
- data/.github/workflows/ci.yml +4 -0
- data/.rubocop.yml +31 -0
- data/.rubocop_todo.yml +482 -0
- data/CHANGELOG.md +13 -1
- data/Gemfile +4 -0
- data/README.md +3 -0
- data/lib/muffin_man/fba_inventory/v1.rb +30 -0
- data/lib/muffin_man/feeds/v20210630.rb +45 -0
- data/lib/muffin_man/fulfillment_outbound/v20200701.rb +56 -0
- data/lib/muffin_man/notifications/v1.rb +85 -0
- data/lib/muffin_man/request_helpers/base.rb +3 -0
- data/lib/muffin_man/request_helpers/outbound_fulfillment/address.rb +92 -0
- data/lib/muffin_man/request_helpers/outbound_fulfillment/fulfillment_order_request.rb +104 -0
- data/lib/muffin_man/request_helpers/outbound_fulfillment/fulfillment_preview_request.rb +64 -0
- data/lib/muffin_man/request_helpers/outbound_fulfillment/item.rb +69 -0
- data/lib/muffin_man/request_helpers/outbound_fulfillment/v20200701.rb +41 -0
- data/lib/muffin_man/request_helpers.rb +1 -0
- data/lib/muffin_man/sp_api_client.rb +11 -1
- data/lib/muffin_man/version.rb +1 -1
- data/lib/muffin_man.rb +5 -1
- data/lib/sp_api_helpers.rb +1 -0
- data/muffin_man.gemspec +1 -0
- metadata +26 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a65842148ee282b6d12a552b0c55495a445b183e5a7e5c38a7418de04992f999
|
4
|
+
data.tar.gz: 383a57d029e7f7938d451698a69a60b808f6fccc9fab074fa0e2d710df3acd2a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7993f0f6103ab852b70a457a4b5d29b028e40a3b53c98c169a28336653035dbb70ebdb988000fb6df04595362257924164b63a1cc2e0ea76dc1ba201c8a57245
|
7
|
+
data.tar.gz: 8f7ccf13026f77ea995fabf36d0c753714daea1ccfdfee63276a17693e86ed8d25466246a00017832050915ada192fa4dfd677d342cbcee1c88d5afeafa029e1
|
data/.github/workflows/ci.yml
CHANGED
data/.rubocop.yml
CHANGED
@@ -1,5 +1,12 @@
|
|
1
|
+
inherit_from: .rubocop_todo.yml
|
2
|
+
|
3
|
+
require:
|
4
|
+
- rubocop-rspec
|
5
|
+
- rubocop-rake
|
6
|
+
|
1
7
|
AllCops:
|
2
8
|
TargetRubyVersion: 2.5
|
9
|
+
NewCops: enable
|
3
10
|
|
4
11
|
Style/StringLiterals:
|
5
12
|
Enabled: true
|
@@ -14,3 +21,27 @@ Layout/LineLength:
|
|
14
21
|
|
15
22
|
Metrics/MethodLength:
|
16
23
|
Max: 30
|
24
|
+
|
25
|
+
Metrics/ModuleLength:
|
26
|
+
Enabled: false
|
27
|
+
|
28
|
+
Metrics/BlockLength:
|
29
|
+
Enabled: false
|
30
|
+
|
31
|
+
Metrics/AbcSize:
|
32
|
+
Enabled: false
|
33
|
+
|
34
|
+
Style/Documentation:
|
35
|
+
Enabled: false
|
36
|
+
|
37
|
+
Style/OptionalBooleanParameter:
|
38
|
+
Enabled: false
|
39
|
+
|
40
|
+
RSpec/ExampleLength:
|
41
|
+
Enabled: false
|
42
|
+
|
43
|
+
RSpec/MultipleMemoizedHelpers:
|
44
|
+
Enabled: false
|
45
|
+
|
46
|
+
RSpec/MultipleExpectations:
|
47
|
+
Enabled: false
|
data/.rubocop_todo.yml
ADDED
@@ -0,0 +1,482 @@
|
|
1
|
+
# This configuration was generated by
|
2
|
+
# `rubocop --auto-gen-config --auto-gen-only-exclude --exclude-limit 10000`
|
3
|
+
# on 2022-11-01 12:11:40 UTC using RuboCop version 1.37.1.
|
4
|
+
# The point is for the user to remove these configuration records
|
5
|
+
# one by one as the offenses are removed from the code base.
|
6
|
+
# Note that changes in the inspected code, or installation of new
|
7
|
+
# versions of RuboCop, may require this file to be generated again.
|
8
|
+
|
9
|
+
# Offense count: 3
|
10
|
+
# This cop supports safe autocorrection (--autocorrect).
|
11
|
+
# Configuration parameters: TreatCommentsAsGroupSeparators, ConsiderPunctuation, Include.
|
12
|
+
# Include: **/*.gemspec
|
13
|
+
Gemspec/OrderedDependencies:
|
14
|
+
Exclude:
|
15
|
+
- 'muffin_man.gemspec'
|
16
|
+
|
17
|
+
# Offense count: 1
|
18
|
+
# This cop supports safe autocorrection (--autocorrect).
|
19
|
+
# Configuration parameters: Include.
|
20
|
+
# Include: **/*.gemspec
|
21
|
+
Gemspec/RequireMFA:
|
22
|
+
Exclude:
|
23
|
+
- 'muffin_man.gemspec'
|
24
|
+
|
25
|
+
# Offense count: 1
|
26
|
+
# Configuration parameters: Include.
|
27
|
+
# Include: **/*.gemspec
|
28
|
+
Gemspec/RequiredRubyVersion:
|
29
|
+
Exclude:
|
30
|
+
- 'muffin_man.gemspec'
|
31
|
+
|
32
|
+
# Offense count: 3
|
33
|
+
# This cop supports safe autocorrection (--autocorrect).
|
34
|
+
# Configuration parameters: EnforcedStyle.
|
35
|
+
# SupportedStyles: leading, trailing
|
36
|
+
Layout/DotPosition:
|
37
|
+
Exclude:
|
38
|
+
- 'spec/support/sp_api_helpers.rb'
|
39
|
+
|
40
|
+
# Offense count: 1
|
41
|
+
# This cop supports safe autocorrection (--autocorrect).
|
42
|
+
Layout/EmptyLines:
|
43
|
+
Exclude:
|
44
|
+
- 'spec/muffin_man/fulfillment_inbound/v0_spec.rb'
|
45
|
+
|
46
|
+
# Offense count: 3
|
47
|
+
# This cop supports safe autocorrection (--autocorrect).
|
48
|
+
# Configuration parameters: EnforcedStyle.
|
49
|
+
# SupportedStyles: empty_lines, empty_lines_except_namespace, empty_lines_special, no_empty_lines, beginning_only, ending_only
|
50
|
+
Layout/EmptyLinesAroundClassBody:
|
51
|
+
Exclude:
|
52
|
+
- 'lib/muffin_man/catalog_items/v20201201.rb'
|
53
|
+
- 'lib/muffin_man/fba_inventory/v1.rb'
|
54
|
+
- 'lib/muffin_man/orders/v0.rb'
|
55
|
+
|
56
|
+
# Offense count: 1
|
57
|
+
# This cop supports safe autocorrection (--autocorrect).
|
58
|
+
# Configuration parameters: AllowForAlignment, AllowBeforeTrailingComments, ForceEqualSignAlignment.
|
59
|
+
Layout/ExtraSpacing:
|
60
|
+
Exclude:
|
61
|
+
- 'spec/muffin_man/orders_spec.rb'
|
62
|
+
|
63
|
+
# Offense count: 4
|
64
|
+
# This cop supports safe autocorrection (--autocorrect).
|
65
|
+
# Configuration parameters: EnforcedStyle, IndentationWidth.
|
66
|
+
# SupportedStyles: special_inside_parentheses, consistent, align_brackets
|
67
|
+
Layout/FirstArrayElementIndentation:
|
68
|
+
Exclude:
|
69
|
+
- 'spec/muffin_man/fulfillment_inbound/v0_spec.rb'
|
70
|
+
|
71
|
+
# Offense count: 22
|
72
|
+
# This cop supports safe autocorrection (--autocorrect).
|
73
|
+
# Configuration parameters: AllowMultipleStyles, EnforcedHashRocketStyle, EnforcedColonStyle, EnforcedLastArgumentHashStyle.
|
74
|
+
# SupportedHashRocketStyles: key, separator, table
|
75
|
+
# SupportedColonStyles: key, separator, table
|
76
|
+
# SupportedLastArgumentHashStyles: always_inspect, always_ignore, ignore_implicit, ignore_explicit
|
77
|
+
Layout/HashAlignment:
|
78
|
+
Exclude:
|
79
|
+
- 'lib/muffin_man/listings/v20210801.rb'
|
80
|
+
- 'spec/muffin_man/fulfillment_inbound/v0_spec.rb'
|
81
|
+
|
82
|
+
# Offense count: 2
|
83
|
+
# This cop supports safe autocorrection (--autocorrect).
|
84
|
+
Layout/MultilineBlockLayout:
|
85
|
+
Exclude:
|
86
|
+
- 'spec/muffin_man/fulfillment_inbound/v0_spec.rb'
|
87
|
+
|
88
|
+
# Offense count: 3
|
89
|
+
# This cop supports safe autocorrection (--autocorrect).
|
90
|
+
# Configuration parameters: EnforcedStyle, IndentationWidth.
|
91
|
+
# SupportedStyles: aligned, indented, indented_relative_to_receiver
|
92
|
+
Layout/MultilineMethodCallIndentation:
|
93
|
+
Exclude:
|
94
|
+
- 'spec/support/sp_api_helpers.rb'
|
95
|
+
|
96
|
+
# Offense count: 3
|
97
|
+
# This cop supports safe autocorrection (--autocorrect).
|
98
|
+
# Configuration parameters: EnforcedStyle.
|
99
|
+
# SupportedStyles: space, no_space
|
100
|
+
Layout/SpaceAroundEqualsInParameterDefault:
|
101
|
+
Exclude:
|
102
|
+
- 'lib/muffin_man/catalog_items/base_api.rb'
|
103
|
+
- 'lib/muffin_man/product_pricing/v0.rb'
|
104
|
+
|
105
|
+
# Offense count: 43
|
106
|
+
# This cop supports safe autocorrection (--autocorrect).
|
107
|
+
# Configuration parameters: AllowForAlignment, EnforcedStyleForExponentOperator.
|
108
|
+
# SupportedStylesForExponentOperator: space, no_space
|
109
|
+
Layout/SpaceAroundOperators:
|
110
|
+
Exclude:
|
111
|
+
- 'lib/muffin_man/listings/v20210801.rb'
|
112
|
+
- 'lib/muffin_man/reports/v20210630.rb'
|
113
|
+
- 'spec/muffin_man/fulfillment_inbound/v0_spec.rb'
|
114
|
+
- 'spec/muffin_man/orders_spec.rb'
|
115
|
+
- 'spec/muffin_man/product_fees_spec.rb'
|
116
|
+
- 'spec/support/sp_api_helpers.rb'
|
117
|
+
|
118
|
+
# Offense count: 4
|
119
|
+
# This cop supports safe autocorrection (--autocorrect).
|
120
|
+
# Configuration parameters: EnforcedStyle, EnforcedStyleForEmptyBrackets.
|
121
|
+
# SupportedStyles: space, no_space, compact
|
122
|
+
# SupportedStylesForEmptyBrackets: space, no_space
|
123
|
+
Layout/SpaceInsideArrayLiteralBrackets:
|
124
|
+
Exclude:
|
125
|
+
- 'spec/muffin_man/fulfillment_inbound/v0_spec.rb'
|
126
|
+
|
127
|
+
# Offense count: 24
|
128
|
+
# This cop supports safe autocorrection (--autocorrect).
|
129
|
+
# Configuration parameters: EnforcedStyle, EnforcedStyleForEmptyBraces.
|
130
|
+
# SupportedStyles: space, no_space, compact
|
131
|
+
# SupportedStylesForEmptyBraces: space, no_space
|
132
|
+
Layout/SpaceInsideHashLiteralBraces:
|
133
|
+
Exclude:
|
134
|
+
- 'spec/muffin_man/catalog_items_v20220401_spec.rb'
|
135
|
+
- 'spec/muffin_man/fulfillment_inbound/v0_spec.rb'
|
136
|
+
- 'spec/muffin_man/orders_spec.rb'
|
137
|
+
- 'spec/muffin_man/product_fees_spec.rb'
|
138
|
+
- 'spec/muffin_man/product_pricing_spec.rb'
|
139
|
+
- 'spec/support/sp_api_helpers.rb'
|
140
|
+
|
141
|
+
# Offense count: 2
|
142
|
+
# This cop supports safe autocorrection (--autocorrect).
|
143
|
+
# Configuration parameters: EnforcedStyle.
|
144
|
+
# SupportedStyles: final_newline, final_blank_line
|
145
|
+
Layout/TrailingEmptyLines:
|
146
|
+
Exclude:
|
147
|
+
- 'Gemfile'
|
148
|
+
- 'spec/muffin_man/product_pricing_spec.rb'
|
149
|
+
|
150
|
+
# Offense count: 1
|
151
|
+
# Configuration parameters: AllowedMethods.
|
152
|
+
# AllowedMethods: enums
|
153
|
+
Lint/ConstantDefinitionInBlock:
|
154
|
+
Exclude:
|
155
|
+
- 'spec/muffin_man/sp_api_client_spec.rb'
|
156
|
+
|
157
|
+
# Offense count: 1
|
158
|
+
Lint/MissingSuper:
|
159
|
+
Exclude:
|
160
|
+
- 'lib/muffin_man/request_helpers/inbound_shipment_plan_request_item.rb'
|
161
|
+
|
162
|
+
|
163
|
+
# Offense count: 17
|
164
|
+
# This cop supports safe autocorrection (--autocorrect).
|
165
|
+
# Configuration parameters: EnforcedStyle.
|
166
|
+
# SupportedStyles: strict, consistent
|
167
|
+
Lint/SymbolConversion:
|
168
|
+
Exclude:
|
169
|
+
- 'lib/muffin_man/fulfillment_inbound/v0.rb'
|
170
|
+
- 'lib/muffin_man/request_helpers/inbound_shipment_plan_request_item.rb'
|
171
|
+
- 'spec/support/sp_api_helpers.rb'
|
172
|
+
|
173
|
+
# Offense count: 1
|
174
|
+
# Configuration parameters: CountComments, Max, CountAsOne.
|
175
|
+
Metrics/ClassLength:
|
176
|
+
Exclude:
|
177
|
+
- 'lib/muffin_man/sp_api_client.rb'
|
178
|
+
|
179
|
+
# Offense count: 11
|
180
|
+
# Configuration parameters: Max, CountKeywordArgs, MaxOptionalParameters.
|
181
|
+
Metrics/ParameterLists:
|
182
|
+
Exclude:
|
183
|
+
- 'lib/muffin_man/finances/v0.rb'
|
184
|
+
- 'lib/muffin_man/fulfillment_inbound/v0.rb'
|
185
|
+
- 'lib/muffin_man/product_fees/v0.rb'
|
186
|
+
- 'lib/muffin_man/request_helpers/inbound_shipment_plan_request_item.rb'
|
187
|
+
- 'lib/sp_api_helpers.rb'
|
188
|
+
|
189
|
+
# Offense count: 1
|
190
|
+
# Configuration parameters: EnforcedStyle, CheckMethodNames, CheckSymbols, AllowedIdentifiers, AllowedPatterns.
|
191
|
+
# SupportedStyles: snake_case, normalcase, non_integer
|
192
|
+
# AllowedIdentifiers: capture3, iso8601, rfc1123_date, rfc822, rfc2822, rfc3339
|
193
|
+
Naming/VariableNumber:
|
194
|
+
Exclude:
|
195
|
+
- 'spec/muffin_man/orders_spec.rb'
|
196
|
+
|
197
|
+
# Offense count: 2
|
198
|
+
RSpec/AnyInstance:
|
199
|
+
Exclude:
|
200
|
+
- 'spec/muffin_man/sp_api_client_spec.rb'
|
201
|
+
|
202
|
+
# Offense count: 1
|
203
|
+
# This cop supports safe autocorrection (--autocorrect).
|
204
|
+
# Configuration parameters: EnforcedStyle.
|
205
|
+
# SupportedStyles: be, be_nil
|
206
|
+
RSpec/BeNil:
|
207
|
+
Exclude:
|
208
|
+
- 'spec/muffin_man_spec.rb'
|
209
|
+
|
210
|
+
# Offense count: 2
|
211
|
+
# Configuration parameters: Prefixes, AllowedPatterns.
|
212
|
+
# Prefixes: when, with, without
|
213
|
+
RSpec/ContextWording:
|
214
|
+
Exclude:
|
215
|
+
- 'spec/muffin_man/sp_api_client_spec.rb'
|
216
|
+
|
217
|
+
# Offense count: 4
|
218
|
+
# This cop supports safe autocorrection (--autocorrect).
|
219
|
+
RSpec/EmptyLineAfterFinalLet:
|
220
|
+
Exclude:
|
221
|
+
- 'spec/muffin_man/product_fees_spec.rb'
|
222
|
+
- 'spec/muffin_man/sp_api_client_spec.rb'
|
223
|
+
|
224
|
+
# Offense count: 16
|
225
|
+
# This cop supports safe autocorrection (--autocorrect).
|
226
|
+
# Configuration parameters: AllowConsecutiveOneLiners.
|
227
|
+
RSpec/EmptyLineAfterHook:
|
228
|
+
Exclude:
|
229
|
+
- 'spec/muffin_man/authorization_spec.rb'
|
230
|
+
- 'spec/muffin_man/fba_inventory/v1_spec.rb'
|
231
|
+
- 'spec/muffin_man/fulfillment_inbound/v0_spec.rb'
|
232
|
+
- 'spec/muffin_man/fulfillment_inbound/v1_spec.rb'
|
233
|
+
- 'spec/muffin_man/listings_spec.rb'
|
234
|
+
- 'spec/muffin_man/product_fees_spec.rb'
|
235
|
+
- 'spec/muffin_man/product_pricing_spec.rb'
|
236
|
+
- 'spec/muffin_man/reports_spec.rb'
|
237
|
+
- 'spec/muffin_man/solicitations_spec.rb'
|
238
|
+
- 'spec/muffin_man/tokens_spec.rb'
|
239
|
+
|
240
|
+
# Offense count: 12
|
241
|
+
# Configuration parameters: Include, CustomTransform, IgnoreMethods, SpecSuffixOnly.
|
242
|
+
# Include: **/*_spec*rb*, **/spec/**/*
|
243
|
+
RSpec/FilePath:
|
244
|
+
Exclude:
|
245
|
+
- 'spec/muffin_man/authorization_spec.rb'
|
246
|
+
- 'spec/muffin_man/catalog_items_spec.rb'
|
247
|
+
- 'spec/muffin_man/catalog_items_v20220401_spec.rb'
|
248
|
+
- 'spec/muffin_man/finances_spec.rb'
|
249
|
+
- 'spec/muffin_man/listings_spec.rb'
|
250
|
+
- 'spec/muffin_man/lwa_spec.rb'
|
251
|
+
- 'spec/muffin_man/orders_spec.rb'
|
252
|
+
- 'spec/muffin_man/product_fees_spec.rb'
|
253
|
+
- 'spec/muffin_man/product_pricing_spec.rb'
|
254
|
+
- 'spec/muffin_man/reports_spec.rb'
|
255
|
+
- 'spec/muffin_man/solicitations_spec.rb'
|
256
|
+
- 'spec/muffin_man/tokens_spec.rb'
|
257
|
+
|
258
|
+
|
259
|
+
# Offense count: 15
|
260
|
+
# This cop supports safe autocorrection (--autocorrect).
|
261
|
+
RSpec/LeadingSubject:
|
262
|
+
Exclude:
|
263
|
+
- 'spec/muffin_man/authorization_spec.rb'
|
264
|
+
- 'spec/muffin_man/catalog_items_spec.rb'
|
265
|
+
- 'spec/muffin_man/catalog_items_v20220401_spec.rb'
|
266
|
+
- 'spec/muffin_man/fba_inventory/v1_spec.rb'
|
267
|
+
- 'spec/muffin_man/finances_spec.rb'
|
268
|
+
- 'spec/muffin_man/fulfillment_inbound/v0_spec.rb'
|
269
|
+
- 'spec/muffin_man/fulfillment_inbound/v1_spec.rb'
|
270
|
+
- 'spec/muffin_man/listings_spec.rb'
|
271
|
+
- 'spec/muffin_man/orders_spec.rb'
|
272
|
+
- 'spec/muffin_man/product_fees_spec.rb'
|
273
|
+
- 'spec/muffin_man/product_pricing_spec.rb'
|
274
|
+
- 'spec/muffin_man/reports_spec.rb'
|
275
|
+
- 'spec/muffin_man/solicitations_spec.rb'
|
276
|
+
- 'spec/muffin_man/sp_api_client_spec.rb'
|
277
|
+
- 'spec/muffin_man/tokens_spec.rb'
|
278
|
+
|
279
|
+
# Offense count: 2
|
280
|
+
RSpec/LeakyConstantDeclaration:
|
281
|
+
Exclude:
|
282
|
+
- 'spec/muffin_man/sp_api_client_spec.rb'
|
283
|
+
|
284
|
+
# Offense count: 1
|
285
|
+
RSpec/LetSetup:
|
286
|
+
Exclude:
|
287
|
+
- 'spec/muffin_man/sp_api_client_spec.rb'
|
288
|
+
|
289
|
+
# Offense count: 6
|
290
|
+
# Configuration parameters: .
|
291
|
+
# SupportedStyles: have_received, receive
|
292
|
+
RSpec/MessageSpies:
|
293
|
+
EnforcedStyle: receive
|
294
|
+
|
295
|
+
# Offense count: 4
|
296
|
+
# Configuration parameters: Max, AllowedGroups.
|
297
|
+
RSpec/NestedGroups:
|
298
|
+
Exclude:
|
299
|
+
- 'spec/muffin_man/sp_api_client_spec.rb'
|
300
|
+
|
301
|
+
# Offense count: 1
|
302
|
+
RSpec/StubbedMock:
|
303
|
+
Exclude:
|
304
|
+
- 'spec/muffin_man/sp_api_client_spec.rb'
|
305
|
+
|
306
|
+
# Offense count: 1
|
307
|
+
# This cop supports safe autocorrection (--autocorrect).
|
308
|
+
# Configuration parameters: EnforcedStyle, ProceduralMethods, FunctionalMethods, AllowedMethods, AllowedPatterns, IgnoredMethods, AllowBracesOnProceduralOneLiners, BracesRequiredMethods.
|
309
|
+
# SupportedStyles: line_count_based, semantic, braces_for_chaining, always_braces
|
310
|
+
# ProceduralMethods: benchmark, bm, bmbm, create, each_with_object, measure, new, realtime, tap, with_object
|
311
|
+
# FunctionalMethods: let, let!, subject, watch
|
312
|
+
# AllowedMethods: lambda, proc, it
|
313
|
+
Style/BlockDelimiters:
|
314
|
+
Exclude:
|
315
|
+
- 'spec/muffin_man/product_fees_spec.rb'
|
316
|
+
|
317
|
+
# Offense count: 1
|
318
|
+
# This cop supports unsafe autocorrection (--autocorrect-all).
|
319
|
+
# Configuration parameters: EnforcedStyle.
|
320
|
+
# SupportedStyles: nested, compact
|
321
|
+
Style/ClassAndModuleChildren:
|
322
|
+
Exclude:
|
323
|
+
- 'lib/muffin_man/lwa/auth_helper.rb'
|
324
|
+
|
325
|
+
# Offense count: 1
|
326
|
+
# This cop supports safe autocorrection (--autocorrect).
|
327
|
+
# Configuration parameters: EnforcedStyle, SingleLineConditionsOnly, IncludeTernaryExpressions.
|
328
|
+
# SupportedStyles: assign_to_condition, assign_inside_condition
|
329
|
+
Style/ConditionalAssignment:
|
330
|
+
Exclude:
|
331
|
+
- 'lib/muffin_man/sp_api_client.rb'
|
332
|
+
|
333
|
+
# Offense count: 38
|
334
|
+
# This cop supports unsafe autocorrection (--autocorrect-all).
|
335
|
+
# Configuration parameters: EnforcedStyle.
|
336
|
+
# SupportedStyles: always, always_true, never
|
337
|
+
Style/FrozenStringLiteralComment:
|
338
|
+
Exclude:
|
339
|
+
- 'lib/muffin_man.rb'
|
340
|
+
- 'lib/muffin_man/authorization/v1.rb'
|
341
|
+
- 'lib/muffin_man/catalog_items/base_api.rb'
|
342
|
+
- 'lib/muffin_man/catalog_items/v20201201.rb'
|
343
|
+
- 'lib/muffin_man/catalog_items/v20220401.rb'
|
344
|
+
- 'lib/muffin_man/fba_inventory/v1.rb'
|
345
|
+
- 'lib/muffin_man/finances/v0.rb'
|
346
|
+
- 'lib/muffin_man/fulfillment_inbound/v0.rb'
|
347
|
+
- 'lib/muffin_man/fulfillment_inbound/v1.rb'
|
348
|
+
- 'lib/muffin_man/listings/v20210801.rb'
|
349
|
+
- 'lib/muffin_man/lwa/auth_helper.rb'
|
350
|
+
- 'lib/muffin_man/orders/v0.rb'
|
351
|
+
- 'lib/muffin_man/reports/v20210630.rb'
|
352
|
+
- 'lib/muffin_man/request_helpers.rb'
|
353
|
+
- 'lib/muffin_man/request_helpers/base.rb'
|
354
|
+
- 'lib/muffin_man/request_helpers/inbound_shipment_plan_request_item.rb'
|
355
|
+
- 'lib/muffin_man/solicitations/v1.rb'
|
356
|
+
- 'lib/muffin_man/sp_api_client.rb'
|
357
|
+
- 'lib/muffin_man/tokens/v20210301.rb'
|
358
|
+
- 'muffin_man.gemspec'
|
359
|
+
- 'spec/muffin_man/authorization_spec.rb'
|
360
|
+
- 'spec/muffin_man/catalog_items_spec.rb'
|
361
|
+
- 'spec/muffin_man/catalog_items_v20220401_spec.rb'
|
362
|
+
- 'spec/muffin_man/fba_inventory/v1_spec.rb'
|
363
|
+
- 'spec/muffin_man/finances_spec.rb'
|
364
|
+
- 'spec/muffin_man/fulfillment_inbound/v0_spec.rb'
|
365
|
+
- 'spec/muffin_man/fulfillment_inbound/v1_spec.rb'
|
366
|
+
- 'spec/muffin_man/listings_spec.rb'
|
367
|
+
- 'spec/muffin_man/lwa_spec.rb'
|
368
|
+
- 'spec/muffin_man/orders_spec.rb'
|
369
|
+
- 'spec/muffin_man/product_fees_spec.rb'
|
370
|
+
- 'spec/muffin_man/product_pricing_spec.rb'
|
371
|
+
- 'spec/muffin_man/reports_spec.rb'
|
372
|
+
- 'spec/muffin_man/solicitations_spec.rb'
|
373
|
+
- 'spec/muffin_man/sp_api_client_spec.rb'
|
374
|
+
- 'spec/muffin_man/tokens_spec.rb'
|
375
|
+
- 'spec/support/lwa_helpers.rb'
|
376
|
+
- 'spec/support/sp_api_helpers.rb'
|
377
|
+
|
378
|
+
# Offense count: 4
|
379
|
+
# This cop supports safe autocorrection (--autocorrect).
|
380
|
+
# Configuration parameters: EnforcedStyle, EnforcedShorthandSyntax, UseHashRocketsWithSymbolValues, PreferHashRocketsForNonAlnumEndingSymbols.
|
381
|
+
# SupportedStyles: ruby19, hash_rockets, no_mixed_keys, ruby19_no_mixed_keys
|
382
|
+
# SupportedShorthandSyntax: always, never, either, consistent
|
383
|
+
Style/HashSyntax:
|
384
|
+
Exclude:
|
385
|
+
- 'spec/support/sp_api_helpers.rb'
|
386
|
+
|
387
|
+
# Offense count: 1
|
388
|
+
# This cop supports safe autocorrection (--autocorrect).
|
389
|
+
Style/IfUnlessModifier:
|
390
|
+
Exclude:
|
391
|
+
- 'lib/muffin_man/fulfillment_inbound/v0.rb'
|
392
|
+
|
393
|
+
# Offense count: 3
|
394
|
+
# This cop supports unsafe autocorrection (--autocorrect-all).
|
395
|
+
# Configuration parameters: EnforcedStyle.
|
396
|
+
# SupportedStyles: literals, strict
|
397
|
+
Style/MutableConstant:
|
398
|
+
Exclude:
|
399
|
+
- 'lib/muffin_man/orders/v0.rb'
|
400
|
+
- 'lib/muffin_man/solicitations/v1.rb'
|
401
|
+
|
402
|
+
# Offense count: 1
|
403
|
+
# This cop supports safe autocorrection (--autocorrect).
|
404
|
+
# Configuration parameters: PreferredDelimiters.
|
405
|
+
Style/PercentLiteralDelimiters:
|
406
|
+
Exclude:
|
407
|
+
- 'lib/muffin_man/catalog_items/v20220401.rb'
|
408
|
+
|
409
|
+
# Offense count: 6
|
410
|
+
# This cop supports safe autocorrection (--autocorrect).
|
411
|
+
Style/RedundantSelfAssignmentBranch:
|
412
|
+
Exclude:
|
413
|
+
- 'lib/muffin_man/reports/v20210630.rb'
|
414
|
+
|
415
|
+
# Offense count: 1
|
416
|
+
# This cop supports unsafe autocorrection (--autocorrect-all).
|
417
|
+
Style/SingleArgumentDig:
|
418
|
+
Exclude:
|
419
|
+
- 'spec/muffin_man/listings_spec.rb'
|
420
|
+
|
421
|
+
# Offense count: 1
|
422
|
+
# This cop supports unsafe autocorrection (--autocorrect-all).
|
423
|
+
# Configuration parameters: Mode.
|
424
|
+
Style/StringConcatenation:
|
425
|
+
Exclude:
|
426
|
+
- 'lib/muffin_man/solicitations/v1.rb'
|
427
|
+
|
428
|
+
# Offense count: 35
|
429
|
+
# This cop supports safe autocorrection (--autocorrect).
|
430
|
+
# Configuration parameters: EnforcedStyle, ConsistentQuotesInMultiline.
|
431
|
+
# SupportedStyles: single_quotes, double_quotes
|
432
|
+
Style/StringLiterals:
|
433
|
+
Exclude:
|
434
|
+
- 'lib/muffin_man/fba_inventory/v1.rb'
|
435
|
+
- 'lib/muffin_man/product_pricing/v0.rb'
|
436
|
+
- 'lib/muffin_man/reports/v20210630.rb'
|
437
|
+
- 'lib/muffin_man/request_helpers.rb'
|
438
|
+
- 'muffin_man.gemspec'
|
439
|
+
- 'spec/muffin_man/fba_inventory/v1_spec.rb'
|
440
|
+
- 'spec/muffin_man/fulfillment_inbound/v0_spec.rb'
|
441
|
+
- 'spec/muffin_man/fulfillment_inbound/v1_spec.rb'
|
442
|
+
- 'spec/muffin_man/orders_spec.rb'
|
443
|
+
- 'spec/muffin_man/product_pricing_spec.rb'
|
444
|
+
- 'spec/support/sp_api_helpers.rb'
|
445
|
+
|
446
|
+
# Offense count: 8
|
447
|
+
# This cop supports safe autocorrection (--autocorrect).
|
448
|
+
# Configuration parameters: EnforcedStyleForMultiline.
|
449
|
+
# SupportedStylesForMultiline: comma, consistent_comma, no_comma
|
450
|
+
Style/TrailingCommaInHashLiteral:
|
451
|
+
Exclude:
|
452
|
+
- 'lib/muffin_man/fulfillment_inbound/v0.rb'
|
453
|
+
- 'lib/muffin_man/fulfillment_inbound/v1.rb'
|
454
|
+
- 'spec/muffin_man/fulfillment_inbound/v0_spec.rb'
|
455
|
+
|
456
|
+
# Offense count: 2
|
457
|
+
# This cop supports safe autocorrection (--autocorrect).
|
458
|
+
# Configuration parameters: WordRegex.
|
459
|
+
# SupportedStyles: percent, brackets
|
460
|
+
Style/WordArray:
|
461
|
+
EnforcedStyle: percent
|
462
|
+
MinSize: 5
|
463
|
+
|
464
|
+
# Offense count: 41
|
465
|
+
# This cop supports safe autocorrection (--autocorrect).
|
466
|
+
# Configuration parameters: Max, AllowHeredoc, AllowURI, URISchemes, IgnoreCopDirectives, AllowedPatterns, IgnoredPatterns.
|
467
|
+
# URISchemes: http, https
|
468
|
+
Layout/LineLength:
|
469
|
+
Exclude:
|
470
|
+
- 'lib/muffin_man/finances/v0.rb'
|
471
|
+
- 'lib/muffin_man/fulfillment_inbound/v0.rb'
|
472
|
+
- 'lib/muffin_man/product_fees/v0.rb'
|
473
|
+
- 'lib/muffin_man/solicitations/v1.rb'
|
474
|
+
- 'lib/muffin_man/sp_api_client.rb'
|
475
|
+
- 'spec/muffin_man/fulfillment_inbound/v0_spec.rb'
|
476
|
+
- 'spec/muffin_man/listings_spec.rb'
|
477
|
+
- 'spec/muffin_man/lwa_spec.rb'
|
478
|
+
- 'spec/muffin_man/product_fees_spec.rb'
|
479
|
+
- 'spec/muffin_man/solicitations_spec.rb'
|
480
|
+
- 'spec/muffin_man/sp_api_client_spec.rb'
|
481
|
+
- 'spec/support/lwa_helpers.rb'
|
482
|
+
- 'spec/support/sp_api_helpers.rb'
|
data/CHANGELOG.md
CHANGED
@@ -1,4 +1,16 @@
|
|
1
|
-
#
|
1
|
+
# Unreleased
|
2
|
+
|
3
|
+
- Support for getInventorySummaries [#36](https://github.com/patterninc/muffin_man/pull/36)
|
4
|
+
|
5
|
+
# 1.5.3
|
6
|
+
|
7
|
+
- Support for Fulfillment Outbound [#34](https://github.com/patterninc/muffin_man/pull/34)
|
8
|
+
|
9
|
+
# 1.5.2
|
10
|
+
|
11
|
+
- Support for Feeds and Notifications [#33](https://github.com/patterninc/muffin_man/pull/33)
|
12
|
+
|
13
|
+
# 1.5.1
|
2
14
|
|
3
15
|
- Support for getItemEligibilityPreview [#35](https://github.com/patterninc/muffin_man/pull/35)
|
4
16
|
|
data/Gemfile
CHANGED
data/README.md
CHANGED
@@ -0,0 +1,30 @@
|
|
1
|
+
module MuffinMan
|
2
|
+
module FbaInventory
|
3
|
+
class V1 < SpApiClient
|
4
|
+
|
5
|
+
GET_INVENTORY_SUMMARIES_PARAMS = %w[
|
6
|
+
details
|
7
|
+
granularityType
|
8
|
+
granularityId
|
9
|
+
startDateTime
|
10
|
+
sellerSkus
|
11
|
+
nextToken
|
12
|
+
marketplaceIds
|
13
|
+
].freeze
|
14
|
+
|
15
|
+
# NOTE: when passing nextToken, if the original request had a
|
16
|
+
# startDateTime, that must be included in subsequent requests.
|
17
|
+
def get_inventory_summaries(params)
|
18
|
+
if sandbox
|
19
|
+
params['granularityType'] = 'Marketplace'
|
20
|
+
params['granularityId'] = 'ATVPDKIKX0DER'
|
21
|
+
params['marketplaceIds'] = 'ATVPDKIKX0DER'
|
22
|
+
end
|
23
|
+
@local_var_path = "/fba/inventory/v1/summaries"
|
24
|
+
@query_params = params.slice(*GET_INVENTORY_SUMMARIES_PARAMS)
|
25
|
+
@request_type = "GET"
|
26
|
+
call_api
|
27
|
+
end
|
28
|
+
end
|
29
|
+
end
|
30
|
+
end
|
@@ -0,0 +1,45 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module MuffinMan
|
4
|
+
module Feeds
|
5
|
+
require "sp_api_helpers"
|
6
|
+
class V20210630 < SpApiClient
|
7
|
+
FEED_PATH = "/feeds/2021-06-30"
|
8
|
+
|
9
|
+
def create_feed(feed_type, marketplace_ids, input_feed_document_id, params = {})
|
10
|
+
@local_var_path = "#{FEED_PATH}/feeds"
|
11
|
+
@request_body = { "feedType" => feed_type, "marketplaceIds" => marketplace_ids,
|
12
|
+
"inputFeedDocumentId" => input_feed_document_id }.merge(sp_api_params(params))
|
13
|
+
@request_type = "POST"
|
14
|
+
call_api
|
15
|
+
end
|
16
|
+
|
17
|
+
def get_feeds(params)
|
18
|
+
@local_var_path = "#{FEED_PATH}/feeds"
|
19
|
+
sp_api_params = sp_api_params(params)
|
20
|
+
@query_params = sp_api_params.key?("nextToken") ? sp_api_params.slice("nextToken") : sp_api_params
|
21
|
+
@request_type = "GET"
|
22
|
+
call_api
|
23
|
+
end
|
24
|
+
|
25
|
+
def get_feed(feed_id)
|
26
|
+
@local_var_path = "#{FEED_PATH}/feeds/#{feed_id}"
|
27
|
+
@request_type = "GET"
|
28
|
+
call_api
|
29
|
+
end
|
30
|
+
|
31
|
+
def create_feed_document(content_type, params = {})
|
32
|
+
@local_var_path = "#{FEED_PATH}/documents"
|
33
|
+
@request_body = { "contentType" => content_type }.merge(sp_api_params(params))
|
34
|
+
@request_type = "POST"
|
35
|
+
call_api
|
36
|
+
end
|
37
|
+
|
38
|
+
def get_feed_document(feed_document_id)
|
39
|
+
@local_var_path = "#{FEED_PATH}/documents/#{feed_document_id}"
|
40
|
+
@request_type = "GET"
|
41
|
+
call_api
|
42
|
+
end
|
43
|
+
end
|
44
|
+
end
|
45
|
+
end
|