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/ChannelPartnerApi.md
CHANGED
@@ -1,1121 +1,1678 @@
|
|
1
|
-
# UltracartClient::ChannelPartnerApi
|
2
|
-
|
3
|
-
All URIs are relative to *https://secure.ultracart.com/rest/v2*
|
4
|
-
|
5
|
-
| Method | HTTP request | Description |
|
6
|
-
| ------ | ------------ | ----------- |
|
7
|
-
| [**cancel_order_by_channel_partner_order_id**](ChannelPartnerApi.md#cancel_order_by_channel_partner_order_id) | **DELETE** /channel_partner/cancel/by_channel_partner_order_id/{order_id} | Cancel channel partner order by channel partner order id |
|
8
|
-
| [**cancel_order_by_ultra_cart_order_id**](ChannelPartnerApi.md#cancel_order_by_ultra_cart_order_id) | **DELETE** /channel_partner/cancel/by_ultracart_order_id/{order_id} | Cancel channel partner order by UltraCart order id |
|
9
|
-
| [**delete_channel_partner_ship_to_preference**](ChannelPartnerApi.md#delete_channel_partner_ship_to_preference) | **DELETE** /channel_partner/channel_partners/{channel_partner_oid}/ship_to_preferences/{channel_partner_ship_to_preference_oid} | Delete a ship to preference record for the channel partner. |
|
10
|
-
| [**estimate_shipping_for_channel_partner_order**](ChannelPartnerApi.md#estimate_shipping_for_channel_partner_order) | **POST** /channel_partner/estimate_shipping | Estimate shipping for channel partner order |
|
11
|
-
| [**estimate_tax_for_channel_partner_order**](ChannelPartnerApi.md#estimate_tax_for_channel_partner_order) | **POST** /channel_partner/estimate_tax | Estimate tax for channel partner order |
|
12
|
-
| [**get_channel_partner_order**](ChannelPartnerApi.md#get_channel_partner_order) | **GET** /channel_partner/orders/{order_id} | Retrieve a channel partner order |
|
13
|
-
| [**get_channel_partner_order_by_channel_partner_order_id**](ChannelPartnerApi.md#get_channel_partner_order_by_channel_partner_order_id) | **GET** /channel_partner/orders/by_channel_partner_order_id/{order_id} | Retrieve a channel partner order by the channel partner order id |
|
14
|
-
| [**get_channel_partner_reason_codes**](ChannelPartnerApi.md#get_channel_partner_reason_codes) | **GET** /channel_partner/channel_partners/{channel_partner_oid}/reason_codes | Retrieve reject and refund reason codes. |
|
15
|
-
| [**get_channel_partner_ship_to_preference**](ChannelPartnerApi.md#get_channel_partner_ship_to_preference) | **GET** /channel_partner/channel_partners/{channel_partner_oid}/ship_to_preferences/{channel_partner_ship_to_preference_oid} | Retrieve the ship to preference associated with the channel partner and the specific id. |
|
16
|
-
| [**get_channel_partner_ship_to_preferences**](ChannelPartnerApi.md#get_channel_partner_ship_to_preferences) | **GET** /channel_partner/channel_partners/{channel_partner_oid}/ship_to_preferences | Retrieve the ship to preferences associated with the channel partner. |
|
17
|
-
| [**get_channel_partners**](ChannelPartnerApi.md#get_channel_partners) | **GET** /channel_partner/channel_partners | Retrieve the channel partners configured on the account. |
|
18
|
-
| [**import_channel_partner_order**](ChannelPartnerApi.md#import_channel_partner_order) | **POST** /channel_partner/import | Insert channel partner order |
|
19
|
-
| [**insert_channel_partner_ship_to_preference**](ChannelPartnerApi.md#insert_channel_partner_ship_to_preference) | **POST** /channel_partner/channel_partners/{channel_partner_oid}/ship_to_preferences | Insert a ship to preference record for the channel partner. |
|
20
|
-
| [**refund_channel_partner_order**](ChannelPartnerApi.md#refund_channel_partner_order) | **PUT** /channel_partner/orders/{order_id}/refund | Refund a channel partner order |
|
21
|
-
| [**update_channel_partner_ship_to_preference**](ChannelPartnerApi.md#update_channel_partner_ship_to_preference) | **PUT** /channel_partner/channel_partners/{channel_partner_oid}/ship_to_preferences/{channel_partner_ship_to_preference_oid} | Update a ship to preference record for the channel partner. |
|
22
|
-
|
23
|
-
|
24
|
-
## cancel_order_by_channel_partner_order_id
|
25
|
-
|
26
|
-
> <ChannelPartnerCancelResponse> cancel_order_by_channel_partner_order_id(order_id)
|
27
|
-
|
28
|
-
Cancel channel partner order by channel partner order id
|
29
|
-
|
30
|
-
Cancel channel partner order by channel partner order id
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
require 'ultracart_api'
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
#
|
42
|
-
#
|
43
|
-
#
|
44
|
-
|
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
|
-
require '
|
253
|
-
require_relative '../constants'
|
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
|
-
|
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
|
-
|
647
|
-
|
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
|
-
# This
|
692
|
-
|
693
|
-
|
694
|
-
|
695
|
-
|
696
|
-
|
697
|
-
|
698
|
-
|
699
|
-
|
700
|
-
|
701
|
-
|
702
|
-
|
703
|
-
|
704
|
-
|
705
|
-
|
706
|
-
|
707
|
-
#### Using the
|
708
|
-
|
709
|
-
This returns an Array which contains the response data, status code and headers.
|
710
|
-
|
711
|
-
> <Array(<
|
712
|
-
|
713
|
-
```ruby
|
714
|
-
begin
|
715
|
-
# Retrieve
|
716
|
-
data, status_code, headers = api_instance.
|
717
|
-
p status_code # => 2xx
|
718
|
-
p headers # => { ... }
|
719
|
-
p data # => <
|
720
|
-
rescue UltracartClient::ApiError => e
|
721
|
-
puts "Error when calling ChannelPartnerApi->
|
722
|
-
end
|
723
|
-
```
|
724
|
-
|
725
|
-
### Parameters
|
726
|
-
|
727
|
-
| Name | Type | Description | Notes |
|
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
|
-
p
|
788
|
-
p
|
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
|
-
require '
|
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
|
-
end
|
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
|
-
puts
|
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
|
-
|
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
|
-
|
1
|
+
# UltracartClient::ChannelPartnerApi
|
2
|
+
|
3
|
+
All URIs are relative to *https://secure.ultracart.com/rest/v2*
|
4
|
+
|
5
|
+
| Method | HTTP request | Description |
|
6
|
+
| ------ | ------------ | ----------- |
|
7
|
+
| [**cancel_order_by_channel_partner_order_id**](ChannelPartnerApi.md#cancel_order_by_channel_partner_order_id) | **DELETE** /channel_partner/cancel/by_channel_partner_order_id/{order_id} | Cancel channel partner order by channel partner order id |
|
8
|
+
| [**cancel_order_by_ultra_cart_order_id**](ChannelPartnerApi.md#cancel_order_by_ultra_cart_order_id) | **DELETE** /channel_partner/cancel/by_ultracart_order_id/{order_id} | Cancel channel partner order by UltraCart order id |
|
9
|
+
| [**delete_channel_partner_ship_to_preference**](ChannelPartnerApi.md#delete_channel_partner_ship_to_preference) | **DELETE** /channel_partner/channel_partners/{channel_partner_oid}/ship_to_preferences/{channel_partner_ship_to_preference_oid} | Delete a ship to preference record for the channel partner. |
|
10
|
+
| [**estimate_shipping_for_channel_partner_order**](ChannelPartnerApi.md#estimate_shipping_for_channel_partner_order) | **POST** /channel_partner/estimate_shipping | Estimate shipping for channel partner order |
|
11
|
+
| [**estimate_tax_for_channel_partner_order**](ChannelPartnerApi.md#estimate_tax_for_channel_partner_order) | **POST** /channel_partner/estimate_tax | Estimate tax for channel partner order |
|
12
|
+
| [**get_channel_partner_order**](ChannelPartnerApi.md#get_channel_partner_order) | **GET** /channel_partner/orders/{order_id} | Retrieve a channel partner order |
|
13
|
+
| [**get_channel_partner_order_by_channel_partner_order_id**](ChannelPartnerApi.md#get_channel_partner_order_by_channel_partner_order_id) | **GET** /channel_partner/orders/by_channel_partner_order_id/{order_id} | Retrieve a channel partner order by the channel partner order id |
|
14
|
+
| [**get_channel_partner_reason_codes**](ChannelPartnerApi.md#get_channel_partner_reason_codes) | **GET** /channel_partner/channel_partners/{channel_partner_oid}/reason_codes | Retrieve reject and refund reason codes. |
|
15
|
+
| [**get_channel_partner_ship_to_preference**](ChannelPartnerApi.md#get_channel_partner_ship_to_preference) | **GET** /channel_partner/channel_partners/{channel_partner_oid}/ship_to_preferences/{channel_partner_ship_to_preference_oid} | Retrieve the ship to preference associated with the channel partner and the specific id. |
|
16
|
+
| [**get_channel_partner_ship_to_preferences**](ChannelPartnerApi.md#get_channel_partner_ship_to_preferences) | **GET** /channel_partner/channel_partners/{channel_partner_oid}/ship_to_preferences | Retrieve the ship to preferences associated with the channel partner. |
|
17
|
+
| [**get_channel_partners**](ChannelPartnerApi.md#get_channel_partners) | **GET** /channel_partner/channel_partners | Retrieve the channel partners configured on the account. |
|
18
|
+
| [**import_channel_partner_order**](ChannelPartnerApi.md#import_channel_partner_order) | **POST** /channel_partner/import | Insert channel partner order |
|
19
|
+
| [**insert_channel_partner_ship_to_preference**](ChannelPartnerApi.md#insert_channel_partner_ship_to_preference) | **POST** /channel_partner/channel_partners/{channel_partner_oid}/ship_to_preferences | Insert a ship to preference record for the channel partner. |
|
20
|
+
| [**refund_channel_partner_order**](ChannelPartnerApi.md#refund_channel_partner_order) | **PUT** /channel_partner/orders/{order_id}/refund | Refund a channel partner order |
|
21
|
+
| [**update_channel_partner_ship_to_preference**](ChannelPartnerApi.md#update_channel_partner_ship_to_preference) | **PUT** /channel_partner/channel_partners/{channel_partner_oid}/ship_to_preferences/{channel_partner_ship_to_preference_oid} | Update a ship to preference record for the channel partner. |
|
22
|
+
|
23
|
+
|
24
|
+
## cancel_order_by_channel_partner_order_id
|
25
|
+
|
26
|
+
> <ChannelPartnerCancelResponse> cancel_order_by_channel_partner_order_id(order_id)
|
27
|
+
|
28
|
+
Cancel channel partner order by channel partner order id
|
29
|
+
|
30
|
+
Cancel channel partner order by channel partner order id
|
31
|
+
|
32
|
+
|
33
|
+
### Examples
|
34
|
+
|
35
|
+
```ruby
|
36
|
+
require 'ultracart_api'
|
37
|
+
require_relative '../constants'
|
38
|
+
|
39
|
+
# cancelOrderByChannelPartnerOrderId takes a channel partner order id, which is the external order id, and attempts
|
40
|
+
# to 'cancel' the order. UltraCart doesn't have a cancel order state, so this needs some explanation of what happens.
|
41
|
+
#
|
42
|
+
# Here is the logic of the cancel process:
|
43
|
+
# If the Order stage is [this] then do [that]:
|
44
|
+
# 'Completed Order' -> Error: "Order has already been completed."
|
45
|
+
# 'Rejected' -> Error: "Order has already been rejected."
|
46
|
+
# 'Accounts Receivable' -> Success: order is rejected.
|
47
|
+
# 'Preordered' -> Success: order is rejected.
|
48
|
+
# 'Quote Sent' -> Success: order is rejected.
|
49
|
+
# 'Quote Requested' -> Success: order is rejected.
|
50
|
+
#
|
51
|
+
# The remaining stages are Fraud Review and Shipping Department. Orders in these stages have already completed payment.
|
52
|
+
# From this point, complex logic determines if the order has already shipped, or is queued to ship in a way that cannot be canceled.
|
53
|
+
# Here is the logic for those stages, but the gist of it all is this: If you receive any of the errors below, the order has progressed past a point where it can be canceled.
|
54
|
+
# SHIPPING LOGIC:
|
55
|
+
# Iterate through each item and consider it's shipping status:
|
56
|
+
# Item has already been transmitted to fulfillment center (contains a transmitted dts) -> Error: "The order has already had an item that has been transmitted to the distribution center."
|
57
|
+
# Does item DC (distribution center) have a transmission mechanism configured?
|
58
|
+
# YES -> Does the transmission have schedules? If NO -> Error: "The distribution center does not have any schedules so it would be an immediate transmission."
|
59
|
+
# NO -> Error: "Cant tell if we can cancel because the DC doesnt have a transport configured."
|
60
|
+
#
|
61
|
+
# If the above logic completes without errors, the following conditions must be met:
|
62
|
+
# Order has DC activity records. If NO -> Error: "There is no activity in the DC queue when there should be."
|
63
|
+
# There must be at least 5 minutes before the next DC transmission. If NO -> Error: "Activity record is not at least 5 minutes away so we need to bail."
|
64
|
+
#
|
65
|
+
# At this point, the order will be canceled with the following activity:
|
66
|
+
# 1) Distribution Center activity is cleared
|
67
|
+
# 2) The order is refunded. If the order is less than 24 hours old, a void is attempted instead.
|
68
|
+
#
|
69
|
+
#
|
70
|
+
# Other Possible Errors:
|
71
|
+
# System errors -> "Internal error. Please contact UltraCart Support."
|
72
|
+
# Order does not exist -> "Invalid order ID specified."
|
73
|
+
# During refunding, original transaction could not be found -> "Unable to find original transaction on the order."
|
74
|
+
# During refunding, original transaction was found, but transaction id could not be found -> "Unable to locate original transaction reference number."
|
75
|
+
# During refunding, PayPal was used by no longer configured -> "PayPal is no longer configured on your account to refund against."
|
76
|
+
# Gateway does not support refunds -> [GatewayName] does not support refunds at this time.
|
77
|
+
|
78
|
+
channel_partner_api = UltracartClient::ChannelPartnerApi.new_using_api_key(Constants::CHANNEL_PARTNER_API_KEY)
|
79
|
+
|
80
|
+
channel_partner_order_id = 'BLAH-BLAH-123'
|
81
|
+
begin
|
82
|
+
cancel_result = channel_partner_api.cancel_order_by_channel_partner_order_id(channel_partner_order_id)
|
83
|
+
unless cancel_result.success
|
84
|
+
cancel_result.cancel_errors.each do |error|
|
85
|
+
puts error
|
86
|
+
end
|
87
|
+
end
|
88
|
+
rescue UltracartClient::ApiError => e
|
89
|
+
puts e.inspect # Dumps all exception information
|
90
|
+
end
|
91
|
+
```
|
92
|
+
|
93
|
+
|
94
|
+
#### Using the cancel_order_by_channel_partner_order_id_with_http_info variant
|
95
|
+
|
96
|
+
This returns an Array which contains the response data, status code and headers.
|
97
|
+
|
98
|
+
> <Array(<ChannelPartnerCancelResponse>, Integer, Hash)> cancel_order_by_channel_partner_order_id_with_http_info(order_id)
|
99
|
+
|
100
|
+
```ruby
|
101
|
+
begin
|
102
|
+
# Cancel channel partner order by channel partner order id
|
103
|
+
data, status_code, headers = api_instance.cancel_order_by_channel_partner_order_id_with_http_info(order_id)
|
104
|
+
p status_code # => 2xx
|
105
|
+
p headers # => { ... }
|
106
|
+
p data # => <ChannelPartnerCancelResponse>
|
107
|
+
rescue UltracartClient::ApiError => e
|
108
|
+
puts "Error when calling ChannelPartnerApi->cancel_order_by_channel_partner_order_id_with_http_info: #{e}"
|
109
|
+
end
|
110
|
+
```
|
111
|
+
|
112
|
+
### Parameters
|
113
|
+
|
114
|
+
| Name | Type | Description | Notes |
|
115
|
+
| ---- | ---- | ----------- | ----- |
|
116
|
+
| **order_id** | **String** | The channel partner order id to delete. | |
|
117
|
+
|
118
|
+
### Return type
|
119
|
+
|
120
|
+
[**ChannelPartnerCancelResponse**](ChannelPartnerCancelResponse.md)
|
121
|
+
|
122
|
+
### Authorization
|
123
|
+
|
124
|
+
[ultraCartOauth](../README.md#ultraCartOauth), [ultraCartSimpleApiKey](../README.md#ultraCartSimpleApiKey)
|
125
|
+
|
126
|
+
### HTTP request headers
|
127
|
+
|
128
|
+
- **Content-Type**: Not defined
|
129
|
+
- **Accept**: application/json
|
130
|
+
|
131
|
+
|
132
|
+
## cancel_order_by_ultra_cart_order_id
|
133
|
+
|
134
|
+
> <ChannelPartnerCancelResponse> cancel_order_by_ultra_cart_order_id(order_id)
|
135
|
+
|
136
|
+
Cancel channel partner order by UltraCart order id
|
137
|
+
|
138
|
+
Cancel channel partner order by UltraCart order id
|
139
|
+
|
140
|
+
|
141
|
+
### Examples
|
142
|
+
|
143
|
+
```ruby
|
144
|
+
require 'ultracart_api'
|
145
|
+
require_relative '../constants'
|
146
|
+
|
147
|
+
# cancelOrderByUltraCartOrderId takes an UltraCart order id and attempts to 'cancel' the order.
|
148
|
+
# UltraCart doesn't have a cancel order state, so this needs some explanation of what happens.
|
149
|
+
#
|
150
|
+
# Here is the logic of the cancel process:
|
151
|
+
# If the Order stage is [this] then do [that]:
|
152
|
+
# 'Completed Order' -> Error: "Order has already been completed."
|
153
|
+
# 'Rejected' -> Error: "Order has already been rejected."
|
154
|
+
# 'Accounts Receivable' -> Success: order is rejected.
|
155
|
+
# 'Preordered' -> Success: order is rejected.
|
156
|
+
# 'Quote Sent' -> Success: order is rejected.
|
157
|
+
# 'Quote Requested' -> Success: order is rejected.
|
158
|
+
#
|
159
|
+
# The remaining stages are Fraud Review and Shipping Department. Orders in these stages have already completed payment.
|
160
|
+
# From this point, complex logic determines if the order has already shipped, or is queued to ship in a way that cannot be canceled.
|
161
|
+
# Here is the logic for those stages, but the gist of it all is this: If you receive any of the errors below, the order has progressed past a point where it can be canceled.
|
162
|
+
# SHIPPING LOGIC:
|
163
|
+
# Iterate through each item and consider it's shipping status:
|
164
|
+
# Item has already been transmitted to fulfillment center (contains a transmitted dts) -> Error: "The order has already had an item that has been transmitted to the distribution center."
|
165
|
+
# Does item DC (distribution center) have a transmission mechanism configured?
|
166
|
+
# YES -> Does the transmission have schedules? If NO -> Error: "The distribution center does not have any schedules so it would be an immediate transmission."
|
167
|
+
# NO -> Error: "Cant tell if we can cancel because the DC doesnt have a transport configured."
|
168
|
+
#
|
169
|
+
# If the above logic completes without errors, the following conditions must be met:
|
170
|
+
# Order has DC activity records. If NO -> Error: "There is no activity in the DC queue when there should be."
|
171
|
+
# There must be at least 5 minutes before the next DC transmission. If NO -> Error: "Activity record is not at least 5 minutes away so we need to bail."
|
172
|
+
#
|
173
|
+
# At this point, the order will be canceled with the following activity:
|
174
|
+
# 1) Distribution Center activity is cleared
|
175
|
+
# 2) The order is refunded. If the order is less than 24 hours old, a void is attempted instead.
|
176
|
+
#
|
177
|
+
#
|
178
|
+
# Other Possible Errors:
|
179
|
+
# System errors -> "Internal error. Please contact UltraCart Support."
|
180
|
+
# Order does not exist -> "Invalid order ID specified."
|
181
|
+
# During refunding, original transaction could not be found -> "Unable to find original transaction on the order."
|
182
|
+
# During refunding, original transaction was found, but transaction id could not be found -> "Unable to locate original transaction reference number."
|
183
|
+
# During refunding, PayPal was used by no longer configured -> "PayPal is no longer configured on your account to refund against."
|
184
|
+
# Gateway does not support refunds -> [GatewayName] does not support refunds at this time.
|
185
|
+
|
186
|
+
channel_partner_api = UltracartClient::ChannelPartnerApi.new_using_api_key(Constants::CHANNEL_PARTNER_API_KEY)
|
187
|
+
|
188
|
+
ultracart_order_id = 'DEMO-12345678980'
|
189
|
+
begin
|
190
|
+
cancel_result = channel_partner_api.cancel_order_by_ultra_cart_order_id(ultracart_order_id)
|
191
|
+
unless cancel_result.success
|
192
|
+
cancel_result.cancel_errors.each do |error|
|
193
|
+
puts error
|
194
|
+
end
|
195
|
+
end
|
196
|
+
rescue UltracartClient::ApiError => e
|
197
|
+
puts e.inspect # Dumps all exception information
|
198
|
+
end
|
199
|
+
```
|
200
|
+
|
201
|
+
|
202
|
+
#### Using the cancel_order_by_ultra_cart_order_id_with_http_info variant
|
203
|
+
|
204
|
+
This returns an Array which contains the response data, status code and headers.
|
205
|
+
|
206
|
+
> <Array(<ChannelPartnerCancelResponse>, Integer, Hash)> cancel_order_by_ultra_cart_order_id_with_http_info(order_id)
|
207
|
+
|
208
|
+
```ruby
|
209
|
+
begin
|
210
|
+
# Cancel channel partner order by UltraCart order id
|
211
|
+
data, status_code, headers = api_instance.cancel_order_by_ultra_cart_order_id_with_http_info(order_id)
|
212
|
+
p status_code # => 2xx
|
213
|
+
p headers # => { ... }
|
214
|
+
p data # => <ChannelPartnerCancelResponse>
|
215
|
+
rescue UltracartClient::ApiError => e
|
216
|
+
puts "Error when calling ChannelPartnerApi->cancel_order_by_ultra_cart_order_id_with_http_info: #{e}"
|
217
|
+
end
|
218
|
+
```
|
219
|
+
|
220
|
+
### Parameters
|
221
|
+
|
222
|
+
| Name | Type | Description | Notes |
|
223
|
+
| ---- | ---- | ----------- | ----- |
|
224
|
+
| **order_id** | **String** | The UltraCart order id to delete. | |
|
225
|
+
|
226
|
+
### Return type
|
227
|
+
|
228
|
+
[**ChannelPartnerCancelResponse**](ChannelPartnerCancelResponse.md)
|
229
|
+
|
230
|
+
### Authorization
|
231
|
+
|
232
|
+
[ultraCartOauth](../README.md#ultraCartOauth), [ultraCartSimpleApiKey](../README.md#ultraCartSimpleApiKey)
|
233
|
+
|
234
|
+
### HTTP request headers
|
235
|
+
|
236
|
+
- **Content-Type**: Not defined
|
237
|
+
- **Accept**: application/json
|
238
|
+
|
239
|
+
|
240
|
+
## delete_channel_partner_ship_to_preference
|
241
|
+
|
242
|
+
> delete_channel_partner_ship_to_preference(channel_partner_oid, channel_partner_ship_to_preference_oid)
|
243
|
+
|
244
|
+
Delete a ship to preference record for the channel partner.
|
245
|
+
|
246
|
+
Delete a ship to preference record for the channel partner.
|
247
|
+
|
248
|
+
|
249
|
+
### Examples
|
250
|
+
|
251
|
+
```ruby
|
252
|
+
require 'ultracart_api'
|
253
|
+
require_relative '../constants'
|
254
|
+
|
255
|
+
# Deletes a ChannelPartnerShiptoPreference. These preferences are used by EDI channel partners to automatically
|
256
|
+
# apply return policies and add additional free items to EDI orders based on the EDI code that is present.
|
257
|
+
#
|
258
|
+
# Success will return a status code 204 (No content)
|
259
|
+
#
|
260
|
+
# Possible Errors:
|
261
|
+
# Attempting to interact with a channel partner other than the one tied to your API Key:
|
262
|
+
# "Invalid channel_partner_oid specified. Your REST API key may only interact with channel_partner_oid: 12345"
|
263
|
+
# Supply a bad preference oid: "Invalid channel_partner_ship_to_preference_oid specified."
|
264
|
+
|
265
|
+
channel_partner_api = UltracartClient::ChannelPartnerApi.new_using_api_key(Constants::CHANNEL_PARTNER_API_KEY)
|
266
|
+
|
267
|
+
# you will usually get this by calling get_channel_partner_ship_to_preferences()
|
268
|
+
channel_partner_shipto_preference_oid = 67890
|
269
|
+
channel_partner_oid = 12345
|
270
|
+
|
271
|
+
channel_partner_api.delete_channel_partner_ship_to_preference(channel_partner_oid, channel_partner_shipto_preference_oid)
|
272
|
+
```
|
273
|
+
|
274
|
+
|
275
|
+
#### Using the delete_channel_partner_ship_to_preference_with_http_info variant
|
276
|
+
|
277
|
+
This returns an Array which contains the response data (`nil` in this case), status code and headers.
|
278
|
+
|
279
|
+
> <Array(nil, Integer, Hash)> delete_channel_partner_ship_to_preference_with_http_info(channel_partner_oid, channel_partner_ship_to_preference_oid)
|
280
|
+
|
281
|
+
```ruby
|
282
|
+
begin
|
283
|
+
# Delete a ship to preference record for the channel partner.
|
284
|
+
data, status_code, headers = api_instance.delete_channel_partner_ship_to_preference_with_http_info(channel_partner_oid, channel_partner_ship_to_preference_oid)
|
285
|
+
p status_code # => 2xx
|
286
|
+
p headers # => { ... }
|
287
|
+
p data # => nil
|
288
|
+
rescue UltracartClient::ApiError => e
|
289
|
+
puts "Error when calling ChannelPartnerApi->delete_channel_partner_ship_to_preference_with_http_info: #{e}"
|
290
|
+
end
|
291
|
+
```
|
292
|
+
|
293
|
+
### Parameters
|
294
|
+
|
295
|
+
| Name | Type | Description | Notes |
|
296
|
+
| ---- | ---- | ----------- | ----- |
|
297
|
+
| **channel_partner_oid** | **Integer** | | |
|
298
|
+
| **channel_partner_ship_to_preference_oid** | **Integer** | | |
|
299
|
+
|
300
|
+
### Return type
|
301
|
+
|
302
|
+
nil (empty response body)
|
303
|
+
|
304
|
+
### Authorization
|
305
|
+
|
306
|
+
[ultraCartOauth](../README.md#ultraCartOauth), [ultraCartSimpleApiKey](../README.md#ultraCartSimpleApiKey)
|
307
|
+
|
308
|
+
### HTTP request headers
|
309
|
+
|
310
|
+
- **Content-Type**: Not defined
|
311
|
+
- **Accept**: application/json
|
312
|
+
|
313
|
+
|
314
|
+
## estimate_shipping_for_channel_partner_order
|
315
|
+
|
316
|
+
> <ChannelPartnerEstimateShippingResponse> estimate_shipping_for_channel_partner_order(channel_partner_order)
|
317
|
+
|
318
|
+
Estimate shipping for channel partner order
|
319
|
+
|
320
|
+
Estimate shipping for order from a channel partner.
|
321
|
+
|
322
|
+
|
323
|
+
### Examples
|
324
|
+
|
325
|
+
```ruby
|
326
|
+
require 'ultracart_api'
|
327
|
+
require_relative '../constants'
|
328
|
+
|
329
|
+
# This is a helper function for call centers to calculate the shipping cost on an order. In a typical flow, the call center
|
330
|
+
# will collect all the shipping information and items being purchased into a ChannelPartnerOrder object.
|
331
|
+
# They will then call this method, passing in the order object. The response will contain the shipping estimates
|
332
|
+
# that the call center can present to the customer. Once the customer selects a particulate estimate,
|
333
|
+
# they can then plug that cost into their call center application and complete the order.
|
334
|
+
#
|
335
|
+
# Possible Errors:
|
336
|
+
# Using an API key that is not tied to a channel partner: "This API Key does not have permission to interact with channel partner orders. Please review your Channel Partner configuration."
|
337
|
+
# Order has invalid channel partner code: "Invalid channel partner code"
|
338
|
+
# Order has no items: "null order.items passed." or "order.items array contains a null entry."
|
339
|
+
# Order has no channel partner order id: "order.channelPartnerOrderId must be specified."
|
340
|
+
# Order channel partner order id is a duplicate: "order.channelPartnerOrderId [XYZ] already used."
|
341
|
+
# Channel Partner is inactive: "partner is inactive."
|
342
|
+
|
343
|
+
channel_partner_api = UltracartClient::ChannelPartnerApi.new_using_api_key(Constants::CHANNEL_PARTNER_API_KEY)
|
344
|
+
|
345
|
+
order = UltracartClient::ChannelPartnerOrder.new
|
346
|
+
order.channel_partner_order_id = "widget-1245-abc-1"
|
347
|
+
order.coupons = ["10OFF"]
|
348
|
+
# DeliveryDate will impact shipping estimates if there is a delivery deadline.
|
349
|
+
# order.delivery_date = (Time.now + (14 * 24 * 60 * 60)).iso8601
|
350
|
+
|
351
|
+
item = UltracartClient::ChannelPartnerOrderItem.new
|
352
|
+
# item.arbitrary_unit_cost = 9.99
|
353
|
+
# item.auto_order_last_rebill_dts = (Time.now - (30 * 24 * 60 * 60)).iso8601
|
354
|
+
# item.auto_order_schedule = "Weekly"
|
355
|
+
item.merchant_item_id = "shirt"
|
356
|
+
|
357
|
+
size_option = UltracartClient::ChannelPartnerOrderItemOption.new
|
358
|
+
size_option.name = "Size"
|
359
|
+
size_option.value = "Small"
|
360
|
+
|
361
|
+
color_option = UltracartClient::ChannelPartnerOrderItemOption.new
|
362
|
+
color_option.name = "Color"
|
363
|
+
color_option.value = "Orange"
|
364
|
+
|
365
|
+
item.options = [size_option, color_option]
|
366
|
+
item.quantity = 1
|
367
|
+
item.upsell = false
|
368
|
+
|
369
|
+
order.items = [item]
|
370
|
+
|
371
|
+
# order.ship_on_date = (Time.now + (7 * 24 * 60 * 60)).iso8601
|
372
|
+
order.ship_to_residential = true
|
373
|
+
order.ship_to_address1 = "55 Main Street"
|
374
|
+
order.ship_to_address2 = "Suite 202"
|
375
|
+
order.ship_to_city = "Duluth"
|
376
|
+
order.ship_to_company = "Widgets Inc"
|
377
|
+
order.ship_to_country_code = "US"
|
378
|
+
order.ship_to_day_phone = "6785552323"
|
379
|
+
order.ship_to_evening_phone = "7703334444"
|
380
|
+
order.ship_to_first_name = "Sally"
|
381
|
+
order.ship_to_last_name = "McGonkyDee"
|
382
|
+
order.ship_to_postal_code = "30097"
|
383
|
+
order.ship_to_state_region = "GA"
|
384
|
+
order.ship_to_title = "Director"
|
385
|
+
|
386
|
+
api_response = channel_partner_api.estimate_shipping_for_channel_partner_order(order)
|
387
|
+
estimates = api_response.estimates
|
388
|
+
|
389
|
+
# TODO: Apply one estimate shipping method (name) and cost to your channel partner order.
|
390
|
+
|
391
|
+
estimates.each do |estimate|
|
392
|
+
p estimate
|
393
|
+
end
|
394
|
+
```
|
395
|
+
|
396
|
+
|
397
|
+
#### Using the estimate_shipping_for_channel_partner_order_with_http_info variant
|
398
|
+
|
399
|
+
This returns an Array which contains the response data, status code and headers.
|
400
|
+
|
401
|
+
> <Array(<ChannelPartnerEstimateShippingResponse>, Integer, Hash)> estimate_shipping_for_channel_partner_order_with_http_info(channel_partner_order)
|
402
|
+
|
403
|
+
```ruby
|
404
|
+
begin
|
405
|
+
# Estimate shipping for channel partner order
|
406
|
+
data, status_code, headers = api_instance.estimate_shipping_for_channel_partner_order_with_http_info(channel_partner_order)
|
407
|
+
p status_code # => 2xx
|
408
|
+
p headers # => { ... }
|
409
|
+
p data # => <ChannelPartnerEstimateShippingResponse>
|
410
|
+
rescue UltracartClient::ApiError => e
|
411
|
+
puts "Error when calling ChannelPartnerApi->estimate_shipping_for_channel_partner_order_with_http_info: #{e}"
|
412
|
+
end
|
413
|
+
```
|
414
|
+
|
415
|
+
### Parameters
|
416
|
+
|
417
|
+
| Name | Type | Description | Notes |
|
418
|
+
| ---- | ---- | ----------- | ----- |
|
419
|
+
| **channel_partner_order** | [**ChannelPartnerOrder**](ChannelPartnerOrder.md) | Order needing shipping estimate | |
|
420
|
+
|
421
|
+
### Return type
|
422
|
+
|
423
|
+
[**ChannelPartnerEstimateShippingResponse**](ChannelPartnerEstimateShippingResponse.md)
|
424
|
+
|
425
|
+
### Authorization
|
426
|
+
|
427
|
+
[ultraCartOauth](../README.md#ultraCartOauth), [ultraCartSimpleApiKey](../README.md#ultraCartSimpleApiKey)
|
428
|
+
|
429
|
+
### HTTP request headers
|
430
|
+
|
431
|
+
- **Content-Type**: application/json; charset=UTF-8
|
432
|
+
- **Accept**: application/json
|
433
|
+
|
434
|
+
|
435
|
+
## estimate_tax_for_channel_partner_order
|
436
|
+
|
437
|
+
> <ChannelPartnerEstimateTaxResponse> estimate_tax_for_channel_partner_order(channel_partner_order)
|
438
|
+
|
439
|
+
Estimate tax for channel partner order
|
440
|
+
|
441
|
+
Estimate tax for order from a channel partner.
|
442
|
+
|
443
|
+
|
444
|
+
### Examples
|
445
|
+
|
446
|
+
```ruby
|
447
|
+
require 'ultracart_api'
|
448
|
+
require_relative '../constants'
|
449
|
+
|
450
|
+
# This is a helper function for call centers to calculate the tax on an order. In a typical flow, the call center
|
451
|
+
# will collect all the shipping information and items being purchased into a ChannelPartnerOrder object.
|
452
|
+
# They will then call this method, passing in the order object. The response will contain the tax that should be
|
453
|
+
# collected. They can then plug that tax into their call center application and complete the order.
|
454
|
+
#
|
455
|
+
# Possible Errors:
|
456
|
+
# Using an API key that is not tied to a channel partner: "This API Key does not have permission to interact with channel partner orders. Please review your Channel Partner configuration."
|
457
|
+
# Order has invalid channel partner code: "Invalid channel partner code"
|
458
|
+
# Order has no items: "null order.items passed." or "order.items array contains a null entry."
|
459
|
+
# Order has no channel partner order id: "order.channelPartnerOrderId must be specified."
|
460
|
+
# Order channel partner order id is a duplicate: "order.channelPartnerOrderId [XYZ] already used."
|
461
|
+
# Channel Partner is inactive: "partner is inactive."
|
462
|
+
|
463
|
+
channel_partner_api = UltracartClient::ChannelPartnerApi.new_using_api_key(Constants::CHANNEL_PARTNER_API_KEY)
|
464
|
+
|
465
|
+
order = UltracartClient::ChannelPartnerOrder.new
|
466
|
+
order.channel_partner_order_id = "widget-1245-abc-1"
|
467
|
+
order.coupons = ["10OFF"]
|
468
|
+
# DeliveryDate will impact shipping estimates if there is a delivery deadline.
|
469
|
+
# order.delivery_date = (Time.now + (14 * 24 * 60 * 60)).iso8601
|
470
|
+
|
471
|
+
item = UltracartClient::ChannelPartnerOrderItem.new
|
472
|
+
# item.arbitrary_unit_cost = 9.99
|
473
|
+
# item.auto_order_last_rebill_dts = (Time.now - (30 * 24 * 60 * 60)).iso8601
|
474
|
+
# item.auto_order_schedule = "Weekly"
|
475
|
+
item.merchant_item_id = "shirt"
|
476
|
+
|
477
|
+
size_option = UltracartClient::ChannelPartnerOrderItemOption.new
|
478
|
+
size_option.name = "Size"
|
479
|
+
size_option.value = "Small"
|
480
|
+
|
481
|
+
color_option = UltracartClient::ChannelPartnerOrderItemOption.new
|
482
|
+
color_option.name = "Color"
|
483
|
+
color_option.value = "Orange"
|
484
|
+
|
485
|
+
item.options = [size_option, color_option]
|
486
|
+
item.quantity = 1
|
487
|
+
item.upsell = false
|
488
|
+
|
489
|
+
order.items = [item]
|
490
|
+
|
491
|
+
# order.ship_on_date = (Time.now + (7 * 24 * 60 * 60)).iso8601
|
492
|
+
order.ship_to_residential = true
|
493
|
+
order.ship_to_address1 = "55 Main Street"
|
494
|
+
order.ship_to_address2 = "Suite 202"
|
495
|
+
order.ship_to_city = "Duluth"
|
496
|
+
order.ship_to_company = "Widgets Inc"
|
497
|
+
order.ship_to_country_code = "US"
|
498
|
+
order.ship_to_day_phone = "6785552323"
|
499
|
+
order.ship_to_evening_phone = "7703334444"
|
500
|
+
order.ship_to_first_name = "Sally"
|
501
|
+
order.ship_to_last_name = "McGonkyDee"
|
502
|
+
order.ship_to_postal_code = "30097"
|
503
|
+
order.ship_to_state_region = "GA"
|
504
|
+
order.ship_to_title = "Director"
|
505
|
+
|
506
|
+
api_response = channel_partner_api.estimate_tax_for_channel_partner_order(order)
|
507
|
+
arbitrary_tax = api_response.arbitrary_tax
|
508
|
+
# TODO: Apply this tax to your channel partner order.
|
509
|
+
|
510
|
+
p arbitrary_tax
|
511
|
+
```
|
512
|
+
|
513
|
+
|
514
|
+
#### Using the estimate_tax_for_channel_partner_order_with_http_info variant
|
515
|
+
|
516
|
+
This returns an Array which contains the response data, status code and headers.
|
517
|
+
|
518
|
+
> <Array(<ChannelPartnerEstimateTaxResponse>, Integer, Hash)> estimate_tax_for_channel_partner_order_with_http_info(channel_partner_order)
|
519
|
+
|
520
|
+
```ruby
|
521
|
+
begin
|
522
|
+
# Estimate tax for channel partner order
|
523
|
+
data, status_code, headers = api_instance.estimate_tax_for_channel_partner_order_with_http_info(channel_partner_order)
|
524
|
+
p status_code # => 2xx
|
525
|
+
p headers # => { ... }
|
526
|
+
p data # => <ChannelPartnerEstimateTaxResponse>
|
527
|
+
rescue UltracartClient::ApiError => e
|
528
|
+
puts "Error when calling ChannelPartnerApi->estimate_tax_for_channel_partner_order_with_http_info: #{e}"
|
529
|
+
end
|
530
|
+
```
|
531
|
+
|
532
|
+
### Parameters
|
533
|
+
|
534
|
+
| Name | Type | Description | Notes |
|
535
|
+
| ---- | ---- | ----------- | ----- |
|
536
|
+
| **channel_partner_order** | [**ChannelPartnerOrder**](ChannelPartnerOrder.md) | Order needing tax estimate | |
|
537
|
+
|
538
|
+
### Return type
|
539
|
+
|
540
|
+
[**ChannelPartnerEstimateTaxResponse**](ChannelPartnerEstimateTaxResponse.md)
|
541
|
+
|
542
|
+
### Authorization
|
543
|
+
|
544
|
+
[ultraCartOauth](../README.md#ultraCartOauth), [ultraCartSimpleApiKey](../README.md#ultraCartSimpleApiKey)
|
545
|
+
|
546
|
+
### HTTP request headers
|
547
|
+
|
548
|
+
- **Content-Type**: application/json; charset=UTF-8
|
549
|
+
- **Accept**: application/json
|
550
|
+
|
551
|
+
|
552
|
+
## get_channel_partner_order
|
553
|
+
|
554
|
+
> <OrderResponse> get_channel_partner_order(order_id, opts)
|
555
|
+
|
556
|
+
Retrieve a channel partner order
|
557
|
+
|
558
|
+
Retrieves a single order using the specified order id. Only orders belonging to this channel partner may be retrieved.
|
559
|
+
|
560
|
+
|
561
|
+
### Examples
|
562
|
+
|
563
|
+
```ruby
|
564
|
+
require 'ultracart_api'
|
565
|
+
require_relative '../constants'
|
566
|
+
|
567
|
+
# ChannelPartnerApi.get_channel_partner_order() retrieves a single order for a given order_id. It is identical to the
|
568
|
+
# OrderApi.get_order() call, but allows for a restricted permission set. The channel partner api assumes
|
569
|
+
# a tie to a Channel Partner and only allows retrieval of orders created by that Channel Partner.
|
570
|
+
|
571
|
+
channel_partner_api = UltracartClient::ChannelPartnerApi.new_using_api_key(Constants::CHANNEL_PARTNER_API_KEY)
|
572
|
+
|
573
|
+
# The expansion variable instructs UltraCart how much information to return. The order object is large and
|
574
|
+
# while it's easily manageable for a single order, when querying thousands of orders, is useful to reduce
|
575
|
+
# payload size.
|
576
|
+
# see www.ultracart.com/api/ for all the expansion fields available (this list below may become stale)
|
577
|
+
#
|
578
|
+
# Possible Order Expansions:
|
579
|
+
# affiliate affiliate.ledger auto_order
|
580
|
+
# billing channel_partner checkout
|
581
|
+
# coupon customer_profile digital_order
|
582
|
+
# edi fraud_score gift
|
583
|
+
# gift_certificate internal item
|
584
|
+
# linked_shipment marketing payment
|
585
|
+
# payment.transaction quote salesforce
|
586
|
+
# shipping shipping.tracking_number_details summary
|
587
|
+
# taxes
|
588
|
+
|
589
|
+
# A channel partner will almost always query an order for the purpose of turning around and submitting it to a refund call.
|
590
|
+
# As such, the expansion most likely needed is listed below.
|
591
|
+
_expand = "item,summary,shipping"
|
592
|
+
|
593
|
+
# This order MUST be an order associated with this channel partner or you will receive a 400 Bad Request.
|
594
|
+
order_id = 'DEMO-0009110366'
|
595
|
+
api_response = channel_partner_api.get_channel_partner_order(order_id, { '_expand' => _expand })
|
596
|
+
|
597
|
+
if api_response.error
|
598
|
+
STDERR.puts api_response.error.developer_message
|
599
|
+
STDERR.puts api_response.error.user_message
|
600
|
+
exit
|
601
|
+
end
|
602
|
+
|
603
|
+
order = api_response.order
|
604
|
+
|
605
|
+
p order
|
606
|
+
```
|
607
|
+
|
608
|
+
|
609
|
+
#### Using the get_channel_partner_order_with_http_info variant
|
610
|
+
|
611
|
+
This returns an Array which contains the response data, status code and headers.
|
612
|
+
|
613
|
+
> <Array(<OrderResponse>, Integer, Hash)> get_channel_partner_order_with_http_info(order_id, opts)
|
614
|
+
|
615
|
+
```ruby
|
616
|
+
begin
|
617
|
+
# Retrieve a channel partner order
|
618
|
+
data, status_code, headers = api_instance.get_channel_partner_order_with_http_info(order_id, opts)
|
619
|
+
p status_code # => 2xx
|
620
|
+
p headers # => { ... }
|
621
|
+
p data # => <OrderResponse>
|
622
|
+
rescue UltracartClient::ApiError => e
|
623
|
+
puts "Error when calling ChannelPartnerApi->get_channel_partner_order_with_http_info: #{e}"
|
624
|
+
end
|
625
|
+
```
|
626
|
+
|
627
|
+
### Parameters
|
628
|
+
|
629
|
+
| Name | Type | Description | Notes |
|
630
|
+
| ---- | ---- | ----------- | ----- |
|
631
|
+
| **order_id** | **String** | The order id to retrieve. | |
|
632
|
+
| **_expand** | **String** | The object expansion to perform on the result. See OrderApi.getOrder documentation for examples | [optional] |
|
633
|
+
|
634
|
+
### Return type
|
635
|
+
|
636
|
+
[**OrderResponse**](OrderResponse.md)
|
637
|
+
|
638
|
+
### Authorization
|
639
|
+
|
640
|
+
[ultraCartOauth](../README.md#ultraCartOauth), [ultraCartSimpleApiKey](../README.md#ultraCartSimpleApiKey)
|
641
|
+
|
642
|
+
### HTTP request headers
|
643
|
+
|
644
|
+
- **Content-Type**: Not defined
|
645
|
+
- **Accept**: application/json
|
646
|
+
|
647
|
+
|
648
|
+
## get_channel_partner_order_by_channel_partner_order_id
|
649
|
+
|
650
|
+
> <OrderResponse> get_channel_partner_order_by_channel_partner_order_id(order_id, opts)
|
651
|
+
|
652
|
+
Retrieve a channel partner order by the channel partner order id
|
653
|
+
|
654
|
+
Retrieves a single order using the channel partner order id, not the ultracart order id. Only orders belonging to this channel partner may be retrieved.
|
655
|
+
|
656
|
+
|
657
|
+
### Examples
|
658
|
+
|
659
|
+
```ruby
|
660
|
+
require 'ultracart_api'
|
661
|
+
require_relative '../constants'
|
662
|
+
|
663
|
+
# ChannelPartnerApi.get_channel_partner_order_by_channel_partner_order_id() retrieves a single order for a given
|
664
|
+
# channel partner order_id. This might be useful for call centers which only have their order ids and not UltraCart's.
|
665
|
+
# It is identical to the OrderApi.get_order() call in functionality and result,
|
666
|
+
# but allows for a restricted permission set. The channel partner api assumes a tie to a Channel Partner and
|
667
|
+
# only allows retrieval of orders created by that Channel Partner.
|
668
|
+
|
669
|
+
channel_partner_api = UltracartClient::ChannelPartnerApi.new_using_api_key(Constants::CHANNEL_PARTNER_API_KEY)
|
670
|
+
|
671
|
+
# The expansion variable instructs UltraCart how much information to return. The order object is large and
|
672
|
+
# while it's easily manageable for a single order, when querying thousands of orders, is useful to reduce
|
673
|
+
# payload size.
|
674
|
+
# see www.ultracart.com/api/ for all the expansion fields available (this list below may become stale)
|
675
|
+
#
|
676
|
+
# Possible Order Expansions:
|
677
|
+
# affiliate affiliate.ledger auto_order
|
678
|
+
# billing channel_partner checkout
|
679
|
+
# coupon customer_profile digital_order
|
680
|
+
# edi fraud_score gift
|
681
|
+
# gift_certificate internal item
|
682
|
+
# linked_shipment marketing payment
|
683
|
+
# payment.transaction quote salesforce
|
684
|
+
# shipping shipping.tracking_number_details summary
|
685
|
+
# taxes
|
686
|
+
|
687
|
+
# A channel partner will almost always query an order for the purpose of turning around and submitting it to a refund call.
|
688
|
+
# As such, the expansion most likely needed is listed below.
|
689
|
+
_expand = "item,summary,shipping"
|
690
|
+
|
691
|
+
# This order MUST be an order associated with this channel partner or you will receive a 400 Bad Request.
|
692
|
+
channel_partner_order_id = 'MY-CALL-CENTER-BLAH-BLAH'
|
693
|
+
api_response = channel_partner_api.get_channel_partner_order_by_channel_partner_order_id(channel_partner_order_id, { '_expand' => _expand })
|
694
|
+
|
695
|
+
if api_response.error
|
696
|
+
STDERR.puts api_response.error.developer_message
|
697
|
+
STDERR.puts api_response.error.user_message
|
698
|
+
exit
|
699
|
+
end
|
700
|
+
|
701
|
+
order = api_response.order
|
702
|
+
|
703
|
+
p order
|
704
|
+
```
|
705
|
+
|
706
|
+
|
707
|
+
#### Using the get_channel_partner_order_by_channel_partner_order_id_with_http_info variant
|
708
|
+
|
709
|
+
This returns an Array which contains the response data, status code and headers.
|
710
|
+
|
711
|
+
> <Array(<OrderResponse>, Integer, Hash)> get_channel_partner_order_by_channel_partner_order_id_with_http_info(order_id, opts)
|
712
|
+
|
713
|
+
```ruby
|
714
|
+
begin
|
715
|
+
# Retrieve a channel partner order by the channel partner order id
|
716
|
+
data, status_code, headers = api_instance.get_channel_partner_order_by_channel_partner_order_id_with_http_info(order_id, opts)
|
717
|
+
p status_code # => 2xx
|
718
|
+
p headers # => { ... }
|
719
|
+
p data # => <OrderResponse>
|
720
|
+
rescue UltracartClient::ApiError => e
|
721
|
+
puts "Error when calling ChannelPartnerApi->get_channel_partner_order_by_channel_partner_order_id_with_http_info: #{e}"
|
722
|
+
end
|
723
|
+
```
|
724
|
+
|
725
|
+
### Parameters
|
726
|
+
|
727
|
+
| Name | Type | Description | Notes |
|
728
|
+
| ---- | ---- | ----------- | ----- |
|
729
|
+
| **order_id** | **String** | The channel partner order id to retrieve. | |
|
730
|
+
| **_expand** | **String** | The object expansion to perform on the result. See OrderApi.getOrder documentation for examples | [optional] |
|
731
|
+
|
732
|
+
### Return type
|
733
|
+
|
734
|
+
[**OrderResponse**](OrderResponse.md)
|
735
|
+
|
736
|
+
### Authorization
|
737
|
+
|
738
|
+
[ultraCartOauth](../README.md#ultraCartOauth), [ultraCartSimpleApiKey](../README.md#ultraCartSimpleApiKey)
|
739
|
+
|
740
|
+
### HTTP request headers
|
741
|
+
|
742
|
+
- **Content-Type**: Not defined
|
743
|
+
- **Accept**: application/json
|
744
|
+
|
745
|
+
|
746
|
+
## get_channel_partner_reason_codes
|
747
|
+
|
748
|
+
> <ChanelPartnerReasonCodesResponse> get_channel_partner_reason_codes(channel_partner_oid)
|
749
|
+
|
750
|
+
Retrieve reject and refund reason codes.
|
751
|
+
|
752
|
+
Retrieve reject and refund reason codes.
|
753
|
+
|
754
|
+
|
755
|
+
### Examples
|
756
|
+
|
757
|
+
```ruby
|
758
|
+
# Retrieves a list of all channel partners reject and refund reason codes needed (maybe) when doing a refund order
|
759
|
+
|
760
|
+
require 'ultracart_api'
|
761
|
+
require_relative '../constants'
|
762
|
+
|
763
|
+
channel_partner_api = UltracartClient::ChannelPartnerApi.new_using_api_key(Constants::CHANNEL_PARTNER_API_KEY)
|
764
|
+
api_response = channel_partner_api.get_channel_partner_reason_codes(18_413)
|
765
|
+
|
766
|
+
if api_response.error
|
767
|
+
STDERR.puts api_response.error.developer_message
|
768
|
+
STDERR.puts api_response.error.user_message
|
769
|
+
exit
|
770
|
+
end
|
771
|
+
|
772
|
+
p api_response
|
773
|
+
```
|
774
|
+
|
775
|
+
|
776
|
+
#### Using the get_channel_partner_reason_codes_with_http_info variant
|
777
|
+
|
778
|
+
This returns an Array which contains the response data, status code and headers.
|
779
|
+
|
780
|
+
> <Array(<ChanelPartnerReasonCodesResponse>, Integer, Hash)> get_channel_partner_reason_codes_with_http_info(channel_partner_oid)
|
781
|
+
|
782
|
+
```ruby
|
783
|
+
begin
|
784
|
+
# Retrieve reject and refund reason codes.
|
785
|
+
data, status_code, headers = api_instance.get_channel_partner_reason_codes_with_http_info(channel_partner_oid)
|
786
|
+
p status_code # => 2xx
|
787
|
+
p headers # => { ... }
|
788
|
+
p data # => <ChanelPartnerReasonCodesResponse>
|
789
|
+
rescue UltracartClient::ApiError => e
|
790
|
+
puts "Error when calling ChannelPartnerApi->get_channel_partner_reason_codes_with_http_info: #{e}"
|
791
|
+
end
|
792
|
+
```
|
793
|
+
|
794
|
+
### Parameters
|
795
|
+
|
796
|
+
| Name | Type | Description | Notes |
|
797
|
+
| ---- | ---- | ----------- | ----- |
|
798
|
+
| **channel_partner_oid** | **Integer** | | |
|
799
|
+
|
800
|
+
### Return type
|
801
|
+
|
802
|
+
[**ChanelPartnerReasonCodesResponse**](ChanelPartnerReasonCodesResponse.md)
|
803
|
+
|
804
|
+
### Authorization
|
805
|
+
|
806
|
+
[ultraCartOauth](../README.md#ultraCartOauth), [ultraCartSimpleApiKey](../README.md#ultraCartSimpleApiKey)
|
807
|
+
|
808
|
+
### HTTP request headers
|
809
|
+
|
810
|
+
- **Content-Type**: Not defined
|
811
|
+
- **Accept**: application/json
|
812
|
+
|
813
|
+
|
814
|
+
## get_channel_partner_ship_to_preference
|
815
|
+
|
816
|
+
> <ChannelPartnerShipToPreferenceResponse> get_channel_partner_ship_to_preference(channel_partner_oid, channel_partner_ship_to_preference_oid)
|
817
|
+
|
818
|
+
Retrieve the ship to preference associated with the channel partner and the specific id.
|
819
|
+
|
820
|
+
Retrieve the ship to preference associated with the channel partner and the specific id.
|
821
|
+
|
822
|
+
|
823
|
+
### Examples
|
824
|
+
|
825
|
+
```ruby
|
826
|
+
require 'ultracart_api'
|
827
|
+
require_relative '../constants'
|
828
|
+
|
829
|
+
# Retrieves a shipto preference for a channel partner.
|
830
|
+
# These preferences are used by EDI channel partners to automatically
|
831
|
+
# apply return policies and add additional free items to EDI orders based on the EDI code that is present.
|
832
|
+
#
|
833
|
+
# Possible Errors:
|
834
|
+
# Attempting to interact with a channel partner other than the one tied to your API Key:
|
835
|
+
# "Invalid channel_partner_oid specified. Your REST API key may only interact with channel_partner_oid: 12345"
|
836
|
+
# Supplying a bad channel partner oid: "Invalid channel_partner_oid specified."
|
837
|
+
# Supplying a bad channel partner shipto preference oid: "Invalid channel_partner_ship_to_preference_oid specified."
|
838
|
+
|
839
|
+
channel_partner_api = UltracartClient::ChannelPartnerApi.new_using_api_key(Constants::CHANNEL_PARTNER_API_KEY)
|
840
|
+
channel_partner_oid = 12345
|
841
|
+
channel_partner_shipto_preference_oid = 67890
|
842
|
+
api_response = channel_partner_api.get_channel_partner_ship_to_preference(channel_partner_oid, channel_partner_shipto_preference_oid)
|
843
|
+
|
844
|
+
if api_response.error
|
845
|
+
STDERR.puts api_response.error.developer_message
|
846
|
+
STDERR.puts api_response.error.user_message
|
847
|
+
exit
|
848
|
+
end
|
849
|
+
|
850
|
+
preference = api_response.ship_to_preference
|
851
|
+
|
852
|
+
p preference
|
853
|
+
```
|
854
|
+
|
855
|
+
|
856
|
+
#### Using the get_channel_partner_ship_to_preference_with_http_info variant
|
857
|
+
|
858
|
+
This returns an Array which contains the response data, status code and headers.
|
859
|
+
|
860
|
+
> <Array(<ChannelPartnerShipToPreferenceResponse>, Integer, Hash)> get_channel_partner_ship_to_preference_with_http_info(channel_partner_oid, channel_partner_ship_to_preference_oid)
|
861
|
+
|
862
|
+
```ruby
|
863
|
+
begin
|
864
|
+
# Retrieve the ship to preference associated with the channel partner and the specific id.
|
865
|
+
data, status_code, headers = api_instance.get_channel_partner_ship_to_preference_with_http_info(channel_partner_oid, channel_partner_ship_to_preference_oid)
|
866
|
+
p status_code # => 2xx
|
867
|
+
p headers # => { ... }
|
868
|
+
p data # => <ChannelPartnerShipToPreferenceResponse>
|
869
|
+
rescue UltracartClient::ApiError => e
|
870
|
+
puts "Error when calling ChannelPartnerApi->get_channel_partner_ship_to_preference_with_http_info: #{e}"
|
871
|
+
end
|
872
|
+
```
|
873
|
+
|
874
|
+
### Parameters
|
875
|
+
|
876
|
+
| Name | Type | Description | Notes |
|
877
|
+
| ---- | ---- | ----------- | ----- |
|
878
|
+
| **channel_partner_oid** | **Integer** | | |
|
879
|
+
| **channel_partner_ship_to_preference_oid** | **Integer** | | |
|
880
|
+
|
881
|
+
### Return type
|
882
|
+
|
883
|
+
[**ChannelPartnerShipToPreferenceResponse**](ChannelPartnerShipToPreferenceResponse.md)
|
884
|
+
|
885
|
+
### Authorization
|
886
|
+
|
887
|
+
[ultraCartOauth](../README.md#ultraCartOauth), [ultraCartSimpleApiKey](../README.md#ultraCartSimpleApiKey)
|
888
|
+
|
889
|
+
### HTTP request headers
|
890
|
+
|
891
|
+
- **Content-Type**: Not defined
|
892
|
+
- **Accept**: application/json
|
893
|
+
|
894
|
+
|
895
|
+
## get_channel_partner_ship_to_preferences
|
896
|
+
|
897
|
+
> <ChannelPartnerShipToPreferencesResponse> get_channel_partner_ship_to_preferences(channel_partner_oid)
|
898
|
+
|
899
|
+
Retrieve the ship to preferences associated with the channel partner.
|
900
|
+
|
901
|
+
Retrieve the ship to preferences associated with the channel partner.
|
902
|
+
|
903
|
+
|
904
|
+
### Examples
|
905
|
+
|
906
|
+
```ruby
|
907
|
+
require 'ultracart_api'
|
908
|
+
require_relative '../constants'
|
909
|
+
|
910
|
+
# Retrieves all shipto preferences for a channel partner.
|
911
|
+
# These preferences are used by EDI channel partners to automatically
|
912
|
+
# apply return policies and add additional free items to EDI orders based on the EDI code that is present.
|
913
|
+
#
|
914
|
+
# Possible Errors:
|
915
|
+
# Attempting to interact with a channel partner other than the one tied to your API Key:
|
916
|
+
# "Invalid channel_partner_oid specified. Your REST API key may only interact with channel_partner_oid: 12345"
|
917
|
+
# Supplying a bad channel partner oid: "Invalid channel_partner_oid specified."
|
918
|
+
|
919
|
+
channel_partner_api = UltracartClient::ChannelPartnerApi.new_using_api_key(Constants::CHANNEL_PARTNER_API_KEY)
|
920
|
+
channel_partner_oid = 12345
|
921
|
+
api_response = channel_partner_api.get_channel_partner_ship_to_preferences(channel_partner_oid)
|
922
|
+
|
923
|
+
if api_response.error
|
924
|
+
STDERR.puts api_response.error.developer_message
|
925
|
+
STDERR.puts api_response.error.user_message
|
926
|
+
exit
|
927
|
+
end
|
928
|
+
|
929
|
+
preferences = api_response.ship_to_preferences
|
930
|
+
|
931
|
+
preferences.each do |preference|
|
932
|
+
p preference
|
933
|
+
end
|
934
|
+
```
|
935
|
+
|
936
|
+
|
937
|
+
#### Using the get_channel_partner_ship_to_preferences_with_http_info variant
|
938
|
+
|
939
|
+
This returns an Array which contains the response data, status code and headers.
|
940
|
+
|
941
|
+
> <Array(<ChannelPartnerShipToPreferencesResponse>, Integer, Hash)> get_channel_partner_ship_to_preferences_with_http_info(channel_partner_oid)
|
942
|
+
|
943
|
+
```ruby
|
944
|
+
begin
|
945
|
+
# Retrieve the ship to preferences associated with the channel partner.
|
946
|
+
data, status_code, headers = api_instance.get_channel_partner_ship_to_preferences_with_http_info(channel_partner_oid)
|
947
|
+
p status_code # => 2xx
|
948
|
+
p headers # => { ... }
|
949
|
+
p data # => <ChannelPartnerShipToPreferencesResponse>
|
950
|
+
rescue UltracartClient::ApiError => e
|
951
|
+
puts "Error when calling ChannelPartnerApi->get_channel_partner_ship_to_preferences_with_http_info: #{e}"
|
952
|
+
end
|
953
|
+
```
|
954
|
+
|
955
|
+
### Parameters
|
956
|
+
|
957
|
+
| Name | Type | Description | Notes |
|
958
|
+
| ---- | ---- | ----------- | ----- |
|
959
|
+
| **channel_partner_oid** | **Integer** | | |
|
960
|
+
|
961
|
+
### Return type
|
962
|
+
|
963
|
+
[**ChannelPartnerShipToPreferencesResponse**](ChannelPartnerShipToPreferencesResponse.md)
|
964
|
+
|
965
|
+
### Authorization
|
966
|
+
|
967
|
+
[ultraCartOauth](../README.md#ultraCartOauth), [ultraCartSimpleApiKey](../README.md#ultraCartSimpleApiKey)
|
968
|
+
|
969
|
+
### HTTP request headers
|
970
|
+
|
971
|
+
- **Content-Type**: Not defined
|
972
|
+
- **Accept**: application/json
|
973
|
+
|
974
|
+
|
975
|
+
## get_channel_partners
|
976
|
+
|
977
|
+
> <ChannelPartnersResponse> get_channel_partners
|
978
|
+
|
979
|
+
Retrieve the channel partners configured on the account.
|
980
|
+
|
981
|
+
Retrieve the channel partners configured on the account.
|
982
|
+
|
983
|
+
|
984
|
+
### Examples
|
985
|
+
|
986
|
+
```ruby
|
987
|
+
# Retrieves a list of all channel partners configured for this merchant. If the API KEY used is tied to a specific
|
988
|
+
# Channel Partner, then the results will contain only that Channel Partner.
|
989
|
+
|
990
|
+
require 'ultracart_api'
|
991
|
+
require_relative '../constants'
|
992
|
+
|
993
|
+
channel_partner_api = UltracartClient::ChannelPartnerApi.new_using_api_key(Constants::CHANNEL_PARTNER_API_KEY)
|
994
|
+
api_response = channel_partner_api.get_channel_partners
|
995
|
+
|
996
|
+
if api_response.error
|
997
|
+
STDERR.puts api_response.error.developer_message
|
998
|
+
STDERR.puts api_response.error.user_message
|
999
|
+
exit
|
1000
|
+
end
|
1001
|
+
|
1002
|
+
channel_partners = api_response.channel_partners
|
1003
|
+
|
1004
|
+
channel_partners.each do |channel_partner|
|
1005
|
+
p channel_partner
|
1006
|
+
end
|
1007
|
+
```
|
1008
|
+
|
1009
|
+
|
1010
|
+
#### Using the get_channel_partners_with_http_info variant
|
1011
|
+
|
1012
|
+
This returns an Array which contains the response data, status code and headers.
|
1013
|
+
|
1014
|
+
> <Array(<ChannelPartnersResponse>, Integer, Hash)> get_channel_partners_with_http_info
|
1015
|
+
|
1016
|
+
```ruby
|
1017
|
+
begin
|
1018
|
+
# Retrieve the channel partners configured on the account.
|
1019
|
+
data, status_code, headers = api_instance.get_channel_partners_with_http_info
|
1020
|
+
p status_code # => 2xx
|
1021
|
+
p headers # => { ... }
|
1022
|
+
p data # => <ChannelPartnersResponse>
|
1023
|
+
rescue UltracartClient::ApiError => e
|
1024
|
+
puts "Error when calling ChannelPartnerApi->get_channel_partners_with_http_info: #{e}"
|
1025
|
+
end
|
1026
|
+
```
|
1027
|
+
|
1028
|
+
### Parameters
|
1029
|
+
|
1030
|
+
This endpoint does not need any parameter.
|
1031
|
+
|
1032
|
+
### Return type
|
1033
|
+
|
1034
|
+
[**ChannelPartnersResponse**](ChannelPartnersResponse.md)
|
1035
|
+
|
1036
|
+
### Authorization
|
1037
|
+
|
1038
|
+
[ultraCartOauth](../README.md#ultraCartOauth), [ultraCartSimpleApiKey](../README.md#ultraCartSimpleApiKey)
|
1039
|
+
|
1040
|
+
### HTTP request headers
|
1041
|
+
|
1042
|
+
- **Content-Type**: Not defined
|
1043
|
+
- **Accept**: application/json
|
1044
|
+
|
1045
|
+
|
1046
|
+
## import_channel_partner_order
|
1047
|
+
|
1048
|
+
> <ChannelPartnerImportResponse> import_channel_partner_order(channel_partner_order)
|
1049
|
+
|
1050
|
+
Insert channel partner order
|
1051
|
+
|
1052
|
+
Insert order from a channel partner.
|
1053
|
+
|
1054
|
+
|
1055
|
+
### Examples
|
1056
|
+
|
1057
|
+
```ruby
|
1058
|
+
# To run channel partner examples, you will need:
|
1059
|
+
# 1) An API Key: https://secure.ultracart.com/merchant/configuration/apiManagementApp.do
|
1060
|
+
# 2) That API Key must be assigned to a channel partner: https://secure.ultracart.com/merchant/configuration/customChannelPartnerListLoad.do
|
1061
|
+
#
|
1062
|
+
# The spreadsheet import docs will serve you well here. They describe many fields
|
1063
|
+
# https://ultracart.atlassian.net/wiki/spaces/ucdoc/pages/1377246/Channel+Partner+API+-+Spreadsheet+Import
|
1064
|
+
|
1065
|
+
require 'ultracart_api'
|
1066
|
+
require_relative '../constants'
|
1067
|
+
|
1068
|
+
channel_partner_api = UltracartClient::ChannelPartnerApi.new_using_api_key(Constants::CHANNEL_PARTNER_API_KEY)
|
1069
|
+
|
1070
|
+
# NOTICE:
|
1071
|
+
# The real difficulty with using this API is the hosted fields requirement for credit card information.
|
1072
|
+
# You will need to incorporate UltraCart hosted fields in your Customer Service UI and capture credit card
|
1073
|
+
# information through the hosted fields and then provide the tokens here. You CANNOT provide raw credit
|
1074
|
+
# card information via this interface.
|
1075
|
+
# The two fields in this API are hostedFieldsCardToken and hostedFieldsCvvToken
|
1076
|
+
# Within this sdk_samples github project, review the /hosted_fields/hosted_fields.html file for an example
|
1077
|
+
|
1078
|
+
# ---------------------------------------------
|
1079
|
+
# ---------------------------------------------
|
1080
|
+
# Example 1 - Order needs payment processing
|
1081
|
+
# ---------------------------------------------
|
1082
|
+
# ---------------------------------------------
|
1083
|
+
|
1084
|
+
order = UltracartClient::ChannelPartnerOrder.new
|
1085
|
+
|
1086
|
+
# order.advertising_source = "Friend" # https://ultracart.atlassian.net/wiki/spaces/ucdoc/pages/1377001/Advertising+Sources
|
1087
|
+
# order.affiliate_id = 856234 # https://ultracart.atlassian.net/wiki/spaces/ucdoc/pages/1377727/Affiliates
|
1088
|
+
# order.affiliate_sub_id = 1234 # https://ultracart.atlassian.net/wiki/spaces/ucdoc/pages/1376754/Allowing+Affiliates+to+use+Sub-IDs
|
1089
|
+
# order.arbitrary_shipping_handling_total = 9.99
|
1090
|
+
# order.arbitrary_tax = 2.50
|
1091
|
+
# order.arbitrary_tax_rate = 7.0
|
1092
|
+
# order.arbitrary_taxable_subtotal = 69.99
|
1093
|
+
|
1094
|
+
order.associate_with_customer_profile_if_present = true
|
1095
|
+
order.auto_approve_purchase_order = true
|
1096
|
+
order.billto_address1 = "11460 Johns Creek Parkway"
|
1097
|
+
order.billto_address2 = "Suite 101"
|
1098
|
+
order.billto_city = "Duluth"
|
1099
|
+
order.billto_company = "Widgets Inc"
|
1100
|
+
order.billto_country_code = "US"
|
1101
|
+
order.billto_day_phone = "6784153823"
|
1102
|
+
order.billto_evening_phone = "6784154019"
|
1103
|
+
order.billto_first_name = "John"
|
1104
|
+
order.billto_last_name = "Smith"
|
1105
|
+
order.billto_postal_code = "30097"
|
1106
|
+
order.billto_state_region = "GA"
|
1107
|
+
order.billto_title = "Sir"
|
1108
|
+
order.cc_email = "orders@widgets.com"
|
1109
|
+
order.channel_partner_order_id = "widget-1245-abc"
|
1110
|
+
order.consider_recurring = false
|
1111
|
+
order.coupons = ["10OFF", "BUY1GET1"]
|
1112
|
+
|
1113
|
+
order.credit_card_expiration_month = 5
|
1114
|
+
order.credit_card_expiration_year = 2032
|
1115
|
+
order.credit_card_type = "VISA" # see the hosted fields below for the card number and cvv tokens
|
1116
|
+
order.custom_field1 = "Whatever"
|
1117
|
+
order.custom_field2 = "You"
|
1118
|
+
order.custom_field3 = "Want"
|
1119
|
+
order.custom_field4 = "Can"
|
1120
|
+
order.custom_field5 = "Go"
|
1121
|
+
order.custom_field6 = "In"
|
1122
|
+
order.custom_field7 = "CustomFields"
|
1123
|
+
order.delivery_date = Time.now.strftime('%Y-%m-%dT00:00:00+00:00')
|
1124
|
+
order.email = "ceo@widgets.com"
|
1125
|
+
order.gift = false
|
1126
|
+
|
1127
|
+
order.gift_email = "sally@aol.com"
|
1128
|
+
order.gift_message = "Congratulations on your promotion!"
|
1129
|
+
|
1130
|
+
order.hosted_fields_card_token = "7C97B0AAA26AB10180B4B29F00380101"
|
1131
|
+
order.hosted_fields_cvv_token = "C684AB4336787F0180B4B51971380101"
|
1132
|
+
|
1133
|
+
order.ip_address = "34.125.95.217"
|
1134
|
+
|
1135
|
+
# -- Items start ---
|
1136
|
+
item = UltracartClient::ChannelPartnerOrderItem.new
|
1137
|
+
# item.arbitrary_unit_cost = 9.99
|
1138
|
+
# item.auto_order_last_rebill_dts = Time.now.strftime('%Y-%m-%dT00:00:00+00:00')
|
1139
|
+
# item.auto_order_schedule = "Weekly"
|
1140
|
+
|
1141
|
+
item.merchant_item_id = "shirt"
|
1142
|
+
item.quantity = 1
|
1143
|
+
item.upsell = false
|
1144
|
+
|
1145
|
+
item_option1 = UltracartClient::ChannelPartnerOrderItemOption.new
|
1146
|
+
item_option1.name = "Size"
|
1147
|
+
item_option1.value = "Small"
|
1148
|
+
|
1149
|
+
item_option2 = UltracartClient::ChannelPartnerOrderItemOption.new
|
1150
|
+
item_option2.name = "Color"
|
1151
|
+
item_option2.value = "Orange"
|
1152
|
+
|
1153
|
+
item.options = [item_option1, item_option2]
|
1154
|
+
|
1155
|
+
order.items = [item]
|
1156
|
+
# -- Items End ---
|
1157
|
+
|
1158
|
+
order.least_cost_route = true # Give me the lowest cost shipping
|
1159
|
+
order.least_cost_route_shipping_methods = ["FedEx: Ground", "UPS: Ground", "USPS: Priority"]
|
1160
|
+
order.mailing_list_opt_in = true # Yes, I confirmed with the customer personally they wish to be on my mailing lists.
|
1161
|
+
order.no_realtime_payment_processing = false
|
1162
|
+
order.payment_method = "Credit Card"
|
1163
|
+
order.rotating_transaction_gateway_code = "MyStripe" # We wish this to be charged against our Stripe gateway
|
1164
|
+
order.screen_branding_theme_code = "SF1986" # Theme codes predated StoreFronts. Each StoreFront still has a theme code under the hood
|
1165
|
+
order.ship_on_date = Time.now.strftime('%Y-%m-%dT00:00:00+00:00')
|
1166
|
+
order.ship_to_residential = true
|
1167
|
+
order.shipto_address1 = "55 Main Street"
|
1168
|
+
order.shipto_address2 = "Suite 202"
|
1169
|
+
order.shipto_city = "Duluth"
|
1170
|
+
order.shipto_company = "Widgets Inc"
|
1171
|
+
order.shipto_country_code = "US"
|
1172
|
+
order.shipto_day_phone = "6785552323"
|
1173
|
+
order.shipto_evening_phone = "7703334444"
|
1174
|
+
order.shipto_first_name = "Sally"
|
1175
|
+
order.shipto_last_name = "McGonkyDee"
|
1176
|
+
order.shipto_postal_code = "30097"
|
1177
|
+
order.shipto_state_region = "GA"
|
1178
|
+
order.shipto_title = "Director"
|
1179
|
+
order.skip_payment_processing = false
|
1180
|
+
order.special_instructions = "Please wrap this in bubble wrap because my FedEx delivery guy is abusive to packages"
|
1181
|
+
order.store_completed = false # this will bypass everything, including shipping. useful only for importing old orders long completed
|
1182
|
+
order.storefront_host_name = 'store.mysite.com'
|
1183
|
+
order.store_if_payment_declines = false # if payment fails, this can send it to Accounts Receivable. Do not want that. Fail if payment fails.
|
1184
|
+
order.tax_county = "Gwinnett"
|
1185
|
+
order.tax_exempt = false
|
1186
|
+
|
1187
|
+
order_transaction = UltracartClient::ChannelPartnerOrderTransaction.new
|
1188
|
+
order_transaction.successful = false # we haven't charged the card yet, so this is false
|
1189
|
+
order_transaction.details = [] # we haven't charged the card yet, so this is empty
|
1190
|
+
order.transaction = order_transaction
|
1191
|
+
order.treat_warnings_as_errors = true
|
1192
|
+
|
1193
|
+
api_response = channel_partner_api.import_channel_partner_order(order)
|
1194
|
+
|
1195
|
+
# ---------------------------------------------
|
1196
|
+
# ---------------------------------------------
|
1197
|
+
# Example 2 - Order already processed
|
1198
|
+
# ---------------------------------------------
|
1199
|
+
# ---------------------------------------------
|
1200
|
+
|
1201
|
+
order = UltracartClient::ChannelPartnerOrder.new
|
1202
|
+
|
1203
|
+
order.associate_with_customer_profile_if_present = true
|
1204
|
+
order.auto_approve_purchase_order = true
|
1205
|
+
order.billto_address1 = "11460 Johns Creek Parkway"
|
1206
|
+
order.billto_address2 = "Suite 101"
|
1207
|
+
order.billto_city = "Duluth"
|
1208
|
+
order.billto_company = "Widgets Inc"
|
1209
|
+
order.billto_country_code = "US"
|
1210
|
+
order.billto_day_phone = "6784153823"
|
1211
|
+
order.billto_evening_phone = "6784154019"
|
1212
|
+
order.billto_first_name = "John"
|
1213
|
+
order.billto_last_name = "Smith"
|
1214
|
+
order.billto_postal_code = "30097"
|
1215
|
+
order.billto_state_region = "GA"
|
1216
|
+
order.billto_title = "Sir"
|
1217
|
+
order.cc_email = "orders@widgets.com"
|
1218
|
+
order.channel_partner_order_id = "widget-1245-abc"
|
1219
|
+
order.consider_recurring = false
|
1220
|
+
order.coupons = ["10OFF", "BUY1GET1"]
|
1221
|
+
|
1222
|
+
order.credit_card_expiration_month = 5
|
1223
|
+
order.credit_card_expiration_year = 2032
|
1224
|
+
order.credit_card_type = "VISA"
|
1225
|
+
order.custom_field1 = "Whatever"
|
1226
|
+
order.custom_field2 = "You"
|
1227
|
+
order.custom_field3 = "Want"
|
1228
|
+
order.custom_field4 = "Can"
|
1229
|
+
order.custom_field5 = "Go"
|
1230
|
+
order.custom_field6 = "In"
|
1231
|
+
order.custom_field7 = "CustomFields"
|
1232
|
+
order.delivery_date = Time.now.strftime('%Y-%m-%dT00:00:00+00:00')
|
1233
|
+
order.email = "ceo@widgets.com"
|
1234
|
+
order.gift = false
|
1235
|
+
|
1236
|
+
order.gift_email = "sally@aol.com"
|
1237
|
+
order.gift_message = "Congratulations on your promotion!"
|
1238
|
+
|
1239
|
+
order.ip_address = "34.125.95.217"
|
1240
|
+
|
1241
|
+
# -- Items start ---
|
1242
|
+
item = UltracartClient::ChannelPartnerOrderItem.new
|
1243
|
+
|
1244
|
+
item.merchant_item_id = "shirt"
|
1245
|
+
item.quantity = 1
|
1246
|
+
item.upsell = false
|
1247
|
+
|
1248
|
+
item_option1 = UltracartClient::ChannelPartnerOrderItemOption.new
|
1249
|
+
item_option1.name = "Size"
|
1250
|
+
item_option1.value = "Small"
|
1251
|
+
|
1252
|
+
item_option2 = UltracartClient::ChannelPartnerOrderItemOption.new
|
1253
|
+
item_option2.name = "Color"
|
1254
|
+
item_option2.value = "Orange"
|
1255
|
+
|
1256
|
+
item.options = [item_option1, item_option2]
|
1257
|
+
|
1258
|
+
order.items = [item]
|
1259
|
+
# -- Items End ---
|
1260
|
+
|
1261
|
+
order.mailing_list_opt_in = true # Yes, I confirmed with the customer personally they wish to be on my mailing lists.
|
1262
|
+
order.no_realtime_payment_processing = true # nothing to charge, payment was already collected
|
1263
|
+
order.payment_method = "Credit Card"
|
1264
|
+
order.rotating_transaction_gateway_code = "MyStripe" # We wish this to be charged against our Stripe gateway
|
1265
|
+
order.screen_branding_theme_code = "SF1986" # Theme codes predated StoreFronts. Each StoreFront still has a theme code under the hood
|
1266
|
+
order.ship_on_date = Time.now.strftime('%Y-%m-%dT00:00:00+00:00')
|
1267
|
+
order.ship_to_residential = true
|
1268
|
+
order.shipping_method = "FedEx: Ground"
|
1269
|
+
order.shipto_address1 = "55 Main Street"
|
1270
|
+
order.shipto_address2 = "Suite 202"
|
1271
|
+
order.shipto_city = "Duluth"
|
1272
|
+
order.shipto_company = "Widgets Inc"
|
1273
|
+
order.shipto_country_code = "US"
|
1274
|
+
order.shipto_day_phone = "6785552323"
|
1275
|
+
order.shipto_evening_phone = "7703334444"
|
1276
|
+
order.shipto_first_name = "Sally"
|
1277
|
+
order.shipto_last_name = "McGonkyDee"
|
1278
|
+
order.shipto_postal_code = "30097"
|
1279
|
+
order.shipto_state_region = "GA"
|
1280
|
+
order.shipto_title = "Director"
|
1281
|
+
order.skip_payment_processing = true # bypass payment
|
1282
|
+
order.special_instructions = "Please wrap this in bubble wrap because my FedEx delivery guy is abusive to packages"
|
1283
|
+
order.store_completed = true # this is an old order or an order handled completely outside UltraCart, so do not do anything to it. Just store it.
|
1284
|
+
order.storefront_host_name = 'store.mysite.com'
|
1285
|
+
order.store_if_payment_declines = false # if payment fails, this can send it to Accounts Receivable. Do not want that. Fail if payment fails.
|
1286
|
+
order.tax_county = "Gwinnett"
|
1287
|
+
order.tax_exempt = false
|
1288
|
+
|
1289
|
+
order_transaction = UltracartClient::ChannelPartnerOrderTransaction.new
|
1290
|
+
order_transaction.successful = true
|
1291
|
+
|
1292
|
+
td1 = UltracartClient::ChannelPartnerOrderTransactionDetail.new
|
1293
|
+
td1.name = "AVS Code"
|
1294
|
+
td1.value = "X"
|
1295
|
+
|
1296
|
+
td2 = UltracartClient::ChannelPartnerOrderTransactionDetail.new
|
1297
|
+
td2.name = "Authorization Code"
|
1298
|
+
td2.value = "123456"
|
1299
|
+
|
1300
|
+
td3 = UltracartClient::ChannelPartnerOrderTransactionDetail.new
|
1301
|
+
td3.name = "CVV Code"
|
1302
|
+
td3.value = "M"
|
1303
|
+
|
1304
|
+
td4 = UltracartClient::ChannelPartnerOrderTransactionDetail.new
|
1305
|
+
td4.name = "Response Code"
|
1306
|
+
td4.value = "Authorized"
|
1307
|
+
|
1308
|
+
td5 = UltracartClient::ChannelPartnerOrderTransactionDetail.new
|
1309
|
+
td5.name = "Reason Code"
|
1310
|
+
td5.value = "1"
|
1311
|
+
|
1312
|
+
td6 = UltracartClient::ChannelPartnerOrderTransactionDetail.new
|
1313
|
+
td6.name = "Response Subcode"
|
1314
|
+
td6.value = "1"
|
1315
|
+
|
1316
|
+
td7 = UltracartClient::ChannelPartnerOrderTransactionDetail.new
|
1317
|
+
td7.name = "Transaction ID"
|
1318
|
+
td7.value = "1234567890"
|
1319
|
+
|
1320
|
+
order_transaction.details = [td1, td2, td3, td4, td5, td6, td7]
|
1321
|
+
order.transaction = order_transaction
|
1322
|
+
order.treat_warnings_as_errors = true
|
1323
|
+
|
1324
|
+
api_response = channel_partner_api.import_channel_partner_order(order)
|
1325
|
+
```
|
1326
|
+
|
1327
|
+
|
1328
|
+
#### Using the import_channel_partner_order_with_http_info variant
|
1329
|
+
|
1330
|
+
This returns an Array which contains the response data, status code and headers.
|
1331
|
+
|
1332
|
+
> <Array(<ChannelPartnerImportResponse>, Integer, Hash)> import_channel_partner_order_with_http_info(channel_partner_order)
|
1333
|
+
|
1334
|
+
```ruby
|
1335
|
+
begin
|
1336
|
+
# Insert channel partner order
|
1337
|
+
data, status_code, headers = api_instance.import_channel_partner_order_with_http_info(channel_partner_order)
|
1338
|
+
p status_code # => 2xx
|
1339
|
+
p headers # => { ... }
|
1340
|
+
p data # => <ChannelPartnerImportResponse>
|
1341
|
+
rescue UltracartClient::ApiError => e
|
1342
|
+
puts "Error when calling ChannelPartnerApi->import_channel_partner_order_with_http_info: #{e}"
|
1343
|
+
end
|
1344
|
+
```
|
1345
|
+
|
1346
|
+
### Parameters
|
1347
|
+
|
1348
|
+
| Name | Type | Description | Notes |
|
1349
|
+
| ---- | ---- | ----------- | ----- |
|
1350
|
+
| **channel_partner_order** | [**ChannelPartnerOrder**](ChannelPartnerOrder.md) | Order to insert | |
|
1351
|
+
|
1352
|
+
### Return type
|
1353
|
+
|
1354
|
+
[**ChannelPartnerImportResponse**](ChannelPartnerImportResponse.md)
|
1355
|
+
|
1356
|
+
### Authorization
|
1357
|
+
|
1358
|
+
[ultraCartOauth](../README.md#ultraCartOauth), [ultraCartSimpleApiKey](../README.md#ultraCartSimpleApiKey)
|
1359
|
+
|
1360
|
+
### HTTP request headers
|
1361
|
+
|
1362
|
+
- **Content-Type**: application/json; charset=UTF-8
|
1363
|
+
- **Accept**: application/json
|
1364
|
+
|
1365
|
+
|
1366
|
+
## insert_channel_partner_ship_to_preference
|
1367
|
+
|
1368
|
+
> <ChannelPartnerShipToPreferenceResponse> insert_channel_partner_ship_to_preference(channel_partner_oid, ship_to_preference)
|
1369
|
+
|
1370
|
+
Insert a ship to preference record for the channel partner.
|
1371
|
+
|
1372
|
+
Insert a ship to preference record for the channel partner.
|
1373
|
+
|
1374
|
+
|
1375
|
+
### Examples
|
1376
|
+
|
1377
|
+
```ruby
|
1378
|
+
# Inserts a channel partner shipto preference for a channel partner.
|
1379
|
+
# These preferences are used by EDI channel partners to automatically
|
1380
|
+
# apply return policies and add additional free items to EDI orders based on the EDI code that is present.
|
1381
|
+
#
|
1382
|
+
# Possible Errors:
|
1383
|
+
# Attempting to interact with a channel partner other than the one tied to your API Key:
|
1384
|
+
# "Invalid channel_partner_oid specified. Your REST API key may only interact with channel_partner_oid: 12345"
|
1385
|
+
# Supplying a bad channel partner oid: "Invalid channel_partner_oid specified."
|
1386
|
+
|
1387
|
+
require 'ultracart_api'
|
1388
|
+
require_relative '../constants'
|
1389
|
+
|
1390
|
+
channel_partner_api = UltracartClient::ChannelPartnerApi.new_using_api_key(Constants::CHANNEL_PARTNER_API_KEY)
|
1391
|
+
channel_partner_oid = 12345
|
1392
|
+
|
1393
|
+
preference = UltracartClient::ChannelPartnerShipToPreference.new
|
1394
|
+
preference.channel_partner_oid = channel_partner_oid
|
1395
|
+
preference.ship_to_edi_code = 'EDI_CODE_HERE'
|
1396
|
+
preference.return_policy = "This is some return policy text that will be printed on the packing slip."
|
1397
|
+
preference.additional_kit_component_item_ids = ['ITEM_ID1', 'ITEM_ID2', 'ITEM_ID3']
|
1398
|
+
preference.description = "This is a merchant friendly description to help me remember what the above setting are."
|
1399
|
+
|
1400
|
+
api_response = channel_partner_api.insert_channel_partner_ship_to_preference(channel_partner_oid, preference)
|
1401
|
+
|
1402
|
+
if api_response.error
|
1403
|
+
STDERR.puts api_response.error.developer_message
|
1404
|
+
STDERR.puts api_response.error.user_message
|
1405
|
+
exit
|
1406
|
+
end
|
1407
|
+
|
1408
|
+
inserted_preference = api_response.ship_to_preference
|
1409
|
+
|
1410
|
+
# This should equal what you submitted.
|
1411
|
+
p inserted_preference
|
1412
|
+
```
|
1413
|
+
|
1414
|
+
|
1415
|
+
#### Using the insert_channel_partner_ship_to_preference_with_http_info variant
|
1416
|
+
|
1417
|
+
This returns an Array which contains the response data, status code and headers.
|
1418
|
+
|
1419
|
+
> <Array(<ChannelPartnerShipToPreferenceResponse>, Integer, Hash)> insert_channel_partner_ship_to_preference_with_http_info(channel_partner_oid, ship_to_preference)
|
1420
|
+
|
1421
|
+
```ruby
|
1422
|
+
begin
|
1423
|
+
# Insert a ship to preference record for the channel partner.
|
1424
|
+
data, status_code, headers = api_instance.insert_channel_partner_ship_to_preference_with_http_info(channel_partner_oid, ship_to_preference)
|
1425
|
+
p status_code # => 2xx
|
1426
|
+
p headers # => { ... }
|
1427
|
+
p data # => <ChannelPartnerShipToPreferenceResponse>
|
1428
|
+
rescue UltracartClient::ApiError => e
|
1429
|
+
puts "Error when calling ChannelPartnerApi->insert_channel_partner_ship_to_preference_with_http_info: #{e}"
|
1430
|
+
end
|
1431
|
+
```
|
1432
|
+
|
1433
|
+
### Parameters
|
1434
|
+
|
1435
|
+
| Name | Type | Description | Notes |
|
1436
|
+
| ---- | ---- | ----------- | ----- |
|
1437
|
+
| **channel_partner_oid** | **Integer** | | |
|
1438
|
+
| **ship_to_preference** | [**ChannelPartnerShipToPreference**](ChannelPartnerShipToPreference.md) | Ship to preference to create | |
|
1439
|
+
|
1440
|
+
### Return type
|
1441
|
+
|
1442
|
+
[**ChannelPartnerShipToPreferenceResponse**](ChannelPartnerShipToPreferenceResponse.md)
|
1443
|
+
|
1444
|
+
### Authorization
|
1445
|
+
|
1446
|
+
[ultraCartOauth](../README.md#ultraCartOauth), [ultraCartSimpleApiKey](../README.md#ultraCartSimpleApiKey)
|
1447
|
+
|
1448
|
+
### HTTP request headers
|
1449
|
+
|
1450
|
+
- **Content-Type**: application/json
|
1451
|
+
- **Accept**: application/json
|
1452
|
+
|
1453
|
+
|
1454
|
+
## refund_channel_partner_order
|
1455
|
+
|
1456
|
+
> <OrderResponse> refund_channel_partner_order(order_id, order, opts)
|
1457
|
+
|
1458
|
+
Refund a channel partner order
|
1459
|
+
|
1460
|
+
Perform a refund operation on a channel partner order and then update the order if successful. All of the object properties ending in _refunded should be the TOTAL amount that should end up being refunded. UltraCart will calculate the actual amount to refund based upon the prior refunds.
|
1461
|
+
|
1462
|
+
|
1463
|
+
### Examples
|
1464
|
+
|
1465
|
+
```ruby
|
1466
|
+
# IMPORTANT: Do NOT construct the refunded order. This method does a refund but also update the entire object, so start with an order query.
|
1467
|
+
# ALWAYS start with an order retrieved from the system.
|
1468
|
+
# 1. Call getChannelPartnerOrder or getChannelPartnerOrderByChannelPartnerOrderId to retrieve the order being refunded
|
1469
|
+
# 2. For a full refund, reverse the following:
|
1470
|
+
# A. Set the refunded qty and refunded amount for each item.
|
1471
|
+
# B. Set the refunded tax (if any)
|
1472
|
+
# C. Set the refunded shipping
|
1473
|
+
# NOTE: refund amounts are positive numbers. If any item total cost is $20.00, a full refunded amount would also be positive $20.00
|
1474
|
+
# See the ChannelPartnerApi.getChannelPartnerOrder() sample for details on that method.
|
1475
|
+
|
1476
|
+
require 'ultracart_api'
|
1477
|
+
require_relative '../constants'
|
1478
|
+
|
1479
|
+
channel_partner_api = UltracartClient::ChannelPartnerApi.new_using_api_key(Constants::CHANNEL_PARTNER_API_KEY)
|
1480
|
+
# for a comment on this expansion, see getChannelPartnerOrder sample.
|
1481
|
+
expansion = "item,summary,shipping"
|
1482
|
+
|
1483
|
+
# This order MUST be an order associated with this channel partner, or you will receive a 400 Bad Request.
|
1484
|
+
order_id = 'DEMO-0009106820'
|
1485
|
+
api_response = channel_partner_api.get_channel_partner_order(order_id, _expand: expansion)
|
1486
|
+
|
1487
|
+
if api_response.error
|
1488
|
+
STDERR.puts api_response.error.developer_message
|
1489
|
+
STDERR.puts api_response.error.user_message
|
1490
|
+
exit
|
1491
|
+
end
|
1492
|
+
|
1493
|
+
order = api_response.order
|
1494
|
+
|
1495
|
+
# RefundReason may be required, but is optional by default.
|
1496
|
+
# RefundReason may be a set list, or may be freeform. This is configured on the backend (secure.ultracart.com)
|
1497
|
+
# by Navigating to Home -> Configuration -> Order Management -> Refund/Reject Reasons
|
1498
|
+
# Warning: If this is a 2nd refund after an initial partial refund, be sure you account for the units and amount already refunded.
|
1499
|
+
order.refund_reason = 'Damage Product'
|
1500
|
+
order.summary.tax_refunded = order.summary.tax_refunded
|
1501
|
+
order.summary.shipping_handling_refunded = order.summary.shipping_handling_total
|
1502
|
+
|
1503
|
+
order.items.each do |item|
|
1504
|
+
# item level refund reasons are optional, but may be required. See the above breadcrumb trail for refund reason config.
|
1505
|
+
item.refund_reason = 'DifferentItem'
|
1506
|
+
item.quantity_refunded = item.quantity
|
1507
|
+
item.total_refunded = item.total_cost_with_discount
|
1508
|
+
end
|
1509
|
+
|
1510
|
+
reject_after_refund = false
|
1511
|
+
skip_customer_notifications = true
|
1512
|
+
auto_order_cancel = false # if this was an auto order, and they wanted to cancel it, set this flag to true.
|
1513
|
+
# set manual_refund to true if the actual refund happened outside the system, and you just want a record of it.
|
1514
|
+
# If UltraCart did not process this refund, manual_refund should be true.
|
1515
|
+
manual_refund = false
|
1516
|
+
reverse_affiliate_transactions = true # for a full refund, the affiliate should not get credit, or should they?
|
1517
|
+
issue_store_credit = false # if true, the customer would receive store credit instead of a return on their credit card.
|
1518
|
+
auto_order_cancel_reason = nil
|
1519
|
+
|
1520
|
+
api_response = channel_partner_api.refund_channel_partner_order(order_id, order,
|
1521
|
+
reject_after_refund: reject_after_refund,
|
1522
|
+
skip_customer_notifications: skip_customer_notifications,
|
1523
|
+
auto_order_cancel: auto_order_cancel,
|
1524
|
+
manual_refund: manual_refund,
|
1525
|
+
reverse_affiliate_transactions: reverse_affiliate_transactions,
|
1526
|
+
issue_store_credit: issue_store_credit,
|
1527
|
+
auto_order_cancel_reason: auto_order_cancel_reason,
|
1528
|
+
_expand: expansion)
|
1529
|
+
|
1530
|
+
error = api_response.error
|
1531
|
+
updated_order = api_response.order
|
1532
|
+
# verify the updated order contains all the desired refunds. verify that refunded total is equal to total.
|
1533
|
+
|
1534
|
+
# Note: The error 'Request to refund an invalid amount.' means you requested a total refund amount less than or equal to zero.
|
1535
|
+
p error
|
1536
|
+
puts "\n\n-----------------\n\n"
|
1537
|
+
p updated_order
|
1538
|
+
```
|
1539
|
+
|
1540
|
+
|
1541
|
+
#### Using the refund_channel_partner_order_with_http_info variant
|
1542
|
+
|
1543
|
+
This returns an Array which contains the response data, status code and headers.
|
1544
|
+
|
1545
|
+
> <Array(<OrderResponse>, Integer, Hash)> refund_channel_partner_order_with_http_info(order_id, order, opts)
|
1546
|
+
|
1547
|
+
```ruby
|
1548
|
+
begin
|
1549
|
+
# Refund a channel partner order
|
1550
|
+
data, status_code, headers = api_instance.refund_channel_partner_order_with_http_info(order_id, order, opts)
|
1551
|
+
p status_code # => 2xx
|
1552
|
+
p headers # => { ... }
|
1553
|
+
p data # => <OrderResponse>
|
1554
|
+
rescue UltracartClient::ApiError => e
|
1555
|
+
puts "Error when calling ChannelPartnerApi->refund_channel_partner_order_with_http_info: #{e}"
|
1556
|
+
end
|
1557
|
+
```
|
1558
|
+
|
1559
|
+
### Parameters
|
1560
|
+
|
1561
|
+
| Name | Type | Description | Notes |
|
1562
|
+
| ---- | ---- | ----------- | ----- |
|
1563
|
+
| **order_id** | **String** | The order id to refund. | |
|
1564
|
+
| **order** | [**Order**](Order.md) | Order to refund | |
|
1565
|
+
| **reject_after_refund** | **Boolean** | Reject order after refund | [optional][default to false] |
|
1566
|
+
| **skip_customer_notification** | **Boolean** | Skip customer email notification | [optional][default to false] |
|
1567
|
+
| **auto_order_cancel** | **Boolean** | Cancel associated auto orders | [optional][default to false] |
|
1568
|
+
| **manual_refund** | **Boolean** | Consider a manual refund done externally | [optional][default to false] |
|
1569
|
+
| **reverse_affiliate_transactions** | **Boolean** | Reverse affiliate transactions | [optional][default to true] |
|
1570
|
+
| **issue_store_credit** | **Boolean** | Issue a store credit instead of refunding the original payment method, loyalty must be configured on merchant account | [optional][default to false] |
|
1571
|
+
| **auto_order_cancel_reason** | **String** | Reason for auto orders cancellation | [optional] |
|
1572
|
+
| **_expand** | **String** | The object expansion to perform on the result. See OrderApi.refundOrder documentation for examples | [optional] |
|
1573
|
+
|
1574
|
+
### Return type
|
1575
|
+
|
1576
|
+
[**OrderResponse**](OrderResponse.md)
|
1577
|
+
|
1578
|
+
### Authorization
|
1579
|
+
|
1580
|
+
[ultraCartOauth](../README.md#ultraCartOauth), [ultraCartSimpleApiKey](../README.md#ultraCartSimpleApiKey)
|
1581
|
+
|
1582
|
+
### HTTP request headers
|
1583
|
+
|
1584
|
+
- **Content-Type**: application/json; charset=UTF-8
|
1585
|
+
- **Accept**: application/json
|
1586
|
+
|
1587
|
+
|
1588
|
+
## update_channel_partner_ship_to_preference
|
1589
|
+
|
1590
|
+
> <ChannelPartnerShipToPreferenceResponse> update_channel_partner_ship_to_preference(channel_partner_oid, channel_partner_ship_to_preference_oid, ship_to_preference)
|
1591
|
+
|
1592
|
+
Update a ship to preference record for the channel partner.
|
1593
|
+
|
1594
|
+
Update a ship to preference record for the channel partner.
|
1595
|
+
|
1596
|
+
|
1597
|
+
### Examples
|
1598
|
+
|
1599
|
+
```ruby
|
1600
|
+
# Updates a channel partner shipto preference for a channel partner.
|
1601
|
+
# These preferences are used by EDI channel partners to automatically
|
1602
|
+
# apply return policies and add additional free items to EDI orders based on the EDI code that is present.
|
1603
|
+
#
|
1604
|
+
# Possible Errors:
|
1605
|
+
# Attempting to interact with a channel partner other than the one tied to your API Key:
|
1606
|
+
# "Invalid channel_partner_oid specified. Your REST API key may only interact with channel_partner_oid: 12345"
|
1607
|
+
# Supplying a bad channel partner oid: "Invalid channel_partner_oid specified."
|
1608
|
+
|
1609
|
+
require 'ultracart_api'
|
1610
|
+
require_relative '../constants'
|
1611
|
+
|
1612
|
+
channel_partner_api = UltracartClient::ChannelPartnerApi.new_using_api_key(Constants::CHANNEL_PARTNER_API_KEY)
|
1613
|
+
channel_partner_oid = 12345
|
1614
|
+
channel_partner_ship_to_preference_oid = 67890
|
1615
|
+
|
1616
|
+
api_response = channel_partner_api.get_channel_partner_ship_to_preference(channel_partner_oid, channel_partner_ship_to_preference_oid)
|
1617
|
+
|
1618
|
+
preference = api_response.ship_to_preference
|
1619
|
+
# Update some fields.
|
1620
|
+
preference.ship_to_edi_code = 'EDI_CODE_HERE'
|
1621
|
+
preference.return_policy = "This is some return policy text that will be printed on the packing slip."
|
1622
|
+
preference.additional_kit_component_item_ids = ['ITEM_ID1', 'ITEM_ID2', 'ITEM_ID3']
|
1623
|
+
preference.description = "This is a merchant friendly description to help me remember what the above setting are."
|
1624
|
+
|
1625
|
+
api_response = channel_partner_api.update_channel_partner_ship_to_preference(channel_partner_oid, channel_partner_ship_to_preference_oid, preference)
|
1626
|
+
|
1627
|
+
if api_response.error
|
1628
|
+
STDERR.puts api_response.error.developer_message
|
1629
|
+
STDERR.puts api_response.error.user_message
|
1630
|
+
exit
|
1631
|
+
end
|
1632
|
+
|
1633
|
+
updated_preference = api_response.ship_to_preference
|
1634
|
+
|
1635
|
+
# This should equal what you submitted.
|
1636
|
+
p updated_preference
|
1637
|
+
```
|
1638
|
+
|
1639
|
+
|
1640
|
+
#### Using the update_channel_partner_ship_to_preference_with_http_info variant
|
1641
|
+
|
1642
|
+
This returns an Array which contains the response data, status code and headers.
|
1643
|
+
|
1644
|
+
> <Array(<ChannelPartnerShipToPreferenceResponse>, Integer, Hash)> update_channel_partner_ship_to_preference_with_http_info(channel_partner_oid, channel_partner_ship_to_preference_oid, ship_to_preference)
|
1645
|
+
|
1646
|
+
```ruby
|
1647
|
+
begin
|
1648
|
+
# Update a ship to preference record for the channel partner.
|
1649
|
+
data, status_code, headers = api_instance.update_channel_partner_ship_to_preference_with_http_info(channel_partner_oid, channel_partner_ship_to_preference_oid, ship_to_preference)
|
1650
|
+
p status_code # => 2xx
|
1651
|
+
p headers # => { ... }
|
1652
|
+
p data # => <ChannelPartnerShipToPreferenceResponse>
|
1653
|
+
rescue UltracartClient::ApiError => e
|
1654
|
+
puts "Error when calling ChannelPartnerApi->update_channel_partner_ship_to_preference_with_http_info: #{e}"
|
1655
|
+
end
|
1656
|
+
```
|
1657
|
+
|
1658
|
+
### Parameters
|
1659
|
+
|
1660
|
+
| Name | Type | Description | Notes |
|
1661
|
+
| ---- | ---- | ----------- | ----- |
|
1662
|
+
| **channel_partner_oid** | **Integer** | | |
|
1663
|
+
| **channel_partner_ship_to_preference_oid** | **Integer** | | |
|
1664
|
+
| **ship_to_preference** | [**ChannelPartnerShipToPreference**](ChannelPartnerShipToPreference.md) | Ship to preference to create | |
|
1665
|
+
|
1666
|
+
### Return type
|
1667
|
+
|
1668
|
+
[**ChannelPartnerShipToPreferenceResponse**](ChannelPartnerShipToPreferenceResponse.md)
|
1669
|
+
|
1670
|
+
### Authorization
|
1671
|
+
|
1672
|
+
[ultraCartOauth](../README.md#ultraCartOauth), [ultraCartSimpleApiKey](../README.md#ultraCartSimpleApiKey)
|
1673
|
+
|
1674
|
+
### HTTP request headers
|
1675
|
+
|
1676
|
+
- **Content-Type**: application/json
|
1677
|
+
- **Accept**: application/json
|
1678
|
+
|