veeqo 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (86) hide show
  1. checksums.yaml +7 -0
  2. data/.gitignore +10 -0
  3. data/.hound.yml +3 -0
  4. data/.rspec +1 -0
  5. data/.rubocop.yml +629 -0
  6. data/.sample.pryrc +4 -0
  7. data/.travis.yml +5 -0
  8. data/Gemfile +4 -0
  9. data/LICENSE.txt +21 -0
  10. data/README.md +574 -0
  11. data/Rakefile +6 -0
  12. data/bin/console +10 -0
  13. data/bin/rspec +17 -0
  14. data/bin/setup +8 -0
  15. data/lib/veeqo.rb +16 -0
  16. data/lib/veeqo/actions/base.rb +13 -0
  17. data/lib/veeqo/actions/delete.rb +11 -0
  18. data/lib/veeqo/actions/find.rb +11 -0
  19. data/lib/veeqo/actions/list.rb +11 -0
  20. data/lib/veeqo/allocation.rb +32 -0
  21. data/lib/veeqo/base.rb +26 -0
  22. data/lib/veeqo/company.rb +17 -0
  23. data/lib/veeqo/configuration.rb +17 -0
  24. data/lib/veeqo/customer.rb +24 -0
  25. data/lib/veeqo/delivery_method.rb +19 -0
  26. data/lib/veeqo/errors.rb +30 -0
  27. data/lib/veeqo/errors/forbidden.rb +9 -0
  28. data/lib/veeqo/errors/request_error.rb +15 -0
  29. data/lib/veeqo/errors/server_error.rb +9 -0
  30. data/lib/veeqo/errors/unauthorized.rb +9 -0
  31. data/lib/veeqo/order.rb +25 -0
  32. data/lib/veeqo/product.rb +25 -0
  33. data/lib/veeqo/purchase_order.rb +11 -0
  34. data/lib/veeqo/request.rb +89 -0
  35. data/lib/veeqo/response.rb +27 -0
  36. data/lib/veeqo/shipment.rb +30 -0
  37. data/lib/veeqo/store.rb +19 -0
  38. data/lib/veeqo/supplier.rb +19 -0
  39. data/lib/veeqo/version.rb +3 -0
  40. data/lib/veeqo/warehouse.rb +19 -0
  41. data/spec/fixtures/allocation_created.json +554 -0
  42. data/spec/fixtures/company.json +3 -0
  43. data/spec/fixtures/customer.json +4 -0
  44. data/spec/fixtures/customer_created.json +15 -0
  45. data/spec/fixtures/customers.json +38 -0
  46. data/spec/fixtures/delivery_method.json +3 -0
  47. data/spec/fixtures/delivery_method_created.json +4 -0
  48. data/spec/fixtures/delivery_methods.json +5 -0
  49. data/spec/fixtures/empty.json +0 -0
  50. data/spec/fixtures/order.json +3 -0
  51. data/spec/fixtures/order_created.json +554 -0
  52. data/spec/fixtures/orders.json +5 -0
  53. data/spec/fixtures/ping.json +3 -0
  54. data/spec/fixtures/product.json +4 -0
  55. data/spec/fixtures/product_created.json +137 -0
  56. data/spec/fixtures/products.json +5 -0
  57. data/spec/fixtures/purchase_orders.json +177 -0
  58. data/spec/fixtures/shipment_created.json +19 -0
  59. data/spec/fixtures/store.json +3 -0
  60. data/spec/fixtures/store_created.json +4 -0
  61. data/spec/fixtures/stores.json +5 -0
  62. data/spec/fixtures/supplier.json +3 -0
  63. data/spec/fixtures/supplier_created.json +4 -0
  64. data/spec/fixtures/suppliers.json +5 -0
  65. data/spec/fixtures/warehouse.json +3 -0
  66. data/spec/fixtures/warehouse_created.json +4 -0
  67. data/spec/fixtures/warehouses.json +5 -0
  68. data/spec/spec_helper.rb +15 -0
  69. data/spec/support/fake_veeqo_api.rb +408 -0
  70. data/spec/veeqo/actions/list_spec.rb +38 -0
  71. data/spec/veeqo/allocation_spec.rb +49 -0
  72. data/spec/veeqo/base_spec.rb +23 -0
  73. data/spec/veeqo/company_spec.rb +23 -0
  74. data/spec/veeqo/configuration_spec.rb +24 -0
  75. data/spec/veeqo/customer_spec.rb +77 -0
  76. data/spec/veeqo/delivery_method_spec.rb +65 -0
  77. data/spec/veeqo/order_spec.rb +93 -0
  78. data/spec/veeqo/product_spec.rb +82 -0
  79. data/spec/veeqo/purchase_order_spec.rb +14 -0
  80. data/spec/veeqo/request_spec.rb +40 -0
  81. data/spec/veeqo/shipment_spec.rb +38 -0
  82. data/spec/veeqo/store_spec.rb +61 -0
  83. data/spec/veeqo/supplier_spec.rb +61 -0
  84. data/spec/veeqo/warehouse_spec.rb +61 -0
  85. data/veeqo.gemspec +26 -0
  86. metadata +198 -0
