flex_commerce_api 0.6.57
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.env.example +6 -0
- data/.gitignore +14 -0
- data/.rspec +4 -0
- data/.rubocop.yml +1065 -0
- data/.ruby-gemset +1 -0
- data/.ruby-version +1 -0
- data/.travis.yml +3 -0
- data/Gemfile +4 -0
- data/LICENSE.txt +21 -0
- data/README.md +56 -0
- data/Rakefile +1 -0
- data/app/models/address.rb +41 -0
- data/app/models/asset_file.rb +26 -0
- data/app/models/asset_folder.rb +14 -0
- data/app/models/bundle.rb +20 -0
- data/app/models/bundle_group.rb +15 -0
- data/app/models/cart.rb +136 -0
- data/app/models/category.rb +70 -0
- data/app/models/category_tree.rb +11 -0
- data/app/models/component.rb +8 -0
- data/app/models/container_coupon.rb +12 -0
- data/app/models/country.rb +11 -0
- data/app/models/coupon.rb +18 -0
- data/app/models/customer_account.rb +96 -0
- data/app/models/customer_account_authentication.rb +5 -0
- data/app/models/customer_segment.rb +6 -0
- data/app/models/customer_segment_member.rb +6 -0
- data/app/models/data_attribute.rb +6 -0
- data/app/models/data_store_record.rb +9 -0
- data/app/models/data_store_type.rb +9 -0
- data/app/models/discount_summary.rb +12 -0
- data/app/models/email.rb +5 -0
- data/app/models/ewis_opt_in.rb +8 -0
- data/app/models/external_url.rb +6 -0
- data/app/models/free_shipping_promotion.rb +12 -0
- data/app/models/import.rb +6 -0
- data/app/models/import_entry.rb +6 -0
- data/app/models/line_item.rb +34 -0
- data/app/models/line_item_discount.rb +7 -0
- data/app/models/markdown_price.rb +11 -0
- data/app/models/menu.rb +36 -0
- data/app/models/menu_item.rb +7 -0
- data/app/models/menu_item_item.rb +5 -0
- data/app/models/note.rb +18 -0
- data/app/models/order.rb +38 -0
- data/app/models/password_recovery.rb +20 -0
- data/app/models/payment_address_verification.rb +13 -0
- data/app/models/payment_process.rb +13 -0
- data/app/models/payment_provider.rb +15 -0
- data/app/models/payment_transaction.rb +13 -0
- data/app/models/product.rb +99 -0
- data/app/models/product_asset_file.rb +12 -0
- data/app/models/promotion.rb +19 -0
- data/app/models/promotion_qualifying_product_exclusion.rb +8 -0
- data/app/models/redirect.rb +14 -0
- data/app/models/refund.rb +14 -0
- data/app/models/remote_address.rb +22 -0
- data/app/models/remote_line_item.rb +11 -0
- data/app/models/remote_order.rb +15 -0
- data/app/models/remote_shipping_method.rb +12 -0
- data/app/models/report.rb +18 -0
- data/app/models/report_invocation.rb +18 -0
- data/app/models/retail_store.rb +18 -0
- data/app/models/role.rb +6 -0
- data/app/models/search_suggestion.rb +17 -0
- data/app/models/section.rb +9 -0
- data/app/models/session.rb +8 -0
- data/app/models/shipping_method.rb +26 -0
- data/app/models/slug.rb +19 -0
- data/app/models/static_page.rb +60 -0
- data/app/models/static_page_folder.rb +8 -0
- data/app/models/stock_level.rb +21 -0
- data/app/models/tax_code.rb +6 -0
- data/app/models/taxonomy.rb +5 -0
- data/app/models/template.rb +9 -0
- data/app/models/template_component.rb +11 -0
- data/app/models/template_definition.rb +12 -0
- data/app/models/template_section.rb +12 -0
- data/app/models/user.rb +8 -0
- data/app/models/user_profile.rb +6 -0
- data/app/models/v2/create_order.rb +10 -0
- data/app/models/v2/deallocate_order.rb +10 -0
- data/app/models/v2/line_item.rb +9 -0
- data/app/models/v2/order.rb +9 -0
- data/app/models/v2/unallocate_order.rb +10 -0
- data/app/models/variant.rb +18 -0
- data/app/models/webhook.rb +17 -0
- data/app/services/param_to_shql.rb +72 -0
- data/app/services/surrogate_keys.rb +44 -0
- data/bin/console +14 -0
- data/bin/setup +7 -0
- data/config/locales/payments.en.yml +3 -0
- data/flex-commerce-api.gemspec +41 -0
- data/lib/flex_commerce.rb +95 -0
- data/lib/flex_commerce_api.rb +21 -0
- data/lib/flex_commerce_api/api_base.rb +11 -0
- data/lib/flex_commerce_api/base_resource.rb +250 -0
- data/lib/flex_commerce_api/config.rb +55 -0
- data/lib/flex_commerce_api/error/access_denied.rb +6 -0
- data/lib/flex_commerce_api/error/bad_request.rb +10 -0
- data/lib/flex_commerce_api/error/base.rb +12 -0
- data/lib/flex_commerce_api/error/client_error.rb +7 -0
- data/lib/flex_commerce_api/error/connection_error.rb +6 -0
- data/lib/flex_commerce_api/error/internal_server.rb +37 -0
- data/lib/flex_commerce_api/error/not_found.rb +13 -0
- data/lib/flex_commerce_api/error/record_invalid.rb +16 -0
- data/lib/flex_commerce_api/error/unexpected_status.rb +7 -0
- data/lib/flex_commerce_api/errors.rb +13 -0
- data/lib/flex_commerce_api/json_api_client_extension/builder.rb +28 -0
- data/lib/flex_commerce_api/json_api_client_extension/capture_surrogate_keys_middleware.rb +16 -0
- data/lib/flex_commerce_api/json_api_client_extension/flexible_connection.rb +59 -0
- data/lib/flex_commerce_api/json_api_client_extension/has_many_association_proxy.rb +60 -0
- data/lib/flex_commerce_api/json_api_client_extension/included_data.rb +27 -0
- data/lib/flex_commerce_api/json_api_client_extension/json_format_middleware.rb +20 -0
- data/lib/flex_commerce_api/json_api_client_extension/logging_middleware.rb +24 -0
- data/lib/flex_commerce_api/json_api_client_extension/paginator.rb +26 -0
- data/lib/flex_commerce_api/json_api_client_extension/parse_json.rb +23 -0
- data/lib/flex_commerce_api/json_api_client_extension/parsers/parser.rb +16 -0
- data/lib/flex_commerce_api/json_api_client_extension/previewed_request_middleware.rb +17 -0
- data/lib/flex_commerce_api/json_api_client_extension/remote_builder.rb +29 -0
- data/lib/flex_commerce_api/json_api_client_extension/requestor.rb +42 -0
- data/lib/flex_commerce_api/json_api_client_extension/save_request_body_middleware.rb +20 -0
- data/lib/flex_commerce_api/json_api_client_extension/status_middleware.rb +40 -0
- data/lib/flex_commerce_api/v2/api_base.rb +13 -0
- data/lib/flex_commerce_api/version.rb +3 -0
- data/lib/json_erb.rb +9 -0
- data/lib/json_struct.rb +73 -0
- data/lib/patches.rb +4 -0
- data/lib/patches/json_api_client/resource.rb +50 -0
- data/lib/paypal_express.rb +3 -0
- data/lib/paypal_express/additional_info.rb +45 -0
- data/lib/paypal_express/api.rb +86 -0
- data/lib/paypal_express/auth.rb +83 -0
- data/lib/paypal_express/cart_shipping_method.rb +38 -0
- data/lib/paypal_express/exception/access_denied.rb +10 -0
- data/lib/paypal_express/exception/connection_error.rb +10 -0
- data/lib/paypal_express/exception/not_authorized.rb +10 -0
- data/lib/paypal_express/exception/transaction.rb +15 -0
- data/lib/paypal_express/generate_summary.rb +118 -0
- data/lib/paypal_express/process/paypal_params.rb +123 -0
- data/lib/paypal_express/process/response_parser.rb +146 -0
- data/lib/paypal_express/setup.rb +94 -0
- data/lib/paypal_express/shipping_methods_for_cart.rb +46 -0
- data/lib/retry.rb +20 -0
- data/schemas/jsonapi/schema.json +370 -0
- data/schemas/shift/v1/documents/collection/address.json +45 -0
- data/schemas/shift/v1/documents/collection/asset_file.json +43 -0
- data/schemas/shift/v1/documents/collection/asset_folder.json +43 -0
- data/schemas/shift/v1/documents/collection/customer_account.json +50 -0
- data/schemas/shift/v1/documents/collection/markdown_price.json +43 -0
- data/schemas/shift/v1/documents/collection/product.json +43 -0
- data/schemas/shift/v1/documents/collection/variant.json +43 -0
- data/schemas/shift/v1/documents/member/address.json +39 -0
- data/schemas/shift/v1/documents/member/asset_file.json +37 -0
- data/schemas/shift/v1/documents/member/asset_folder.json +39 -0
- data/schemas/shift/v1/documents/member/customer_account.json +44 -0
- data/schemas/shift/v1/documents/member/markdown_price.json +37 -0
- data/schemas/shift/v1/documents/member/product.json +39 -0
- data/schemas/shift/v1/documents/member/variant.json +46 -0
- data/schemas/shift/v1/resources/address.json +130 -0
- data/schemas/shift/v1/resources/asset_file.json +146 -0
- data/schemas/shift/v1/resources/asset_folder.json +188 -0
- data/schemas/shift/v1/resources/customer_account.json +339 -0
- data/schemas/shift/v1/resources/markdown_price.json +52 -0
- data/schemas/shift/v1/resources/product.json +230 -0
- data/schemas/shift/v1/resources/variant.json +298 -0
- data/tasks/json_schema.thor +275 -0
- data/todo.md +8 -0
- metadata +470 -0
@@ -0,0 +1,339 @@
|
|
1
|
+
{
|
2
|
+
"$schema": "http://json-schema.org/draft-04/schema#",
|
3
|
+
"type": "object",
|
4
|
+
"properties": {
|
5
|
+
"id": {
|
6
|
+
"type": "string",
|
7
|
+
"description": "A unique identifier for the customer account"
|
8
|
+
},
|
9
|
+
"type": {
|
10
|
+
"type": "string",
|
11
|
+
"description": "The json_api type for any customer account",
|
12
|
+
"pattern": "^customer_accounts$"
|
13
|
+
},
|
14
|
+
"attributes": {
|
15
|
+
"type": "object",
|
16
|
+
"properties": {
|
17
|
+
"meta_attributes": {
|
18
|
+
"type": "object",
|
19
|
+
"description": "Description for meta_attributes"
|
20
|
+
},
|
21
|
+
"email": {
|
22
|
+
"type": "string",
|
23
|
+
"description": "Description for email"
|
24
|
+
},
|
25
|
+
"reference": {
|
26
|
+
"type": "string",
|
27
|
+
"description": "Description for reference"
|
28
|
+
}
|
29
|
+
}
|
30
|
+
},
|
31
|
+
"relationships": {
|
32
|
+
"type": "object",
|
33
|
+
"properties": {
|
34
|
+
"addresses": {
|
35
|
+
"type": "object",
|
36
|
+
"properties": {
|
37
|
+
"links": {
|
38
|
+
"type": "object",
|
39
|
+
"properties": {
|
40
|
+
"self": {
|
41
|
+
"type": "string"
|
42
|
+
},
|
43
|
+
"related": {
|
44
|
+
"type": "string"
|
45
|
+
}
|
46
|
+
},
|
47
|
+
"additionalProperties": false
|
48
|
+
},
|
49
|
+
"data": {
|
50
|
+
"oneOf": [
|
51
|
+
{
|
52
|
+
"type": "object",
|
53
|
+
"description": "The id and type form a pointer into the 'included' top level document property",
|
54
|
+
"properties": {
|
55
|
+
"id": {
|
56
|
+
"type": "string"
|
57
|
+
},
|
58
|
+
"type": {
|
59
|
+
"type": "string"
|
60
|
+
}
|
61
|
+
},
|
62
|
+
"additionalProperties": false
|
63
|
+
},
|
64
|
+
{
|
65
|
+
"type": "array",
|
66
|
+
"items": {
|
67
|
+
"type": "object",
|
68
|
+
"description": "The id and type form a pointer into the 'included' top level document property",
|
69
|
+
"properties": {
|
70
|
+
"id": {
|
71
|
+
"type": "string"
|
72
|
+
},
|
73
|
+
"type": {
|
74
|
+
"type": "string"
|
75
|
+
}
|
76
|
+
},
|
77
|
+
"additionalProperties": false
|
78
|
+
}
|
79
|
+
}
|
80
|
+
]
|
81
|
+
},
|
82
|
+
"meta": {
|
83
|
+
"type": "object",
|
84
|
+
"additionalProperties": true
|
85
|
+
}
|
86
|
+
}
|
87
|
+
},
|
88
|
+
"orders": {
|
89
|
+
"type": "object",
|
90
|
+
"properties": {
|
91
|
+
"links": {
|
92
|
+
"type": "object",
|
93
|
+
"properties": {
|
94
|
+
"self": {
|
95
|
+
"type": "string"
|
96
|
+
},
|
97
|
+
"related": {
|
98
|
+
"type": "string"
|
99
|
+
}
|
100
|
+
},
|
101
|
+
"additionalProperties": false
|
102
|
+
},
|
103
|
+
"data": {
|
104
|
+
"oneOf": [
|
105
|
+
{
|
106
|
+
"type": "object",
|
107
|
+
"description": "The id and type form a pointer into the 'included' top level document property",
|
108
|
+
"properties": {
|
109
|
+
"id": {
|
110
|
+
"type": "string"
|
111
|
+
},
|
112
|
+
"type": {
|
113
|
+
"type": "string"
|
114
|
+
}
|
115
|
+
},
|
116
|
+
"additionalProperties": false
|
117
|
+
},
|
118
|
+
{
|
119
|
+
"type": "array",
|
120
|
+
"items": {
|
121
|
+
"type": "object",
|
122
|
+
"description": "The id and type form a pointer into the 'included' top level document property",
|
123
|
+
"properties": {
|
124
|
+
"id": {
|
125
|
+
"type": "string"
|
126
|
+
},
|
127
|
+
"type": {
|
128
|
+
"type": "string"
|
129
|
+
}
|
130
|
+
},
|
131
|
+
"additionalProperties": false
|
132
|
+
}
|
133
|
+
}
|
134
|
+
]
|
135
|
+
},
|
136
|
+
"meta": {
|
137
|
+
"type": "object",
|
138
|
+
"additionalProperties": true
|
139
|
+
}
|
140
|
+
}
|
141
|
+
},
|
142
|
+
"cart": {
|
143
|
+
"type": "object",
|
144
|
+
"properties": {
|
145
|
+
"links": {
|
146
|
+
"type": "object",
|
147
|
+
"properties": {
|
148
|
+
"self": {
|
149
|
+
"type": "string"
|
150
|
+
},
|
151
|
+
"related": {
|
152
|
+
"type": "string"
|
153
|
+
}
|
154
|
+
},
|
155
|
+
"additionalProperties": false
|
156
|
+
},
|
157
|
+
"data": {
|
158
|
+
"type": "object",
|
159
|
+
"description": "The id and type form a pointer into the 'included' top level document property",
|
160
|
+
"properties": {
|
161
|
+
"id": {
|
162
|
+
"type": "string"
|
163
|
+
},
|
164
|
+
"type": {
|
165
|
+
"type": "string"
|
166
|
+
}
|
167
|
+
},
|
168
|
+
"additionalProperties": false
|
169
|
+
},
|
170
|
+
"meta": {
|
171
|
+
"type": "object",
|
172
|
+
"additionalProperties": true
|
173
|
+
}
|
174
|
+
}
|
175
|
+
},
|
176
|
+
"customer_segments": {
|
177
|
+
"type": "object",
|
178
|
+
"properties": {
|
179
|
+
"links": {
|
180
|
+
"type": "object",
|
181
|
+
"properties": {
|
182
|
+
"self": {
|
183
|
+
"type": "string"
|
184
|
+
},
|
185
|
+
"related": {
|
186
|
+
"type": "string"
|
187
|
+
}
|
188
|
+
},
|
189
|
+
"additionalProperties": false
|
190
|
+
},
|
191
|
+
"data": {
|
192
|
+
"type": "array",
|
193
|
+
"items": {
|
194
|
+
"type": "object",
|
195
|
+
"description": "The id and type form a pointer into the 'included' top level document property",
|
196
|
+
"properties": {
|
197
|
+
"id": {
|
198
|
+
"type": "string"
|
199
|
+
},
|
200
|
+
"type": {
|
201
|
+
"type": "string"
|
202
|
+
}
|
203
|
+
},
|
204
|
+
"additionalProperties": false
|
205
|
+
}
|
206
|
+
},
|
207
|
+
"meta": {
|
208
|
+
"type": "object",
|
209
|
+
"additionalProperties": true
|
210
|
+
}
|
211
|
+
}
|
212
|
+
},
|
213
|
+
"notes": {
|
214
|
+
"type": "object",
|
215
|
+
"properties": {
|
216
|
+
"links": {
|
217
|
+
"type": "object",
|
218
|
+
"properties": {
|
219
|
+
"self": {
|
220
|
+
"type": "string"
|
221
|
+
},
|
222
|
+
"related": {
|
223
|
+
"type": "string"
|
224
|
+
}
|
225
|
+
},
|
226
|
+
"additionalProperties": false
|
227
|
+
},
|
228
|
+
"data": {
|
229
|
+
"oneOf": [
|
230
|
+
{
|
231
|
+
"type": "object",
|
232
|
+
"description": "The id and type form a pointer into the 'included' top level document property",
|
233
|
+
"properties": {
|
234
|
+
"id": {
|
235
|
+
"type": "string"
|
236
|
+
},
|
237
|
+
"type": {
|
238
|
+
"type": "string"
|
239
|
+
}
|
240
|
+
},
|
241
|
+
"additionalProperties": false
|
242
|
+
},
|
243
|
+
{
|
244
|
+
"type": "array",
|
245
|
+
"items": {
|
246
|
+
"type": "object",
|
247
|
+
"description": "The id and type form a pointer into the 'included' top level document property",
|
248
|
+
"properties": {
|
249
|
+
"id": {
|
250
|
+
"type": "string"
|
251
|
+
},
|
252
|
+
"type": {
|
253
|
+
"type": "string"
|
254
|
+
}
|
255
|
+
},
|
256
|
+
"additionalProperties": false
|
257
|
+
}
|
258
|
+
}
|
259
|
+
]
|
260
|
+
},
|
261
|
+
"meta": {
|
262
|
+
"type": "object",
|
263
|
+
"additionalProperties": true
|
264
|
+
}
|
265
|
+
}
|
266
|
+
},
|
267
|
+
"password_recovery": {
|
268
|
+
"type": "object",
|
269
|
+
"properties": {
|
270
|
+
"links": {
|
271
|
+
"type": "object",
|
272
|
+
"properties": {
|
273
|
+
"self": {
|
274
|
+
"type": "string"
|
275
|
+
},
|
276
|
+
"related": {
|
277
|
+
"type": "string"
|
278
|
+
}
|
279
|
+
},
|
280
|
+
"additionalProperties": false
|
281
|
+
},
|
282
|
+
"data": {
|
283
|
+
"oneOf": [
|
284
|
+
{
|
285
|
+
"type": "object",
|
286
|
+
"description": "The id and type form a pointer into the 'included' top level document property",
|
287
|
+
"properties": {
|
288
|
+
"id": {
|
289
|
+
"type": "string"
|
290
|
+
},
|
291
|
+
"type": {
|
292
|
+
"type": "string"
|
293
|
+
}
|
294
|
+
},
|
295
|
+
"additionalProperties": false
|
296
|
+
},
|
297
|
+
{
|
298
|
+
"type": "array",
|
299
|
+
"items": {
|
300
|
+
"type": "object",
|
301
|
+
"description": "The id and type form a pointer into the 'included' top level document property",
|
302
|
+
"properties": {
|
303
|
+
"id": {
|
304
|
+
"type": "string"
|
305
|
+
},
|
306
|
+
"type": {
|
307
|
+
"type": "string"
|
308
|
+
}
|
309
|
+
},
|
310
|
+
"additionalProperties": false
|
311
|
+
}
|
312
|
+
}
|
313
|
+
]
|
314
|
+
},
|
315
|
+
"meta": {
|
316
|
+
"type": "object",
|
317
|
+
"additionalProperties": true
|
318
|
+
}
|
319
|
+
}
|
320
|
+
}
|
321
|
+
}
|
322
|
+
},
|
323
|
+
"links": {
|
324
|
+
"type": "object",
|
325
|
+
"properties": {
|
326
|
+
"self": {
|
327
|
+
"type": "string"
|
328
|
+
}
|
329
|
+
},
|
330
|
+
"additionalProperties": false
|
331
|
+
},
|
332
|
+
"meta": {
|
333
|
+
"type": "object",
|
334
|
+
"additionalProperties": false
|
335
|
+
}
|
336
|
+
},
|
337
|
+
"definitions": {
|
338
|
+
}
|
339
|
+
}
|
@@ -0,0 +1,52 @@
|
|
1
|
+
{
|
2
|
+
"$schema": "http://json-schema.org/draft-04/schema#",
|
3
|
+
"type": "object",
|
4
|
+
"properties": {
|
5
|
+
"id": {
|
6
|
+
"type": "string",
|
7
|
+
"description": "A unique identifier for the markdown_price.json"
|
8
|
+
},
|
9
|
+
"type": {
|
10
|
+
"type": "string",
|
11
|
+
"description": "The json_api type for any markdown_price.json",
|
12
|
+
"pattern": "^markdown_prices$"
|
13
|
+
},
|
14
|
+
"attributes": {
|
15
|
+
"type": "object",
|
16
|
+
"properties": {
|
17
|
+
"price": {
|
18
|
+
"type": "number",
|
19
|
+
"description": "Description for price"
|
20
|
+
},
|
21
|
+
"start_at": {
|
22
|
+
"type": "string",
|
23
|
+
"description": "Description for start_at"
|
24
|
+
},
|
25
|
+
"end_at": {
|
26
|
+
"type": "string",
|
27
|
+
"description": "Description for end_at"
|
28
|
+
}
|
29
|
+
}
|
30
|
+
},
|
31
|
+
"relationships": {
|
32
|
+
"type": "object",
|
33
|
+
"properties": {
|
34
|
+
}
|
35
|
+
},
|
36
|
+
"links": {
|
37
|
+
"type": "object",
|
38
|
+
"properties": {
|
39
|
+
"self": {
|
40
|
+
"type": "string"
|
41
|
+
}
|
42
|
+
},
|
43
|
+
"additionalProperties": false
|
44
|
+
},
|
45
|
+
"meta": {
|
46
|
+
"type": "object",
|
47
|
+
"additionalProperties": false
|
48
|
+
}
|
49
|
+
},
|
50
|
+
"definitions": {
|
51
|
+
}
|
52
|
+
}
|
@@ -0,0 +1,230 @@
|
|
1
|
+
{
|
2
|
+
"$schema": "http://json-schema.org/draft-04/schema#",
|
3
|
+
"type": "object",
|
4
|
+
"properties": {
|
5
|
+
"id": { "type": "string" },
|
6
|
+
"type": { "type": "string", "pattern": "^products$" },
|
7
|
+
"attributes":{
|
8
|
+
"type": "object",
|
9
|
+
"properties": {
|
10
|
+
"title": { "type": "string" },
|
11
|
+
"description": { "type": ["string", "null"] },
|
12
|
+
"content_type": { "type": "string" },
|
13
|
+
"reference": { "type": "string" },
|
14
|
+
"sellable": { "type": "boolean" },
|
15
|
+
"has_assets": { "type": "boolean" },
|
16
|
+
"ewis_status": { "type": "string" },
|
17
|
+
"available_to_browse": { "type": "boolean" },
|
18
|
+
"merchandised": { "type": "boolean" },
|
19
|
+
"published": { "type": "boolean" },
|
20
|
+
"slug": { "type": "string" },
|
21
|
+
"canonical_path": { "type": "string" },
|
22
|
+
"min_price": { "type": ["number", "null"] },
|
23
|
+
"max_price": { "type": ["number", "null"] },
|
24
|
+
"min_current_price": { "type": ["number", "null"] },
|
25
|
+
"max_current_price": { "type": ["number", "null"] },
|
26
|
+
"total_ratings": { "type": ["number", "null"] },
|
27
|
+
"average_rating": { "type": ["number", "null"] },
|
28
|
+
"rating": { "type": ["number", "null"] },
|
29
|
+
"web_product_name": { "type": "string" },
|
30
|
+
"web_product_description": { "type": "string" },
|
31
|
+
"seo_meta_title": { "type": "string" },
|
32
|
+
"seo_meta_description": { "type": "string" },
|
33
|
+
"seo_meta_keywords": { "type": "string" },
|
34
|
+
"picture_url": { "type": ["string", "null"] },
|
35
|
+
"category_ids_cache": {
|
36
|
+
"type": "array",
|
37
|
+
"items": { "type": "integer" }
|
38
|
+
},
|
39
|
+
"attribute_merchandising": { "type": "object" },
|
40
|
+
"merged_attribute_merchandising": { "type": "object" },
|
41
|
+
"meta_attributes": { "type": "object" },
|
42
|
+
"template_attributes": { "type": "object" },
|
43
|
+
"created_at": { "type": "string", "format": "date-time" },
|
44
|
+
"updated_at": { "type": "string", "format": "date-time" },
|
45
|
+
"deleted_at": { "type": ["null", "string"], "format": "date-time" }
|
46
|
+
},
|
47
|
+
"required": [
|
48
|
+
"title", "description", "content_type", "reference", "sellable", "has_assets", "ewis_status",
|
49
|
+
"available_to_browse", "merchandised", "published", "slug", "canonical_path", "min_price",
|
50
|
+
"max_price", "min_current_price", "max_current_price", "total_ratings", "average_rating", "rating",
|
51
|
+
"web_product_name", "web_product_description", "seo_meta_title", "seo_meta_description", "seo_meta_keywords",
|
52
|
+
"picture_url", "category_ids_cache", "attribute_merchandising", "merged_attribute_merchandising", "meta_attributes",
|
53
|
+
"created_at", "updated_at", "deleted_at"
|
54
|
+
],
|
55
|
+
"additionalProperties": false
|
56
|
+
},
|
57
|
+
"relationships": {
|
58
|
+
"type": "object",
|
59
|
+
"properties": {
|
60
|
+
"variants": {
|
61
|
+
"type": "object",
|
62
|
+
"properties": {
|
63
|
+
"links": {
|
64
|
+
"type": "object",
|
65
|
+
"properties": {
|
66
|
+
"self": { "type": "string" },
|
67
|
+
"related": { "type": "string" }
|
68
|
+
},
|
69
|
+
"required": ["self", "related"],
|
70
|
+
"additionalProperties": false
|
71
|
+
},
|
72
|
+
"data": {
|
73
|
+
"type": "array",
|
74
|
+
"items": {
|
75
|
+
"type": "object",
|
76
|
+
"properties": {
|
77
|
+
"id": {"type": "string"},
|
78
|
+
"type": {"type": "string", "pattern": "^variants$"}
|
79
|
+
},
|
80
|
+
"required": ["id", "type"],
|
81
|
+
"additionalProperties": false
|
82
|
+
}
|
83
|
+
}
|
84
|
+
},
|
85
|
+
"required": ["links"],
|
86
|
+
"additionalProperties": false
|
87
|
+
},
|
88
|
+
"asset_files": {
|
89
|
+
"type": "object",
|
90
|
+
"properties": {
|
91
|
+
"links": {
|
92
|
+
"type": "object",
|
93
|
+
"properties": {
|
94
|
+
"self": { "type": "string" },
|
95
|
+
"related": { "type": "string" }
|
96
|
+
},
|
97
|
+
"required": ["self", "related"],
|
98
|
+
"additionalProperties": false
|
99
|
+
},
|
100
|
+
"data": {
|
101
|
+
"type": "array",
|
102
|
+
"items": {
|
103
|
+
"type": "object",
|
104
|
+
"properties": {
|
105
|
+
"id": {"type": "string"},
|
106
|
+
"type": {"type": "string", "pattern": "^asset_files$"}
|
107
|
+
},
|
108
|
+
"required": ["id", "type"],
|
109
|
+
"additionalProperties": false
|
110
|
+
}
|
111
|
+
}
|
112
|
+
}
|
113
|
+
},
|
114
|
+
"bundles": {
|
115
|
+
"type": "object",
|
116
|
+
"properties": {
|
117
|
+
"links": {
|
118
|
+
"type": "object",
|
119
|
+
"properties": {
|
120
|
+
"self": { "type": "string" },
|
121
|
+
"related": { "type": "string" }
|
122
|
+
},
|
123
|
+
"required": ["self", "related"],
|
124
|
+
"additionalProperties": false
|
125
|
+
},
|
126
|
+
"data": {
|
127
|
+
"type": "array",
|
128
|
+
"items": {
|
129
|
+
"type": "object",
|
130
|
+
"properties": {
|
131
|
+
"id": {"type": "string"},
|
132
|
+
"type": {"type": "string", "pattern": "^bundles$"}
|
133
|
+
},
|
134
|
+
"required": ["id", "type"],
|
135
|
+
"additionalProperties": false
|
136
|
+
}
|
137
|
+
}
|
138
|
+
},
|
139
|
+
"required": ["links"],
|
140
|
+
"additionalProperties": false
|
141
|
+
},
|
142
|
+
"template_definition": {
|
143
|
+
"type": "object",
|
144
|
+
"properties": {
|
145
|
+
"links": {
|
146
|
+
"type": "object",
|
147
|
+
"properties": {
|
148
|
+
"self": { "type": "string" },
|
149
|
+
"related": { "type": "string" }
|
150
|
+
},
|
151
|
+
"required": ["self", "related"],
|
152
|
+
"additionalProperties": false
|
153
|
+
},
|
154
|
+
"data": {
|
155
|
+
"type": ["object", "null"],
|
156
|
+
"properties": {
|
157
|
+
"type": { "type": "string", "pattern": "^template_definitions$" },
|
158
|
+
"id": { "type": "string" }
|
159
|
+
},
|
160
|
+
"required": ["type", "id"],
|
161
|
+
"additionalProperties": false
|
162
|
+
}
|
163
|
+
},
|
164
|
+
"required": ["links"],
|
165
|
+
"additionalProperties": false
|
166
|
+
},
|
167
|
+
"template": {
|
168
|
+
"type": "object",
|
169
|
+
"properties": {
|
170
|
+
"links": {
|
171
|
+
"type": "object",
|
172
|
+
"properties": {
|
173
|
+
"self": { "type": "string" },
|
174
|
+
"related": { "type": "string" }
|
175
|
+
},
|
176
|
+
"required": ["self", "related"],
|
177
|
+
"additionalProperties": false
|
178
|
+
},
|
179
|
+
"data": {
|
180
|
+
"type": ["object", "null"],
|
181
|
+
"properties": {
|
182
|
+
"type": { "type": "string", "pattern": "^templates$" },
|
183
|
+
"id": { "type": "string" }
|
184
|
+
},
|
185
|
+
"required": ["type", "id"],
|
186
|
+
"additionalProperties": false
|
187
|
+
}
|
188
|
+
},
|
189
|
+
"required": ["links"],
|
190
|
+
"additionalProperties": false
|
191
|
+
}
|
192
|
+
},
|
193
|
+
"required": ["variants", "asset_files", "bundles"],
|
194
|
+
"additionalProperties": false
|
195
|
+
},
|
196
|
+
"links": {
|
197
|
+
"type": "object",
|
198
|
+
"properties": {
|
199
|
+
"self": { "type": "string" },
|
200
|
+
"related": { "type": "string" }
|
201
|
+
},
|
202
|
+
"required": ["self", "related"],
|
203
|
+
"additionalProperties": false
|
204
|
+
},
|
205
|
+
"meta": {
|
206
|
+
"type": "object",
|
207
|
+
"properties": {
|
208
|
+
"warnings": {
|
209
|
+
"type": "array",
|
210
|
+
"minItems": 1,
|
211
|
+
"uniqueItems": true,
|
212
|
+
"items": {
|
213
|
+
"type": "object",
|
214
|
+
"properties": {
|
215
|
+
"title": { "type": "string" },
|
216
|
+
"detail": { "type": "string" },
|
217
|
+
"code": { "type": "string" }
|
218
|
+
},
|
219
|
+
"required": ["title", "detail", "code"],
|
220
|
+
"additionalProperties": false
|
221
|
+
}
|
222
|
+
}
|
223
|
+
},
|
224
|
+
"required": ["warnings"],
|
225
|
+
"additionalProperties": false
|
226
|
+
}
|
227
|
+
},
|
228
|
+
"required": ["data", "meta", "links"],
|
229
|
+
"additionalProperties": false
|
230
|
+
}
|