flowcommerce 0.2.51 → 0.2.52
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/flow_commerce/flow_api_v0_client.rb +1143 -78
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: fe1e133e2edce54d479cb65c93db8eb32fcb670e
|
4
|
+
data.tar.gz: c985d41f766c96be0eb1902fe9b0f35327a4e77c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 84869b9058acf51e59a325098e0e8162bbd97799d7e83855b085e028114234a86db4852fcc82b062b23c6af2dcc2cb3a3946ffb895f7a98b00f28896bfe74133
|
7
|
+
data.tar.gz: 6e1489693c47af1168884147c0126eda921a693fd9c0ee4bbd4e4f3716eec26c086d903813e847533e6c671014ea2480386bc148c60faad0d9f90680e41b05d4
|
@@ -1,6 +1,6 @@
|
|
1
1
|
# Generated by API Builder - https://www.apibuilder.io
|
2
2
|
# Service version: 0.4.50
|
3
|
-
# apibuilder:0.13.0 https://app.apibuilder.io/flow/api/0.4.
|
3
|
+
# apibuilder:0.13.0 https://app.apibuilder.io/flow/api/0.4.60/ruby_client
|
4
4
|
|
5
5
|
require 'cgi'
|
6
6
|
require 'net/http'
|
@@ -25,7 +25,7 @@ module Io
|
|
25
25
|
|
26
26
|
BASE_URL = 'https://api.flow.io' unless defined?(Constants::BASE_URL)
|
27
27
|
NAMESPACE = 'io.flow.v0' unless defined?(Constants::NAMESPACE)
|
28
|
-
USER_AGENT = 'apibuilder:0.13.0 https://app.apibuilder.io/flow/api/0.4.
|
28
|
+
USER_AGENT = 'apibuilder:0.13.0 https://app.apibuilder.io/flow/api/0.4.60/ruby_client' unless defined?(Constants::USER_AGENT)
|
29
29
|
VERSION = '0.4.50' unless defined?(Constants::VERSION)
|
30
30
|
VERSION_MAJOR = 0 unless defined?(VERSION_MAJOR)
|
31
31
|
|
@@ -76,6 +76,10 @@ module Io
|
|
76
76
|
@catalogs ||= ::Io::Flow::V0::Clients::Catalogs.new(self)
|
77
77
|
end
|
78
78
|
|
79
|
+
def checkout_item_contents
|
80
|
+
@checkout_item_contents ||= ::Io::Flow::V0::Clients::CheckoutItemContents.new(self)
|
81
|
+
end
|
82
|
+
|
79
83
|
def credit_payments
|
80
84
|
@credit_payments ||= ::Io::Flow::V0::Clients::CreditPayments.new(self)
|
81
85
|
end
|
@@ -96,6 +100,10 @@ module Io
|
|
96
100
|
@orders ||= ::Io::Flow::V0::Clients::Orders.new(self)
|
97
101
|
end
|
98
102
|
|
103
|
+
def order_builders
|
104
|
+
@order_builders ||= ::Io::Flow::V0::Clients::OrderBuilders.new(self)
|
105
|
+
end
|
106
|
+
|
99
107
|
def order_estimates
|
100
108
|
@order_estimates ||= ::Io::Flow::V0::Clients::OrderEstimates.new(self)
|
101
109
|
end
|
@@ -252,6 +260,10 @@ module Io
|
|
252
260
|
@quotes ||= ::Io::Flow::V0::Clients::Quotes.new(self)
|
253
261
|
end
|
254
262
|
|
263
|
+
def reservations
|
264
|
+
@reservations ||= ::Io::Flow::V0::Clients::Reservations.new(self)
|
265
|
+
end
|
266
|
+
|
255
267
|
def returns
|
256
268
|
@returns ||= ::Io::Flow::V0::Clients::Returns.new(self)
|
257
269
|
end
|
@@ -439,7 +451,7 @@ module Io
|
|
439
451
|
HttpClient::Preconditions.assert_class('organization', organization, String)
|
440
452
|
HttpClient::Preconditions.assert_class('number', number, String)
|
441
453
|
r = @client.request("/#{CGI.escape(organization)}/orders/allocations/#{CGI.escape(number)}").get
|
442
|
-
::Io::Flow::V0::Models::
|
454
|
+
::Io::Flow::V0::Models::AllocationV2.new(r)
|
443
455
|
end
|
444
456
|
|
445
457
|
end
|
@@ -459,7 +471,7 @@ module Io
|
|
459
471
|
:key => (x = opts.delete(:key); x.nil? ? nil : HttpClient::Preconditions.assert_class('key', x, Array).map { |v| HttpClient::Preconditions.assert_class('key', v, String) }),
|
460
472
|
:limit => HttpClient::Preconditions.assert_class('limit', (x = opts.delete(:limit); x.nil? ? 25 : x), Integer),
|
461
473
|
:offset => HttpClient::Preconditions.assert_class('offset', (x = opts.delete(:offset); x.nil? ? 0 : x), Integer),
|
462
|
-
:sort => HttpClient::Preconditions.assert_class('sort', (x = opts.delete(:sort); x.nil? ? "
|
474
|
+
:sort => HttpClient::Preconditions.assert_class('sort', (x = opts.delete(:sort); x.nil? ? "position" : x), String)
|
463
475
|
}.delete_if { |k, v| v.nil? }
|
464
476
|
r = @client.request("/#{CGI.escape(organization)}/attributes").with_query(query).get
|
465
477
|
r.map { |x| ::Io::Flow::V0::Models::Attribute.new(x) }
|
@@ -576,6 +588,30 @@ module Io
|
|
576
588
|
|
577
589
|
end
|
578
590
|
|
591
|
+
class CheckoutItemContents
|
592
|
+
|
593
|
+
def initialize(client)
|
594
|
+
@client = HttpClient::Preconditions.assert_class('client', client, ::Io::Flow::V0::Client)
|
595
|
+
end
|
596
|
+
|
597
|
+
# Returns a localized view of 1 or more items in the context of checkout,
|
598
|
+
# returning data specifically related to rendering a view of an item in a cart
|
599
|
+
# or checkout page.
|
600
|
+
def get_checkout(organization, experience_key, incoming={})
|
601
|
+
HttpClient::Preconditions.assert_class('organization', organization, String)
|
602
|
+
HttpClient::Preconditions.assert_class('experience_key', experience_key, String)
|
603
|
+
opts = HttpClient::Helper.symbolize_keys(incoming)
|
604
|
+
query = {
|
605
|
+
:number => (x = opts.delete(:number); x.nil? ? nil : HttpClient::Preconditions.assert_class('number', x, Array).map { |v| HttpClient::Preconditions.assert_class('number', v, String) }),
|
606
|
+
:limit => HttpClient::Preconditions.assert_class('limit', (x = opts.delete(:limit); x.nil? ? 25 : x), Integer),
|
607
|
+
:offset => HttpClient::Preconditions.assert_class('offset', (x = opts.delete(:offset); x.nil? ? 0 : x), Integer)
|
608
|
+
}.delete_if { |k, v| v.nil? }
|
609
|
+
r = @client.request("/#{CGI.escape(organization)}/experiences/#{CGI.escape(experience_key)}/item/content/checkout").with_query(query).get
|
610
|
+
r.map { |x| ::Io::Flow::V0::Models::CheckoutItemContent.new(x) }
|
611
|
+
end
|
612
|
+
|
613
|
+
end
|
614
|
+
|
579
615
|
class CreditPayments
|
580
616
|
|
581
617
|
def initialize(client)
|
@@ -804,6 +840,45 @@ module Io
|
|
804
840
|
r.map { |x| ::Io::Flow::V0::Models::PaymentMethodRule.new(x) }
|
805
841
|
end
|
806
842
|
|
843
|
+
def get_price_and_books_by_experience_key(organization, experience_key, incoming={})
|
844
|
+
HttpClient::Preconditions.assert_class('organization', organization, String)
|
845
|
+
HttpClient::Preconditions.assert_class('experience_key', experience_key, String)
|
846
|
+
opts = HttpClient::Helper.symbolize_keys(incoming)
|
847
|
+
query = {
|
848
|
+
:id => (x = opts.delete(:id); x.nil? ? nil : HttpClient::Preconditions.assert_class('id', x, Array).map { |v| HttpClient::Preconditions.assert_class('id', v, String) }),
|
849
|
+
:price_book_key => (x = opts.delete(:price_book_key); x.nil? ? nil : HttpClient::Preconditions.assert_class('price_book_key', x, Array).map { |v| HttpClient::Preconditions.assert_class('price_book_key', v, String) }),
|
850
|
+
:limit => HttpClient::Preconditions.assert_class('limit', (x = opts.delete(:limit); x.nil? ? 25 : x), Integer),
|
851
|
+
:offset => HttpClient::Preconditions.assert_class('offset', (x = opts.delete(:offset); x.nil? ? 0 : x), Integer),
|
852
|
+
:sort => HttpClient::Preconditions.assert_class('sort', (x = opts.delete(:sort); x.nil? ? "position" : x), String)
|
853
|
+
}.delete_if { |k, v| v.nil? }
|
854
|
+
r = @client.request("/#{CGI.escape(organization)}/experiences/#{CGI.escape(experience_key)}/price/books").with_query(query).get
|
855
|
+
r.map { |x| ::Io::Flow::V0::Models::ExperiencePriceBookMapping.new(x) }
|
856
|
+
end
|
857
|
+
|
858
|
+
def post_price_and_books_by_experience_key(organization, experience_key, experience_price_book_mapping_form)
|
859
|
+
HttpClient::Preconditions.assert_class('organization', organization, String)
|
860
|
+
HttpClient::Preconditions.assert_class('experience_key', experience_key, String)
|
861
|
+
(x = experience_price_book_mapping_form; x.is_a?(::Io::Flow::V0::Models::ExperiencePriceBookMappingForm) ? x : ::Io::Flow::V0::Models::ExperiencePriceBookMappingForm.new(x))
|
862
|
+
r = @client.request("/#{CGI.escape(organization)}/experiences/#{CGI.escape(experience_key)}/price/books").with_json(experience_price_book_mapping_form.to_json).post
|
863
|
+
::Io::Flow::V0::Models::ExperiencePriceBookMapping.new(r)
|
864
|
+
end
|
865
|
+
|
866
|
+
def get_price_and_books_by_experience_key_and_key(organization, experience_key, key)
|
867
|
+
HttpClient::Preconditions.assert_class('organization', organization, String)
|
868
|
+
HttpClient::Preconditions.assert_class('experience_key', experience_key, String)
|
869
|
+
HttpClient::Preconditions.assert_class('key', key, String)
|
870
|
+
r = @client.request("/#{CGI.escape(organization)}/experiences/#{CGI.escape(experience_key)}/price/books/#{CGI.escape(key)}").get
|
871
|
+
::Io::Flow::V0::Models::ExperiencePriceBookMapping.new(r)
|
872
|
+
end
|
873
|
+
|
874
|
+
def delete_price_and_books_by_experience_key_and_key(organization, experience_key, key)
|
875
|
+
HttpClient::Preconditions.assert_class('organization', organization, String)
|
876
|
+
HttpClient::Preconditions.assert_class('experience_key', experience_key, String)
|
877
|
+
HttpClient::Preconditions.assert_class('key', key, String)
|
878
|
+
r = @client.request("/#{CGI.escape(organization)}/experiences/#{CGI.escape(experience_key)}/price/books/#{CGI.escape(key)}").delete
|
879
|
+
nil
|
880
|
+
end
|
881
|
+
|
807
882
|
# Returns information about a specific experience.
|
808
883
|
def get_by_key(organization, key)
|
809
884
|
HttpClient::Preconditions.assert_class('organization', organization, String)
|
@@ -1127,6 +1202,15 @@ module Io
|
|
1127
1202
|
nil
|
1128
1203
|
end
|
1129
1204
|
|
1205
|
+
# Order allocations provide a granular view of an order that is targeted for
|
1206
|
+
# accounting / financial views of an order
|
1207
|
+
def get_allocations_by_number(organization, number)
|
1208
|
+
HttpClient::Preconditions.assert_class('organization', organization, String)
|
1209
|
+
HttpClient::Preconditions.assert_class('number', number, String)
|
1210
|
+
r = @client.request("/#{CGI.escape(organization)}/orders/#{CGI.escape(number)}/allocations").get
|
1211
|
+
::Io::Flow::V0::Models::AllocationV2.new(r)
|
1212
|
+
end
|
1213
|
+
|
1130
1214
|
# Creates an authorization, automatically associating to this order.
|
1131
1215
|
def post_authorizations_by_number(organization, number, authorization_form, incoming={})
|
1132
1216
|
HttpClient::Preconditions.assert_class('organization', organization, String)
|
@@ -1223,6 +1307,47 @@ module Io
|
|
1223
1307
|
|
1224
1308
|
end
|
1225
1309
|
|
1310
|
+
class OrderBuilders
|
1311
|
+
|
1312
|
+
def initialize(client)
|
1313
|
+
@client = HttpClient::Preconditions.assert_class('client', client, ::Io::Flow::V0::Client)
|
1314
|
+
end
|
1315
|
+
|
1316
|
+
def post(organization, order_put_form, incoming={})
|
1317
|
+
HttpClient::Preconditions.assert_class('organization', organization, String)
|
1318
|
+
opts = HttpClient::Helper.symbolize_keys(incoming)
|
1319
|
+
query = {
|
1320
|
+
:experience => (x = opts.delete(:experience); x.nil? ? nil : HttpClient::Preconditions.assert_class('experience', x, String)),
|
1321
|
+
:country => (x = opts.delete(:country); x.nil? ? nil : HttpClient::Preconditions.assert_class('country', x, String)),
|
1322
|
+
:ip => (x = opts.delete(:ip); x.nil? ? nil : HttpClient::Preconditions.assert_class('ip', x, String)),
|
1323
|
+
:currency => (x = opts.delete(:currency); x.nil? ? nil : HttpClient::Preconditions.assert_class('currency', x, String)),
|
1324
|
+
:language => (x = opts.delete(:language); x.nil? ? nil : HttpClient::Preconditions.assert_class('language', x, String)),
|
1325
|
+
:expand => (x = opts.delete(:expand); x.nil? ? nil : HttpClient::Preconditions.assert_class('expand', x, Array).map { |v| HttpClient::Preconditions.assert_class('expand', v, String) })
|
1326
|
+
}.delete_if { |k, v| v.nil? }
|
1327
|
+
(x = order_put_form; x.is_a?(::Io::Flow::V0::Models::OrderPutForm) ? x : ::Io::Flow::V0::Models::OrderPutForm.new(x))
|
1328
|
+
r = @client.request("/#{CGI.escape(organization)}/order/builders").with_query(query).with_json(order_put_form.to_json).post
|
1329
|
+
::Io::Flow::V0::Models::OrderBuilder.new(r)
|
1330
|
+
end
|
1331
|
+
|
1332
|
+
def put_by_number(organization, number, order_put_form, incoming={})
|
1333
|
+
HttpClient::Preconditions.assert_class('organization', organization, String)
|
1334
|
+
HttpClient::Preconditions.assert_class('number', number, String)
|
1335
|
+
opts = HttpClient::Helper.symbolize_keys(incoming)
|
1336
|
+
query = {
|
1337
|
+
:experience => (x = opts.delete(:experience); x.nil? ? nil : HttpClient::Preconditions.assert_class('experience', x, String)),
|
1338
|
+
:country => (x = opts.delete(:country); x.nil? ? nil : HttpClient::Preconditions.assert_class('country', x, String)),
|
1339
|
+
:ip => (x = opts.delete(:ip); x.nil? ? nil : HttpClient::Preconditions.assert_class('ip', x, String)),
|
1340
|
+
:currency => (x = opts.delete(:currency); x.nil? ? nil : HttpClient::Preconditions.assert_class('currency', x, String)),
|
1341
|
+
:language => (x = opts.delete(:language); x.nil? ? nil : HttpClient::Preconditions.assert_class('language', x, String)),
|
1342
|
+
:expand => (x = opts.delete(:expand); x.nil? ? nil : HttpClient::Preconditions.assert_class('expand', x, Array).map { |v| HttpClient::Preconditions.assert_class('expand', v, String) })
|
1343
|
+
}.delete_if { |k, v| v.nil? }
|
1344
|
+
(x = order_put_form; x.is_a?(::Io::Flow::V0::Models::OrderPutForm) ? x : ::Io::Flow::V0::Models::OrderPutForm.new(x))
|
1345
|
+
r = @client.request("/#{CGI.escape(organization)}/order/builders/#{CGI.escape(number)}").with_query(query).with_json(order_put_form.to_json).put
|
1346
|
+
::Io::Flow::V0::Models::OrderBuilder.new(r)
|
1347
|
+
end
|
1348
|
+
|
1349
|
+
end
|
1350
|
+
|
1226
1351
|
class OrderEstimates
|
1227
1352
|
|
1228
1353
|
def initialize(client)
|
@@ -1591,55 +1716,56 @@ module Io
|
|
1591
1716
|
@client = HttpClient::Preconditions.assert_class('client', client, ::Io::Flow::V0::Client)
|
1592
1717
|
end
|
1593
1718
|
|
1594
|
-
def get(organization,
|
1719
|
+
def get(organization, price_book_key, incoming={})
|
1595
1720
|
HttpClient::Preconditions.assert_class('organization', organization, String)
|
1596
|
-
HttpClient::Preconditions.assert_class('
|
1721
|
+
HttpClient::Preconditions.assert_class('price_book_key', price_book_key, String)
|
1597
1722
|
opts = HttpClient::Helper.symbolize_keys(incoming)
|
1598
1723
|
query = {
|
1599
1724
|
:id => (x = opts.delete(:id); x.nil? ? nil : HttpClient::Preconditions.assert_class('id', x, Array).map { |v| HttpClient::Preconditions.assert_class('id', v, String) }),
|
1725
|
+
:key => (x = opts.delete(:key); x.nil? ? nil : HttpClient::Preconditions.assert_class('key', x, Array).map { |v| HttpClient::Preconditions.assert_class('key', v, String) }),
|
1600
1726
|
:number => (x = opts.delete(:number); x.nil? ? nil : HttpClient::Preconditions.assert_class('number', x, Array).map { |v| HttpClient::Preconditions.assert_class('number', v, String) }),
|
1601
1727
|
:limit => HttpClient::Preconditions.assert_class('limit', (x = opts.delete(:limit); x.nil? ? 25 : x), Integer),
|
1602
1728
|
:offset => HttpClient::Preconditions.assert_class('offset', (x = opts.delete(:offset); x.nil? ? 0 : x), Integer),
|
1603
1729
|
:sort => HttpClient::Preconditions.assert_class('sort', (x = opts.delete(:sort); x.nil? ? "-created_at" : x), String)
|
1604
1730
|
}.delete_if { |k, v| v.nil? }
|
1605
|
-
r = @client.request("/#{CGI.escape(organization)}/price/books/#{CGI.escape(
|
1731
|
+
r = @client.request("/#{CGI.escape(organization)}/price/books/#{CGI.escape(price_book_key)}/items").with_query(query).get
|
1606
1732
|
r.map { |x| ::Io::Flow::V0::Models::PriceBookItem.new(x) }
|
1607
1733
|
end
|
1608
1734
|
|
1609
1735
|
# Create a price book item.
|
1610
|
-
def post(organization,
|
1736
|
+
def post(organization, price_book_key, price_book_item_form)
|
1611
1737
|
HttpClient::Preconditions.assert_class('organization', organization, String)
|
1612
|
-
HttpClient::Preconditions.assert_class('
|
1738
|
+
HttpClient::Preconditions.assert_class('price_book_key', price_book_key, String)
|
1613
1739
|
(x = price_book_item_form; x.is_a?(::Io::Flow::V0::Models::PriceBookItemForm) ? x : ::Io::Flow::V0::Models::PriceBookItemForm.new(x))
|
1614
|
-
r = @client.request("/#{CGI.escape(organization)}/price/books/#{CGI.escape(
|
1740
|
+
r = @client.request("/#{CGI.escape(organization)}/price/books/#{CGI.escape(price_book_key)}/items").with_json(price_book_item_form.to_json).post
|
1615
1741
|
::Io::Flow::V0::Models::PriceBookItem.new(r)
|
1616
1742
|
end
|
1617
1743
|
|
1618
1744
|
# Returns information about a specific price book item.
|
1619
|
-
def
|
1745
|
+
def get_by_key(organization, price_book_key, key)
|
1620
1746
|
HttpClient::Preconditions.assert_class('organization', organization, String)
|
1747
|
+
HttpClient::Preconditions.assert_class('price_book_key', price_book_key, String)
|
1621
1748
|
HttpClient::Preconditions.assert_class('key', key, String)
|
1622
|
-
|
1623
|
-
r = @client.request("/#{CGI.escape(organization)}/price/books/#{CGI.escape(key)}/items/#{CGI.escape(id)}").get
|
1749
|
+
r = @client.request("/#{CGI.escape(organization)}/price/books/#{CGI.escape(price_book_key)}/items/#{CGI.escape(key)}").get
|
1624
1750
|
::Io::Flow::V0::Models::PriceBookItem.new(r)
|
1625
1751
|
end
|
1626
1752
|
|
1627
1753
|
# Create or update a price book item.
|
1628
|
-
def
|
1754
|
+
def put_by_key(organization, price_book_key, key, price_book_item_form)
|
1629
1755
|
HttpClient::Preconditions.assert_class('organization', organization, String)
|
1756
|
+
HttpClient::Preconditions.assert_class('price_book_key', price_book_key, String)
|
1630
1757
|
HttpClient::Preconditions.assert_class('key', key, String)
|
1631
|
-
HttpClient::Preconditions.assert_class('id', id, String)
|
1632
1758
|
(x = price_book_item_form; x.is_a?(::Io::Flow::V0::Models::PriceBookItemForm) ? x : ::Io::Flow::V0::Models::PriceBookItemForm.new(x))
|
1633
|
-
r = @client.request("/#{CGI.escape(organization)}/price/books/#{CGI.escape(
|
1759
|
+
r = @client.request("/#{CGI.escape(organization)}/price/books/#{CGI.escape(price_book_key)}/items/#{CGI.escape(key)}").with_json(price_book_item_form.to_json).put
|
1634
1760
|
::Io::Flow::V0::Models::PriceBookItem.new(r)
|
1635
1761
|
end
|
1636
1762
|
|
1637
1763
|
# Deletes the specified price book item
|
1638
|
-
def
|
1764
|
+
def delete_by_key(organization, price_book_key, key)
|
1639
1765
|
HttpClient::Preconditions.assert_class('organization', organization, String)
|
1766
|
+
HttpClient::Preconditions.assert_class('price_book_key', price_book_key, String)
|
1640
1767
|
HttpClient::Preconditions.assert_class('key', key, String)
|
1641
|
-
|
1642
|
-
r = @client.request("/#{CGI.escape(organization)}/price/books/#{CGI.escape(key)}/items/#{CGI.escape(id)}").delete
|
1768
|
+
r = @client.request("/#{CGI.escape(organization)}/price/books/#{CGI.escape(price_book_key)}/items/#{CGI.escape(key)}").delete
|
1643
1769
|
nil
|
1644
1770
|
end
|
1645
1771
|
|
@@ -3390,6 +3516,43 @@ module Io
|
|
3390
3516
|
|
3391
3517
|
end
|
3392
3518
|
|
3519
|
+
class Reservations
|
3520
|
+
|
3521
|
+
def initialize(client)
|
3522
|
+
@client = HttpClient::Preconditions.assert_class('client', client, ::Io::Flow::V0::Client)
|
3523
|
+
end
|
3524
|
+
|
3525
|
+
def post(organization, reservation_form)
|
3526
|
+
HttpClient::Preconditions.assert_class('organization', organization, String)
|
3527
|
+
(x = reservation_form; x.is_a?(::Io::Flow::V0::Models::ReservationForm) ? x : ::Io::Flow::V0::Models::ReservationForm.new(x))
|
3528
|
+
r = @client.request("/#{CGI.escape(organization)}/inventory/reservation").with_json(reservation_form.to_json).post
|
3529
|
+
::Io::Flow::V0::Models::Reservation.new(r)
|
3530
|
+
end
|
3531
|
+
|
3532
|
+
def get_by_key(organization, key)
|
3533
|
+
HttpClient::Preconditions.assert_class('organization', organization, String)
|
3534
|
+
HttpClient::Preconditions.assert_class('key', key, String)
|
3535
|
+
r = @client.request("/#{CGI.escape(organization)}/inventory/reservation/#{CGI.escape(key)}").get
|
3536
|
+
::Io::Flow::V0::Models::Reservation.new(r)
|
3537
|
+
end
|
3538
|
+
|
3539
|
+
def put_by_key(organization, key, reservation_form)
|
3540
|
+
HttpClient::Preconditions.assert_class('organization', organization, String)
|
3541
|
+
HttpClient::Preconditions.assert_class('key', key, String)
|
3542
|
+
(x = reservation_form; x.is_a?(::Io::Flow::V0::Models::ReservationForm) ? x : ::Io::Flow::V0::Models::ReservationForm.new(x))
|
3543
|
+
r = @client.request("/#{CGI.escape(organization)}/inventory/reservation/#{CGI.escape(key)}").with_json(reservation_form.to_json).put
|
3544
|
+
::Io::Flow::V0::Models::Reservation.new(r)
|
3545
|
+
end
|
3546
|
+
|
3547
|
+
def delete_by_key(organization, key)
|
3548
|
+
HttpClient::Preconditions.assert_class('organization', organization, String)
|
3549
|
+
HttpClient::Preconditions.assert_class('key', key, String)
|
3550
|
+
r = @client.request("/#{CGI.escape(organization)}/inventory/reservation/#{CGI.escape(key)}").delete
|
3551
|
+
nil
|
3552
|
+
end
|
3553
|
+
|
3554
|
+
end
|
3555
|
+
|
3393
3556
|
class Returns
|
3394
3557
|
|
3395
3558
|
def initialize(client)
|
@@ -3482,10 +3645,14 @@ module Io
|
|
3482
3645
|
r.map { |x| ::Io::Flow::V0::Models::ShippingLabel.new(x) }
|
3483
3646
|
end
|
3484
3647
|
|
3485
|
-
def post(organization, shipping_label_form)
|
3648
|
+
def post(organization, shipping_label_form, incoming={})
|
3486
3649
|
HttpClient::Preconditions.assert_class('organization', organization, String)
|
3650
|
+
opts = HttpClient::Helper.symbolize_keys(incoming)
|
3651
|
+
query = {
|
3652
|
+
:show_commercial_invoice => (x = opts.delete(:show_commercial_invoice); x.nil? ? nil : HttpClient::Preconditions.assert_boolean('show_commercial_invoice', x))
|
3653
|
+
}.delete_if { |k, v| v.nil? }
|
3487
3654
|
(x = shipping_label_form; x.is_a?(::Io::Flow::V0::Models::ShippingLabelForm) ? x : ::Io::Flow::V0::Models::ShippingLabelForm.new(x))
|
3488
|
-
r = @client.request("/#{CGI.escape(organization)}/shipping_labels").with_json(shipping_label_form.to_json).post
|
3655
|
+
r = @client.request("/#{CGI.escape(organization)}/shipping_labels").with_query(query).with_json(shipping_label_form.to_json).post
|
3489
3656
|
::Io::Flow::V0::Models::ShippingLabel.new(r)
|
3490
3657
|
end
|
3491
3658
|
|
@@ -5659,6 +5826,8 @@ module Io
|
|
5659
5826
|
module Types
|
5660
5827
|
ATTRIBUTE_UPSERTED = 'attribute_upserted' unless defined?(ATTRIBUTE_UPSERTED)
|
5661
5828
|
ATTRIBUTE_DELETED = 'attribute_deleted' unless defined?(ATTRIBUTE_DELETED)
|
5829
|
+
ATTRIBUTE_UPSERTED_V2 = 'attribute_upserted_v2' unless defined?(ATTRIBUTE_UPSERTED_V2)
|
5830
|
+
ATTRIBUTE_DELETED_V2 = 'attribute_deleted_v2' unless defined?(ATTRIBUTE_DELETED_V2)
|
5662
5831
|
CATALOG_UPSERTED = 'catalog_upserted' unless defined?(CATALOG_UPSERTED)
|
5663
5832
|
CATALOG_DELETED = 'catalog_deleted' unless defined?(CATALOG_DELETED)
|
5664
5833
|
SUBCATALOG_UPSERTED = 'subcatalog_upserted' unless defined?(SUBCATALOG_UPSERTED)
|
@@ -5673,10 +5842,14 @@ module Io
|
|
5673
5842
|
AVAILABLE_PROMOTIONS_DELETED = 'available_promotions_deleted' unless defined?(AVAILABLE_PROMOTIONS_DELETED)
|
5674
5843
|
ALLOCATION_DELETED = 'allocation_deleted' unless defined?(ALLOCATION_DELETED)
|
5675
5844
|
ALLOCATION_UPSERTED = 'allocation_upserted' unless defined?(ALLOCATION_UPSERTED)
|
5845
|
+
ALLOCATION_DELETED_V2 = 'allocation_deleted_v2' unless defined?(ALLOCATION_DELETED_V2)
|
5846
|
+
ALLOCATION_UPSERTED_V2 = 'allocation_upserted_v2' unless defined?(ALLOCATION_UPSERTED_V2)
|
5676
5847
|
CURRENCY_FORMAT_DELETED = 'currency_format_deleted' unless defined?(CURRENCY_FORMAT_DELETED)
|
5677
5848
|
CURRENCY_FORMAT_UPSERTED = 'currency_format_upserted' unless defined?(CURRENCY_FORMAT_UPSERTED)
|
5678
5849
|
EXPERIENCE_DELETED = 'experience_deleted' unless defined?(EXPERIENCE_DELETED)
|
5679
5850
|
EXPERIENCE_UPSERTED = 'experience_upserted' unless defined?(EXPERIENCE_UPSERTED)
|
5851
|
+
EXPERIENCE_PRICE_BOOK_MAPPING_DELETED = 'experience_price_book_mapping_deleted' unless defined?(EXPERIENCE_PRICE_BOOK_MAPPING_DELETED)
|
5852
|
+
EXPERIENCE_PRICE_BOOK_MAPPING_UPSERTED = 'experience_price_book_mapping_upserted' unless defined?(EXPERIENCE_PRICE_BOOK_MAPPING_UPSERTED)
|
5680
5853
|
ITEM_MARGIN_DELETED = 'item_margin_deleted' unless defined?(ITEM_MARGIN_DELETED)
|
5681
5854
|
ITEM_MARGIN_UPSERTED = 'item_margin_upserted' unless defined?(ITEM_MARGIN_UPSERTED)
|
5682
5855
|
ITEM_SALES_MARGIN_DELETED = 'item_sales_margin_deleted' unless defined?(ITEM_SALES_MARGIN_DELETED)
|
@@ -5741,6 +5914,7 @@ module Io
|
|
5741
5914
|
PAYMENT_DELETED = 'payment_deleted' unless defined?(PAYMENT_DELETED)
|
5742
5915
|
REFUND_UPSERTED = 'refund_upserted' unless defined?(REFUND_UPSERTED)
|
5743
5916
|
REFUND_UPSERTED_V2 = 'refund_upserted_v2' unless defined?(REFUND_UPSERTED_V2)
|
5917
|
+
REFUND_CAPTURE_UPSERTED_V2 = 'refund_capture_upserted_v2' unless defined?(REFUND_CAPTURE_UPSERTED_V2)
|
5744
5918
|
REVERSAL_UPSERTED = 'reversal_upserted' unless defined?(REVERSAL_UPSERTED)
|
5745
5919
|
PRICE_BOOK_UPSERTED = 'price_book_upserted' unless defined?(PRICE_BOOK_UPSERTED)
|
5746
5920
|
PRICE_BOOK_DELETED = 'price_book_deleted' unless defined?(PRICE_BOOK_DELETED)
|
@@ -5765,7 +5939,7 @@ module Io
|
|
5765
5939
|
end
|
5766
5940
|
|
5767
5941
|
def subtype_to_hash
|
5768
|
-
raise 'Cannot serialize an instance of event directly - must use one of the specific types: attribute_upserted, attribute_deleted, catalog_upserted, catalog_deleted, subcatalog_upserted, subcatalog_deleted, catalog_item_upserted, catalog_item_deleted, subcatalog_item_upserted, subcatalog_item_deleted, rate_deleted, rate_upserted, available_promotions_upserted, available_promotions_deleted, allocation_deleted, allocation_upserted, currency_format_deleted, currency_format_upserted, experience_deleted, experience_upserted, item_margin_deleted, item_margin_upserted, item_sales_margin_deleted, item_sales_margin_upserted, label_format_deleted, label_format_upserted, order_deleted, order_upserted, order_identifier_deleted, order_identifier_upserted, order_identifier_deleted_v2, order_identifier_upserted_v2, pricing_deleted, pricing_upserted, fraud_status_changed, tier_upserted, tier_deleted, delivery_option_upserted, delivery_option_deleted, hs6_code_upserted, hs6_code_deleted, hs10_code_upserted, hs10_code_deleted, item_origin_upserted, item_origin_deleted, harmonized_item_upserted, harmonized_item_deleted, harmonized_landed_cost_upserted, fully_harmonized_item_upserted, rule_upserted, rule_deleted, snapshot_upserted, snapshot_deleted, label_upserted, notification_upserted, notification_deleted, manifested_label_upserted, manifested_label_deleted, local_item_upserted, local_item_deleted, membership_upserted, membership_deleted, organization_upserted, organization_deleted, authorization_upserted, authorization_deleted, authorization_deleted_v2, authorization_status_changed, card_authorization_upserted, card_authorization_upserted_v2, online_authorization_upserted, online_authorization_upserted_v2, capture_upserted, capture_upserted_v2, card_upserted, card_upserted_v2, card_deleted, payment_upserted, payment_deleted, refund_upserted, refund_upserted_v2, reversal_upserted, price_book_upserted, price_book_deleted, price_book_item_upserted, price_book_item_deleted, organization_rates_published, organization_countries_published, organization_ratecard_transit_windows_published, return_upserted, return_deleted, targeting_item_upserted, targeting_item_deleted, tracking_label_event_upserted'
|
5942
|
+
raise 'Cannot serialize an instance of event directly - must use one of the specific types: attribute_upserted, attribute_deleted, attribute_upserted_v2, attribute_deleted_v2, catalog_upserted, catalog_deleted, subcatalog_upserted, subcatalog_deleted, catalog_item_upserted, catalog_item_deleted, subcatalog_item_upserted, subcatalog_item_deleted, rate_deleted, rate_upserted, available_promotions_upserted, available_promotions_deleted, allocation_deleted, allocation_upserted, allocation_deleted_v2, allocation_upserted_v2, currency_format_deleted, currency_format_upserted, experience_deleted, experience_upserted, experience_price_book_mapping_deleted, experience_price_book_mapping_upserted, item_margin_deleted, item_margin_upserted, item_sales_margin_deleted, item_sales_margin_upserted, label_format_deleted, label_format_upserted, order_deleted, order_upserted, order_identifier_deleted, order_identifier_upserted, order_identifier_deleted_v2, order_identifier_upserted_v2, pricing_deleted, pricing_upserted, fraud_status_changed, tier_upserted, tier_deleted, delivery_option_upserted, delivery_option_deleted, hs6_code_upserted, hs6_code_deleted, hs10_code_upserted, hs10_code_deleted, item_origin_upserted, item_origin_deleted, harmonized_item_upserted, harmonized_item_deleted, harmonized_landed_cost_upserted, fully_harmonized_item_upserted, rule_upserted, rule_deleted, snapshot_upserted, snapshot_deleted, label_upserted, notification_upserted, notification_deleted, manifested_label_upserted, manifested_label_deleted, local_item_upserted, local_item_deleted, membership_upserted, membership_deleted, organization_upserted, organization_deleted, authorization_upserted, authorization_deleted, authorization_deleted_v2, authorization_status_changed, card_authorization_upserted, card_authorization_upserted_v2, online_authorization_upserted, online_authorization_upserted_v2, capture_upserted, capture_upserted_v2, card_upserted, card_upserted_v2, card_deleted, payment_upserted, payment_deleted, refund_upserted, refund_upserted_v2, refund_capture_upserted_v2, reversal_upserted, price_book_upserted, price_book_deleted, price_book_item_upserted, price_book_item_deleted, organization_rates_published, organization_countries_published, organization_ratecard_transit_windows_published, return_upserted, return_deleted, targeting_item_upserted, targeting_item_deleted, tracking_label_event_upserted'
|
5769
5943
|
end
|
5770
5944
|
|
5771
5945
|
def to_hash
|
@@ -5781,6 +5955,8 @@ module Io
|
|
5781
5955
|
case discriminator
|
5782
5956
|
when Types::ATTRIBUTE_UPSERTED; AttributeUpserted.new(hash)
|
5783
5957
|
when Types::ATTRIBUTE_DELETED; AttributeDeleted.new(hash)
|
5958
|
+
when Types::ATTRIBUTE_UPSERTED_V2; AttributeUpsertedV2.new(hash)
|
5959
|
+
when Types::ATTRIBUTE_DELETED_V2; AttributeDeletedV2.new(hash)
|
5784
5960
|
when Types::CATALOG_UPSERTED; CatalogUpserted.new(hash)
|
5785
5961
|
when Types::CATALOG_DELETED; CatalogDeleted.new(hash)
|
5786
5962
|
when Types::SUBCATALOG_UPSERTED; SubcatalogUpserted.new(hash)
|
@@ -5795,10 +5971,14 @@ module Io
|
|
5795
5971
|
when Types::AVAILABLE_PROMOTIONS_DELETED; AvailablePromotionsDeleted.new(hash)
|
5796
5972
|
when Types::ALLOCATION_DELETED; AllocationDeleted.new(hash)
|
5797
5973
|
when Types::ALLOCATION_UPSERTED; AllocationUpserted.new(hash)
|
5974
|
+
when Types::ALLOCATION_DELETED_V2; AllocationDeletedV2.new(hash)
|
5975
|
+
when Types::ALLOCATION_UPSERTED_V2; AllocationUpsertedV2.new(hash)
|
5798
5976
|
when Types::CURRENCY_FORMAT_DELETED; CurrencyFormatDeleted.new(hash)
|
5799
5977
|
when Types::CURRENCY_FORMAT_UPSERTED; CurrencyFormatUpserted.new(hash)
|
5800
5978
|
when Types::EXPERIENCE_DELETED; ExperienceDeleted.new(hash)
|
5801
5979
|
when Types::EXPERIENCE_UPSERTED; ExperienceUpserted.new(hash)
|
5980
|
+
when Types::EXPERIENCE_PRICE_BOOK_MAPPING_DELETED; ExperiencePriceBookMappingDeleted.new(hash)
|
5981
|
+
when Types::EXPERIENCE_PRICE_BOOK_MAPPING_UPSERTED; ExperiencePriceBookMappingUpserted.new(hash)
|
5802
5982
|
when Types::ITEM_MARGIN_DELETED; ItemMarginDeleted.new(hash)
|
5803
5983
|
when Types::ITEM_MARGIN_UPSERTED; ItemMarginUpserted.new(hash)
|
5804
5984
|
when Types::ITEM_SALES_MARGIN_DELETED; ItemSalesMarginDeleted.new(hash)
|
@@ -5860,6 +6040,7 @@ module Io
|
|
5860
6040
|
when Types::PAYMENT_DELETED; PaymentDeleted.new(hash)
|
5861
6041
|
when Types::REFUND_UPSERTED; RefundUpserted.new(hash)
|
5862
6042
|
when Types::REFUND_UPSERTED_V2; RefundUpsertedV2.new(hash)
|
6043
|
+
when Types::REFUND_CAPTURE_UPSERTED_V2; RefundCaptureUpsertedV2.new(hash)
|
5863
6044
|
when Types::REVERSAL_UPSERTED; ReversalUpserted.new(hash)
|
5864
6045
|
when Types::PRICE_BOOK_UPSERTED; PriceBookUpserted.new(hash)
|
5865
6046
|
when Types::PRICE_BOOK_DELETED; PriceBookDeleted.new(hash)
|
@@ -7177,6 +7358,68 @@ module Io
|
|
7177
7358
|
|
7178
7359
|
end
|
7179
7360
|
|
7361
|
+
# Types of failed inventory reservation reasons
|
7362
|
+
class ReservationError
|
7363
|
+
|
7364
|
+
module Types
|
7365
|
+
# Inventory is not available for all or subset of item quantities requested
|
7366
|
+
NO_INVENTORY_RESERVATION_ERROR = 'no_inventory' unless defined?(NO_INVENTORY_RESERVATION_ERROR)
|
7367
|
+
end
|
7368
|
+
|
7369
|
+
attr_reader :code
|
7370
|
+
|
7371
|
+
def initialize(incoming={})
|
7372
|
+
opts = HttpClient::Helper.symbolize_keys(incoming)
|
7373
|
+
HttpClient::Preconditions.require_keys(opts, [:code], 'ReservationError')
|
7374
|
+
@code = HttpClient::Preconditions.assert_class('code', opts.delete(:code), String)
|
7375
|
+
end
|
7376
|
+
|
7377
|
+
def subtype_to_hash
|
7378
|
+
raise 'Cannot serialize an instance of reservation_error directly - must use one of the specific types: no_inventory_reservation_error'
|
7379
|
+
end
|
7380
|
+
|
7381
|
+
def to_hash
|
7382
|
+
subtype_to_hash.merge(:code => @code)
|
7383
|
+
end
|
7384
|
+
|
7385
|
+
def ReservationError.from_json(hash)
|
7386
|
+
HttpClient::Preconditions.assert_class('hash', hash, Hash)
|
7387
|
+
discriminator = HttpClient::Helper.symbolize_keys(hash)[:code].to_s.strip
|
7388
|
+
if discriminator.empty?
|
7389
|
+
raise "Union type[reservation_error] requires a field named 'code'"
|
7390
|
+
end
|
7391
|
+
case discriminator
|
7392
|
+
when Types::NO_INVENTORY_RESERVATION_ERROR; NoInventoryReservationError.new(hash)
|
7393
|
+
else ReservationErrorUndefinedType.new(:code => discriminator)
|
7394
|
+
end
|
7395
|
+
end
|
7396
|
+
|
7397
|
+
end
|
7398
|
+
|
7399
|
+
class ReservationErrorUndefinedType < ReservationError
|
7400
|
+
|
7401
|
+
attr_reader :name
|
7402
|
+
|
7403
|
+
def initialize(incoming={})
|
7404
|
+
super(:code => 'undefined_type')
|
7405
|
+
opts = HttpClient::Helper.symbolize_keys(incoming)
|
7406
|
+
@name = HttpClient::Preconditions.assert_class('name', opts.delete(:code), String)
|
7407
|
+
end
|
7408
|
+
|
7409
|
+
def subtype_to_hash
|
7410
|
+
raise 'Unable to serialize undefined type to json'
|
7411
|
+
end
|
7412
|
+
|
7413
|
+
def copy(incoming={})
|
7414
|
+
raise 'Operation not supported for undefined type'
|
7415
|
+
end
|
7416
|
+
|
7417
|
+
def to_hash
|
7418
|
+
raise 'Operation not supported for undefined type'
|
7419
|
+
end
|
7420
|
+
|
7421
|
+
end
|
7422
|
+
|
7180
7423
|
class Session
|
7181
7424
|
|
7182
7425
|
module Types
|
@@ -7677,7 +7920,7 @@ module Io
|
|
7677
7920
|
end
|
7678
7921
|
|
7679
7922
|
def AttributeIntent.ALL
|
7680
|
-
@@all ||= [AttributeIntent.brand, AttributeIntent.fulfillment_method, AttributeIntent.hazardous, AttributeIntent.price, AttributeIntent.taxability]
|
7923
|
+
@@all ||= [AttributeIntent.brand, AttributeIntent.checkout_content, AttributeIntent.fulfillment_method, AttributeIntent.hazardous, AttributeIntent.price, AttributeIntent.taxability]
|
7681
7924
|
end
|
7682
7925
|
|
7683
7926
|
# Attributes with this data type imply that this is the brand name of the item
|
@@ -7686,6 +7929,12 @@ module Io
|
|
7686
7929
|
@@_brand ||= AttributeIntent.new('brand')
|
7687
7930
|
end
|
7688
7931
|
|
7932
|
+
# Checkout content attributes are included in the item content when rendered for
|
7933
|
+
# the checkout context.
|
7934
|
+
def AttributeIntent.checkout_content
|
7935
|
+
@@_checkout_content ||= AttributeIntent.new('checkout_content')
|
7936
|
+
end
|
7937
|
+
|
7689
7938
|
# Attributes with this data type imply whether delivery is a package or digital
|
7690
7939
|
# good.
|
7691
7940
|
def AttributeIntent.fulfillment_method
|
@@ -8763,7 +9012,7 @@ module Io
|
|
8763
9012
|
end
|
8764
9013
|
|
8765
9014
|
def DeliveryWindowComponentSource.ALL
|
8766
|
-
@@all ||= [DeliveryWindowComponentSource.flow, DeliveryWindowComponentSource.organization, DeliveryWindowComponentSource.carrier, DeliveryWindowComponentSource.center]
|
9015
|
+
@@all ||= [DeliveryWindowComponentSource.flow, DeliveryWindowComponentSource.organization, DeliveryWindowComponentSource.carrier, DeliveryWindowComponentSource.center, DeliveryWindowComponentSource.mixed]
|
8767
9016
|
end
|
8768
9017
|
|
8769
9018
|
def DeliveryWindowComponentSource.flow
|
@@ -8782,6 +9031,11 @@ module Io
|
|
8782
9031
|
@@_center ||= DeliveryWindowComponentSource.new('center')
|
8783
9032
|
end
|
8784
9033
|
|
9034
|
+
# A delivery estimate may be a combination of multiple sources
|
9035
|
+
def DeliveryWindowComponentSource.mixed
|
9036
|
+
@@_mixed ||= DeliveryWindowComponentSource.new('mixed')
|
9037
|
+
end
|
9038
|
+
|
8785
9039
|
def to_hash
|
8786
9040
|
value
|
8787
9041
|
end
|
@@ -8903,7 +9157,7 @@ module Io
|
|
8903
9157
|
end
|
8904
9158
|
|
8905
9159
|
def EventType.ALL
|
8906
|
-
@@all ||= [EventType.attribute_upserted, EventType.attribute_deleted, EventType.catalog_upserted, EventType.catalog_deleted, EventType.subcatalog_upserted, EventType.subcatalog_deleted, EventType.catalog_item_upserted, EventType.catalog_item_deleted, EventType.subcatalog_item_upserted, EventType.subcatalog_item_deleted, EventType.rate_deleted, EventType.rate_upserted, EventType.available_promotions_upserted, EventType.available_promotions_deleted, EventType.allocation_deleted, EventType.allocation_upserted, EventType.currency_format_deleted, EventType.currency_format_upserted, EventType.experience_deleted, EventType.experience_upserted, EventType.item_margin_deleted, EventType.item_margin_upserted, EventType.item_sales_margin_deleted, EventType.item_sales_margin_upserted, EventType.label_format_deleted, EventType.label_format_upserted, EventType.order_deleted, EventType.order_upserted, EventType.order_identifier_deleted, EventType.order_identifier_upserted, EventType.order_identifier_deleted_v2, EventType.order_identifier_upserted_v2, EventType.pricing_deleted, EventType.pricing_upserted, EventType.fraud_status_changed, EventType.tier_upserted, EventType.tier_deleted, EventType.delivery_option_upserted, EventType.delivery_option_deleted, EventType.hs6_code_upserted, EventType.hs6_code_deleted, EventType.hs10_code_upserted, EventType.hs10_code_deleted, EventType.item_origin_upserted, EventType.item_origin_deleted, EventType.harmonized_item_upserted, EventType.harmonized_item_deleted, EventType.harmonized_landed_cost_upserted, EventType.fully_harmonized_item_upserted, EventType.rule_upserted, EventType.rule_deleted, EventType.snapshot_upserted, EventType.snapshot_deleted, EventType.label_upserted, EventType.notification_upserted, EventType.notification_deleted, EventType.manifested_label_upserted, EventType.manifested_label_deleted, EventType.local_item_upserted, EventType.local_item_deleted, EventType.membership_upserted, EventType.membership_deleted, EventType.organization_upserted, EventType.organization_deleted, EventType.authorization_upserted, EventType.authorization_deleted, EventType.authorization_deleted_v2, EventType.authorization_status_changed, EventType.card_authorization_upserted, EventType.card_authorization_upserted_v2, EventType.online_authorization_upserted, EventType.online_authorization_upserted_v2, EventType.capture_upserted, EventType.capture_upserted_v2, EventType.card_upserted, EventType.card_upserted_v2, EventType.card_deleted, EventType.payment_upserted, EventType.payment_deleted, EventType.refund_upserted, EventType.refund_upserted_v2, EventType.reversal_upserted, EventType.price_book_upserted, EventType.price_book_deleted, EventType.price_book_item_upserted, EventType.price_book_item_deleted, EventType.organization_rates_published, EventType.organization_countries_published, EventType.organization_ratecard_transit_windows_published, EventType.return_upserted, EventType.return_deleted, EventType.targeting_item_upserted, EventType.targeting_item_deleted, EventType.tracking_label_event_upserted]
|
9160
|
+
@@all ||= [EventType.attribute_upserted, EventType.attribute_deleted, EventType.attribute_upserted_v2, EventType.attribute_deleted_v2, EventType.catalog_upserted, EventType.catalog_deleted, EventType.subcatalog_upserted, EventType.subcatalog_deleted, EventType.catalog_item_upserted, EventType.catalog_item_deleted, EventType.subcatalog_item_upserted, EventType.subcatalog_item_deleted, EventType.rate_deleted, EventType.rate_upserted, EventType.available_promotions_upserted, EventType.available_promotions_deleted, EventType.allocation_deleted, EventType.allocation_upserted, EventType.allocation_deleted_v2, EventType.allocation_upserted_v2, EventType.currency_format_deleted, EventType.currency_format_upserted, EventType.experience_deleted, EventType.experience_upserted, EventType.experience_price_book_mapping_deleted, EventType.experience_price_book_mapping_upserted, EventType.item_margin_deleted, EventType.item_margin_upserted, EventType.item_sales_margin_deleted, EventType.item_sales_margin_upserted, EventType.label_format_deleted, EventType.label_format_upserted, EventType.order_deleted, EventType.order_upserted, EventType.order_identifier_deleted, EventType.order_identifier_upserted, EventType.order_identifier_deleted_v2, EventType.order_identifier_upserted_v2, EventType.pricing_deleted, EventType.pricing_upserted, EventType.fraud_status_changed, EventType.tier_upserted, EventType.tier_deleted, EventType.delivery_option_upserted, EventType.delivery_option_deleted, EventType.hs6_code_upserted, EventType.hs6_code_deleted, EventType.hs10_code_upserted, EventType.hs10_code_deleted, EventType.item_origin_upserted, EventType.item_origin_deleted, EventType.harmonized_item_upserted, EventType.harmonized_item_deleted, EventType.harmonized_landed_cost_upserted, EventType.fully_harmonized_item_upserted, EventType.rule_upserted, EventType.rule_deleted, EventType.snapshot_upserted, EventType.snapshot_deleted, EventType.label_upserted, EventType.notification_upserted, EventType.notification_deleted, EventType.manifested_label_upserted, EventType.manifested_label_deleted, EventType.local_item_upserted, EventType.local_item_deleted, EventType.membership_upserted, EventType.membership_deleted, EventType.organization_upserted, EventType.organization_deleted, EventType.authorization_upserted, EventType.authorization_deleted, EventType.authorization_deleted_v2, EventType.authorization_status_changed, EventType.card_authorization_upserted, EventType.card_authorization_upserted_v2, EventType.online_authorization_upserted, EventType.online_authorization_upserted_v2, EventType.capture_upserted, EventType.capture_upserted_v2, EventType.card_upserted, EventType.card_upserted_v2, EventType.card_deleted, EventType.payment_upserted, EventType.payment_deleted, EventType.refund_upserted, EventType.refund_upserted_v2, EventType.refund_capture_upserted_v2, EventType.reversal_upserted, EventType.price_book_upserted, EventType.price_book_deleted, EventType.price_book_item_upserted, EventType.price_book_item_deleted, EventType.organization_rates_published, EventType.organization_countries_published, EventType.organization_ratecard_transit_windows_published, EventType.return_upserted, EventType.return_deleted, EventType.targeting_item_upserted, EventType.targeting_item_deleted, EventType.tracking_label_event_upserted]
|
8907
9161
|
end
|
8908
9162
|
|
8909
9163
|
def EventType.attribute_upserted
|
@@ -8914,6 +9168,14 @@ module Io
|
|
8914
9168
|
@@_attribute_deleted ||= EventType.new('attribute_deleted')
|
8915
9169
|
end
|
8916
9170
|
|
9171
|
+
def EventType.attribute_upserted_v2
|
9172
|
+
@@_attribute_upserted_v2 ||= EventType.new('attribute_upserted_v2')
|
9173
|
+
end
|
9174
|
+
|
9175
|
+
def EventType.attribute_deleted_v2
|
9176
|
+
@@_attribute_deleted_v2 ||= EventType.new('attribute_deleted_v2')
|
9177
|
+
end
|
9178
|
+
|
8917
9179
|
def EventType.catalog_upserted
|
8918
9180
|
@@_catalog_upserted ||= EventType.new('catalog_upserted')
|
8919
9181
|
end
|
@@ -8970,6 +9232,14 @@ module Io
|
|
8970
9232
|
@@_allocation_upserted ||= EventType.new('allocation_upserted')
|
8971
9233
|
end
|
8972
9234
|
|
9235
|
+
def EventType.allocation_deleted_v2
|
9236
|
+
@@_allocation_deleted_v2 ||= EventType.new('allocation_deleted_v2')
|
9237
|
+
end
|
9238
|
+
|
9239
|
+
def EventType.allocation_upserted_v2
|
9240
|
+
@@_allocation_upserted_v2 ||= EventType.new('allocation_upserted_v2')
|
9241
|
+
end
|
9242
|
+
|
8973
9243
|
def EventType.currency_format_deleted
|
8974
9244
|
@@_currency_format_deleted ||= EventType.new('currency_format_deleted')
|
8975
9245
|
end
|
@@ -8986,6 +9256,14 @@ module Io
|
|
8986
9256
|
@@_experience_upserted ||= EventType.new('experience_upserted')
|
8987
9257
|
end
|
8988
9258
|
|
9259
|
+
def EventType.experience_price_book_mapping_deleted
|
9260
|
+
@@_experience_price_book_mapping_deleted ||= EventType.new('experience_price_book_mapping_deleted')
|
9261
|
+
end
|
9262
|
+
|
9263
|
+
def EventType.experience_price_book_mapping_upserted
|
9264
|
+
@@_experience_price_book_mapping_upserted ||= EventType.new('experience_price_book_mapping_upserted')
|
9265
|
+
end
|
9266
|
+
|
8989
9267
|
def EventType.item_margin_deleted
|
8990
9268
|
@@_item_margin_deleted ||= EventType.new('item_margin_deleted')
|
8991
9269
|
end
|
@@ -9230,6 +9508,10 @@ module Io
|
|
9230
9508
|
@@_refund_upserted_v2 ||= EventType.new('refund_upserted_v2')
|
9231
9509
|
end
|
9232
9510
|
|
9511
|
+
def EventType.refund_capture_upserted_v2
|
9512
|
+
@@_refund_capture_upserted_v2 ||= EventType.new('refund_capture_upserted_v2')
|
9513
|
+
end
|
9514
|
+
|
9233
9515
|
def EventType.reversal_upserted
|
9234
9516
|
@@_reversal_upserted ||= EventType.new('reversal_upserted')
|
9235
9517
|
end
|
@@ -9792,6 +10074,52 @@ module Io
|
|
9792
10074
|
|
9793
10075
|
end
|
9794
10076
|
|
10077
|
+
class ImageTag
|
10078
|
+
|
10079
|
+
attr_reader :value
|
10080
|
+
|
10081
|
+
def initialize(value)
|
10082
|
+
@value = HttpClient::Preconditions.assert_class('value', value, String)
|
10083
|
+
end
|
10084
|
+
|
10085
|
+
# Returns the instance of ImageTag for this value, creating a new instance for an unknown value
|
10086
|
+
def ImageTag.apply(value)
|
10087
|
+
if value.instance_of?(ImageTag)
|
10088
|
+
value
|
10089
|
+
else
|
10090
|
+
HttpClient::Preconditions.assert_class_or_nil('value', value, String)
|
10091
|
+
value.nil? ? nil : (from_string(value) || ImageTag.new(value))
|
10092
|
+
end
|
10093
|
+
end
|
10094
|
+
|
10095
|
+
# Returns the instance of ImageTag for this value, or nil if not found
|
10096
|
+
def ImageTag.from_string(value)
|
10097
|
+
HttpClient::Preconditions.assert_class('value', value, String)
|
10098
|
+
ImageTag.ALL.find { |v| v.value == value }
|
10099
|
+
end
|
10100
|
+
|
10101
|
+
def ImageTag.ALL
|
10102
|
+
@@all ||= [ImageTag.thumbnail, ImageTag.checkout]
|
10103
|
+
end
|
10104
|
+
|
10105
|
+
# Thumbnail images identify the image to use when displaying products in the
|
10106
|
+
# Flow Console.
|
10107
|
+
def ImageTag.thumbnail
|
10108
|
+
@@_thumbnail ||= ImageTag.new('thumbnail')
|
10109
|
+
end
|
10110
|
+
|
10111
|
+
# Checkout images identify the item image to use when displaying the item in the
|
10112
|
+
# context of a consumer checkout (e.g. cart, checkout page).
|
10113
|
+
def ImageTag.checkout
|
10114
|
+
@@_checkout ||= ImageTag.new('checkout')
|
10115
|
+
end
|
10116
|
+
|
10117
|
+
def to_hash
|
10118
|
+
value
|
10119
|
+
end
|
10120
|
+
|
10121
|
+
end
|
10122
|
+
|
9795
10123
|
class ImportType
|
9796
10124
|
|
9797
10125
|
attr_reader :value
|
@@ -13145,7 +13473,7 @@ module Io
|
|
13145
13473
|
def initialize(incoming={})
|
13146
13474
|
opts = HttpClient::Helper.symbolize_keys(incoming)
|
13147
13475
|
HttpClient::Preconditions.require_keys(opts, [:order, :details], 'Allocation')
|
13148
|
-
@order = (x = opts.delete(:order); x.is_a?(::Io::Flow::V0::Models::
|
13476
|
+
@order = (x = opts.delete(:order); x.is_a?(::Io::Flow::V0::Models::AllocationOrderSummary) ? x : ::Io::Flow::V0::Models::AllocationOrderSummary.new(x))
|
13149
13477
|
@details = HttpClient::Preconditions.assert_class('details', opts.delete(:details), Array).map { |v| (x = v; x.is_a?(::Io::Flow::V0::Models::AllocationDetail) ? x : ::Io::Flow::V0::Models::AllocationDetail.from_json(x)) }
|
13150
13478
|
end
|
13151
13479
|
|
@@ -13197,6 +13525,39 @@ module Io
|
|
13197
13525
|
|
13198
13526
|
end
|
13199
13527
|
|
13528
|
+
class AllocationDeletedV2 < Event
|
13529
|
+
|
13530
|
+
attr_reader :event_id, :timestamp, :organization, :id
|
13531
|
+
|
13532
|
+
def initialize(incoming={})
|
13533
|
+
super(:discriminator => Event::Types::ALLOCATION_DELETED_V2)
|
13534
|
+
opts = HttpClient::Helper.symbolize_keys(incoming)
|
13535
|
+
HttpClient::Preconditions.require_keys(opts, [:event_id, :timestamp, :organization, :id], 'AllocationDeletedV2')
|
13536
|
+
@event_id = HttpClient::Preconditions.assert_class('event_id', opts.delete(:event_id), String)
|
13537
|
+
@timestamp = HttpClient::Preconditions.assert_class('timestamp', HttpClient::Helper.to_date_time_iso8601(opts.delete(:timestamp)), DateTime)
|
13538
|
+
@organization = HttpClient::Preconditions.assert_class('organization', opts.delete(:organization), String)
|
13539
|
+
@id = HttpClient::Preconditions.assert_class('id', opts.delete(:id), String)
|
13540
|
+
end
|
13541
|
+
|
13542
|
+
def to_json
|
13543
|
+
JSON.dump(to_hash)
|
13544
|
+
end
|
13545
|
+
|
13546
|
+
def copy(incoming={})
|
13547
|
+
AllocationDeletedV2.new(subtype_to_hash.merge(HttpClient::Helper.symbolize_keys(incoming)))
|
13548
|
+
end
|
13549
|
+
|
13550
|
+
def subtype_to_hash
|
13551
|
+
{
|
13552
|
+
:event_id => event_id,
|
13553
|
+
:timestamp => timestamp,
|
13554
|
+
:organization => organization,
|
13555
|
+
:id => id
|
13556
|
+
}
|
13557
|
+
end
|
13558
|
+
|
13559
|
+
end
|
13560
|
+
|
13200
13561
|
# Represents any component that is not VAT or duty, such as item price,
|
13201
13562
|
# rounding, shipping, etc.
|
13202
13563
|
class AllocationDetailComponent < AllocationComponent
|
@@ -13340,21 +13701,16 @@ module Io
|
|
13340
13701
|
|
13341
13702
|
end
|
13342
13703
|
|
13343
|
-
class
|
13704
|
+
class AllocationOrderSummary
|
13344
13705
|
|
13345
|
-
attr_reader :
|
13706
|
+
attr_reader :id, :number, :submitted_at
|
13346
13707
|
|
13347
13708
|
def initialize(incoming={})
|
13348
|
-
super(:discriminator => Event::Types::ALLOCATION_UPSERTED)
|
13349
13709
|
opts = HttpClient::Helper.symbolize_keys(incoming)
|
13350
|
-
HttpClient::Preconditions.require_keys(opts, [:
|
13351
|
-
@event_id = HttpClient::Preconditions.assert_class('event_id', opts.delete(:event_id), String)
|
13352
|
-
@timestamp = HttpClient::Preconditions.assert_class('timestamp', HttpClient::Helper.to_date_time_iso8601(opts.delete(:timestamp)), DateTime)
|
13710
|
+
HttpClient::Preconditions.require_keys(opts, [:id, :number], 'AllocationOrderSummary')
|
13353
13711
|
@id = HttpClient::Preconditions.assert_class('id', opts.delete(:id), String)
|
13354
|
-
@
|
13355
|
-
@
|
13356
|
-
@order_number = HttpClient::Preconditions.assert_class('order_number', opts.delete(:order_number), String)
|
13357
|
-
@details = HttpClient::Preconditions.assert_class('details', opts.delete(:details), Array).map { |v| HttpClient::Preconditions.assert_class('details', HttpClient::Helper.to_object(v), Hash) }
|
13712
|
+
@number = HttpClient::Preconditions.assert_class('number', opts.delete(:number), String)
|
13713
|
+
@submitted_at = (x = opts.delete(:submitted_at); x.nil? ? nil : HttpClient::Preconditions.assert_class('submitted_at', HttpClient::Helper.to_date_time_iso8601(x), DateTime))
|
13358
13714
|
end
|
13359
13715
|
|
13360
13716
|
def to_json
|
@@ -13362,7 +13718,42 @@ module Io
|
|
13362
13718
|
end
|
13363
13719
|
|
13364
13720
|
def copy(incoming={})
|
13365
|
-
|
13721
|
+
AllocationOrderSummary.new(to_hash.merge(HttpClient::Helper.symbolize_keys(incoming)))
|
13722
|
+
end
|
13723
|
+
|
13724
|
+
def to_hash
|
13725
|
+
{
|
13726
|
+
:id => id,
|
13727
|
+
:number => number,
|
13728
|
+
:submitted_at => submitted_at
|
13729
|
+
}
|
13730
|
+
end
|
13731
|
+
|
13732
|
+
end
|
13733
|
+
|
13734
|
+
class AllocationUpserted < Event
|
13735
|
+
|
13736
|
+
attr_reader :event_id, :timestamp, :id, :organization, :order_id, :order_number, :details
|
13737
|
+
|
13738
|
+
def initialize(incoming={})
|
13739
|
+
super(:discriminator => Event::Types::ALLOCATION_UPSERTED)
|
13740
|
+
opts = HttpClient::Helper.symbolize_keys(incoming)
|
13741
|
+
HttpClient::Preconditions.require_keys(opts, [:event_id, :timestamp, :id, :organization, :order_id, :order_number, :details], 'AllocationUpserted')
|
13742
|
+
@event_id = HttpClient::Preconditions.assert_class('event_id', opts.delete(:event_id), String)
|
13743
|
+
@timestamp = HttpClient::Preconditions.assert_class('timestamp', HttpClient::Helper.to_date_time_iso8601(opts.delete(:timestamp)), DateTime)
|
13744
|
+
@id = HttpClient::Preconditions.assert_class('id', opts.delete(:id), String)
|
13745
|
+
@organization = HttpClient::Preconditions.assert_class('organization', opts.delete(:organization), String)
|
13746
|
+
@order_id = HttpClient::Preconditions.assert_class('order_id', opts.delete(:order_id), String)
|
13747
|
+
@order_number = HttpClient::Preconditions.assert_class('order_number', opts.delete(:order_number), String)
|
13748
|
+
@details = HttpClient::Preconditions.assert_class('details', opts.delete(:details), Array).map { |v| HttpClient::Preconditions.assert_class('details', HttpClient::Helper.to_object(v), Hash) }
|
13749
|
+
end
|
13750
|
+
|
13751
|
+
def to_json
|
13752
|
+
JSON.dump(to_hash)
|
13753
|
+
end
|
13754
|
+
|
13755
|
+
def copy(incoming={})
|
13756
|
+
AllocationUpserted.new(subtype_to_hash.merge(HttpClient::Helper.symbolize_keys(incoming)))
|
13366
13757
|
end
|
13367
13758
|
|
13368
13759
|
def subtype_to_hash
|
@@ -13379,6 +13770,71 @@ module Io
|
|
13379
13770
|
|
13380
13771
|
end
|
13381
13772
|
|
13773
|
+
class AllocationUpsertedV2 < Event
|
13774
|
+
|
13775
|
+
attr_reader :event_id, :timestamp, :organization, :allocation
|
13776
|
+
|
13777
|
+
def initialize(incoming={})
|
13778
|
+
super(:discriminator => Event::Types::ALLOCATION_UPSERTED_V2)
|
13779
|
+
opts = HttpClient::Helper.symbolize_keys(incoming)
|
13780
|
+
HttpClient::Preconditions.require_keys(opts, [:event_id, :timestamp, :organization, :allocation], 'AllocationUpsertedV2')
|
13781
|
+
@event_id = HttpClient::Preconditions.assert_class('event_id', opts.delete(:event_id), String)
|
13782
|
+
@timestamp = HttpClient::Preconditions.assert_class('timestamp', HttpClient::Helper.to_date_time_iso8601(opts.delete(:timestamp)), DateTime)
|
13783
|
+
@organization = HttpClient::Preconditions.assert_class('organization', opts.delete(:organization), String)
|
13784
|
+
@allocation = (x = opts.delete(:allocation); x.is_a?(::Io::Flow::V0::Models::AllocationV2) ? x : ::Io::Flow::V0::Models::AllocationV2.new(x))
|
13785
|
+
end
|
13786
|
+
|
13787
|
+
def to_json
|
13788
|
+
JSON.dump(to_hash)
|
13789
|
+
end
|
13790
|
+
|
13791
|
+
def copy(incoming={})
|
13792
|
+
AllocationUpsertedV2.new(subtype_to_hash.merge(HttpClient::Helper.symbolize_keys(incoming)))
|
13793
|
+
end
|
13794
|
+
|
13795
|
+
def subtype_to_hash
|
13796
|
+
{
|
13797
|
+
:event_id => event_id,
|
13798
|
+
:timestamp => timestamp,
|
13799
|
+
:organization => organization,
|
13800
|
+
:allocation => allocation.to_hash
|
13801
|
+
}
|
13802
|
+
end
|
13803
|
+
|
13804
|
+
end
|
13805
|
+
|
13806
|
+
class AllocationV2
|
13807
|
+
|
13808
|
+
attr_reader :id, :order, :details, :total
|
13809
|
+
|
13810
|
+
def initialize(incoming={})
|
13811
|
+
opts = HttpClient::Helper.symbolize_keys(incoming)
|
13812
|
+
HttpClient::Preconditions.require_keys(opts, [:id, :order, :details, :total], 'AllocationV2')
|
13813
|
+
@id = HttpClient::Preconditions.assert_class('id', opts.delete(:id), String)
|
13814
|
+
@order = (x = opts.delete(:order); x.is_a?(::Io::Flow::V0::Models::AllocationOrderSummary) ? x : ::Io::Flow::V0::Models::AllocationOrderSummary.new(x))
|
13815
|
+
@details = HttpClient::Preconditions.assert_class('details', opts.delete(:details), Array).map { |v| (x = v; x.is_a?(::Io::Flow::V0::Models::AllocationDetail) ? x : ::Io::Flow::V0::Models::AllocationDetail.from_json(x)) }
|
13816
|
+
@total = (x = opts.delete(:total); x.is_a?(::Io::Flow::V0::Models::LocalizedTotal) ? x : ::Io::Flow::V0::Models::LocalizedTotal.new(x))
|
13817
|
+
end
|
13818
|
+
|
13819
|
+
def to_json
|
13820
|
+
JSON.dump(to_hash)
|
13821
|
+
end
|
13822
|
+
|
13823
|
+
def copy(incoming={})
|
13824
|
+
AllocationV2.new(to_hash.merge(HttpClient::Helper.symbolize_keys(incoming)))
|
13825
|
+
end
|
13826
|
+
|
13827
|
+
def to_hash
|
13828
|
+
{
|
13829
|
+
:id => id,
|
13830
|
+
:order => order.to_hash,
|
13831
|
+
:details => details.map { |o| o.to_hash },
|
13832
|
+
:total => total.to_hash
|
13833
|
+
}
|
13834
|
+
end
|
13835
|
+
|
13836
|
+
end
|
13837
|
+
|
13382
13838
|
# Rule outcome where shipping surfaced in quote is actual cost plus a predefined
|
13383
13839
|
# margin price
|
13384
13840
|
class AmountMargin < TierRuleOutcome
|
@@ -13467,7 +13923,7 @@ module Io
|
|
13467
13923
|
# then be displayed throughout the Flow console.
|
13468
13924
|
class Attribute
|
13469
13925
|
|
13470
|
-
attr_reader :id, :key, :options, :label, :intent, :type
|
13926
|
+
attr_reader :id, :key, :options, :label, :intent, :type, :position
|
13471
13927
|
|
13472
13928
|
def initialize(incoming={})
|
13473
13929
|
opts = HttpClient::Helper.symbolize_keys(incoming)
|
@@ -13478,6 +13934,7 @@ module Io
|
|
13478
13934
|
@label = (x = opts.delete(:label); x.nil? ? nil : HttpClient::Preconditions.assert_class('label', x, String))
|
13479
13935
|
@intent = (x = opts.delete(:intent); x.nil? ? nil : (x = x; x.is_a?(::Io::Flow::V0::Models::AttributeIntent) ? x : ::Io::Flow::V0::Models::AttributeIntent.apply(x)))
|
13480
13936
|
@type = (x = opts.delete(:type); x.nil? ? nil : (x = x; x.is_a?(::Io::Flow::V0::Models::AttributeDataType) ? x : ::Io::Flow::V0::Models::AttributeDataType.apply(x)))
|
13937
|
+
@position = (x = opts.delete(:position); x.nil? ? nil : HttpClient::Preconditions.assert_class('position', x, Integer))
|
13481
13938
|
end
|
13482
13939
|
|
13483
13940
|
def to_json
|
@@ -13495,7 +13952,8 @@ module Io
|
|
13495
13952
|
:options => options.to_hash,
|
13496
13953
|
:label => label,
|
13497
13954
|
:intent => intent.nil? ? nil : intent.value,
|
13498
|
-
:type => type.nil? ? nil : type.value
|
13955
|
+
:type => type.nil? ? nil : type.value,
|
13956
|
+
:position => position
|
13499
13957
|
}
|
13500
13958
|
end
|
13501
13959
|
|
@@ -13534,9 +13992,42 @@ module Io
|
|
13534
13992
|
|
13535
13993
|
end
|
13536
13994
|
|
13995
|
+
class AttributeDeletedV2 < Event
|
13996
|
+
|
13997
|
+
attr_reader :event_id, :timestamp, :organization, :id
|
13998
|
+
|
13999
|
+
def initialize(incoming={})
|
14000
|
+
super(:discriminator => Event::Types::ATTRIBUTE_DELETED_V2)
|
14001
|
+
opts = HttpClient::Helper.symbolize_keys(incoming)
|
14002
|
+
HttpClient::Preconditions.require_keys(opts, [:event_id, :timestamp, :organization, :id], 'AttributeDeletedV2')
|
14003
|
+
@event_id = HttpClient::Preconditions.assert_class('event_id', opts.delete(:event_id), String)
|
14004
|
+
@timestamp = HttpClient::Preconditions.assert_class('timestamp', HttpClient::Helper.to_date_time_iso8601(opts.delete(:timestamp)), DateTime)
|
14005
|
+
@organization = HttpClient::Preconditions.assert_class('organization', opts.delete(:organization), String)
|
14006
|
+
@id = HttpClient::Preconditions.assert_class('id', opts.delete(:id), String)
|
14007
|
+
end
|
14008
|
+
|
14009
|
+
def to_json
|
14010
|
+
JSON.dump(to_hash)
|
14011
|
+
end
|
14012
|
+
|
14013
|
+
def copy(incoming={})
|
14014
|
+
AttributeDeletedV2.new(subtype_to_hash.merge(HttpClient::Helper.symbolize_keys(incoming)))
|
14015
|
+
end
|
14016
|
+
|
14017
|
+
def subtype_to_hash
|
14018
|
+
{
|
14019
|
+
:event_id => event_id,
|
14020
|
+
:timestamp => timestamp,
|
14021
|
+
:organization => organization,
|
14022
|
+
:id => id
|
14023
|
+
}
|
14024
|
+
end
|
14025
|
+
|
14026
|
+
end
|
14027
|
+
|
13537
14028
|
class AttributeForm
|
13538
14029
|
|
13539
|
-
attr_reader :key, :options, :label, :intent, :type
|
14030
|
+
attr_reader :key, :options, :label, :intent, :type, :position
|
13540
14031
|
|
13541
14032
|
def initialize(incoming={})
|
13542
14033
|
opts = HttpClient::Helper.symbolize_keys(incoming)
|
@@ -13546,6 +14037,7 @@ module Io
|
|
13546
14037
|
@label = (x = opts.delete(:label); x.nil? ? nil : HttpClient::Preconditions.assert_class('label', x, String))
|
13547
14038
|
@intent = (x = opts.delete(:intent); x.nil? ? nil : (x = x; x.is_a?(::Io::Flow::V0::Models::AttributeIntent) ? x : ::Io::Flow::V0::Models::AttributeIntent.apply(x)))
|
13548
14039
|
@type = (x = opts.delete(:type); x.nil? ? nil : (x = x; x.is_a?(::Io::Flow::V0::Models::AttributeDataType) ? x : ::Io::Flow::V0::Models::AttributeDataType.apply(x)))
|
14040
|
+
@position = (x = opts.delete(:position); x.nil? ? nil : HttpClient::Preconditions.assert_class('position', x, Integer))
|
13549
14041
|
end
|
13550
14042
|
|
13551
14043
|
def to_json
|
@@ -13562,7 +14054,8 @@ module Io
|
|
13562
14054
|
:options => options.to_hash,
|
13563
14055
|
:label => label,
|
13564
14056
|
:intent => intent.nil? ? nil : intent.value,
|
13565
|
-
:type => type.nil? ? nil : type.value
|
14057
|
+
:type => type.nil? ? nil : type.value,
|
14058
|
+
:position => position
|
13566
14059
|
}
|
13567
14060
|
end
|
13568
14061
|
|
@@ -13607,6 +14100,39 @@ module Io
|
|
13607
14100
|
|
13608
14101
|
end
|
13609
14102
|
|
14103
|
+
class AttributeUpsertedV2 < Event
|
14104
|
+
|
14105
|
+
attr_reader :event_id, :timestamp, :organization, :attribute
|
14106
|
+
|
14107
|
+
def initialize(incoming={})
|
14108
|
+
super(:discriminator => Event::Types::ATTRIBUTE_UPSERTED_V2)
|
14109
|
+
opts = HttpClient::Helper.symbolize_keys(incoming)
|
14110
|
+
HttpClient::Preconditions.require_keys(opts, [:event_id, :timestamp, :organization, :attribute], 'AttributeUpsertedV2')
|
14111
|
+
@event_id = HttpClient::Preconditions.assert_class('event_id', opts.delete(:event_id), String)
|
14112
|
+
@timestamp = HttpClient::Preconditions.assert_class('timestamp', HttpClient::Helper.to_date_time_iso8601(opts.delete(:timestamp)), DateTime)
|
14113
|
+
@organization = HttpClient::Preconditions.assert_class('organization', opts.delete(:organization), String)
|
14114
|
+
@attribute = (x = opts.delete(:attribute); x.is_a?(::Io::Flow::V0::Models::Attribute) ? x : ::Io::Flow::V0::Models::Attribute.new(x))
|
14115
|
+
end
|
14116
|
+
|
14117
|
+
def to_json
|
14118
|
+
JSON.dump(to_hash)
|
14119
|
+
end
|
14120
|
+
|
14121
|
+
def copy(incoming={})
|
14122
|
+
AttributeUpsertedV2.new(subtype_to_hash.merge(HttpClient::Helper.symbolize_keys(incoming)))
|
14123
|
+
end
|
14124
|
+
|
14125
|
+
def subtype_to_hash
|
14126
|
+
{
|
14127
|
+
:event_id => event_id,
|
14128
|
+
:timestamp => timestamp,
|
14129
|
+
:organization => organization,
|
14130
|
+
:attribute => attribute.to_hash
|
14131
|
+
}
|
14132
|
+
end
|
14133
|
+
|
14134
|
+
end
|
14135
|
+
|
13610
14136
|
# Retrieve journaled history of an attribute
|
13611
14137
|
class AttributeVersion
|
13612
14138
|
|
@@ -15701,6 +16227,70 @@ module Io
|
|
15701
16227
|
|
15702
16228
|
end
|
15703
16229
|
|
16230
|
+
# A Checkout Item Content provides information about an item to support
|
16231
|
+
# rendering of that item in the context of checkout
|
16232
|
+
class CheckoutItemContent
|
16233
|
+
|
16234
|
+
attr_reader :item, :name, :description, :attributes, :image
|
16235
|
+
|
16236
|
+
def initialize(incoming={})
|
16237
|
+
opts = HttpClient::Helper.symbolize_keys(incoming)
|
16238
|
+
HttpClient::Preconditions.require_keys(opts, [:item, :name, :attributes], 'CheckoutItemContent')
|
16239
|
+
@item = (x = opts.delete(:item); x.is_a?(::Io::Flow::V0::Models::Item) ? x : ::Io::Flow::V0::Models::Item.new(x))
|
16240
|
+
@name = HttpClient::Preconditions.assert_class('name', opts.delete(:name), String)
|
16241
|
+
@description = (x = opts.delete(:description); x.nil? ? nil : HttpClient::Preconditions.assert_class('description', x, String))
|
16242
|
+
@attributes = HttpClient::Preconditions.assert_class('attributes', opts.delete(:attributes), Array).map { |v| (x = v; x.is_a?(::Io::Flow::V0::Models::CheckoutItemContentAttribute) ? x : ::Io::Flow::V0::Models::CheckoutItemContentAttribute.new(x)) }
|
16243
|
+
@image = (x = opts.delete(:image); x.nil? ? nil : (x = x; x.is_a?(::Io::Flow::V0::Models::Image) ? x : ::Io::Flow::V0::Models::Image.new(x)))
|
16244
|
+
end
|
16245
|
+
|
16246
|
+
def to_json
|
16247
|
+
JSON.dump(to_hash)
|
16248
|
+
end
|
16249
|
+
|
16250
|
+
def copy(incoming={})
|
16251
|
+
CheckoutItemContent.new(to_hash.merge(HttpClient::Helper.symbolize_keys(incoming)))
|
16252
|
+
end
|
16253
|
+
|
16254
|
+
def to_hash
|
16255
|
+
{
|
16256
|
+
:item => item.to_hash,
|
16257
|
+
:name => name,
|
16258
|
+
:description => description,
|
16259
|
+
:attributes => attributes.map { |o| o.to_hash },
|
16260
|
+
:image => image.nil? ? nil : image.to_hash
|
16261
|
+
}
|
16262
|
+
end
|
16263
|
+
|
16264
|
+
end
|
16265
|
+
|
16266
|
+
class CheckoutItemContentAttribute
|
16267
|
+
|
16268
|
+
attr_reader :key, :value
|
16269
|
+
|
16270
|
+
def initialize(incoming={})
|
16271
|
+
opts = HttpClient::Helper.symbolize_keys(incoming)
|
16272
|
+
HttpClient::Preconditions.require_keys(opts, [:key, :value], 'CheckoutItemContentAttribute')
|
16273
|
+
@key = HttpClient::Preconditions.assert_class('key', opts.delete(:key), String)
|
16274
|
+
@value = HttpClient::Preconditions.assert_class('value', opts.delete(:value), String)
|
16275
|
+
end
|
16276
|
+
|
16277
|
+
def to_json
|
16278
|
+
JSON.dump(to_hash)
|
16279
|
+
end
|
16280
|
+
|
16281
|
+
def copy(incoming={})
|
16282
|
+
CheckoutItemContentAttribute.new(to_hash.merge(HttpClient::Helper.symbolize_keys(incoming)))
|
16283
|
+
end
|
16284
|
+
|
16285
|
+
def to_hash
|
16286
|
+
{
|
16287
|
+
:key => key,
|
16288
|
+
:value => value
|
16289
|
+
}
|
16290
|
+
end
|
16291
|
+
|
16292
|
+
end
|
16293
|
+
|
15704
16294
|
# The actual value of the API token. This is modeled as a separate resource as
|
15705
16295
|
# it is fetched only on demand.
|
15706
16296
|
class Cleartext
|
@@ -17361,6 +17951,132 @@ module Io
|
|
17361
17951
|
|
17362
17952
|
end
|
17363
17953
|
|
17954
|
+
class ExperiencePriceBookMapping
|
17955
|
+
|
17956
|
+
attr_reader :id, :experience, :price_book, :position
|
17957
|
+
|
17958
|
+
def initialize(incoming={})
|
17959
|
+
opts = HttpClient::Helper.symbolize_keys(incoming)
|
17960
|
+
HttpClient::Preconditions.require_keys(opts, [:id, :experience, :price_book, :position], 'ExperiencePriceBookMapping')
|
17961
|
+
@id = HttpClient::Preconditions.assert_class('id', opts.delete(:id), String)
|
17962
|
+
@experience = (x = opts.delete(:experience); x.is_a?(::Io::Flow::V0::Models::ExperienceReference) ? x : ::Io::Flow::V0::Models::ExperienceReference.new(x))
|
17963
|
+
@price_book = (x = opts.delete(:price_book); x.is_a?(::Io::Flow::V0::Models::PriceBookReference) ? x : ::Io::Flow::V0::Models::PriceBookReference.new(x))
|
17964
|
+
@position = HttpClient::Preconditions.assert_class('position', opts.delete(:position), Integer)
|
17965
|
+
end
|
17966
|
+
|
17967
|
+
def to_json
|
17968
|
+
JSON.dump(to_hash)
|
17969
|
+
end
|
17970
|
+
|
17971
|
+
def copy(incoming={})
|
17972
|
+
ExperiencePriceBookMapping.new(to_hash.merge(HttpClient::Helper.symbolize_keys(incoming)))
|
17973
|
+
end
|
17974
|
+
|
17975
|
+
def to_hash
|
17976
|
+
{
|
17977
|
+
:id => id,
|
17978
|
+
:experience => experience.to_hash,
|
17979
|
+
:price_book => price_book.to_hash,
|
17980
|
+
:position => position
|
17981
|
+
}
|
17982
|
+
end
|
17983
|
+
|
17984
|
+
end
|
17985
|
+
|
17986
|
+
class ExperiencePriceBookMappingDeleted < Event
|
17987
|
+
|
17988
|
+
attr_reader :event_id, :timestamp, :organization, :id
|
17989
|
+
|
17990
|
+
def initialize(incoming={})
|
17991
|
+
super(:discriminator => Event::Types::EXPERIENCE_PRICE_BOOK_MAPPING_DELETED)
|
17992
|
+
opts = HttpClient::Helper.symbolize_keys(incoming)
|
17993
|
+
HttpClient::Preconditions.require_keys(opts, [:event_id, :timestamp, :organization, :id], 'ExperiencePriceBookMappingDeleted')
|
17994
|
+
@event_id = HttpClient::Preconditions.assert_class('event_id', opts.delete(:event_id), String)
|
17995
|
+
@timestamp = HttpClient::Preconditions.assert_class('timestamp', HttpClient::Helper.to_date_time_iso8601(opts.delete(:timestamp)), DateTime)
|
17996
|
+
@organization = HttpClient::Preconditions.assert_class('organization', opts.delete(:organization), String)
|
17997
|
+
@id = HttpClient::Preconditions.assert_class('id', opts.delete(:id), String)
|
17998
|
+
end
|
17999
|
+
|
18000
|
+
def to_json
|
18001
|
+
JSON.dump(to_hash)
|
18002
|
+
end
|
18003
|
+
|
18004
|
+
def copy(incoming={})
|
18005
|
+
ExperiencePriceBookMappingDeleted.new(subtype_to_hash.merge(HttpClient::Helper.symbolize_keys(incoming)))
|
18006
|
+
end
|
18007
|
+
|
18008
|
+
def subtype_to_hash
|
18009
|
+
{
|
18010
|
+
:event_id => event_id,
|
18011
|
+
:timestamp => timestamp,
|
18012
|
+
:organization => organization,
|
18013
|
+
:id => id
|
18014
|
+
}
|
18015
|
+
end
|
18016
|
+
|
18017
|
+
end
|
18018
|
+
|
18019
|
+
class ExperiencePriceBookMappingForm
|
18020
|
+
|
18021
|
+
attr_reader :price_book_key, :position
|
18022
|
+
|
18023
|
+
def initialize(incoming={})
|
18024
|
+
opts = HttpClient::Helper.symbolize_keys(incoming)
|
18025
|
+
HttpClient::Preconditions.require_keys(opts, [:price_book_key], 'ExperiencePriceBookMappingForm')
|
18026
|
+
@price_book_key = HttpClient::Preconditions.assert_class('price_book_key', opts.delete(:price_book_key), String)
|
18027
|
+
@position = (x = opts.delete(:position); x.nil? ? nil : HttpClient::Preconditions.assert_class('position', x, Integer))
|
18028
|
+
end
|
18029
|
+
|
18030
|
+
def to_json
|
18031
|
+
JSON.dump(to_hash)
|
18032
|
+
end
|
18033
|
+
|
18034
|
+
def copy(incoming={})
|
18035
|
+
ExperiencePriceBookMappingForm.new(to_hash.merge(HttpClient::Helper.symbolize_keys(incoming)))
|
18036
|
+
end
|
18037
|
+
|
18038
|
+
def to_hash
|
18039
|
+
{
|
18040
|
+
:price_book_key => price_book_key,
|
18041
|
+
:position => position
|
18042
|
+
}
|
18043
|
+
end
|
18044
|
+
|
18045
|
+
end
|
18046
|
+
|
18047
|
+
class ExperiencePriceBookMappingUpserted < Event
|
18048
|
+
|
18049
|
+
attr_reader :event_id, :timestamp, :organization, :experience_price_book_mapping
|
18050
|
+
|
18051
|
+
def initialize(incoming={})
|
18052
|
+
super(:discriminator => Event::Types::EXPERIENCE_PRICE_BOOK_MAPPING_UPSERTED)
|
18053
|
+
opts = HttpClient::Helper.symbolize_keys(incoming)
|
18054
|
+
HttpClient::Preconditions.require_keys(opts, [:event_id, :timestamp, :organization, :experience_price_book_mapping], 'ExperiencePriceBookMappingUpserted')
|
18055
|
+
@event_id = HttpClient::Preconditions.assert_class('event_id', opts.delete(:event_id), String)
|
18056
|
+
@timestamp = HttpClient::Preconditions.assert_class('timestamp', HttpClient::Helper.to_date_time_iso8601(opts.delete(:timestamp)), DateTime)
|
18057
|
+
@organization = HttpClient::Preconditions.assert_class('organization', opts.delete(:organization), String)
|
18058
|
+
@experience_price_book_mapping = (x = opts.delete(:experience_price_book_mapping); x.is_a?(::Io::Flow::V0::Models::ExperiencePriceBookMapping) ? x : ::Io::Flow::V0::Models::ExperiencePriceBookMapping.new(x))
|
18059
|
+
end
|
18060
|
+
|
18061
|
+
def to_json
|
18062
|
+
JSON.dump(to_hash)
|
18063
|
+
end
|
18064
|
+
|
18065
|
+
def copy(incoming={})
|
18066
|
+
ExperiencePriceBookMappingUpserted.new(subtype_to_hash.merge(HttpClient::Helper.symbolize_keys(incoming)))
|
18067
|
+
end
|
18068
|
+
|
18069
|
+
def subtype_to_hash
|
18070
|
+
{
|
18071
|
+
:event_id => event_id,
|
18072
|
+
:timestamp => timestamp,
|
18073
|
+
:organization => organization,
|
18074
|
+
:experience_price_book_mapping => experience_price_book_mapping.to_hash
|
18075
|
+
}
|
18076
|
+
end
|
18077
|
+
|
18078
|
+
end
|
18079
|
+
|
17364
18080
|
class ExperienceReference < ExpandableExperience
|
17365
18081
|
|
17366
18082
|
attr_reader :key
|
@@ -17984,7 +18700,7 @@ module Io
|
|
17984
18700
|
@key = HttpClient::Preconditions.assert_class('key', opts.delete(:key), String)
|
17985
18701
|
@number = HttpClient::Preconditions.assert_class('number', opts.delete(:number), String)
|
17986
18702
|
@items = HttpClient::Preconditions.assert_class('items', opts.delete(:items), Array).map { |v| (x = v; x.is_a?(::Io::Flow::V0::Models::FulfillmentItem) ? x : ::Io::Flow::V0::Models::FulfillmentItem.new(x)) }
|
17987
|
-
@center = (x = opts.delete(:center); x.nil? ? nil :
|
18703
|
+
@center = (x = opts.delete(:center); x.nil? ? nil : (x = x; x.is_a?(::Io::Flow::V0::Models::CenterSummary) ? x : ::Io::Flow::V0::Models::CenterSummary.new(x)))
|
17988
18704
|
end
|
17989
18705
|
|
17990
18706
|
def to_json
|
@@ -18001,7 +18717,7 @@ module Io
|
|
18001
18717
|
:key => key,
|
18002
18718
|
:number => number,
|
18003
18719
|
:items => items.map { |o| o.to_hash },
|
18004
|
-
:center => center.nil? ? nil : center.
|
18720
|
+
:center => center.nil? ? nil : center.to_hash
|
18005
18721
|
}
|
18006
18722
|
end
|
18007
18723
|
|
@@ -19377,7 +20093,7 @@ module Io
|
|
19377
20093
|
opts = HttpClient::Helper.symbolize_keys(incoming)
|
19378
20094
|
HttpClient::Preconditions.require_keys(opts, [:url], 'Image')
|
19379
20095
|
@url = HttpClient::Preconditions.assert_class('url', opts.delete(:url), String)
|
19380
|
-
@tags = HttpClient::Preconditions.assert_class('tags', (x = opts.delete(:tags); x.nil? ? [] : x), Array).map { |v|
|
20096
|
+
@tags = HttpClient::Preconditions.assert_class('tags', (x = opts.delete(:tags); x.nil? ? [] : x), Array).map { |v| (x = v; x.is_a?(::Io::Flow::V0::Models::ImageTag) ? x : ::Io::Flow::V0::Models::ImageTag.apply(x)) }
|
19381
20097
|
end
|
19382
20098
|
|
19383
20099
|
def to_json
|
@@ -19391,7 +20107,7 @@ module Io
|
|
19391
20107
|
def to_hash
|
19392
20108
|
{
|
19393
20109
|
:url => url,
|
19394
|
-
:tags => tags
|
20110
|
+
:tags => tags.map { |o| o.value }
|
19395
20111
|
}
|
19396
20112
|
end
|
19397
20113
|
|
@@ -19406,7 +20122,7 @@ module Io
|
|
19406
20122
|
opts = HttpClient::Helper.symbolize_keys(incoming)
|
19407
20123
|
HttpClient::Preconditions.require_keys(opts, [:url], 'ImageForm')
|
19408
20124
|
@url = HttpClient::Preconditions.assert_class('url', opts.delete(:url), String)
|
19409
|
-
@tags = (x = opts.delete(:tags); x.nil? ? nil : HttpClient::Preconditions.assert_class('tags', x, Array).map { |v|
|
20125
|
+
@tags = (x = opts.delete(:tags); x.nil? ? nil : HttpClient::Preconditions.assert_class('tags', x, Array).map { |v| (x = v; x.is_a?(::Io::Flow::V0::Models::ImageTag) ? x : ::Io::Flow::V0::Models::ImageTag.apply(x)) })
|
19410
20126
|
end
|
19411
20127
|
|
19412
20128
|
def to_json
|
@@ -19420,7 +20136,7 @@ module Io
|
|
19420
20136
|
def to_hash
|
19421
20137
|
{
|
19422
20138
|
:url => url,
|
19423
|
-
:tags => tags.nil? ? nil : tags
|
20139
|
+
:tags => tags.nil? ? nil : tags.map { |o| o.value }
|
19424
20140
|
}
|
19425
20141
|
end
|
19426
20142
|
|
@@ -21183,7 +21899,7 @@ module Io
|
|
21183
21899
|
|
21184
21900
|
class LabelUpserted < Event
|
21185
21901
|
|
21186
|
-
attr_reader :event_id, :timestamp, :organization, :label_id, :carrier_tracking_number, :commercial_invoice, :flow_tracking_number, :destination, :origin, :carrier, :service, :zpl, :pdf, :png, :order, :carrier_tracking_number_url, :flow_tracking_number_url, :center_key, :direction, :package
|
21902
|
+
attr_reader :event_id, :timestamp, :organization, :label_id, :carrier_tracking_number, :commercial_invoice, :flow_tracking_number, :destination, :origin, :carrier, :service, :zpl, :pdf, :png, :order, :carrier_tracking_number_url, :flow_tracking_number_url, :center_key, :direction, :package, :order_identifier, :fulfillment_key
|
21187
21903
|
|
21188
21904
|
def initialize(incoming={})
|
21189
21905
|
super(:discriminator => Event::Types::LABEL_UPSERTED)
|
@@ -21209,6 +21925,8 @@ module Io
|
|
21209
21925
|
@center_key = (x = opts.delete(:center_key); x.nil? ? nil : HttpClient::Preconditions.assert_class('center_key', x, String))
|
21210
21926
|
@direction = (x = opts.delete(:direction); x.nil? ? nil : HttpClient::Preconditions.assert_class('direction', x, String))
|
21211
21927
|
@package = (x = opts.delete(:package); x.nil? ? nil : HttpClient::Preconditions.assert_class('package', HttpClient::Helper.to_object(x), Hash))
|
21928
|
+
@order_identifier = (x = opts.delete(:order_identifier); x.nil? ? nil : HttpClient::Preconditions.assert_class('order_identifier', x, String))
|
21929
|
+
@fulfillment_key = (x = opts.delete(:fulfillment_key); x.nil? ? nil : HttpClient::Preconditions.assert_class('fulfillment_key', x, String))
|
21212
21930
|
end
|
21213
21931
|
|
21214
21932
|
def to_json
|
@@ -21240,7 +21958,9 @@ module Io
|
|
21240
21958
|
:flow_tracking_number_url => flow_tracking_number_url,
|
21241
21959
|
:center_key => center_key,
|
21242
21960
|
:direction => direction,
|
21243
|
-
:package => package
|
21961
|
+
:package => package,
|
21962
|
+
:order_identifier => order_identifier,
|
21963
|
+
:fulfillment_key => fulfillment_key
|
21244
21964
|
}
|
21245
21965
|
end
|
21246
21966
|
|
@@ -22104,7 +22824,7 @@ module Io
|
|
22104
22824
|
|
22105
22825
|
class ManifestedLabelUpserted < Event
|
22106
22826
|
|
22107
|
-
attr_reader :event_id, :timestamp, :organization, :id, :manifest_id, :label_id, :flow_tracking_number, :carrier_tracking_number
|
22827
|
+
attr_reader :event_id, :timestamp, :organization, :id, :manifest_id, :label_id, :flow_tracking_number, :carrier_tracking_number, :order_identifier, :fulfillment_key
|
22108
22828
|
|
22109
22829
|
def initialize(incoming={})
|
22110
22830
|
super(:discriminator => Event::Types::MANIFESTED_LABEL_UPSERTED)
|
@@ -22118,6 +22838,8 @@ module Io
|
|
22118
22838
|
@label_id = HttpClient::Preconditions.assert_class('label_id', opts.delete(:label_id), String)
|
22119
22839
|
@flow_tracking_number = HttpClient::Preconditions.assert_class('flow_tracking_number', opts.delete(:flow_tracking_number), String)
|
22120
22840
|
@carrier_tracking_number = HttpClient::Preconditions.assert_class('carrier_tracking_number', opts.delete(:carrier_tracking_number), String)
|
22841
|
+
@order_identifier = (x = opts.delete(:order_identifier); x.nil? ? nil : HttpClient::Preconditions.assert_class('order_identifier', x, String))
|
22842
|
+
@fulfillment_key = (x = opts.delete(:fulfillment_key); x.nil? ? nil : HttpClient::Preconditions.assert_class('fulfillment_key', x, String))
|
22121
22843
|
end
|
22122
22844
|
|
22123
22845
|
def to_json
|
@@ -22137,7 +22859,9 @@ module Io
|
|
22137
22859
|
:manifest_id => manifest_id,
|
22138
22860
|
:label_id => label_id,
|
22139
22861
|
:flow_tracking_number => flow_tracking_number,
|
22140
|
-
:carrier_tracking_number => carrier_tracking_number
|
22862
|
+
:carrier_tracking_number => carrier_tracking_number,
|
22863
|
+
:order_identifier => order_identifier,
|
22864
|
+
:fulfillment_key => fulfillment_key
|
22141
22865
|
}
|
22142
22866
|
end
|
22143
22867
|
|
@@ -22503,14 +23227,70 @@ module Io
|
|
22503
23227
|
|
22504
23228
|
end
|
22505
23229
|
|
22506
|
-
class Name
|
23230
|
+
class Name
|
23231
|
+
|
23232
|
+
attr_reader :first, :last
|
23233
|
+
|
23234
|
+
def initialize(incoming={})
|
23235
|
+
opts = HttpClient::Helper.symbolize_keys(incoming)
|
23236
|
+
@first = (x = opts.delete(:first); x.nil? ? nil : HttpClient::Preconditions.assert_class('first', x, String))
|
23237
|
+
@last = (x = opts.delete(:last); x.nil? ? nil : HttpClient::Preconditions.assert_class('last', x, String))
|
23238
|
+
end
|
23239
|
+
|
23240
|
+
def to_json
|
23241
|
+
JSON.dump(to_hash)
|
23242
|
+
end
|
23243
|
+
|
23244
|
+
def copy(incoming={})
|
23245
|
+
Name.new(to_hash.merge(HttpClient::Helper.symbolize_keys(incoming)))
|
23246
|
+
end
|
23247
|
+
|
23248
|
+
def to_hash
|
23249
|
+
{
|
23250
|
+
:first => first,
|
23251
|
+
:last => last
|
23252
|
+
}
|
23253
|
+
end
|
23254
|
+
|
23255
|
+
end
|
23256
|
+
|
23257
|
+
class NameForm
|
23258
|
+
|
23259
|
+
attr_reader :first, :last
|
23260
|
+
|
23261
|
+
def initialize(incoming={})
|
23262
|
+
opts = HttpClient::Helper.symbolize_keys(incoming)
|
23263
|
+
@first = (x = opts.delete(:first); x.nil? ? nil : HttpClient::Preconditions.assert_class('first', x, String))
|
23264
|
+
@last = (x = opts.delete(:last); x.nil? ? nil : HttpClient::Preconditions.assert_class('last', x, String))
|
23265
|
+
end
|
23266
|
+
|
23267
|
+
def to_json
|
23268
|
+
JSON.dump(to_hash)
|
23269
|
+
end
|
23270
|
+
|
23271
|
+
def copy(incoming={})
|
23272
|
+
NameForm.new(to_hash.merge(HttpClient::Helper.symbolize_keys(incoming)))
|
23273
|
+
end
|
23274
|
+
|
23275
|
+
def to_hash
|
23276
|
+
{
|
23277
|
+
:first => first,
|
23278
|
+
:last => last
|
23279
|
+
}
|
23280
|
+
end
|
23281
|
+
|
23282
|
+
end
|
23283
|
+
|
23284
|
+
class NoInventoryReservationError < ReservationError
|
22507
23285
|
|
22508
|
-
attr_reader :
|
23286
|
+
attr_reader :messages, :items
|
22509
23287
|
|
22510
23288
|
def initialize(incoming={})
|
23289
|
+
super(:code => ReservationError::Types::NO_INVENTORY_RESERVATION_ERROR)
|
22511
23290
|
opts = HttpClient::Helper.symbolize_keys(incoming)
|
22512
|
-
|
22513
|
-
@
|
23291
|
+
HttpClient::Preconditions.require_keys(opts, [:messages, :items], 'NoInventoryReservationError')
|
23292
|
+
@messages = HttpClient::Preconditions.assert_class('messages', opts.delete(:messages), Array).map { |v| HttpClient::Preconditions.assert_class('messages', v, String) }
|
23293
|
+
@items = HttpClient::Preconditions.assert_class('items', opts.delete(:items), Array).map { |v| (x = v; x.is_a?(::Io::Flow::V0::Models::NoInventoryReservationErrorItem) ? x : ::Io::Flow::V0::Models::NoInventoryReservationErrorItem.new(x)) }
|
22514
23294
|
end
|
22515
23295
|
|
22516
23296
|
def to_json
|
@@ -22518,26 +23298,28 @@ module Io
|
|
22518
23298
|
end
|
22519
23299
|
|
22520
23300
|
def copy(incoming={})
|
22521
|
-
|
23301
|
+
NoInventoryReservationError.new(subtype_to_hash.merge(HttpClient::Helper.symbolize_keys(incoming)))
|
22522
23302
|
end
|
22523
23303
|
|
22524
|
-
def
|
23304
|
+
def subtype_to_hash
|
22525
23305
|
{
|
22526
|
-
:
|
22527
|
-
:
|
23306
|
+
:messages => messages,
|
23307
|
+
:items => items.map { |o| o.to_hash }
|
22528
23308
|
}
|
22529
23309
|
end
|
22530
23310
|
|
22531
23311
|
end
|
22532
23312
|
|
22533
|
-
class
|
23313
|
+
class NoInventoryReservationErrorItem
|
22534
23314
|
|
22535
|
-
attr_reader :
|
23315
|
+
attr_reader :number, :requested_quantity, :available_quantity
|
22536
23316
|
|
22537
23317
|
def initialize(incoming={})
|
22538
23318
|
opts = HttpClient::Helper.symbolize_keys(incoming)
|
22539
|
-
|
22540
|
-
@
|
23319
|
+
HttpClient::Preconditions.require_keys(opts, [:number, :requested_quantity, :available_quantity], 'NoInventoryReservationErrorItem')
|
23320
|
+
@number = HttpClient::Preconditions.assert_class('number', opts.delete(:number), String)
|
23321
|
+
@requested_quantity = HttpClient::Preconditions.assert_class('requested_quantity', opts.delete(:requested_quantity), Integer)
|
23322
|
+
@available_quantity = HttpClient::Preconditions.assert_class('available_quantity', opts.delete(:available_quantity), Integer)
|
22541
23323
|
end
|
22542
23324
|
|
22543
23325
|
def to_json
|
@@ -22545,13 +23327,14 @@ module Io
|
|
22545
23327
|
end
|
22546
23328
|
|
22547
23329
|
def copy(incoming={})
|
22548
|
-
|
23330
|
+
NoInventoryReservationErrorItem.new(to_hash.merge(HttpClient::Helper.symbolize_keys(incoming)))
|
22549
23331
|
end
|
22550
23332
|
|
22551
23333
|
def to_hash
|
22552
23334
|
{
|
22553
|
-
:
|
22554
|
-
:
|
23335
|
+
:number => number,
|
23336
|
+
:requested_quantity => requested_quantity,
|
23337
|
+
:available_quantity => available_quantity
|
22555
23338
|
}
|
22556
23339
|
end
|
22557
23340
|
|
@@ -22981,6 +23764,35 @@ module Io
|
|
22981
23764
|
|
22982
23765
|
end
|
22983
23766
|
|
23767
|
+
# The Order Builder model is used to incrementally build up an order until it is
|
23768
|
+
# complete and can be submitted.
|
23769
|
+
class OrderBuilder
|
23770
|
+
|
23771
|
+
attr_reader :order, :errors
|
23772
|
+
|
23773
|
+
def initialize(incoming={})
|
23774
|
+
opts = HttpClient::Helper.symbolize_keys(incoming)
|
23775
|
+
@order = (x = opts.delete(:order); x.nil? ? nil : (x = x; x.is_a?(::Io::Flow::V0::Models::Order) ? x : ::Io::Flow::V0::Models::Order.new(x)))
|
23776
|
+
@errors = (x = opts.delete(:errors); x.nil? ? nil : HttpClient::Preconditions.assert_class('errors', x, Array).map { |v| (x = v; x.is_a?(::Io::Flow::V0::Models::OrderError) ? x : ::Io::Flow::V0::Models::OrderError.new(x)) })
|
23777
|
+
end
|
23778
|
+
|
23779
|
+
def to_json
|
23780
|
+
JSON.dump(to_hash)
|
23781
|
+
end
|
23782
|
+
|
23783
|
+
def copy(incoming={})
|
23784
|
+
OrderBuilder.new(to_hash.merge(HttpClient::Helper.symbolize_keys(incoming)))
|
23785
|
+
end
|
23786
|
+
|
23787
|
+
def to_hash
|
23788
|
+
{
|
23789
|
+
:order => order.nil? ? nil : order.to_hash,
|
23790
|
+
:errors => errors.nil? ? nil : errors.map { |o| o.to_hash }
|
23791
|
+
}
|
23792
|
+
end
|
23793
|
+
|
23794
|
+
end
|
23795
|
+
|
22984
23796
|
class OrderDeleted < Event
|
22985
23797
|
|
22986
23798
|
attr_reader :event_id, :timestamp, :organization, :number
|
@@ -25676,12 +26488,13 @@ module Io
|
|
25676
26488
|
# Represents the price of a single item within a price book.
|
25677
26489
|
class PriceBookItem
|
25678
26490
|
|
25679
|
-
attr_reader :id, :price_book, :price, :item_number, :schedule
|
26491
|
+
attr_reader :id, :key, :price_book, :price, :item_number, :schedule
|
25680
26492
|
|
25681
26493
|
def initialize(incoming={})
|
25682
26494
|
opts = HttpClient::Helper.symbolize_keys(incoming)
|
25683
|
-
HttpClient::Preconditions.require_keys(opts, [:id, :price_book, :price, :item_number, :schedule], 'PriceBookItem')
|
26495
|
+
HttpClient::Preconditions.require_keys(opts, [:id, :key, :price_book, :price, :item_number, :schedule], 'PriceBookItem')
|
25684
26496
|
@id = HttpClient::Preconditions.assert_class('id', opts.delete(:id), String)
|
26497
|
+
@key = HttpClient::Preconditions.assert_class('key', opts.delete(:key), String)
|
25685
26498
|
@price_book = (x = opts.delete(:price_book); x.is_a?(::Io::Flow::V0::Models::PriceBookReference) ? x : ::Io::Flow::V0::Models::PriceBookReference.new(x))
|
25686
26499
|
@price = (x = opts.delete(:price); x.is_a?(::Io::Flow::V0::Models::Price) ? x : ::Io::Flow::V0::Models::Price.new(x))
|
25687
26500
|
@item_number = HttpClient::Preconditions.assert_class('item_number', opts.delete(:item_number), String)
|
@@ -25699,6 +26512,7 @@ module Io
|
|
25699
26512
|
def to_hash
|
25700
26513
|
{
|
25701
26514
|
:id => id,
|
26515
|
+
:key => key,
|
25702
26516
|
:price_book => price_book.to_hash,
|
25703
26517
|
:price => price.to_hash,
|
25704
26518
|
:item_number => item_number,
|
@@ -25777,11 +26591,12 @@ module Io
|
|
25777
26591
|
# Represents schedule applied to a price book item
|
25778
26592
|
class PriceBookItemSchedule
|
25779
26593
|
|
25780
|
-
attr_reader :starts_at
|
26594
|
+
attr_reader :starts_at, :ends_at
|
25781
26595
|
|
25782
26596
|
def initialize(incoming={})
|
25783
26597
|
opts = HttpClient::Helper.symbolize_keys(incoming)
|
25784
26598
|
@starts_at = (x = opts.delete(:starts_at); x.nil? ? nil : HttpClient::Preconditions.assert_class('starts_at', HttpClient::Helper.to_date_time_iso8601(x), DateTime))
|
26599
|
+
@ends_at = (x = opts.delete(:ends_at); x.nil? ? nil : HttpClient::Preconditions.assert_class('ends_at', HttpClient::Helper.to_date_time_iso8601(x), DateTime))
|
25785
26600
|
end
|
25786
26601
|
|
25787
26602
|
def to_json
|
@@ -25794,7 +26609,8 @@ module Io
|
|
25794
26609
|
|
25795
26610
|
def to_hash
|
25796
26611
|
{
|
25797
|
-
:starts_at => starts_at
|
26612
|
+
:starts_at => starts_at,
|
26613
|
+
:ends_at => ends_at
|
25798
26614
|
}
|
25799
26615
|
end
|
25800
26616
|
|
@@ -25835,12 +26651,13 @@ module Io
|
|
25835
26651
|
|
25836
26652
|
class PriceBookReference
|
25837
26653
|
|
25838
|
-
attr_reader :id
|
26654
|
+
attr_reader :id, :key
|
25839
26655
|
|
25840
26656
|
def initialize(incoming={})
|
25841
26657
|
opts = HttpClient::Helper.symbolize_keys(incoming)
|
25842
|
-
HttpClient::Preconditions.require_keys(opts, [:id], 'PriceBookReference')
|
26658
|
+
HttpClient::Preconditions.require_keys(opts, [:id, :key], 'PriceBookReference')
|
25843
26659
|
@id = HttpClient::Preconditions.assert_class('id', opts.delete(:id), String)
|
26660
|
+
@key = HttpClient::Preconditions.assert_class('key', opts.delete(:key), String)
|
25844
26661
|
end
|
25845
26662
|
|
25846
26663
|
def to_json
|
@@ -25853,7 +26670,8 @@ module Io
|
|
25853
26670
|
|
25854
26671
|
def to_hash
|
25855
26672
|
{
|
25856
|
-
:id => id
|
26673
|
+
:id => id,
|
26674
|
+
:key => key
|
25857
26675
|
}
|
25858
26676
|
end
|
25859
26677
|
|
@@ -26913,7 +27731,7 @@ module Io
|
|
26913
27731
|
@amount = HttpClient::Preconditions.assert_class('amount', HttpClient::Helper.to_big_decimal(opts.delete(:amount)), BigDecimal)
|
26914
27732
|
@currency = HttpClient::Preconditions.assert_class('currency', opts.delete(:currency), String)
|
26915
27733
|
@requested = (x = opts.delete(:requested); x.nil? ? nil : (x = x; x.is_a?(::Io::Flow::V0::Models::Money) ? x : ::Io::Flow::V0::Models::Money.new(x)))
|
26916
|
-
@captures = HttpClient::Preconditions.assert_class('captures', opts.delete(:captures), Array).map { |v| (x = v; x.is_a?(::Io::Flow::V0::Models::
|
27734
|
+
@captures = HttpClient::Preconditions.assert_class('captures', opts.delete(:captures), Array).map { |v| (x = v; x.is_a?(::Io::Flow::V0::Models::RefundCaptureSummary) ? x : ::Io::Flow::V0::Models::RefundCaptureSummary.new(x)) }
|
26917
27735
|
@created_at = HttpClient::Preconditions.assert_class('created_at', HttpClient::Helper.to_date_time_iso8601(opts.delete(:created_at)), DateTime)
|
26918
27736
|
@attributes = (x = opts.delete(:attributes); x.nil? ? nil : HttpClient::Preconditions.assert_class('attributes', x, Hash).inject({}) { |h, d| h[d[0]] = HttpClient::Preconditions.assert_class('attributes', d[1], String); h })
|
26919
27737
|
end
|
@@ -26946,13 +27764,17 @@ module Io
|
|
26946
27764
|
# against a specific capture
|
26947
27765
|
class RefundCapture
|
26948
27766
|
|
26949
|
-
attr_reader :capture, :amount
|
27767
|
+
attr_reader :id, :refund, :capture, :amount, :currency, :base
|
26950
27768
|
|
26951
27769
|
def initialize(incoming={})
|
26952
27770
|
opts = HttpClient::Helper.symbolize_keys(incoming)
|
26953
|
-
HttpClient::Preconditions.require_keys(opts, [:capture, :amount], 'RefundCapture')
|
27771
|
+
HttpClient::Preconditions.require_keys(opts, [:id, :refund, :capture, :amount, :currency, :base], 'RefundCapture')
|
27772
|
+
@id = HttpClient::Preconditions.assert_class('id', opts.delete(:id), String)
|
27773
|
+
@refund = (x = opts.delete(:refund); x.is_a?(::Io::Flow::V0::Models::Refund) ? x : ::Io::Flow::V0::Models::Refund.new(x))
|
26954
27774
|
@capture = (x = opts.delete(:capture); x.is_a?(::Io::Flow::V0::Models::Capture) ? x : ::Io::Flow::V0::Models::Capture.new(x))
|
26955
27775
|
@amount = HttpClient::Preconditions.assert_class('amount', HttpClient::Helper.to_big_decimal(opts.delete(:amount)), BigDecimal)
|
27776
|
+
@currency = HttpClient::Preconditions.assert_class('currency', opts.delete(:currency), String)
|
27777
|
+
@base = (x = opts.delete(:base); x.is_a?(::Io::Flow::V0::Models::Money) ? x : ::Io::Flow::V0::Models::Money.new(x))
|
26956
27778
|
end
|
26957
27779
|
|
26958
27780
|
def to_json
|
@@ -26963,6 +27785,40 @@ module Io
|
|
26963
27785
|
RefundCapture.new(to_hash.merge(HttpClient::Helper.symbolize_keys(incoming)))
|
26964
27786
|
end
|
26965
27787
|
|
27788
|
+
def to_hash
|
27789
|
+
{
|
27790
|
+
:id => id,
|
27791
|
+
:refund => refund.to_hash,
|
27792
|
+
:capture => capture.to_hash,
|
27793
|
+
:amount => amount,
|
27794
|
+
:currency => currency,
|
27795
|
+
:base => base.to_hash
|
27796
|
+
}
|
27797
|
+
end
|
27798
|
+
|
27799
|
+
end
|
27800
|
+
|
27801
|
+
# Refund captures provide the detailed information on the amount refunded
|
27802
|
+
# against a specific capture
|
27803
|
+
class RefundCaptureSummary
|
27804
|
+
|
27805
|
+
attr_reader :capture, :amount
|
27806
|
+
|
27807
|
+
def initialize(incoming={})
|
27808
|
+
opts = HttpClient::Helper.symbolize_keys(incoming)
|
27809
|
+
HttpClient::Preconditions.require_keys(opts, [:capture, :amount], 'RefundCaptureSummary')
|
27810
|
+
@capture = (x = opts.delete(:capture); x.is_a?(::Io::Flow::V0::Models::Capture) ? x : ::Io::Flow::V0::Models::Capture.new(x))
|
27811
|
+
@amount = HttpClient::Preconditions.assert_class('amount', HttpClient::Helper.to_big_decimal(opts.delete(:amount)), BigDecimal)
|
27812
|
+
end
|
27813
|
+
|
27814
|
+
def to_json
|
27815
|
+
JSON.dump(to_hash)
|
27816
|
+
end
|
27817
|
+
|
27818
|
+
def copy(incoming={})
|
27819
|
+
RefundCaptureSummary.new(to_hash.merge(HttpClient::Helper.symbolize_keys(incoming)))
|
27820
|
+
end
|
27821
|
+
|
26966
27822
|
def to_hash
|
26967
27823
|
{
|
26968
27824
|
:capture => capture.to_hash,
|
@@ -26972,6 +27828,41 @@ module Io
|
|
26972
27828
|
|
26973
27829
|
end
|
26974
27830
|
|
27831
|
+
class RefundCaptureUpsertedV2 < Event
|
27832
|
+
|
27833
|
+
attr_reader :event_id, :timestamp, :organization, :id, :refund_capture
|
27834
|
+
|
27835
|
+
def initialize(incoming={})
|
27836
|
+
super(:discriminator => Event::Types::REFUND_CAPTURE_UPSERTED_V2)
|
27837
|
+
opts = HttpClient::Helper.symbolize_keys(incoming)
|
27838
|
+
HttpClient::Preconditions.require_keys(opts, [:event_id, :timestamp, :organization, :id, :refund_capture], 'RefundCaptureUpsertedV2')
|
27839
|
+
@event_id = HttpClient::Preconditions.assert_class('event_id', opts.delete(:event_id), String)
|
27840
|
+
@timestamp = HttpClient::Preconditions.assert_class('timestamp', HttpClient::Helper.to_date_time_iso8601(opts.delete(:timestamp)), DateTime)
|
27841
|
+
@organization = HttpClient::Preconditions.assert_class('organization', opts.delete(:organization), String)
|
27842
|
+
@id = HttpClient::Preconditions.assert_class('id', opts.delete(:id), String)
|
27843
|
+
@refund_capture = (x = opts.delete(:refund_capture); x.is_a?(::Io::Flow::V0::Models::RefundCapture) ? x : ::Io::Flow::V0::Models::RefundCapture.new(x))
|
27844
|
+
end
|
27845
|
+
|
27846
|
+
def to_json
|
27847
|
+
JSON.dump(to_hash)
|
27848
|
+
end
|
27849
|
+
|
27850
|
+
def copy(incoming={})
|
27851
|
+
RefundCaptureUpsertedV2.new(subtype_to_hash.merge(HttpClient::Helper.symbolize_keys(incoming)))
|
27852
|
+
end
|
27853
|
+
|
27854
|
+
def subtype_to_hash
|
27855
|
+
{
|
27856
|
+
:event_id => event_id,
|
27857
|
+
:timestamp => timestamp,
|
27858
|
+
:organization => organization,
|
27859
|
+
:id => id,
|
27860
|
+
:refund_capture => refund_capture.to_hash
|
27861
|
+
}
|
27862
|
+
end
|
27863
|
+
|
27864
|
+
end
|
27865
|
+
|
26975
27866
|
class RefundError
|
26976
27867
|
|
26977
27868
|
attr_reader :code, :messages, :decline_code
|
@@ -27349,6 +28240,176 @@ module Io
|
|
27349
28240
|
|
27350
28241
|
end
|
27351
28242
|
|
28243
|
+
# Inventory reservation for a set of items in organization that potentially
|
28244
|
+
# expires at specified date/time
|
28245
|
+
class Reservation
|
28246
|
+
|
28247
|
+
attr_reader :id, :key, :order, :items
|
28248
|
+
|
28249
|
+
def initialize(incoming={})
|
28250
|
+
opts = HttpClient::Helper.symbolize_keys(incoming)
|
28251
|
+
HttpClient::Preconditions.require_keys(opts, [:id, :key, :items], 'Reservation')
|
28252
|
+
@id = HttpClient::Preconditions.assert_class('id', opts.delete(:id), String)
|
28253
|
+
@key = HttpClient::Preconditions.assert_class('key', opts.delete(:key), String)
|
28254
|
+
@order = (x = opts.delete(:order); x.nil? ? nil : (x = x; x.is_a?(::Io::Flow::V0::Models::ReservationOrderReference) ? x : ::Io::Flow::V0::Models::ReservationOrderReference.new(x)))
|
28255
|
+
@items = HttpClient::Preconditions.assert_class('items', opts.delete(:items), Array).map { |v| (x = v; x.is_a?(::Io::Flow::V0::Models::ReservationItem) ? x : ::Io::Flow::V0::Models::ReservationItem.new(x)) }
|
28256
|
+
end
|
28257
|
+
|
28258
|
+
def to_json
|
28259
|
+
JSON.dump(to_hash)
|
28260
|
+
end
|
28261
|
+
|
28262
|
+
def copy(incoming={})
|
28263
|
+
Reservation.new(to_hash.merge(HttpClient::Helper.symbolize_keys(incoming)))
|
28264
|
+
end
|
28265
|
+
|
28266
|
+
def to_hash
|
28267
|
+
{
|
28268
|
+
:id => id,
|
28269
|
+
:key => key,
|
28270
|
+
:order => order.nil? ? nil : order.to_hash,
|
28271
|
+
:items => items.map { |o| o.to_hash }
|
28272
|
+
}
|
28273
|
+
end
|
28274
|
+
|
28275
|
+
end
|
28276
|
+
|
28277
|
+
class ReservationForm
|
28278
|
+
|
28279
|
+
attr_reader :order_number, :items
|
28280
|
+
|
28281
|
+
def initialize(incoming={})
|
28282
|
+
opts = HttpClient::Helper.symbolize_keys(incoming)
|
28283
|
+
HttpClient::Preconditions.require_keys(opts, [:items], 'ReservationForm')
|
28284
|
+
@order_number = (x = opts.delete(:order_number); x.nil? ? nil : HttpClient::Preconditions.assert_class('order_number', x, String))
|
28285
|
+
@items = HttpClient::Preconditions.assert_class('items', opts.delete(:items), Array).map { |v| (x = v; x.is_a?(::Io::Flow::V0::Models::ReservationItemForm) ? x : ::Io::Flow::V0::Models::ReservationItemForm.new(x)) }
|
28286
|
+
end
|
28287
|
+
|
28288
|
+
def to_json
|
28289
|
+
JSON.dump(to_hash)
|
28290
|
+
end
|
28291
|
+
|
28292
|
+
def copy(incoming={})
|
28293
|
+
ReservationForm.new(to_hash.merge(HttpClient::Helper.symbolize_keys(incoming)))
|
28294
|
+
end
|
28295
|
+
|
28296
|
+
def to_hash
|
28297
|
+
{
|
28298
|
+
:order_number => order_number,
|
28299
|
+
:items => items.map { |o| o.to_hash }
|
28300
|
+
}
|
28301
|
+
end
|
28302
|
+
|
28303
|
+
end
|
28304
|
+
|
28305
|
+
class ReservationItem
|
28306
|
+
|
28307
|
+
attr_reader :item, :quantity
|
28308
|
+
|
28309
|
+
def initialize(incoming={})
|
28310
|
+
opts = HttpClient::Helper.symbolize_keys(incoming)
|
28311
|
+
HttpClient::Preconditions.require_keys(opts, [:item, :quantity], 'ReservationItem')
|
28312
|
+
@item = (x = opts.delete(:item); x.is_a?(::Io::Flow::V0::Models::ReservationItemReference) ? x : ::Io::Flow::V0::Models::ReservationItemReference.new(x))
|
28313
|
+
@quantity = HttpClient::Preconditions.assert_class('quantity', opts.delete(:quantity), Integer)
|
28314
|
+
end
|
28315
|
+
|
28316
|
+
def to_json
|
28317
|
+
JSON.dump(to_hash)
|
28318
|
+
end
|
28319
|
+
|
28320
|
+
def copy(incoming={})
|
28321
|
+
ReservationItem.new(to_hash.merge(HttpClient::Helper.symbolize_keys(incoming)))
|
28322
|
+
end
|
28323
|
+
|
28324
|
+
def to_hash
|
28325
|
+
{
|
28326
|
+
:item => item.to_hash,
|
28327
|
+
:quantity => quantity
|
28328
|
+
}
|
28329
|
+
end
|
28330
|
+
|
28331
|
+
end
|
28332
|
+
|
28333
|
+
class ReservationItemForm
|
28334
|
+
|
28335
|
+
attr_reader :item_number, :quantity
|
28336
|
+
|
28337
|
+
def initialize(incoming={})
|
28338
|
+
opts = HttpClient::Helper.symbolize_keys(incoming)
|
28339
|
+
HttpClient::Preconditions.require_keys(opts, [:item_number, :quantity], 'ReservationItemForm')
|
28340
|
+
@item_number = HttpClient::Preconditions.assert_class('item_number', opts.delete(:item_number), String)
|
28341
|
+
@quantity = HttpClient::Preconditions.assert_class('quantity', opts.delete(:quantity), Integer)
|
28342
|
+
end
|
28343
|
+
|
28344
|
+
def to_json
|
28345
|
+
JSON.dump(to_hash)
|
28346
|
+
end
|
28347
|
+
|
28348
|
+
def copy(incoming={})
|
28349
|
+
ReservationItemForm.new(to_hash.merge(HttpClient::Helper.symbolize_keys(incoming)))
|
28350
|
+
end
|
28351
|
+
|
28352
|
+
def to_hash
|
28353
|
+
{
|
28354
|
+
:item_number => item_number,
|
28355
|
+
:quantity => quantity
|
28356
|
+
}
|
28357
|
+
end
|
28358
|
+
|
28359
|
+
end
|
28360
|
+
|
28361
|
+
class ReservationItemReference
|
28362
|
+
|
28363
|
+
attr_reader :number
|
28364
|
+
|
28365
|
+
def initialize(incoming={})
|
28366
|
+
opts = HttpClient::Helper.symbolize_keys(incoming)
|
28367
|
+
HttpClient::Preconditions.require_keys(opts, [:number], 'ReservationItemReference')
|
28368
|
+
@number = HttpClient::Preconditions.assert_class('number', opts.delete(:number), String)
|
28369
|
+
end
|
28370
|
+
|
28371
|
+
def to_json
|
28372
|
+
JSON.dump(to_hash)
|
28373
|
+
end
|
28374
|
+
|
28375
|
+
def copy(incoming={})
|
28376
|
+
ReservationItemReference.new(to_hash.merge(HttpClient::Helper.symbolize_keys(incoming)))
|
28377
|
+
end
|
28378
|
+
|
28379
|
+
def to_hash
|
28380
|
+
{
|
28381
|
+
:number => number
|
28382
|
+
}
|
28383
|
+
end
|
28384
|
+
|
28385
|
+
end
|
28386
|
+
|
28387
|
+
class ReservationOrderReference
|
28388
|
+
|
28389
|
+
attr_reader :number
|
28390
|
+
|
28391
|
+
def initialize(incoming={})
|
28392
|
+
opts = HttpClient::Helper.symbolize_keys(incoming)
|
28393
|
+
HttpClient::Preconditions.require_keys(opts, [:number], 'ReservationOrderReference')
|
28394
|
+
@number = HttpClient::Preconditions.assert_class('number', opts.delete(:number), String)
|
28395
|
+
end
|
28396
|
+
|
28397
|
+
def to_json
|
28398
|
+
JSON.dump(to_hash)
|
28399
|
+
end
|
28400
|
+
|
28401
|
+
def copy(incoming={})
|
28402
|
+
ReservationOrderReference.new(to_hash.merge(HttpClient::Helper.symbolize_keys(incoming)))
|
28403
|
+
end
|
28404
|
+
|
28405
|
+
def to_hash
|
28406
|
+
{
|
28407
|
+
:number => number
|
28408
|
+
}
|
28409
|
+
end
|
28410
|
+
|
28411
|
+
end
|
28412
|
+
|
27352
28413
|
class Return
|
27353
28414
|
|
27354
28415
|
attr_reader :id, :key, :items, :labels
|
@@ -28532,7 +29593,7 @@ module Io
|
|
28532
29593
|
# shipper to transport a package from a given origin to destination
|
28533
29594
|
class ShippingLabel
|
28534
29595
|
|
28535
|
-
attr_reader :id, :direction, :attributes, :carrier_tracking_number, :carrier_tracking_number_url, :cost, :destination, :flow_tracking_number, :flow_tracking_number_url, :origin, :service, :window, :label, :invoice, :order, :package, :commercial_invoice, :zpl, :pdf, :png
|
29596
|
+
attr_reader :id, :direction, :attributes, :carrier_tracking_number, :carrier_tracking_number_url, :cost, :destination, :flow_tracking_number, :flow_tracking_number_url, :origin, :service, :window, :label, :invoice, :order, :package, :commercial_invoice, :zpl, :pdf, :png, :order_identifier, :fulfillment_key
|
28536
29597
|
|
28537
29598
|
def initialize(incoming={})
|
28538
29599
|
opts = HttpClient::Helper.symbolize_keys(incoming)
|
@@ -28557,6 +29618,8 @@ module Io
|
|
28557
29618
|
@zpl = (x = opts.delete(:zpl); x.nil? ? nil : HttpClient::Preconditions.assert_class('zpl', x, String))
|
28558
29619
|
@pdf = (x = opts.delete(:pdf); x.nil? ? nil : HttpClient::Preconditions.assert_class('pdf', x, String))
|
28559
29620
|
@png = (x = opts.delete(:png); x.nil? ? nil : HttpClient::Preconditions.assert_class('png', x, String))
|
29621
|
+
@order_identifier = (x = opts.delete(:order_identifier); x.nil? ? nil : HttpClient::Preconditions.assert_class('order_identifier', x, String))
|
29622
|
+
@fulfillment_key = (x = opts.delete(:fulfillment_key); x.nil? ? nil : HttpClient::Preconditions.assert_class('fulfillment_key', x, String))
|
28560
29623
|
end
|
28561
29624
|
|
28562
29625
|
def to_json
|
@@ -28588,7 +29651,9 @@ module Io
|
|
28588
29651
|
:commercial_invoice => commercial_invoice,
|
28589
29652
|
:zpl => zpl,
|
28590
29653
|
:pdf => pdf,
|
28591
|
-
:png => png
|
29654
|
+
:png => png,
|
29655
|
+
:order_identifier => order_identifier,
|
29656
|
+
:fulfillment_key => fulfillment_key
|
28592
29657
|
}
|
28593
29658
|
end
|
28594
29659
|
|