@@ -0,0 +1,27 @@
1
+ require "json"
2
+
3
+ module Veeqo
4
+ class Response
5
+ attr_reader :response
6
+
7
+ def initialize(response)
8
+ @response = response
9
+ end
10
+
11
+ def parse
12
+ parse_response_content
13
+ end
14
+
15
+ private
16
+
17
+ def parse_response_content
18
+ JSON.parse(response.body || "{}", object_class: ResponseObject)
19
+ end
20
+ end
21
+
22
+ class ResponseObject < OpenStruct
23
+ def successful?
24
+ true
25
+ end
26
+ end
27
+ end
@@ -0,0 +1,30 @@
1
+ module Veeqo
2
+ class Shipment < Base
3
+ include Veeqo::Actions::Delete
4
+
5
+ def create(order_id:, allocation_id:, shipment:)
6
+ create_resource(
7
+ order_id: order_id,
8
+ allocation_id: allocation_id,
9
+ shipment: reorganize_shipment(shipment),
10
+ )
11
+ end
12
+
13
+ private
14
+
15
+ def end_point
16
+ "shipments"
17
+ end
18
+
19
+ def reorganize_shipment(carrier_id:, notify_customer:, **attributes)
20
+ {
21
+ carrier_id: carrier_id,
22
+ notify_customer: notify_customer,
23
+ update_remote_order: attributes.delete(:update_remote_order),
24
+ tracking_number_attributes: {
25
+ tracking_number: attributes.delete(:tracking_number),
26
+ },
27
+ }
28
+ end
29
+ end
30
+ end
@@ -0,0 +1,19 @@
1
+ module Veeqo
2
+ class Store < Base
3
+ include Veeqo::Actions::Base
4
+
5
+ def create(name:, type_code:)
6
+ create_resource(name: name, type_code: type_code)
7
+ end
8
+
9
+ def update(store_id, attributes)
10
+ update_resource(store_id, attributes)
11
+ end
12
+
13
+ private
14
+
15
+ def end_point
16
+ "channels"
17
+ end
18
+ end
19
+ end
@@ -0,0 +1,19 @@
1
+ module Veeqo
2
+ class Supplier < Base
3
+ include Veeqo::Actions::Base
4
+
5
+ def create(name:)
6
+ create_resource(name: name)
7
+ end
8
+
9
+ def update(supplier_id, attributes)
10
+ update_resource(supplier_id, attributes)
11
+ end
12
+
13
+ private
14
+
15
+ def end_point
16
+ "suppliers"
17
+ end
18
+ end
19
+ end
@@ -0,0 +1,3 @@
1
+ module Veeqo
2
+ VERSION = "0.1.0".freeze
3
+ end
@@ -0,0 +1,19 @@
1
+ module Veeqo
2
+ class Warehouse < Base
3
+ include Veeqo::Actions::Base
4
+
5
+ def create(name:)
6
+ create_resource(name: name)
7
+ end
8
+
9
+ def update(warehouse_id, attributes)
10
+ update_resource(warehouse_id, attributes)
11
+ end
12
+
13
+ private
14
+
15
+ def end_point
16
+ "warehouses"
17
+ end
18
+ end
19
+ end
@@ -0,0 +1,554 @@
1
+ {
2
+ "allocated_completely": true,
3
+ "allocations": [
4
+ {
5
+ "allocated_by": {
6
+ "account_owner_user_id": null,
7
+ "activated_at": null,
8
+ "activation_code": null,
9
+ "api_key": "API_KEY",
10
+ "company_id": 1717,
11
+ "created_at": "2016-03-21T11:42:55Z",
12
+ "created_by_id": null,
13
+ "default_till_id": null,
14
+ "deleted_at": null,
15
+ "deleted_by_id": null,
16
+ "email": "dev01@bdhr.co",
17
+ "guide_completed_message_viewed": null,
18
+ "guide_progress": null,
19
+ "id": 1923,
20
+ "location": null,
21
+ "login": "Dev01",
22
+ "orders_walkthrough_viewed": false,
23
+ "password_reset_token": null,
24
+ "state": "passive",
25
+ "updated_at": "2016-04-01T09:46:12Z",
26
+ "updated_by_id": null
27
+ },
28
+ "created_at": "2016-04-06T12:25:40Z",
29
+ "id": 323498,
30
+ "line_items": [
31
+ {
32
+ "created_at": "2016-04-06T12:25:40Z",
33
+ "id": 486254,
34
+ "quantity": 1,
35
+ "sellable": {
36
+ "active_channels": [],
37
+ "allocated_stock_level_at_all_warehouses": 2,
38
+ "available_stock_level_at_all_warehouses": 4,
39
+ "channel_sellables": [],
40
+ "cost_price": 0,
41
+ "created_at": "2016-03-21T11:42:56Z",
42
+ "created_by_id": 1923,
43
+ "full_title": "MEN'S SUPERMAN SHORT SLEEVE T-SHIRT [TEST] MEDIUM",
44
+ "id": 1226615,
45
+ "images": [],
46
+ "inventory": {
47
+ "allocated_stock_level_at_all_warehouses": 2,
48
+ "available_stock_level_at_all_warehouses": 4,
49
+ "incoming_stock_level_at_all_warehouses": 0,
50
+ "infinite": false,
51
+ "physical_stock_level_at_all_warehouses": 6
52
+ },
53
+ "margin": 100,
54
+ "measurement_attributes": {
55
+ "depth": 0,
56
+ "dimensions_unit": "cm",
57
+ "height": 0,
58
+ "id": 622133,
59
+ "width": 0
60
+ },
61
+ "min_reorder_level": 0,
62
+ "model_number": "",
63
+ "on_hand_value": 0,
64
+ "price": 13.99,
65
+ "product": {
66
+ "description": "",
67
+ "estimated_delivery": null,
68
+ "hs_tariff_number": null,
69
+ "id": 574313,
70
+ "main_image": {
71
+ "binary_data": null,
72
+ "content_type": null,
73
+ "created_at": "2016-03-21T11:42:56Z",
74
+ "created_by_id": null,
75
+ "deleted_at": null,
76
+ "deleted_by_id": null,
77
+ "display_position": null,
78
+ "id": 795405,
79
+ "picture_content_type": null,
80
+ "picture_file_name": null,
81
+ "picture_file_size": null,
82
+ "picture_order": 9999,
83
+ "picture_updated_at": null,
84
+ "product_id": 574313,
85
+ "src": "https://veeqo-production-storage.s3.amazonaws.com/images/2032154/fs004027-new_original.jpg",
86
+ "updated_at": "2016-03-21T11:42:56Z",
87
+ "updated_by_id": null
88
+ },
89
+ "main_image_src": "https://veeqo-production-storage.s3.amazonaws.com/images/2032154/fs004027-new_original.jpg",
90
+ "origin_country": null,
91
+ "tax_rate": 0,
92
+ "title": "MEN'S SUPERMAN SHORT SLEEVE T-SHIRT [TEST]",
93
+ "weight": 0
94
+ },
95
+ "product_title": "MEN'S SUPERMAN SHORT SLEEVE T-SHIRT [TEST]",
96
+ "profit": 13.99,
97
+ "quantity_to_reorder": 0,
98
+ "sellable_title": "MEDIUM",
99
+ "sku_code": "SUP-007",
100
+ "stock_entries": [
101
+ {
102
+ "allocated_stock_level": 2,
103
+ "available_stock_level": 4,
104
+ "id": 1209222,
105
+ "incoming_stock_level": 0,
106
+ "infinite": false,
107
+ "location": null,
108
+ "physical_stock_level": 6,
109
+ "sellable_id": 1226615,
110
+ "sellable_on_hand_value": 0,
111
+ "stock_running_low": false,
112
+ "updated_at": "2016-04-06T12:25:40Z",
113
+ "warehouse": {
114
+ "address_line_1": "",
115
+ "address_line_2": "",
116
+ "city": "",
117
+ "click_and_collect_days": null,
118
+ "click_and_collect_enabled": false,
119
+ "country": null,
120
+ "created_at": "2016-03-21T11:42:55Z",
121
+ "created_by_id": 1923,
122
+ "default_min_reorder": 0,
123
+ "deleted_at": null,
124
+ "deleted_by_id": null,
125
+ "id": 1784,
126
+ "inventory_type_code": "wavg",
127
+ "name": "My Warehouse",
128
+ "phone": null,
129
+ "post_code": "",
130
+ "region": "",
131
+ "requested_carrier_account": null,
132
+ "updated_at": "2016-03-21T11:42:55Z",
133
+ "updated_by_id": null,
134
+ "user_id": null
135
+ },
136
+ "warehouse_id": 1784
137
+ }
138
+ ],
139
+ "stock_level_at_all_warehouses": 6,
140
+ "tax_rate": 0,
141
+ "title": "MEDIUM",
142
+ "total_quantity_sold": 2,
143
+ "type": "ProductVariant",
144
+ "upc_code": "",
145
+ "updated_at": "2016-03-21T11:42:56Z",
146
+ "variant_option_specifics": [],
147
+ "variant_property_specifics": [],
148
+ "weight": 0
149
+ },
150
+ "updated_at": "2016-04-06T12:25:40Z"
151
+ }
152
+ ],
153
+ "order_id": 447452,
154
+ "recommended_shipping_options": null,
155
+ "shipment": null,
156
+ "total_weight": 0,
157
+ "updated_at": "2016-04-06T12:25:40Z",
158
+ "warehouse": {
159
+ "address_line_1": "",
160
+ "address_line_2": "",
161
+ "city": "",
162
+ "click_and_collect_days": null,
163
+ "click_and_collect_enabled": false,
164
+ "country": null,
165
+ "created_at": "2016-03-21T11:42:55Z",
166
+ "created_by_id": 1923,
167
+ "default_min_reorder": 0,
168
+ "deleted_at": null,
169
+ "deleted_by_id": null,
170
+ "id": 1784,
171
+ "inventory_type_code": "wavg",
172
+ "name": "My Warehouse",
173
+ "phone": null,
174
+ "post_code": "",
175
+ "region": "",
176
+ "requested_carrier_account": null,
177
+ "updated_at": "2016-03-21T11:42:55Z",
178
+ "updated_by_id": null,
179
+ "user_id": null
180
+ }
181
+ }
182
+ ],
183
+ "buyer_user_id": null,
184
+ "cancel_reason": null,
185
+ "cancelled_at": null,
186
+ "cancelled_by": null,
187
+ "channel": {
188
+ "active_warehouses": [
189
+ {
190
+ "id": 1784,
191
+ "name": "My Warehouse"
192
+ }
193
+ ],
194
+ "address_line_1": "",
195
+ "address_line_2": "",
196
+ "api2cart_store_key": null,
197
+ "automatic_product_linking_disabled": false,
198
+ "bridge_url": null,
199
+ "bridge_verified": false,
200
+ "channel_warehouses": [
201
+ {
202
+ "rank": 1,
203
+ "warehouse": {
204
+ "address_line_1": "",
205
+ "address_line_2": "",
206
+ "city": "",
207
+ "click_and_collect_days": null,
208
+ "click_and_collect_enabled": false,
209
+ "country": null,
210
+ "created_at": "2016-03-21T11:42:55Z",
211
+ "created_by_id": 1923,
212
+ "default_min_reorder": 0,
213
+ "deleted_at": null,
214
+ "deleted_by_id": null,
215
+ "id": 1784,
216
+ "inventory_type_code": "wavg",
217
+ "name": "My Warehouse",
218
+ "phone": null,
219
+ "post_code": "",
220
+ "region": "",
221
+ "requested_carrier_account": null,
222
+ "updated_at": "2016-03-21T11:42:55Z",
223
+ "updated_by_id": null,
224
+ "user_id": null
225
+ }
226
+ }
227
+ ],
228
+ "city": "",
229
+ "country": null,
230
+ "create_product_if_unmatched": true,
231
+ "created_by_id": 1923,
232
+ "default_send_shipment_email": true,
233
+ "default_warehouse": {
234
+ "address_line_1": "",
235
+ "address_line_2": "",
236
+ "city": "",
237
+ "click_and_collect_days": null,
238
+ "click_and_collect_enabled": false,
239
+ "country": null,
240
+ "created_at": "2016-03-21T11:42:55Z",
241
+ "created_by_id": 1923,
242
+ "default_min_reorder": 0,
243
+ "deleted_at": null,
244
+ "deleted_by_id": null,
245
+ "id": 1784,
246
+ "inventory_type_code": "wavg",
247
+ "name": "My Warehouse",
248
+ "phone": null,
249
+ "post_code": "",
250
+ "region": "",
251
+ "requested_carrier_account": null,
252
+ "updated_at": "2016-03-21T11:42:55Z",
253
+ "updated_by_id": null,
254
+ "user_id": null
255
+ },
256
+ "deleted_at": null,
257
+ "deleted_by_id": null,
258
+ "email": "dev01@bdhr.co",
259
+ "id": 3525,
260
+ "marketplace_id": null,
261
+ "mws_auth_token": null,
262
+ "name": "Phone",
263
+ "pending_setup": true,
264
+ "post_code": "",
265
+ "pull_pending_orders": false,
266
+ "pulled_orders_at": null,
267
+ "pulled_products_at": null,
268
+ "region": "",
269
+ "remote": false,
270
+ "seller_id": null,
271
+ "shopify_url": null,
272
+ "skip_title_matching": true,
273
+ "state": "active",
274
+ "stock_level_update_requests": [],
275
+ "successfully_fetched_stock_levels_at": null,
276
+ "type_code": "direct",
277
+ "update_remote_order": true,
278
+ "url": null
279
+ },
280
+ "created_at": "2016-04-06T12:25:40Z",
281
+ "created_by": {
282
+ "company": {
283
+ "billing_period_started": null,
284
+ "card_valid": false,
285
+ "created_at": "2016-03-21T11:42:55Z",
286
+ "has_right_to_use_veeqo": true,
287
+ "id": 1717,
288
+ "name": "Dev01",
289
+ "referring_website": "",
290
+ "stripe_customer_id": null,
291
+ "subscription_plan": {
292
+ "billing_interval": "month",
293
+ "id": 62,
294
+ "name": "Business[Monthly]",
295
+ "stripe_plan_id": "BUSINESS_MONTHLY_20160309"
296
+ },
297
+ "subscription_plan_id": 62,
298
+ "subscription_status": "trialing",
299
+ "updated_at": "2016-03-21T11:42:55Z"
300
+ },
301
+ "created_at": "2016-03-21T11:42:55Z",
302
+ "email": "dev01@bdhr.co",
303
+ "guide_completed_message_viewed": null,
304
+ "id": 1923,
305
+ "location": null,
306
+ "login": "Dev01",
307
+ "orders_walkthrough_viewed": false,
308
+ "updated_at": "2016-04-01T09:46:12Z"
309
+ },
310
+ "customer": {
311
+ "billing_address": {
312
+ "address1": "294 queenstown road",
313
+ "address2": null,
314
+ "city": "london",
315
+ "company": null,
316
+ "country": "GB",
317
+ "email": null,
318
+ "first_name": "Sky",
319
+ "id": 1086864,
320
+ "last_name": "Schonhuber",
321
+ "phone": "07734450718",
322
+ "state": "london",
323
+ "zip": "sw8 4lt"
324
+ },
325
+ "created_by_id": 1923,
326
+ "email": "customer@example.com",
327
+ "id": 516208,
328
+ "mobile": null,
329
+ "phone": "0207376109",
330
+ "shipping_addresses": [
331
+ {
332
+ "address1": "294 queenstown road",
333
+ "address2": null,
334
+ "city": "london",
335
+ "company": null,
336
+ "country": "GB",
337
+ "first_name": "Sky",
338
+ "id": 1086865,
339
+ "last_name": "Schonhuber",
340
+ "phone": "07734450718",
341
+ "state": "london",
342
+ "zip": "sw8 4lt"
343
+ },
344
+ {
345
+ "address1": "294 queenstown road",
346
+ "address2": "",
347
+ "city": "london",
348
+ "company": "",
349
+ "country": "GB",
350
+ "first_name": "Sky",
351
+ "id": 1086866,
352
+ "last_name": "Schonhuber",
353
+ "phone": "07734450718",
354
+ "state": "london",
355
+ "zip": "sw8 4lt"
356
+ },
357
+ {
358
+ "address1": "294 queenstown road",
359
+ "address2": "",
360
+ "city": "london",
361
+ "company": "",
362
+ "country": "GB",
363
+ "first_name": "Sky",
364
+ "id": 1086867,
365
+ "last_name": "Schonhuber",
366
+ "phone": "07734450718",
367
+ "state": "london",
368
+ "zip": "sw8 4lt"
369
+ }
370
+ ]
371
+ },
372
+ "customer_note": null,
373
+ "customer_viewable_notes": null,
374
+ "deliver_to": {
375
+ "address1": "294 queenstown road",
376
+ "address2": "",
377
+ "city": "london",
378
+ "company": "",
379
+ "country": "GB",
380
+ "first_name": "Sky",
381
+ "id": 1086867,
382
+ "last_name": "Schonhuber",
383
+ "phone": "07734450718",
384
+ "state": "london",
385
+ "zip": "sw8 4lt"
386
+ },
387
+ "delivery_cost": 0,
388
+ "delivery_method": {
389
+ "cost": 0,
390
+ "id": 92298,
391
+ "name": "Default delivery method",
392
+ "user_id": 1923
393
+ },
394
+ "due_date": null,
395
+ "employee_notes": [],
396
+ "fulfilled_by_amazon": false,
397
+ "id": 447452,
398
+ "international": false,
399
+ "line_items": [
400
+ {
401
+ "additional_options": null,
402
+ "created_at": "2016-04-06T12:25:40Z",
403
+ "id": 691572,
404
+ "price_per_unit": 13.99,
405
+ "quantity": 1,
406
+ "sellable": {
407
+ "active_channels": [],
408
+ "allocated_stock_level_at_all_warehouses": 2,
409
+ "available_stock_level_at_all_warehouses": 4,
410
+ "channel_sellables": [],
411
+ "cost_price": 0,
412
+ "created_at": "2016-03-21T11:42:56Z",
413
+ "created_by_id": 1923,
414
+ "full_title": "MEN'S SUPERMAN SHORT SLEEVE T-SHIRT [TEST] MEDIUM",
415
+ "id": 1226615,
416
+ "images": [],
417
+ "inventory": {
418
+ "allocated_stock_level_at_all_warehouses": 2,
419
+ "available_stock_level_at_all_warehouses": 4,
420
+ "incoming_stock_level_at_all_warehouses": 0,
421
+ "infinite": false,
422
+ "physical_stock_level_at_all_warehouses": 6
423
+ },
424
+ "margin": 100,
425
+ "measurement_attributes": {
426
+ "depth": 0,
427
+ "dimensions_unit": "cm",
428
+ "height": 0,
429
+ "id": 622133,
430
+ "width": 0
431
+ },
432
+ "min_reorder_level": 0,
433
+ "model_number": "",
434
+ "on_hand_value": 0,
435
+ "price": 13.99,
436
+ "product": {
437
+ "description": "",
438
+ "estimated_delivery": null,
439
+ "hs_tariff_number": null,
440
+ "id": 574313,
441
+ "main_image": {
442
+ "binary_data": null,
443
+ "content_type": null,
444
+ "created_at": "2016-03-21T11:42:56Z",
445
+ "created_by_id": null,
446
+ "deleted_at": null,
447
+ "deleted_by_id": null,
448
+ "display_position": null,
449
+ "id": 795405,
450
+ "picture_content_type": null,
451
+ "picture_file_name": null,
452
+ "picture_file_size": null,
453
+ "picture_order": 9999,
454
+ "picture_updated_at": null,
455
+ "product_id": 574313,
456
+ "src": "https://veeqo-production-storage.s3.amazonaws.com/images/2032154/fs004027-new_original.jpg",
457
+ "updated_at": "2016-03-21T11:42:56Z",
458
+ "updated_by_id": null
459
+ },
460
+ "main_image_src": "https://veeqo-production-storage.s3.amazonaws.com/images/2032154/fs004027-new_original.jpg",
461
+ "origin_country": null,
462
+ "tax_rate": 0,
463
+ "title": "MEN'S SUPERMAN SHORT SLEEVE T-SHIRT [TEST]",
464
+ "weight": 0
465
+ },
466
+ "product_title": "MEN'S SUPERMAN SHORT SLEEVE T-SHIRT [TEST]",
467
+ "profit": 13.99,
468
+ "quantity_to_reorder": 0,
469
+ "sellable_title": "MEDIUM",
470
+ "sku_code": "SUP-007",
471
+ "stock_entries": [
472
+ {
473
+ "allocated_stock_level": 2,
474
+ "available_stock_level": 4,
475
+ "id": 1209222,
476
+ "incoming_stock_level": 0,
477
+ "infinite": false,
478
+ "location": null,
479
+ "physical_stock_level": 6,
480
+ "sellable_id": 1226615,
481
+ "sellable_on_hand_value": 0,
482
+ "stock_running_low": false,
483
+ "updated_at": "2016-04-06T12:25:40Z",
484
+ "warehouse": {
485
+ "address_line_1": "",
486
+ "address_line_2": "",
487
+ "city": "",
488
+ "click_and_collect_days": null,
489
+ "click_and_collect_enabled": false,
490
+ "country": null,
491
+ "created_at": "2016-03-21T11:42:55Z",
492
+ "created_by_id": 1923,
493
+ "default_min_reorder": 0,
494
+ "deleted_at": null,
495
+ "deleted_by_id": null,
496
+ "id": 1784,
497
+ "inventory_type_code": "wavg",
498
+ "name": "My Warehouse",
499
+ "phone": null,
500
+ "post_code": "",
501
+ "region": "",
502
+ "requested_carrier_account": null,
503
+ "updated_at": "2016-03-21T11:42:55Z",
504
+ "updated_by_id": null,
505
+ "user_id": null
506
+ },
507
+ "warehouse_id": 1784
508
+ }
509
+ ],
510
+ "stock_level_at_all_warehouses": 6,
511
+ "tax_rate": 0,
512
+ "title": "MEDIUM",
513
+ "total_quantity_sold": 2,
514
+ "type": "ProductVariant",
515
+ "upc_code": "",
516
+ "updated_at": "2016-03-21T11:42:56Z",
517
+ "variant_option_specifics": [],
518
+ "variant_property_specifics": [],
519
+ "weight": 0
520
+ },
521
+ "tax_rate": 0,
522
+ "updated_at": "2016-04-06T12:25:40Z"
523
+ }
524
+ ],
525
+ "notes": null,
526
+ "number": "#P-447452",
527
+ "packed_completely": null,
528
+ "payment": {
529
+ "card_number": null,
530
+ "created_at": "2016-04-06T12:25:40Z",
531
+ "created_by_id": 1923,
532
+ "id": 415007,
533
+ "order_id": 447452,
534
+ "payment_type": "bank_transfer",
535
+ "reference_number": "123456789",
536
+ "updated_at": "2016-04-06T12:25:40Z"
537
+ },
538
+ "picked_completely": null,
539
+ "receipt_printed": false,
540
+ "refund_amount": null,
541
+ "returns": [],
542
+ "send_notification_email": false,
543
+ "send_refund_email": null,
544
+ "shipped_at": null,
545
+ "status": "awaiting_fulfillment",
546
+ "subtotal_price": 13.99,
547
+ "tags": [],
548
+ "till_id": null,
549
+ "total_discounts": 0,
550
+ "total_price": 13.99,
551
+ "total_tax": 0,
552
+ "updated_at": "2016-04-06T12:25:40Z",
553
+ "updated_by": null
554
+ }