ultracart_api 4.1.12 → 4.1.14
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/README.md +4 -2
- data/docs/AffiliateApi.md +123 -167
- data/docs/AutoOrderApi.md +1250 -903
- data/docs/ChannelPartnerApi.md +1678 -1121
- data/docs/ChargebackApi.md +297 -405
- data/docs/CheckoutApi.md +1622 -1424
- data/docs/Conversation.md +4 -0
- data/docs/ConversationApi.md +4820 -6315
- data/docs/CouponApi.md +1522 -1443
- data/docs/CustomerApi.md +2570 -1845
- data/docs/DatawarehouseApi.md +555 -723
- data/docs/FulfillmentApi.md +567 -441
- data/docs/GiftCertificateApi.md +617 -598
- data/docs/IntegrationLogApi.md +290 -385
- data/docs/ItemApi.md +2174 -1746
- data/docs/ItemRestriction.md +2 -0
- data/docs/OauthApi.md +203 -163
- data/docs/OrderApi.md +2774 -2177
- data/docs/SsoApi.md +223 -288
- data/docs/StorefrontApi.md +9692 -12967
- data/docs/TaxApi.md +1541 -2017
- data/docs/UserApi.md +606 -790
- data/docs/WebhookApi.md +787 -628
- data/docs/WorkflowApi.md +666 -879
- data/lib/ultracart_api/models/conversation.rb +21 -1
- data/lib/ultracart_api/models/item_restriction.rb +11 -1
- data/lib/ultracart_api/version.rb +1 -1
- metadata +2 -2
data/docs/ItemApi.md
CHANGED
@@ -1,1746 +1,2174 @@
|
|
1
|
-
# UltracartClient::ItemApi
|
2
|
-
|
3
|
-
All URIs are relative to *https://secure.ultracart.com/rest/v2*
|
4
|
-
|
5
|
-
| Method | HTTP request | Description |
|
6
|
-
| ------ | ------------ | ----------- |
|
7
|
-
| [**delete_digital_item**](ItemApi.md#delete_digital_item) | **DELETE** /item/digital_library/{digital_item_oid} | Delete a digital item, which is a file within the digital library, not an actual merchant item |
|
8
|
-
| [**delete_item**](ItemApi.md#delete_item) | **DELETE** /item/items/{merchant_item_oid} | Delete an item |
|
9
|
-
| [**delete_review**](ItemApi.md#delete_review) | **DELETE** /item/items/{merchant_item_oid}/reviews/{review_oid} | Delete a review |
|
10
|
-
| [**get_digital_item**](ItemApi.md#get_digital_item) | **GET** /item/digital_library/{digital_item_oid} | Retrieve a digital item from the digital library, which are digital files that may be attached to normal items |
|
11
|
-
| [**get_digital_items**](ItemApi.md#get_digital_items) | **GET** /item/digital_library | Retrieve digital items from the digital library which are digital files that may be attached to normal items |
|
12
|
-
| [**get_digital_items_by_external_id**](ItemApi.md#get_digital_items_by_external_id) | **GET** /item/digital_library/by_external/{external_id} | Retrieves digital items from the digital library (which are digital files that may be attached to normal items) that having a matching external id |
|
13
|
-
| [**get_inventory_snapshot**](ItemApi.md#get_inventory_snapshot) | **GET** /item/items/inventory_snapshot | Retrieve a list of item inventories. This method may be called once every 15 minutes. More than that will result in a 429 response. |
|
14
|
-
| [**get_item**](ItemApi.md#get_item) | **GET** /item/items/{merchant_item_oid} | Retrieve an item |
|
15
|
-
| [**get_item_by_merchant_item_id**](ItemApi.md#get_item_by_merchant_item_id) | **GET** /item/items/merchant_item_id/{merchant_item_id} | Retrieve an item by item id |
|
16
|
-
| [**get_items**](ItemApi.md#get_items) | **GET** /item/items | Retrieve items |
|
17
|
-
| [**get_pricing_tiers**](ItemApi.md#get_pricing_tiers) | **GET** /item/pricing_tiers | Retrieve pricing tiers |
|
18
|
-
| [**get_review**](ItemApi.md#get_review) | **GET** /item/items/{merchant_item_oid}/reviews/{review_oid} | Get a review |
|
19
|
-
| [**get_reviews**](ItemApi.md#get_reviews) | **GET** /item/items/{merchant_item_oid}/reviews | Get reviews for an item |
|
20
|
-
| [**get_unassociated_digital_items**](ItemApi.md#get_unassociated_digital_items) | **GET** /item/digital_library/unassociated | Retrieve digital items from the digital library (which are digital files that may be attached to normal items) not yet associated with actual items |
|
21
|
-
| [**insert_digital_item**](ItemApi.md#insert_digital_item) | **POST** /item/digital_library | Create a file within the digital library |
|
22
|
-
| [**insert_item**](ItemApi.md#insert_item) | **POST** /item/items | Create an item |
|
23
|
-
| [**insert_review**](ItemApi.md#insert_review) | **POST** /item/items/{merchant_item_oid}/reviews | Insert a review |
|
24
|
-
| [**insert_update_item_content_attribute**](ItemApi.md#insert_update_item_content_attribute) | **POST** /item/items/{merchant_item_oid}/content/attributes | Upsert an item content attribute |
|
25
|
-
| [**update_digital_item**](ItemApi.md#update_digital_item) | **PUT** /item/digital_library/{digital_item_oid} | Updates a file within the digital library |
|
26
|
-
| [**update_item**](ItemApi.md#update_item) | **PUT** /item/items/{merchant_item_oid} | Update an item |
|
27
|
-
| [**update_items**](ItemApi.md#update_items) | **PUT** /item/items/batch | Update multiple items |
|
28
|
-
| [**update_review**](ItemApi.md#update_review) | **PUT** /item/items/{merchant_item_oid}/reviews/{review_oid} | Update a review |
|
29
|
-
| [**upload_temporary_multimedia**](ItemApi.md#upload_temporary_multimedia) | **POST** /item/temp_multimedia | Upload an image to the temporary multimedia. |
|
30
|
-
|
31
|
-
|
32
|
-
## delete_digital_item
|
33
|
-
|
34
|
-
> delete_digital_item(digital_item_oid)
|
35
|
-
|
36
|
-
Delete a digital item, which is a file within the digital library, not an actual merchant item
|
37
|
-
|
38
|
-
Delete a digital item on the UltraCart account.
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
require 'ultracart_api'
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
|
100
|
-
|
101
|
-
|
102
|
-
|
103
|
-
|
104
|
-
|
105
|
-
|
106
|
-
|
107
|
-
|
108
|
-
|
109
|
-
|
110
|
-
|
111
|
-
|
112
|
-
|
113
|
-
|
114
|
-
|
115
|
-
|
116
|
-
|
117
|
-
|
118
|
-
|
119
|
-
|
120
|
-
|
121
|
-
|
122
|
-
|
123
|
-
|
124
|
-
|
125
|
-
|
126
|
-
|
127
|
-
|
128
|
-
|
129
|
-
|
130
|
-
|
131
|
-
|
132
|
-
|
133
|
-
|
134
|
-
|
135
|
-
|
136
|
-
|
137
|
-
|
138
|
-
|
139
|
-
|
140
|
-
```
|
141
|
-
|
142
|
-
|
143
|
-
|
144
|
-
|
145
|
-
|
146
|
-
|
147
|
-
|
148
|
-
|
149
|
-
|
150
|
-
|
151
|
-
|
152
|
-
###
|
153
|
-
|
154
|
-
|
155
|
-
|
156
|
-
|
157
|
-
|
158
|
-
|
159
|
-
|
160
|
-
|
161
|
-
|
162
|
-
|
163
|
-
|
164
|
-
|
165
|
-
|
166
|
-
|
167
|
-
|
168
|
-
|
169
|
-
|
170
|
-
|
171
|
-
|
172
|
-
|
173
|
-
|
174
|
-
|
175
|
-
|
176
|
-
|
177
|
-
|
178
|
-
|
179
|
-
|
180
|
-
|
181
|
-
|
182
|
-
|
183
|
-
|
184
|
-
|
185
|
-
|
186
|
-
|
187
|
-
|
188
|
-
|
189
|
-
|
190
|
-
|
191
|
-
|
192
|
-
|
193
|
-
|
194
|
-
|
195
|
-
|
196
|
-
|
197
|
-
|
198
|
-
|
199
|
-
|
200
|
-
|
201
|
-
|
202
|
-
|
203
|
-
|
204
|
-
|
205
|
-
|
206
|
-
|
207
|
-
|
208
|
-
|
209
|
-
|
210
|
-
|
211
|
-
```
|
212
|
-
|
213
|
-
|
214
|
-
|
215
|
-
|
216
|
-
|
217
|
-
|
218
|
-
|
219
|
-
|
220
|
-
|
221
|
-
|
222
|
-
|
223
|
-
|
224
|
-
|
225
|
-
|
226
|
-
|
227
|
-
|
228
|
-
|
229
|
-
|
230
|
-
|
231
|
-
|
232
|
-
|
233
|
-
|
234
|
-
|
235
|
-
|
236
|
-
|
237
|
-
|
238
|
-
|
239
|
-
|
240
|
-
|
241
|
-
|
242
|
-
|
243
|
-
|
244
|
-
|
245
|
-
|
246
|
-
|
247
|
-
|
248
|
-
|
249
|
-
|
250
|
-
|
251
|
-
|
252
|
-
|
253
|
-
|
254
|
-
|
255
|
-
|
256
|
-
|
257
|
-
|
258
|
-
|
259
|
-
|
260
|
-
|
261
|
-
|
262
|
-
|
263
|
-
|
264
|
-
|
265
|
-
|
266
|
-
|
267
|
-
|
268
|
-
|
269
|
-
|
270
|
-
|
271
|
-
|
272
|
-
|
273
|
-
|
274
|
-
|
275
|
-
|
276
|
-
|
277
|
-
|
278
|
-
|
279
|
-
|
280
|
-
|
281
|
-
|
282
|
-
|
283
|
-
|
284
|
-
|
285
|
-
|
286
|
-
|
287
|
-
p
|
288
|
-
|
289
|
-
|
290
|
-
|
291
|
-
|
292
|
-
|
293
|
-
|
294
|
-
|
295
|
-
|
296
|
-
|
297
|
-
|
|
298
|
-
|
299
|
-
|
300
|
-
|
301
|
-
|
302
|
-
|
303
|
-
|
304
|
-
|
305
|
-
|
306
|
-
|
307
|
-
|
308
|
-
|
309
|
-
|
310
|
-
|
311
|
-
|
312
|
-
|
313
|
-
|
314
|
-
|
315
|
-
|
316
|
-
|
317
|
-
|
318
|
-
|
319
|
-
|
320
|
-
|
321
|
-
|
322
|
-
|
323
|
-
|
324
|
-
|
325
|
-
|
326
|
-
|
327
|
-
|
328
|
-
|
329
|
-
|
330
|
-
|
331
|
-
|
332
|
-
#
|
333
|
-
#
|
334
|
-
|
335
|
-
|
336
|
-
|
337
|
-
|
338
|
-
|
339
|
-
|
340
|
-
|
341
|
-
|
342
|
-
|
343
|
-
|
344
|
-
|
345
|
-
|
346
|
-
|
347
|
-
|
348
|
-
|
349
|
-
|
350
|
-
|
351
|
-
|
352
|
-
|
353
|
-
|
354
|
-
|
355
|
-
|
356
|
-
|
357
|
-
|
358
|
-
|
359
|
-
|
360
|
-
|
361
|
-
|
362
|
-
|
363
|
-
|
364
|
-
|
365
|
-
|
366
|
-
|
367
|
-
|
368
|
-
|
369
|
-
|
370
|
-
|
371
|
-
|
372
|
-
|
373
|
-
|
374
|
-
|
375
|
-
|
376
|
-
|
377
|
-
|
378
|
-
|
379
|
-
|
380
|
-
|
381
|
-
|
382
|
-
|
383
|
-
|
384
|
-
|
385
|
-
|
386
|
-
|
387
|
-
|
388
|
-
|
389
|
-
|
390
|
-
|
391
|
-
|
392
|
-
|
393
|
-
|
394
|
-
|
395
|
-
|
396
|
-
|
397
|
-
|
398
|
-
|
399
|
-
|
400
|
-
|
401
|
-
|
402
|
-
|
403
|
-
|
404
|
-
|
405
|
-
|
406
|
-
###
|
407
|
-
|
408
|
-
|
409
|
-
|
410
|
-
|
411
|
-
|
412
|
-
|
413
|
-
|
414
|
-
|
415
|
-
|
416
|
-
|
417
|
-
|
418
|
-
|
419
|
-
|
420
|
-
|
421
|
-
|
422
|
-
|
423
|
-
|
424
|
-
|
425
|
-
|
426
|
-
|
427
|
-
|
428
|
-
|
429
|
-
|
430
|
-
|
431
|
-
|
432
|
-
|
433
|
-
|
434
|
-
|
435
|
-
|
436
|
-
|
437
|
-
|
438
|
-
|
439
|
-
|
440
|
-
|
441
|
-
|
442
|
-
|
443
|
-
|
444
|
-
|
445
|
-
|
446
|
-
|
447
|
-
|
448
|
-
|
449
|
-
|
450
|
-
|
451
|
-
|
452
|
-
|
453
|
-
|
454
|
-
|
455
|
-
|
456
|
-
|
457
|
-
|
458
|
-
|
459
|
-
|
460
|
-
|
461
|
-
|
462
|
-
|
463
|
-
|
464
|
-
|
465
|
-
|
466
|
-
|
467
|
-
|
468
|
-
|
469
|
-
|
470
|
-
|
471
|
-
|
472
|
-
|
473
|
-
|
474
|
-
|
475
|
-
|
476
|
-
|
477
|
-
|
478
|
-
|
479
|
-
```
|
480
|
-
|
481
|
-
|
482
|
-
|
483
|
-
|
484
|
-
|
485
|
-
|
486
|
-
|
487
|
-
|
488
|
-
|
489
|
-
|
490
|
-
|
491
|
-
|
492
|
-
|
493
|
-
|
494
|
-
|
495
|
-
|
496
|
-
|
497
|
-
|
498
|
-
|
499
|
-
|
500
|
-
|
501
|
-
|
502
|
-
|
503
|
-
|
504
|
-
|
505
|
-
|
506
|
-
|
507
|
-
|
508
|
-
|
509
|
-
|
510
|
-
|
511
|
-
|
512
|
-
|
513
|
-
|
514
|
-
|
515
|
-
|
516
|
-
|
517
|
-
|
518
|
-
|
519
|
-
|
520
|
-
|
521
|
-
|
522
|
-
|
523
|
-
|
524
|
-
|
525
|
-
|
526
|
-
|
527
|
-
|
528
|
-
|
529
|
-
|
530
|
-
|
531
|
-
|
532
|
-
|
533
|
-
|
534
|
-
|
535
|
-
|
536
|
-
|
537
|
-
|
538
|
-
|
539
|
-
|
540
|
-
|
541
|
-
|
542
|
-
|
543
|
-
|
544
|
-
|
545
|
-
|
546
|
-
|
547
|
-
|
548
|
-
|
549
|
-
|
550
|
-
|
551
|
-
|
552
|
-
|
553
|
-
|
554
|
-
|
555
|
-
|
556
|
-
|
557
|
-
|
558
|
-
|
559
|
-
|
560
|
-
|
561
|
-
|
562
|
-
|
563
|
-
|
564
|
-
|
565
|
-
|
566
|
-
|
567
|
-
|
568
|
-
|
569
|
-
|
570
|
-
|
571
|
-
|
572
|
-
|
573
|
-
|
574
|
-
|
575
|
-
|
576
|
-
|
577
|
-
|
578
|
-
> <
|
579
|
-
|
580
|
-
|
581
|
-
|
582
|
-
|
583
|
-
|
584
|
-
|
585
|
-
|
586
|
-
|
587
|
-
|
588
|
-
|
589
|
-
|
590
|
-
|
591
|
-
|
592
|
-
|
593
|
-
|
594
|
-
|
595
|
-
|
596
|
-
|
597
|
-
|
598
|
-
|
599
|
-
|
600
|
-
|
601
|
-
|
602
|
-
|
603
|
-
|
604
|
-
|
605
|
-
|
606
|
-
|
607
|
-
|
608
|
-
|
609
|
-
|
610
|
-
|
611
|
-
|
612
|
-
|
613
|
-
|
614
|
-
|
615
|
-
|
616
|
-
|
617
|
-
|
618
|
-
|
619
|
-
|
620
|
-
|
621
|
-
|
622
|
-
|
623
|
-
|
624
|
-
|
625
|
-
|
626
|
-
|
627
|
-
|
628
|
-
|
629
|
-
|
630
|
-
|
631
|
-
|
632
|
-
|
633
|
-
|
634
|
-
|
635
|
-
|
636
|
-
|
637
|
-
|
638
|
-
|
639
|
-
|
640
|
-
|
641
|
-
|
642
|
-
|
643
|
-
#
|
644
|
-
|
645
|
-
|
646
|
-
rescue UltracartClient::
|
647
|
-
puts
|
648
|
-
|
649
|
-
|
650
|
-
|
651
|
-
|
652
|
-
|
653
|
-
|
654
|
-
|
655
|
-
|
656
|
-
|
657
|
-
|
658
|
-
|
659
|
-
|
660
|
-
|
661
|
-
|
662
|
-
|
663
|
-
|
664
|
-
|
665
|
-
|
666
|
-
|
667
|
-
|
668
|
-
|
669
|
-
|
670
|
-
|
671
|
-
|
672
|
-
|
673
|
-
|
674
|
-
|
|
675
|
-
|
|
676
|
-
|
677
|
-
|
678
|
-
|
679
|
-
|
680
|
-
|
681
|
-
|
682
|
-
|
683
|
-
|
684
|
-
|
685
|
-
|
686
|
-
|
687
|
-
|
688
|
-
|
689
|
-
|
690
|
-
|
691
|
-
|
692
|
-
|
693
|
-
|
694
|
-
|
695
|
-
|
696
|
-
|
697
|
-
|
698
|
-
|
699
|
-
|
700
|
-
|
701
|
-
|
702
|
-
|
703
|
-
|
704
|
-
|
705
|
-
|
706
|
-
|
707
|
-
|
708
|
-
|
709
|
-
|
710
|
-
|
711
|
-
|
712
|
-
|
713
|
-
|
714
|
-
|
715
|
-
|
716
|
-
|
717
|
-
|
718
|
-
|
719
|
-
|
720
|
-
|
721
|
-
|
722
|
-
|
723
|
-
|
724
|
-
|
725
|
-
#
|
726
|
-
|
727
|
-
|
728
|
-
|
729
|
-
|
730
|
-
|
731
|
-
|
732
|
-
|
733
|
-
|
734
|
-
|
735
|
-
|
736
|
-
|
737
|
-
|
738
|
-
|
739
|
-
|
740
|
-
|
741
|
-
#
|
742
|
-
|
743
|
-
|
744
|
-
|
745
|
-
|
746
|
-
|
747
|
-
|
748
|
-
|
749
|
-
|
750
|
-
|
751
|
-
|
752
|
-
|
753
|
-
|
754
|
-
|
755
|
-
|
756
|
-
|
757
|
-
|
758
|
-
|
759
|
-
|
760
|
-
|
761
|
-
|
762
|
-
|
763
|
-
|
764
|
-
|
765
|
-
|
766
|
-
|
767
|
-
|
768
|
-
|
769
|
-
|
770
|
-
|
771
|
-
|
772
|
-
|
773
|
-
|
774
|
-
|
775
|
-
|
776
|
-
|
777
|
-
|
778
|
-
|
779
|
-
|
780
|
-
|
781
|
-
|
782
|
-
|
783
|
-
|
784
|
-
|
785
|
-
|
786
|
-
|
787
|
-
|
788
|
-
|
789
|
-
|
790
|
-
|
791
|
-
|
792
|
-
|
793
|
-
|
794
|
-
|
795
|
-
|
796
|
-
|
797
|
-
|
798
|
-
|
799
|
-
|
800
|
-
|
801
|
-
|
802
|
-
|
803
|
-
|
804
|
-
|
805
|
-
|
806
|
-
|
807
|
-
|
808
|
-
|
809
|
-
|
810
|
-
|
811
|
-
|
812
|
-
|
813
|
-
|
814
|
-
|
815
|
-
|
816
|
-
|
817
|
-
|
818
|
-
|
819
|
-
|
820
|
-
|
821
|
-
|
822
|
-
|
823
|
-
|
824
|
-
|
825
|
-
|
826
|
-
|
827
|
-
|
828
|
-
|
829
|
-
|
830
|
-
|
831
|
-
|
832
|
-
|
833
|
-
|
834
|
-
|
835
|
-
|
836
|
-
|
837
|
-
|
838
|
-
|
839
|
-
|
840
|
-
|
841
|
-
|
842
|
-
|
843
|
-
|
844
|
-
|
845
|
-
|
846
|
-
|
847
|
-
|
848
|
-
|
849
|
-
|
850
|
-
|
851
|
-
|
852
|
-
|
853
|
-
|
854
|
-
|
855
|
-
|
856
|
-
|
857
|
-
|
858
|
-
|
859
|
-
|
860
|
-
|
861
|
-
|
862
|
-
|
863
|
-
|
864
|
-
|
865
|
-
|
866
|
-
|
867
|
-
|
868
|
-
|
869
|
-
#
|
870
|
-
|
871
|
-
|
872
|
-
|
873
|
-
|
874
|
-
|
875
|
-
|
876
|
-
|
877
|
-
#
|
878
|
-
|
879
|
-
|
880
|
-
|
881
|
-
|
882
|
-
|
883
|
-
|
884
|
-
|
885
|
-
|
886
|
-
|
887
|
-
|
888
|
-
|
889
|
-
|
890
|
-
|
891
|
-
|
892
|
-
|
893
|
-
|
894
|
-
|
895
|
-
|
896
|
-
|
897
|
-
|
898
|
-
|
899
|
-
|
900
|
-
|
901
|
-
|
902
|
-
|
903
|
-
|
904
|
-
|
905
|
-
|
906
|
-
|
907
|
-
|
908
|
-
|
909
|
-
|
910
|
-
|
911
|
-
|
912
|
-
|
913
|
-
|
914
|
-
|
915
|
-
|
916
|
-
|
917
|
-
|
918
|
-
|
919
|
-
|
920
|
-
|
921
|
-
|
922
|
-
|
923
|
-
|
924
|
-
|
925
|
-
|
926
|
-
|
927
|
-
|
928
|
-
|
929
|
-
|
930
|
-
|
931
|
-
|
932
|
-
|
933
|
-
|
934
|
-
|
935
|
-
|
936
|
-
|
937
|
-
|
938
|
-
|
939
|
-
|
940
|
-
|
941
|
-
|
942
|
-
|
943
|
-
|
944
|
-
|
945
|
-
|
946
|
-
|
947
|
-
|
948
|
-
|
949
|
-
|
950
|
-
|
951
|
-
|
952
|
-
|
953
|
-
|
954
|
-
|
955
|
-
|
956
|
-
|
957
|
-
|
958
|
-
|
959
|
-
|
960
|
-
|
961
|
-
|
962
|
-
|
963
|
-
|
964
|
-
|
965
|
-
|
966
|
-
|
967
|
-
|
968
|
-
|
969
|
-
|
970
|
-
|
971
|
-
|
972
|
-
|
973
|
-
|
974
|
-
|
975
|
-
|
976
|
-
|
977
|
-
|
978
|
-
|
979
|
-
|
980
|
-
|
981
|
-
###
|
982
|
-
|
983
|
-
[
|
984
|
-
|
985
|
-
###
|
986
|
-
|
987
|
-
|
988
|
-
|
989
|
-
|
990
|
-
|
991
|
-
|
992
|
-
|
993
|
-
|
994
|
-
|
995
|
-
|
996
|
-
|
997
|
-
|
998
|
-
|
999
|
-
|
1000
|
-
|
1001
|
-
|
1002
|
-
|
1003
|
-
|
1004
|
-
|
1005
|
-
|
1006
|
-
|
1007
|
-
|
1008
|
-
|
1009
|
-
|
1010
|
-
|
1011
|
-
|
1012
|
-
|
1013
|
-
|
1014
|
-
#
|
1015
|
-
|
1016
|
-
|
1017
|
-
|
1018
|
-
|
1019
|
-
|
1020
|
-
|
1021
|
-
|
1022
|
-
|
1023
|
-
|
1024
|
-
|
1025
|
-
|
1026
|
-
|
1027
|
-
|
1028
|
-
|
1029
|
-
|
1030
|
-
|
1031
|
-
|
1032
|
-
|
1033
|
-
|
1034
|
-
|
1035
|
-
|
1036
|
-
|
1037
|
-
|
1038
|
-
|
1039
|
-
|
1040
|
-
|
1041
|
-
|
1042
|
-
|
1043
|
-
|
1044
|
-
|
1045
|
-
p
|
1046
|
-
|
1047
|
-
|
1048
|
-
|
1049
|
-
|
1050
|
-
|
1051
|
-
|
1052
|
-
|
1053
|
-
|
1054
|
-
|
1055
|
-
|
|
1056
|
-
|
1057
|
-
|
1058
|
-
|
1059
|
-
|
1060
|
-
|
1061
|
-
|
1062
|
-
|
1063
|
-
|
1064
|
-
|
1065
|
-
|
1066
|
-
|
1067
|
-
|
1068
|
-
|
1069
|
-
|
1070
|
-
|
1071
|
-
|
1072
|
-
|
1073
|
-
|
1074
|
-
|
1075
|
-
|
1076
|
-
|
1077
|
-
|
1078
|
-
|
1079
|
-
|
1080
|
-
|
1081
|
-
|
1082
|
-
|
1083
|
-
|
1084
|
-
|
1085
|
-
|
1086
|
-
|
1087
|
-
|
1088
|
-
|
1089
|
-
|
1090
|
-
|
1091
|
-
|
1092
|
-
|
1093
|
-
|
1094
|
-
|
1095
|
-
|
1096
|
-
|
1097
|
-
|
1098
|
-
|
1099
|
-
|
1100
|
-
|
1101
|
-
|
1102
|
-
|
1103
|
-
|
1104
|
-
|
1105
|
-
|
1106
|
-
|
1107
|
-
|
1108
|
-
|
1109
|
-
|
1110
|
-
|
1111
|
-
|
1112
|
-
|
1113
|
-
|
1114
|
-
|
1115
|
-
|
1116
|
-
|
1117
|
-
|
1118
|
-
|
1119
|
-
|
1120
|
-
|
1121
|
-
|
1122
|
-
|
1123
|
-
|
1124
|
-
|
1125
|
-
|
1126
|
-
|
1127
|
-
|
1128
|
-
|
1129
|
-
|
1130
|
-
|
1131
|
-
|
1132
|
-
|
1133
|
-
|
1134
|
-
|
1135
|
-
|
1136
|
-
|
1137
|
-
|
1138
|
-
|
1139
|
-
|
1140
|
-
|
1141
|
-
|
1142
|
-
|
1143
|
-
|
1144
|
-
|
1145
|
-
|
1146
|
-
|
1147
|
-
|
1148
|
-
|
1149
|
-
|
1150
|
-
|
1151
|
-
|
1152
|
-
|
1153
|
-
|
1154
|
-
|
1155
|
-
|
1156
|
-
|
1157
|
-
|
1158
|
-
|
1159
|
-
|
1160
|
-
|
1161
|
-
|
1162
|
-
|
1163
|
-
|
1164
|
-
|
1165
|
-
|
1166
|
-
|
1167
|
-
|
1168
|
-
|
1169
|
-
|
1170
|
-
|
1171
|
-
item
|
1172
|
-
|
1173
|
-
|
1174
|
-
|
1175
|
-
|
1176
|
-
|
1177
|
-
|
1178
|
-
|
1179
|
-
|
1180
|
-
|
1181
|
-
|
1182
|
-
|
1183
|
-
|
1184
|
-
|
1185
|
-
|
1186
|
-
|
1187
|
-
|
1188
|
-
|
1189
|
-
|
1190
|
-
|
1191
|
-
|
1192
|
-
|
1193
|
-
begin
|
1194
|
-
#
|
1195
|
-
|
1196
|
-
|
1197
|
-
|
1198
|
-
|
1199
|
-
|
1200
|
-
|
1201
|
-
|
1202
|
-
|
1203
|
-
|
1204
|
-
|
1205
|
-
|
1206
|
-
|
1207
|
-
|
1208
|
-
|
1209
|
-
|
1210
|
-
|
1211
|
-
|
1212
|
-
|
1213
|
-
|
1214
|
-
|
1215
|
-
|
1216
|
-
|
1217
|
-
|
1218
|
-
|
1219
|
-
|
1220
|
-
|
1221
|
-
|
1222
|
-
|
1223
|
-
|
1224
|
-
|
1225
|
-
|
1226
|
-
|
1227
|
-
|
1228
|
-
|
1229
|
-
|
1230
|
-
|
1231
|
-
|
1232
|
-
|
1233
|
-
|
1234
|
-
###
|
1235
|
-
|
1236
|
-
|
1237
|
-
|
1238
|
-
|
1239
|
-
|
1240
|
-
|
1241
|
-
|
1242
|
-
|
1243
|
-
|
1244
|
-
|
1245
|
-
|
1246
|
-
|
1247
|
-
|
1248
|
-
|
1249
|
-
|
1250
|
-
|
1251
|
-
|
1252
|
-
|
1253
|
-
|
1254
|
-
|
1255
|
-
|
1256
|
-
|
1257
|
-
|
1258
|
-
|
1259
|
-
|
1260
|
-
|
1261
|
-
|
1262
|
-
|
1263
|
-
|
1264
|
-
|
1265
|
-
|
1266
|
-
|
1267
|
-
|
1268
|
-
|
1269
|
-
|
1270
|
-
|
1271
|
-
|
1272
|
-
|
1273
|
-
|
1274
|
-
|
1275
|
-
|
1276
|
-
|
1277
|
-
|
1278
|
-
|
1279
|
-
|
1280
|
-
|
1281
|
-
|
1282
|
-
|
1283
|
-
|
1284
|
-
|
1285
|
-
|
1286
|
-
|
1287
|
-
|
1288
|
-
|
1289
|
-
|
1290
|
-
|
1291
|
-
|
1292
|
-
|
1293
|
-
|
1294
|
-
|
1295
|
-
|
1296
|
-
|
1297
|
-
|
1298
|
-
|
1299
|
-
|
1300
|
-
|
1301
|
-
|
1302
|
-
|
1303
|
-
|
1304
|
-
|
1305
|
-
|
1306
|
-
|
1307
|
-
|
1308
|
-
|
1309
|
-
|
1310
|
-
|
1311
|
-
|
1312
|
-
|
1313
|
-
|
1314
|
-
|
1315
|
-
|
1316
|
-
|
1317
|
-
|
1318
|
-
|
1319
|
-
|
1320
|
-
|
1321
|
-
|
1322
|
-
|
1323
|
-
|
1324
|
-
begin
|
1325
|
-
#
|
1326
|
-
api_instance.
|
1327
|
-
|
1328
|
-
|
1329
|
-
|
1330
|
-
|
1331
|
-
|
1332
|
-
|
1333
|
-
|
1334
|
-
|
1335
|
-
|
1336
|
-
|
1337
|
-
|
1338
|
-
|
1339
|
-
|
1340
|
-
|
1341
|
-
|
1342
|
-
|
1343
|
-
|
1344
|
-
|
1345
|
-
|
1346
|
-
|
1347
|
-
|
1348
|
-
|
1349
|
-
|
1350
|
-
###
|
1351
|
-
|
1352
|
-
|
1353
|
-
|
1354
|
-
|
1355
|
-
|
1356
|
-
|
1357
|
-
|
1358
|
-
|
1359
|
-
|
1360
|
-
|
1361
|
-
|
1362
|
-
|
1363
|
-
|
1364
|
-
|
1365
|
-
|
1366
|
-
|
1367
|
-
|
1368
|
-
|
1369
|
-
|
1370
|
-
|
1371
|
-
|
1372
|
-
|
1373
|
-
|
1374
|
-
|
1375
|
-
|
1376
|
-
|
1377
|
-
|
1378
|
-
|
1379
|
-
|
1380
|
-
|
1381
|
-
|
1382
|
-
|
1383
|
-
|
1384
|
-
|
1385
|
-
|
1386
|
-
|
1387
|
-
|
1388
|
-
|
1389
|
-
|
1390
|
-
|
1391
|
-
|
1392
|
-
|
1393
|
-
|
1394
|
-
|
1395
|
-
|
1396
|
-
begin
|
1397
|
-
#
|
1398
|
-
|
1399
|
-
p
|
1400
|
-
|
1401
|
-
|
1402
|
-
|
1403
|
-
|
1404
|
-
|
1405
|
-
|
1406
|
-
|
1407
|
-
|
1408
|
-
|
1409
|
-
|
1410
|
-
|
1411
|
-
|
1412
|
-
|
1413
|
-
|
1414
|
-
|
1415
|
-
|
1416
|
-
|
1417
|
-
|
1418
|
-
|
1419
|
-
|
1420
|
-
|
1421
|
-
|
1422
|
-
|
1423
|
-
|
1424
|
-
|
1425
|
-
|
1426
|
-
|
1427
|
-
|
1428
|
-
|
1429
|
-
|
1430
|
-
|
1431
|
-
|
1432
|
-
|
1433
|
-
|
1434
|
-
|
1435
|
-
|
1436
|
-
|
1437
|
-
|
1438
|
-
|
1439
|
-
|
1440
|
-
|
1441
|
-
|
1442
|
-
|
1443
|
-
|
1444
|
-
|
1445
|
-
|
1446
|
-
|
1447
|
-
|
1448
|
-
|
1449
|
-
|
1450
|
-
|
1451
|
-
|
1452
|
-
|
1453
|
-
|
1454
|
-
|
1455
|
-
|
1456
|
-
|
1457
|
-
|
1458
|
-
|
1459
|
-
|
1460
|
-
|
1461
|
-
|
1462
|
-
|
1463
|
-
|
1464
|
-
|
1465
|
-
|
1466
|
-
|
1467
|
-
|
1468
|
-
|
1469
|
-
|
1470
|
-
|
1471
|
-
|
1472
|
-
|
1473
|
-
|
1474
|
-
|
1475
|
-
|
1476
|
-
|
1477
|
-
|
1478
|
-
|
1479
|
-
|
1480
|
-
|
1481
|
-
|
1482
|
-
|
1483
|
-
|
1484
|
-
|
1485
|
-
|
1486
|
-
|
1487
|
-
|
1488
|
-
|
1489
|
-
|
1490
|
-
|
1491
|
-
|
1492
|
-
|
1493
|
-
|
1494
|
-
|
1495
|
-
|
1496
|
-
|
1497
|
-
|
1498
|
-
|
1499
|
-
|
1500
|
-
|
1501
|
-
|
1502
|
-
|
1503
|
-
|
1504
|
-
|
1505
|
-
|
1506
|
-
|
1507
|
-
|
1508
|
-
|
1509
|
-
|
1510
|
-
|
1511
|
-
|
1512
|
-
|
1513
|
-
|
1514
|
-
|
1515
|
-
|
1516
|
-
|
1517
|
-
|
1518
|
-
|
1519
|
-
|
1520
|
-
|
1521
|
-
|
1522
|
-
|
1523
|
-
|
1524
|
-
|
1525
|
-
|
1526
|
-
|
1527
|
-
|
1528
|
-
|
1529
|
-
|
1530
|
-
|
1531
|
-
|
1532
|
-
|
1533
|
-
|
1534
|
-
|
1535
|
-
|
1536
|
-
|
1537
|
-
|
1538
|
-
|
1539
|
-
|
1540
|
-
#
|
1541
|
-
#
|
1542
|
-
|
1543
|
-
|
1544
|
-
|
1545
|
-
|
1546
|
-
|
1547
|
-
|
1548
|
-
|
1549
|
-
|
1550
|
-
|
1551
|
-
|
1552
|
-
|
1553
|
-
|
1554
|
-
|
1555
|
-
|
1556
|
-
|
1557
|
-
|
1558
|
-
|
1559
|
-
|
1560
|
-
|
1561
|
-
|
1562
|
-
|
1563
|
-
|
1564
|
-
|
1565
|
-
|
1566
|
-
|
1567
|
-
|
1568
|
-
|
1569
|
-
|
1570
|
-
|
1571
|
-
p
|
1572
|
-
|
1573
|
-
|
1574
|
-
|
1575
|
-
|
1576
|
-
|
1577
|
-
|
1578
|
-
|
1579
|
-
|
1580
|
-
|
1581
|
-
|
1582
|
-
|
1583
|
-
|
1584
|
-
|
1585
|
-
|
1586
|
-
|
1587
|
-
|
1588
|
-
|
1589
|
-
|
1590
|
-
|
1591
|
-
|
1592
|
-
|
1593
|
-
|
1594
|
-
|
1595
|
-
|
1596
|
-
|
1597
|
-
|
1598
|
-
|
1599
|
-
|
1600
|
-
|
1601
|
-
|
1602
|
-
|
1603
|
-
|
1604
|
-
|
1605
|
-
|
1606
|
-
|
1607
|
-
|
1608
|
-
|
1609
|
-
|
1610
|
-
###
|
1611
|
-
|
1612
|
-
|
1613
|
-
|
1614
|
-
|
1615
|
-
|
1616
|
-
|
1617
|
-
|
1618
|
-
|
1619
|
-
|
1620
|
-
|
1621
|
-
|
1622
|
-
|
1623
|
-
|
1624
|
-
|
1625
|
-
|
1626
|
-
|
1627
|
-
|
1628
|
-
|
1629
|
-
|
1630
|
-
|
1631
|
-
|
1632
|
-
|
1633
|
-
|
1634
|
-
|
1635
|
-
```
|
1636
|
-
|
1637
|
-
|
1638
|
-
|
1639
|
-
|
1640
|
-
|
1641
|
-
|
1642
|
-
|
1643
|
-
|
1644
|
-
|
1645
|
-
|
1646
|
-
|
1647
|
-
|
1648
|
-
|
1649
|
-
|
1650
|
-
|
1651
|
-
|
1652
|
-
|
1653
|
-
|
1654
|
-
|
1655
|
-
|
1656
|
-
|
1657
|
-
|
1658
|
-
|
1659
|
-
|
1660
|
-
|
1661
|
-
|
1662
|
-
|
1663
|
-
|
1664
|
-
|
1665
|
-
|
1666
|
-
|
1667
|
-
|
1668
|
-
|
1669
|
-
|
1670
|
-
|
1671
|
-
|
1672
|
-
|
1673
|
-
|
1674
|
-
|
1675
|
-
|
1676
|
-
|
1677
|
-
|
1678
|
-
|
1679
|
-
|
1680
|
-
|
1681
|
-
|
1682
|
-
|
1683
|
-
|
1684
|
-
|
1685
|
-
|
1686
|
-
|
1687
|
-
|
1688
|
-
|
1689
|
-
|
1690
|
-
|
1691
|
-
|
1692
|
-
|
1693
|
-
|
1694
|
-
|
1695
|
-
|
1696
|
-
|
1697
|
-
|
1698
|
-
|
1699
|
-
|
1700
|
-
|
1701
|
-
|
1702
|
-
|
1703
|
-
|
1704
|
-
|
1705
|
-
|
1706
|
-
|
1707
|
-
|
1708
|
-
|
1709
|
-
|
1710
|
-
|
1711
|
-
|
1712
|
-
|
1713
|
-
|
1714
|
-
|
1715
|
-
|
1716
|
-
|
1717
|
-
|
1718
|
-
|
1719
|
-
|
1720
|
-
|
1721
|
-
|
1722
|
-
|
1723
|
-
|
1724
|
-
|
1725
|
-
|
1726
|
-
```
|
1727
|
-
|
1728
|
-
|
1729
|
-
|
1730
|
-
|
1731
|
-
|
1732
|
-
|
1733
|
-
|
1734
|
-
|
1735
|
-
|
1736
|
-
|
1737
|
-
|
1738
|
-
|
1739
|
-
|
1740
|
-
|
1741
|
-
|
1742
|
-
|
1743
|
-
|
1744
|
-
|
1745
|
-
|
1746
|
-
|
1
|
+
# UltracartClient::ItemApi
|
2
|
+
|
3
|
+
All URIs are relative to *https://secure.ultracart.com/rest/v2*
|
4
|
+
|
5
|
+
| Method | HTTP request | Description |
|
6
|
+
| ------ | ------------ | ----------- |
|
7
|
+
| [**delete_digital_item**](ItemApi.md#delete_digital_item) | **DELETE** /item/digital_library/{digital_item_oid} | Delete a digital item, which is a file within the digital library, not an actual merchant item |
|
8
|
+
| [**delete_item**](ItemApi.md#delete_item) | **DELETE** /item/items/{merchant_item_oid} | Delete an item |
|
9
|
+
| [**delete_review**](ItemApi.md#delete_review) | **DELETE** /item/items/{merchant_item_oid}/reviews/{review_oid} | Delete a review |
|
10
|
+
| [**get_digital_item**](ItemApi.md#get_digital_item) | **GET** /item/digital_library/{digital_item_oid} | Retrieve a digital item from the digital library, which are digital files that may be attached to normal items |
|
11
|
+
| [**get_digital_items**](ItemApi.md#get_digital_items) | **GET** /item/digital_library | Retrieve digital items from the digital library which are digital files that may be attached to normal items |
|
12
|
+
| [**get_digital_items_by_external_id**](ItemApi.md#get_digital_items_by_external_id) | **GET** /item/digital_library/by_external/{external_id} | Retrieves digital items from the digital library (which are digital files that may be attached to normal items) that having a matching external id |
|
13
|
+
| [**get_inventory_snapshot**](ItemApi.md#get_inventory_snapshot) | **GET** /item/items/inventory_snapshot | Retrieve a list of item inventories. This method may be called once every 15 minutes. More than that will result in a 429 response. |
|
14
|
+
| [**get_item**](ItemApi.md#get_item) | **GET** /item/items/{merchant_item_oid} | Retrieve an item |
|
15
|
+
| [**get_item_by_merchant_item_id**](ItemApi.md#get_item_by_merchant_item_id) | **GET** /item/items/merchant_item_id/{merchant_item_id} | Retrieve an item by item id |
|
16
|
+
| [**get_items**](ItemApi.md#get_items) | **GET** /item/items | Retrieve items |
|
17
|
+
| [**get_pricing_tiers**](ItemApi.md#get_pricing_tiers) | **GET** /item/pricing_tiers | Retrieve pricing tiers |
|
18
|
+
| [**get_review**](ItemApi.md#get_review) | **GET** /item/items/{merchant_item_oid}/reviews/{review_oid} | Get a review |
|
19
|
+
| [**get_reviews**](ItemApi.md#get_reviews) | **GET** /item/items/{merchant_item_oid}/reviews | Get reviews for an item |
|
20
|
+
| [**get_unassociated_digital_items**](ItemApi.md#get_unassociated_digital_items) | **GET** /item/digital_library/unassociated | Retrieve digital items from the digital library (which are digital files that may be attached to normal items) not yet associated with actual items |
|
21
|
+
| [**insert_digital_item**](ItemApi.md#insert_digital_item) | **POST** /item/digital_library | Create a file within the digital library |
|
22
|
+
| [**insert_item**](ItemApi.md#insert_item) | **POST** /item/items | Create an item |
|
23
|
+
| [**insert_review**](ItemApi.md#insert_review) | **POST** /item/items/{merchant_item_oid}/reviews | Insert a review |
|
24
|
+
| [**insert_update_item_content_attribute**](ItemApi.md#insert_update_item_content_attribute) | **POST** /item/items/{merchant_item_oid}/content/attributes | Upsert an item content attribute |
|
25
|
+
| [**update_digital_item**](ItemApi.md#update_digital_item) | **PUT** /item/digital_library/{digital_item_oid} | Updates a file within the digital library |
|
26
|
+
| [**update_item**](ItemApi.md#update_item) | **PUT** /item/items/{merchant_item_oid} | Update an item |
|
27
|
+
| [**update_items**](ItemApi.md#update_items) | **PUT** /item/items/batch | Update multiple items |
|
28
|
+
| [**update_review**](ItemApi.md#update_review) | **PUT** /item/items/{merchant_item_oid}/reviews/{review_oid} | Update a review |
|
29
|
+
| [**upload_temporary_multimedia**](ItemApi.md#upload_temporary_multimedia) | **POST** /item/temp_multimedia | Upload an image to the temporary multimedia. |
|
30
|
+
|
31
|
+
|
32
|
+
## delete_digital_item
|
33
|
+
|
34
|
+
> delete_digital_item(digital_item_oid)
|
35
|
+
|
36
|
+
Delete a digital item, which is a file within the digital library, not an actual merchant item
|
37
|
+
|
38
|
+
Delete a digital item on the UltraCart account.
|
39
|
+
|
40
|
+
|
41
|
+
### Examples
|
42
|
+
|
43
|
+
```ruby
|
44
|
+
require 'ultracart_api'
|
45
|
+
require_relative '../constants'
|
46
|
+
require_relative './item_functions'
|
47
|
+
|
48
|
+
begin
|
49
|
+
digital_item_oid = insert_sample_digital_item
|
50
|
+
delete_sample_digital_item(digital_item_oid)
|
51
|
+
rescue UltracartClient::ApiException => e
|
52
|
+
puts 'An ApiException occurred. Please review the following error:'
|
53
|
+
p e
|
54
|
+
exit(1)
|
55
|
+
end
|
56
|
+
```
|
57
|
+
|
58
|
+
|
59
|
+
#### Using the delete_digital_item_with_http_info variant
|
60
|
+
|
61
|
+
This returns an Array which contains the response data (`nil` in this case), status code and headers.
|
62
|
+
|
63
|
+
> <Array(nil, Integer, Hash)> delete_digital_item_with_http_info(digital_item_oid)
|
64
|
+
|
65
|
+
```ruby
|
66
|
+
begin
|
67
|
+
# Delete a digital item, which is a file within the digital library, not an actual merchant item
|
68
|
+
data, status_code, headers = api_instance.delete_digital_item_with_http_info(digital_item_oid)
|
69
|
+
p status_code # => 2xx
|
70
|
+
p headers # => { ... }
|
71
|
+
p data # => nil
|
72
|
+
rescue UltracartClient::ApiError => e
|
73
|
+
puts "Error when calling ItemApi->delete_digital_item_with_http_info: #{e}"
|
74
|
+
end
|
75
|
+
```
|
76
|
+
|
77
|
+
### Parameters
|
78
|
+
|
79
|
+
| Name | Type | Description | Notes |
|
80
|
+
| ---- | ---- | ----------- | ----- |
|
81
|
+
| **digital_item_oid** | **Integer** | The digital item oid to delete. | |
|
82
|
+
|
83
|
+
### Return type
|
84
|
+
|
85
|
+
nil (empty response body)
|
86
|
+
|
87
|
+
### Authorization
|
88
|
+
|
89
|
+
[ultraCartOauth](../README.md#ultraCartOauth), [ultraCartSimpleApiKey](../README.md#ultraCartSimpleApiKey)
|
90
|
+
|
91
|
+
### HTTP request headers
|
92
|
+
|
93
|
+
- **Content-Type**: Not defined
|
94
|
+
- **Accept**: application/json
|
95
|
+
|
96
|
+
|
97
|
+
## delete_item
|
98
|
+
|
99
|
+
> delete_item(merchant_item_oid)
|
100
|
+
|
101
|
+
Delete an item
|
102
|
+
|
103
|
+
Delete an item on the UltraCart account.
|
104
|
+
|
105
|
+
|
106
|
+
### Examples
|
107
|
+
|
108
|
+
```ruby
|
109
|
+
require 'ultracart_api'
|
110
|
+
require_relative '../constants'
|
111
|
+
require_relative './item_functions'
|
112
|
+
|
113
|
+
begin
|
114
|
+
item_id = insert_sample_item
|
115
|
+
delete_sample_item(item_id)
|
116
|
+
rescue UltracartClient::ApiException => e
|
117
|
+
puts 'An ApiException occurred. Please review the following error:'
|
118
|
+
p e
|
119
|
+
exit(1)
|
120
|
+
end
|
121
|
+
```
|
122
|
+
|
123
|
+
|
124
|
+
#### Using the delete_item_with_http_info variant
|
125
|
+
|
126
|
+
This returns an Array which contains the response data (`nil` in this case), status code and headers.
|
127
|
+
|
128
|
+
> <Array(nil, Integer, Hash)> delete_item_with_http_info(merchant_item_oid)
|
129
|
+
|
130
|
+
```ruby
|
131
|
+
begin
|
132
|
+
# Delete an item
|
133
|
+
data, status_code, headers = api_instance.delete_item_with_http_info(merchant_item_oid)
|
134
|
+
p status_code # => 2xx
|
135
|
+
p headers # => { ... }
|
136
|
+
p data # => nil
|
137
|
+
rescue UltracartClient::ApiError => e
|
138
|
+
puts "Error when calling ItemApi->delete_item_with_http_info: #{e}"
|
139
|
+
end
|
140
|
+
```
|
141
|
+
|
142
|
+
### Parameters
|
143
|
+
|
144
|
+
| Name | Type | Description | Notes |
|
145
|
+
| ---- | ---- | ----------- | ----- |
|
146
|
+
| **merchant_item_oid** | **Integer** | The item oid to delete. | |
|
147
|
+
|
148
|
+
### Return type
|
149
|
+
|
150
|
+
nil (empty response body)
|
151
|
+
|
152
|
+
### Authorization
|
153
|
+
|
154
|
+
[ultraCartOauth](../README.md#ultraCartOauth), [ultraCartSimpleApiKey](../README.md#ultraCartSimpleApiKey)
|
155
|
+
|
156
|
+
### HTTP request headers
|
157
|
+
|
158
|
+
- **Content-Type**: Not defined
|
159
|
+
- **Accept**: application/json
|
160
|
+
|
161
|
+
|
162
|
+
## delete_review
|
163
|
+
|
164
|
+
> delete_review(review_oid, merchant_item_oid)
|
165
|
+
|
166
|
+
Delete a review
|
167
|
+
|
168
|
+
Delete an item review.
|
169
|
+
|
170
|
+
|
171
|
+
### Examples
|
172
|
+
|
173
|
+
```ruby
|
174
|
+
require 'ultracart_api'
|
175
|
+
require_relative '../constants'
|
176
|
+
|
177
|
+
# Deletes a specific user review for an item. This would most likely be used by a merchant who has cached all
|
178
|
+
# reviews on a separate site and then wishes to remove a particular review.
|
179
|
+
#
|
180
|
+
# The merchant_item_oid is a unique identifier used by UltraCart. If you do not know your item's oid, call
|
181
|
+
# ItemApi.get_item_by_merchant_item_id() to retrieve the item, and then it's oid item.merchant_item_oid
|
182
|
+
#
|
183
|
+
# The review_oid is a unique identifier used by UltraCart. If you do not know a review's oid, call
|
184
|
+
# ItemApi.get_reviews() to get all reviews where you can then grab the oid from an item.
|
185
|
+
#
|
186
|
+
# Success returns back a status code of 204 (No Content)
|
187
|
+
|
188
|
+
item_api = UltracartClient::ItemApi.new_using_api_key(Constants::API_KEY)
|
189
|
+
merchant_item_oid = 123456
|
190
|
+
review_oid = 987654
|
191
|
+
item_api.delete_review(review_oid, merchant_item_oid)
|
192
|
+
```
|
193
|
+
|
194
|
+
|
195
|
+
#### Using the delete_review_with_http_info variant
|
196
|
+
|
197
|
+
This returns an Array which contains the response data (`nil` in this case), status code and headers.
|
198
|
+
|
199
|
+
> <Array(nil, Integer, Hash)> delete_review_with_http_info(review_oid, merchant_item_oid)
|
200
|
+
|
201
|
+
```ruby
|
202
|
+
begin
|
203
|
+
# Delete a review
|
204
|
+
data, status_code, headers = api_instance.delete_review_with_http_info(review_oid, merchant_item_oid)
|
205
|
+
p status_code # => 2xx
|
206
|
+
p headers # => { ... }
|
207
|
+
p data # => nil
|
208
|
+
rescue UltracartClient::ApiError => e
|
209
|
+
puts "Error when calling ItemApi->delete_review_with_http_info: #{e}"
|
210
|
+
end
|
211
|
+
```
|
212
|
+
|
213
|
+
### Parameters
|
214
|
+
|
215
|
+
| Name | Type | Description | Notes |
|
216
|
+
| ---- | ---- | ----------- | ----- |
|
217
|
+
| **review_oid** | **Integer** | The review oid to delete. | |
|
218
|
+
| **merchant_item_oid** | **Integer** | The item oid the review is associated with. | |
|
219
|
+
|
220
|
+
### Return type
|
221
|
+
|
222
|
+
nil (empty response body)
|
223
|
+
|
224
|
+
### Authorization
|
225
|
+
|
226
|
+
[ultraCartOauth](../README.md#ultraCartOauth), [ultraCartSimpleApiKey](../README.md#ultraCartSimpleApiKey)
|
227
|
+
|
228
|
+
### HTTP request headers
|
229
|
+
|
230
|
+
- **Content-Type**: Not defined
|
231
|
+
- **Accept**: application/json
|
232
|
+
|
233
|
+
|
234
|
+
## get_digital_item
|
235
|
+
|
236
|
+
> <ItemDigitalItemResponse> get_digital_item(digital_item_oid)
|
237
|
+
|
238
|
+
Retrieve a digital item from the digital library, which are digital files that may be attached to normal items
|
239
|
+
|
240
|
+
Retrieves a digital item (file information) from the account. Be aware that these are not normal items that can be added to a shopping cart. Rather, they are digital files that may be associated with normal items.
|
241
|
+
|
242
|
+
|
243
|
+
### Examples
|
244
|
+
|
245
|
+
```ruby
|
246
|
+
require 'ultracart_api'
|
247
|
+
require_relative '../constants'
|
248
|
+
require_relative './item_functions'
|
249
|
+
|
250
|
+
begin
|
251
|
+
# Digital Items are not normal items you sell on your site. They are digital files that you may add to
|
252
|
+
# a library and then attach to a normal item as an accessory or the main item itself.
|
253
|
+
# See: https://ultracart.atlassian.net/wiki/spaces/ucdoc/pages/1376485/Digital+Items
|
254
|
+
|
255
|
+
digital_item_oid = insert_sample_digital_item # create an item so I can get an item
|
256
|
+
item_api = UltracartClient::ItemApi.new_using_api_key(Constants::API_KEY)
|
257
|
+
|
258
|
+
opts = { '_expand' => nil }
|
259
|
+
api_response = item_api.get_digital_item(digital_item_oid, opts)
|
260
|
+
digital_item = api_response.digital_item # assuming this succeeded
|
261
|
+
|
262
|
+
puts 'The following item was retrieved via get_digital_item():'
|
263
|
+
p digital_item
|
264
|
+
|
265
|
+
delete_sample_digital_item(digital_item_oid)
|
266
|
+
|
267
|
+
rescue UltracartClient::ApiException => e
|
268
|
+
puts 'An ApiException occurred. Please review the following error:'
|
269
|
+
p e
|
270
|
+
exit(1)
|
271
|
+
end
|
272
|
+
```
|
273
|
+
|
274
|
+
|
275
|
+
#### Using the get_digital_item_with_http_info variant
|
276
|
+
|
277
|
+
This returns an Array which contains the response data, status code and headers.
|
278
|
+
|
279
|
+
> <Array(<ItemDigitalItemResponse>, Integer, Hash)> get_digital_item_with_http_info(digital_item_oid)
|
280
|
+
|
281
|
+
```ruby
|
282
|
+
begin
|
283
|
+
# Retrieve a digital item from the digital library, which are digital files that may be attached to normal items
|
284
|
+
data, status_code, headers = api_instance.get_digital_item_with_http_info(digital_item_oid)
|
285
|
+
p status_code # => 2xx
|
286
|
+
p headers # => { ... }
|
287
|
+
p data # => <ItemDigitalItemResponse>
|
288
|
+
rescue UltracartClient::ApiError => e
|
289
|
+
puts "Error when calling ItemApi->get_digital_item_with_http_info: #{e}"
|
290
|
+
end
|
291
|
+
```
|
292
|
+
|
293
|
+
### Parameters
|
294
|
+
|
295
|
+
| Name | Type | Description | Notes |
|
296
|
+
| ---- | ---- | ----------- | ----- |
|
297
|
+
| **digital_item_oid** | **Integer** | The digital item oid to retrieve. | |
|
298
|
+
|
299
|
+
### Return type
|
300
|
+
|
301
|
+
[**ItemDigitalItemResponse**](ItemDigitalItemResponse.md)
|
302
|
+
|
303
|
+
### Authorization
|
304
|
+
|
305
|
+
[ultraCartOauth](../README.md#ultraCartOauth), [ultraCartSimpleApiKey](../README.md#ultraCartSimpleApiKey)
|
306
|
+
|
307
|
+
### HTTP request headers
|
308
|
+
|
309
|
+
- **Content-Type**: Not defined
|
310
|
+
- **Accept**: application/json
|
311
|
+
|
312
|
+
|
313
|
+
## get_digital_items
|
314
|
+
|
315
|
+
> <ItemDigitalItemsResponse> get_digital_items(opts)
|
316
|
+
|
317
|
+
Retrieve digital items from the digital library which are digital files that may be attached to normal items
|
318
|
+
|
319
|
+
Retrieves a group of digital items (file information) from the account. If no parameters are specified, all digital items will be returned. Be aware that these are not normal items that can be added to a shopping cart. Rather, they are digital files that may be associated with normal items. You will need to make multiple API calls in order to retrieve the entire result set since this API performs result set pagination.
|
320
|
+
|
321
|
+
|
322
|
+
### Examples
|
323
|
+
|
324
|
+
```ruby
|
325
|
+
require 'ultracart_api'
|
326
|
+
require_relative '../constants'
|
327
|
+
require_relative './item_functions'
|
328
|
+
|
329
|
+
begin
|
330
|
+
# Please Note!
|
331
|
+
# Digital Items are not normal items you sell on your site. They are digital files that you may add to
|
332
|
+
# a library and then attach to a normal item as an accessory or the main item itself.
|
333
|
+
# See: https://ultracart.atlassian.net/wiki/spaces/ucdoc/pages/1376485/Digital+Items
|
334
|
+
|
335
|
+
# Create a sample digital item to retrieve
|
336
|
+
digital_item_oid = insert_sample_digital_item
|
337
|
+
|
338
|
+
# Initialize the item API
|
339
|
+
item_api = UltracartClient::ItemApi.new_using_api_key(Constants::API_KEY)
|
340
|
+
|
341
|
+
# Prepare API call parameters
|
342
|
+
opts = {
|
343
|
+
'_limit' => 100,
|
344
|
+
'_offset' => 0,
|
345
|
+
'_since' => nil, # digital items do not use since. leave as nil.
|
346
|
+
'_sort' => nil, # if nil, use default of original_filename
|
347
|
+
'_expand' => nil, # digital items have no expansion. leave as nil. this value is ignored
|
348
|
+
'_placeholders' => nil # digital items have no placeholders. leave as nil.
|
349
|
+
}
|
350
|
+
|
351
|
+
# Retrieve digital items
|
352
|
+
api_response = item_api.get_digital_items(opts)
|
353
|
+
digital_items = api_response.digital_items # assuming this succeeded
|
354
|
+
|
355
|
+
# Output retrieved digital items
|
356
|
+
puts 'The following items were retrieved via getDigitalItems():'
|
357
|
+
digital_items.each do |digital_item|
|
358
|
+
p digital_item
|
359
|
+
end
|
360
|
+
|
361
|
+
rescue UltracartClient::ApiException => e
|
362
|
+
puts 'An ApiException occurred. Please review the following error:'
|
363
|
+
p e # change_me: handle gracefully
|
364
|
+
exit 1
|
365
|
+
end
|
366
|
+
```
|
367
|
+
|
368
|
+
|
369
|
+
#### Using the get_digital_items_with_http_info variant
|
370
|
+
|
371
|
+
This returns an Array which contains the response data, status code and headers.
|
372
|
+
|
373
|
+
> <Array(<ItemDigitalItemsResponse>, Integer, Hash)> get_digital_items_with_http_info(opts)
|
374
|
+
|
375
|
+
```ruby
|
376
|
+
begin
|
377
|
+
# Retrieve digital items from the digital library which are digital files that may be attached to normal items
|
378
|
+
data, status_code, headers = api_instance.get_digital_items_with_http_info(opts)
|
379
|
+
p status_code # => 2xx
|
380
|
+
p headers # => { ... }
|
381
|
+
p data # => <ItemDigitalItemsResponse>
|
382
|
+
rescue UltracartClient::ApiError => e
|
383
|
+
puts "Error when calling ItemApi->get_digital_items_with_http_info: #{e}"
|
384
|
+
end
|
385
|
+
```
|
386
|
+
|
387
|
+
### Parameters
|
388
|
+
|
389
|
+
| Name | Type | Description | Notes |
|
390
|
+
| ---- | ---- | ----------- | ----- |
|
391
|
+
| **_limit** | **Integer** | The maximum number of records to return on this one API call. (Default 100, Max 2000) | [optional][default to 100] |
|
392
|
+
| **_offset** | **Integer** | Pagination of the record set. Offset is a zero based index. | [optional][default to 0] |
|
393
|
+
| **_since** | **String** | Fetch items that have been created/modified since this date/time. | [optional] |
|
394
|
+
| **_sort** | **String** | The sort order of the items. See Sorting documentation for examples of using multiple values and sorting by ascending and descending. | [optional] |
|
395
|
+
| **_expand** | **String** | The object expansion to perform on the result. See documentation for examples | [optional] |
|
396
|
+
| **_placeholders** | **Boolean** | Whether or not placeholder values should be returned in the result. Useful for UIs that consume this REST API. | [optional] |
|
397
|
+
|
398
|
+
### Return type
|
399
|
+
|
400
|
+
[**ItemDigitalItemsResponse**](ItemDigitalItemsResponse.md)
|
401
|
+
|
402
|
+
### Authorization
|
403
|
+
|
404
|
+
[ultraCartOauth](../README.md#ultraCartOauth), [ultraCartSimpleApiKey](../README.md#ultraCartSimpleApiKey)
|
405
|
+
|
406
|
+
### HTTP request headers
|
407
|
+
|
408
|
+
- **Content-Type**: Not defined
|
409
|
+
- **Accept**: application/json
|
410
|
+
|
411
|
+
|
412
|
+
## get_digital_items_by_external_id
|
413
|
+
|
414
|
+
> <ItemDigitalItemsResponse> get_digital_items_by_external_id(external_id)
|
415
|
+
|
416
|
+
Retrieves digital items from the digital library (which are digital files that may be attached to normal items) that having a matching external id
|
417
|
+
|
418
|
+
Retrieves digital items from the digital library (which are digital files that may be attached to normal items) that having a matching external id. Be aware that these are not normal items that can be added to a shopping cart. Rather, they are digital files that may be associated with normal items.
|
419
|
+
|
420
|
+
|
421
|
+
### Examples
|
422
|
+
|
423
|
+
```ruby
|
424
|
+
require 'ultracart_api'
|
425
|
+
require_relative '../constants'
|
426
|
+
require_relative './item_functions'
|
427
|
+
|
428
|
+
begin
|
429
|
+
# Please Note!
|
430
|
+
# Digital Items are not normal items you sell on your site. They are digital files that you may add to
|
431
|
+
# a library and then attach to a normal item as an accessory or the main item itself.
|
432
|
+
# See: https://ultracart.atlassian.net/wiki/spaces/ucdoc/pages/1376485/Digital+Items
|
433
|
+
|
434
|
+
# Generate a unique external ID
|
435
|
+
external_id = SecureRandom.uuid
|
436
|
+
puts "My external id is #{external_id}"
|
437
|
+
|
438
|
+
# Create digital item with a specific external id for later use
|
439
|
+
digital_item_oid = insert_sample_digital_item(external_id)
|
440
|
+
|
441
|
+
# Initialize the item API
|
442
|
+
item_api = UltracartClient::ItemApi.new_using_api_key(Constants::API_KEY)
|
443
|
+
|
444
|
+
# Retrieve digital items by external ID
|
445
|
+
api_response = item_api.get_digital_items_by_external_id(external_id)
|
446
|
+
digital_items = api_response.digital_items # assuming this succeeded
|
447
|
+
|
448
|
+
# Output retrieved items
|
449
|
+
puts 'The following item was retrieved via getDigitalItem():'
|
450
|
+
p digital_items
|
451
|
+
|
452
|
+
# Delete the sample digital item
|
453
|
+
delete_sample_digital_item(digital_item_oid)
|
454
|
+
|
455
|
+
rescue UltracartClient::ApiException => e
|
456
|
+
puts 'An ApiException occurred. Please review the following error:'
|
457
|
+
p e # change_me: handle gracefully
|
458
|
+
exit 1
|
459
|
+
end
|
460
|
+
```
|
461
|
+
|
462
|
+
|
463
|
+
#### Using the get_digital_items_by_external_id_with_http_info variant
|
464
|
+
|
465
|
+
This returns an Array which contains the response data, status code and headers.
|
466
|
+
|
467
|
+
> <Array(<ItemDigitalItemsResponse>, Integer, Hash)> get_digital_items_by_external_id_with_http_info(external_id)
|
468
|
+
|
469
|
+
```ruby
|
470
|
+
begin
|
471
|
+
# Retrieves digital items from the digital library (which are digital files that may be attached to normal items) that having a matching external id
|
472
|
+
data, status_code, headers = api_instance.get_digital_items_by_external_id_with_http_info(external_id)
|
473
|
+
p status_code # => 2xx
|
474
|
+
p headers # => { ... }
|
475
|
+
p data # => <ItemDigitalItemsResponse>
|
476
|
+
rescue UltracartClient::ApiError => e
|
477
|
+
puts "Error when calling ItemApi->get_digital_items_by_external_id_with_http_info: #{e}"
|
478
|
+
end
|
479
|
+
```
|
480
|
+
|
481
|
+
### Parameters
|
482
|
+
|
483
|
+
| Name | Type | Description | Notes |
|
484
|
+
| ---- | ---- | ----------- | ----- |
|
485
|
+
| **external_id** | **String** | The external id to match against. | |
|
486
|
+
|
487
|
+
### Return type
|
488
|
+
|
489
|
+
[**ItemDigitalItemsResponse**](ItemDigitalItemsResponse.md)
|
490
|
+
|
491
|
+
### Authorization
|
492
|
+
|
493
|
+
[ultraCartOauth](../README.md#ultraCartOauth), [ultraCartSimpleApiKey](../README.md#ultraCartSimpleApiKey)
|
494
|
+
|
495
|
+
### HTTP request headers
|
496
|
+
|
497
|
+
- **Content-Type**: Not defined
|
498
|
+
- **Accept**: application/json
|
499
|
+
|
500
|
+
|
501
|
+
## get_inventory_snapshot
|
502
|
+
|
503
|
+
> <ItemInventorySnapshotResponse> get_inventory_snapshot
|
504
|
+
|
505
|
+
Retrieve a list of item inventories. This method may be called once every 15 minutes. More than that will result in a 429 response.
|
506
|
+
|
507
|
+
Retrieve a list of item inventories. This method may be called once every 15 minutes. More than that will result in a 429 response.
|
508
|
+
|
509
|
+
|
510
|
+
### Examples
|
511
|
+
|
512
|
+
```ruby
|
513
|
+
require 'ultracart_api'
|
514
|
+
require_relative '../constants'
|
515
|
+
|
516
|
+
# Retrieve a list of item inventories.
|
517
|
+
# This method may be called once every 15 minutes. More than that will result in a 429 response.
|
518
|
+
|
519
|
+
begin
|
520
|
+
# Initialize the item API
|
521
|
+
item_api = UltracartClient::ItemApi.new_using_api_key(Constants::API_KEY)
|
522
|
+
|
523
|
+
# Retrieve inventory snapshot
|
524
|
+
api_response = item_api.get_inventory_snapshot
|
525
|
+
inventories = api_response.inventories
|
526
|
+
|
527
|
+
# Output each inventory item
|
528
|
+
inventories.each do |inventory|
|
529
|
+
p inventory
|
530
|
+
end
|
531
|
+
|
532
|
+
rescue UltracartClient::ApiException => e
|
533
|
+
puts 'An ApiException occurred. Please review the following error:'
|
534
|
+
p e # change_me: handle gracefully
|
535
|
+
exit 1
|
536
|
+
end
|
537
|
+
```
|
538
|
+
|
539
|
+
|
540
|
+
#### Using the get_inventory_snapshot_with_http_info variant
|
541
|
+
|
542
|
+
This returns an Array which contains the response data, status code and headers.
|
543
|
+
|
544
|
+
> <Array(<ItemInventorySnapshotResponse>, Integer, Hash)> get_inventory_snapshot_with_http_info
|
545
|
+
|
546
|
+
```ruby
|
547
|
+
begin
|
548
|
+
# Retrieve a list of item inventories. This method may be called once every 15 minutes. More than that will result in a 429 response.
|
549
|
+
data, status_code, headers = api_instance.get_inventory_snapshot_with_http_info
|
550
|
+
p status_code # => 2xx
|
551
|
+
p headers # => { ... }
|
552
|
+
p data # => <ItemInventorySnapshotResponse>
|
553
|
+
rescue UltracartClient::ApiError => e
|
554
|
+
puts "Error when calling ItemApi->get_inventory_snapshot_with_http_info: #{e}"
|
555
|
+
end
|
556
|
+
```
|
557
|
+
|
558
|
+
### Parameters
|
559
|
+
|
560
|
+
This endpoint does not need any parameter.
|
561
|
+
|
562
|
+
### Return type
|
563
|
+
|
564
|
+
[**ItemInventorySnapshotResponse**](ItemInventorySnapshotResponse.md)
|
565
|
+
|
566
|
+
### Authorization
|
567
|
+
|
568
|
+
[ultraCartOauth](../README.md#ultraCartOauth), [ultraCartSimpleApiKey](../README.md#ultraCartSimpleApiKey)
|
569
|
+
|
570
|
+
### HTTP request headers
|
571
|
+
|
572
|
+
- **Content-Type**: Not defined
|
573
|
+
- **Accept**: application/json
|
574
|
+
|
575
|
+
|
576
|
+
## get_item
|
577
|
+
|
578
|
+
> <ItemResponse> get_item(merchant_item_oid, opts)
|
579
|
+
|
580
|
+
Retrieve an item
|
581
|
+
|
582
|
+
Retrieves a single item using the specified item oid.
|
583
|
+
|
584
|
+
|
585
|
+
### Examples
|
586
|
+
|
587
|
+
```ruby
|
588
|
+
require 'ultracart_api'
|
589
|
+
require_relative '../constants'
|
590
|
+
require_relative './item_functions'
|
591
|
+
|
592
|
+
begin
|
593
|
+
# Of the two getItem methods, you'll probably always use getItemByMerchantItemId instead of this one.
|
594
|
+
# Most item work is done with the item id, not the item oid. The latter is only meaningful as a primary
|
595
|
+
# key in the UltraCart databases. But here is an example of using getItem(). We take the long route here
|
596
|
+
# of retrieving the item using getItemByMerchantItemId to obtain the oid rather than hard-coding it.
|
597
|
+
# We do this because these samples are used in our quality control system and run repeatedly.
|
598
|
+
|
599
|
+
# Insert a sample item
|
600
|
+
item_id = insert_sample_item
|
601
|
+
|
602
|
+
# Initialize APIs
|
603
|
+
item_api = UltracartClient::ItemApi.new_using_api_key(Constants::API_KEY)
|
604
|
+
customer_api = UltracartClient::CustomerApi.new_using_api_key(Constants::API_KEY)
|
605
|
+
|
606
|
+
# Retrieve item by merchant item ID (base object only)
|
607
|
+
base_response = item_api.get_item_by_merchant_item_id(item_id, opts = { '_expand' => nil, '_placeholders' => false })
|
608
|
+
item = base_response.item
|
609
|
+
|
610
|
+
merchant_item_oid = item.merchant_item_oid
|
611
|
+
|
612
|
+
# Possible expansion values documented in comments
|
613
|
+
# Expansion demonstrates accessing product reviews
|
614
|
+
expand_options = "reviews,reviews.individual_reviews"
|
615
|
+
|
616
|
+
# Retrieve full item details with expansions
|
617
|
+
full_response = item_api.get_item(merchant_item_oid, opts = { '_expand' => expand_options, '_placeholders' => false })
|
618
|
+
full_item = full_response.item
|
619
|
+
|
620
|
+
# Access item reviews
|
621
|
+
item_reviews = full_item.reviews
|
622
|
+
individual_reviews = item_reviews.individual_reviews
|
623
|
+
|
624
|
+
# Iterate through individual reviews
|
625
|
+
individual_reviews.each do |individual_review|
|
626
|
+
# Access rating names and scores (configurable by merchant)
|
627
|
+
rating_name = individual_review.get_rating_name1
|
628
|
+
rating_score = individual_review.get_rating_score1
|
629
|
+
|
630
|
+
# Retrieve reviewer information (cautiously to avoid API call limits)
|
631
|
+
customer_response = customer_api.get_customer(
|
632
|
+
individual_review.customer_profile_oid,
|
633
|
+
opts = { '_expand' => "reviewer" }
|
634
|
+
)
|
635
|
+
customer = customer_response.customer
|
636
|
+
reviewer = customer.reviewer
|
637
|
+
end
|
638
|
+
|
639
|
+
# Output the retrieved item
|
640
|
+
puts 'The following item was retrieved via getItem():'
|
641
|
+
p full_item
|
642
|
+
|
643
|
+
# Clean up sample item
|
644
|
+
delete_sample_item(merchant_item_oid)
|
645
|
+
|
646
|
+
rescue UltracartClient::ApiException => e
|
647
|
+
puts 'An ApiException occurred. Please review the following error:'
|
648
|
+
p e # change_me: handle gracefully
|
649
|
+
exit 1
|
650
|
+
end
|
651
|
+
```
|
652
|
+
|
653
|
+
|
654
|
+
#### Using the get_item_with_http_info variant
|
655
|
+
|
656
|
+
This returns an Array which contains the response data, status code and headers.
|
657
|
+
|
658
|
+
> <Array(<ItemResponse>, Integer, Hash)> get_item_with_http_info(merchant_item_oid, opts)
|
659
|
+
|
660
|
+
```ruby
|
661
|
+
begin
|
662
|
+
# Retrieve an item
|
663
|
+
data, status_code, headers = api_instance.get_item_with_http_info(merchant_item_oid, opts)
|
664
|
+
p status_code # => 2xx
|
665
|
+
p headers # => { ... }
|
666
|
+
p data # => <ItemResponse>
|
667
|
+
rescue UltracartClient::ApiError => e
|
668
|
+
puts "Error when calling ItemApi->get_item_with_http_info: #{e}"
|
669
|
+
end
|
670
|
+
```
|
671
|
+
|
672
|
+
### Parameters
|
673
|
+
|
674
|
+
| Name | Type | Description | Notes |
|
675
|
+
| ---- | ---- | ----------- | ----- |
|
676
|
+
| **merchant_item_oid** | **Integer** | The item oid to retrieve. | |
|
677
|
+
| **_expand** | **String** | The object expansion to perform on the result. See documentation for examples | [optional] |
|
678
|
+
| **_placeholders** | **Boolean** | Whether or not placeholder values should be returned in the result. Useful for UIs that consume this REST API. | [optional] |
|
679
|
+
|
680
|
+
### Return type
|
681
|
+
|
682
|
+
[**ItemResponse**](ItemResponse.md)
|
683
|
+
|
684
|
+
### Authorization
|
685
|
+
|
686
|
+
[ultraCartOauth](../README.md#ultraCartOauth), [ultraCartSimpleApiKey](../README.md#ultraCartSimpleApiKey)
|
687
|
+
|
688
|
+
### HTTP request headers
|
689
|
+
|
690
|
+
- **Content-Type**: Not defined
|
691
|
+
- **Accept**: application/json
|
692
|
+
|
693
|
+
|
694
|
+
## get_item_by_merchant_item_id
|
695
|
+
|
696
|
+
> <ItemResponse> get_item_by_merchant_item_id(merchant_item_id, opts)
|
697
|
+
|
698
|
+
Retrieve an item by item id
|
699
|
+
|
700
|
+
Retrieves a single item using the specified item id.
|
701
|
+
|
702
|
+
|
703
|
+
### Examples
|
704
|
+
|
705
|
+
```ruby
|
706
|
+
require 'ultracart_api'
|
707
|
+
require_relative '../constants'
|
708
|
+
require_relative './item_functions'
|
709
|
+
|
710
|
+
begin
|
711
|
+
# Of the two getItem methods, you'll probably always use getItemByMerchantItemId instead of this one.
|
712
|
+
# Most item work is done with the item id, not the item oid. The latter is only meaningful as a primary
|
713
|
+
# key in the UltraCart databases. But here is an example of using getItem(). We take the long route here
|
714
|
+
# of retrieving the item using getItemByMerchantItemId to obtain the oid rather than hard-coding it. We do this
|
715
|
+
# because these samples are used in our quality control system and run repeatedly.
|
716
|
+
|
717
|
+
# Insert a sample item
|
718
|
+
item_id = insert_sample_item
|
719
|
+
|
720
|
+
# Initialize item API
|
721
|
+
item_api = UltracartClient::ItemApi.new_using_api_key(Constants::API_KEY)
|
722
|
+
|
723
|
+
# The real devil in the getItem calls is the expansion, making sure you return everything you need without
|
724
|
+
# returning everything since these objects are extremely large.
|
725
|
+
# These are the possible expansion values:
|
726
|
+
#
|
727
|
+
# accounting
|
728
|
+
# amember
|
729
|
+
# auto_order
|
730
|
+
# auto_order.steps
|
731
|
+
# ccbill
|
732
|
+
# channel_partner_mappings
|
733
|
+
# chargeback
|
734
|
+
# checkout
|
735
|
+
# content
|
736
|
+
# content.assignments
|
737
|
+
# content.attributes
|
738
|
+
# content.multimedia
|
739
|
+
# content.multimedia.thumbnails
|
740
|
+
# digital_delivery
|
741
|
+
# ebay
|
742
|
+
# email_notifications
|
743
|
+
# enrollment123
|
744
|
+
# gift_certificate
|
745
|
+
# google_product_search
|
746
|
+
# kit_definition
|
747
|
+
# identifiers
|
748
|
+
# instant_payment_notifications
|
749
|
+
# internal
|
750
|
+
# options
|
751
|
+
# payment_processing
|
752
|
+
# physical
|
753
|
+
# pricing
|
754
|
+
# pricing.tiers
|
755
|
+
# realtime_pricing
|
756
|
+
# related
|
757
|
+
# reporting
|
758
|
+
# restriction
|
759
|
+
# reviews
|
760
|
+
# salesforce
|
761
|
+
# shipping
|
762
|
+
# shipping.cases
|
763
|
+
# shipping.destination_markups
|
764
|
+
# shipping.destination_restrictions
|
765
|
+
# shipping.distribution_centers
|
766
|
+
# shipping.methods
|
767
|
+
# shipping.package_requirements
|
768
|
+
# tax
|
769
|
+
# third_party_email_marketing
|
770
|
+
# variations
|
771
|
+
# wishlist_member
|
772
|
+
#
|
773
|
+
# just some random ones. contact us if you're unsure
|
774
|
+
expand = "kit_definition,options,shipping,tax,variations"
|
775
|
+
|
776
|
+
# Retrieve item by merchant item ID with expansions
|
777
|
+
api_response = item_api.get_item_by_merchant_item_id(
|
778
|
+
item_id,
|
779
|
+
opts = { '_expand' => expand, '_placeholders' => false }
|
780
|
+
)
|
781
|
+
item = api_response.item
|
782
|
+
|
783
|
+
# Output the retrieved item
|
784
|
+
puts 'The following item was retrieved via getItemByMerchantItemId():'
|
785
|
+
p item
|
786
|
+
|
787
|
+
# Clean up sample item
|
788
|
+
delete_sample_item(item_id)
|
789
|
+
|
790
|
+
rescue UltracartClient::ApiException => e
|
791
|
+
puts 'An ApiException occurred. Please review the following error:'
|
792
|
+
p e # change_me: handle gracefully
|
793
|
+
exit 1
|
794
|
+
end
|
795
|
+
```
|
796
|
+
|
797
|
+
|
798
|
+
#### Using the get_item_by_merchant_item_id_with_http_info variant
|
799
|
+
|
800
|
+
This returns an Array which contains the response data, status code and headers.
|
801
|
+
|
802
|
+
> <Array(<ItemResponse>, Integer, Hash)> get_item_by_merchant_item_id_with_http_info(merchant_item_id, opts)
|
803
|
+
|
804
|
+
```ruby
|
805
|
+
begin
|
806
|
+
# Retrieve an item by item id
|
807
|
+
data, status_code, headers = api_instance.get_item_by_merchant_item_id_with_http_info(merchant_item_id, opts)
|
808
|
+
p status_code # => 2xx
|
809
|
+
p headers # => { ... }
|
810
|
+
p data # => <ItemResponse>
|
811
|
+
rescue UltracartClient::ApiError => e
|
812
|
+
puts "Error when calling ItemApi->get_item_by_merchant_item_id_with_http_info: #{e}"
|
813
|
+
end
|
814
|
+
```
|
815
|
+
|
816
|
+
### Parameters
|
817
|
+
|
818
|
+
| Name | Type | Description | Notes |
|
819
|
+
| ---- | ---- | ----------- | ----- |
|
820
|
+
| **merchant_item_id** | **String** | The item id to retrieve. | |
|
821
|
+
| **_expand** | **String** | The object expansion to perform on the result. See documentation for examples | [optional] |
|
822
|
+
| **_placeholders** | **Boolean** | Whether or not placeholder values should be returned in the result. Useful for UIs that consume this REST API. | [optional] |
|
823
|
+
|
824
|
+
### Return type
|
825
|
+
|
826
|
+
[**ItemResponse**](ItemResponse.md)
|
827
|
+
|
828
|
+
### Authorization
|
829
|
+
|
830
|
+
[ultraCartOauth](../README.md#ultraCartOauth), [ultraCartSimpleApiKey](../README.md#ultraCartSimpleApiKey)
|
831
|
+
|
832
|
+
### HTTP request headers
|
833
|
+
|
834
|
+
- **Content-Type**: Not defined
|
835
|
+
- **Accept**: application/json
|
836
|
+
|
837
|
+
|
838
|
+
## get_items
|
839
|
+
|
840
|
+
> <ItemsResponse> get_items(opts)
|
841
|
+
|
842
|
+
Retrieve items
|
843
|
+
|
844
|
+
Retrieves a group of items from the account. If no parameters are specified, all items will be returned. You will need to make multiple API calls in order to retrieve the entire result set since this API performs result set pagination.
|
845
|
+
|
846
|
+
|
847
|
+
### Examples
|
848
|
+
|
849
|
+
```ruby
|
850
|
+
require 'ultracart_api'
|
851
|
+
require_relative '../constants'
|
852
|
+
|
853
|
+
# Increase execution time for potentially long-running script
|
854
|
+
# Note: Ruby uses different methods for timeout management
|
855
|
+
# You may need to adjust based on your specific Ruby environment
|
856
|
+
|
857
|
+
# This example illustrates how to retrieve items. When dealing with items, please note that categories are
|
858
|
+
# essentially folders to organize and store items. They are only used for that purpose and play no role in
|
859
|
+
# the checkout process or in the storefront display of items. So you may organize your items as best serves
|
860
|
+
# you. We're often asked why we use the word 'category' instead of 'folder'. We started down the road of
|
861
|
+
# item management 27 years ago with the word 'category', and it's too much trouble to change. So items are
|
862
|
+
# managed by categories, not folders. But they are folders. :)
|
863
|
+
#
|
864
|
+
# The call takes two possible parameters:
|
865
|
+
# 1) parentCategoryId: This is a number which uniquely identifies a category in our system. Not easy to determine.
|
866
|
+
# 2) parentCategoryPath: This is the folder path you wish to retrieve, starting with a forward slash "/"
|
867
|
+
# If you provide neither of these values, all items are returned.
|
868
|
+
|
869
|
+
# Method to retrieve a chunk of items
|
870
|
+
def get_item_chunk(item_api, offset, limit)
|
871
|
+
# The real devil in the getItem calls is the expansion, making sure you return everything you need without
|
872
|
+
# returning everything since these objects are extremely large.
|
873
|
+
# These are the possible expansion values:
|
874
|
+
#
|
875
|
+
# accounting amember auto_order auto_order.steps
|
876
|
+
# ccbill channel_partner_mappings chargeback checkout
|
877
|
+
# content content.assignments content.attributes content.multimedia
|
878
|
+
# content.multimedia.thumbnails digital_delivery ebay email_notifications
|
879
|
+
# enrollment123 gift_certificate google_product_search kit_definition
|
880
|
+
# identifiers instant_payment_notifications internal options
|
881
|
+
# payment_processing physical pricing pricing.tiers
|
882
|
+
# realtime_pricing related reporting restriction
|
883
|
+
# reviews salesforce shipping shipping.cases
|
884
|
+
# tax third_party_email_marketing variations wishlist_member
|
885
|
+
# shipping.destination_markups
|
886
|
+
# shipping.destination_restrictions
|
887
|
+
# shipping.distribution_centers
|
888
|
+
# shipping.methods
|
889
|
+
# shipping.package_requirements
|
890
|
+
|
891
|
+
# Just some random ones. Contact us if you're unsure
|
892
|
+
expand = "kit_definition,options,shipping,tax,variations"
|
893
|
+
|
894
|
+
# Prepare options for API call
|
895
|
+
opts = {
|
896
|
+
'_parent_category_id' => nil,
|
897
|
+
'_parent_category_path' => nil,
|
898
|
+
'_limit' => limit,
|
899
|
+
'_offset' => offset,
|
900
|
+
'_since' => nil,
|
901
|
+
'_sort' => nil,
|
902
|
+
'_expand' => expand,
|
903
|
+
'_placeholders' => false
|
904
|
+
}
|
905
|
+
|
906
|
+
# Retrieve items
|
907
|
+
api_response = item_api.get_items(opts)
|
908
|
+
|
909
|
+
# Return items or empty array if none found
|
910
|
+
api_response.items || []
|
911
|
+
end
|
912
|
+
|
913
|
+
begin
|
914
|
+
# Initialize item API
|
915
|
+
item_api = UltracartClient::ItemApi.new_using_api_key(Constants::API_KEY)
|
916
|
+
|
917
|
+
# Pagination variables
|
918
|
+
items = []
|
919
|
+
iteration = 1
|
920
|
+
offset = 0
|
921
|
+
limit = 200
|
922
|
+
more_records_to_fetch = true
|
923
|
+
|
924
|
+
# Fetch items in chunks
|
925
|
+
while more_records_to_fetch
|
926
|
+
puts "executing iteration #{iteration}"
|
927
|
+
|
928
|
+
chunk_of_items = get_item_chunk(item_api, offset, limit)
|
929
|
+
items += chunk_of_items
|
930
|
+
offset += limit
|
931
|
+
more_records_to_fetch = chunk_of_items.length == limit
|
932
|
+
iteration += 1
|
933
|
+
end
|
934
|
+
|
935
|
+
# Output will be verbose...
|
936
|
+
p items
|
937
|
+
|
938
|
+
rescue UltracartClient::ApiException => e
|
939
|
+
puts "ApiException occurred on iteration #{iteration}"
|
940
|
+
p e
|
941
|
+
exit 1
|
942
|
+
end
|
943
|
+
```
|
944
|
+
|
945
|
+
|
946
|
+
#### Using the get_items_with_http_info variant
|
947
|
+
|
948
|
+
This returns an Array which contains the response data, status code and headers.
|
949
|
+
|
950
|
+
> <Array(<ItemsResponse>, Integer, Hash)> get_items_with_http_info(opts)
|
951
|
+
|
952
|
+
```ruby
|
953
|
+
begin
|
954
|
+
# Retrieve items
|
955
|
+
data, status_code, headers = api_instance.get_items_with_http_info(opts)
|
956
|
+
p status_code # => 2xx
|
957
|
+
p headers # => { ... }
|
958
|
+
p data # => <ItemsResponse>
|
959
|
+
rescue UltracartClient::ApiError => e
|
960
|
+
puts "Error when calling ItemApi->get_items_with_http_info: #{e}"
|
961
|
+
end
|
962
|
+
```
|
963
|
+
|
964
|
+
### Parameters
|
965
|
+
|
966
|
+
| Name | Type | Description | Notes |
|
967
|
+
| ---- | ---- | ----------- | ----- |
|
968
|
+
| **parent_category_id** | **Integer** | The parent category object id to retrieve items for. Unspecified means all items on the account. 0 = root | [optional] |
|
969
|
+
| **parent_category_path** | **String** | The parent category path to retrieve items for. Unspecified means all items on the account. / = root | [optional] |
|
970
|
+
| **_limit** | **Integer** | The maximum number of records to return on this one API call. (Default 100, Max 2000) | [optional][default to 100] |
|
971
|
+
| **_offset** | **Integer** | Pagination of the record set. Offset is a zero based index. | [optional][default to 0] |
|
972
|
+
| **_since** | **String** | Fetch items that have been created/modified since this date/time. | [optional] |
|
973
|
+
| **_sort** | **String** | The sort order of the items. See Sorting documentation for examples of using multiple values and sorting by ascending and descending. | [optional] |
|
974
|
+
| **_expand** | **String** | The object expansion to perform on the result. See documentation for examples | [optional] |
|
975
|
+
| **_placeholders** | **Boolean** | Whether or not placeholder values should be returned in the result. Useful for UIs that consume this REST API. | [optional] |
|
976
|
+
|
977
|
+
### Return type
|
978
|
+
|
979
|
+
[**ItemsResponse**](ItemsResponse.md)
|
980
|
+
|
981
|
+
### Authorization
|
982
|
+
|
983
|
+
[ultraCartOauth](../README.md#ultraCartOauth), [ultraCartSimpleApiKey](../README.md#ultraCartSimpleApiKey)
|
984
|
+
|
985
|
+
### HTTP request headers
|
986
|
+
|
987
|
+
- **Content-Type**: Not defined
|
988
|
+
- **Accept**: application/json
|
989
|
+
|
990
|
+
|
991
|
+
## get_pricing_tiers
|
992
|
+
|
993
|
+
> <PricingTiersResponse> get_pricing_tiers(opts)
|
994
|
+
|
995
|
+
Retrieve pricing tiers
|
996
|
+
|
997
|
+
Retrieves the pricing tiers
|
998
|
+
|
999
|
+
|
1000
|
+
### Examples
|
1001
|
+
|
1002
|
+
```ruby
|
1003
|
+
require 'ultracart_api'
|
1004
|
+
require_relative '../constants'
|
1005
|
+
|
1006
|
+
# Possible expansion values for PricingTier object:
|
1007
|
+
# - approval_notification
|
1008
|
+
# - signup_notification
|
1009
|
+
|
1010
|
+
begin
|
1011
|
+
# Initialize the item API using the API key from constants
|
1012
|
+
item_api = UltracartClient::ItemApi.new_using_api_key(Constants::API_KEY)
|
1013
|
+
|
1014
|
+
# Define expand options in the opts hash
|
1015
|
+
opts = {
|
1016
|
+
'_expand' => 'approval_notification,signup_notification'
|
1017
|
+
}
|
1018
|
+
|
1019
|
+
# Get pricing tiers with expand options
|
1020
|
+
api_response = item_api.get_pricing_tiers(opts)
|
1021
|
+
|
1022
|
+
# Print the pricing tiers
|
1023
|
+
p api_response.pricing_tiers
|
1024
|
+
|
1025
|
+
rescue UltracartClient::ApiError => e
|
1026
|
+
puts 'ApiException occurred.'
|
1027
|
+
p e
|
1028
|
+
exit(1)
|
1029
|
+
end
|
1030
|
+
```
|
1031
|
+
|
1032
|
+
|
1033
|
+
#### Using the get_pricing_tiers_with_http_info variant
|
1034
|
+
|
1035
|
+
This returns an Array which contains the response data, status code and headers.
|
1036
|
+
|
1037
|
+
> <Array(<PricingTiersResponse>, Integer, Hash)> get_pricing_tiers_with_http_info(opts)
|
1038
|
+
|
1039
|
+
```ruby
|
1040
|
+
begin
|
1041
|
+
# Retrieve pricing tiers
|
1042
|
+
data, status_code, headers = api_instance.get_pricing_tiers_with_http_info(opts)
|
1043
|
+
p status_code # => 2xx
|
1044
|
+
p headers # => { ... }
|
1045
|
+
p data # => <PricingTiersResponse>
|
1046
|
+
rescue UltracartClient::ApiError => e
|
1047
|
+
puts "Error when calling ItemApi->get_pricing_tiers_with_http_info: #{e}"
|
1048
|
+
end
|
1049
|
+
```
|
1050
|
+
|
1051
|
+
### Parameters
|
1052
|
+
|
1053
|
+
| Name | Type | Description | Notes |
|
1054
|
+
| ---- | ---- | ----------- | ----- |
|
1055
|
+
| **_expand** | **String** | The object expansion to perform on the result. See documentation for examples | [optional] |
|
1056
|
+
|
1057
|
+
### Return type
|
1058
|
+
|
1059
|
+
[**PricingTiersResponse**](PricingTiersResponse.md)
|
1060
|
+
|
1061
|
+
### Authorization
|
1062
|
+
|
1063
|
+
[ultraCartOauth](../README.md#ultraCartOauth), [ultraCartSimpleApiKey](../README.md#ultraCartSimpleApiKey)
|
1064
|
+
|
1065
|
+
### HTTP request headers
|
1066
|
+
|
1067
|
+
- **Content-Type**: Not defined
|
1068
|
+
- **Accept**: application/json
|
1069
|
+
|
1070
|
+
|
1071
|
+
## get_review
|
1072
|
+
|
1073
|
+
> <ItemReviewResponse> get_review(review_oid, merchant_item_oid)
|
1074
|
+
|
1075
|
+
Get a review
|
1076
|
+
|
1077
|
+
Retrieve an item review.
|
1078
|
+
|
1079
|
+
|
1080
|
+
### Examples
|
1081
|
+
|
1082
|
+
```ruby
|
1083
|
+
require 'ultracart_api'
|
1084
|
+
require_relative '../constants'
|
1085
|
+
|
1086
|
+
=begin
|
1087
|
+
Retrieves a specific user review for an item. This would most likely be used by a merchant who has cached all
|
1088
|
+
reviews on a separate site and then wishes to update a particular review. It's always best to "get" the object,
|
1089
|
+
make changes to it, then call the update instead of trying to recreate the object from scratch.
|
1090
|
+
|
1091
|
+
The merchant_item_oid is a unique identifier used by UltraCart. If you do not know your item's oid, call
|
1092
|
+
ItemApi.get_item_by_merchant_item_id() to retrieve the item, and then it's oid item.merchant_item_oid
|
1093
|
+
|
1094
|
+
The review_oid is a unique identifier used by UltraCart. If you do not know a review's oid, call
|
1095
|
+
ItemApi.get_reviews() to get all reviews where you can then grab the oid from an item.
|
1096
|
+
=end
|
1097
|
+
|
1098
|
+
# Initialize the item API
|
1099
|
+
item_api = UltracartClient::ItemApi.new_using_api_key(Constants::API_KEY)
|
1100
|
+
|
1101
|
+
# Set merchant item and review OIDs
|
1102
|
+
merchant_item_oid = 123456
|
1103
|
+
review_oid = 987654
|
1104
|
+
|
1105
|
+
# Get the review with opts hash
|
1106
|
+
begin
|
1107
|
+
api_response = item_api.get_review(review_oid, merchant_item_oid)
|
1108
|
+
|
1109
|
+
# Check for errors
|
1110
|
+
if api_response.error
|
1111
|
+
warn api_response.error.developer_message
|
1112
|
+
warn api_response.error.user_message
|
1113
|
+
exit
|
1114
|
+
end
|
1115
|
+
|
1116
|
+
# Print the review
|
1117
|
+
p api_response.review
|
1118
|
+
|
1119
|
+
rescue UltracartClient::ApiError => e
|
1120
|
+
warn "API Error: #{e.message}"
|
1121
|
+
exit(1)
|
1122
|
+
end
|
1123
|
+
```
|
1124
|
+
|
1125
|
+
|
1126
|
+
#### Using the get_review_with_http_info variant
|
1127
|
+
|
1128
|
+
This returns an Array which contains the response data, status code and headers.
|
1129
|
+
|
1130
|
+
> <Array(<ItemReviewResponse>, Integer, Hash)> get_review_with_http_info(review_oid, merchant_item_oid)
|
1131
|
+
|
1132
|
+
```ruby
|
1133
|
+
begin
|
1134
|
+
# Get a review
|
1135
|
+
data, status_code, headers = api_instance.get_review_with_http_info(review_oid, merchant_item_oid)
|
1136
|
+
p status_code # => 2xx
|
1137
|
+
p headers # => { ... }
|
1138
|
+
p data # => <ItemReviewResponse>
|
1139
|
+
rescue UltracartClient::ApiError => e
|
1140
|
+
puts "Error when calling ItemApi->get_review_with_http_info: #{e}"
|
1141
|
+
end
|
1142
|
+
```
|
1143
|
+
|
1144
|
+
### Parameters
|
1145
|
+
|
1146
|
+
| Name | Type | Description | Notes |
|
1147
|
+
| ---- | ---- | ----------- | ----- |
|
1148
|
+
| **review_oid** | **Integer** | The review oid to retrieve. | |
|
1149
|
+
| **merchant_item_oid** | **Integer** | The item oid the review is associated with. | |
|
1150
|
+
|
1151
|
+
### Return type
|
1152
|
+
|
1153
|
+
[**ItemReviewResponse**](ItemReviewResponse.md)
|
1154
|
+
|
1155
|
+
### Authorization
|
1156
|
+
|
1157
|
+
[ultraCartOauth](../README.md#ultraCartOauth), [ultraCartSimpleApiKey](../README.md#ultraCartSimpleApiKey)
|
1158
|
+
|
1159
|
+
### HTTP request headers
|
1160
|
+
|
1161
|
+
- **Content-Type**: Not defined
|
1162
|
+
- **Accept**: application/json
|
1163
|
+
|
1164
|
+
|
1165
|
+
## get_reviews
|
1166
|
+
|
1167
|
+
> <ItemReviewsResponse> get_reviews(merchant_item_oid)
|
1168
|
+
|
1169
|
+
Get reviews for an item
|
1170
|
+
|
1171
|
+
Retrieve item reviews.
|
1172
|
+
|
1173
|
+
|
1174
|
+
### Examples
|
1175
|
+
|
1176
|
+
```ruby
|
1177
|
+
require 'ultracart_api'
|
1178
|
+
require_relative '../constants'
|
1179
|
+
|
1180
|
+
=begin
|
1181
|
+
Retrieves all user reviews for an item.
|
1182
|
+
|
1183
|
+
The merchant_item_oid is a unique identifier used by UltraCart. If you do not know your item's oid, call
|
1184
|
+
ItemApi.get_item_by_merchant_item_id() to retrieve the item, and then its oid item.merchant_item_oid
|
1185
|
+
=end
|
1186
|
+
|
1187
|
+
# Initialize the item API
|
1188
|
+
item_api = UltracartClient::ItemApi.new_using_api_key(Constants::API_KEY)
|
1189
|
+
|
1190
|
+
# Set merchant item OID
|
1191
|
+
merchant_item_oid = 123456
|
1192
|
+
|
1193
|
+
begin
|
1194
|
+
# Get reviews for the specified merchant item
|
1195
|
+
api_response = item_api.get_reviews(merchant_item_oid)
|
1196
|
+
|
1197
|
+
# Check for errors
|
1198
|
+
if api_response.error
|
1199
|
+
warn api_response.error.developer_message
|
1200
|
+
warn api_response.error.user_message
|
1201
|
+
exit
|
1202
|
+
end
|
1203
|
+
|
1204
|
+
# Print each review
|
1205
|
+
api_response.reviews.each do |review|
|
1206
|
+
p review
|
1207
|
+
end
|
1208
|
+
|
1209
|
+
rescue UltracartClient::ApiError => e
|
1210
|
+
warn "API Error: #{e.message}"
|
1211
|
+
exit(1)
|
1212
|
+
end
|
1213
|
+
```
|
1214
|
+
|
1215
|
+
|
1216
|
+
#### Using the get_reviews_with_http_info variant
|
1217
|
+
|
1218
|
+
This returns an Array which contains the response data, status code and headers.
|
1219
|
+
|
1220
|
+
> <Array(<ItemReviewsResponse>, Integer, Hash)> get_reviews_with_http_info(merchant_item_oid)
|
1221
|
+
|
1222
|
+
```ruby
|
1223
|
+
begin
|
1224
|
+
# Get reviews for an item
|
1225
|
+
data, status_code, headers = api_instance.get_reviews_with_http_info(merchant_item_oid)
|
1226
|
+
p status_code # => 2xx
|
1227
|
+
p headers # => { ... }
|
1228
|
+
p data # => <ItemReviewsResponse>
|
1229
|
+
rescue UltracartClient::ApiError => e
|
1230
|
+
puts "Error when calling ItemApi->get_reviews_with_http_info: #{e}"
|
1231
|
+
end
|
1232
|
+
```
|
1233
|
+
|
1234
|
+
### Parameters
|
1235
|
+
|
1236
|
+
| Name | Type | Description | Notes |
|
1237
|
+
| ---- | ---- | ----------- | ----- |
|
1238
|
+
| **merchant_item_oid** | **Integer** | The item oid the review is associated with. | |
|
1239
|
+
|
1240
|
+
### Return type
|
1241
|
+
|
1242
|
+
[**ItemReviewsResponse**](ItemReviewsResponse.md)
|
1243
|
+
|
1244
|
+
### Authorization
|
1245
|
+
|
1246
|
+
[ultraCartOauth](../README.md#ultraCartOauth), [ultraCartSimpleApiKey](../README.md#ultraCartSimpleApiKey)
|
1247
|
+
|
1248
|
+
### HTTP request headers
|
1249
|
+
|
1250
|
+
- **Content-Type**: Not defined
|
1251
|
+
- **Accept**: application/json
|
1252
|
+
|
1253
|
+
|
1254
|
+
## get_unassociated_digital_items
|
1255
|
+
|
1256
|
+
> <ItemDigitalItemsResponse> get_unassociated_digital_items(opts)
|
1257
|
+
|
1258
|
+
Retrieve digital items from the digital library (which are digital files that may be attached to normal items) not yet associated with actual items
|
1259
|
+
|
1260
|
+
Retrieves a group of digital items (file information) from the account that are not yet associated with any actual items. If no parameters are specified, all digital items will be returned. Be aware that these are not normal items that can be added to a shopping cart. Rather, they are digital files that may be associated with normal items. You will need to make multiple API calls in order to retrieve the entire result set since this API performs result set pagination.
|
1261
|
+
|
1262
|
+
|
1263
|
+
### Examples
|
1264
|
+
|
1265
|
+
```ruby
|
1266
|
+
require 'ultracart_api'
|
1267
|
+
require_relative '../constants'
|
1268
|
+
require_relative './item_functions'
|
1269
|
+
|
1270
|
+
=begin
|
1271
|
+
Digital Items are not normal items you sell on your site. They are digital files that you may add to
|
1272
|
+
a library and then attach to a normal item as an accessory or the main item itself.
|
1273
|
+
See: https://ultracart.atlassian.net/wiki/spaces/ucdoc/pages/1376485/Digital+Items
|
1274
|
+
|
1275
|
+
Retrieves a group of digital items (file information) from the account that are not yet associated with any
|
1276
|
+
actual items. If no parameters are specified, all digital items will be returned. These are
|
1277
|
+
digital files that may be associated with normal items.
|
1278
|
+
|
1279
|
+
Default sort order: original_filename
|
1280
|
+
Possible sort orders: original_filename, description, file_size
|
1281
|
+
=end
|
1282
|
+
|
1283
|
+
begin
|
1284
|
+
# Create an unassociated digital item
|
1285
|
+
digital_item_oid = insert_sample_digital_item
|
1286
|
+
|
1287
|
+
# Initialize the item API
|
1288
|
+
item_api = UltracartClient::ItemApi.new_using_api_key(Constants::API_KEY)
|
1289
|
+
|
1290
|
+
# Prepare options for API call
|
1291
|
+
opts = {
|
1292
|
+
'_limit' => 100,
|
1293
|
+
'_offset' => 0,
|
1294
|
+
'_since' => nil, # digital items do not use since
|
1295
|
+
'_sort' => nil, # defaults to original_filename
|
1296
|
+
'_expand' => nil, # digital items have no expansion
|
1297
|
+
'_placeholders' => nil
|
1298
|
+
}
|
1299
|
+
|
1300
|
+
# Get unassociated digital items
|
1301
|
+
api_response = item_api.get_unassociated_digital_items(opts)
|
1302
|
+
|
1303
|
+
# Print retrieved digital items
|
1304
|
+
puts 'The following items were retrieved via get_unassociated_digital_items():'
|
1305
|
+
api_response.digital_items.each do |digital_item|
|
1306
|
+
p digital_item
|
1307
|
+
end
|
1308
|
+
|
1309
|
+
rescue UltracartClient::ApiError => e
|
1310
|
+
warn 'An ApiException occurred. Please review the following error:'
|
1311
|
+
p e
|
1312
|
+
exit(1)
|
1313
|
+
end
|
1314
|
+
```
|
1315
|
+
|
1316
|
+
|
1317
|
+
#### Using the get_unassociated_digital_items_with_http_info variant
|
1318
|
+
|
1319
|
+
This returns an Array which contains the response data, status code and headers.
|
1320
|
+
|
1321
|
+
> <Array(<ItemDigitalItemsResponse>, Integer, Hash)> get_unassociated_digital_items_with_http_info(opts)
|
1322
|
+
|
1323
|
+
```ruby
|
1324
|
+
begin
|
1325
|
+
# Retrieve digital items from the digital library (which are digital files that may be attached to normal items) not yet associated with actual items
|
1326
|
+
data, status_code, headers = api_instance.get_unassociated_digital_items_with_http_info(opts)
|
1327
|
+
p status_code # => 2xx
|
1328
|
+
p headers # => { ... }
|
1329
|
+
p data # => <ItemDigitalItemsResponse>
|
1330
|
+
rescue UltracartClient::ApiError => e
|
1331
|
+
puts "Error when calling ItemApi->get_unassociated_digital_items_with_http_info: #{e}"
|
1332
|
+
end
|
1333
|
+
```
|
1334
|
+
|
1335
|
+
### Parameters
|
1336
|
+
|
1337
|
+
| Name | Type | Description | Notes |
|
1338
|
+
| ---- | ---- | ----------- | ----- |
|
1339
|
+
| **_limit** | **Integer** | The maximum number of records to return on this one API call. (Default 100, Max 2000) | [optional][default to 100] |
|
1340
|
+
| **_offset** | **Integer** | Pagination of the record set. Offset is a zero based index. | [optional][default to 0] |
|
1341
|
+
| **_since** | **String** | Fetch items that have been created/modified since this date/time. | [optional] |
|
1342
|
+
| **_sort** | **String** | The sort order of the items. See Sorting documentation for examples of using multiple values and sorting by ascending and descending. | [optional] |
|
1343
|
+
| **_expand** | **String** | The object expansion to perform on the result. See documentation for examples | [optional] |
|
1344
|
+
| **_placeholders** | **Boolean** | Whether or not placeholder values should be returned in the result. Useful for UIs that consume this REST API. | [optional] |
|
1345
|
+
|
1346
|
+
### Return type
|
1347
|
+
|
1348
|
+
[**ItemDigitalItemsResponse**](ItemDigitalItemsResponse.md)
|
1349
|
+
|
1350
|
+
### Authorization
|
1351
|
+
|
1352
|
+
[ultraCartOauth](../README.md#ultraCartOauth), [ultraCartSimpleApiKey](../README.md#ultraCartSimpleApiKey)
|
1353
|
+
|
1354
|
+
### HTTP request headers
|
1355
|
+
|
1356
|
+
- **Content-Type**: Not defined
|
1357
|
+
- **Accept**: application/json
|
1358
|
+
|
1359
|
+
|
1360
|
+
## insert_digital_item
|
1361
|
+
|
1362
|
+
> <ItemDigitalItemResponse> insert_digital_item(digital_item)
|
1363
|
+
|
1364
|
+
Create a file within the digital library
|
1365
|
+
|
1366
|
+
Create a file within the digital library. This does not create an item, but makes this digital file available and selectable as part (or all) of an item.
|
1367
|
+
|
1368
|
+
|
1369
|
+
### Examples
|
1370
|
+
|
1371
|
+
```ruby
|
1372
|
+
require 'ultracart_api'
|
1373
|
+
require_relative '../constants'
|
1374
|
+
require_relative './item_functions'
|
1375
|
+
|
1376
|
+
begin
|
1377
|
+
# Create and then delete a sample digital item
|
1378
|
+
digital_item_oid = insert_sample_digital_item
|
1379
|
+
delete_sample_digital_item(digital_item_oid)
|
1380
|
+
|
1381
|
+
rescue UltracartClient::ApiError => e
|
1382
|
+
warn 'An ApiException occurred. Please review the following error:'
|
1383
|
+
p e
|
1384
|
+
exit(1)
|
1385
|
+
end
|
1386
|
+
```
|
1387
|
+
|
1388
|
+
|
1389
|
+
#### Using the insert_digital_item_with_http_info variant
|
1390
|
+
|
1391
|
+
This returns an Array which contains the response data, status code and headers.
|
1392
|
+
|
1393
|
+
> <Array(<ItemDigitalItemResponse>, Integer, Hash)> insert_digital_item_with_http_info(digital_item)
|
1394
|
+
|
1395
|
+
```ruby
|
1396
|
+
begin
|
1397
|
+
# Create a file within the digital library
|
1398
|
+
data, status_code, headers = api_instance.insert_digital_item_with_http_info(digital_item)
|
1399
|
+
p status_code # => 2xx
|
1400
|
+
p headers # => { ... }
|
1401
|
+
p data # => <ItemDigitalItemResponse>
|
1402
|
+
rescue UltracartClient::ApiError => e
|
1403
|
+
puts "Error when calling ItemApi->insert_digital_item_with_http_info: #{e}"
|
1404
|
+
end
|
1405
|
+
```
|
1406
|
+
|
1407
|
+
### Parameters
|
1408
|
+
|
1409
|
+
| Name | Type | Description | Notes |
|
1410
|
+
| ---- | ---- | ----------- | ----- |
|
1411
|
+
| **digital_item** | [**ItemDigitalItem**](ItemDigitalItem.md) | Digital item to create | |
|
1412
|
+
|
1413
|
+
### Return type
|
1414
|
+
|
1415
|
+
[**ItemDigitalItemResponse**](ItemDigitalItemResponse.md)
|
1416
|
+
|
1417
|
+
### Authorization
|
1418
|
+
|
1419
|
+
[ultraCartOauth](../README.md#ultraCartOauth), [ultraCartSimpleApiKey](../README.md#ultraCartSimpleApiKey)
|
1420
|
+
|
1421
|
+
### HTTP request headers
|
1422
|
+
|
1423
|
+
- **Content-Type**: application/json; charset=UTF-8
|
1424
|
+
- **Accept**: application/json
|
1425
|
+
|
1426
|
+
|
1427
|
+
## insert_item
|
1428
|
+
|
1429
|
+
> <ItemResponse> insert_item(item, opts)
|
1430
|
+
|
1431
|
+
Create an item
|
1432
|
+
|
1433
|
+
Create a new item on the UltraCart account.
|
1434
|
+
|
1435
|
+
|
1436
|
+
### Examples
|
1437
|
+
|
1438
|
+
```ruby
|
1439
|
+
require 'ultracart_api'
|
1440
|
+
require_relative '../constants'
|
1441
|
+
require_relative './item_functions'
|
1442
|
+
|
1443
|
+
begin
|
1444
|
+
# Create and then delete a sample item
|
1445
|
+
item_id = insert_sample_item
|
1446
|
+
delete_sample_item(item_id)
|
1447
|
+
|
1448
|
+
rescue UltracartClient::ApiError => e
|
1449
|
+
warn 'An ApiException occurred. Please review the following error:'
|
1450
|
+
p e
|
1451
|
+
exit(1)
|
1452
|
+
end
|
1453
|
+
```
|
1454
|
+
|
1455
|
+
|
1456
|
+
#### Using the insert_item_with_http_info variant
|
1457
|
+
|
1458
|
+
This returns an Array which contains the response data, status code and headers.
|
1459
|
+
|
1460
|
+
> <Array(<ItemResponse>, Integer, Hash)> insert_item_with_http_info(item, opts)
|
1461
|
+
|
1462
|
+
```ruby
|
1463
|
+
begin
|
1464
|
+
# Create an item
|
1465
|
+
data, status_code, headers = api_instance.insert_item_with_http_info(item, opts)
|
1466
|
+
p status_code # => 2xx
|
1467
|
+
p headers # => { ... }
|
1468
|
+
p data # => <ItemResponse>
|
1469
|
+
rescue UltracartClient::ApiError => e
|
1470
|
+
puts "Error when calling ItemApi->insert_item_with_http_info: #{e}"
|
1471
|
+
end
|
1472
|
+
```
|
1473
|
+
|
1474
|
+
### Parameters
|
1475
|
+
|
1476
|
+
| Name | Type | Description | Notes |
|
1477
|
+
| ---- | ---- | ----------- | ----- |
|
1478
|
+
| **item** | [**Item**](Item.md) | Item to create | |
|
1479
|
+
| **_expand** | **String** | The object expansion to perform on the result. See documentation for examples | [optional] |
|
1480
|
+
| **_placeholders** | **Boolean** | Whether or not placeholder values should be returned in the result. Useful for UIs that consume this REST API. | [optional] |
|
1481
|
+
|
1482
|
+
### Return type
|
1483
|
+
|
1484
|
+
[**ItemResponse**](ItemResponse.md)
|
1485
|
+
|
1486
|
+
### Authorization
|
1487
|
+
|
1488
|
+
[ultraCartOauth](../README.md#ultraCartOauth), [ultraCartSimpleApiKey](../README.md#ultraCartSimpleApiKey)
|
1489
|
+
|
1490
|
+
### HTTP request headers
|
1491
|
+
|
1492
|
+
- **Content-Type**: application/json; charset=UTF-8
|
1493
|
+
- **Accept**: application/json
|
1494
|
+
|
1495
|
+
|
1496
|
+
## insert_review
|
1497
|
+
|
1498
|
+
> <ItemReviewResponse> insert_review(merchant_item_oid, review)
|
1499
|
+
|
1500
|
+
Insert a review
|
1501
|
+
|
1502
|
+
Insert a item review.
|
1503
|
+
|
1504
|
+
|
1505
|
+
### Examples
|
1506
|
+
|
1507
|
+
```ruby
|
1508
|
+
#!/usr/bin/env ruby
|
1509
|
+
# frozen_string_literal: true
|
1510
|
+
|
1511
|
+
require 'ultracart_api'
|
1512
|
+
require_relative '../constants'
|
1513
|
+
require_relative './item_functions'
|
1514
|
+
|
1515
|
+
begin
|
1516
|
+
# To insert a review, you'll need an item's OID (Object Identifier) first. So for this example, we create
|
1517
|
+
# a sample item first, then retrieve it by item id to fetch the item oid.
|
1518
|
+
item_id = insert_sample_item()
|
1519
|
+
|
1520
|
+
# Initialize the Item API
|
1521
|
+
item_api = UltracartClient::ItemApi.new_using_api_key(Constants::API_KEY)
|
1522
|
+
|
1523
|
+
# Expand string is 'reviews' because we'll need to update the sample item's review template below.
|
1524
|
+
# List of expansions for item object: https://www.ultracart.com/api/#resource_item.html
|
1525
|
+
opts = {
|
1526
|
+
'_expand' => 'reviews'
|
1527
|
+
}
|
1528
|
+
|
1529
|
+
# Retrieve the item by merchant item ID
|
1530
|
+
item_response = item_api.get_item_by_merchant_item_id(item_id, opts)
|
1531
|
+
item = item_response.item
|
1532
|
+
item_oid = item.merchant_item_oid
|
1533
|
+
|
1534
|
+
# The target item must have a review template associated before you may attach a review.
|
1535
|
+
# You may create a review template here:
|
1536
|
+
# https://secure.ultracart.com/merchant/item/review/reviewTemplateListLoad.do
|
1537
|
+
# We're using a review template from our development system and it will not work for you.
|
1538
|
+
# Once you have a review template, update your item either via our gui or the rest api.
|
1539
|
+
# GUI: secure.ultracart.com -> Home -> Items -> <your item> -> Edit -> Review tab
|
1540
|
+
# Since we're using a sample item we just created above, we'll update via the rest api.
|
1541
|
+
# The rest api requires the review template oid, which is found on the template screen
|
1542
|
+
|
1543
|
+
review_template_oid = 402
|
1544
|
+
reviews = UltracartClient::ItemReviews.new(review_template_oid: review_template_oid)
|
1545
|
+
item.reviews = reviews
|
1546
|
+
item = item_api.update_item(item_oid, item, opts).item
|
1547
|
+
|
1548
|
+
# You will need to know what your product review looks like.
|
1549
|
+
review = UltracartClient::ItemReview.new(
|
1550
|
+
title: 'Best Product Ever!',
|
1551
|
+
review: "I loved this product. I bought it for my wife and she was so happy she cried. blah blah blah",
|
1552
|
+
reviewed_nickname: "Bob420",
|
1553
|
+
featured: true, # featured? sure. why not? this is a great review.
|
1554
|
+
rating_name1: 'Durability',
|
1555
|
+
rating_name2: 'Price',
|
1556
|
+
rating_name3: 'Performance',
|
1557
|
+
rating_name4: 'Appearance',
|
1558
|
+
rating_score1: 4.5,
|
1559
|
+
rating_score2: 3.5,
|
1560
|
+
rating_score3: 2.5,
|
1561
|
+
rating_score4: 1.5,
|
1562
|
+
overall: 5.0, # hooray!
|
1563
|
+
reviewer_location: "Southside Chicago",
|
1564
|
+
status: 'approved'
|
1565
|
+
)
|
1566
|
+
|
1567
|
+
# Insert the review and update our local variable to see how the review looks now.
|
1568
|
+
review = item_api.insert_review(item_oid, review).review
|
1569
|
+
|
1570
|
+
# Output the review object
|
1571
|
+
p review
|
1572
|
+
|
1573
|
+
# This will clean up the sample item, but you may wish to review the item in the backend or on your website first.
|
1574
|
+
# delete_sample_item(item_id)
|
1575
|
+
|
1576
|
+
rescue UltracartClient::ApiError => e
|
1577
|
+
puts 'An ApiException occurred. Please review the following error:'
|
1578
|
+
p e
|
1579
|
+
exit(1)
|
1580
|
+
|
1581
|
+
end
|
1582
|
+
```
|
1583
|
+
|
1584
|
+
|
1585
|
+
#### Using the insert_review_with_http_info variant
|
1586
|
+
|
1587
|
+
This returns an Array which contains the response data, status code and headers.
|
1588
|
+
|
1589
|
+
> <Array(<ItemReviewResponse>, Integer, Hash)> insert_review_with_http_info(merchant_item_oid, review)
|
1590
|
+
|
1591
|
+
```ruby
|
1592
|
+
begin
|
1593
|
+
# Insert a review
|
1594
|
+
data, status_code, headers = api_instance.insert_review_with_http_info(merchant_item_oid, review)
|
1595
|
+
p status_code # => 2xx
|
1596
|
+
p headers # => { ... }
|
1597
|
+
p data # => <ItemReviewResponse>
|
1598
|
+
rescue UltracartClient::ApiError => e
|
1599
|
+
puts "Error when calling ItemApi->insert_review_with_http_info: #{e}"
|
1600
|
+
end
|
1601
|
+
```
|
1602
|
+
|
1603
|
+
### Parameters
|
1604
|
+
|
1605
|
+
| Name | Type | Description | Notes |
|
1606
|
+
| ---- | ---- | ----------- | ----- |
|
1607
|
+
| **merchant_item_oid** | **Integer** | The item oid the review is associated with. | |
|
1608
|
+
| **review** | [**ItemReview**](ItemReview.md) | Review to insert | |
|
1609
|
+
|
1610
|
+
### Return type
|
1611
|
+
|
1612
|
+
[**ItemReviewResponse**](ItemReviewResponse.md)
|
1613
|
+
|
1614
|
+
### Authorization
|
1615
|
+
|
1616
|
+
[ultraCartOauth](../README.md#ultraCartOauth), [ultraCartSimpleApiKey](../README.md#ultraCartSimpleApiKey)
|
1617
|
+
|
1618
|
+
### HTTP request headers
|
1619
|
+
|
1620
|
+
- **Content-Type**: application/json; charset=UTF-8
|
1621
|
+
- **Accept**: application/json
|
1622
|
+
|
1623
|
+
|
1624
|
+
## insert_update_item_content_attribute
|
1625
|
+
|
1626
|
+
> insert_update_item_content_attribute(merchant_item_oid, item_attribute)
|
1627
|
+
|
1628
|
+
Upsert an item content attribute
|
1629
|
+
|
1630
|
+
Update an item content attribute, creating it new if it does not yet exist.
|
1631
|
+
|
1632
|
+
|
1633
|
+
### Examples
|
1634
|
+
|
1635
|
+
```ruby
|
1636
|
+
#!/usr/bin/env ruby
|
1637
|
+
# frozen_string_literal: true
|
1638
|
+
|
1639
|
+
require 'ultracart_api'
|
1640
|
+
require_relative '../constants'
|
1641
|
+
|
1642
|
+
=begin
|
1643
|
+
While UltraCart provides a means for updating item content, it is StoreFront specific. This method allows for
|
1644
|
+
item-wide update of content, such as SEO fields. The content attribute has three fields:
|
1645
|
+
1) name
|
1646
|
+
2) value
|
1647
|
+
3) type: boolean,color,definitionlist,html,integer,mailinglist,multiline,rgba,simplelist,string,videolist
|
1648
|
+
|
1649
|
+
The SEO content has the following names:
|
1650
|
+
Item Meta Title = "storefrontSEOTitle"
|
1651
|
+
Item Meta Description = "storefrontSEODescription"
|
1652
|
+
Item Meta Keywords = "storefrontSEOKeywords"
|
1653
|
+
|
1654
|
+
The merchant_item_oid is a unique identifier used by UltraCart. If you do not know your item's oid, call
|
1655
|
+
ItemApi.getItemByMerchantItemId() to retrieve the item, and then it's oid $item->getMerchantItemOid()
|
1656
|
+
|
1657
|
+
Success will return back a status code of 204 (No Content)
|
1658
|
+
=end
|
1659
|
+
|
1660
|
+
# Initialize the Item API
|
1661
|
+
item_api = UltracartClient::ItemApi.new_using_api_key(Constants::API_KEY)
|
1662
|
+
merchant_item_oid = 12345
|
1663
|
+
|
1664
|
+
# Create the content attribute
|
1665
|
+
attribute = UltracartClient::ItemContentAttribute.new(
|
1666
|
+
name: "storefrontSEOKeywords",
|
1667
|
+
value: 'dog,cat,fish',
|
1668
|
+
type: "string"
|
1669
|
+
)
|
1670
|
+
|
1671
|
+
# Insert or update the item content attribute
|
1672
|
+
item_api.insert_update_item_content_attribute(merchant_item_oid, attribute)
|
1673
|
+
```
|
1674
|
+
|
1675
|
+
|
1676
|
+
#### Using the insert_update_item_content_attribute_with_http_info variant
|
1677
|
+
|
1678
|
+
This returns an Array which contains the response data (`nil` in this case), status code and headers.
|
1679
|
+
|
1680
|
+
> <Array(nil, Integer, Hash)> insert_update_item_content_attribute_with_http_info(merchant_item_oid, item_attribute)
|
1681
|
+
|
1682
|
+
```ruby
|
1683
|
+
begin
|
1684
|
+
# Upsert an item content attribute
|
1685
|
+
data, status_code, headers = api_instance.insert_update_item_content_attribute_with_http_info(merchant_item_oid, item_attribute)
|
1686
|
+
p status_code # => 2xx
|
1687
|
+
p headers # => { ... }
|
1688
|
+
p data # => nil
|
1689
|
+
rescue UltracartClient::ApiError => e
|
1690
|
+
puts "Error when calling ItemApi->insert_update_item_content_attribute_with_http_info: #{e}"
|
1691
|
+
end
|
1692
|
+
```
|
1693
|
+
|
1694
|
+
### Parameters
|
1695
|
+
|
1696
|
+
| Name | Type | Description | Notes |
|
1697
|
+
| ---- | ---- | ----------- | ----- |
|
1698
|
+
| **merchant_item_oid** | **Integer** | The item oid to modify. | |
|
1699
|
+
| **item_attribute** | [**ItemContentAttribute**](ItemContentAttribute.md) | Item content attribute to upsert | |
|
1700
|
+
|
1701
|
+
### Return type
|
1702
|
+
|
1703
|
+
nil (empty response body)
|
1704
|
+
|
1705
|
+
### Authorization
|
1706
|
+
|
1707
|
+
[ultraCartOauth](../README.md#ultraCartOauth), [ultraCartSimpleApiKey](../README.md#ultraCartSimpleApiKey)
|
1708
|
+
|
1709
|
+
### HTTP request headers
|
1710
|
+
|
1711
|
+
- **Content-Type**: application/json; charset=UTF-8
|
1712
|
+
- **Accept**: application/json
|
1713
|
+
|
1714
|
+
|
1715
|
+
## update_digital_item
|
1716
|
+
|
1717
|
+
> <ItemDigitalItemResponse> update_digital_item(digital_item_oid, digital_item)
|
1718
|
+
|
1719
|
+
Updates a file within the digital library
|
1720
|
+
|
1721
|
+
Updates a file within the digital library. This does not update an item, but updates a digital file available and selectable as part (or all) of an item.
|
1722
|
+
|
1723
|
+
|
1724
|
+
### Examples
|
1725
|
+
|
1726
|
+
```ruby
|
1727
|
+
#!/usr/bin/env ruby
|
1728
|
+
# frozen_string_literal: true
|
1729
|
+
|
1730
|
+
require 'ultracart_api'
|
1731
|
+
require_relative '../constants'
|
1732
|
+
require_relative './item_functions'
|
1733
|
+
|
1734
|
+
begin
|
1735
|
+
# Insert a sample digital item
|
1736
|
+
digital_item_oid = insert_sample_digital_item()
|
1737
|
+
|
1738
|
+
# Initialize the Item API
|
1739
|
+
item_api = UltracartClient::ItemApi.new_using_api_key(Constants::API_KEY)
|
1740
|
+
|
1741
|
+
# Retrieve the digital item
|
1742
|
+
api_response = item_api.get_digital_item(digital_item_oid)
|
1743
|
+
digital_item = api_response.digital_item
|
1744
|
+
|
1745
|
+
# Update the digital item details
|
1746
|
+
digital_item.description = "I have updated the description to this sentence."
|
1747
|
+
digital_item.click_wrap_agreement = "You hereby agree that the earth is round. No debate."
|
1748
|
+
|
1749
|
+
# Update the digital item
|
1750
|
+
item_api.update_digital_item(digital_item_oid, digital_item)
|
1751
|
+
|
1752
|
+
# Delete the sample digital item
|
1753
|
+
delete_sample_digital_item(digital_item_oid)
|
1754
|
+
|
1755
|
+
rescue UltracartClient::ApiError => e
|
1756
|
+
puts 'An ApiException occurred. Please review the following error:'
|
1757
|
+
p e
|
1758
|
+
exit(1)
|
1759
|
+
|
1760
|
+
end
|
1761
|
+
```
|
1762
|
+
|
1763
|
+
|
1764
|
+
#### Using the update_digital_item_with_http_info variant
|
1765
|
+
|
1766
|
+
This returns an Array which contains the response data, status code and headers.
|
1767
|
+
|
1768
|
+
> <Array(<ItemDigitalItemResponse>, Integer, Hash)> update_digital_item_with_http_info(digital_item_oid, digital_item)
|
1769
|
+
|
1770
|
+
```ruby
|
1771
|
+
begin
|
1772
|
+
# Updates a file within the digital library
|
1773
|
+
data, status_code, headers = api_instance.update_digital_item_with_http_info(digital_item_oid, digital_item)
|
1774
|
+
p status_code # => 2xx
|
1775
|
+
p headers # => { ... }
|
1776
|
+
p data # => <ItemDigitalItemResponse>
|
1777
|
+
rescue UltracartClient::ApiError => e
|
1778
|
+
puts "Error when calling ItemApi->update_digital_item_with_http_info: #{e}"
|
1779
|
+
end
|
1780
|
+
```
|
1781
|
+
|
1782
|
+
### Parameters
|
1783
|
+
|
1784
|
+
| Name | Type | Description | Notes |
|
1785
|
+
| ---- | ---- | ----------- | ----- |
|
1786
|
+
| **digital_item_oid** | **Integer** | The digital item oid to update. | |
|
1787
|
+
| **digital_item** | [**ItemDigitalItem**](ItemDigitalItem.md) | Digital item to update | |
|
1788
|
+
|
1789
|
+
### Return type
|
1790
|
+
|
1791
|
+
[**ItemDigitalItemResponse**](ItemDigitalItemResponse.md)
|
1792
|
+
|
1793
|
+
### Authorization
|
1794
|
+
|
1795
|
+
[ultraCartOauth](../README.md#ultraCartOauth), [ultraCartSimpleApiKey](../README.md#ultraCartSimpleApiKey)
|
1796
|
+
|
1797
|
+
### HTTP request headers
|
1798
|
+
|
1799
|
+
- **Content-Type**: application/json; charset=UTF-8
|
1800
|
+
- **Accept**: application/json
|
1801
|
+
|
1802
|
+
|
1803
|
+
## update_item
|
1804
|
+
|
1805
|
+
> <ItemResponse> update_item(merchant_item_oid, item, opts)
|
1806
|
+
|
1807
|
+
Update an item
|
1808
|
+
|
1809
|
+
Update a new item on the UltraCart account.
|
1810
|
+
|
1811
|
+
|
1812
|
+
### Examples
|
1813
|
+
|
1814
|
+
```ruby
|
1815
|
+
#!/usr/bin/env ruby
|
1816
|
+
# frozen_string_literal: true
|
1817
|
+
|
1818
|
+
require 'ultracart_api'
|
1819
|
+
require_relative '../constants'
|
1820
|
+
require_relative './item_functions'
|
1821
|
+
|
1822
|
+
begin
|
1823
|
+
# Insert a sample item
|
1824
|
+
item_id = insert_sample_item()
|
1825
|
+
|
1826
|
+
# Initialize the Item API
|
1827
|
+
item_api = UltracartClient::ItemApi.new_using_api_key(Constants::API_KEY)
|
1828
|
+
|
1829
|
+
# See one of the getItem or getItems samples for possible expansion values
|
1830
|
+
# See also: https://www.ultracart.com/api/#resource_item.html
|
1831
|
+
opts = {
|
1832
|
+
'_expand' => 'pricing',
|
1833
|
+
'_placeholders' => false
|
1834
|
+
}
|
1835
|
+
|
1836
|
+
# Retrieve the item
|
1837
|
+
api_response = item_api.get_item_by_merchant_item_id(item_id, opts)
|
1838
|
+
item = api_response.item
|
1839
|
+
original_price = item.pricing.cost
|
1840
|
+
|
1841
|
+
# Update the price of the item
|
1842
|
+
item_pricing = item.pricing
|
1843
|
+
item_pricing.cost = 12.99
|
1844
|
+
|
1845
|
+
# Update the item
|
1846
|
+
api_response = item_api.update_item(item.merchant_item_oid, item, opts)
|
1847
|
+
updated_item = api_response.item
|
1848
|
+
|
1849
|
+
# Output the price changes
|
1850
|
+
puts "Original Price: #{original_price}"
|
1851
|
+
puts "Updated Price: #{updated_item.pricing.cost}"
|
1852
|
+
|
1853
|
+
# Delete the sample item
|
1854
|
+
delete_sample_item(item_id)
|
1855
|
+
|
1856
|
+
rescue UltracartClient::ApiError => e
|
1857
|
+
puts 'An ApiException occurred. Please review the following error:'
|
1858
|
+
p e
|
1859
|
+
exit(1)
|
1860
|
+
|
1861
|
+
end
|
1862
|
+
```
|
1863
|
+
|
1864
|
+
|
1865
|
+
#### Using the update_item_with_http_info variant
|
1866
|
+
|
1867
|
+
This returns an Array which contains the response data, status code and headers.
|
1868
|
+
|
1869
|
+
> <Array(<ItemResponse>, Integer, Hash)> update_item_with_http_info(merchant_item_oid, item, opts)
|
1870
|
+
|
1871
|
+
```ruby
|
1872
|
+
begin
|
1873
|
+
# Update an item
|
1874
|
+
data, status_code, headers = api_instance.update_item_with_http_info(merchant_item_oid, item, opts)
|
1875
|
+
p status_code # => 2xx
|
1876
|
+
p headers # => { ... }
|
1877
|
+
p data # => <ItemResponse>
|
1878
|
+
rescue UltracartClient::ApiError => e
|
1879
|
+
puts "Error when calling ItemApi->update_item_with_http_info: #{e}"
|
1880
|
+
end
|
1881
|
+
```
|
1882
|
+
|
1883
|
+
### Parameters
|
1884
|
+
|
1885
|
+
| Name | Type | Description | Notes |
|
1886
|
+
| ---- | ---- | ----------- | ----- |
|
1887
|
+
| **merchant_item_oid** | **Integer** | The item oid to update. | |
|
1888
|
+
| **item** | [**Item**](Item.md) | Item to update | |
|
1889
|
+
| **_expand** | **String** | The object expansion to perform on the result. See documentation for examples | [optional] |
|
1890
|
+
| **_placeholders** | **Boolean** | Whether or not placeholder values should be returned in the result. Useful for UIs that consume this REST API. | [optional] |
|
1891
|
+
|
1892
|
+
### Return type
|
1893
|
+
|
1894
|
+
[**ItemResponse**](ItemResponse.md)
|
1895
|
+
|
1896
|
+
### Authorization
|
1897
|
+
|
1898
|
+
[ultraCartOauth](../README.md#ultraCartOauth), [ultraCartSimpleApiKey](../README.md#ultraCartSimpleApiKey)
|
1899
|
+
|
1900
|
+
### HTTP request headers
|
1901
|
+
|
1902
|
+
- **Content-Type**: application/json; charset=UTF-8
|
1903
|
+
- **Accept**: application/json
|
1904
|
+
|
1905
|
+
|
1906
|
+
## update_items
|
1907
|
+
|
1908
|
+
> <ItemsResponse> update_items(items_request, opts)
|
1909
|
+
|
1910
|
+
Update multiple items
|
1911
|
+
|
1912
|
+
Update multiple item on the UltraCart account.
|
1913
|
+
|
1914
|
+
|
1915
|
+
### Examples
|
1916
|
+
|
1917
|
+
```ruby
|
1918
|
+
#!/usr/bin/env ruby
|
1919
|
+
# frozen_string_literal: true
|
1920
|
+
|
1921
|
+
require 'ultracart_api'
|
1922
|
+
require_relative '../constants'
|
1923
|
+
require_relative './item_functions'
|
1924
|
+
|
1925
|
+
begin
|
1926
|
+
# Insert two sample items
|
1927
|
+
item_id1 = insert_sample_item()
|
1928
|
+
item_id2 = insert_sample_item()
|
1929
|
+
|
1930
|
+
# Initialize the Item API
|
1931
|
+
item_api = UltracartClient::ItemApi.new_using_api_key(Constants::API_KEY)
|
1932
|
+
|
1933
|
+
# See one of the getItem or getItems samples for possible expansion values
|
1934
|
+
# See also: https://www.ultracart.com/api/#resource_item.html
|
1935
|
+
opts = {
|
1936
|
+
'_expand' => 'pricing',
|
1937
|
+
'_placeholders' => false
|
1938
|
+
}
|
1939
|
+
|
1940
|
+
# Retrieve the items
|
1941
|
+
api_response = item_api.get_item_by_merchant_item_id(item_id1, opts)
|
1942
|
+
item1 = api_response.item
|
1943
|
+
api_response = item_api.get_item_by_merchant_item_id(item_id2, opts)
|
1944
|
+
item2 = api_response.item
|
1945
|
+
|
1946
|
+
# Update the prices of the items
|
1947
|
+
item1.pricing.cost = 12.99
|
1948
|
+
item2.pricing.cost = 14.99
|
1949
|
+
|
1950
|
+
# Create items request for bulk update
|
1951
|
+
update_items_request = UltracartClient::ItemsRequest.new(items: [item1, item2])
|
1952
|
+
|
1953
|
+
# Update multiple items
|
1954
|
+
api_response = item_api.update_items(update_items_request, opts.merge('_check_groups' => false))
|
1955
|
+
|
1956
|
+
# Delete the sample items
|
1957
|
+
delete_sample_item(item_id1)
|
1958
|
+
delete_sample_item(item_id2)
|
1959
|
+
|
1960
|
+
rescue UltracartClient::ApiError => e
|
1961
|
+
puts 'An ApiException occurred. Please review the following error:'
|
1962
|
+
p e
|
1963
|
+
exit(1)
|
1964
|
+
|
1965
|
+
end
|
1966
|
+
```
|
1967
|
+
|
1968
|
+
|
1969
|
+
#### Using the update_items_with_http_info variant
|
1970
|
+
|
1971
|
+
This returns an Array which contains the response data, status code and headers.
|
1972
|
+
|
1973
|
+
> <Array(<ItemsResponse>, Integer, Hash)> update_items_with_http_info(items_request, opts)
|
1974
|
+
|
1975
|
+
```ruby
|
1976
|
+
begin
|
1977
|
+
# Update multiple items
|
1978
|
+
data, status_code, headers = api_instance.update_items_with_http_info(items_request, opts)
|
1979
|
+
p status_code # => 2xx
|
1980
|
+
p headers # => { ... }
|
1981
|
+
p data # => <ItemsResponse>
|
1982
|
+
rescue UltracartClient::ApiError => e
|
1983
|
+
puts "Error when calling ItemApi->update_items_with_http_info: #{e}"
|
1984
|
+
end
|
1985
|
+
```
|
1986
|
+
|
1987
|
+
### Parameters
|
1988
|
+
|
1989
|
+
| Name | Type | Description | Notes |
|
1990
|
+
| ---- | ---- | ----------- | ----- |
|
1991
|
+
| **items_request** | [**ItemsRequest**](ItemsRequest.md) | Items to update (synchronous maximum 20 / asynchronous maximum 100) | |
|
1992
|
+
| **_expand** | **String** | The object expansion to perform on the result. See documentation for examples | [optional] |
|
1993
|
+
| **_placeholders** | **Boolean** | Whether or not placeholder values should be returned in the result. Useful for UIs that consume this REST API. | [optional] |
|
1994
|
+
| **_async** | **Boolean** | True if the operation should be run async. No result returned | [optional] |
|
1995
|
+
|
1996
|
+
### Return type
|
1997
|
+
|
1998
|
+
[**ItemsResponse**](ItemsResponse.md)
|
1999
|
+
|
2000
|
+
### Authorization
|
2001
|
+
|
2002
|
+
[ultraCartOauth](../README.md#ultraCartOauth), [ultraCartSimpleApiKey](../README.md#ultraCartSimpleApiKey)
|
2003
|
+
|
2004
|
+
### HTTP request headers
|
2005
|
+
|
2006
|
+
- **Content-Type**: application/json; charset=UTF-8
|
2007
|
+
- **Accept**: application/json
|
2008
|
+
|
2009
|
+
|
2010
|
+
## update_review
|
2011
|
+
|
2012
|
+
> <ItemReviewResponse> update_review(review_oid, merchant_item_oid, review)
|
2013
|
+
|
2014
|
+
Update a review
|
2015
|
+
|
2016
|
+
Update an item review.
|
2017
|
+
|
2018
|
+
|
2019
|
+
### Examples
|
2020
|
+
|
2021
|
+
```ruby
|
2022
|
+
#!/usr/bin/env ruby
|
2023
|
+
# frozen_string_literal: true
|
2024
|
+
|
2025
|
+
require 'ultracart_api'
|
2026
|
+
require_relative '../constants'
|
2027
|
+
require_relative './item_functions'
|
2028
|
+
|
2029
|
+
begin
|
2030
|
+
# To update a review, you'll need an item's OID (Object Identifier) and the review oid first.
|
2031
|
+
|
2032
|
+
# If you don't know your oid, call getItemByMerchantItemId() to get your item, then get the oid.
|
2033
|
+
merchant_item_oid = 99998888
|
2034
|
+
review_oid = 123456 # This is the particular oid you wish to update.
|
2035
|
+
|
2036
|
+
# Initialize the Item API
|
2037
|
+
item_api = UltracartClient::ItemApi.new_using_api_key(Constants::API_KEY)
|
2038
|
+
|
2039
|
+
# Retrieve the existing review
|
2040
|
+
review = item_api.get_review(merchant_item_oid, review_oid).review
|
2041
|
+
|
2042
|
+
# Update the review details
|
2043
|
+
review = UltracartClient::ItemReview.new(
|
2044
|
+
title: 'Best Product Ever!',
|
2045
|
+
review: "I loved this product. I bought it for my wife and she was so happy she cried. blah blah blah",
|
2046
|
+
reviewed_nickname: "Bob420",
|
2047
|
+
featured: true, # featured? sure. why not? this is a great review.
|
2048
|
+
rating_name1: 'Durability',
|
2049
|
+
rating_name2: 'Price',
|
2050
|
+
rating_name3: 'Performance',
|
2051
|
+
rating_name4: 'Appearance',
|
2052
|
+
rating_score1: 4.5,
|
2053
|
+
rating_score2: 3.5,
|
2054
|
+
rating_score3: 2.5,
|
2055
|
+
rating_score4: 1.5,
|
2056
|
+
overall: 5.0, # hooray!
|
2057
|
+
reviewer_location: "Southside Chicago",
|
2058
|
+
status: 'approved'
|
2059
|
+
)
|
2060
|
+
|
2061
|
+
# Update the review and retrieve the updated review
|
2062
|
+
review = item_api.update_review(review_oid, merchant_item_oid, review).review
|
2063
|
+
|
2064
|
+
# Output the review object
|
2065
|
+
p review
|
2066
|
+
|
2067
|
+
# This will clean up the sample item, but you may wish to review the item in the backend or on your website first.
|
2068
|
+
# delete_sample_item(item_id)
|
2069
|
+
|
2070
|
+
rescue UltracartClient::ApiError => e
|
2071
|
+
puts 'An ApiException occurred. Please review the following error:'
|
2072
|
+
p e
|
2073
|
+
exit(1)
|
2074
|
+
|
2075
|
+
end
|
2076
|
+
```
|
2077
|
+
|
2078
|
+
|
2079
|
+
#### Using the update_review_with_http_info variant
|
2080
|
+
|
2081
|
+
This returns an Array which contains the response data, status code and headers.
|
2082
|
+
|
2083
|
+
> <Array(<ItemReviewResponse>, Integer, Hash)> update_review_with_http_info(review_oid, merchant_item_oid, review)
|
2084
|
+
|
2085
|
+
```ruby
|
2086
|
+
begin
|
2087
|
+
# Update a review
|
2088
|
+
data, status_code, headers = api_instance.update_review_with_http_info(review_oid, merchant_item_oid, review)
|
2089
|
+
p status_code # => 2xx
|
2090
|
+
p headers # => { ... }
|
2091
|
+
p data # => <ItemReviewResponse>
|
2092
|
+
rescue UltracartClient::ApiError => e
|
2093
|
+
puts "Error when calling ItemApi->update_review_with_http_info: #{e}"
|
2094
|
+
end
|
2095
|
+
```
|
2096
|
+
|
2097
|
+
### Parameters
|
2098
|
+
|
2099
|
+
| Name | Type | Description | Notes |
|
2100
|
+
| ---- | ---- | ----------- | ----- |
|
2101
|
+
| **review_oid** | **Integer** | The review oid to update. | |
|
2102
|
+
| **merchant_item_oid** | **Integer** | The item oid the review is associated with. | |
|
2103
|
+
| **review** | [**ItemReview**](ItemReview.md) | Review to update | |
|
2104
|
+
|
2105
|
+
### Return type
|
2106
|
+
|
2107
|
+
[**ItemReviewResponse**](ItemReviewResponse.md)
|
2108
|
+
|
2109
|
+
### Authorization
|
2110
|
+
|
2111
|
+
[ultraCartOauth](../README.md#ultraCartOauth), [ultraCartSimpleApiKey](../README.md#ultraCartSimpleApiKey)
|
2112
|
+
|
2113
|
+
### HTTP request headers
|
2114
|
+
|
2115
|
+
- **Content-Type**: application/json; charset=UTF-8
|
2116
|
+
- **Accept**: application/json
|
2117
|
+
|
2118
|
+
|
2119
|
+
## upload_temporary_multimedia
|
2120
|
+
|
2121
|
+
> <TempMultimediaResponse> upload_temporary_multimedia(file)
|
2122
|
+
|
2123
|
+
Upload an image to the temporary multimedia.
|
2124
|
+
|
2125
|
+
Uploads an image and returns back meta information about the image as well as the identifier needed for the item update.
|
2126
|
+
|
2127
|
+
|
2128
|
+
### Examples
|
2129
|
+
|
2130
|
+
```ruby
|
2131
|
+
# This method is used internally by UltraCart.
|
2132
|
+
# We don't envision a scenario where a merchant would ever need to call this.
|
2133
|
+
# As such, we're not providing a sample for it. If you can think of a use for this
|
2134
|
+
# method, contact us, and we'll help you work through it.
|
2135
|
+
```
|
2136
|
+
|
2137
|
+
|
2138
|
+
#### Using the upload_temporary_multimedia_with_http_info variant
|
2139
|
+
|
2140
|
+
This returns an Array which contains the response data, status code and headers.
|
2141
|
+
|
2142
|
+
> <Array(<TempMultimediaResponse>, Integer, Hash)> upload_temporary_multimedia_with_http_info(file)
|
2143
|
+
|
2144
|
+
```ruby
|
2145
|
+
begin
|
2146
|
+
# Upload an image to the temporary multimedia.
|
2147
|
+
data, status_code, headers = api_instance.upload_temporary_multimedia_with_http_info(file)
|
2148
|
+
p status_code # => 2xx
|
2149
|
+
p headers # => { ... }
|
2150
|
+
p data # => <TempMultimediaResponse>
|
2151
|
+
rescue UltracartClient::ApiError => e
|
2152
|
+
puts "Error when calling ItemApi->upload_temporary_multimedia_with_http_info: #{e}"
|
2153
|
+
end
|
2154
|
+
```
|
2155
|
+
|
2156
|
+
### Parameters
|
2157
|
+
|
2158
|
+
| Name | Type | Description | Notes |
|
2159
|
+
| ---- | ---- | ----------- | ----- |
|
2160
|
+
| **file** | **File** | File to upload | |
|
2161
|
+
|
2162
|
+
### Return type
|
2163
|
+
|
2164
|
+
[**TempMultimediaResponse**](TempMultimediaResponse.md)
|
2165
|
+
|
2166
|
+
### Authorization
|
2167
|
+
|
2168
|
+
[ultraCartOauth](../README.md#ultraCartOauth), [ultraCartSimpleApiKey](../README.md#ultraCartSimpleApiKey)
|
2169
|
+
|
2170
|
+
### HTTP request headers
|
2171
|
+
|
2172
|
+
- **Content-Type**: multipart/form-data
|
2173
|
+
- **Accept**: application/json
|
2174
|
+
|