flowcommerce 0.2.80 → 0.2.87
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 +2191 -374
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f4f09a9394c37c46d0920cf85937ec7c1461c0e80edde6b6d28f6128f612d6a5
|
4
|
+
data.tar.gz: ed48759a85e97d8aee99fc152c220e04f7f2eff7847f955737114a528340a4ce
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 704b4df67ee004259b25fa763fbfeae4523285435ce478023e51a2f54c194eeebcd528c5d4df1dd97cc87340c2294dab41d543321e4067934d5f987bca659031
|
7
|
+
data.tar.gz: 45e805bd254c6f997b2cf2f52fbef624777f2f325d0ca674cd8f25833857986ce5e63ea6c169ab09463526be6e6f238978c07f829225d28c78ce4f3bb4f05110
|
@@ -1,6 +1,6 @@
|
|
1
1
|
# Generated by API Builder - https://www.apibuilder.io
|
2
|
-
# Service version: 0.9.
|
3
|
-
# apibuilder 0.15.
|
2
|
+
# Service version: 0.9.76
|
3
|
+
# apibuilder 0.15.11 app.apibuilder.io/flow/api/latest/ruby_client
|
4
4
|
|
5
5
|
require 'cgi'
|
6
6
|
require 'net/http'
|
@@ -25,8 +25,8 @@ 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.15.
|
29
|
-
VERSION = '0.9.
|
28
|
+
USER_AGENT = 'apibuilder 0.15.11 app.apibuilder.io/flow/api/latest/ruby_client' unless defined?(Constants::USER_AGENT)
|
29
|
+
VERSION = '0.9.76' unless defined?(Constants::VERSION)
|
30
30
|
VERSION_MAJOR = 0 unless defined?(VERSION_MAJOR)
|
31
31
|
|
32
32
|
end
|
@@ -612,6 +612,22 @@ module Io
|
|
612
612
|
@suggestions ||= ::Io::Flow::V0::Clients::Suggestions.new(self)
|
613
613
|
end
|
614
614
|
|
615
|
+
def sync_pending_records
|
616
|
+
@sync_pending_records ||= ::Io::Flow::V0::Clients::SyncPendingRecords.new(self)
|
617
|
+
end
|
618
|
+
|
619
|
+
def sync_records
|
620
|
+
@sync_records ||= ::Io::Flow::V0::Clients::SyncRecords.new(self)
|
621
|
+
end
|
622
|
+
|
623
|
+
def sync_record_failures
|
624
|
+
@sync_record_failures ||= ::Io::Flow::V0::Clients::SyncRecordFailures.new(self)
|
625
|
+
end
|
626
|
+
|
627
|
+
def sync_streams
|
628
|
+
@sync_streams ||= ::Io::Flow::V0::Clients::SyncStreams.new(self)
|
629
|
+
end
|
630
|
+
|
615
631
|
def tax_settings
|
616
632
|
@tax_settings ||= ::Io::Flow::V0::Clients::TaxSettings.new(self)
|
617
633
|
end
|
@@ -646,7 +662,8 @@ module Io
|
|
646
662
|
HttpClient::Preconditions.assert_class('organization', organization, String)
|
647
663
|
opts = HttpClient::Helper.symbolize_keys(incoming)
|
648
664
|
query = {
|
649
|
-
:country => (x = opts.delete(:country); x.nil? ? nil : HttpClient::Preconditions.assert_class('country', x, Array).map { |v| HttpClient::Preconditions.assert_class('country', v, String) })
|
665
|
+
:country => (x = opts.delete(:country); x.nil? ? nil : HttpClient::Preconditions.assert_class('country', x, Array).map { |v| HttpClient::Preconditions.assert_class('country', v, String) }),
|
666
|
+
:context => (x = opts.delete(:context); x.nil? ? nil : HttpClient::Preconditions.assert_class('context', x, String))
|
650
667
|
}.delete_if { |k, v| v.nil? }
|
651
668
|
r = @client.request("/#{CGI.escape(organization)}/address/configurations").with_query(query).get
|
652
669
|
r.map { |x| ::Io::Flow::V0::Models::AddressConfiguration.new(x) }
|
@@ -913,7 +930,8 @@ module Io
|
|
913
930
|
HttpClient::Preconditions.assert_class('organization', organization, String)
|
914
931
|
opts = HttpClient::Helper.symbolize_keys(incoming)
|
915
932
|
query = {
|
916
|
-
:expand => (x = opts.delete(:expand); x.nil? ? nil : HttpClient::Preconditions.assert_class('expand', x, Array).map { |v| HttpClient::Preconditions.assert_class('expand', v, String) })
|
933
|
+
:expand => (x = opts.delete(:expand); x.nil? ? nil : HttpClient::Preconditions.assert_class('expand', x, Array).map { |v| HttpClient::Preconditions.assert_class('expand', v, String) }),
|
934
|
+
:context => (x = opts.delete(:context); x.nil? ? nil : HttpClient::Preconditions.assert_class('context', x, String))
|
917
935
|
}.delete_if { |k, v| v.nil? }
|
918
936
|
(x = credit_payment_form; x.is_a?(::Io::Flow::V0::Models::CreditPaymentForm) ? x : ::Io::Flow::V0::Models::CreditPaymentForm.new(x))
|
919
937
|
r = @client.request("/#{CGI.escape(organization)}/credit/payments").with_query(query).with_json(credit_payment_form.to_json).post
|
@@ -950,17 +968,22 @@ module Io
|
|
950
968
|
HttpClient::Preconditions.assert_class('key', key, String)
|
951
969
|
opts = HttpClient::Helper.symbolize_keys(incoming)
|
952
970
|
query = {
|
953
|
-
:expand => (x = opts.delete(:expand); x.nil? ? nil : HttpClient::Preconditions.assert_class('expand', x, Array).map { |v| HttpClient::Preconditions.assert_class('expand', v, String) })
|
971
|
+
:expand => (x = opts.delete(:expand); x.nil? ? nil : HttpClient::Preconditions.assert_class('expand', x, Array).map { |v| HttpClient::Preconditions.assert_class('expand', v, String) }),
|
972
|
+
:context => (x = opts.delete(:context); x.nil? ? nil : HttpClient::Preconditions.assert_class('context', x, String))
|
954
973
|
}.delete_if { |k, v| v.nil? }
|
955
974
|
(x = credit_payment_form; x.is_a?(::Io::Flow::V0::Models::CreditPaymentForm) ? x : ::Io::Flow::V0::Models::CreditPaymentForm.new(x))
|
956
975
|
r = @client.request("/#{CGI.escape(organization)}/credit/payments/#{CGI.escape(key)}").with_query(query).with_json(credit_payment_form.to_json).put
|
957
976
|
::Io::Flow::V0::Models::CreditPayment.new(r)
|
958
977
|
end
|
959
978
|
|
960
|
-
def delete_by_key(organization, key)
|
979
|
+
def delete_by_key(organization, key, incoming={})
|
961
980
|
HttpClient::Preconditions.assert_class('organization', organization, String)
|
962
981
|
HttpClient::Preconditions.assert_class('key', key, String)
|
963
|
-
|
982
|
+
opts = HttpClient::Helper.symbolize_keys(incoming)
|
983
|
+
query = {
|
984
|
+
:context => (x = opts.delete(:context); x.nil? ? nil : HttpClient::Preconditions.assert_class('context', x, String))
|
985
|
+
}.delete_if { |k, v| v.nil? }
|
986
|
+
r = @client.request("/#{CGI.escape(organization)}/credit/payments/#{CGI.escape(key)}").with_query(query).delete
|
964
987
|
nil
|
965
988
|
end
|
966
989
|
|
@@ -1038,6 +1061,7 @@ module Io
|
|
1038
1061
|
:ip => (x = opts.delete(:ip); x.nil? ? nil : HttpClient::Preconditions.assert_class('ip', x, String)),
|
1039
1062
|
:status => (x = opts.delete(:status); x.nil? ? nil : (x = x; x.is_a?(::Io::Flow::V0::Models::ExperienceStatus) ? x : ::Io::Flow::V0::Models::ExperienceStatus.apply(x)).value),
|
1040
1063
|
:shipping_configuration_key => (x = opts.delete(:shipping_configuration_key); x.nil? ? nil : HttpClient::Preconditions.assert_class('shipping_configuration_key', x, String)),
|
1064
|
+
:context => (x = opts.delete(:context); x.nil? ? nil : HttpClient::Preconditions.assert_class('context', x, String)),
|
1041
1065
|
:limit => HttpClient::Preconditions.assert_class('limit', (x = opts.delete(:limit); x.nil? ? 25 : x), Integer),
|
1042
1066
|
:offset => HttpClient::Preconditions.assert_class('offset', (x = opts.delete(:offset); x.nil? ? 0 : x), Integer),
|
1043
1067
|
:sort => HttpClient::Preconditions.assert_class('sort', (x = opts.delete(:sort); x.nil? ? "position" : x), String)
|
@@ -1065,7 +1089,8 @@ module Io
|
|
1065
1089
|
:experience => (x = opts.delete(:experience); x.nil? ? nil : HttpClient::Preconditions.assert_class('experience', x, String)),
|
1066
1090
|
:country => (x = opts.delete(:country); x.nil? ? nil : HttpClient::Preconditions.assert_class('country', x, String)),
|
1067
1091
|
:ip => (x = opts.delete(:ip); x.nil? ? nil : HttpClient::Preconditions.assert_class('ip', x, String)),
|
1068
|
-
:currency => (x = opts.delete(:currency); x.nil? ? nil : HttpClient::Preconditions.assert_class('currency', x, String))
|
1092
|
+
:currency => (x = opts.delete(:currency); x.nil? ? nil : HttpClient::Preconditions.assert_class('currency', x, String)),
|
1093
|
+
:context => (x = opts.delete(:context); x.nil? ? nil : HttpClient::Preconditions.assert_class('context', x, String))
|
1069
1094
|
}.delete_if { |k, v| v.nil? }
|
1070
1095
|
r = @client.request("/#{CGI.escape(organization)}/experiences/conversions/#{CGI.escape(base)}/#{CGI.escape(amount)}").with_query(query).get
|
1071
1096
|
::Io::Flow::V0::Models::PriceWithBase.new(r)
|
@@ -1085,6 +1110,7 @@ module Io
|
|
1085
1110
|
:ip => (x = opts.delete(:ip); x.nil? ? nil : HttpClient::Preconditions.assert_class('ip', x, String)),
|
1086
1111
|
:currency => (x = opts.delete(:currency); x.nil? ? nil : HttpClient::Preconditions.assert_class('currency', x, String)),
|
1087
1112
|
:language => (x = opts.delete(:language); x.nil? ? nil : HttpClient::Preconditions.assert_class('language', x, String)),
|
1113
|
+
:context => (x = opts.delete(:context); x.nil? ? nil : HttpClient::Preconditions.assert_class('context', x, String)),
|
1088
1114
|
:limit => HttpClient::Preconditions.assert_class('limit', (x = opts.delete(:limit); x.nil? ? 25 : x), Integer),
|
1089
1115
|
:offset => HttpClient::Preconditions.assert_class('offset', (x = opts.delete(:offset); x.nil? ? 0 : x), Integer),
|
1090
1116
|
:sort => HttpClient::Preconditions.assert_class('sort', (x = opts.delete(:sort); x.nil? ? "-created_at" : x), String)
|
@@ -1103,7 +1129,8 @@ module Io
|
|
1103
1129
|
:country => (x = opts.delete(:country); x.nil? ? nil : HttpClient::Preconditions.assert_class('country', x, String)),
|
1104
1130
|
:ip => (x = opts.delete(:ip); x.nil? ? nil : HttpClient::Preconditions.assert_class('ip', x, String)),
|
1105
1131
|
:currency => (x = opts.delete(:currency); x.nil? ? nil : HttpClient::Preconditions.assert_class('currency', x, String)),
|
1106
|
-
:language => (x = opts.delete(:language); x.nil? ? nil : HttpClient::Preconditions.assert_class('language', x, String))
|
1132
|
+
:language => (x = opts.delete(:language); x.nil? ? nil : HttpClient::Preconditions.assert_class('language', x, String)),
|
1133
|
+
:context => (x = opts.delete(:context); x.nil? ? nil : HttpClient::Preconditions.assert_class('context', x, String))
|
1107
1134
|
}.delete_if { |k, v| v.nil? }
|
1108
1135
|
r = @client.request("/#{CGI.escape(organization)}/experiences/items/#{CGI.escape(number)}").with_query(query).get
|
1109
1136
|
::Io::Flow::V0::Models::Item.new(r)
|
@@ -1155,7 +1182,8 @@ module Io
|
|
1155
1182
|
opts = HttpClient::Helper.symbolize_keys(incoming)
|
1156
1183
|
query = {
|
1157
1184
|
:q => (x = opts.delete(:q); x.nil? ? nil : HttpClient::Preconditions.assert_class('q', x, String)),
|
1158
|
-
:currency => (x = opts.delete(:currency); x.nil? ? nil : HttpClient::Preconditions.assert_class('currency', x, String))
|
1185
|
+
:currency => (x = opts.delete(:currency); x.nil? ? nil : HttpClient::Preconditions.assert_class('currency', x, String)),
|
1186
|
+
:context => (x = opts.delete(:context); x.nil? ? nil : HttpClient::Preconditions.assert_class('context', x, String))
|
1159
1187
|
}.delete_if { |k, v| v.nil? }
|
1160
1188
|
r = @client.request("/#{CGI.escape(organization)}/experiences/#{CGI.escape(experience_key)}/local/items").with_query(query).get
|
1161
1189
|
r.map { |x| ::Io::Flow::V0::Models::LocalItem.new(x) }
|
@@ -1376,7 +1404,8 @@ module Io
|
|
1376
1404
|
:ship_from_province => (x = opts.delete(:ship_from_province); x.nil? ? nil : HttpClient::Preconditions.assert_class('ship_from_province', x, String)),
|
1377
1405
|
:ship_to_country => (x = opts.delete(:ship_to_country); x.nil? ? nil : HttpClient::Preconditions.assert_class('ship_to_country', x, String)),
|
1378
1406
|
:ship_to_province => (x = opts.delete(:ship_to_province); x.nil? ? nil : HttpClient::Preconditions.assert_class('ship_to_province', x, String)),
|
1379
|
-
:currency => (x = opts.delete(:currency); x.nil? ? nil : HttpClient::Preconditions.assert_class('currency', x, String))
|
1407
|
+
:currency => (x = opts.delete(:currency); x.nil? ? nil : HttpClient::Preconditions.assert_class('currency', x, String)),
|
1408
|
+
:context => (x = opts.delete(:context); x.nil? ? nil : HttpClient::Preconditions.assert_class('context', x, String))
|
1380
1409
|
}.delete_if { |k, v| v.nil? }
|
1381
1410
|
r = @client.request("/#{CGI.escape(organization)}/experiences/#{CGI.escape(key)}/items/#{CGI.escape(number)}/price").with_query(query).get
|
1382
1411
|
::Io::Flow::V0::Models::PriceCheck.new(r)
|
@@ -1391,11 +1420,15 @@ module Io
|
|
1391
1420
|
end
|
1392
1421
|
|
1393
1422
|
# Update the pricing settings for this experience
|
1394
|
-
def put_pricing_by_key(organization, key, pricing)
|
1423
|
+
def put_pricing_by_key(organization, key, pricing, incoming={})
|
1395
1424
|
HttpClient::Preconditions.assert_class('organization', organization, String)
|
1396
1425
|
HttpClient::Preconditions.assert_class('key', key, String)
|
1426
|
+
opts = HttpClient::Helper.symbolize_keys(incoming)
|
1427
|
+
query = {
|
1428
|
+
:context => (x = opts.delete(:context); x.nil? ? nil : HttpClient::Preconditions.assert_class('context', x, String))
|
1429
|
+
}.delete_if { |k, v| v.nil? }
|
1397
1430
|
(x = pricing; x.is_a?(::Io::Flow::V0::Models::Pricing) ? x : ::Io::Flow::V0::Models::Pricing.new(x))
|
1398
|
-
r = @client.request("/#{CGI.escape(organization)}/experiences/#{CGI.escape(key)}/pricing").with_json(pricing.to_json).put
|
1431
|
+
r = @client.request("/#{CGI.escape(organization)}/experiences/#{CGI.escape(key)}/pricing").with_query(query).with_json(pricing.to_json).put
|
1399
1432
|
::Io::Flow::V0::Models::Pricing.new(r)
|
1400
1433
|
end
|
1401
1434
|
|
@@ -1714,7 +1747,8 @@ module Io
|
|
1714
1747
|
:currency => (x = opts.delete(:currency); x.nil? ? nil : HttpClient::Preconditions.assert_class('currency', x, String)),
|
1715
1748
|
:language => (x = opts.delete(:language); x.nil? ? nil : HttpClient::Preconditions.assert_class('language', x, String)),
|
1716
1749
|
:expand => (x = opts.delete(:expand); x.nil? ? nil : HttpClient::Preconditions.assert_class('expand', x, Array).map { |v| HttpClient::Preconditions.assert_class('expand', v, String) }),
|
1717
|
-
:romanize => (x = opts.delete(:romanize); x.nil? ? nil : HttpClient::Preconditions.assert_class('romanize', x, Array).map { |v| HttpClient::Preconditions.assert_class('romanize', v, String) })
|
1750
|
+
:romanize => (x = opts.delete(:romanize); x.nil? ? nil : HttpClient::Preconditions.assert_class('romanize', x, Array).map { |v| HttpClient::Preconditions.assert_class('romanize', v, String) }),
|
1751
|
+
:context => (x = opts.delete(:context); x.nil? ? nil : HttpClient::Preconditions.assert_class('context', x, String))
|
1718
1752
|
}.delete_if { |k, v| v.nil? }
|
1719
1753
|
(x = order_form; x.is_a?(::Io::Flow::V0::Models::OrderForm) ? x : ::Io::Flow::V0::Models::OrderForm.new(x))
|
1720
1754
|
r = @client.request("/#{CGI.escape(organization)}/orders").with_query(query).with_json(order_form.to_json).post
|
@@ -1743,7 +1777,10 @@ module Io
|
|
1743
1777
|
opts = HttpClient::Helper.symbolize_keys(incoming)
|
1744
1778
|
query = {
|
1745
1779
|
:expand => (x = opts.delete(:expand); x.nil? ? nil : HttpClient::Preconditions.assert_class('expand', x, Array).map { |v| HttpClient::Preconditions.assert_class('expand', v, String) }),
|
1746
|
-
:experience => (x = opts.delete(:experience); x.nil? ? nil : HttpClient::Preconditions.assert_class('experience', x, String))
|
1780
|
+
:experience => (x = opts.delete(:experience); x.nil? ? nil : HttpClient::Preconditions.assert_class('experience', x, String)),
|
1781
|
+
:currency => (x = opts.delete(:currency); x.nil? ? nil : HttpClient::Preconditions.assert_class('currency', x, String)),
|
1782
|
+
:show_selections_only => (x = opts.delete(:show_selections_only); x.nil? ? nil : HttpClient::Preconditions.assert_boolean('show_selections_only', x)),
|
1783
|
+
:context => (x = opts.delete(:context); x.nil? ? nil : HttpClient::Preconditions.assert_class('context', x, String))
|
1747
1784
|
}.delete_if { |k, v| v.nil? }
|
1748
1785
|
(x = order_with_discounts_form; x.is_a?(::Io::Flow::V0::Models::OrderWithDiscountsForm) ? x : ::Io::Flow::V0::Models::OrderWithDiscountsForm.new(x))
|
1749
1786
|
r = @client.request("/#{CGI.escape(organization)}/orders/submissions").with_query(query).with_json(order_with_discounts_form.to_json).post
|
@@ -1793,7 +1830,8 @@ module Io
|
|
1793
1830
|
:currency => (x = opts.delete(:currency); x.nil? ? nil : HttpClient::Preconditions.assert_class('currency', x, String)),
|
1794
1831
|
:language => (x = opts.delete(:language); x.nil? ? nil : HttpClient::Preconditions.assert_class('language', x, String)),
|
1795
1832
|
:expand => (x = opts.delete(:expand); x.nil? ? nil : HttpClient::Preconditions.assert_class('expand', x, Array).map { |v| HttpClient::Preconditions.assert_class('expand', v, String) }),
|
1796
|
-
:romanize => (x = opts.delete(:romanize); x.nil? ? nil : HttpClient::Preconditions.assert_class('romanize', x, Array).map { |v| HttpClient::Preconditions.assert_class('romanize', v, String) })
|
1833
|
+
:romanize => (x = opts.delete(:romanize); x.nil? ? nil : HttpClient::Preconditions.assert_class('romanize', x, Array).map { |v| HttpClient::Preconditions.assert_class('romanize', v, String) }),
|
1834
|
+
:context => (x = opts.delete(:context); x.nil? ? nil : HttpClient::Preconditions.assert_class('context', x, String))
|
1797
1835
|
}.delete_if { |k, v| v.nil? }
|
1798
1836
|
(x = order_put_form; x.is_a?(::Io::Flow::V0::Models::OrderPutForm) ? x : ::Io::Flow::V0::Models::OrderPutForm.new(x))
|
1799
1837
|
r = @client.request("/#{CGI.escape(organization)}/orders/#{CGI.escape(number)}").with_query(query).with_json(order_put_form.to_json).put
|
@@ -1824,7 +1862,8 @@ module Io
|
|
1824
1862
|
HttpClient::Preconditions.assert_class('number', number, String)
|
1825
1863
|
opts = HttpClient::Helper.symbolize_keys(incoming)
|
1826
1864
|
query = {
|
1827
|
-
:expand => (x = opts.delete(:expand); x.nil? ? nil : HttpClient::Preconditions.assert_class('expand', x, Array).map { |v| HttpClient::Preconditions.assert_class('expand', v, String) })
|
1865
|
+
:expand => (x = opts.delete(:expand); x.nil? ? nil : HttpClient::Preconditions.assert_class('expand', x, Array).map { |v| HttpClient::Preconditions.assert_class('expand', v, String) }),
|
1866
|
+
:context => (x = opts.delete(:context); x.nil? ? nil : HttpClient::Preconditions.assert_class('context', x, String))
|
1828
1867
|
}.delete_if { |k, v| v.nil? }
|
1829
1868
|
(x = authorization_form; x.is_a?(::Io::Flow::V0::Models::AuthorizationForm) ? x : ::Io::Flow::V0::Models::AuthorizationForm.from_json(x))
|
1830
1869
|
r = @client.request("/#{CGI.escape(organization)}/orders/#{CGI.escape(number)}/authorizations").with_query(query).with_json(authorization_form.to_json).post
|
@@ -1832,21 +1871,38 @@ module Io
|
|
1832
1871
|
end
|
1833
1872
|
|
1834
1873
|
# Updates an order's destination address
|
1835
|
-
def put_destination_by_number(organization, number, order_destination_put_form)
|
1874
|
+
def put_destination_by_number(organization, number, order_destination_put_form, incoming={})
|
1836
1875
|
HttpClient::Preconditions.assert_class('organization', organization, String)
|
1837
1876
|
HttpClient::Preconditions.assert_class('number', number, String)
|
1877
|
+
opts = HttpClient::Helper.symbolize_keys(incoming)
|
1878
|
+
query = {
|
1879
|
+
:context => (x = opts.delete(:context); x.nil? ? nil : HttpClient::Preconditions.assert_class('context', x, String))
|
1880
|
+
}.delete_if { |k, v| v.nil? }
|
1838
1881
|
(x = order_destination_put_form; x.is_a?(::Io::Flow::V0::Models::OrderDestinationPutForm) ? x : ::Io::Flow::V0::Models::OrderDestinationPutForm.new(x))
|
1839
|
-
r = @client.request("/#{CGI.escape(organization)}/orders/#{CGI.escape(number)}/destination").with_json(order_destination_put_form.to_json).put
|
1882
|
+
r = @client.request("/#{CGI.escape(organization)}/orders/#{CGI.escape(number)}/destination").with_query(query).with_json(order_destination_put_form.to_json).put
|
1840
1883
|
::Io::Flow::V0::Models::Order.new(r)
|
1841
1884
|
end
|
1842
1885
|
|
1843
|
-
def put_inventory_and_reservations_by_number(organization, number)
|
1886
|
+
def put_inventory_and_reservations_by_number(organization, number, incoming={})
|
1844
1887
|
HttpClient::Preconditions.assert_class('organization', organization, String)
|
1845
1888
|
HttpClient::Preconditions.assert_class('number', number, String)
|
1846
|
-
|
1889
|
+
opts = HttpClient::Helper.symbolize_keys(incoming)
|
1890
|
+
query = {
|
1891
|
+
:context => (x = opts.delete(:context); x.nil? ? nil : HttpClient::Preconditions.assert_class('context', x, String))
|
1892
|
+
}.delete_if { |k, v| v.nil? }
|
1893
|
+
r = @client.request("/#{CGI.escape(organization)}/orders/#{CGI.escape(number)}/inventory/reservations").with_query(query).put
|
1847
1894
|
::Io::Flow::V0::Models::Reservation.new(r)
|
1848
1895
|
end
|
1849
1896
|
|
1897
|
+
# Creates an order payment by applying the authorization to the order.
|
1898
|
+
def post_payments_by_number(organization, number, authorization)
|
1899
|
+
HttpClient::Preconditions.assert_class('organization', organization, String)
|
1900
|
+
HttpClient::Preconditions.assert_class('number', number, String)
|
1901
|
+
(x = authorization; x.is_a?(::Io::Flow::V0::Models::Authorization) ? x : ::Io::Flow::V0::Models::Authorization.from_json(x))
|
1902
|
+
r = @client.request("/#{CGI.escape(organization)}/orders/#{CGI.escape(number)}/payments").with_json(authorization.to_json).post
|
1903
|
+
::Io::Flow::V0::Models::Order.new(r)
|
1904
|
+
end
|
1905
|
+
|
1850
1906
|
# Creates a free shipping promotion for this order, automatically applying it
|
1851
1907
|
# to the order if the order meets the defined promotion trigger.
|
1852
1908
|
def put_promotions_and_free_shipping_by_number_and_key(organization, number, key, free_shipping_order_promotion_form, incoming={})
|
@@ -1855,7 +1911,8 @@ module Io
|
|
1855
1911
|
HttpClient::Preconditions.assert_class('key', key, String)
|
1856
1912
|
opts = HttpClient::Helper.symbolize_keys(incoming)
|
1857
1913
|
query = {
|
1858
|
-
:expand => (x = opts.delete(:expand); x.nil? ? nil : HttpClient::Preconditions.assert_class('expand', x, Array).map { |v| HttpClient::Preconditions.assert_class('expand', v, String) })
|
1914
|
+
:expand => (x = opts.delete(:expand); x.nil? ? nil : HttpClient::Preconditions.assert_class('expand', x, Array).map { |v| HttpClient::Preconditions.assert_class('expand', v, String) }),
|
1915
|
+
:context => (x = opts.delete(:context); x.nil? ? nil : HttpClient::Preconditions.assert_class('context', x, String))
|
1859
1916
|
}.delete_if { |k, v| v.nil? }
|
1860
1917
|
(x = free_shipping_order_promotion_form; x.is_a?(::Io::Flow::V0::Models::FreeShippingOrderPromotionForm) ? x : ::Io::Flow::V0::Models::FreeShippingOrderPromotionForm.new(x))
|
1861
1918
|
r = @client.request("/#{CGI.escape(organization)}/orders/#{CGI.escape(number)}/promotions/#{CGI.escape(key)}/free_shipping").with_query(query).with_json(free_shipping_order_promotion_form.to_json).put
|
@@ -1879,7 +1936,8 @@ module Io
|
|
1879
1936
|
HttpClient::Preconditions.assert_class('number', number, String)
|
1880
1937
|
opts = HttpClient::Helper.symbolize_keys(incoming)
|
1881
1938
|
query = {
|
1882
|
-
:expand => (x = opts.delete(:expand); x.nil? ? nil : HttpClient::Preconditions.assert_class('expand', x, Array).map { |v| HttpClient::Preconditions.assert_class('expand', v, String) })
|
1939
|
+
:expand => (x = opts.delete(:expand); x.nil? ? nil : HttpClient::Preconditions.assert_class('expand', x, Array).map { |v| HttpClient::Preconditions.assert_class('expand', v, String) }),
|
1940
|
+
:context => (x = opts.delete(:context); x.nil? ? nil : HttpClient::Preconditions.assert_class('context', x, String))
|
1883
1941
|
}.delete_if { |k, v| v.nil? }
|
1884
1942
|
(x = order_submission_form; x.is_a?(::Io::Flow::V0::Models::OrderSubmissionForm) ? x : ::Io::Flow::V0::Models::OrderSubmissionForm.new(x))
|
1885
1943
|
r = @client.request("/#{CGI.escape(organization)}/orders/#{CGI.escape(number)}/submissions").with_query(query).with_json(order_submission_form.to_json).put
|
@@ -1888,11 +1946,15 @@ module Io
|
|
1888
1946
|
|
1889
1947
|
# Validates a tax registration number, proxying to underlying services and
|
1890
1948
|
# recording the result on the order.
|
1891
|
-
def put_tax_and_registration_by_number(organization, number, tax_registration_form)
|
1949
|
+
def put_tax_and_registration_by_number(organization, number, tax_registration_form, incoming={})
|
1892
1950
|
HttpClient::Preconditions.assert_class('organization', organization, String)
|
1893
1951
|
HttpClient::Preconditions.assert_class('number', number, String)
|
1952
|
+
opts = HttpClient::Helper.symbolize_keys(incoming)
|
1953
|
+
query = {
|
1954
|
+
:context => (x = opts.delete(:context); x.nil? ? nil : HttpClient::Preconditions.assert_class('context', x, String))
|
1955
|
+
}.delete_if { |k, v| v.nil? }
|
1894
1956
|
(x = tax_registration_form; x.is_a?(::Io::Flow::V0::Models::TaxRegistrationForm) ? x : ::Io::Flow::V0::Models::TaxRegistrationForm.new(x))
|
1895
|
-
r = @client.request("/#{CGI.escape(organization)}/orders/#{CGI.escape(number)}/tax/registration").with_json(tax_registration_form.to_json).put
|
1957
|
+
r = @client.request("/#{CGI.escape(organization)}/orders/#{CGI.escape(number)}/tax/registration").with_query(query).with_json(tax_registration_form.to_json).put
|
1896
1958
|
::Io::Flow::V0::Models::TaxRegistration.new(r)
|
1897
1959
|
end
|
1898
1960
|
|
@@ -1937,7 +1999,8 @@ module Io
|
|
1937
1999
|
:ip => (x = opts.delete(:ip); x.nil? ? nil : HttpClient::Preconditions.assert_class('ip', x, String)),
|
1938
2000
|
:currency => (x = opts.delete(:currency); x.nil? ? nil : HttpClient::Preconditions.assert_class('currency', x, String)),
|
1939
2001
|
:language => (x = opts.delete(:language); x.nil? ? nil : HttpClient::Preconditions.assert_class('language', x, String)),
|
1940
|
-
:expand => (x = opts.delete(:expand); x.nil? ? nil : HttpClient::Preconditions.assert_class('expand', x, Array).map { |v| HttpClient::Preconditions.assert_class('expand', v, String) })
|
2002
|
+
:expand => (x = opts.delete(:expand); x.nil? ? nil : HttpClient::Preconditions.assert_class('expand', x, Array).map { |v| HttpClient::Preconditions.assert_class('expand', v, String) }),
|
2003
|
+
:context => (x = opts.delete(:context); x.nil? ? nil : HttpClient::Preconditions.assert_class('context', x, String))
|
1941
2004
|
}.delete_if { |k, v| v.nil? }
|
1942
2005
|
(x = order_put_form; x.is_a?(::Io::Flow::V0::Models::OrderPutForm) ? x : ::Io::Flow::V0::Models::OrderPutForm.new(x))
|
1943
2006
|
r = @client.request("/#{CGI.escape(organization)}/order/builders").with_query(query).with_json(order_put_form.to_json).post
|
@@ -1954,7 +2017,8 @@ module Io
|
|
1954
2017
|
:ip => (x = opts.delete(:ip); x.nil? ? nil : HttpClient::Preconditions.assert_class('ip', x, String)),
|
1955
2018
|
:currency => (x = opts.delete(:currency); x.nil? ? nil : HttpClient::Preconditions.assert_class('currency', x, String)),
|
1956
2019
|
:language => (x = opts.delete(:language); x.nil? ? nil : HttpClient::Preconditions.assert_class('language', x, String)),
|
1957
|
-
:expand => (x = opts.delete(:expand); x.nil? ? nil : HttpClient::Preconditions.assert_class('expand', x, Array).map { |v| HttpClient::Preconditions.assert_class('expand', v, String) })
|
2020
|
+
:expand => (x = opts.delete(:expand); x.nil? ? nil : HttpClient::Preconditions.assert_class('expand', x, Array).map { |v| HttpClient::Preconditions.assert_class('expand', v, String) }),
|
2021
|
+
:context => (x = opts.delete(:context); x.nil? ? nil : HttpClient::Preconditions.assert_class('context', x, String))
|
1958
2022
|
}.delete_if { |k, v| v.nil? }
|
1959
2023
|
(x = order_put_form; x.is_a?(::Io::Flow::V0::Models::OrderPutForm) ? x : ::Io::Flow::V0::Models::OrderPutForm.new(x))
|
1960
2024
|
r = @client.request("/#{CGI.escape(organization)}/order/builders/carts/#{CGI.escape(number)}").with_query(query).with_json(order_put_form.to_json).put
|
@@ -1985,7 +2049,8 @@ module Io
|
|
1985
2049
|
:ip => (x = opts.delete(:ip); x.nil? ? nil : HttpClient::Preconditions.assert_class('ip', x, String)),
|
1986
2050
|
:currency => (x = opts.delete(:currency); x.nil? ? nil : HttpClient::Preconditions.assert_class('currency', x, String)),
|
1987
2051
|
:language => (x = opts.delete(:language); x.nil? ? nil : HttpClient::Preconditions.assert_class('language', x, String)),
|
1988
|
-
:expand => (x = opts.delete(:expand); x.nil? ? nil : HttpClient::Preconditions.assert_class('expand', x, Array).map { |v| HttpClient::Preconditions.assert_class('expand', v, String) })
|
2052
|
+
:expand => (x = opts.delete(:expand); x.nil? ? nil : HttpClient::Preconditions.assert_class('expand', x, Array).map { |v| HttpClient::Preconditions.assert_class('expand', v, String) }),
|
2053
|
+
:context => (x = opts.delete(:context); x.nil? ? nil : HttpClient::Preconditions.assert_class('context', x, String))
|
1989
2054
|
}.delete_if { |k, v| v.nil? }
|
1990
2055
|
(x = order_put_form; x.is_a?(::Io::Flow::V0::Models::OrderPutForm) ? x : ::Io::Flow::V0::Models::OrderPutForm.new(x))
|
1991
2056
|
r = @client.request("/#{CGI.escape(organization)}/order/builders/#{CGI.escape(number)}").with_query(query).with_json(order_put_form.to_json).put
|
@@ -1997,7 +2062,8 @@ module Io
|
|
1997
2062
|
HttpClient::Preconditions.assert_class('number', number, String)
|
1998
2063
|
opts = HttpClient::Helper.symbolize_keys(incoming)
|
1999
2064
|
query = {
|
2000
|
-
:expand => (x = opts.delete(:expand); x.nil? ? nil : HttpClient::Preconditions.assert_class('expand', x, Array).map { |v| HttpClient::Preconditions.assert_class('expand', v, String) })
|
2065
|
+
:expand => (x = opts.delete(:expand); x.nil? ? nil : HttpClient::Preconditions.assert_class('expand', x, Array).map { |v| HttpClient::Preconditions.assert_class('expand', v, String) }),
|
2066
|
+
:context => (x = opts.delete(:context); x.nil? ? nil : HttpClient::Preconditions.assert_class('context', x, String))
|
2001
2067
|
}.delete_if { |k, v| v.nil? }
|
2002
2068
|
(x = order_builder_attributes_form; x.is_a?(::Io::Flow::V0::Models::OrderBuilderAttributesForm) ? x : ::Io::Flow::V0::Models::OrderBuilderAttributesForm.new(x))
|
2003
2069
|
r = @client.request("/#{CGI.escape(organization)}/order/builders/#{CGI.escape(number)}/attributes").with_query(query).with_json(order_builder_attributes_form.to_json).put
|
@@ -2009,7 +2075,8 @@ module Io
|
|
2009
2075
|
HttpClient::Preconditions.assert_class('number', number, String)
|
2010
2076
|
opts = HttpClient::Helper.symbolize_keys(incoming)
|
2011
2077
|
query = {
|
2012
|
-
:expand => (x = opts.delete(:expand); x.nil? ? nil : HttpClient::Preconditions.assert_class('expand', x, Array).map { |v| HttpClient::Preconditions.assert_class('expand', v, String) })
|
2078
|
+
:expand => (x = opts.delete(:expand); x.nil? ? nil : HttpClient::Preconditions.assert_class('expand', x, Array).map { |v| HttpClient::Preconditions.assert_class('expand', v, String) }),
|
2079
|
+
:context => (x = opts.delete(:context); x.nil? ? nil : HttpClient::Preconditions.assert_class('context', x, String))
|
2013
2080
|
}.delete_if { |k, v| v.nil? }
|
2014
2081
|
(x = order_builder_destination_country_form; x.is_a?(::Io::Flow::V0::Models::OrderBuilderDestinationCountryForm) ? x : ::Io::Flow::V0::Models::OrderBuilderDestinationCountryForm.new(x))
|
2015
2082
|
r = @client.request("/#{CGI.escape(organization)}/order/builders/#{CGI.escape(number)}/country").with_query(query).with_json(order_builder_destination_country_form.to_json).put
|
@@ -2021,7 +2088,8 @@ module Io
|
|
2021
2088
|
HttpClient::Preconditions.assert_class('number', number, String)
|
2022
2089
|
opts = HttpClient::Helper.symbolize_keys(incoming)
|
2023
2090
|
query = {
|
2024
|
-
:expand => (x = opts.delete(:expand); x.nil? ? nil : HttpClient::Preconditions.assert_class('expand', x, Array).map { |v| HttpClient::Preconditions.assert_class('expand', v, String) })
|
2091
|
+
:expand => (x = opts.delete(:expand); x.nil? ? nil : HttpClient::Preconditions.assert_class('expand', x, Array).map { |v| HttpClient::Preconditions.assert_class('expand', v, String) }),
|
2092
|
+
:context => (x = opts.delete(:context); x.nil? ? nil : HttpClient::Preconditions.assert_class('context', x, String))
|
2025
2093
|
}.delete_if { |k, v| v.nil? }
|
2026
2094
|
(x = order_builder_destination_form; x.is_a?(::Io::Flow::V0::Models::OrderBuilderDestinationForm) ? x : ::Io::Flow::V0::Models::OrderBuilderDestinationForm.new(x))
|
2027
2095
|
r = @client.request("/#{CGI.escape(organization)}/order/builders/#{CGI.escape(number)}/destination").with_query(query).with_json(order_builder_destination_form.to_json).put
|
@@ -2033,7 +2101,8 @@ module Io
|
|
2033
2101
|
HttpClient::Preconditions.assert_class('number', number, String)
|
2034
2102
|
opts = HttpClient::Helper.symbolize_keys(incoming)
|
2035
2103
|
query = {
|
2036
|
-
:expand => (x = opts.delete(:expand); x.nil? ? nil : HttpClient::Preconditions.assert_class('expand', x, Array).map { |v| HttpClient::Preconditions.assert_class('expand', v, String) })
|
2104
|
+
:expand => (x = opts.delete(:expand); x.nil? ? nil : HttpClient::Preconditions.assert_class('expand', x, Array).map { |v| HttpClient::Preconditions.assert_class('expand', v, String) }),
|
2105
|
+
:context => (x = opts.delete(:context); x.nil? ? nil : HttpClient::Preconditions.assert_class('context', x, String))
|
2037
2106
|
}.delete_if { |k, v| v.nil? }
|
2038
2107
|
(x = order_builder_delivered_duty_form; x.is_a?(::Io::Flow::V0::Models::OrderBuilderDeliveredDutyForm) ? x : ::Io::Flow::V0::Models::OrderBuilderDeliveredDutyForm.new(x))
|
2039
2108
|
r = @client.request("/#{CGI.escape(organization)}/order/builders/#{CGI.escape(number)}/duty").with_query(query).with_json(order_builder_delivered_duty_form.to_json).put
|
@@ -2046,13 +2115,71 @@ module Io
|
|
2046
2115
|
HttpClient::Preconditions.assert_class('number', number, String)
|
2047
2116
|
opts = HttpClient::Helper.symbolize_keys(incoming)
|
2048
2117
|
query = {
|
2049
|
-
:expand => (x = opts.delete(:expand); x.nil? ? nil : HttpClient::Preconditions.assert_class('expand', x, Array).map { |v| HttpClient::Preconditions.assert_class('expand', v, String) })
|
2118
|
+
:expand => (x = opts.delete(:expand); x.nil? ? nil : HttpClient::Preconditions.assert_class('expand', x, Array).map { |v| HttpClient::Preconditions.assert_class('expand', v, String) }),
|
2119
|
+
:context => (x = opts.delete(:context); x.nil? ? nil : HttpClient::Preconditions.assert_class('context', x, String))
|
2050
2120
|
}.delete_if { |k, v| v.nil? }
|
2051
2121
|
(x = order_builder_customer_invoice_address_form; x.is_a?(::Io::Flow::V0::Models::OrderBuilderCustomerInvoiceAddressForm) ? x : ::Io::Flow::V0::Models::OrderBuilderCustomerInvoiceAddressForm.new(x))
|
2052
2122
|
r = @client.request("/#{CGI.escape(organization)}/order/builders/#{CGI.escape(number)}/invoice/address").with_query(query).with_json(order_builder_customer_invoice_address_form.to_json).put
|
2053
2123
|
::Io::Flow::V0::Models::OrderBuilder.new(r)
|
2054
2124
|
end
|
2055
2125
|
|
2126
|
+
# Adds a line item to the order.
|
2127
|
+
def post_lines_by_number(organization, number, line_item_form)
|
2128
|
+
HttpClient::Preconditions.assert_class('organization', organization, String)
|
2129
|
+
HttpClient::Preconditions.assert_class('number', number, String)
|
2130
|
+
(x = line_item_form; x.is_a?(::Io::Flow::V0::Models::LineItemForm) ? x : ::Io::Flow::V0::Models::LineItemForm.new(x))
|
2131
|
+
r = @client.request("/#{CGI.escape(organization)}/order/builders/#{CGI.escape(number)}/lines").with_json(line_item_form.to_json).post
|
2132
|
+
::Io::Flow::V0::Models::Order.new(r)
|
2133
|
+
end
|
2134
|
+
|
2135
|
+
# Replaces all line items in the order.
|
2136
|
+
def put_lines_by_number(organization, number, line_item_forms)
|
2137
|
+
HttpClient::Preconditions.assert_class('organization', organization, String)
|
2138
|
+
HttpClient::Preconditions.assert_class('number', number, String)
|
2139
|
+
HttpClient::Preconditions.assert_class('line_item_forms', line_item_forms, Array).map { |v| (x = v; x.is_a?(::Io::Flow::V0::Models::LineItemForm) ? x : ::Io::Flow::V0::Models::LineItemForm.new(x)) }
|
2140
|
+
r = @client.request("/#{CGI.escape(organization)}/order/builders/#{CGI.escape(number)}/lines").with_json(line_item_forms.map { |o| o.to_hash }.to_json).put
|
2141
|
+
::Io::Flow::V0::Models::Order.new(r)
|
2142
|
+
end
|
2143
|
+
|
2144
|
+
# Replaces line item in the order specifed by the line item id.
|
2145
|
+
def put_lines_by_number_and_id(organization, number, id, line_item_form)
|
2146
|
+
HttpClient::Preconditions.assert_class('organization', organization, String)
|
2147
|
+
HttpClient::Preconditions.assert_class('number', number, String)
|
2148
|
+
HttpClient::Preconditions.assert_class('id', id, String)
|
2149
|
+
(x = line_item_form; x.is_a?(::Io::Flow::V0::Models::LineItemForm) ? x : ::Io::Flow::V0::Models::LineItemForm.new(x))
|
2150
|
+
r = @client.request("/#{CGI.escape(organization)}/order/builders/#{CGI.escape(number)}/lines/#{CGI.escape(id)}").with_json(line_item_form.to_json).put
|
2151
|
+
::Io::Flow::V0::Models::Order.new(r)
|
2152
|
+
end
|
2153
|
+
|
2154
|
+
# Deletes line item in the order specifed by the line item id.
|
2155
|
+
def delete_lines_by_number_and_id(organization, number, id)
|
2156
|
+
HttpClient::Preconditions.assert_class('organization', organization, String)
|
2157
|
+
HttpClient::Preconditions.assert_class('number', number, String)
|
2158
|
+
HttpClient::Preconditions.assert_class('id', id, String)
|
2159
|
+
r = @client.request("/#{CGI.escape(organization)}/order/builders/#{CGI.escape(number)}/lines/#{CGI.escape(id)}").delete
|
2160
|
+
::Io::Flow::V0::Models::OrderBuilder.new(r)
|
2161
|
+
end
|
2162
|
+
|
2163
|
+
# Updates line item attributes in the order specifed by the line item id.
|
2164
|
+
def put_lines_and_attributes_by_number_and_id(organization, number, id, line_item_attributes_form)
|
2165
|
+
HttpClient::Preconditions.assert_class('organization', organization, String)
|
2166
|
+
HttpClient::Preconditions.assert_class('number', number, String)
|
2167
|
+
HttpClient::Preconditions.assert_class('id', id, String)
|
2168
|
+
(x = line_item_attributes_form; x.is_a?(::Io::Flow::V0::Models::LineItemAttributesForm) ? x : ::Io::Flow::V0::Models::LineItemAttributesForm.new(x))
|
2169
|
+
r = @client.request("/#{CGI.escape(organization)}/order/builders/#{CGI.escape(number)}/lines/#{CGI.escape(id)}/attributes").with_json(line_item_attributes_form.to_json).put
|
2170
|
+
::Io::Flow::V0::Models::Order.new(r)
|
2171
|
+
end
|
2172
|
+
|
2173
|
+
# Updates line item quantity in the order specifed by the line item id.
|
2174
|
+
def put_lines_and_quantity_by_number_and_id(organization, number, id, line_item_quantity_form)
|
2175
|
+
HttpClient::Preconditions.assert_class('organization', organization, String)
|
2176
|
+
HttpClient::Preconditions.assert_class('number', number, String)
|
2177
|
+
HttpClient::Preconditions.assert_class('id', id, String)
|
2178
|
+
(x = line_item_quantity_form; x.is_a?(::Io::Flow::V0::Models::LineItemQuantityForm) ? x : ::Io::Flow::V0::Models::LineItemQuantityForm.new(x))
|
2179
|
+
r = @client.request("/#{CGI.escape(organization)}/order/builders/#{CGI.escape(number)}/lines/#{CGI.escape(id)}/quantity").with_json(line_item_quantity_form.to_json).put
|
2180
|
+
::Io::Flow::V0::Models::Order.new(r)
|
2181
|
+
end
|
2182
|
+
|
2056
2183
|
# Validates a tax registration number, proxying to underlying services and
|
2057
2184
|
# recording the result on the order.
|
2058
2185
|
def put_tax_and_registration_by_number(organization, number, tax_registration_form, incoming={})
|
@@ -2060,7 +2187,8 @@ module Io
|
|
2060
2187
|
HttpClient::Preconditions.assert_class('number', number, String)
|
2061
2188
|
opts = HttpClient::Helper.symbolize_keys(incoming)
|
2062
2189
|
query = {
|
2063
|
-
:expand => (x = opts.delete(:expand); x.nil? ? nil : HttpClient::Preconditions.assert_class('expand', x, Array).map { |v| HttpClient::Preconditions.assert_class('expand', v, String) })
|
2190
|
+
:expand => (x = opts.delete(:expand); x.nil? ? nil : HttpClient::Preconditions.assert_class('expand', x, Array).map { |v| HttpClient::Preconditions.assert_class('expand', v, String) }),
|
2191
|
+
:context => (x = opts.delete(:context); x.nil? ? nil : HttpClient::Preconditions.assert_class('context', x, String))
|
2064
2192
|
}.delete_if { |k, v| v.nil? }
|
2065
2193
|
(x = tax_registration_form; x.is_a?(::Io::Flow::V0::Models::TaxRegistrationForm) ? x : ::Io::Flow::V0::Models::TaxRegistrationForm.new(x))
|
2066
2194
|
r = @client.request("/#{CGI.escape(organization)}/order/builders/#{CGI.escape(number)}/tax/registration").with_query(query).with_json(tax_registration_form.to_json).put
|
@@ -2089,7 +2217,8 @@ module Io
|
|
2089
2217
|
:currency => (x = opts.delete(:currency); x.nil? ? nil : HttpClient::Preconditions.assert_class('currency', x, String)),
|
2090
2218
|
:language => (x = opts.delete(:language); x.nil? ? nil : HttpClient::Preconditions.assert_class('language', x, String)),
|
2091
2219
|
:expand => (x = opts.delete(:expand); x.nil? ? nil : HttpClient::Preconditions.assert_class('expand', x, Array).map { |v| HttpClient::Preconditions.assert_class('expand', v, String) }),
|
2092
|
-
:romanize => (x = opts.delete(:romanize); x.nil? ? nil : HttpClient::Preconditions.assert_class('romanize', x, Array).map { |v| HttpClient::Preconditions.assert_class('romanize', v, String) })
|
2220
|
+
:romanize => (x = opts.delete(:romanize); x.nil? ? nil : HttpClient::Preconditions.assert_class('romanize', x, Array).map { |v| HttpClient::Preconditions.assert_class('romanize', v, String) }),
|
2221
|
+
:context => (x = opts.delete(:context); x.nil? ? nil : HttpClient::Preconditions.assert_class('context', x, String))
|
2093
2222
|
}.delete_if { |k, v| v.nil? }
|
2094
2223
|
(x = order_estimate_form; x.is_a?(::Io::Flow::V0::Models::OrderEstimateForm) ? x : ::Io::Flow::V0::Models::OrderEstimateForm.new(x))
|
2095
2224
|
r = @client.request("/#{CGI.escape(organization)}/order-estimates").with_query(query).with_json(order_estimate_form.to_json).post
|
@@ -2119,7 +2248,8 @@ module Io
|
|
2119
2248
|
:currency => (x = opts.delete(:currency); x.nil? ? nil : HttpClient::Preconditions.assert_class('currency', x, String)),
|
2120
2249
|
:language => (x = opts.delete(:language); x.nil? ? nil : HttpClient::Preconditions.assert_class('language', x, String)),
|
2121
2250
|
:expand => (x = opts.delete(:expand); x.nil? ? nil : HttpClient::Preconditions.assert_class('expand', x, Array).map { |v| HttpClient::Preconditions.assert_class('expand', v, String) }),
|
2122
|
-
:romanize => (x = opts.delete(:romanize); x.nil? ? nil : HttpClient::Preconditions.assert_class('romanize', x, Array).map { |v| HttpClient::Preconditions.assert_class('romanize', v, String) })
|
2251
|
+
:romanize => (x = opts.delete(:romanize); x.nil? ? nil : HttpClient::Preconditions.assert_class('romanize', x, Array).map { |v| HttpClient::Preconditions.assert_class('romanize', v, String) }),
|
2252
|
+
:context => (x = opts.delete(:context); x.nil? ? nil : HttpClient::Preconditions.assert_class('context', x, String))
|
2123
2253
|
}.delete_if { |k, v| v.nil? }
|
2124
2254
|
(x = order_estimate_form; x.is_a?(::Io::Flow::V0::Models::OrderEstimateForm) ? x : ::Io::Flow::V0::Models::OrderEstimateForm.new(x))
|
2125
2255
|
r = @client.request("/#{CGI.escape(organization)}/order-estimates/#{CGI.escape(number)}").with_query(query).with_json(order_estimate_form.to_json).put
|
@@ -2218,6 +2348,12 @@ module Io
|
|
2218
2348
|
nil
|
2219
2349
|
end
|
2220
2350
|
|
2351
|
+
def get_generated_and_number(organization)
|
2352
|
+
HttpClient::Preconditions.assert_class('organization', organization, String)
|
2353
|
+
r = @client.request("/#{CGI.escape(organization)}/order/number/generators/generated/number").get
|
2354
|
+
::Io::Flow::V0::Models::OrderNumberGeneratorGeneratedNumber.new(r)
|
2355
|
+
end
|
2356
|
+
|
2221
2357
|
end
|
2222
2358
|
|
2223
2359
|
class OrderPromotions
|
@@ -2863,28 +2999,12 @@ module Io
|
|
2863
2999
|
:destination => (x = opts.delete(:destination); x.nil? ? nil : HttpClient::Preconditions.assert_class('destination', x, String)),
|
2864
3000
|
:code => (x = opts.delete(:code); x.nil? ? nil : HttpClient::Preconditions.assert_class('code', x, String)),
|
2865
3001
|
:limit => HttpClient::Preconditions.assert_class('limit', (x = opts.delete(:limit); x.nil? ? 25 : x), Integer),
|
2866
|
-
:offset => HttpClient::Preconditions.assert_class('offset', (x = opts.delete(:offset); x.nil? ? 0 : x), Integer)
|
2867
|
-
:sort => HttpClient::Preconditions.assert_class('sort', (x = opts.delete(:sort); x.nil? ? "-created_at" : x), String)
|
3002
|
+
:offset => HttpClient::Preconditions.assert_class('offset', (x = opts.delete(:offset); x.nil? ? 0 : x), Integer)
|
2868
3003
|
}.delete_if { |k, v| v.nil? }
|
2869
3004
|
r = @client.request("/#{CGI.escape(organization)}/harmonization/hs10").with_query(query).get
|
2870
3005
|
r.map { |x| ::Io::Flow::V0::Models::Hs10.new(x) }
|
2871
3006
|
end
|
2872
3007
|
|
2873
|
-
# Provides visibility into recent changes of each object, including deletion
|
2874
|
-
def get_versions(organization, incoming={})
|
2875
|
-
HttpClient::Preconditions.assert_class('organization', organization, String)
|
2876
|
-
opts = HttpClient::Helper.symbolize_keys(incoming)
|
2877
|
-
query = {
|
2878
|
-
:id => (x = opts.delete(:id); x.nil? ? nil : HttpClient::Preconditions.assert_class('id', x, Array).map { |v| HttpClient::Preconditions.assert_class('id', v, String) }),
|
2879
|
-
:hs10_id => (x = opts.delete(:hs10_id); x.nil? ? nil : HttpClient::Preconditions.assert_class('hs10_id', x, Array).map { |v| HttpClient::Preconditions.assert_class('hs10_id', v, String) }),
|
2880
|
-
:limit => HttpClient::Preconditions.assert_class('limit', (x = opts.delete(:limit); x.nil? ? 25 : x), Integer),
|
2881
|
-
:offset => HttpClient::Preconditions.assert_class('offset', (x = opts.delete(:offset); x.nil? ? 0 : x), Integer),
|
2882
|
-
:sort => HttpClient::Preconditions.assert_class('sort', (x = opts.delete(:sort); x.nil? ? "journal_timestamp" : x), String)
|
2883
|
-
}.delete_if { |k, v| v.nil? }
|
2884
|
-
r = @client.request("/#{CGI.escape(organization)}/harmonization/hs10/versions").with_query(query).get
|
2885
|
-
r.map { |x| ::Io::Flow::V0::Models::Hs10Version.new(x) }
|
2886
|
-
end
|
2887
|
-
|
2888
3008
|
end
|
2889
3009
|
|
2890
3010
|
class TaxRegistrations
|
@@ -2900,6 +3020,18 @@ module Io
|
|
2900
3020
|
::Io::Flow::V0::Models::TaxRegistration.new(r)
|
2901
3021
|
end
|
2902
3022
|
|
3023
|
+
def get_details(organization, incoming={})
|
3024
|
+
HttpClient::Preconditions.assert_class('organization', organization, String)
|
3025
|
+
opts = HttpClient::Helper.symbolize_keys(incoming)
|
3026
|
+
query = {
|
3027
|
+
:order_number => HttpClient::Preconditions.assert_class('order_number', opts.delete(:order_number), String),
|
3028
|
+
:limit => HttpClient::Preconditions.assert_class('limit', (x = opts.delete(:limit); x.nil? ? 25 : x), Integer),
|
3029
|
+
:offset => HttpClient::Preconditions.assert_class('offset', (x = opts.delete(:offset); x.nil? ? 0 : x), Integer)
|
3030
|
+
}.delete_if { |k, v| v.nil? }
|
3031
|
+
r = @client.request("/#{CGI.escape(organization)}/tax/registrations/details").with_query(query).get
|
3032
|
+
::Io::Flow::V0::Models::DetailedTaxRegistration.new(r)
|
3033
|
+
end
|
3034
|
+
|
2903
3035
|
def put_by_key(organization, key, tax_registration_form)
|
2904
3036
|
HttpClient::Preconditions.assert_class('organization', organization, String)
|
2905
3037
|
HttpClient::Preconditions.assert_class('key', key, String)
|
@@ -3707,7 +3839,8 @@ module Io
|
|
3707
3839
|
:service => (x = opts.delete(:service); x.nil? ? nil : HttpClient::Preconditions.assert_class('service', x, String)),
|
3708
3840
|
:item_number => (x = opts.delete(:item_number); x.nil? ? nil : HttpClient::Preconditions.assert_class('item_number', x, Array).map { |v| HttpClient::Preconditions.assert_class('item_number', v, String) }),
|
3709
3841
|
:min_lead_days => (x = opts.delete(:min_lead_days); x.nil? ? nil : HttpClient::Preconditions.assert_class('min_lead_days', x, Integer)),
|
3710
|
-
:max_lead_days => (x = opts.delete(:max_lead_days); x.nil? ? nil : HttpClient::Preconditions.assert_class('max_lead_days', x, Integer))
|
3842
|
+
:max_lead_days => (x = opts.delete(:max_lead_days); x.nil? ? nil : HttpClient::Preconditions.assert_class('max_lead_days', x, Integer)),
|
3843
|
+
:context => (x = opts.delete(:context); x.nil? ? nil : HttpClient::Preconditions.assert_class('context', x, String))
|
3711
3844
|
}.delete_if { |k, v| v.nil? }
|
3712
3845
|
r = @client.request("/#{CGI.escape(organization)}/delivery-windows/summary").with_query(query).get
|
3713
3846
|
::Io::Flow::V0::Models::DeliveryWindow.new(r)
|
@@ -3720,7 +3853,8 @@ module Io
|
|
3720
3853
|
query = {
|
3721
3854
|
:destination => (x = opts.delete(:destination); x.nil? ? nil : HttpClient::Preconditions.assert_class('destination', x, Array).map { |v| HttpClient::Preconditions.assert_class('destination', v, String) }),
|
3722
3855
|
:limit => HttpClient::Preconditions.assert_class('limit', (x = opts.delete(:limit); x.nil? ? 25 : x), Integer),
|
3723
|
-
:offset => HttpClient::Preconditions.assert_class('offset', (x = opts.delete(:offset); x.nil? ? 0 : x), Integer)
|
3856
|
+
:offset => HttpClient::Preconditions.assert_class('offset', (x = opts.delete(:offset); x.nil? ? 0 : x), Integer),
|
3857
|
+
:context => (x = opts.delete(:context); x.nil? ? nil : HttpClient::Preconditions.assert_class('context', x, String))
|
3724
3858
|
}.delete_if { |k, v| v.nil? }
|
3725
3859
|
r = @client.request("/#{CGI.escape(organization)}/delivery-windows/summary/all").with_query(query).get
|
3726
3860
|
r.map { |x| ::Io::Flow::V0::Models::DeliveryWindowSummary.new(x) }
|
@@ -3988,10 +4122,14 @@ module Io
|
|
3988
4122
|
r.map { |x| ::Io::Flow::V0::Models::Quote.new(x) }
|
3989
4123
|
end
|
3990
4124
|
|
3991
|
-
def post(organization, quote_form)
|
4125
|
+
def post(organization, quote_form, incoming={})
|
3992
4126
|
HttpClient::Preconditions.assert_class('organization', organization, String)
|
4127
|
+
opts = HttpClient::Helper.symbolize_keys(incoming)
|
4128
|
+
query = {
|
4129
|
+
:context => (x = opts.delete(:context); x.nil? ? nil : HttpClient::Preconditions.assert_class('context', x, String))
|
4130
|
+
}.delete_if { |k, v| v.nil? }
|
3993
4131
|
(x = quote_form; x.is_a?(::Io::Flow::V0::Models::QuoteForm) ? x : ::Io::Flow::V0::Models::QuoteForm.new(x))
|
3994
|
-
r = @client.request("/#{CGI.escape(organization)}/quotes").with_json(quote_form.to_json).post
|
4132
|
+
r = @client.request("/#{CGI.escape(organization)}/quotes").with_query(query).with_json(quote_form.to_json).post
|
3995
4133
|
::Io::Flow::V0::Models::Quote.new(r)
|
3996
4134
|
end
|
3997
4135
|
|
@@ -4052,6 +4190,13 @@ module Io
|
|
4052
4190
|
::Io::Flow::V0::Models::Ratecard.new(r)
|
4053
4191
|
end
|
4054
4192
|
|
4193
|
+
def delete_by_id(organization, id)
|
4194
|
+
HttpClient::Preconditions.assert_class('organization', organization, String)
|
4195
|
+
HttpClient::Preconditions.assert_class('id', id, String)
|
4196
|
+
r = @client.request("/#{CGI.escape(organization)}/ratecards/#{CGI.escape(id)}").delete
|
4197
|
+
nil
|
4198
|
+
end
|
4199
|
+
|
4055
4200
|
def put_publish_by_id(organization, id)
|
4056
4201
|
HttpClient::Preconditions.assert_class('organization', organization, String)
|
4057
4202
|
HttpClient::Preconditions.assert_class('id', id, String)
|
@@ -4073,19 +4218,27 @@ module Io
|
|
4073
4218
|
# gravitational weight, the weight field must be set. When estimating based
|
4074
4219
|
# off dimensional weight, then length/width/depth must be set. For either one,
|
4075
4220
|
# the appropriate unit of measurement must be given.
|
4076
|
-
def post(organization, ratecard_estimate_form)
|
4221
|
+
def post(organization, ratecard_estimate_form, incoming={})
|
4077
4222
|
HttpClient::Preconditions.assert_class('organization', organization, String)
|
4223
|
+
opts = HttpClient::Helper.symbolize_keys(incoming)
|
4224
|
+
query = {
|
4225
|
+
:context => (x = opts.delete(:context); x.nil? ? nil : HttpClient::Preconditions.assert_class('context', x, String))
|
4226
|
+
}.delete_if { |k, v| v.nil? }
|
4078
4227
|
(x = ratecard_estimate_form; x.is_a?(::Io::Flow::V0::Models::RatecardEstimateForm) ? x : ::Io::Flow::V0::Models::RatecardEstimateForm.from_json(x))
|
4079
|
-
r = @client.request("/#{CGI.escape(organization)}/ratecard_estimates").with_json(ratecard_estimate_form.to_json).post
|
4228
|
+
r = @client.request("/#{CGI.escape(organization)}/ratecard_estimates").with_query(query).with_json(ratecard_estimate_form.to_json).post
|
4080
4229
|
r.map { |x| ::Io::Flow::V0::Models::RatecardEstimate.from_json(x) }
|
4081
4230
|
end
|
4082
4231
|
|
4083
4232
|
# Endpoint to get a summary of the shipment estimates based on applicable rate
|
4084
4233
|
# cards. An origin and destination country must be provided.
|
4085
|
-
def post_summaries(organization, ratecard_estimate_summary_form)
|
4234
|
+
def post_summaries(organization, ratecard_estimate_summary_form, incoming={})
|
4086
4235
|
HttpClient::Preconditions.assert_class('organization', organization, String)
|
4236
|
+
opts = HttpClient::Helper.symbolize_keys(incoming)
|
4237
|
+
query = {
|
4238
|
+
:context => (x = opts.delete(:context); x.nil? ? nil : HttpClient::Preconditions.assert_class('context', x, String))
|
4239
|
+
}.delete_if { |k, v| v.nil? }
|
4087
4240
|
(x = ratecard_estimate_summary_form; x.is_a?(::Io::Flow::V0::Models::RatecardEstimateSummaryForm) ? x : ::Io::Flow::V0::Models::RatecardEstimateSummaryForm.new(x))
|
4088
|
-
r = @client.request("/#{CGI.escape(organization)}/ratecard_estimates/summaries").with_json(ratecard_estimate_summary_form.to_json).post
|
4241
|
+
r = @client.request("/#{CGI.escape(organization)}/ratecard_estimates/summaries").with_query(query).with_json(ratecard_estimate_summary_form.to_json).post
|
4089
4242
|
r.map { |x| ::Io::Flow::V0::Models::RatecardEstimate.from_json(x) }
|
4090
4243
|
end
|
4091
4244
|
|
@@ -4107,6 +4260,7 @@ module Io
|
|
4107
4260
|
:origin => (x = opts.delete(:origin); x.nil? ? nil : HttpClient::Preconditions.assert_class('origin', x, String)),
|
4108
4261
|
:ratecard_id => (x = opts.delete(:ratecard_id); x.nil? ? nil : HttpClient::Preconditions.assert_class('ratecard_id', x, String)),
|
4109
4262
|
:service => (x = opts.delete(:service); x.nil? ? nil : HttpClient::Preconditions.assert_class('service', x, String)),
|
4263
|
+
:ratecard_owner => (x = opts.delete(:ratecard_owner); x.nil? ? nil : (x = x; x.is_a?(::Io::Flow::V0::Models::RatecardOwner) ? x : ::Io::Flow::V0::Models::RatecardOwner.apply(x)).value),
|
4110
4264
|
:limit => HttpClient::Preconditions.assert_class('limit', (x = opts.delete(:limit); x.nil? ? 25 : x), Integer),
|
4111
4265
|
:offset => HttpClient::Preconditions.assert_class('offset', (x = opts.delete(:offset); x.nil? ? 0 : x), Integer),
|
4112
4266
|
:sort => HttpClient::Preconditions.assert_class('sort', (x = opts.delete(:sort); x.nil? ? "-created_at" : x), String)
|
@@ -4469,7 +4623,8 @@ module Io
|
|
4469
4623
|
HttpClient::Preconditions.assert_class('organization', organization, String)
|
4470
4624
|
opts = HttpClient::Helper.symbolize_keys(incoming)
|
4471
4625
|
query = {
|
4472
|
-
:show_commercial_invoice => (x = opts.delete(:show_commercial_invoice); x.nil? ? nil : HttpClient::Preconditions.assert_boolean('show_commercial_invoice', x))
|
4626
|
+
:show_commercial_invoice => (x = opts.delete(:show_commercial_invoice); x.nil? ? nil : HttpClient::Preconditions.assert_boolean('show_commercial_invoice', x)),
|
4627
|
+
:context => (x = opts.delete(:context); x.nil? ? nil : HttpClient::Preconditions.assert_class('context', x, String))
|
4473
4628
|
}.delete_if { |k, v| v.nil? }
|
4474
4629
|
(x = shipping_label_form; x.is_a?(::Io::Flow::V0::Models::ShippingLabelForm) ? x : ::Io::Flow::V0::Models::ShippingLabelForm.from_json(x))
|
4475
4630
|
r = @client.request("/#{CGI.escape(organization)}/shipping_labels").with_query(query).with_json(shipping_label_form.to_json).post
|
@@ -4922,7 +5077,9 @@ module Io
|
|
4922
5077
|
opts = HttpClient::Helper.symbolize_keys(incoming)
|
4923
5078
|
query = {
|
4924
5079
|
:address => (x = opts.delete(:address); x.nil? ? nil : HttpClient::Preconditions.assert_class('address', x, String)),
|
4925
|
-
:ip => (x = opts.delete(:ip); x.nil? ? nil : HttpClient::Preconditions.assert_class('ip', x, String))
|
5080
|
+
:ip => (x = opts.delete(:ip); x.nil? ? nil : HttpClient::Preconditions.assert_class('ip', x, String)),
|
5081
|
+
:country => (x = opts.delete(:country); x.nil? ? nil : HttpClient::Preconditions.assert_class('country', x, String)),
|
5082
|
+
:postal_prefix => (x = opts.delete(:postal_prefix); x.nil? ? nil : HttpClient::Preconditions.assert_class('postal_prefix', x, String))
|
4926
5083
|
}.delete_if { |k, v| v.nil? }
|
4927
5084
|
r = @client.request("/addresses").with_query(query).get
|
4928
5085
|
r.map { |x| ::Io::Flow::V0::Models::Address.new(x) }
|
@@ -5321,10 +5478,14 @@ module Io
|
|
5321
5478
|
nil
|
5322
5479
|
end
|
5323
5480
|
|
5324
|
-
def post_checkout_and_tokens_by_organization(organization, checkout_token_form)
|
5481
|
+
def post_checkout_and_tokens_by_organization(organization, checkout_token_form, incoming={})
|
5325
5482
|
HttpClient::Preconditions.assert_class('organization', organization, String)
|
5483
|
+
opts = HttpClient::Helper.symbolize_keys(incoming)
|
5484
|
+
query = {
|
5485
|
+
:context => (x = opts.delete(:context); x.nil? ? nil : HttpClient::Preconditions.assert_class('context', x, String))
|
5486
|
+
}.delete_if { |k, v| v.nil? }
|
5326
5487
|
(x = checkout_token_form; x.is_a?(::Io::Flow::V0::Models::CheckoutTokenForm) ? x : ::Io::Flow::V0::Models::CheckoutTokenForm.from_json(x))
|
5327
|
-
r = @client.request("/#{CGI.escape(organization)}/checkout/tokens").with_json(checkout_token_form.to_json).post
|
5488
|
+
r = @client.request("/#{CGI.escape(organization)}/checkout/tokens").with_query(query).with_json(checkout_token_form.to_json).post
|
5328
5489
|
::Io::Flow::V0::Models::CheckoutToken.new(r)
|
5329
5490
|
end
|
5330
5491
|
|
@@ -5512,11 +5673,11 @@ module Io
|
|
5512
5673
|
::Io::Flow::V0::Models::Customer.new(r)
|
5513
5674
|
end
|
5514
5675
|
|
5515
|
-
# Returns information about a specific customer.
|
5516
|
-
def
|
5676
|
+
# Returns information about a specific customer given a client token.
|
5677
|
+
def post_client_and_tokens(organization, customer_client_token)
|
5517
5678
|
HttpClient::Preconditions.assert_class('organization', organization, String)
|
5518
|
-
|
5519
|
-
r = @client.request("/#{CGI.escape(organization)}/customers
|
5679
|
+
(x = customer_client_token; x.is_a?(::Io::Flow::V0::Models::CustomerClientToken) ? x : ::Io::Flow::V0::Models::CustomerClientToken.new(x))
|
5680
|
+
r = @client.request("/#{CGI.escape(organization)}/customers/client/tokens").with_json(customer_client_token.to_json).post
|
5520
5681
|
::Io::Flow::V0::Models::Customer.new(r)
|
5521
5682
|
end
|
5522
5683
|
|
@@ -5921,7 +6082,7 @@ module Io
|
|
5921
6082
|
def get_organization_and_roles_by_organization(organization)
|
5922
6083
|
HttpClient::Preconditions.assert_class('organization', organization, String)
|
5923
6084
|
r = @client.request("/permission/organization/#{CGI.escape(organization)}/roles").get
|
5924
|
-
r.map { |x| ::Io::Flow::V0::Models::FlowRole.
|
6085
|
+
r.map { |x| ::Io::Flow::V0::Models::FlowRole.new(x) }
|
5925
6086
|
end
|
5926
6087
|
|
5927
6088
|
end
|
@@ -6722,10 +6883,14 @@ module Io
|
|
6722
6883
|
::Io::Flow::V0::Models::Session.from_json(r)
|
6723
6884
|
end
|
6724
6885
|
|
6725
|
-
def post_organizations_by_organization(organization, session_form)
|
6886
|
+
def post_organizations_by_organization(organization, session_form, incoming={})
|
6726
6887
|
HttpClient::Preconditions.assert_class('organization', organization, String)
|
6888
|
+
opts = HttpClient::Helper.symbolize_keys(incoming)
|
6889
|
+
query = {
|
6890
|
+
:context => (x = opts.delete(:context); x.nil? ? nil : HttpClient::Preconditions.assert_class('context', x, String))
|
6891
|
+
}.delete_if { |k, v| v.nil? }
|
6727
6892
|
(x = session_form; x.is_a?(::Io::Flow::V0::Models::SessionForm) ? x : ::Io::Flow::V0::Models::SessionForm.new(x))
|
6728
|
-
r = @client.request("/sessions/organizations/#{CGI.escape(organization)}").with_json(session_form.to_json).post
|
6893
|
+
r = @client.request("/sessions/organizations/#{CGI.escape(organization)}").with_query(query).with_json(session_form.to_json).post
|
6729
6894
|
::Io::Flow::V0::Models::OrganizationSession.new(r)
|
6730
6895
|
end
|
6731
6896
|
|
@@ -6735,10 +6900,14 @@ module Io
|
|
6735
6900
|
::Io::Flow::V0::Models::Session.from_json(r)
|
6736
6901
|
end
|
6737
6902
|
|
6738
|
-
def put_by_session(session, session_put_form)
|
6903
|
+
def put_by_session(session, session_put_form, incoming={})
|
6739
6904
|
HttpClient::Preconditions.assert_class('session', session, String)
|
6905
|
+
opts = HttpClient::Helper.symbolize_keys(incoming)
|
6906
|
+
query = {
|
6907
|
+
:context => (x = opts.delete(:context); x.nil? ? nil : HttpClient::Preconditions.assert_class('context', x, String))
|
6908
|
+
}.delete_if { |k, v| v.nil? }
|
6740
6909
|
(x = session_put_form; x.is_a?(::Io::Flow::V0::Models::SessionPutForm) ? x : ::Io::Flow::V0::Models::SessionPutForm.new(x))
|
6741
|
-
r = @client.request("/sessions/#{CGI.escape(session)}").with_json(session_put_form.to_json).put
|
6910
|
+
r = @client.request("/sessions/#{CGI.escape(session)}").with_query(query).with_json(session_put_form.to_json).put
|
6742
6911
|
::Io::Flow::V0::Models::Session.from_json(r)
|
6743
6912
|
end
|
6744
6913
|
|
@@ -6755,19 +6924,27 @@ module Io
|
|
6755
6924
|
::Io::Flow::V0::Models::Session.from_json(r)
|
6756
6925
|
end
|
6757
6926
|
|
6758
|
-
def put_organizations_by_session_and_organization(session, organization, session_put_form)
|
6927
|
+
def put_organizations_by_session_and_organization(session, organization, session_put_form, incoming={})
|
6759
6928
|
HttpClient::Preconditions.assert_class('session', session, String)
|
6760
6929
|
HttpClient::Preconditions.assert_class('organization', organization, String)
|
6930
|
+
opts = HttpClient::Helper.symbolize_keys(incoming)
|
6931
|
+
query = {
|
6932
|
+
:context => (x = opts.delete(:context); x.nil? ? nil : HttpClient::Preconditions.assert_class('context', x, String))
|
6933
|
+
}.delete_if { |k, v| v.nil? }
|
6761
6934
|
(x = session_put_form; x.is_a?(::Io::Flow::V0::Models::SessionPutForm) ? x : ::Io::Flow::V0::Models::SessionPutForm.new(x))
|
6762
|
-
r = @client.request("/sessions/#{CGI.escape(session)}/organizations/#{CGI.escape(organization)}").with_json(session_put_form.to_json).put
|
6935
|
+
r = @client.request("/sessions/#{CGI.escape(session)}/organizations/#{CGI.escape(organization)}").with_query(query).with_json(session_put_form.to_json).put
|
6763
6936
|
::Io::Flow::V0::Models::OrganizationSession.new(r)
|
6764
6937
|
end
|
6765
6938
|
|
6766
6939
|
# Resets the session based on the provided geo parameters.
|
6767
|
-
def put_reset_by_session(session, session_put_form)
|
6940
|
+
def put_reset_by_session(session, session_put_form, incoming={})
|
6768
6941
|
HttpClient::Preconditions.assert_class('session', session, String)
|
6942
|
+
opts = HttpClient::Helper.symbolize_keys(incoming)
|
6943
|
+
query = {
|
6944
|
+
:context => (x = opts.delete(:context); x.nil? ? nil : HttpClient::Preconditions.assert_class('context', x, String))
|
6945
|
+
}.delete_if { |k, v| v.nil? }
|
6769
6946
|
(x = session_put_form; x.is_a?(::Io::Flow::V0::Models::SessionPutForm) ? x : ::Io::Flow::V0::Models::SessionPutForm.new(x))
|
6770
|
-
r = @client.request("/sessions/#{CGI.escape(session)}/reset").with_json(session_put_form.to_json).put
|
6947
|
+
r = @client.request("/sessions/#{CGI.escape(session)}/reset").with_query(query).with_json(session_put_form.to_json).put
|
6771
6948
|
::Io::Flow::V0::Models::Session.from_json(r)
|
6772
6949
|
end
|
6773
6950
|
|
@@ -6794,47 +6971,71 @@ module Io
|
|
6794
6971
|
end
|
6795
6972
|
|
6796
6973
|
# Retrieve representation of a Shopify cart for the given order number.
|
6797
|
-
def get_order_by_number(number)
|
6974
|
+
def get_order_by_number(number, incoming={})
|
6798
6975
|
HttpClient::Preconditions.assert_class('number', number, String)
|
6799
|
-
|
6976
|
+
opts = HttpClient::Helper.symbolize_keys(incoming)
|
6977
|
+
query = {
|
6978
|
+
:context => (x = opts.delete(:context); x.nil? ? nil : HttpClient::Preconditions.assert_class('context', x, String))
|
6979
|
+
}.delete_if { |k, v| v.nil? }
|
6980
|
+
r = @client.request("/shopify/carts/order/#{CGI.escape(number)}").with_query(query).get
|
6800
6981
|
::Io::Flow::V0::Models::ShopifyCart.new(r)
|
6801
6982
|
end
|
6802
6983
|
|
6803
6984
|
# Retrieve representation of a Shopify cart given the unique cart id.
|
6804
|
-
def get_by_id_html(id)
|
6985
|
+
def get_by_id_html(id, incoming={})
|
6805
6986
|
HttpClient::Preconditions.assert_class('id', id, String)
|
6806
|
-
|
6987
|
+
opts = HttpClient::Helper.symbolize_keys(incoming)
|
6988
|
+
query = {
|
6989
|
+
:context => (x = opts.delete(:context); x.nil? ? nil : HttpClient::Preconditions.assert_class('context', x, String))
|
6990
|
+
}.delete_if { |k, v| v.nil? }
|
6991
|
+
r = @client.request("/shopify/carts/#{CGI.escape(id)}").with_query(query).get
|
6807
6992
|
r
|
6808
6993
|
end
|
6809
6994
|
|
6810
6995
|
# Retrieve representation of a Shopify cart given the unique cart id.
|
6811
|
-
def get_by_id(id)
|
6996
|
+
def get_by_id(id, incoming={})
|
6812
6997
|
HttpClient::Preconditions.assert_class('id', id, String)
|
6813
|
-
|
6998
|
+
opts = HttpClient::Helper.symbolize_keys(incoming)
|
6999
|
+
query = {
|
7000
|
+
:context => (x = opts.delete(:context); x.nil? ? nil : HttpClient::Preconditions.assert_class('context', x, String))
|
7001
|
+
}.delete_if { |k, v| v.nil? }
|
7002
|
+
r = @client.request("/shopify/carts/#{CGI.escape(id)}").with_query(query).get
|
6814
7003
|
::Io::Flow::V0::Models::ShopifyCart.new(r)
|
6815
7004
|
end
|
6816
7005
|
|
6817
7006
|
# Add an item to a Shopify cart given the unique cart id.
|
6818
|
-
def post_add_by_id(id, shopify_cart_add_form)
|
7007
|
+
def post_add_by_id(id, shopify_cart_add_form, incoming={})
|
6819
7008
|
HttpClient::Preconditions.assert_class('id', id, String)
|
7009
|
+
opts = HttpClient::Helper.symbolize_keys(incoming)
|
7010
|
+
query = {
|
7011
|
+
:context => (x = opts.delete(:context); x.nil? ? nil : HttpClient::Preconditions.assert_class('context', x, String))
|
7012
|
+
}.delete_if { |k, v| v.nil? }
|
6820
7013
|
(x = shopify_cart_add_form; x.is_a?(::Io::Flow::V0::Models::ShopifyCartAddForm) ? x : ::Io::Flow::V0::Models::ShopifyCartAddForm.from_json(x))
|
6821
|
-
r = @client.request("/shopify/carts/#{CGI.escape(id)}/add").with_json(shopify_cart_add_form.to_json).post
|
7014
|
+
r = @client.request("/shopify/carts/#{CGI.escape(id)}/add").with_query(query).with_json(shopify_cart_add_form.to_json).post
|
6822
7015
|
::Io::Flow::V0::Models::ShopifyCart.new(r)
|
6823
7016
|
end
|
6824
7017
|
|
6825
7018
|
# Update the attribute information for the cart.
|
6826
|
-
def put_attributes_by_id(id, shopify_order_attributes_form)
|
7019
|
+
def put_attributes_by_id(id, shopify_order_attributes_form, incoming={})
|
6827
7020
|
HttpClient::Preconditions.assert_class('id', id, String)
|
7021
|
+
opts = HttpClient::Helper.symbolize_keys(incoming)
|
7022
|
+
query = {
|
7023
|
+
:context => (x = opts.delete(:context); x.nil? ? nil : HttpClient::Preconditions.assert_class('context', x, String))
|
7024
|
+
}.delete_if { |k, v| v.nil? }
|
6828
7025
|
(x = shopify_order_attributes_form; x.is_a?(::Io::Flow::V0::Models::ShopifyOrderAttributesForm) ? x : ::Io::Flow::V0::Models::ShopifyOrderAttributesForm.new(x))
|
6829
|
-
r = @client.request("/shopify/carts/#{CGI.escape(id)}/attributes").with_json(shopify_order_attributes_form.to_json).put
|
7026
|
+
r = @client.request("/shopify/carts/#{CGI.escape(id)}/attributes").with_query(query).with_json(shopify_order_attributes_form.to_json).put
|
6830
7027
|
::Io::Flow::V0::Models::ShopifyCart.new(r)
|
6831
7028
|
end
|
6832
7029
|
|
6833
7030
|
# Change/Update an item in a Shopify cart given the unique cart id.
|
6834
|
-
def post_change_by_id(id, shopify_cart_change_form)
|
7031
|
+
def post_change_by_id(id, shopify_cart_change_form, incoming={})
|
6835
7032
|
HttpClient::Preconditions.assert_class('id', id, String)
|
7033
|
+
opts = HttpClient::Helper.symbolize_keys(incoming)
|
7034
|
+
query = {
|
7035
|
+
:context => (x = opts.delete(:context); x.nil? ? nil : HttpClient::Preconditions.assert_class('context', x, String))
|
7036
|
+
}.delete_if { |k, v| v.nil? }
|
6836
7037
|
(x = shopify_cart_change_form; x.is_a?(::Io::Flow::V0::Models::ShopifyCartChangeForm) ? x : ::Io::Flow::V0::Models::ShopifyCartChangeForm.new(x))
|
6837
|
-
r = @client.request("/shopify/carts/#{CGI.escape(id)}/change").with_json(shopify_cart_change_form.to_json).post
|
7038
|
+
r = @client.request("/shopify/carts/#{CGI.escape(id)}/change").with_query(query).with_json(shopify_cart_change_form.to_json).post
|
6838
7039
|
::Io::Flow::V0::Models::ShopifyCart.new(r)
|
6839
7040
|
end
|
6840
7041
|
|
@@ -6846,10 +7047,14 @@ module Io
|
|
6846
7047
|
end
|
6847
7048
|
|
6848
7049
|
# Update the geo information for the cart.
|
6849
|
-
def put_geo_by_id(id, geo_form)
|
7050
|
+
def put_geo_by_id(id, geo_form, incoming={})
|
6850
7051
|
HttpClient::Preconditions.assert_class('id', id, String)
|
7052
|
+
opts = HttpClient::Helper.symbolize_keys(incoming)
|
7053
|
+
query = {
|
7054
|
+
:context => (x = opts.delete(:context); x.nil? ? nil : HttpClient::Preconditions.assert_class('context', x, String))
|
7055
|
+
}.delete_if { |k, v| v.nil? }
|
6851
7056
|
(x = geo_form; x.is_a?(::Io::Flow::V0::Models::GeoForm) ? x : ::Io::Flow::V0::Models::GeoForm.new(x))
|
6852
|
-
r = @client.request("/shopify/carts/#{CGI.escape(id)}/geo").with_json(geo_form.to_json).put
|
7057
|
+
r = @client.request("/shopify/carts/#{CGI.escape(id)}/geo").with_query(query).with_json(geo_form.to_json).put
|
6853
7058
|
::Io::Flow::V0::Models::ShopifyCart.new(r)
|
6854
7059
|
end
|
6855
7060
|
|
@@ -6858,7 +7063,8 @@ module Io
|
|
6858
7063
|
HttpClient::Preconditions.assert_class('id', id, String)
|
6859
7064
|
opts = HttpClient::Helper.symbolize_keys(incoming)
|
6860
7065
|
query = {
|
6861
|
-
:expand => (x = opts.delete(:expand); x.nil? ? nil : HttpClient::Preconditions.assert_class('expand', x, Array).map { |v| HttpClient::Preconditions.assert_class('expand', v, String) })
|
7066
|
+
:expand => (x = opts.delete(:expand); x.nil? ? nil : HttpClient::Preconditions.assert_class('expand', x, Array).map { |v| HttpClient::Preconditions.assert_class('expand', v, String) }),
|
7067
|
+
:context => (x = opts.delete(:context); x.nil? ? nil : HttpClient::Preconditions.assert_class('context', x, String))
|
6862
7068
|
}.delete_if { |k, v| v.nil? }
|
6863
7069
|
r = @client.request("/shopify/carts/#{CGI.escape(id)}/orders").with_query(query).post
|
6864
7070
|
::Io::Flow::V0::Models::Order.new(r)
|
@@ -6873,15 +7079,16 @@ module Io
|
|
6873
7079
|
end
|
6874
7080
|
|
6875
7081
|
# Creates a shopify cart conversion from a shopify cart
|
6876
|
-
def post_conversions(organization, experience_key,
|
7082
|
+
def post_conversions(organization, experience_key, io_flow_shopify_external_v0_models_shopify_external_cart, incoming={})
|
6877
7083
|
HttpClient::Preconditions.assert_class('organization', organization, String)
|
6878
7084
|
HttpClient::Preconditions.assert_class('experience_key', experience_key, String)
|
6879
7085
|
opts = HttpClient::Helper.symbolize_keys(incoming)
|
6880
7086
|
query = {
|
6881
|
-
:expand => (x = opts.delete(:expand); x.nil? ? nil : HttpClient::Preconditions.assert_class('expand', x, Array).map { |v| HttpClient::Preconditions.assert_class('expand', v, String) })
|
7087
|
+
:expand => (x = opts.delete(:expand); x.nil? ? nil : HttpClient::Preconditions.assert_class('expand', x, Array).map { |v| HttpClient::Preconditions.assert_class('expand', v, String) }),
|
7088
|
+
:context => (x = opts.delete(:context); x.nil? ? nil : HttpClient::Preconditions.assert_class('context', x, String))
|
6882
7089
|
}.delete_if { |k, v| v.nil? }
|
6883
|
-
(x =
|
6884
|
-
r = @client.request("/#{CGI.escape(organization)}/experiences/#{CGI.escape(experience_key)}/shopify/cart/conversions").with_query(query).with_json(
|
7090
|
+
(x = io_flow_shopify_external_v0_models_shopify_external_cart; x.is_a?(::Io::Flow::Shopify::External::V0::Models::ShopifyExternalCart) ? x : ::Io::Flow::Shopify::External::V0::Models::ShopifyExternalCart.new(x))
|
7091
|
+
r = @client.request("/#{CGI.escape(organization)}/experiences/#{CGI.escape(experience_key)}/shopify/cart/conversions").with_query(query).with_json(io_flow_shopify_external_v0_models_shopify_external_cart.to_json).post
|
6885
7092
|
::Io::Flow::V0::Models::ShopifyCartConversion.new(r)
|
6886
7093
|
end
|
6887
7094
|
|
@@ -7074,6 +7281,209 @@ module Io
|
|
7074
7281
|
|
7075
7282
|
end
|
7076
7283
|
|
7284
|
+
class SyncPendingRecords
|
7285
|
+
|
7286
|
+
def initialize(client)
|
7287
|
+
@client = HttpClient::Preconditions.assert_class('client', client, ::Io::Flow::V0::Client)
|
7288
|
+
end
|
7289
|
+
|
7290
|
+
def get(organization, incoming={})
|
7291
|
+
HttpClient::Preconditions.assert_class('organization', organization, String)
|
7292
|
+
opts = HttpClient::Helper.symbolize_keys(incoming)
|
7293
|
+
query = {
|
7294
|
+
:id => (x = opts.delete(:id); x.nil? ? nil : HttpClient::Preconditions.assert_class('id', x, Array).map { |v| HttpClient::Preconditions.assert_class('id', v, String) }),
|
7295
|
+
:stream_key => (x = opts.delete(:stream_key); x.nil? ? nil : HttpClient::Preconditions.assert_class('stream_key', x, String)),
|
7296
|
+
:value => (x = opts.delete(:value); x.nil? ? nil : HttpClient::Preconditions.assert_class('value', x, String)),
|
7297
|
+
:system => (x = opts.delete(:system); x.nil? ? nil : HttpClient::Preconditions.assert_class('system', x, String)),
|
7298
|
+
:limit => HttpClient::Preconditions.assert_class('limit', (x = opts.delete(:limit); x.nil? ? 25 : x), Integer),
|
7299
|
+
:offset => HttpClient::Preconditions.assert_class('offset', (x = opts.delete(:offset); x.nil? ? 0 : x), Integer),
|
7300
|
+
:sort => HttpClient::Preconditions.assert_class('sort', (x = opts.delete(:sort); x.nil? ? "-created_at" : x), String)
|
7301
|
+
}.delete_if { |k, v| v.nil? }
|
7302
|
+
r = @client.request("/#{CGI.escape(organization)}/sync/pending/records").with_query(query).get
|
7303
|
+
r.map { |x| ::Io::Flow::V0::Models::SyncPendingRecord.new(x) }
|
7304
|
+
end
|
7305
|
+
|
7306
|
+
end
|
7307
|
+
|
7308
|
+
class SyncRecords
|
7309
|
+
|
7310
|
+
def initialize(client)
|
7311
|
+
@client = HttpClient::Preconditions.assert_class('client', client, ::Io::Flow::V0::Client)
|
7312
|
+
end
|
7313
|
+
|
7314
|
+
def get(organization, incoming={})
|
7315
|
+
HttpClient::Preconditions.assert_class('organization', organization, String)
|
7316
|
+
opts = HttpClient::Helper.symbolize_keys(incoming)
|
7317
|
+
query = {
|
7318
|
+
:id => (x = opts.delete(:id); x.nil? ? nil : HttpClient::Preconditions.assert_class('id', x, Array).map { |v| HttpClient::Preconditions.assert_class('id', v, String) }),
|
7319
|
+
:stream_key => (x = opts.delete(:stream_key); x.nil? ? nil : HttpClient::Preconditions.assert_class('stream_key', x, String)),
|
7320
|
+
:system => (x = opts.delete(:system); x.nil? ? nil : HttpClient::Preconditions.assert_class('system', x, String)),
|
7321
|
+
:value => (x = opts.delete(:value); x.nil? ? nil : HttpClient::Preconditions.assert_class('value', x, String)),
|
7322
|
+
:limit => HttpClient::Preconditions.assert_class('limit', (x = opts.delete(:limit); x.nil? ? 25 : x), Integer),
|
7323
|
+
:offset => HttpClient::Preconditions.assert_class('offset', (x = opts.delete(:offset); x.nil? ? 0 : x), Integer),
|
7324
|
+
:sort => HttpClient::Preconditions.assert_class('sort', (x = opts.delete(:sort); x.nil? ? "-created_at" : x), String)
|
7325
|
+
}.delete_if { |k, v| v.nil? }
|
7326
|
+
r = @client.request("/#{CGI.escape(organization)}/sync/records").with_query(query).get
|
7327
|
+
r.map { |x| ::Io::Flow::V0::Models::SyncRecord.new(x) }
|
7328
|
+
end
|
7329
|
+
|
7330
|
+
def post(organization, sync_record_form)
|
7331
|
+
HttpClient::Preconditions.assert_class('organization', organization, String)
|
7332
|
+
(x = sync_record_form; x.is_a?(::Io::Flow::V0::Models::SyncRecordForm) ? x : ::Io::Flow::V0::Models::SyncRecordForm.new(x))
|
7333
|
+
r = @client.request("/#{CGI.escape(organization)}/sync/records").with_json(sync_record_form.to_json).post
|
7334
|
+
::Io::Flow::V0::Models::SyncRecord.new(r)
|
7335
|
+
end
|
7336
|
+
|
7337
|
+
# Idempotent method to upsert a value for a system for this stream.
|
7338
|
+
def put_streams_and_systems_and_values_by_stream_key_and_system_and_value(organization, stream_key, system, value)
|
7339
|
+
HttpClient::Preconditions.assert_class('organization', organization, String)
|
7340
|
+
HttpClient::Preconditions.assert_class('stream_key', stream_key, String)
|
7341
|
+
HttpClient::Preconditions.assert_class('system', system, String)
|
7342
|
+
HttpClient::Preconditions.assert_class('value', value, String)
|
7343
|
+
r = @client.request("/#{CGI.escape(organization)}/sync/records/streams/#{CGI.escape(stream_key)}/systems/#{CGI.escape(system)}/values/#{CGI.escape(value)}").put
|
7344
|
+
::Io::Flow::V0::Models::SyncRecord.new(r)
|
7345
|
+
end
|
7346
|
+
|
7347
|
+
# Delete a value for a system for this stream.
|
7348
|
+
def delete_streams_and_systems_and_values_by_stream_key_and_system_and_value(organization, stream_key, system, value)
|
7349
|
+
HttpClient::Preconditions.assert_class('organization', organization, String)
|
7350
|
+
HttpClient::Preconditions.assert_class('stream_key', stream_key, String)
|
7351
|
+
HttpClient::Preconditions.assert_class('system', system, String)
|
7352
|
+
HttpClient::Preconditions.assert_class('value', value, String)
|
7353
|
+
r = @client.request("/#{CGI.escape(organization)}/sync/records/streams/#{CGI.escape(stream_key)}/systems/#{CGI.escape(system)}/values/#{CGI.escape(value)}").delete
|
7354
|
+
nil
|
7355
|
+
end
|
7356
|
+
|
7357
|
+
def get_by_id(organization, id)
|
7358
|
+
HttpClient::Preconditions.assert_class('organization', organization, String)
|
7359
|
+
HttpClient::Preconditions.assert_class('id', id, String)
|
7360
|
+
r = @client.request("/#{CGI.escape(organization)}/sync/records/#{CGI.escape(id)}").get
|
7361
|
+
::Io::Flow::V0::Models::SyncRecord.new(r)
|
7362
|
+
end
|
7363
|
+
|
7364
|
+
def put_by_id(organization, id, sync_record_form)
|
7365
|
+
HttpClient::Preconditions.assert_class('organization', organization, String)
|
7366
|
+
HttpClient::Preconditions.assert_class('id', id, String)
|
7367
|
+
(x = sync_record_form; x.is_a?(::Io::Flow::V0::Models::SyncRecordForm) ? x : ::Io::Flow::V0::Models::SyncRecordForm.new(x))
|
7368
|
+
r = @client.request("/#{CGI.escape(organization)}/sync/records/#{CGI.escape(id)}").with_json(sync_record_form.to_json).put
|
7369
|
+
::Io::Flow::V0::Models::SyncRecord.new(r)
|
7370
|
+
end
|
7371
|
+
|
7372
|
+
def delete_by_id(organization, id)
|
7373
|
+
HttpClient::Preconditions.assert_class('organization', organization, String)
|
7374
|
+
HttpClient::Preconditions.assert_class('id', id, String)
|
7375
|
+
r = @client.request("/#{CGI.escape(organization)}/sync/records/#{CGI.escape(id)}").delete
|
7376
|
+
nil
|
7377
|
+
end
|
7378
|
+
|
7379
|
+
end
|
7380
|
+
|
7381
|
+
class SyncRecordFailures
|
7382
|
+
|
7383
|
+
def initialize(client)
|
7384
|
+
@client = HttpClient::Preconditions.assert_class('client', client, ::Io::Flow::V0::Client)
|
7385
|
+
end
|
7386
|
+
|
7387
|
+
def get(organization, incoming={})
|
7388
|
+
HttpClient::Preconditions.assert_class('organization', organization, String)
|
7389
|
+
opts = HttpClient::Helper.symbolize_keys(incoming)
|
7390
|
+
query = {
|
7391
|
+
:id => (x = opts.delete(:id); x.nil? ? nil : HttpClient::Preconditions.assert_class('id', x, Array).map { |v| HttpClient::Preconditions.assert_class('id', v, String) }),
|
7392
|
+
:stream_key => (x = opts.delete(:stream_key); x.nil? ? nil : HttpClient::Preconditions.assert_class('stream_key', x, String)),
|
7393
|
+
:value => (x = opts.delete(:value); x.nil? ? nil : HttpClient::Preconditions.assert_class('value', x, String)),
|
7394
|
+
:system => (x = opts.delete(:system); x.nil? ? nil : HttpClient::Preconditions.assert_class('system', x, String)),
|
7395
|
+
:reason => (x = opts.delete(:reason); x.nil? ? nil : (x = x; x.is_a?(::Io::Flow::V0::Models::SyncRecordFailureReason) ? x : ::Io::Flow::V0::Models::SyncRecordFailureReason.apply(x)).value),
|
7396
|
+
:limit => HttpClient::Preconditions.assert_class('limit', (x = opts.delete(:limit); x.nil? ? 25 : x), Integer),
|
7397
|
+
:offset => HttpClient::Preconditions.assert_class('offset', (x = opts.delete(:offset); x.nil? ? 0 : x), Integer),
|
7398
|
+
:sort => HttpClient::Preconditions.assert_class('sort', (x = opts.delete(:sort); x.nil? ? "-created_at" : x), String)
|
7399
|
+
}.delete_if { |k, v| v.nil? }
|
7400
|
+
r = @client.request("/#{CGI.escape(organization)}/sync/record/failures").with_query(query).get
|
7401
|
+
r.map { |x| ::Io::Flow::V0::Models::SyncRecordFailure.new(x) }
|
7402
|
+
end
|
7403
|
+
|
7404
|
+
def post(organization, sync_record_failure_form)
|
7405
|
+
HttpClient::Preconditions.assert_class('organization', organization, String)
|
7406
|
+
(x = sync_record_failure_form; x.is_a?(::Io::Flow::V0::Models::SyncRecordFailureForm) ? x : ::Io::Flow::V0::Models::SyncRecordFailureForm.new(x))
|
7407
|
+
r = @client.request("/#{CGI.escape(organization)}/sync/record/failures").with_json(sync_record_failure_form.to_json).post
|
7408
|
+
::Io::Flow::V0::Models::SyncRecordFailure.new(r)
|
7409
|
+
end
|
7410
|
+
|
7411
|
+
def get_by_id(organization, id)
|
7412
|
+
HttpClient::Preconditions.assert_class('organization', organization, String)
|
7413
|
+
HttpClient::Preconditions.assert_class('id', id, String)
|
7414
|
+
r = @client.request("/#{CGI.escape(organization)}/sync/record/failures/#{CGI.escape(id)}").get
|
7415
|
+
::Io::Flow::V0::Models::SyncRecordFailure.new(r)
|
7416
|
+
end
|
7417
|
+
|
7418
|
+
def put_by_id(organization, id, sync_record_failure_form)
|
7419
|
+
HttpClient::Preconditions.assert_class('organization', organization, String)
|
7420
|
+
HttpClient::Preconditions.assert_class('id', id, String)
|
7421
|
+
(x = sync_record_failure_form; x.is_a?(::Io::Flow::V0::Models::SyncRecordFailureForm) ? x : ::Io::Flow::V0::Models::SyncRecordFailureForm.new(x))
|
7422
|
+
r = @client.request("/#{CGI.escape(organization)}/sync/record/failures/#{CGI.escape(id)}").with_json(sync_record_failure_form.to_json).put
|
7423
|
+
::Io::Flow::V0::Models::SyncRecordFailure.new(r)
|
7424
|
+
end
|
7425
|
+
|
7426
|
+
def delete_by_id(organization, id)
|
7427
|
+
HttpClient::Preconditions.assert_class('organization', organization, String)
|
7428
|
+
HttpClient::Preconditions.assert_class('id', id, String)
|
7429
|
+
r = @client.request("/#{CGI.escape(organization)}/sync/record/failures/#{CGI.escape(id)}").delete
|
7430
|
+
nil
|
7431
|
+
end
|
7432
|
+
|
7433
|
+
end
|
7434
|
+
|
7435
|
+
class SyncStreams
|
7436
|
+
|
7437
|
+
def initialize(client)
|
7438
|
+
@client = HttpClient::Preconditions.assert_class('client', client, ::Io::Flow::V0::Client)
|
7439
|
+
end
|
7440
|
+
|
7441
|
+
def get(organization, incoming={})
|
7442
|
+
HttpClient::Preconditions.assert_class('organization', organization, String)
|
7443
|
+
opts = HttpClient::Helper.symbolize_keys(incoming)
|
7444
|
+
query = {
|
7445
|
+
:id => (x = opts.delete(:id); x.nil? ? nil : HttpClient::Preconditions.assert_class('id', x, Array).map { |v| HttpClient::Preconditions.assert_class('id', v, String) }),
|
7446
|
+
:key => (x = opts.delete(:key); x.nil? ? nil : HttpClient::Preconditions.assert_class('key', x, String)),
|
7447
|
+
:type => (x = opts.delete(:type); x.nil? ? nil : (x = x; x.is_a?(::Io::Flow::V0::Models::SyncStreamType) ? x : ::Io::Flow::V0::Models::SyncStreamType.apply(x)).value),
|
7448
|
+
:limit => HttpClient::Preconditions.assert_class('limit', (x = opts.delete(:limit); x.nil? ? 25 : x), Integer),
|
7449
|
+
:offset => HttpClient::Preconditions.assert_class('offset', (x = opts.delete(:offset); x.nil? ? 0 : x), Integer),
|
7450
|
+
:sort => HttpClient::Preconditions.assert_class('sort', (x = opts.delete(:sort); x.nil? ? "-created_at" : x), String)
|
7451
|
+
}.delete_if { |k, v| v.nil? }
|
7452
|
+
r = @client.request("/#{CGI.escape(organization)}/sync/streams").with_query(query).get
|
7453
|
+
r.map { |x| ::Io::Flow::V0::Models::SyncStream.new(x) }
|
7454
|
+
end
|
7455
|
+
|
7456
|
+
def post(organization, sync_stream_form)
|
7457
|
+
HttpClient::Preconditions.assert_class('organization', organization, String)
|
7458
|
+
(x = sync_stream_form; x.is_a?(::Io::Flow::V0::Models::SyncStreamForm) ? x : ::Io::Flow::V0::Models::SyncStreamForm.new(x))
|
7459
|
+
r = @client.request("/#{CGI.escape(organization)}/sync/streams").with_json(sync_stream_form.to_json).post
|
7460
|
+
::Io::Flow::V0::Models::SyncStream.new(r)
|
7461
|
+
end
|
7462
|
+
|
7463
|
+
def get_by_key(organization, key)
|
7464
|
+
HttpClient::Preconditions.assert_class('organization', organization, String)
|
7465
|
+
HttpClient::Preconditions.assert_class('key', key, String)
|
7466
|
+
r = @client.request("/#{CGI.escape(organization)}/sync/streams/#{CGI.escape(key)}").get
|
7467
|
+
::Io::Flow::V0::Models::SyncStream.new(r)
|
7468
|
+
end
|
7469
|
+
|
7470
|
+
def put_by_key(organization, key, sync_stream_form)
|
7471
|
+
HttpClient::Preconditions.assert_class('organization', organization, String)
|
7472
|
+
HttpClient::Preconditions.assert_class('key', key, String)
|
7473
|
+
(x = sync_stream_form; x.is_a?(::Io::Flow::V0::Models::SyncStreamForm) ? x : ::Io::Flow::V0::Models::SyncStreamForm.new(x))
|
7474
|
+
r = @client.request("/#{CGI.escape(organization)}/sync/streams/#{CGI.escape(key)}").with_json(sync_stream_form.to_json).put
|
7475
|
+
::Io::Flow::V0::Models::SyncStream.new(r)
|
7476
|
+
end
|
7477
|
+
|
7478
|
+
def delete_by_key(organization, key)
|
7479
|
+
HttpClient::Preconditions.assert_class('organization', organization, String)
|
7480
|
+
HttpClient::Preconditions.assert_class('key', key, String)
|
7481
|
+
r = @client.request("/#{CGI.escape(organization)}/sync/streams/#{CGI.escape(key)}").delete
|
7482
|
+
nil
|
7483
|
+
end
|
7484
|
+
|
7485
|
+
end
|
7486
|
+
|
7077
7487
|
class TaxSettings
|
7078
7488
|
|
7079
7489
|
def initialize(client)
|
@@ -7261,6 +7671,68 @@ module Io
|
|
7261
7671
|
|
7262
7672
|
module Models
|
7263
7673
|
|
7674
|
+
# Configurations to support payment authentication done in the user experience
|
7675
|
+
# e.g. card authentication with 3DS by an issuer ACS.
|
7676
|
+
class ActionConfiguration
|
7677
|
+
|
7678
|
+
module Types
|
7679
|
+
THREEDS_TWO_BROWSER_ACTION_CONFIGURATION = 'threeds_two_browser_action_configuration' unless defined?(THREEDS_TWO_BROWSER_ACTION_CONFIGURATION)
|
7680
|
+
end
|
7681
|
+
|
7682
|
+
attr_reader :discriminator
|
7683
|
+
|
7684
|
+
def initialize(incoming={})
|
7685
|
+
opts = HttpClient::Helper.symbolize_keys(incoming)
|
7686
|
+
HttpClient::Preconditions.require_keys(opts, [:discriminator], 'ActionConfiguration')
|
7687
|
+
@discriminator = HttpClient::Preconditions.assert_class('discriminator', opts.delete(:discriminator), String)
|
7688
|
+
end
|
7689
|
+
|
7690
|
+
def subtype_to_hash
|
7691
|
+
raise 'Cannot serialize an instance of action_configuration directly - must use one of the specific types: threeds_two_browser_action_configuration'
|
7692
|
+
end
|
7693
|
+
|
7694
|
+
def to_hash
|
7695
|
+
subtype_to_hash.merge(:discriminator => @discriminator)
|
7696
|
+
end
|
7697
|
+
|
7698
|
+
def ActionConfiguration.from_json(hash)
|
7699
|
+
HttpClient::Preconditions.assert_class('hash', hash, Hash)
|
7700
|
+
discriminator = HttpClient::Helper.symbolize_keys(hash)[:discriminator].to_s.strip
|
7701
|
+
if discriminator.empty?
|
7702
|
+
raise "Union type[action_configuration] requires a field named 'discriminator'"
|
7703
|
+
end
|
7704
|
+
case discriminator
|
7705
|
+
when Types::THREEDS_TWO_BROWSER_ACTION_CONFIGURATION; ThreedsTwoBrowserActionConfiguration.new(hash)
|
7706
|
+
else ActionConfigurationUndefinedType.new(:discriminator => discriminator)
|
7707
|
+
end
|
7708
|
+
end
|
7709
|
+
|
7710
|
+
end
|
7711
|
+
|
7712
|
+
class ActionConfigurationUndefinedType < ActionConfiguration
|
7713
|
+
|
7714
|
+
attr_reader :name
|
7715
|
+
|
7716
|
+
def initialize(incoming={})
|
7717
|
+
super(:discriminator => 'undefined_type')
|
7718
|
+
opts = HttpClient::Helper.symbolize_keys(incoming)
|
7719
|
+
@name = HttpClient::Preconditions.assert_class('name', opts.delete(:discriminator), String)
|
7720
|
+
end
|
7721
|
+
|
7722
|
+
def subtype_to_hash
|
7723
|
+
raise 'Unable to serialize undefined type to json'
|
7724
|
+
end
|
7725
|
+
|
7726
|
+
def copy(incoming={})
|
7727
|
+
raise 'Operation not supported for undefined type'
|
7728
|
+
end
|
7729
|
+
|
7730
|
+
def to_hash
|
7731
|
+
raise 'Operation not supported for undefined type'
|
7732
|
+
end
|
7733
|
+
|
7734
|
+
end
|
7735
|
+
|
7264
7736
|
class AdyenNativeData
|
7265
7737
|
|
7266
7738
|
module Types
|
@@ -7730,6 +8202,8 @@ module Io
|
|
7730
8202
|
module Types
|
7731
8203
|
ADYEN_NATIVE_ACTION_DETAILS = 'adyen_native_action_details' unless defined?(ADYEN_NATIVE_ACTION_DETAILS)
|
7732
8204
|
STRIPE_AUTHORIZATION_RESULT_ACTION_DETAILS = 'stripe_authorization_result_action_details' unless defined?(STRIPE_AUTHORIZATION_RESULT_ACTION_DETAILS)
|
8205
|
+
THREEDS_IDENTIFY_ACTION_DETAILS = 'threeds_identify_action_details' unless defined?(THREEDS_IDENTIFY_ACTION_DETAILS)
|
8206
|
+
THREEDS_CHALLENGE_ACTION_DETAILS = 'threeds_challenge_action_details' unless defined?(THREEDS_CHALLENGE_ACTION_DETAILS)
|
7733
8207
|
end
|
7734
8208
|
|
7735
8209
|
attr_reader :discriminator
|
@@ -7741,7 +8215,7 @@ module Io
|
|
7741
8215
|
end
|
7742
8216
|
|
7743
8217
|
def subtype_to_hash
|
7744
|
-
raise 'Cannot serialize an instance of authorization_result_action_details directly - must use one of the specific types: adyen_native_action_details, stripe_authorization_result_action_details'
|
8218
|
+
raise 'Cannot serialize an instance of authorization_result_action_details directly - must use one of the specific types: adyen_native_action_details, stripe_authorization_result_action_details, threeds_identify_action_details, threeds_challenge_action_details'
|
7745
8219
|
end
|
7746
8220
|
|
7747
8221
|
def to_hash
|
@@ -7757,6 +8231,8 @@ module Io
|
|
7757
8231
|
case discriminator
|
7758
8232
|
when Types::ADYEN_NATIVE_ACTION_DETAILS; AdyenNativeActionDetails.new(hash)
|
7759
8233
|
when Types::STRIPE_AUTHORIZATION_RESULT_ACTION_DETAILS; StripeAuthorizationResultActionDetails.new(hash)
|
8234
|
+
when Types::THREEDS_IDENTIFY_ACTION_DETAILS; ThreedsIdentifyActionDetails.new(hash)
|
8235
|
+
when Types::THREEDS_CHALLENGE_ACTION_DETAILS; ThreedsChallengeActionDetails.new(hash)
|
7760
8236
|
else AuthorizationResultActionDetailsUndefinedType.new(:discriminator => discriminator)
|
7761
8237
|
end
|
7762
8238
|
end
|
@@ -9370,8 +9846,8 @@ module Io
|
|
9370
9846
|
HARMONIZATION_OVERVIEW_EXPORT_TYPE = 'harmonization_overview_export_type' unless defined?(HARMONIZATION_OVERVIEW_EXPORT_TYPE)
|
9371
9847
|
HARMONIZATION_HS6_EXPORT_TYPE = 'harmonization_hs6_export_type' unless defined?(HARMONIZATION_HS6_EXPORT_TYPE)
|
9372
9848
|
HARMONIZATION_HS10_EXPORT_TYPE = 'harmonization_hs10_export_type' unless defined?(HARMONIZATION_HS10_EXPORT_TYPE)
|
9849
|
+
HARMONIZATION_TARIFF_CODES_EXPORT_TYPE = 'harmonization_tariff_codes_export_type' unless defined?(HARMONIZATION_TARIFF_CODES_EXPORT_TYPE)
|
9373
9850
|
UNHARMONIZED_ITEM_EXPORT_TYPE = 'unharmonized_item_export_type' unless defined?(UNHARMONIZED_ITEM_EXPORT_TYPE)
|
9374
|
-
HARMONIZATION_LANDED_COST_EXPORT_TYPE = 'harmonization_landed_cost_export_type' unless defined?(HARMONIZATION_LANDED_COST_EXPORT_TYPE)
|
9375
9851
|
ORDER_EXPORT_TYPE = 'order_export_type' unless defined?(ORDER_EXPORT_TYPE)
|
9376
9852
|
PRICE_BOOK_ITEM_EXPORT_TYPE = 'price_book_item_export_type' unless defined?(PRICE_BOOK_ITEM_EXPORT_TYPE)
|
9377
9853
|
SOLIDUS_PRODUCT_EXPORT_TYPE = 'solidus_product_export_type' unless defined?(SOLIDUS_PRODUCT_EXPORT_TYPE)
|
@@ -9389,7 +9865,7 @@ module Io
|
|
9389
9865
|
end
|
9390
9866
|
|
9391
9867
|
def subtype_to_hash
|
9392
|
-
raise 'Cannot serialize an instance of export_type directly - must use one of the specific types: account_transactions_export_type, account_orders_export_type, analytics_export_type, catalog_item_export_type, experience_export_type, harmonization_overview_export_type, harmonization_hs6_export_type, harmonization_hs10_export_type,
|
9868
|
+
raise 'Cannot serialize an instance of export_type directly - must use one of the specific types: account_transactions_export_type, account_orders_export_type, analytics_export_type, catalog_item_export_type, experience_export_type, harmonization_overview_export_type, harmonization_hs6_export_type, harmonization_hs10_export_type, harmonization_tariff_codes_export_type, unharmonized_item_export_type, order_export_type, price_book_item_export_type, solidus_product_export_type, solidus_variant_export_type, localized_item_prices_export_type, marketing_feeds_export_type'
|
9393
9869
|
end
|
9394
9870
|
|
9395
9871
|
def to_hash
|
@@ -9411,8 +9887,8 @@ module Io
|
|
9411
9887
|
when Types::HARMONIZATION_OVERVIEW_EXPORT_TYPE; HarmonizationOverviewExportType.new(hash)
|
9412
9888
|
when Types::HARMONIZATION_HS6_EXPORT_TYPE; HarmonizationHs6ExportType.new(hash)
|
9413
9889
|
when Types::HARMONIZATION_HS10_EXPORT_TYPE; HarmonizationHs10ExportType.new(hash)
|
9890
|
+
when Types::HARMONIZATION_TARIFF_CODES_EXPORT_TYPE; HarmonizationTariffCodesExportType.new(hash)
|
9414
9891
|
when Types::UNHARMONIZED_ITEM_EXPORT_TYPE; UnharmonizedItemExportType.new(hash)
|
9415
|
-
when Types::HARMONIZATION_LANDED_COST_EXPORT_TYPE; HarmonizationLandedCostExportType.new(hash)
|
9416
9892
|
when Types::ORDER_EXPORT_TYPE; OrderExportType.new(hash)
|
9417
9893
|
when Types::PRICE_BOOK_ITEM_EXPORT_TYPE; PriceBookItemExportType.new(hash)
|
9418
9894
|
when Types::SOLIDUS_PRODUCT_EXPORT_TYPE; SolidusProductExportType.new(hash)
|
@@ -9515,69 +9991,6 @@ module Io
|
|
9515
9991
|
|
9516
9992
|
end
|
9517
9993
|
|
9518
|
-
# All roles available to attach to a user.
|
9519
|
-
class FlowRole
|
9520
|
-
|
9521
|
-
module Types
|
9522
|
-
FLOW_USER_ROLE = 'flow_user_role' unless defined?(FLOW_USER_ROLE)
|
9523
|
-
FLOW_ADDON_ROLE = 'flow_addon_role' unless defined?(FLOW_ADDON_ROLE)
|
9524
|
-
end
|
9525
|
-
|
9526
|
-
attr_reader :discriminator
|
9527
|
-
|
9528
|
-
def initialize(incoming={})
|
9529
|
-
opts = HttpClient::Helper.symbolize_keys(incoming)
|
9530
|
-
HttpClient::Preconditions.require_keys(opts, [:discriminator], 'FlowRole')
|
9531
|
-
@discriminator = HttpClient::Preconditions.assert_class('discriminator', opts.delete(:discriminator), String)
|
9532
|
-
end
|
9533
|
-
|
9534
|
-
def subtype_to_hash
|
9535
|
-
raise 'Cannot serialize an instance of flow_role directly - must use one of the specific types: flow_user_role, flow_addon_role'
|
9536
|
-
end
|
9537
|
-
|
9538
|
-
def to_hash
|
9539
|
-
subtype_to_hash.merge(:discriminator => @discriminator)
|
9540
|
-
end
|
9541
|
-
|
9542
|
-
def FlowRole.from_json(hash)
|
9543
|
-
HttpClient::Preconditions.assert_class('hash', hash, Hash)
|
9544
|
-
discriminator = HttpClient::Helper.symbolize_keys(hash)[:discriminator].to_s.strip
|
9545
|
-
if discriminator.empty?
|
9546
|
-
raise "Union type[flow_role] requires a field named 'discriminator'"
|
9547
|
-
end
|
9548
|
-
case discriminator
|
9549
|
-
when Types::FLOW_USER_ROLE; FlowUserRole.new(hash)
|
9550
|
-
when Types::FLOW_ADDON_ROLE; FlowAddonRole.new(hash)
|
9551
|
-
else FlowRoleUndefinedType.new(:discriminator => discriminator)
|
9552
|
-
end
|
9553
|
-
end
|
9554
|
-
|
9555
|
-
end
|
9556
|
-
|
9557
|
-
class FlowRoleUndefinedType < FlowRole
|
9558
|
-
|
9559
|
-
attr_reader :name
|
9560
|
-
|
9561
|
-
def initialize(incoming={})
|
9562
|
-
super(:discriminator => 'undefined_type')
|
9563
|
-
opts = HttpClient::Helper.symbolize_keys(incoming)
|
9564
|
-
@name = HttpClient::Preconditions.assert_class('name', opts.delete(:discriminator), String)
|
9565
|
-
end
|
9566
|
-
|
9567
|
-
def subtype_to_hash
|
9568
|
-
raise 'Unable to serialize undefined type to json'
|
9569
|
-
end
|
9570
|
-
|
9571
|
-
def copy(incoming={})
|
9572
|
-
raise 'Operation not supported for undefined type'
|
9573
|
-
end
|
9574
|
-
|
9575
|
-
def to_hash
|
9576
|
-
raise 'Operation not supported for undefined type'
|
9577
|
-
end
|
9578
|
-
|
9579
|
-
end
|
9580
|
-
|
9581
9994
|
class GatewayAuthenticationData
|
9582
9995
|
|
9583
9996
|
module Types
|
@@ -11651,6 +12064,130 @@ module Io
|
|
11651
12064
|
|
11652
12065
|
end
|
11653
12066
|
|
12067
|
+
# Different version sets of 3ds challenge actions.
|
12068
|
+
class ThreedsChallengeAction
|
12069
|
+
|
12070
|
+
module Types
|
12071
|
+
# Used for 2.1 and 2.2 versions of 3ds
|
12072
|
+
THREEDS_TWO_CHALLENGE_REQUEST = 'threeds_two_challenge_request' unless defined?(THREEDS_TWO_CHALLENGE_REQUEST)
|
12073
|
+
end
|
12074
|
+
|
12075
|
+
attr_reader :discriminator
|
12076
|
+
|
12077
|
+
def initialize(incoming={})
|
12078
|
+
opts = HttpClient::Helper.symbolize_keys(incoming)
|
12079
|
+
HttpClient::Preconditions.require_keys(opts, [:discriminator], 'ThreedsChallengeAction')
|
12080
|
+
@discriminator = HttpClient::Preconditions.assert_class('discriminator', opts.delete(:discriminator), String)
|
12081
|
+
end
|
12082
|
+
|
12083
|
+
def subtype_to_hash
|
12084
|
+
raise 'Cannot serialize an instance of threeds_challenge_action directly - must use one of the specific types: threeds_two_challenge_request'
|
12085
|
+
end
|
12086
|
+
|
12087
|
+
def to_hash
|
12088
|
+
subtype_to_hash.merge(:discriminator => @discriminator)
|
12089
|
+
end
|
12090
|
+
|
12091
|
+
def ThreedsChallengeAction.from_json(hash)
|
12092
|
+
HttpClient::Preconditions.assert_class('hash', hash, Hash)
|
12093
|
+
discriminator = HttpClient::Helper.symbolize_keys(hash)[:discriminator].to_s.strip
|
12094
|
+
if discriminator.empty?
|
12095
|
+
raise "Union type[threeds_challenge_action] requires a field named 'discriminator'"
|
12096
|
+
end
|
12097
|
+
case discriminator
|
12098
|
+
when Types::THREEDS_TWO_CHALLENGE_REQUEST; ThreedsTwoChallengeRequest.new(hash)
|
12099
|
+
else ThreedsChallengeActionUndefinedType.new(:discriminator => discriminator)
|
12100
|
+
end
|
12101
|
+
end
|
12102
|
+
|
12103
|
+
end
|
12104
|
+
|
12105
|
+
class ThreedsChallengeActionUndefinedType < ThreedsChallengeAction
|
12106
|
+
|
12107
|
+
attr_reader :name
|
12108
|
+
|
12109
|
+
def initialize(incoming={})
|
12110
|
+
super(:discriminator => 'undefined_type')
|
12111
|
+
opts = HttpClient::Helper.symbolize_keys(incoming)
|
12112
|
+
@name = HttpClient::Preconditions.assert_class('name', opts.delete(:discriminator), String)
|
12113
|
+
end
|
12114
|
+
|
12115
|
+
def subtype_to_hash
|
12116
|
+
raise 'Unable to serialize undefined type to json'
|
12117
|
+
end
|
12118
|
+
|
12119
|
+
def copy(incoming={})
|
12120
|
+
raise 'Operation not supported for undefined type'
|
12121
|
+
end
|
12122
|
+
|
12123
|
+
def to_hash
|
12124
|
+
raise 'Operation not supported for undefined type'
|
12125
|
+
end
|
12126
|
+
|
12127
|
+
end
|
12128
|
+
|
12129
|
+
# Different version sets of 3ds identify actions.
|
12130
|
+
class ThreedsIdentifyAction
|
12131
|
+
|
12132
|
+
module Types
|
12133
|
+
# Used for 2.1 and 2.2 versions of 3ds
|
12134
|
+
THREEDS_TWO_METHOD = 'threeds_two_method' unless defined?(THREEDS_TWO_METHOD)
|
12135
|
+
end
|
12136
|
+
|
12137
|
+
attr_reader :discriminator
|
12138
|
+
|
12139
|
+
def initialize(incoming={})
|
12140
|
+
opts = HttpClient::Helper.symbolize_keys(incoming)
|
12141
|
+
HttpClient::Preconditions.require_keys(opts, [:discriminator], 'ThreedsIdentifyAction')
|
12142
|
+
@discriminator = HttpClient::Preconditions.assert_class('discriminator', opts.delete(:discriminator), String)
|
12143
|
+
end
|
12144
|
+
|
12145
|
+
def subtype_to_hash
|
12146
|
+
raise 'Cannot serialize an instance of threeds_identify_action directly - must use one of the specific types: threeds_two_method'
|
12147
|
+
end
|
12148
|
+
|
12149
|
+
def to_hash
|
12150
|
+
subtype_to_hash.merge(:discriminator => @discriminator)
|
12151
|
+
end
|
12152
|
+
|
12153
|
+
def ThreedsIdentifyAction.from_json(hash)
|
12154
|
+
HttpClient::Preconditions.assert_class('hash', hash, Hash)
|
12155
|
+
discriminator = HttpClient::Helper.symbolize_keys(hash)[:discriminator].to_s.strip
|
12156
|
+
if discriminator.empty?
|
12157
|
+
raise "Union type[threeds_identify_action] requires a field named 'discriminator'"
|
12158
|
+
end
|
12159
|
+
case discriminator
|
12160
|
+
when Types::THREEDS_TWO_METHOD; ThreedsTwoMethod.new(hash)
|
12161
|
+
else ThreedsIdentifyActionUndefinedType.new(:discriminator => discriminator)
|
12162
|
+
end
|
12163
|
+
end
|
12164
|
+
|
12165
|
+
end
|
12166
|
+
|
12167
|
+
class ThreedsIdentifyActionUndefinedType < ThreedsIdentifyAction
|
12168
|
+
|
12169
|
+
attr_reader :name
|
12170
|
+
|
12171
|
+
def initialize(incoming={})
|
12172
|
+
super(:discriminator => 'undefined_type')
|
12173
|
+
opts = HttpClient::Helper.symbolize_keys(incoming)
|
12174
|
+
@name = HttpClient::Preconditions.assert_class('name', opts.delete(:discriminator), String)
|
12175
|
+
end
|
12176
|
+
|
12177
|
+
def subtype_to_hash
|
12178
|
+
raise 'Unable to serialize undefined type to json'
|
12179
|
+
end
|
12180
|
+
|
12181
|
+
def copy(incoming={})
|
12182
|
+
raise 'Operation not supported for undefined type'
|
12183
|
+
end
|
12184
|
+
|
12185
|
+
def to_hash
|
12186
|
+
raise 'Operation not supported for undefined type'
|
12187
|
+
end
|
12188
|
+
|
12189
|
+
end
|
12190
|
+
|
11654
12191
|
# Possible outcome types from a tier rule
|
11655
12192
|
class TierRuleOutcome
|
11656
12193
|
|
@@ -11952,6 +12489,80 @@ module Io
|
|
11952
12489
|
|
11953
12490
|
end
|
11954
12491
|
|
12492
|
+
class AddressFieldName
|
12493
|
+
|
12494
|
+
attr_reader :value
|
12495
|
+
|
12496
|
+
def initialize(value)
|
12497
|
+
@value = HttpClient::Preconditions.assert_class('value', value, String)
|
12498
|
+
end
|
12499
|
+
|
12500
|
+
# Returns the instance of AddressFieldName for this value, creating a new instance for an unknown value
|
12501
|
+
def AddressFieldName.apply(value)
|
12502
|
+
if value.instance_of?(AddressFieldName)
|
12503
|
+
value
|
12504
|
+
else
|
12505
|
+
HttpClient::Preconditions.assert_class_or_nil('value', value, String)
|
12506
|
+
value.nil? ? nil : (from_string(value) || AddressFieldName.new(value))
|
12507
|
+
end
|
12508
|
+
end
|
12509
|
+
|
12510
|
+
# Returns the instance of AddressFieldName for this value, or nil if not found
|
12511
|
+
def AddressFieldName.from_string(value)
|
12512
|
+
HttpClient::Preconditions.assert_class('value', value, String)
|
12513
|
+
AddressFieldName.ALL.find { |v| v.value == value }
|
12514
|
+
end
|
12515
|
+
|
12516
|
+
def AddressFieldName.ALL
|
12517
|
+
@@all ||= [AddressFieldName.first_name, AddressFieldName.last_name, AddressFieldName.street_1, AddressFieldName.street_2, AddressFieldName.city, AddressFieldName.province, AddressFieldName.postal, AddressFieldName.country, AddressFieldName.phone, AddressFieldName.company]
|
12518
|
+
end
|
12519
|
+
|
12520
|
+
def AddressFieldName.first_name
|
12521
|
+
@@_first_name ||= AddressFieldName.new('first_name')
|
12522
|
+
end
|
12523
|
+
|
12524
|
+
def AddressFieldName.last_name
|
12525
|
+
@@_last_name ||= AddressFieldName.new('last_name')
|
12526
|
+
end
|
12527
|
+
|
12528
|
+
def AddressFieldName.street_1
|
12529
|
+
@@_street_1 ||= AddressFieldName.new('street_1')
|
12530
|
+
end
|
12531
|
+
|
12532
|
+
def AddressFieldName.street_2
|
12533
|
+
@@_street_2 ||= AddressFieldName.new('street_2')
|
12534
|
+
end
|
12535
|
+
|
12536
|
+
def AddressFieldName.city
|
12537
|
+
@@_city ||= AddressFieldName.new('city')
|
12538
|
+
end
|
12539
|
+
|
12540
|
+
def AddressFieldName.province
|
12541
|
+
@@_province ||= AddressFieldName.new('province')
|
12542
|
+
end
|
12543
|
+
|
12544
|
+
def AddressFieldName.postal
|
12545
|
+
@@_postal ||= AddressFieldName.new('postal')
|
12546
|
+
end
|
12547
|
+
|
12548
|
+
def AddressFieldName.country
|
12549
|
+
@@_country ||= AddressFieldName.new('country')
|
12550
|
+
end
|
12551
|
+
|
12552
|
+
def AddressFieldName.phone
|
12553
|
+
@@_phone ||= AddressFieldName.new('phone')
|
12554
|
+
end
|
12555
|
+
|
12556
|
+
def AddressFieldName.company
|
12557
|
+
@@_company ||= AddressFieldName.new('company')
|
12558
|
+
end
|
12559
|
+
|
12560
|
+
def to_hash
|
12561
|
+
value
|
12562
|
+
end
|
12563
|
+
|
12564
|
+
end
|
12565
|
+
|
11955
12566
|
class AdjustmentReasonKey
|
11956
12567
|
|
11957
12568
|
attr_reader :value
|
@@ -12120,7 +12731,7 @@ module Io
|
|
12120
12731
|
end
|
12121
12732
|
|
12122
12733
|
def AttributeIntent.ALL
|
12123
|
-
@@all ||= [AttributeIntent.brand, AttributeIntent.color, AttributeIntent.countries_of_origin, AttributeIntent.product_id, AttributeIntent.fulfillment_method, AttributeIntent.hazardous, AttributeIntent.price, AttributeIntent.size, AttributeIntent.sku, AttributeIntent.taxability, AttributeIntent.consumer_url, AttributeIntent.gtin, AttributeIntent.mpn, AttributeIntent.facet]
|
12734
|
+
@@all ||= [AttributeIntent.brand, AttributeIntent.color, AttributeIntent.countries_of_origin, AttributeIntent.product_id, AttributeIntent.fulfillment_method, AttributeIntent.hazardous, AttributeIntent.price, AttributeIntent.size, AttributeIntent.sku, AttributeIntent.taxability, AttributeIntent.consumer_url, AttributeIntent.gtin, AttributeIntent.mpn, AttributeIntent.facet, AttributeIntent.eccn, AttributeIntent.returnable, AttributeIntent.searchable]
|
12124
12735
|
end
|
12125
12736
|
|
12126
12737
|
# A brand name of the item (for retailers that sell multiple brands)
|
@@ -12195,6 +12806,28 @@ module Io
|
|
12195
12806
|
@@_facet ||= AttributeIntent.new('facet')
|
12196
12807
|
end
|
12197
12808
|
|
12809
|
+
# An Export Control Classification Number (ECCN) is a five-character
|
12810
|
+
# alphanumeric key used in the Commerce Control List (CCL) to classify U.S.
|
12811
|
+
# exports and determine whether an export license is needed from the Department
|
12812
|
+
# of Commerce. If exempt, then EAR99 is used as the item’s ECCN. EAR99 is a
|
12813
|
+
# classification that indicates that an item is subject to the Export
|
12814
|
+
# Administration Regulations (EAR), but not listed with a specific Export
|
12815
|
+
# Control Classification Number (ECCN) on the Commerce Control List (CCL).
|
12816
|
+
def AttributeIntent.eccn
|
12817
|
+
@@_eccn ||= AttributeIntent.new('eccn')
|
12818
|
+
end
|
12819
|
+
|
12820
|
+
# Identifies whether the item can be returned. If not present on an item, it is
|
12821
|
+
# assumed to be returnable.
|
12822
|
+
def AttributeIntent.returnable
|
12823
|
+
@@_returnable ||= AttributeIntent.new('returnable')
|
12824
|
+
end
|
12825
|
+
|
12826
|
+
# Identifies whether the attribute can be used to search for an item.
|
12827
|
+
def AttributeIntent.searchable
|
12828
|
+
@@_searchable ||= AttributeIntent.new('searchable')
|
12829
|
+
end
|
12830
|
+
|
12198
12831
|
def to_hash
|
12199
12832
|
value
|
12200
12833
|
end
|
@@ -12958,7 +13591,7 @@ module Io
|
|
12958
13591
|
end
|
12959
13592
|
|
12960
13593
|
def CardErrorCode.ALL
|
12961
|
-
@@all ||= [CardErrorCode.invalid_address, CardErrorCode.invalid_name, CardErrorCode.invalid_number, CardErrorCode.invalid_expiration, CardErrorCode.invalid_token_type, CardErrorCode.avs, CardErrorCode.cvv, CardErrorCode.fraud, CardErrorCode.unknown]
|
13594
|
+
@@all ||= [CardErrorCode.invalid_address, CardErrorCode.invalid_currency, CardErrorCode.invalid_name, CardErrorCode.invalid_number, CardErrorCode.invalid_expiration, CardErrorCode.invalid_token_type, CardErrorCode.avs, CardErrorCode.cvv, CardErrorCode.fraud, CardErrorCode.unknown]
|
12962
13595
|
end
|
12963
13596
|
|
12964
13597
|
# Invalid billing address
|
@@ -12966,6 +13599,11 @@ module Io
|
|
12966
13599
|
@@_invalid_address ||= CardErrorCode.new('invalid_address')
|
12967
13600
|
end
|
12968
13601
|
|
13602
|
+
# Invalid requested currency
|
13603
|
+
def CardErrorCode.invalid_currency
|
13604
|
+
@@_invalid_currency ||= CardErrorCode.new('invalid_currency')
|
13605
|
+
end
|
13606
|
+
|
12969
13607
|
# Invalid cardholder name
|
12970
13608
|
def CardErrorCode.invalid_name
|
12971
13609
|
@@_invalid_name ||= CardErrorCode.new('invalid_name')
|
@@ -15280,52 +15918,46 @@ module Io
|
|
15280
15918
|
|
15281
15919
|
end
|
15282
15920
|
|
15283
|
-
class
|
15921
|
+
class FlowBehavior
|
15284
15922
|
|
15285
15923
|
attr_reader :value
|
15286
15924
|
|
15287
15925
|
def initialize(value)
|
15288
|
-
super(:name => FlowRole::Types::FLOW_ADDON_ROLE, :discriminator => 'flow_addon_role')
|
15289
15926
|
@value = HttpClient::Preconditions.assert_class('value', value, String)
|
15290
15927
|
end
|
15291
15928
|
|
15292
|
-
# Returns the instance of
|
15293
|
-
def
|
15294
|
-
if value.instance_of?(
|
15929
|
+
# Returns the instance of FlowBehavior for this value, creating a new instance for an unknown value
|
15930
|
+
def FlowBehavior.apply(value)
|
15931
|
+
if value.instance_of?(FlowBehavior)
|
15295
15932
|
value
|
15296
15933
|
else
|
15297
15934
|
HttpClient::Preconditions.assert_class_or_nil('value', value, String)
|
15298
|
-
value.nil? ? nil : (from_string(value) ||
|
15935
|
+
value.nil? ? nil : (from_string(value) || FlowBehavior.new(value))
|
15299
15936
|
end
|
15300
15937
|
end
|
15301
15938
|
|
15302
|
-
# Returns the instance of
|
15303
|
-
def
|
15939
|
+
# Returns the instance of FlowBehavior for this value, or nil if not found
|
15940
|
+
def FlowBehavior.from_string(value)
|
15304
15941
|
HttpClient::Preconditions.assert_class('value', value, String)
|
15305
|
-
|
15306
|
-
end
|
15307
|
-
|
15308
|
-
def FlowAddonRole.ALL
|
15309
|
-
@@all ||= [FlowAddonRole.consumer_data_viewer, FlowAddonRole.membership_manager]
|
15942
|
+
FlowBehavior.ALL.find { |v| v.value == value }
|
15310
15943
|
end
|
15311
15944
|
|
15312
|
-
|
15313
|
-
|
15314
|
-
@@_consumer_data_viewer ||= FlowAddonRole.new('consumer_data_viewer')
|
15945
|
+
def FlowBehavior.ALL
|
15946
|
+
@@all ||= [FlowBehavior.view_consumer_data]
|
15315
15947
|
end
|
15316
15948
|
|
15317
|
-
#
|
15318
|
-
def
|
15319
|
-
@@
|
15949
|
+
# Allows user to view consumers' personal data.
|
15950
|
+
def FlowBehavior.view_consumer_data
|
15951
|
+
@@_view_consumer_data ||= FlowBehavior.new('view_consumer_data')
|
15320
15952
|
end
|
15321
15953
|
|
15322
|
-
def
|
15954
|
+
def to_hash
|
15323
15955
|
value
|
15324
15956
|
end
|
15325
15957
|
|
15326
15958
|
end
|
15327
15959
|
|
15328
|
-
class
|
15960
|
+
class FlowEntity
|
15329
15961
|
|
15330
15962
|
attr_reader :value
|
15331
15963
|
|
@@ -15333,29 +15965,39 @@ module Io
|
|
15333
15965
|
@value = HttpClient::Preconditions.assert_class('value', value, String)
|
15334
15966
|
end
|
15335
15967
|
|
15336
|
-
# Returns the instance of
|
15337
|
-
def
|
15338
|
-
if value.instance_of?(
|
15968
|
+
# Returns the instance of FlowEntity for this value, creating a new instance for an unknown value
|
15969
|
+
def FlowEntity.apply(value)
|
15970
|
+
if value.instance_of?(FlowEntity)
|
15339
15971
|
value
|
15340
15972
|
else
|
15341
15973
|
HttpClient::Preconditions.assert_class_or_nil('value', value, String)
|
15342
|
-
value.nil? ? nil : (from_string(value) ||
|
15974
|
+
value.nil? ? nil : (from_string(value) || FlowEntity.new(value))
|
15343
15975
|
end
|
15344
15976
|
end
|
15345
15977
|
|
15346
|
-
# Returns the instance of
|
15347
|
-
def
|
15978
|
+
# Returns the instance of FlowEntity for this value, or nil if not found
|
15979
|
+
def FlowEntity.from_string(value)
|
15348
15980
|
HttpClient::Preconditions.assert_class('value', value, String)
|
15349
|
-
|
15981
|
+
FlowEntity.ALL.find { |v| v.value == value }
|
15350
15982
|
end
|
15351
15983
|
|
15352
|
-
def
|
15353
|
-
@@all ||= [
|
15984
|
+
def FlowEntity.ALL
|
15985
|
+
@@all ||= [FlowEntity.flow_usa, FlowEntity.flow_irl, FlowEntity.flow_can]
|
15354
15986
|
end
|
15355
15987
|
|
15356
|
-
#
|
15357
|
-
def
|
15358
|
-
@@
|
15988
|
+
# Flow Commerce Inc., Hoboken, NJ, USA
|
15989
|
+
def FlowEntity.flow_usa
|
15990
|
+
@@_flow_usa ||= FlowEntity.new('flow-usa')
|
15991
|
+
end
|
15992
|
+
|
15993
|
+
# Flow Commerce Ltd., Dublin, IRL
|
15994
|
+
def FlowEntity.flow_irl
|
15995
|
+
@@_flow_irl ||= FlowEntity.new('flow-irl')
|
15996
|
+
end
|
15997
|
+
|
15998
|
+
# Flow Commerce Canada Inc., Vancouver, BC, CAN
|
15999
|
+
def FlowEntity.flow_can
|
16000
|
+
@@_flow_can ||= FlowEntity.new('flow-can')
|
15359
16001
|
end
|
15360
16002
|
|
15361
16003
|
def to_hash
|
@@ -15364,71 +16006,70 @@ module Io
|
|
15364
16006
|
|
15365
16007
|
end
|
15366
16008
|
|
15367
|
-
class
|
16009
|
+
class FlowRole
|
15368
16010
|
|
15369
16011
|
attr_reader :value
|
15370
16012
|
|
15371
16013
|
def initialize(value)
|
15372
|
-
super(:name => FlowRole::Types::FLOW_USER_ROLE, :discriminator => 'flow_user_role')
|
15373
16014
|
@value = HttpClient::Preconditions.assert_class('value', value, String)
|
15374
16015
|
end
|
15375
16016
|
|
15376
|
-
# Returns the instance of
|
15377
|
-
def
|
15378
|
-
if value.instance_of?(
|
16017
|
+
# Returns the instance of FlowRole for this value, creating a new instance for an unknown value
|
16018
|
+
def FlowRole.apply(value)
|
16019
|
+
if value.instance_of?(FlowRole)
|
15379
16020
|
value
|
15380
16021
|
else
|
15381
16022
|
HttpClient::Preconditions.assert_class_or_nil('value', value, String)
|
15382
|
-
value.nil? ? nil : (from_string(value) ||
|
16023
|
+
value.nil? ? nil : (from_string(value) || FlowRole.new(value))
|
15383
16024
|
end
|
15384
16025
|
end
|
15385
16026
|
|
15386
|
-
# Returns the instance of
|
15387
|
-
def
|
16027
|
+
# Returns the instance of FlowRole for this value, or nil if not found
|
16028
|
+
def FlowRole.from_string(value)
|
15388
16029
|
HttpClient::Preconditions.assert_class('value', value, String)
|
15389
|
-
|
16030
|
+
FlowRole.ALL.find { |v| v.value == value }
|
15390
16031
|
end
|
15391
16032
|
|
15392
|
-
def
|
15393
|
-
@@all ||= [
|
16033
|
+
def FlowRole.ALL
|
16034
|
+
@@all ||= [FlowRole.organization_admin, FlowRole.organization_merchant, FlowRole.organization_customer_service, FlowRole.organization_fulfillment, FlowRole.organization_marketing, FlowRole.organization_finance, FlowRole.flow_operations]
|
15394
16035
|
end
|
15395
16036
|
|
15396
16037
|
# Can fully administrate a merchant organization.
|
15397
|
-
def
|
15398
|
-
@@_organization_admin ||=
|
16038
|
+
def FlowRole.organization_admin
|
16039
|
+
@@_organization_admin ||= FlowRole.new('organization_admin')
|
15399
16040
|
end
|
15400
16041
|
|
15401
16042
|
# Can access merchant functions such as analytics, billing, experiences.
|
15402
|
-
def
|
15403
|
-
@@_organization_merchant ||=
|
16043
|
+
def FlowRole.organization_merchant
|
16044
|
+
@@_organization_merchant ||= FlowRole.new('organization_merchant')
|
15404
16045
|
end
|
15405
16046
|
|
15406
16047
|
# Can access customer service functions and retreive relevant data.
|
15407
|
-
def
|
15408
|
-
@@
|
16048
|
+
def FlowRole.organization_customer_service
|
16049
|
+
@@_organization_customer_service ||= FlowRole.new('organization_customer_service')
|
15409
16050
|
end
|
15410
16051
|
|
15411
16052
|
# Can access fulfillment functions and retreive relevant data.
|
15412
|
-
def
|
15413
|
-
@@_organization_fulfillment ||=
|
16053
|
+
def FlowRole.organization_fulfillment
|
16054
|
+
@@_organization_fulfillment ||= FlowRole.new('organization_fulfillment')
|
15414
16055
|
end
|
15415
16056
|
|
15416
16057
|
# Can access marketing functions and retreive relevant data.
|
15417
|
-
def
|
15418
|
-
@@_organization_marketing ||=
|
16058
|
+
def FlowRole.organization_marketing
|
16059
|
+
@@_organization_marketing ||= FlowRole.new('organization_marketing')
|
15419
16060
|
end
|
15420
16061
|
|
15421
16062
|
# Can access billing and reconcilliation functions and retreive relevant data.
|
15422
|
-
def
|
15423
|
-
@@_organization_finance ||=
|
16063
|
+
def FlowRole.organization_finance
|
16064
|
+
@@_organization_finance ||= FlowRole.new('organization_finance')
|
15424
16065
|
end
|
15425
16066
|
|
15426
16067
|
# Can access Flow internal functions.
|
15427
|
-
def
|
15428
|
-
@@_flow_operations ||=
|
16068
|
+
def FlowRole.flow_operations
|
16069
|
+
@@_flow_operations ||= FlowRole.new('flow_operations')
|
15429
16070
|
end
|
15430
16071
|
|
15431
|
-
def
|
16072
|
+
def to_hash
|
15432
16073
|
value
|
15433
16074
|
end
|
15434
16075
|
|
@@ -16381,6 +17022,48 @@ module Io
|
|
16381
17022
|
|
16382
17023
|
end
|
16383
17024
|
|
17025
|
+
class ItemIdentifier
|
17026
|
+
|
17027
|
+
attr_reader :value
|
17028
|
+
|
17029
|
+
def initialize(value)
|
17030
|
+
@value = HttpClient::Preconditions.assert_class('value', value, String)
|
17031
|
+
end
|
17032
|
+
|
17033
|
+
# Returns the instance of ItemIdentifier for this value, creating a new instance for an unknown value
|
17034
|
+
def ItemIdentifier.apply(value)
|
17035
|
+
if value.instance_of?(ItemIdentifier)
|
17036
|
+
value
|
17037
|
+
else
|
17038
|
+
HttpClient::Preconditions.assert_class_or_nil('value', value, String)
|
17039
|
+
value.nil? ? nil : (from_string(value) || ItemIdentifier.new(value))
|
17040
|
+
end
|
17041
|
+
end
|
17042
|
+
|
17043
|
+
# Returns the instance of ItemIdentifier for this value, or nil if not found
|
17044
|
+
def ItemIdentifier.from_string(value)
|
17045
|
+
HttpClient::Preconditions.assert_class('value', value, String)
|
17046
|
+
ItemIdentifier.ALL.find { |v| v.value == value }
|
17047
|
+
end
|
17048
|
+
|
17049
|
+
def ItemIdentifier.ALL
|
17050
|
+
@@all ||= [ItemIdentifier.item_number, ItemIdentifier.sku]
|
17051
|
+
end
|
17052
|
+
|
17053
|
+
def ItemIdentifier.item_number
|
17054
|
+
@@_item_number ||= ItemIdentifier.new('item_number')
|
17055
|
+
end
|
17056
|
+
|
17057
|
+
def ItemIdentifier.sku
|
17058
|
+
@@_sku ||= ItemIdentifier.new('sku')
|
17059
|
+
end
|
17060
|
+
|
17061
|
+
def to_hash
|
17062
|
+
value
|
17063
|
+
end
|
17064
|
+
|
17065
|
+
end
|
17066
|
+
|
16384
17067
|
class LaneDirection
|
16385
17068
|
|
16386
17069
|
attr_reader :value
|
@@ -17691,6 +18374,50 @@ module Io
|
|
17691
18374
|
|
17692
18375
|
end
|
17693
18376
|
|
18377
|
+
class PaymentMethodCapability
|
18378
|
+
|
18379
|
+
attr_reader :value
|
18380
|
+
|
18381
|
+
def initialize(value)
|
18382
|
+
@value = HttpClient::Preconditions.assert_class('value', value, String)
|
18383
|
+
end
|
18384
|
+
|
18385
|
+
# Returns the instance of PaymentMethodCapability for this value, creating a new instance for an unknown value
|
18386
|
+
def PaymentMethodCapability.apply(value)
|
18387
|
+
if value.instance_of?(PaymentMethodCapability)
|
18388
|
+
value
|
18389
|
+
else
|
18390
|
+
HttpClient::Preconditions.assert_class_or_nil('value', value, String)
|
18391
|
+
value.nil? ? nil : (from_string(value) || PaymentMethodCapability.new(value))
|
18392
|
+
end
|
18393
|
+
end
|
18394
|
+
|
18395
|
+
# Returns the instance of PaymentMethodCapability for this value, or nil if not found
|
18396
|
+
def PaymentMethodCapability.from_string(value)
|
18397
|
+
HttpClient::Preconditions.assert_class('value', value, String)
|
18398
|
+
PaymentMethodCapability.ALL.find { |v| v.value == value }
|
18399
|
+
end
|
18400
|
+
|
18401
|
+
def PaymentMethodCapability.ALL
|
18402
|
+
@@all ||= [PaymentMethodCapability.credit, PaymentMethodCapability.debit]
|
18403
|
+
end
|
18404
|
+
|
18405
|
+
# Credit cards provide access to a line of debt issued by a bank.
|
18406
|
+
def PaymentMethodCapability.credit
|
18407
|
+
@@_credit ||= PaymentMethodCapability.new('credit')
|
18408
|
+
end
|
18409
|
+
|
18410
|
+
# Debit cards deduct money directly from a bank account.
|
18411
|
+
def PaymentMethodCapability.debit
|
18412
|
+
@@_debit ||= PaymentMethodCapability.new('debit')
|
18413
|
+
end
|
18414
|
+
|
18415
|
+
def to_hash
|
18416
|
+
value
|
18417
|
+
end
|
18418
|
+
|
18419
|
+
end
|
18420
|
+
|
17694
18421
|
class PaymentMethodRuleContentKey
|
17695
18422
|
|
17696
18423
|
attr_reader :value
|
@@ -19520,6 +20247,152 @@ module Io
|
|
19520
20247
|
|
19521
20248
|
end
|
19522
20249
|
|
20250
|
+
class SyncRecordFailureReason
|
20251
|
+
|
20252
|
+
attr_reader :value
|
20253
|
+
|
20254
|
+
def initialize(value)
|
20255
|
+
@value = HttpClient::Preconditions.assert_class('value', value, String)
|
20256
|
+
end
|
20257
|
+
|
20258
|
+
# Returns the instance of SyncRecordFailureReason for this value, creating a new instance for an unknown value
|
20259
|
+
def SyncRecordFailureReason.apply(value)
|
20260
|
+
if value.instance_of?(SyncRecordFailureReason)
|
20261
|
+
value
|
20262
|
+
else
|
20263
|
+
HttpClient::Preconditions.assert_class_or_nil('value', value, String)
|
20264
|
+
value.nil? ? nil : (from_string(value) || SyncRecordFailureReason.new(value))
|
20265
|
+
end
|
20266
|
+
end
|
20267
|
+
|
20268
|
+
# Returns the instance of SyncRecordFailureReason for this value, or nil if not found
|
20269
|
+
def SyncRecordFailureReason.from_string(value)
|
20270
|
+
HttpClient::Preconditions.assert_class('value', value, String)
|
20271
|
+
SyncRecordFailureReason.ALL.find { |v| v.value == value }
|
20272
|
+
end
|
20273
|
+
|
20274
|
+
def SyncRecordFailureReason.ALL
|
20275
|
+
@@all ||= [SyncRecordFailureReason.inventory, SyncRecordFailureReason.address, SyncRecordFailureReason.promotion, SyncRecordFailureReason.other]
|
20276
|
+
end
|
20277
|
+
|
20278
|
+
def SyncRecordFailureReason.inventory
|
20279
|
+
@@_inventory ||= SyncRecordFailureReason.new('inventory')
|
20280
|
+
end
|
20281
|
+
|
20282
|
+
def SyncRecordFailureReason.address
|
20283
|
+
@@_address ||= SyncRecordFailureReason.new('address')
|
20284
|
+
end
|
20285
|
+
|
20286
|
+
def SyncRecordFailureReason.promotion
|
20287
|
+
@@_promotion ||= SyncRecordFailureReason.new('promotion')
|
20288
|
+
end
|
20289
|
+
|
20290
|
+
def SyncRecordFailureReason.other
|
20291
|
+
@@_other ||= SyncRecordFailureReason.new('other')
|
20292
|
+
end
|
20293
|
+
|
20294
|
+
def to_hash
|
20295
|
+
value
|
20296
|
+
end
|
20297
|
+
|
20298
|
+
end
|
20299
|
+
|
20300
|
+
class SyncStreamType
|
20301
|
+
|
20302
|
+
attr_reader :value
|
20303
|
+
|
20304
|
+
def initialize(value)
|
20305
|
+
@value = HttpClient::Preconditions.assert_class('value', value, String)
|
20306
|
+
end
|
20307
|
+
|
20308
|
+
# Returns the instance of SyncStreamType for this value, creating a new instance for an unknown value
|
20309
|
+
def SyncStreamType.apply(value)
|
20310
|
+
if value.instance_of?(SyncStreamType)
|
20311
|
+
value
|
20312
|
+
else
|
20313
|
+
HttpClient::Preconditions.assert_class_or_nil('value', value, String)
|
20314
|
+
value.nil? ? nil : (from_string(value) || SyncStreamType.new(value))
|
20315
|
+
end
|
20316
|
+
end
|
20317
|
+
|
20318
|
+
# Returns the instance of SyncStreamType for this value, or nil if not found
|
20319
|
+
def SyncStreamType.from_string(value)
|
20320
|
+
HttpClient::Preconditions.assert_class('value', value, String)
|
20321
|
+
SyncStreamType.ALL.find { |v| v.value == value }
|
20322
|
+
end
|
20323
|
+
|
20324
|
+
def SyncStreamType.ALL
|
20325
|
+
@@all ||= [SyncStreamType.submitted_order, SyncStreamType.placed_order]
|
20326
|
+
end
|
20327
|
+
|
20328
|
+
# Represents a sync stream of submitted orders - ie each record reported
|
20329
|
+
# represents a submitted order
|
20330
|
+
def SyncStreamType.submitted_order
|
20331
|
+
@@_submitted_order ||= SyncStreamType.new('submitted_order')
|
20332
|
+
end
|
20333
|
+
|
20334
|
+
# Represents a sync stream of placed orders - ie each record reported represents
|
20335
|
+
# a placed order
|
20336
|
+
def SyncStreamType.placed_order
|
20337
|
+
@@_placed_order ||= SyncStreamType.new('placed_order')
|
20338
|
+
end
|
20339
|
+
|
20340
|
+
def to_hash
|
20341
|
+
value
|
20342
|
+
end
|
20343
|
+
|
20344
|
+
end
|
20345
|
+
|
20346
|
+
class SyncUnitOfTime
|
20347
|
+
|
20348
|
+
attr_reader :value
|
20349
|
+
|
20350
|
+
def initialize(value)
|
20351
|
+
@value = HttpClient::Preconditions.assert_class('value', value, String)
|
20352
|
+
end
|
20353
|
+
|
20354
|
+
# Returns the instance of SyncUnitOfTime for this value, creating a new instance for an unknown value
|
20355
|
+
def SyncUnitOfTime.apply(value)
|
20356
|
+
if value.instance_of?(SyncUnitOfTime)
|
20357
|
+
value
|
20358
|
+
else
|
20359
|
+
HttpClient::Preconditions.assert_class_or_nil('value', value, String)
|
20360
|
+
value.nil? ? nil : (from_string(value) || SyncUnitOfTime.new(value))
|
20361
|
+
end
|
20362
|
+
end
|
20363
|
+
|
20364
|
+
# Returns the instance of SyncUnitOfTime for this value, or nil if not found
|
20365
|
+
def SyncUnitOfTime.from_string(value)
|
20366
|
+
HttpClient::Preconditions.assert_class('value', value, String)
|
20367
|
+
SyncUnitOfTime.ALL.find { |v| v.value == value }
|
20368
|
+
end
|
20369
|
+
|
20370
|
+
def SyncUnitOfTime.ALL
|
20371
|
+
@@all ||= [SyncUnitOfTime.day, SyncUnitOfTime.hour, SyncUnitOfTime.minute, SyncUnitOfTime.second]
|
20372
|
+
end
|
20373
|
+
|
20374
|
+
def SyncUnitOfTime.day
|
20375
|
+
@@_day ||= SyncUnitOfTime.new('day')
|
20376
|
+
end
|
20377
|
+
|
20378
|
+
def SyncUnitOfTime.hour
|
20379
|
+
@@_hour ||= SyncUnitOfTime.new('hour')
|
20380
|
+
end
|
20381
|
+
|
20382
|
+
def SyncUnitOfTime.minute
|
20383
|
+
@@_minute ||= SyncUnitOfTime.new('minute')
|
20384
|
+
end
|
20385
|
+
|
20386
|
+
def SyncUnitOfTime.second
|
20387
|
+
@@_second ||= SyncUnitOfTime.new('second')
|
20388
|
+
end
|
20389
|
+
|
20390
|
+
def to_hash
|
20391
|
+
value
|
20392
|
+
end
|
20393
|
+
|
20394
|
+
end
|
20395
|
+
|
19523
20396
|
class TaxApplicability
|
19524
20397
|
|
19525
20398
|
attr_reader :value
|
@@ -19735,6 +20608,65 @@ module Io
|
|
19735
20608
|
|
19736
20609
|
end
|
19737
20610
|
|
20611
|
+
class ThreedsTwoChallengeViewport
|
20612
|
+
|
20613
|
+
attr_reader :value
|
20614
|
+
|
20615
|
+
def initialize(value)
|
20616
|
+
@value = HttpClient::Preconditions.assert_class('value', value, String)
|
20617
|
+
end
|
20618
|
+
|
20619
|
+
# Returns the instance of ThreedsTwoChallengeViewport for this value, creating a new instance for an unknown value
|
20620
|
+
def ThreedsTwoChallengeViewport.apply(value)
|
20621
|
+
if value.instance_of?(ThreedsTwoChallengeViewport)
|
20622
|
+
value
|
20623
|
+
else
|
20624
|
+
HttpClient::Preconditions.assert_class_or_nil('value', value, String)
|
20625
|
+
value.nil? ? nil : (from_string(value) || ThreedsTwoChallengeViewport.new(value))
|
20626
|
+
end
|
20627
|
+
end
|
20628
|
+
|
20629
|
+
# Returns the instance of ThreedsTwoChallengeViewport for this value, or nil if not found
|
20630
|
+
def ThreedsTwoChallengeViewport.from_string(value)
|
20631
|
+
HttpClient::Preconditions.assert_class('value', value, String)
|
20632
|
+
ThreedsTwoChallengeViewport.ALL.find { |v| v.value == value }
|
20633
|
+
end
|
20634
|
+
|
20635
|
+
def ThreedsTwoChallengeViewport.ALL
|
20636
|
+
@@all ||= [ThreedsTwoChallengeViewport.xxx_small, ThreedsTwoChallengeViewport.xx_small, ThreedsTwoChallengeViewport.x_small, ThreedsTwoChallengeViewport.small, ThreedsTwoChallengeViewport.fullscreen]
|
20637
|
+
end
|
20638
|
+
|
20639
|
+
# 250x400
|
20640
|
+
def ThreedsTwoChallengeViewport.xxx_small
|
20641
|
+
@@_xxx_small ||= ThreedsTwoChallengeViewport.new('xxx_small')
|
20642
|
+
end
|
20643
|
+
|
20644
|
+
# 390x400
|
20645
|
+
def ThreedsTwoChallengeViewport.xx_small
|
20646
|
+
@@_xx_small ||= ThreedsTwoChallengeViewport.new('xx_small')
|
20647
|
+
end
|
20648
|
+
|
20649
|
+
# 500x600
|
20650
|
+
def ThreedsTwoChallengeViewport.x_small
|
20651
|
+
@@_x_small ||= ThreedsTwoChallengeViewport.new('x_small')
|
20652
|
+
end
|
20653
|
+
|
20654
|
+
# 600x400
|
20655
|
+
def ThreedsTwoChallengeViewport.small
|
20656
|
+
@@_small ||= ThreedsTwoChallengeViewport.new('small')
|
20657
|
+
end
|
20658
|
+
|
20659
|
+
# Full Screen. Not recommended for mobile devices at this time.
|
20660
|
+
def ThreedsTwoChallengeViewport.fullscreen
|
20661
|
+
@@_fullscreen ||= ThreedsTwoChallengeViewport.new('fullscreen')
|
20662
|
+
end
|
20663
|
+
|
20664
|
+
def to_hash
|
20665
|
+
value
|
20666
|
+
end
|
20667
|
+
|
20668
|
+
end
|
20669
|
+
|
19738
20670
|
class TierAvailability
|
19739
20671
|
|
19740
20672
|
attr_reader :value
|
@@ -20747,7 +21679,7 @@ module Io
|
|
20747
21679
|
|
20748
21680
|
class AddressConfiguration
|
20749
21681
|
|
20750
|
-
attr_reader :country, :field_validation, :provinces
|
21682
|
+
attr_reader :country, :field_validation, :provinces, :formats
|
20751
21683
|
|
20752
21684
|
def initialize(incoming={})
|
20753
21685
|
opts = HttpClient::Helper.symbolize_keys(incoming)
|
@@ -20755,6 +21687,7 @@ module Io
|
|
20755
21687
|
@country = HttpClient::Preconditions.assert_class('country', opts.delete(:country), String)
|
20756
21688
|
@field_validation = (x = opts.delete(:field_validation); x.is_a?(::Io::Flow::V0::Models::AddressFieldValidation) ? x : ::Io::Flow::V0::Models::AddressFieldValidation.new(x))
|
20757
21689
|
@provinces = HttpClient::Preconditions.assert_class('provinces', (x = opts.delete(:provinces); x.nil? ? [] : x), Array).map { |v| (x = v; x.is_a?(::Io::Flow::V0::Models::AddressConfigurationProvince) ? x : ::Io::Flow::V0::Models::AddressConfigurationProvince.new(x)) }
|
21690
|
+
@formats = HttpClient::Preconditions.assert_class('formats', (x = opts.delete(:formats); x.nil? ? [] : x), Array).map { |v| (x = v; x.is_a?(::Io::Flow::V0::Models::AddressConfigurationFormat) ? x : ::Io::Flow::V0::Models::AddressConfigurationFormat.new(x)) }
|
20758
21691
|
end
|
20759
21692
|
|
20760
21693
|
def to_json
|
@@ -20769,7 +21702,61 @@ module Io
|
|
20769
21702
|
{
|
20770
21703
|
:country => country,
|
20771
21704
|
:field_validation => field_validation.to_hash,
|
20772
|
-
:provinces => provinces.map { |o| o.to_hash }
|
21705
|
+
:provinces => provinces.map { |o| o.to_hash },
|
21706
|
+
:formats => formats.map { |o| o.to_hash }
|
21707
|
+
}
|
21708
|
+
end
|
21709
|
+
|
21710
|
+
end
|
21711
|
+
|
21712
|
+
class AddressConfigurationFieldPlacement
|
21713
|
+
|
21714
|
+
attr_reader :name
|
21715
|
+
|
21716
|
+
def initialize(incoming={})
|
21717
|
+
opts = HttpClient::Helper.symbolize_keys(incoming)
|
21718
|
+
HttpClient::Preconditions.require_keys(opts, [:name], 'AddressConfigurationFieldPlacement')
|
21719
|
+
@name = (x = opts.delete(:name); x.is_a?(::Io::Flow::V0::Models::AddressFieldName) ? x : ::Io::Flow::V0::Models::AddressFieldName.apply(x))
|
21720
|
+
end
|
21721
|
+
|
21722
|
+
def to_json
|
21723
|
+
JSON.dump(to_hash)
|
21724
|
+
end
|
21725
|
+
|
21726
|
+
def copy(incoming={})
|
21727
|
+
AddressConfigurationFieldPlacement.new(to_hash.merge(HttpClient::Helper.symbolize_keys(incoming)))
|
21728
|
+
end
|
21729
|
+
|
21730
|
+
def to_hash
|
21731
|
+
{
|
21732
|
+
:name => name.value
|
21733
|
+
}
|
21734
|
+
end
|
21735
|
+
|
21736
|
+
end
|
21737
|
+
|
21738
|
+
# Field placements within an address configuration format
|
21739
|
+
class AddressConfigurationFormat
|
21740
|
+
|
21741
|
+
attr_reader :placements
|
21742
|
+
|
21743
|
+
def initialize(incoming={})
|
21744
|
+
opts = HttpClient::Helper.symbolize_keys(incoming)
|
21745
|
+
HttpClient::Preconditions.require_keys(opts, [:placements], 'AddressConfigurationFormat')
|
21746
|
+
@placements = HttpClient::Preconditions.assert_class('placements', opts.delete(:placements), Array).map { |v| (x = v; x.is_a?(::Io::Flow::V0::Models::AddressConfigurationFieldPlacement) ? x : ::Io::Flow::V0::Models::AddressConfigurationFieldPlacement.new(x)) }
|
21747
|
+
end
|
21748
|
+
|
21749
|
+
def to_json
|
21750
|
+
JSON.dump(to_hash)
|
21751
|
+
end
|
21752
|
+
|
21753
|
+
def copy(incoming={})
|
21754
|
+
AddressConfigurationFormat.new(to_hash.merge(HttpClient::Helper.symbolize_keys(incoming)))
|
21755
|
+
end
|
21756
|
+
|
21757
|
+
def to_hash
|
21758
|
+
{
|
21759
|
+
:placements => placements.map { |o| o.to_hash }
|
20773
21760
|
}
|
20774
21761
|
end
|
20775
21762
|
|
@@ -21225,12 +22212,13 @@ module Io
|
|
21225
22212
|
|
21226
22213
|
class AllocationLineDetail < AllocationDetail
|
21227
22214
|
|
21228
|
-
attr_reader :number, :quantity, :key, :price, :total, :included, :not_included
|
22215
|
+
attr_reader :id, :number, :quantity, :key, :price, :total, :included, :not_included
|
21229
22216
|
|
21230
22217
|
def initialize(incoming={})
|
21231
22218
|
super(:discriminator => AllocationDetail::Types::ALLOCATION_LINE_DETAIL)
|
21232
22219
|
opts = HttpClient::Helper.symbolize_keys(incoming)
|
21233
22220
|
HttpClient::Preconditions.require_keys(opts, [:number, :quantity, :key, :price, :total, :included, :not_included], 'AllocationLineDetail')
|
22221
|
+
@id = (x = opts.delete(:id); x.nil? ? nil : HttpClient::Preconditions.assert_class('id', x, String))
|
21234
22222
|
@number = HttpClient::Preconditions.assert_class('number', opts.delete(:number), String)
|
21235
22223
|
@quantity = HttpClient::Preconditions.assert_class('quantity', opts.delete(:quantity), Integer)
|
21236
22224
|
@key = (x = opts.delete(:key); x.is_a?(::Io::Flow::V0::Models::OrderPriceDetailKey) ? x : ::Io::Flow::V0::Models::OrderPriceDetailKey.apply(x))
|
@@ -21250,6 +22238,7 @@ module Io
|
|
21250
22238
|
|
21251
22239
|
def subtype_to_hash
|
21252
22240
|
{
|
22241
|
+
:id => id,
|
21253
22242
|
:number => number,
|
21254
22243
|
:quantity => quantity,
|
21255
22244
|
:key => key.value,
|
@@ -22896,7 +23885,7 @@ module Io
|
|
22896
23885
|
HttpClient::Preconditions.require_keys(opts, [:behavior, :authentication_techniques, :roles], 'BehaviorAudit')
|
22897
23886
|
@behavior = (x = opts.delete(:behavior); x.is_a?(::Io::Flow::V0::Models::FlowBehavior) ? x : ::Io::Flow::V0::Models::FlowBehavior.apply(x))
|
22898
23887
|
@authentication_techniques = HttpClient::Preconditions.assert_class('authentication_techniques', opts.delete(:authentication_techniques), Array).map { |v| (x = v; x.is_a?(::Io::Flow::V0::Models::AuthenticationTechnique) ? x : ::Io::Flow::V0::Models::AuthenticationTechnique.apply(x)) }
|
22899
|
-
@roles = HttpClient::Preconditions.assert_class('roles', opts.delete(:roles), Array).map { |v| (x = v; x.is_a?(::Io::Flow::V0::Models::FlowRole) ? x : ::Io::Flow::V0::Models::FlowRole.
|
23888
|
+
@roles = HttpClient::Preconditions.assert_class('roles', opts.delete(:roles), Array).map { |v| (x = v; x.is_a?(::Io::Flow::V0::Models::FlowRole) ? x : ::Io::Flow::V0::Models::FlowRole.apply(x)) }
|
22900
23889
|
end
|
22901
23890
|
|
22902
23891
|
def to_json
|
@@ -22911,7 +23900,7 @@ module Io
|
|
22911
23900
|
{
|
22912
23901
|
:behavior => behavior.value,
|
22913
23902
|
:authentication_techniques => authentication_techniques.map { |o| o.value },
|
22914
|
-
:roles => roles.map { |o| o.
|
23903
|
+
:roles => roles.map { |o| o.value }
|
22915
23904
|
}
|
22916
23905
|
end
|
22917
23906
|
|
@@ -23050,7 +24039,8 @@ module Io
|
|
23050
24039
|
|
23051
24040
|
end
|
23052
24041
|
|
23053
|
-
# Shopper browser info
|
24042
|
+
# Shopper browser info used as part of card authentication. All of these fields
|
24043
|
+
# are required if you are using 3DS2.
|
23054
24044
|
class BrowserInfo
|
23055
24045
|
|
23056
24046
|
attr_reader :origin, :language, :java_enabled, :color_depth, :screen_height, :screen_width, :time_zone_offset, :user_agent, :accept
|
@@ -23718,7 +24708,7 @@ module Io
|
|
23718
24708
|
|
23719
24709
|
class CardForm
|
23720
24710
|
|
23721
|
-
attr_reader :number, :cipher, :expiration_month, :expiration_year, :name, :cvv, :address, :ip, :challenge_text, :challenge_cipher, :token_type
|
24711
|
+
attr_reader :number, :cipher, :expiration_month, :expiration_year, :name, :cvv, :address, :ip, :challenge_text, :challenge_cipher, :token_type, :requested_currency, :metadata
|
23722
24712
|
|
23723
24713
|
def initialize(incoming={})
|
23724
24714
|
opts = HttpClient::Helper.symbolize_keys(incoming)
|
@@ -23734,6 +24724,8 @@ module Io
|
|
23734
24724
|
@challenge_text = (x = opts.delete(:challenge_text); x.nil? ? nil : HttpClient::Preconditions.assert_class('challenge_text', x, String))
|
23735
24725
|
@challenge_cipher = (x = opts.delete(:challenge_cipher); x.nil? ? nil : HttpClient::Preconditions.assert_class('challenge_cipher', x, String))
|
23736
24726
|
@token_type = (x = opts.delete(:token_type); x.nil? ? nil : (x = x; x.is_a?(::Io::Flow::V0::Models::TokenType) ? x : ::Io::Flow::V0::Models::TokenType.apply(x)))
|
24727
|
+
@requested_currency = (x = opts.delete(:requested_currency); x.nil? ? nil : HttpClient::Preconditions.assert_class('requested_currency', x, String))
|
24728
|
+
@metadata = (x = opts.delete(:metadata); x.nil? ? nil : (x = x; x.is_a?(::Io::Flow::V0::Models::CardMetadata) ? x : ::Io::Flow::V0::Models::CardMetadata.new(x)))
|
23737
24729
|
end
|
23738
24730
|
|
23739
24731
|
def to_json
|
@@ -23756,7 +24748,34 @@ module Io
|
|
23756
24748
|
:ip => ip,
|
23757
24749
|
:challenge_text => challenge_text,
|
23758
24750
|
:challenge_cipher => challenge_cipher,
|
23759
|
-
:token_type => token_type.nil? ? nil : token_type.value
|
24751
|
+
:token_type => token_type.nil? ? nil : token_type.value,
|
24752
|
+
:requested_currency => requested_currency,
|
24753
|
+
:metadata => metadata.nil? ? nil : metadata.to_hash
|
24754
|
+
}
|
24755
|
+
end
|
24756
|
+
|
24757
|
+
end
|
24758
|
+
|
24759
|
+
class CardMetadata
|
24760
|
+
|
24761
|
+
attr_reader :merchant_of_record
|
24762
|
+
|
24763
|
+
def initialize(incoming={})
|
24764
|
+
opts = HttpClient::Helper.symbolize_keys(incoming)
|
24765
|
+
@merchant_of_record = (x = opts.delete(:merchant_of_record); x.nil? ? nil : (x = x; x.is_a?(::Io::Flow::V0::Models::OrderMerchantOfRecord) ? x : ::Io::Flow::V0::Models::OrderMerchantOfRecord.apply(x)))
|
24766
|
+
end
|
24767
|
+
|
24768
|
+
def to_json
|
24769
|
+
JSON.dump(to_hash)
|
24770
|
+
end
|
24771
|
+
|
24772
|
+
def copy(incoming={})
|
24773
|
+
CardMetadata.new(to_hash.merge(HttpClient::Helper.symbolize_keys(incoming)))
|
24774
|
+
end
|
24775
|
+
|
24776
|
+
def to_hash
|
24777
|
+
{
|
24778
|
+
:merchant_of_record => merchant_of_record.nil? ? nil : merchant_of_record.value
|
23760
24779
|
}
|
23761
24780
|
end
|
23762
24781
|
|
@@ -23825,7 +24844,7 @@ module Io
|
|
23825
24844
|
# Creates an authorization for a transaction from a card payment source.
|
23826
24845
|
class CardPaymentSourceAuthorizationForm < AuthorizationForm
|
23827
24846
|
|
23828
|
-
attr_reader :key, :card_payment_source_id, :order_number, :amount, :currency, :browser_info
|
24847
|
+
attr_reader :key, :card_payment_source_id, :order_number, :amount, :currency, :browser_info, :action_configuration
|
23829
24848
|
|
23830
24849
|
def initialize(incoming={})
|
23831
24850
|
super(:discriminator => AuthorizationForm::Types::CARD_PAYMENT_SOURCE_AUTHORIZATION_FORM)
|
@@ -23837,6 +24856,7 @@ module Io
|
|
23837
24856
|
@amount = HttpClient::Preconditions.assert_class('amount', HttpClient::Helper.to_big_decimal(opts.delete(:amount)), BigDecimal)
|
23838
24857
|
@currency = HttpClient::Preconditions.assert_class('currency', opts.delete(:currency), String)
|
23839
24858
|
@browser_info = (x = opts.delete(:browser_info); x.nil? ? nil : (x = x; x.is_a?(::Io::Flow::V0::Models::BrowserInfo) ? x : ::Io::Flow::V0::Models::BrowserInfo.new(x)))
|
24859
|
+
@action_configuration = (x = opts.delete(:action_configuration); x.nil? ? nil : (x = x; x.is_a?(::Io::Flow::V0::Models::ActionConfiguration) ? x : ::Io::Flow::V0::Models::ActionConfiguration.from_json(x)))
|
23840
24860
|
end
|
23841
24861
|
|
23842
24862
|
def to_json
|
@@ -23854,7 +24874,8 @@ module Io
|
|
23854
24874
|
:order_number => order_number,
|
23855
24875
|
:amount => amount.to_f.to_s,
|
23856
24876
|
:currency => currency,
|
23857
|
-
:browser_info => browser_info.nil? ? nil : browser_info.to_hash
|
24877
|
+
:browser_info => browser_info.nil? ? nil : browser_info.to_hash,
|
24878
|
+
:action_configuration => action_configuration.nil? ? nil : action_configuration.to_hash
|
23858
24879
|
}
|
23859
24880
|
end
|
23860
24881
|
|
@@ -25284,32 +26305,6 @@ module Io
|
|
25284
26305
|
|
25285
26306
|
end
|
25286
26307
|
|
25287
|
-
class CheckoutSettings
|
25288
|
-
|
25289
|
-
attr_reader :configuration
|
25290
|
-
|
25291
|
-
def initialize(incoming={})
|
25292
|
-
opts = HttpClient::Helper.symbolize_keys(incoming)
|
25293
|
-
HttpClient::Preconditions.require_keys(opts, [:configuration], 'CheckoutSettings')
|
25294
|
-
@configuration = (x = opts.delete(:configuration); x.is_a?(::Io::Flow::V0::Models::ExperienceConfigurationReference) ? x : ::Io::Flow::V0::Models::ExperienceConfigurationReference.new(x))
|
25295
|
-
end
|
25296
|
-
|
25297
|
-
def to_json
|
25298
|
-
JSON.dump(to_hash)
|
25299
|
-
end
|
25300
|
-
|
25301
|
-
def copy(incoming={})
|
25302
|
-
CheckoutSettings.new(to_hash.merge(HttpClient::Helper.symbolize_keys(incoming)))
|
25303
|
-
end
|
25304
|
-
|
25305
|
-
def to_hash
|
25306
|
-
{
|
25307
|
-
:configuration => configuration.to_hash
|
25308
|
-
}
|
25309
|
-
end
|
25310
|
-
|
25311
|
-
end
|
25312
|
-
|
25313
26308
|
# Represents a secure token that can be used to redirect to Checkout UI
|
25314
26309
|
class CheckoutToken
|
25315
26310
|
|
@@ -26165,7 +27160,7 @@ module Io
|
|
26165
27160
|
opts = HttpClient::Helper.symbolize_keys(incoming)
|
26166
27161
|
HttpClient::Preconditions.require_keys(opts, [:id, :experiments], 'Context')
|
26167
27162
|
@id = HttpClient::Preconditions.assert_class('id', opts.delete(:id), String)
|
26168
|
-
@experiments = HttpClient::Preconditions.assert_class('experiments', opts.delete(:experiments), Array).map { |v| (x = v; x.is_a?(::Io::Flow::V0::Models::
|
27163
|
+
@experiments = HttpClient::Preconditions.assert_class('experiments', opts.delete(:experiments), Array).map { |v| (x = v; x.is_a?(::Io::Flow::V0::Models::SessionContextExperiment) ? x : ::Io::Flow::V0::Models::SessionContextExperiment.new(x)) }
|
26169
27164
|
end
|
26170
27165
|
|
26171
27166
|
def to_json
|
@@ -26192,7 +27187,7 @@ module Io
|
|
26192
27187
|
def initialize(incoming={})
|
26193
27188
|
opts = HttpClient::Helper.symbolize_keys(incoming)
|
26194
27189
|
HttpClient::Preconditions.require_keys(opts, [:experiments], 'ContextForm')
|
26195
|
-
@experiments = HttpClient::Preconditions.assert_class('experiments', opts.delete(:experiments), Array).map { |v| (x = v; x.is_a?(::Io::Flow::V0::Models::
|
27190
|
+
@experiments = HttpClient::Preconditions.assert_class('experiments', opts.delete(:experiments), Array).map { |v| (x = v; x.is_a?(::Io::Flow::V0::Models::SessionContextExperiment) ? x : ::Io::Flow::V0::Models::SessionContextExperiment.new(x)) }
|
26196
27191
|
end
|
26197
27192
|
|
26198
27193
|
def to_json
|
@@ -26842,14 +27837,15 @@ module Io
|
|
26842
27837
|
# Represents the format used to export price book item documents
|
26843
27838
|
class CsvPriceBookItemExportRow
|
26844
27839
|
|
26845
|
-
attr_reader :price_book_key, :price_book_item_key, :item_number, :item_name, :amount, :item_attributes, :starts_at, :ends_at
|
27840
|
+
attr_reader :price_book_key, :price_book_item_key, :item_number, :sku, :item_name, :amount, :item_attributes, :starts_at, :ends_at
|
26846
27841
|
|
26847
27842
|
def initialize(incoming={})
|
26848
27843
|
opts = HttpClient::Helper.symbolize_keys(incoming)
|
26849
|
-
HttpClient::Preconditions.require_keys(opts, [:price_book_key, :price_book_item_key, :item_number, :item_name, :amount, :starts_at], 'CsvPriceBookItemExportRow')
|
27844
|
+
HttpClient::Preconditions.require_keys(opts, [:price_book_key, :price_book_item_key, :item_number, :sku, :item_name, :amount, :starts_at], 'CsvPriceBookItemExportRow')
|
26850
27845
|
@price_book_key = HttpClient::Preconditions.assert_class('price_book_key', opts.delete(:price_book_key), String)
|
26851
27846
|
@price_book_item_key = HttpClient::Preconditions.assert_class('price_book_item_key', opts.delete(:price_book_item_key), String)
|
26852
27847
|
@item_number = HttpClient::Preconditions.assert_class('item_number', opts.delete(:item_number), String)
|
27848
|
+
@sku = HttpClient::Preconditions.assert_class('sku', opts.delete(:sku), String)
|
26853
27849
|
@item_name = HttpClient::Preconditions.assert_class('item_name', opts.delete(:item_name), String)
|
26854
27850
|
@amount = HttpClient::Preconditions.assert_class('amount', HttpClient::Helper.to_big_decimal(opts.delete(:amount)), BigDecimal)
|
26855
27851
|
@item_attributes = (x = opts.delete(:item_attributes); x.nil? ? nil : HttpClient::Preconditions.assert_class('item_attributes', x, Hash).inject({}) { |h, d| h[d[0]] = HttpClient::Preconditions.assert_class('item_attributes', d[1], String); h })
|
@@ -26870,6 +27866,7 @@ module Io
|
|
26870
27866
|
:price_book_key => price_book_key,
|
26871
27867
|
:price_book_item_key => price_book_item_key,
|
26872
27868
|
:item_number => item_number,
|
27869
|
+
:sku => sku,
|
26873
27870
|
:item_name => item_name,
|
26874
27871
|
:amount => amount.to_f.to_s,
|
26875
27872
|
:item_attributes => item_attributes.nil? ? nil : item_attributes,
|
@@ -27322,6 +28319,32 @@ module Io
|
|
27322
28319
|
|
27323
28320
|
end
|
27324
28321
|
|
28322
|
+
class CustomerClientToken
|
28323
|
+
|
28324
|
+
attr_reader :token
|
28325
|
+
|
28326
|
+
def initialize(incoming={})
|
28327
|
+
opts = HttpClient::Helper.symbolize_keys(incoming)
|
28328
|
+
HttpClient::Preconditions.require_keys(opts, [:token], 'CustomerClientToken')
|
28329
|
+
@token = HttpClient::Preconditions.assert_class('token', opts.delete(:token), String)
|
28330
|
+
end
|
28331
|
+
|
28332
|
+
def to_json
|
28333
|
+
JSON.dump(to_hash)
|
28334
|
+
end
|
28335
|
+
|
28336
|
+
def copy(incoming={})
|
28337
|
+
CustomerClientToken.new(to_hash.merge(HttpClient::Helper.symbolize_keys(incoming)))
|
28338
|
+
end
|
28339
|
+
|
28340
|
+
def to_hash
|
28341
|
+
{
|
28342
|
+
:token => token
|
28343
|
+
}
|
28344
|
+
end
|
28345
|
+
|
28346
|
+
end
|
28347
|
+
|
27325
28348
|
class CustomerDeleted < Event
|
27326
28349
|
|
27327
28350
|
attr_reader :event_id, :timestamp, :organization, :customer
|
@@ -27737,6 +28760,34 @@ module Io
|
|
27737
28760
|
|
27738
28761
|
end
|
27739
28762
|
|
28763
|
+
class DatetimeWithTimezone
|
28764
|
+
|
28765
|
+
attr_reader :datetime, :timezone
|
28766
|
+
|
28767
|
+
def initialize(incoming={})
|
28768
|
+
opts = HttpClient::Helper.symbolize_keys(incoming)
|
28769
|
+
HttpClient::Preconditions.require_keys(opts, [:datetime, :timezone], 'DatetimeWithTimezone')
|
28770
|
+
@datetime = HttpClient::Preconditions.assert_class('datetime', HttpClient::Helper.to_date_time_iso8601(opts.delete(:datetime)), DateTime)
|
28771
|
+
@timezone = HttpClient::Preconditions.assert_class('timezone', opts.delete(:timezone), String)
|
28772
|
+
end
|
28773
|
+
|
28774
|
+
def to_json
|
28775
|
+
JSON.dump(to_hash)
|
28776
|
+
end
|
28777
|
+
|
28778
|
+
def copy(incoming={})
|
28779
|
+
DatetimeWithTimezone.new(to_hash.merge(HttpClient::Helper.symbolize_keys(incoming)))
|
28780
|
+
end
|
28781
|
+
|
28782
|
+
def to_hash
|
28783
|
+
{
|
28784
|
+
:datetime => datetime,
|
28785
|
+
:timezone => timezone
|
28786
|
+
}
|
28787
|
+
end
|
28788
|
+
|
28789
|
+
end
|
28790
|
+
|
27740
28791
|
class DdpRatecardFee < RatecardFee
|
27741
28792
|
|
27742
28793
|
attr_reader :amount
|
@@ -27796,11 +28847,12 @@ module Io
|
|
27796
28847
|
|
27797
28848
|
class DeliveryItem
|
27798
28849
|
|
27799
|
-
attr_reader :number, :quantity, :shipment_estimate, :price, :attributes, :center, :line_number
|
28850
|
+
attr_reader :id, :number, :quantity, :shipment_estimate, :price, :attributes, :center, :line_number
|
27800
28851
|
|
27801
28852
|
def initialize(incoming={})
|
27802
28853
|
opts = HttpClient::Helper.symbolize_keys(incoming)
|
27803
28854
|
HttpClient::Preconditions.require_keys(opts, [:number, :quantity], 'DeliveryItem')
|
28855
|
+
@id = (x = opts.delete(:id); x.nil? ? nil : HttpClient::Preconditions.assert_class('id', x, String))
|
27804
28856
|
@number = HttpClient::Preconditions.assert_class('number', opts.delete(:number), String)
|
27805
28857
|
@quantity = HttpClient::Preconditions.assert_class('quantity', opts.delete(:quantity), Integer)
|
27806
28858
|
@shipment_estimate = (x = opts.delete(:shipment_estimate); x.nil? ? nil : (x = x; x.is_a?(::Io::Flow::V0::Models::DatetimeRange) ? x : ::Io::Flow::V0::Models::DatetimeRange.new(x)))
|
@@ -27820,6 +28872,7 @@ module Io
|
|
27820
28872
|
|
27821
28873
|
def to_hash
|
27822
28874
|
{
|
28875
|
+
:id => id,
|
27823
28876
|
:number => number,
|
27824
28877
|
:quantity => quantity,
|
27825
28878
|
:shipment_estimate => shipment_estimate.nil? ? nil : shipment_estimate.to_hash,
|
@@ -28449,6 +29502,58 @@ module Io
|
|
28449
29502
|
|
28450
29503
|
end
|
28451
29504
|
|
29505
|
+
# Result of looking up a specific tax registration number. Includes details of
|
29506
|
+
# both the consumer request and the VIES response.
|
29507
|
+
class DetailedTaxRegistration
|
29508
|
+
|
29509
|
+
attr_reader :id, :key, :consumer_company_name, :number, :country, :success, :timestamp, :vies_result, :vies_result_reason, :vies_company_name, :vies_company_address, :company_name_match_result, :company_name_match_result_reason
|
29510
|
+
|
29511
|
+
def initialize(incoming={})
|
29512
|
+
opts = HttpClient::Helper.symbolize_keys(incoming)
|
29513
|
+
HttpClient::Preconditions.require_keys(opts, [:id, :key, :number, :country, :success, :timestamp, :vies_result, :company_name_match_result], 'DetailedTaxRegistration')
|
29514
|
+
@id = HttpClient::Preconditions.assert_class('id', opts.delete(:id), String)
|
29515
|
+
@key = HttpClient::Preconditions.assert_class('key', opts.delete(:key), String)
|
29516
|
+
@consumer_company_name = (x = opts.delete(:consumer_company_name); x.nil? ? nil : HttpClient::Preconditions.assert_class('consumer_company_name', x, String))
|
29517
|
+
@number = HttpClient::Preconditions.assert_class('number', opts.delete(:number), String)
|
29518
|
+
@country = HttpClient::Preconditions.assert_class('country', opts.delete(:country), String)
|
29519
|
+
@success = HttpClient::Preconditions.assert_boolean('success', opts.delete(:success))
|
29520
|
+
@timestamp = HttpClient::Preconditions.assert_class('timestamp', HttpClient::Helper.to_date_time_iso8601(opts.delete(:timestamp)), DateTime)
|
29521
|
+
@vies_result = (x = opts.delete(:vies_result); x.is_a?(::Io::Flow::V0::Models::TaxVerificationResult) ? x : ::Io::Flow::V0::Models::TaxVerificationResult.apply(x))
|
29522
|
+
@vies_result_reason = (x = opts.delete(:vies_result_reason); x.nil? ? nil : HttpClient::Preconditions.assert_class('vies_result_reason', x, String))
|
29523
|
+
@vies_company_name = (x = opts.delete(:vies_company_name); x.nil? ? nil : HttpClient::Preconditions.assert_class('vies_company_name', x, String))
|
29524
|
+
@vies_company_address = (x = opts.delete(:vies_company_address); x.nil? ? nil : HttpClient::Preconditions.assert_class('vies_company_address', x, String))
|
29525
|
+
@company_name_match_result = (x = opts.delete(:company_name_match_result); x.is_a?(::Io::Flow::V0::Models::TaxVerificationResult) ? x : ::Io::Flow::V0::Models::TaxVerificationResult.apply(x))
|
29526
|
+
@company_name_match_result_reason = (x = opts.delete(:company_name_match_result_reason); x.nil? ? nil : HttpClient::Preconditions.assert_class('company_name_match_result_reason', x, String))
|
29527
|
+
end
|
29528
|
+
|
29529
|
+
def to_json
|
29530
|
+
JSON.dump(to_hash)
|
29531
|
+
end
|
29532
|
+
|
29533
|
+
def copy(incoming={})
|
29534
|
+
DetailedTaxRegistration.new(to_hash.merge(HttpClient::Helper.symbolize_keys(incoming)))
|
29535
|
+
end
|
29536
|
+
|
29537
|
+
def to_hash
|
29538
|
+
{
|
29539
|
+
:id => id,
|
29540
|
+
:key => key,
|
29541
|
+
:consumer_company_name => consumer_company_name,
|
29542
|
+
:number => number,
|
29543
|
+
:country => country,
|
29544
|
+
:success => success,
|
29545
|
+
:timestamp => timestamp,
|
29546
|
+
:vies_result => vies_result.value,
|
29547
|
+
:vies_result_reason => vies_result_reason,
|
29548
|
+
:vies_company_name => vies_company_name,
|
29549
|
+
:vies_company_address => vies_company_address,
|
29550
|
+
:company_name_match_result => company_name_match_result.value,
|
29551
|
+
:company_name_match_result_reason => company_name_match_result_reason
|
29552
|
+
}
|
29553
|
+
end
|
29554
|
+
|
29555
|
+
end
|
29556
|
+
|
28452
29557
|
# Represents a collection of items that are digitally available and do not
|
28453
29558
|
# require a physical shipment
|
28454
29559
|
class DigitalDelivery < Delivery
|
@@ -28646,7 +29751,7 @@ module Io
|
|
28646
29751
|
# you can capture up to the amount of the authorization.
|
28647
29752
|
class DirectAuthorizationForm < AuthorizationForm
|
28648
29753
|
|
28649
|
-
attr_reader :token, :amount, :currency, :customer, :key, :cvv, :attributes, :destination, :billing_address, :ip, :options, :redirect_urls, :browser_info
|
29754
|
+
attr_reader :token, :amount, :currency, :customer, :key, :cvv, :attributes, :destination, :billing_address, :ip, :options, :redirect_urls, :browser_info, :action_configuration
|
28650
29755
|
|
28651
29756
|
def initialize(incoming={})
|
28652
29757
|
super(:discriminator => AuthorizationForm::Types::DIRECT_AUTHORIZATION_FORM)
|
@@ -28665,6 +29770,7 @@ module Io
|
|
28665
29770
|
@options = (x = opts.delete(:options); x.nil? ? nil : HttpClient::Preconditions.assert_class('options', x, Array).map { |v| (x = v; x.is_a?(::Io::Flow::V0::Models::AuthorizationOption) ? x : ::Io::Flow::V0::Models::AuthorizationOption.apply(x)) })
|
28666
29771
|
@redirect_urls = (x = opts.delete(:redirect_urls); x.nil? ? nil : (x = x; x.is_a?(::Io::Flow::V0::Models::PostPaymentRedirectUrls) ? x : ::Io::Flow::V0::Models::PostPaymentRedirectUrls.new(x)))
|
28667
29772
|
@browser_info = (x = opts.delete(:browser_info); x.nil? ? nil : (x = x; x.is_a?(::Io::Flow::V0::Models::BrowserInfo) ? x : ::Io::Flow::V0::Models::BrowserInfo.new(x)))
|
29773
|
+
@action_configuration = (x = opts.delete(:action_configuration); x.nil? ? nil : (x = x; x.is_a?(::Io::Flow::V0::Models::ActionConfiguration) ? x : ::Io::Flow::V0::Models::ActionConfiguration.from_json(x)))
|
28668
29774
|
end
|
28669
29775
|
|
28670
29776
|
def to_json
|
@@ -28689,7 +29795,8 @@ module Io
|
|
28689
29795
|
:ip => ip,
|
28690
29796
|
:options => options.nil? ? nil : options.map { |o| o.value },
|
28691
29797
|
:redirect_urls => redirect_urls.nil? ? nil : redirect_urls.to_hash,
|
28692
|
-
:browser_info => browser_info.nil? ? nil : browser_info.to_hash
|
29798
|
+
:browser_info => browser_info.nil? ? nil : browser_info.to_hash,
|
29799
|
+
:action_configuration => action_configuration.nil? ? nil : action_configuration.to_hash
|
28693
29800
|
}
|
28694
29801
|
end
|
28695
29802
|
|
@@ -28900,15 +30007,15 @@ module Io
|
|
28900
30007
|
|
28901
30008
|
class DiscountRuleSettings
|
28902
30009
|
|
28903
|
-
attr_reader :id, :name, :
|
30010
|
+
attr_reader :id, :name, :from_with_tz, :to_with_tz, :status, :experience_keys, :rule
|
28904
30011
|
|
28905
30012
|
def initialize(incoming={})
|
28906
30013
|
opts = HttpClient::Helper.symbolize_keys(incoming)
|
28907
|
-
HttpClient::Preconditions.require_keys(opts, [:id, :name, :
|
30014
|
+
HttpClient::Preconditions.require_keys(opts, [:id, :name, :from_with_tz, :status, :experience_keys, :rule], 'DiscountRuleSettings')
|
28908
30015
|
@id = HttpClient::Preconditions.assert_class('id', opts.delete(:id), String)
|
28909
30016
|
@name = HttpClient::Preconditions.assert_class('name', opts.delete(:name), String)
|
28910
|
-
@
|
28911
|
-
@
|
30017
|
+
@from_with_tz = (x = opts.delete(:from_with_tz); x.is_a?(::Io::Flow::V0::Models::DatetimeWithTimezone) ? x : ::Io::Flow::V0::Models::DatetimeWithTimezone.new(x))
|
30018
|
+
@to_with_tz = (x = opts.delete(:to_with_tz); x.nil? ? nil : (x = x; x.is_a?(::Io::Flow::V0::Models::DatetimeWithTimezone) ? x : ::Io::Flow::V0::Models::DatetimeWithTimezone.new(x)))
|
28912
30019
|
@status = (x = opts.delete(:status); x.is_a?(::Io::Flow::V0::Models::DiscountRuleStatus) ? x : ::Io::Flow::V0::Models::DiscountRuleStatus.apply(x))
|
28913
30020
|
@experience_keys = HttpClient::Preconditions.assert_class('experience_keys', opts.delete(:experience_keys), Array).map { |v| HttpClient::Preconditions.assert_class('experience_keys', v, String) }
|
28914
30021
|
@rule = (x = opts.delete(:rule); x.is_a?(::Io::Flow::V0::Models::DiscountRule) ? x : ::Io::Flow::V0::Models::DiscountRule.new(x))
|
@@ -28926,8 +30033,8 @@ module Io
|
|
28926
30033
|
{
|
28927
30034
|
:id => id,
|
28928
30035
|
:name => name,
|
28929
|
-
:
|
28930
|
-
:
|
30036
|
+
:from_with_tz => from_with_tz.to_hash,
|
30037
|
+
:to_with_tz => to_with_tz.nil? ? nil : to_with_tz.to_hash,
|
28931
30038
|
:status => status.value,
|
28932
30039
|
:experience_keys => experience_keys,
|
28933
30040
|
:rule => rule.to_hash
|
@@ -28938,14 +30045,14 @@ module Io
|
|
28938
30045
|
|
28939
30046
|
class DiscountRuleSettingsForm
|
28940
30047
|
|
28941
|
-
attr_reader :name, :
|
30048
|
+
attr_reader :name, :from_with_tz, :to_with_tz, :experience_keys, :rule
|
28942
30049
|
|
28943
30050
|
def initialize(incoming={})
|
28944
30051
|
opts = HttpClient::Helper.symbolize_keys(incoming)
|
28945
|
-
HttpClient::Preconditions.require_keys(opts, [:name, :
|
30052
|
+
HttpClient::Preconditions.require_keys(opts, [:name, :from_with_tz, :experience_keys, :rule], 'DiscountRuleSettingsForm')
|
28946
30053
|
@name = HttpClient::Preconditions.assert_class('name', opts.delete(:name), String)
|
28947
|
-
@
|
28948
|
-
@
|
30054
|
+
@from_with_tz = (x = opts.delete(:from_with_tz); x.is_a?(::Io::Flow::V0::Models::DatetimeWithTimezone) ? x : ::Io::Flow::V0::Models::DatetimeWithTimezone.new(x))
|
30055
|
+
@to_with_tz = (x = opts.delete(:to_with_tz); x.nil? ? nil : (x = x; x.is_a?(::Io::Flow::V0::Models::DatetimeWithTimezone) ? x : ::Io::Flow::V0::Models::DatetimeWithTimezone.new(x)))
|
28949
30056
|
@experience_keys = HttpClient::Preconditions.assert_class('experience_keys', opts.delete(:experience_keys), Array).map { |v| HttpClient::Preconditions.assert_class('experience_keys', v, String) }
|
28950
30057
|
@rule = (x = opts.delete(:rule); x.is_a?(::Io::Flow::V0::Models::DiscountRule) ? x : ::Io::Flow::V0::Models::DiscountRule.new(x))
|
28951
30058
|
end
|
@@ -28961,8 +30068,8 @@ module Io
|
|
28961
30068
|
def to_hash
|
28962
30069
|
{
|
28963
30070
|
:name => name,
|
28964
|
-
:
|
28965
|
-
:
|
30071
|
+
:from_with_tz => from_with_tz.to_hash,
|
30072
|
+
:to_with_tz => to_with_tz.nil? ? nil : to_with_tz.to_hash,
|
28966
30073
|
:experience_keys => experience_keys,
|
28967
30074
|
:rule => rule.to_hash
|
28968
30075
|
}
|
@@ -29850,6 +30957,32 @@ module Io
|
|
29850
30957
|
|
29851
30958
|
end
|
29852
30959
|
|
30960
|
+
class ExperienceCheckoutConfigurationSettings
|
30961
|
+
|
30962
|
+
attr_reader :configuration
|
30963
|
+
|
30964
|
+
def initialize(incoming={})
|
30965
|
+
opts = HttpClient::Helper.symbolize_keys(incoming)
|
30966
|
+
HttpClient::Preconditions.require_keys(opts, [:configuration], 'ExperienceCheckoutConfigurationSettings')
|
30967
|
+
@configuration = (x = opts.delete(:configuration); x.is_a?(::Io::Flow::V0::Models::ExperienceConfigurationReference) ? x : ::Io::Flow::V0::Models::ExperienceConfigurationReference.new(x))
|
30968
|
+
end
|
30969
|
+
|
30970
|
+
def to_json
|
30971
|
+
JSON.dump(to_hash)
|
30972
|
+
end
|
30973
|
+
|
30974
|
+
def copy(incoming={})
|
30975
|
+
ExperienceCheckoutConfigurationSettings.new(to_hash.merge(HttpClient::Helper.symbolize_keys(incoming)))
|
30976
|
+
end
|
30977
|
+
|
30978
|
+
def to_hash
|
30979
|
+
{
|
30980
|
+
:configuration => configuration.to_hash
|
30981
|
+
}
|
30982
|
+
end
|
30983
|
+
|
30984
|
+
end
|
30985
|
+
|
29853
30986
|
class ExperienceCheckoutSettings
|
29854
30987
|
|
29855
30988
|
attr_reader :id, :experience, :checkout_configuration
|
@@ -30920,7 +32053,7 @@ module Io
|
|
30920
32053
|
@delivered_duty = (x = opts.delete(:delivered_duty); x.is_a?(::Io::Flow::V0::Models::DeliveredDutySetting) ? x : ::Io::Flow::V0::Models::DeliveredDutySetting.new(x))
|
30921
32054
|
@pricing_settings = (x = opts.delete(:pricing_settings); x.nil? ? nil : (x = x; x.is_a?(::Io::Flow::V0::Models::PricingSettings) ? x : ::Io::Flow::V0::Models::PricingSettings.new(x)))
|
30922
32055
|
@logistics_settings = (x = opts.delete(:logistics_settings); x.nil? ? nil : (x = x; x.is_a?(::Io::Flow::V0::Models::LogisticsSettings) ? x : ::Io::Flow::V0::Models::LogisticsSettings.new(x)))
|
30923
|
-
@checkout_settings = (x = opts.delete(:checkout_settings); x.nil? ? nil : (x = x; x.is_a?(::Io::Flow::V0::Models::
|
32056
|
+
@checkout_settings = (x = opts.delete(:checkout_settings); x.nil? ? nil : (x = x; x.is_a?(::Io::Flow::V0::Models::ExperienceCheckoutConfigurationSettings) ? x : ::Io::Flow::V0::Models::ExperienceCheckoutConfigurationSettings.new(x)))
|
30924
32057
|
end
|
30925
32058
|
|
30926
32059
|
def to_json
|
@@ -31125,35 +32258,6 @@ module Io
|
|
31125
32258
|
|
31126
32259
|
end
|
31127
32260
|
|
31128
|
-
# Experiment for A/B testing
|
31129
|
-
class Experiment
|
31130
|
-
|
31131
|
-
attr_reader :key, :variant
|
31132
|
-
|
31133
|
-
def initialize(incoming={})
|
31134
|
-
opts = HttpClient::Helper.symbolize_keys(incoming)
|
31135
|
-
HttpClient::Preconditions.require_keys(opts, [:key], 'Experiment')
|
31136
|
-
@key = HttpClient::Preconditions.assert_class('key', opts.delete(:key), String)
|
31137
|
-
@variant = (x = opts.delete(:variant); x.nil? ? nil : (x = x; x.is_a?(::Io::Flow::V0::Models::ExperimentVariant) ? x : ::Io::Flow::V0::Models::ExperimentVariant.new(x)))
|
31138
|
-
end
|
31139
|
-
|
31140
|
-
def to_json
|
31141
|
-
JSON.dump(to_hash)
|
31142
|
-
end
|
31143
|
-
|
31144
|
-
def copy(incoming={})
|
31145
|
-
Experiment.new(to_hash.merge(HttpClient::Helper.symbolize_keys(incoming)))
|
31146
|
-
end
|
31147
|
-
|
31148
|
-
def to_hash
|
31149
|
-
{
|
31150
|
-
:key => key,
|
31151
|
-
:variant => variant.nil? ? nil : variant.to_hash
|
31152
|
-
}
|
31153
|
-
end
|
31154
|
-
|
31155
|
-
end
|
31156
|
-
|
31157
32261
|
# Experiment variant. Control or variant
|
31158
32262
|
class ExperimentVariant
|
31159
32263
|
|
@@ -31524,13 +32628,12 @@ module Io
|
|
31524
32628
|
# Indicates a field is required
|
31525
32629
|
class FieldValidationRequired < FieldValidationRule
|
31526
32630
|
|
31527
|
-
attr_reader :
|
32631
|
+
attr_reader :placeholder
|
31528
32632
|
|
31529
32633
|
def initialize(incoming={})
|
31530
32634
|
super(:discriminator => FieldValidationRule::Types::FIELD_VALIDATION_REQUIRED)
|
31531
32635
|
opts = HttpClient::Helper.symbolize_keys(incoming)
|
31532
|
-
HttpClient::Preconditions.
|
31533
|
-
@unused = HttpClient::Preconditions.assert_class('unused', opts.delete(:unused), String)
|
32636
|
+
@placeholder = (x = opts.delete(:placeholder); x.nil? ? nil : HttpClient::Preconditions.assert_class('placeholder', x, String))
|
31534
32637
|
end
|
31535
32638
|
|
31536
32639
|
def to_json
|
@@ -31543,7 +32646,7 @@ module Io
|
|
31543
32646
|
|
31544
32647
|
def subtype_to_hash
|
31545
32648
|
{
|
31546
|
-
:
|
32649
|
+
:placeholder => placeholder
|
31547
32650
|
}
|
31548
32651
|
end
|
31549
32652
|
|
@@ -31663,11 +32766,12 @@ module Io
|
|
31663
32766
|
# Rule to apply to enable white-listing and black-listing for an email address.
|
31664
32767
|
class FraudEmailRule
|
31665
32768
|
|
31666
|
-
attr_reader :email, :decision
|
32769
|
+
attr_reader :id, :email, :decision
|
31667
32770
|
|
31668
32771
|
def initialize(incoming={})
|
31669
32772
|
opts = HttpClient::Helper.symbolize_keys(incoming)
|
31670
32773
|
HttpClient::Preconditions.require_keys(opts, [:email, :decision], 'FraudEmailRule')
|
32774
|
+
@id = (x = opts.delete(:id); x.nil? ? nil : HttpClient::Preconditions.assert_class('id', x, String))
|
31671
32775
|
@email = HttpClient::Preconditions.assert_class('email', opts.delete(:email), String)
|
31672
32776
|
@decision = (x = opts.delete(:decision); x.is_a?(::Io::Flow::V0::Models::FraudEmailRuleDecision) ? x : ::Io::Flow::V0::Models::FraudEmailRuleDecision.apply(x))
|
31673
32777
|
end
|
@@ -31682,6 +32786,7 @@ module Io
|
|
31682
32786
|
|
31683
32787
|
def to_hash
|
31684
32788
|
{
|
32789
|
+
:id => id,
|
31685
32790
|
:email => email,
|
31686
32791
|
:decision => decision.value
|
31687
32792
|
}
|
@@ -32590,6 +33695,63 @@ module Io
|
|
32590
33695
|
|
32591
33696
|
end
|
32592
33697
|
|
33698
|
+
class GraphqlRequest
|
33699
|
+
|
33700
|
+
attr_reader :query, :operation_name, :variables
|
33701
|
+
|
33702
|
+
def initialize(incoming={})
|
33703
|
+
opts = HttpClient::Helper.symbolize_keys(incoming)
|
33704
|
+
HttpClient::Preconditions.require_keys(opts, [:query], 'GraphqlRequest')
|
33705
|
+
@query = HttpClient::Preconditions.assert_class('query', opts.delete(:query), String)
|
33706
|
+
@operation_name = (x = opts.delete(:operation_name); x.nil? ? nil : HttpClient::Preconditions.assert_class('operation_name', x, String))
|
33707
|
+
@variables = (x = opts.delete(:variables); x.nil? ? nil : HttpClient::Preconditions.assert_class('variables', x, Hash).inject({}) { |h, d| h[d[0]] = HttpClient::Preconditions.assert_class('variables', d[1], String); h })
|
33708
|
+
end
|
33709
|
+
|
33710
|
+
def to_json
|
33711
|
+
JSON.dump(to_hash)
|
33712
|
+
end
|
33713
|
+
|
33714
|
+
def copy(incoming={})
|
33715
|
+
GraphqlRequest.new(to_hash.merge(HttpClient::Helper.symbolize_keys(incoming)))
|
33716
|
+
end
|
33717
|
+
|
33718
|
+
def to_hash
|
33719
|
+
{
|
33720
|
+
:query => query,
|
33721
|
+
:operation_name => operation_name,
|
33722
|
+
:variables => variables.nil? ? nil : variables
|
33723
|
+
}
|
33724
|
+
end
|
33725
|
+
|
33726
|
+
end
|
33727
|
+
|
33728
|
+
class GraphqlResponse
|
33729
|
+
|
33730
|
+
attr_reader :data, :errors
|
33731
|
+
|
33732
|
+
def initialize(incoming={})
|
33733
|
+
opts = HttpClient::Helper.symbolize_keys(incoming)
|
33734
|
+
@data = (x = opts.delete(:data); x.nil? ? nil : HttpClient::Preconditions.assert_class('data', HttpClient::Helper.to_object(x), Hash))
|
33735
|
+
@errors = (x = opts.delete(:errors); x.nil? ? nil : HttpClient::Preconditions.assert_class('errors', x, Array).map { |v| HttpClient::Preconditions.assert_class('errors', HttpClient::Helper.to_object(v), Hash) })
|
33736
|
+
end
|
33737
|
+
|
33738
|
+
def to_json
|
33739
|
+
JSON.dump(to_hash)
|
33740
|
+
end
|
33741
|
+
|
33742
|
+
def copy(incoming={})
|
33743
|
+
GraphqlResponse.new(to_hash.merge(HttpClient::Helper.symbolize_keys(incoming)))
|
33744
|
+
end
|
33745
|
+
|
33746
|
+
def to_hash
|
33747
|
+
{
|
33748
|
+
:data => data,
|
33749
|
+
:errors => errors.nil? ? nil : errors
|
33750
|
+
}
|
33751
|
+
end
|
33752
|
+
|
33753
|
+
end
|
33754
|
+
|
32593
33755
|
class HarmonizationDocument < Document
|
32594
33756
|
|
32595
33757
|
attr_reader :code, :categories, :origin
|
@@ -32689,16 +33851,17 @@ module Io
|
|
32689
33851
|
|
32690
33852
|
end
|
32691
33853
|
|
32692
|
-
#
|
32693
|
-
class
|
33854
|
+
# Exports HS10 code overview details
|
33855
|
+
class HarmonizationOverviewExportType < ExportType
|
32694
33856
|
|
32695
|
-
attr_reader :
|
33857
|
+
attr_reader :origin, :destination, :sort
|
32696
33858
|
|
32697
33859
|
def initialize(incoming={})
|
32698
|
-
super(:discriminator => ExportType::Types::
|
33860
|
+
super(:discriminator => ExportType::Types::HARMONIZATION_OVERVIEW_EXPORT_TYPE)
|
32699
33861
|
opts = HttpClient::Helper.symbolize_keys(incoming)
|
32700
|
-
HttpClient::Preconditions.
|
32701
|
-
@
|
33862
|
+
@origin = (x = opts.delete(:origin); x.nil? ? nil : HttpClient::Preconditions.assert_class('origin', x, String))
|
33863
|
+
@destination = (x = opts.delete(:destination); x.nil? ? nil : HttpClient::Preconditions.assert_class('destination', x, String))
|
33864
|
+
@sort = (x = opts.delete(:sort); x.nil? ? nil : HttpClient::Preconditions.assert_class('sort', x, String))
|
32702
33865
|
end
|
32703
33866
|
|
32704
33867
|
def to_json
|
@@ -32706,27 +33869,27 @@ module Io
|
|
32706
33869
|
end
|
32707
33870
|
|
32708
33871
|
def copy(incoming={})
|
32709
|
-
|
33872
|
+
HarmonizationOverviewExportType.new(subtype_to_hash.merge(HttpClient::Helper.symbolize_keys(incoming)))
|
32710
33873
|
end
|
32711
33874
|
|
32712
33875
|
def subtype_to_hash
|
32713
33876
|
{
|
32714
|
-
:
|
33877
|
+
:origin => origin,
|
33878
|
+
:destination => destination,
|
33879
|
+
:sort => sort
|
32715
33880
|
}
|
32716
33881
|
end
|
32717
33882
|
|
32718
33883
|
end
|
32719
33884
|
|
32720
|
-
# Exports
|
32721
|
-
class
|
33885
|
+
# Exports harmonization tariff codes for all destinations
|
33886
|
+
class HarmonizationTariffCodesExportType < ExportType
|
32722
33887
|
|
32723
|
-
attr_reader :
|
33888
|
+
attr_reader :sort
|
32724
33889
|
|
32725
33890
|
def initialize(incoming={})
|
32726
|
-
super(:discriminator => ExportType::Types::
|
33891
|
+
super(:discriminator => ExportType::Types::HARMONIZATION_TARIFF_CODES_EXPORT_TYPE)
|
32727
33892
|
opts = HttpClient::Helper.symbolize_keys(incoming)
|
32728
|
-
@origin = (x = opts.delete(:origin); x.nil? ? nil : HttpClient::Preconditions.assert_class('origin', x, String))
|
32729
|
-
@destination = (x = opts.delete(:destination); x.nil? ? nil : HttpClient::Preconditions.assert_class('destination', x, String))
|
32730
33893
|
@sort = (x = opts.delete(:sort); x.nil? ? nil : HttpClient::Preconditions.assert_class('sort', x, String))
|
32731
33894
|
end
|
32732
33895
|
|
@@ -32735,13 +33898,11 @@ module Io
|
|
32735
33898
|
end
|
32736
33899
|
|
32737
33900
|
def copy(incoming={})
|
32738
|
-
|
33901
|
+
HarmonizationTariffCodesExportType.new(subtype_to_hash.merge(HttpClient::Helper.symbolize_keys(incoming)))
|
32739
33902
|
end
|
32740
33903
|
|
32741
33904
|
def subtype_to_hash
|
32742
33905
|
{
|
32743
|
-
:origin => origin,
|
32744
|
-
:destination => destination,
|
32745
33906
|
:sort => sort
|
32746
33907
|
}
|
32747
33908
|
end
|
@@ -34465,12 +35626,12 @@ module Io
|
|
34465
35626
|
# available
|
34466
35627
|
class InventoryUnlimited < InventoryStrategy
|
34467
35628
|
|
34468
|
-
attr_reader :
|
35629
|
+
attr_reader :placeholder
|
34469
35630
|
|
34470
35631
|
def initialize(incoming={})
|
34471
35632
|
super(:discriminator => InventoryStrategy::Types::INVENTORY_UNLIMITED)
|
34472
35633
|
opts = HttpClient::Helper.symbolize_keys(incoming)
|
34473
|
-
@
|
35634
|
+
@placeholder = HttpClient::Preconditions.assert_class('placeholder', (x = opts.delete(:placeholder); x.nil? ? "unlimited" : x), String)
|
34474
35635
|
end
|
34475
35636
|
|
34476
35637
|
def to_json
|
@@ -34483,7 +35644,7 @@ module Io
|
|
34483
35644
|
|
34484
35645
|
def subtype_to_hash
|
34485
35646
|
{
|
34486
|
-
:
|
35647
|
+
:placeholder => placeholder
|
34487
35648
|
}
|
34488
35649
|
end
|
34489
35650
|
|
@@ -34613,7 +35774,7 @@ module Io
|
|
34613
35774
|
@email = HttpClient::Preconditions.assert_class('email', opts.delete(:email), String)
|
34614
35775
|
@name = (x = opts.delete(:name); x.is_a?(::Io::Flow::V0::Models::Name) ? x : ::Io::Flow::V0::Models::Name.new(x))
|
34615
35776
|
@role = (x = opts.delete(:role); x.nil? ? nil : (x = x; x.is_a?(::Io::Flow::V0::Models::Role) ? x : ::Io::Flow::V0::Models::Role.apply(x)))
|
34616
|
-
@roles = (x = opts.delete(:roles); x.nil? ? nil : HttpClient::Preconditions.assert_class('roles', x, Array).map { |v| (x = v; x.is_a?(::Io::Flow::V0::Models::FlowRole) ? x : ::Io::Flow::V0::Models::FlowRole.
|
35777
|
+
@roles = (x = opts.delete(:roles); x.nil? ? nil : HttpClient::Preconditions.assert_class('roles', x, Array).map { |v| (x = v; x.is_a?(::Io::Flow::V0::Models::FlowRole) ? x : ::Io::Flow::V0::Models::FlowRole.apply(x)) })
|
34617
35778
|
@expiration = HttpClient::Preconditions.assert_class('expiration', HttpClient::Helper.to_date_time_iso8601(opts.delete(:expiration)), DateTime)
|
34618
35779
|
end
|
34619
35780
|
|
@@ -34632,7 +35793,7 @@ module Io
|
|
34632
35793
|
:email => email,
|
34633
35794
|
:name => name.to_hash,
|
34634
35795
|
:role => role.nil? ? nil : role.value,
|
34635
|
-
:roles => roles.nil? ? nil : roles.map { |o| o.
|
35796
|
+
:roles => roles.nil? ? nil : roles.map { |o| o.value },
|
34636
35797
|
:expiration => expiration
|
34637
35798
|
}
|
34638
35799
|
end
|
@@ -34679,7 +35840,7 @@ module Io
|
|
34679
35840
|
@email = HttpClient::Preconditions.assert_class('email', opts.delete(:email), String)
|
34680
35841
|
@name = (x = opts.delete(:name); x.nil? ? nil : (x = x; x.is_a?(::Io::Flow::V0::Models::Name) ? x : ::Io::Flow::V0::Models::Name.new(x)))
|
34681
35842
|
@role = (x = (x = opts.delete(:role); x.nil? ? "member" : x); x.is_a?(::Io::Flow::V0::Models::Role) ? x : ::Io::Flow::V0::Models::Role.apply(x))
|
34682
|
-
@roles = (x = opts.delete(:roles); x.nil? ? nil : HttpClient::Preconditions.assert_class('roles', x, Array).map { |v| (x = v; x.is_a?(::Io::Flow::V0::Models::FlowRole) ? x : ::Io::Flow::V0::Models::FlowRole.
|
35843
|
+
@roles = (x = opts.delete(:roles); x.nil? ? nil : HttpClient::Preconditions.assert_class('roles', x, Array).map { |v| (x = v; x.is_a?(::Io::Flow::V0::Models::FlowRole) ? x : ::Io::Flow::V0::Models::FlowRole.apply(x)) })
|
34683
35844
|
end
|
34684
35845
|
|
34685
35846
|
def to_json
|
@@ -34696,7 +35857,7 @@ module Io
|
|
34696
35857
|
:email => email,
|
34697
35858
|
:name => name.nil? ? nil : name.to_hash,
|
34698
35859
|
:role => role.value,
|
34699
|
-
:roles => roles.nil? ? nil : roles.map { |o| o.
|
35860
|
+
:roles => roles.nil? ? nil : roles.map { |o| o.value }
|
34700
35861
|
}
|
34701
35862
|
end
|
34702
35863
|
|
@@ -36133,11 +37294,12 @@ module Io
|
|
36133
37294
|
# Provides display data for a line item.
|
36134
37295
|
class Line
|
36135
37296
|
|
36136
|
-
attr_reader :item_number, :quantity, :price, :total, :attributes
|
37297
|
+
attr_reader :id, :item_number, :quantity, :price, :total, :attributes
|
36137
37298
|
|
36138
37299
|
def initialize(incoming={})
|
36139
37300
|
opts = HttpClient::Helper.symbolize_keys(incoming)
|
36140
37301
|
HttpClient::Preconditions.require_keys(opts, [:item_number, :quantity, :price, :total], 'Line')
|
37302
|
+
@id = (x = opts.delete(:id); x.nil? ? nil : HttpClient::Preconditions.assert_class('id', x, String))
|
36141
37303
|
@item_number = HttpClient::Preconditions.assert_class('item_number', opts.delete(:item_number), String)
|
36142
37304
|
@quantity = HttpClient::Preconditions.assert_class('quantity', opts.delete(:quantity), Integer)
|
36143
37305
|
@price = (x = opts.delete(:price); x.is_a?(::Io::Flow::V0::Models::PriceWithBase) ? x : ::Io::Flow::V0::Models::PriceWithBase.new(x))
|
@@ -36155,6 +37317,7 @@ module Io
|
|
36155
37317
|
|
36156
37318
|
def to_hash
|
36157
37319
|
{
|
37320
|
+
:id => id,
|
36158
37321
|
:item_number => item_number,
|
36159
37322
|
:quantity => quantity,
|
36160
37323
|
:price => price.to_hash,
|
@@ -36204,6 +37367,32 @@ module Io
|
|
36204
37367
|
|
36205
37368
|
end
|
36206
37369
|
|
37370
|
+
class LineItemAttributesForm
|
37371
|
+
|
37372
|
+
attr_reader :attributes
|
37373
|
+
|
37374
|
+
def initialize(incoming={})
|
37375
|
+
opts = HttpClient::Helper.symbolize_keys(incoming)
|
37376
|
+
HttpClient::Preconditions.require_keys(opts, [:attributes], 'LineItemAttributesForm')
|
37377
|
+
@attributes = HttpClient::Preconditions.assert_class('attributes', opts.delete(:attributes), Hash).inject({}) { |h, d| h[d[0]] = HttpClient::Preconditions.assert_class('attributes', d[1], String); h }
|
37378
|
+
end
|
37379
|
+
|
37380
|
+
def to_json
|
37381
|
+
JSON.dump(to_hash)
|
37382
|
+
end
|
37383
|
+
|
37384
|
+
def copy(incoming={})
|
37385
|
+
LineItemAttributesForm.new(to_hash.merge(HttpClient::Helper.symbolize_keys(incoming)))
|
37386
|
+
end
|
37387
|
+
|
37388
|
+
def to_hash
|
37389
|
+
{
|
37390
|
+
:attributes => attributes
|
37391
|
+
}
|
37392
|
+
end
|
37393
|
+
|
37394
|
+
end
|
37395
|
+
|
36207
37396
|
# Line items represent the items a consumer is purchasing, including additional
|
36208
37397
|
# information to complete the transaction. Note that you may pass in as many
|
36209
37398
|
# line items as you like - including repeating item numbers across line items.
|
@@ -36247,6 +37436,32 @@ module Io
|
|
36247
37436
|
|
36248
37437
|
end
|
36249
37438
|
|
37439
|
+
class LineItemQuantityForm
|
37440
|
+
|
37441
|
+
attr_reader :quantity
|
37442
|
+
|
37443
|
+
def initialize(incoming={})
|
37444
|
+
opts = HttpClient::Helper.symbolize_keys(incoming)
|
37445
|
+
HttpClient::Preconditions.require_keys(opts, [:quantity], 'LineItemQuantityForm')
|
37446
|
+
@quantity = HttpClient::Preconditions.assert_class('quantity', opts.delete(:quantity), Integer)
|
37447
|
+
end
|
37448
|
+
|
37449
|
+
def to_json
|
37450
|
+
JSON.dump(to_hash)
|
37451
|
+
end
|
37452
|
+
|
37453
|
+
def copy(incoming={})
|
37454
|
+
LineItemQuantityForm.new(to_hash.merge(HttpClient::Helper.symbolize_keys(incoming)))
|
37455
|
+
end
|
37456
|
+
|
37457
|
+
def to_hash
|
37458
|
+
{
|
37459
|
+
:quantity => quantity
|
37460
|
+
}
|
37461
|
+
end
|
37462
|
+
|
37463
|
+
end
|
37464
|
+
|
36250
37465
|
class Link
|
36251
37466
|
|
36252
37467
|
attr_reader :url
|
@@ -36760,11 +37975,12 @@ module Io
|
|
36760
37975
|
# Line items on the order, with localized pricing information
|
36761
37976
|
class LocalizedLineItem
|
36762
37977
|
|
36763
|
-
attr_reader :number, :name, :quantity, :center, :price, :discount, :discounts, :attributes, :local, :shipment_estimate, :price_source
|
37978
|
+
attr_reader :id, :number, :name, :quantity, :center, :price, :discount, :discounts, :attributes, :local, :shipment_estimate, :price_source
|
36764
37979
|
|
36765
37980
|
def initialize(incoming={})
|
36766
37981
|
opts = HttpClient::Helper.symbolize_keys(incoming)
|
36767
37982
|
HttpClient::Preconditions.require_keys(opts, [:number, :name, :quantity, :local], 'LocalizedLineItem')
|
37983
|
+
@id = (x = opts.delete(:id); x.nil? ? nil : HttpClient::Preconditions.assert_class('id', x, String))
|
36768
37984
|
@number = HttpClient::Preconditions.assert_class('number', opts.delete(:number), String)
|
36769
37985
|
@name = HttpClient::Preconditions.assert_class('name', opts.delete(:name), String)
|
36770
37986
|
@quantity = HttpClient::Preconditions.assert_class('quantity', opts.delete(:quantity), Integer)
|
@@ -36788,6 +38004,7 @@ module Io
|
|
36788
38004
|
|
36789
38005
|
def to_hash
|
36790
38006
|
{
|
38007
|
+
:id => id,
|
36791
38008
|
:number => number,
|
36792
38009
|
:name => name,
|
36793
38010
|
:quantity => quantity,
|
@@ -37199,7 +38416,7 @@ module Io
|
|
37199
38416
|
@organization = (x = opts.delete(:organization); x.is_a?(::Io::Flow::V0::Models::ExpandableOrganization) ? x : ::Io::Flow::V0::Models::ExpandableOrganization.from_json(x))
|
37200
38417
|
@user = (x = opts.delete(:user); x.is_a?(::Io::Flow::V0::Models::ExpandableUser) ? x : ::Io::Flow::V0::Models::ExpandableUser.from_json(x))
|
37201
38418
|
@role = (x = opts.delete(:role); x.nil? ? nil : (x = x; x.is_a?(::Io::Flow::V0::Models::Role) ? x : ::Io::Flow::V0::Models::Role.apply(x)))
|
37202
|
-
@roles = HttpClient::Preconditions.assert_class('roles', opts.delete(:roles), Array).map { |v| (x = v; x.is_a?(::Io::Flow::V0::Models::FlowRole) ? x : ::Io::Flow::V0::Models::FlowRole.
|
38419
|
+
@roles = HttpClient::Preconditions.assert_class('roles', opts.delete(:roles), Array).map { |v| (x = v; x.is_a?(::Io::Flow::V0::Models::FlowRole) ? x : ::Io::Flow::V0::Models::FlowRole.apply(x)) }
|
37203
38420
|
end
|
37204
38421
|
|
37205
38422
|
def to_json
|
@@ -37216,7 +38433,7 @@ module Io
|
|
37216
38433
|
:organization => organization.to_hash,
|
37217
38434
|
:user => user.to_hash,
|
37218
38435
|
:role => role.nil? ? nil : role.value,
|
37219
|
-
:roles => roles.map { |o| o.
|
38436
|
+
:roles => roles.map { |o| o.value }
|
37220
38437
|
}
|
37221
38438
|
end
|
37222
38439
|
|
@@ -37264,7 +38481,7 @@ module Io
|
|
37264
38481
|
@organization = HttpClient::Preconditions.assert_class('organization', opts.delete(:organization), String)
|
37265
38482
|
@user = HttpClient::Preconditions.assert_class('user', opts.delete(:user), String)
|
37266
38483
|
@role = (x = (x = opts.delete(:role); x.nil? ? "member" : x); x.is_a?(::Io::Flow::V0::Models::Role) ? x : ::Io::Flow::V0::Models::Role.apply(x))
|
37267
|
-
@roles = HttpClient::Preconditions.assert_class('roles', (x = opts.delete(:roles); x.nil? ? [] : x), Array).map { |v| (x = v; x.is_a?(::Io::Flow::V0::Models::FlowRole) ? x : ::Io::Flow::V0::Models::FlowRole.
|
38484
|
+
@roles = HttpClient::Preconditions.assert_class('roles', (x = opts.delete(:roles); x.nil? ? [] : x), Array).map { |v| (x = v; x.is_a?(::Io::Flow::V0::Models::FlowRole) ? x : ::Io::Flow::V0::Models::FlowRole.apply(x)) }
|
37268
38485
|
end
|
37269
38486
|
|
37270
38487
|
def to_json
|
@@ -37280,7 +38497,7 @@ module Io
|
|
37280
38497
|
:organization => organization,
|
37281
38498
|
:user => user,
|
37282
38499
|
:role => role.value,
|
37283
|
-
:roles => roles.map { |o| o.
|
38500
|
+
:roles => roles.map { |o| o.value }
|
37284
38501
|
}
|
37285
38502
|
end
|
37286
38503
|
|
@@ -37294,7 +38511,7 @@ module Io
|
|
37294
38511
|
def initialize(incoming={})
|
37295
38512
|
opts = HttpClient::Helper.symbolize_keys(incoming)
|
37296
38513
|
@role = (x = (x = opts.delete(:role); x.nil? ? "member" : x); x.is_a?(::Io::Flow::V0::Models::Role) ? x : ::Io::Flow::V0::Models::Role.apply(x))
|
37297
|
-
@roles = HttpClient::Preconditions.assert_class('roles', (x = opts.delete(:roles); x.nil? ? [] : x), Array).map { |v| (x = v; x.is_a?(::Io::Flow::V0::Models::FlowRole) ? x : ::Io::Flow::V0::Models::FlowRole.
|
38514
|
+
@roles = HttpClient::Preconditions.assert_class('roles', (x = opts.delete(:roles); x.nil? ? [] : x), Array).map { |v| (x = v; x.is_a?(::Io::Flow::V0::Models::FlowRole) ? x : ::Io::Flow::V0::Models::FlowRole.apply(x)) }
|
37298
38515
|
end
|
37299
38516
|
|
37300
38517
|
def to_json
|
@@ -37308,7 +38525,7 @@ module Io
|
|
37308
38525
|
def to_hash
|
37309
38526
|
{
|
37310
38527
|
:role => role.value,
|
37311
|
-
:roles => roles.map { |o| o.
|
38528
|
+
:roles => roles.map { |o| o.value }
|
37312
38529
|
}
|
37313
38530
|
end
|
37314
38531
|
|
@@ -37578,7 +38795,7 @@ module Io
|
|
37578
38795
|
# you can capture up to the amount of the authorization
|
37579
38796
|
class MerchantOfRecordAuthorizationForm < AuthorizationForm
|
37580
38797
|
|
37581
|
-
attr_reader :token, :order_number, :amount, :currency, :key, :cvv, :attributes, :ip, :options, :redirect_urls, :browser_info
|
38798
|
+
attr_reader :token, :order_number, :amount, :currency, :key, :cvv, :attributes, :ip, :options, :redirect_urls, :browser_info, :action_configuration
|
37582
38799
|
|
37583
38800
|
def initialize(incoming={})
|
37584
38801
|
super(:discriminator => AuthorizationForm::Types::MERCHANT_OF_RECORD_AUTHORIZATION_FORM)
|
@@ -37595,6 +38812,7 @@ module Io
|
|
37595
38812
|
@options = (x = opts.delete(:options); x.nil? ? nil : HttpClient::Preconditions.assert_class('options', x, Array).map { |v| (x = v; x.is_a?(::Io::Flow::V0::Models::AuthorizationOption) ? x : ::Io::Flow::V0::Models::AuthorizationOption.apply(x)) })
|
37596
38813
|
@redirect_urls = (x = opts.delete(:redirect_urls); x.nil? ? nil : (x = x; x.is_a?(::Io::Flow::V0::Models::PostPaymentRedirectUrls) ? x : ::Io::Flow::V0::Models::PostPaymentRedirectUrls.new(x)))
|
37597
38814
|
@browser_info = (x = opts.delete(:browser_info); x.nil? ? nil : (x = x; x.is_a?(::Io::Flow::V0::Models::BrowserInfo) ? x : ::Io::Flow::V0::Models::BrowserInfo.new(x)))
|
38815
|
+
@action_configuration = (x = opts.delete(:action_configuration); x.nil? ? nil : (x = x; x.is_a?(::Io::Flow::V0::Models::ActionConfiguration) ? x : ::Io::Flow::V0::Models::ActionConfiguration.from_json(x)))
|
37598
38816
|
end
|
37599
38817
|
|
37600
38818
|
def to_json
|
@@ -37617,7 +38835,8 @@ module Io
|
|
37617
38835
|
:ip => ip,
|
37618
38836
|
:options => options.nil? ? nil : options.map { |o| o.value },
|
37619
38837
|
:redirect_urls => redirect_urls.nil? ? nil : redirect_urls.to_hash,
|
37620
|
-
:browser_info => browser_info.nil? ? nil : browser_info.to_hash
|
38838
|
+
:browser_info => browser_info.nil? ? nil : browser_info.to_hash,
|
38839
|
+
:action_configuration => action_configuration.nil? ? nil : action_configuration.to_hash
|
37621
38840
|
}
|
37622
38841
|
end
|
37623
38842
|
|
@@ -39387,6 +40606,32 @@ module Io
|
|
39387
40606
|
|
39388
40607
|
end
|
39389
40608
|
|
40609
|
+
class OrderNumberGeneratorGeneratedNumber
|
40610
|
+
|
40611
|
+
attr_reader :number
|
40612
|
+
|
40613
|
+
def initialize(incoming={})
|
40614
|
+
opts = HttpClient::Helper.symbolize_keys(incoming)
|
40615
|
+
HttpClient::Preconditions.require_keys(opts, [:number], 'OrderNumberGeneratorGeneratedNumber')
|
40616
|
+
@number = HttpClient::Preconditions.assert_class('number', opts.delete(:number), String)
|
40617
|
+
end
|
40618
|
+
|
40619
|
+
def to_json
|
40620
|
+
JSON.dump(to_hash)
|
40621
|
+
end
|
40622
|
+
|
40623
|
+
def copy(incoming={})
|
40624
|
+
OrderNumberGeneratorGeneratedNumber.new(to_hash.merge(HttpClient::Helper.symbolize_keys(incoming)))
|
40625
|
+
end
|
40626
|
+
|
40627
|
+
def to_hash
|
40628
|
+
{
|
40629
|
+
:number => number
|
40630
|
+
}
|
40631
|
+
end
|
40632
|
+
|
40633
|
+
end
|
40634
|
+
|
39390
40635
|
# Hexadecimal generator generates a random string, starting with a letter, of a
|
39391
40636
|
# given length
|
39392
40637
|
class OrderNumberGeneratorHexadecimal < OrderNumberGenerator
|
@@ -40079,7 +41324,7 @@ module Io
|
|
40079
41324
|
|
40080
41325
|
end
|
40081
41326
|
|
40082
|
-
# Defines the data needed to attach an
|
41327
|
+
# Defines the data needed to attach an identifier to each order created by a
|
40083
41328
|
# checkout.
|
40084
41329
|
class OrderSubmissionIdentifierForm
|
40085
41330
|
|
@@ -40115,7 +41360,7 @@ module Io
|
|
40115
41360
|
# flattened to keys.
|
40116
41361
|
class OrderSummary
|
40117
41362
|
|
40118
|
-
attr_reader :number, :subtotal, :shipping, :tax, :duty, :insurance, :discount, :surcharges, :adjustment, :total, :lines, :identifiers
|
41363
|
+
attr_reader :number, :subtotal, :shipping, :tax, :duty, :insurance, :discount, :surcharges, :adjustment, :total, :lines, :identifiers, :attributes
|
40119
41364
|
|
40120
41365
|
def initialize(incoming={})
|
40121
41366
|
opts = HttpClient::Helper.symbolize_keys(incoming)
|
@@ -40132,6 +41377,7 @@ module Io
|
|
40132
41377
|
@total = (x = opts.delete(:total); x.is_a?(::Io::Flow::V0::Models::OrderSummaryPriceDetail) ? x : ::Io::Flow::V0::Models::OrderSummaryPriceDetail.new(x))
|
40133
41378
|
@lines = HttpClient::Preconditions.assert_class('lines', opts.delete(:lines), Array).map { |v| (x = v; x.is_a?(::Io::Flow::V0::Models::OrderSummaryLineItem) ? x : ::Io::Flow::V0::Models::OrderSummaryLineItem.new(x)) }
|
40134
41379
|
@identifiers = (x = opts.delete(:identifiers); x.nil? ? nil : HttpClient::Preconditions.assert_class('identifiers', x, Hash).inject({}) { |h, d| h[d[0]] = HttpClient::Preconditions.assert_class('identifiers', d[1], String); h })
|
41380
|
+
@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 })
|
40135
41381
|
end
|
40136
41382
|
|
40137
41383
|
def to_json
|
@@ -40155,7 +41401,8 @@ module Io
|
|
40155
41401
|
:adjustment => adjustment.nil? ? nil : adjustment.to_hash,
|
40156
41402
|
:total => total.to_hash,
|
40157
41403
|
:lines => lines.map { |o| o.to_hash },
|
40158
|
-
:identifiers => identifiers.nil? ? nil : identifiers
|
41404
|
+
:identifiers => identifiers.nil? ? nil : identifiers,
|
41405
|
+
:attributes => attributes.nil? ? nil : attributes
|
40159
41406
|
}
|
40160
41407
|
end
|
40161
41408
|
|
@@ -40263,11 +41510,12 @@ module Io
|
|
40263
41510
|
|
40264
41511
|
class OrderSummaryLineItem
|
40265
41512
|
|
40266
|
-
attr_reader :item, :quantity, :discount, :tax, :duty, :total, :price_attributes
|
41513
|
+
attr_reader :id, :item, :quantity, :discount, :tax, :duty, :total, :price_attributes, :attributes
|
40267
41514
|
|
40268
41515
|
def initialize(incoming={})
|
40269
41516
|
opts = HttpClient::Helper.symbolize_keys(incoming)
|
40270
41517
|
HttpClient::Preconditions.require_keys(opts, [:item, :quantity, :total, :price_attributes], 'OrderSummaryLineItem')
|
41518
|
+
@id = (x = opts.delete(:id); x.nil? ? nil : HttpClient::Preconditions.assert_class('id', x, String))
|
40271
41519
|
@item = (x = opts.delete(:item); x.is_a?(::Io::Flow::V0::Models::OrderSummaryItem) ? x : ::Io::Flow::V0::Models::OrderSummaryItem.new(x))
|
40272
41520
|
@quantity = HttpClient::Preconditions.assert_class('quantity', opts.delete(:quantity), Integer)
|
40273
41521
|
@discount = (x = opts.delete(:discount); x.nil? ? nil : (x = x; x.is_a?(::Io::Flow::V0::Models::Price) ? x : ::Io::Flow::V0::Models::Price.new(x)))
|
@@ -40275,6 +41523,7 @@ module Io
|
|
40275
41523
|
@duty = (x = opts.delete(:duty); x.nil? ? nil : (x = x; x.is_a?(::Io::Flow::V0::Models::OrderSummaryLevy) ? x : ::Io::Flow::V0::Models::OrderSummaryLevy.new(x)))
|
40276
41524
|
@total = (x = opts.delete(:total); x.is_a?(::Io::Flow::V0::Models::Price) ? x : ::Io::Flow::V0::Models::Price.new(x))
|
40277
41525
|
@price_attributes = HttpClient::Preconditions.assert_class('price_attributes', opts.delete(:price_attributes), Hash).inject({}) { |h, d| h[d[0]] = (x = d[1]; x.is_a?(::Io::Flow::V0::Models::Price) ? x : ::Io::Flow::V0::Models::Price.new(x)); h }
|
41526
|
+
@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 })
|
40278
41527
|
end
|
40279
41528
|
|
40280
41529
|
def to_json
|
@@ -40287,13 +41536,15 @@ module Io
|
|
40287
41536
|
|
40288
41537
|
def to_hash
|
40289
41538
|
{
|
41539
|
+
:id => id,
|
40290
41540
|
:item => item.to_hash,
|
40291
41541
|
:quantity => quantity,
|
40292
41542
|
:discount => discount.nil? ? nil : discount.to_hash,
|
40293
41543
|
:tax => tax.nil? ? nil : tax.to_hash,
|
40294
41544
|
:duty => duty.nil? ? nil : duty.to_hash,
|
40295
41545
|
:total => total.to_hash,
|
40296
|
-
:price_attributes => price_attributes.inject({}) { |hash, o| hash[o[0]] = o[1].nil? ? nil : o[1].to_hash; hash }
|
41546
|
+
:price_attributes => price_attributes.inject({}) { |hash, o| hash[o[0]] = o[1].nil? ? nil : o[1].to_hash; hash },
|
41547
|
+
:attributes => attributes.nil? ? nil : attributes
|
40297
41548
|
}
|
40298
41549
|
end
|
40299
41550
|
|
@@ -42016,7 +43267,7 @@ module Io
|
|
42016
43267
|
# metadata required for processing
|
42017
43268
|
class PaymentMethod
|
42018
43269
|
|
42019
|
-
attr_reader :id, :type, :name, :images, :regions
|
43270
|
+
attr_reader :id, :type, :name, :images, :regions, :capabilities
|
42020
43271
|
|
42021
43272
|
def initialize(incoming={})
|
42022
43273
|
opts = HttpClient::Helper.symbolize_keys(incoming)
|
@@ -42026,6 +43277,7 @@ module Io
|
|
42026
43277
|
@name = HttpClient::Preconditions.assert_class('name', opts.delete(:name), String)
|
42027
43278
|
@images = (x = opts.delete(:images); x.is_a?(::Io::Flow::V0::Models::PaymentMethodImages) ? x : ::Io::Flow::V0::Models::PaymentMethodImages.new(x))
|
42028
43279
|
@regions = HttpClient::Preconditions.assert_class('regions', opts.delete(:regions), Array).map { |v| HttpClient::Preconditions.assert_class('regions', v, String) }
|
43280
|
+
@capabilities = (x = opts.delete(:capabilities); x.nil? ? nil : HttpClient::Preconditions.assert_class('capabilities', x, Array).map { |v| (x = v; x.is_a?(::Io::Flow::V0::Models::PaymentMethodCapability) ? x : ::Io::Flow::V0::Models::PaymentMethodCapability.apply(x)) })
|
42029
43281
|
end
|
42030
43282
|
|
42031
43283
|
def to_json
|
@@ -42042,7 +43294,8 @@ module Io
|
|
42042
43294
|
:type => type.value,
|
42043
43295
|
:name => name,
|
42044
43296
|
:images => images.to_hash,
|
42045
|
-
:regions => regions
|
43297
|
+
:regions => regions,
|
43298
|
+
:capabilities => capabilities.nil? ? nil : capabilities.map { |o| o.value }
|
42046
43299
|
}
|
42047
43300
|
end
|
42048
43301
|
|
@@ -42501,7 +43754,7 @@ module Io
|
|
42501
43754
|
HttpClient::Preconditions.require_keys(opts, [:authentication_technique, :roles, :behaviors, :routes], 'PermissionCheck')
|
42502
43755
|
@authentication_technique = (x = opts.delete(:authentication_technique); x.is_a?(::Io::Flow::V0::Models::AuthenticationTechnique) ? x : ::Io::Flow::V0::Models::AuthenticationTechnique.apply(x))
|
42503
43756
|
@user = (x = opts.delete(:user); x.nil? ? nil : (x = x; x.is_a?(::Io::Flow::V0::Models::ExpandableUser) ? x : ::Io::Flow::V0::Models::ExpandableUser.from_json(x)))
|
42504
|
-
@roles = HttpClient::Preconditions.assert_class('roles', opts.delete(:roles), Array).map { |v| (x = v; x.is_a?(::Io::Flow::V0::Models::FlowRole) ? x : ::Io::Flow::V0::Models::FlowRole.
|
43757
|
+
@roles = HttpClient::Preconditions.assert_class('roles', opts.delete(:roles), Array).map { |v| (x = v; x.is_a?(::Io::Flow::V0::Models::FlowRole) ? x : ::Io::Flow::V0::Models::FlowRole.apply(x)) }
|
42505
43758
|
@behaviors = HttpClient::Preconditions.assert_class('behaviors', opts.delete(:behaviors), Array).map { |v| (x = v; x.is_a?(::Io::Flow::V0::Models::FlowBehavior) ? x : ::Io::Flow::V0::Models::FlowBehavior.apply(x)) }
|
42506
43759
|
@routes = HttpClient::Preconditions.assert_class('routes', opts.delete(:routes), Array).map { |v| (x = v; x.is_a?(::Io::Flow::V0::Models::PermittedRoute) ? x : ::Io::Flow::V0::Models::PermittedRoute.new(x)) }
|
42507
43760
|
end
|
@@ -42518,7 +43771,7 @@ module Io
|
|
42518
43771
|
{
|
42519
43772
|
:authentication_technique => authentication_technique.value,
|
42520
43773
|
:user => user.nil? ? nil : user.to_hash,
|
42521
|
-
:roles => roles.map { |o| o.
|
43774
|
+
:roles => roles.map { |o| o.value },
|
42522
43775
|
:behaviors => behaviors.map { |o| o.value },
|
42523
43776
|
:routes => routes.map { |o| o.to_hash }
|
42524
43777
|
}
|
@@ -42536,7 +43789,7 @@ module Io
|
|
42536
43789
|
HttpClient::Preconditions.require_keys(opts, [:code, :messages], 'PermissionError')
|
42537
43790
|
@code = (x = opts.delete(:code); x.is_a?(::Io::Flow::V0::Models::GenericErrorCode) ? x : ::Io::Flow::V0::Models::GenericErrorCode.apply(x))
|
42538
43791
|
@messages = HttpClient::Preconditions.assert_class('messages', opts.delete(:messages), Array).map { |v| HttpClient::Preconditions.assert_class('messages', v, String) }
|
42539
|
-
@granting_roles = (x = opts.delete(:granting_roles); x.nil? ? nil : HttpClient::Preconditions.assert_class('granting_roles', x, Array).map { |v| (x = v; x.is_a?(::Io::Flow::V0::Models::FlowRole) ? x : ::Io::Flow::V0::Models::FlowRole.
|
43792
|
+
@granting_roles = (x = opts.delete(:granting_roles); x.nil? ? nil : HttpClient::Preconditions.assert_class('granting_roles', x, Array).map { |v| (x = v; x.is_a?(::Io::Flow::V0::Models::FlowRole) ? x : ::Io::Flow::V0::Models::FlowRole.apply(x)) })
|
42540
43793
|
@admin_users = (x = opts.delete(:admin_users); x.nil? ? nil : HttpClient::Preconditions.assert_class('admin_users', x, Array).map { |v| (x = v; x.is_a?(::Io::Flow::V0::Models::User) ? x : ::Io::Flow::V0::Models::User.new(x)) })
|
42541
43794
|
end
|
42542
43795
|
|
@@ -42552,7 +43805,7 @@ module Io
|
|
42552
43805
|
{
|
42553
43806
|
:code => code.value,
|
42554
43807
|
:messages => messages,
|
42555
|
-
:granting_roles => granting_roles.nil? ? nil : granting_roles.map { |o| o.
|
43808
|
+
:granting_roles => granting_roles.nil? ? nil : granting_roles.map { |o| o.value },
|
42556
43809
|
:admin_users => admin_users.nil? ? nil : admin_users.map { |o| o.to_hash }
|
42557
43810
|
}
|
42558
43811
|
end
|
@@ -42674,7 +43927,7 @@ module Io
|
|
42674
43927
|
# collection of items, and metadata about those options
|
42675
43928
|
class PhysicalDelivery < Delivery
|
42676
43929
|
|
42677
|
-
attr_reader :id, :key, :center, :items, :options, :special_services, :prices, :total, :goods_supply
|
43930
|
+
attr_reader :id, :key, :center, :items, :options, :special_services, :prices, :total, :goods_supply, :merchant_of_record_flow_entity
|
42678
43931
|
|
42679
43932
|
def initialize(incoming={})
|
42680
43933
|
super(:discriminator => Delivery::Types::PHYSICAL_DELIVERY)
|
@@ -42689,6 +43942,7 @@ module Io
|
|
42689
43942
|
@prices = (x = opts.delete(:prices); x.nil? ? nil : HttpClient::Preconditions.assert_class('prices', x, Array).map { |v| (x = v; x.is_a?(::Io::Flow::V0::Models::OrderPriceDetail) ? x : ::Io::Flow::V0::Models::OrderPriceDetail.new(x)) })
|
42690
43943
|
@total = (x = opts.delete(:total); x.nil? ? nil : (x = x; x.is_a?(::Io::Flow::V0::Models::LocalizedTotal) ? x : ::Io::Flow::V0::Models::LocalizedTotal.new(x)))
|
42691
43944
|
@goods_supply = (x = opts.delete(:goods_supply); x.nil? ? nil : (x = x; x.is_a?(::Io::Flow::V0::Models::GoodsSupply) ? x : ::Io::Flow::V0::Models::GoodsSupply.apply(x)))
|
43945
|
+
@merchant_of_record_flow_entity = (x = opts.delete(:merchant_of_record_flow_entity); x.nil? ? nil : (x = x; x.is_a?(::Io::Flow::V0::Models::FlowEntity) ? x : ::Io::Flow::V0::Models::FlowEntity.apply(x)))
|
42692
43946
|
end
|
42693
43947
|
|
42694
43948
|
def to_json
|
@@ -42709,7 +43963,8 @@ module Io
|
|
42709
43963
|
:special_services => special_services.nil? ? nil : special_services.map { |o| o.value },
|
42710
43964
|
:prices => prices.nil? ? nil : prices.map { |o| o.to_hash },
|
42711
43965
|
:total => total.nil? ? nil : total.to_hash,
|
42712
|
-
:goods_supply => goods_supply.nil? ? nil : goods_supply.value
|
43966
|
+
:goods_supply => goods_supply.nil? ? nil : goods_supply.value,
|
43967
|
+
:merchant_of_record_flow_entity => merchant_of_record_flow_entity.nil? ? nil : merchant_of_record_flow_entity.value
|
42713
43968
|
}
|
42714
43969
|
end
|
42715
43970
|
|
@@ -42957,7 +44212,7 @@ module Io
|
|
42957
44212
|
# export
|
42958
44213
|
class PriceBookItemExportType < ExportType
|
42959
44214
|
|
42960
|
-
attr_reader :price_book_key, :item_numbers, :start_date, :end_date
|
44215
|
+
attr_reader :price_book_key, :item_numbers, :start_date, :end_date, :item_identifier
|
42961
44216
|
|
42962
44217
|
def initialize(incoming={})
|
42963
44218
|
super(:discriminator => ExportType::Types::PRICE_BOOK_ITEM_EXPORT_TYPE)
|
@@ -42966,6 +44221,7 @@ module Io
|
|
42966
44221
|
@item_numbers = (x = opts.delete(:item_numbers); x.nil? ? nil : HttpClient::Preconditions.assert_class('item_numbers', x, Array).map { |v| HttpClient::Preconditions.assert_class('item_numbers', v, String) })
|
42967
44222
|
@start_date = (x = opts.delete(:start_date); x.nil? ? nil : HttpClient::Preconditions.assert_class('start_date', HttpClient::Helper.to_date_time_iso8601(x), DateTime))
|
42968
44223
|
@end_date = (x = opts.delete(:end_date); x.nil? ? nil : HttpClient::Preconditions.assert_class('end_date', HttpClient::Helper.to_date_time_iso8601(x), DateTime))
|
44224
|
+
@item_identifier = (x = (x = opts.delete(:item_identifier); x.nil? ? "item_number" : x); x.is_a?(::Io::Flow::V0::Models::ItemIdentifier) ? x : ::Io::Flow::V0::Models::ItemIdentifier.apply(x))
|
42969
44225
|
end
|
42970
44226
|
|
42971
44227
|
def to_json
|
@@ -42981,7 +44237,8 @@ module Io
|
|
42981
44237
|
:price_book_key => price_book_key,
|
42982
44238
|
:item_numbers => item_numbers.nil? ? nil : item_numbers,
|
42983
44239
|
:start_date => start_date,
|
42984
|
-
:end_date => end_date
|
44240
|
+
:end_date => end_date,
|
44241
|
+
:item_identifier => item_identifier.value
|
42985
44242
|
}
|
42986
44243
|
end
|
42987
44244
|
|
@@ -44933,7 +46190,7 @@ module Io
|
|
44933
46190
|
opts = HttpClient::Helper.symbolize_keys(incoming)
|
44934
46191
|
HttpClient::Preconditions.require_keys(opts, [:id, :ratecard, :currency, :delivered_duty, :shipment_window, :destination, :dim_factor, :fees, :origin, :service, :rates, :rounding, :weight_unit, :distance_unit], 'RatecardLane')
|
44935
46192
|
@id = HttpClient::Preconditions.assert_class('id', opts.delete(:id), String)
|
44936
|
-
@ratecard = (x = opts.delete(:ratecard); x.is_a?(::Io::Flow::V0::Models::
|
46193
|
+
@ratecard = (x = opts.delete(:ratecard); x.is_a?(::Io::Flow::V0::Models::RatecardSummary) ? x : ::Io::Flow::V0::Models::RatecardSummary.new(x))
|
44937
46194
|
@currency = HttpClient::Preconditions.assert_class('currency', opts.delete(:currency), String)
|
44938
46195
|
@delivered_duty = (x = opts.delete(:delivered_duty); x.is_a?(::Io::Flow::V0::Models::DeliveredDuty) ? x : ::Io::Flow::V0::Models::DeliveredDuty.apply(x))
|
44939
46196
|
@shipment_window = (x = opts.delete(:shipment_window); x.is_a?(::Io::Flow::V0::Models::ShipmentWindow) ? x : ::Io::Flow::V0::Models::ShipmentWindow.new(x))
|
@@ -45376,6 +46633,36 @@ module Io
|
|
45376
46633
|
|
45377
46634
|
end
|
45378
46635
|
|
46636
|
+
class RatecardSummary
|
46637
|
+
|
46638
|
+
attr_reader :id, :number, :ratecard_owner
|
46639
|
+
|
46640
|
+
def initialize(incoming={})
|
46641
|
+
opts = HttpClient::Helper.symbolize_keys(incoming)
|
46642
|
+
HttpClient::Preconditions.require_keys(opts, [:id, :number, :ratecard_owner], 'RatecardSummary')
|
46643
|
+
@id = HttpClient::Preconditions.assert_class('id', opts.delete(:id), String)
|
46644
|
+
@number = HttpClient::Preconditions.assert_class('number', opts.delete(:number), String)
|
46645
|
+
@ratecard_owner = (x = opts.delete(:ratecard_owner); x.is_a?(::Io::Flow::V0::Models::RatecardOwner) ? x : ::Io::Flow::V0::Models::RatecardOwner.apply(x))
|
46646
|
+
end
|
46647
|
+
|
46648
|
+
def to_json
|
46649
|
+
JSON.dump(to_hash)
|
46650
|
+
end
|
46651
|
+
|
46652
|
+
def copy(incoming={})
|
46653
|
+
RatecardSummary.new(to_hash.merge(HttpClient::Helper.symbolize_keys(incoming)))
|
46654
|
+
end
|
46655
|
+
|
46656
|
+
def to_hash
|
46657
|
+
{
|
46658
|
+
:id => id,
|
46659
|
+
:number => number,
|
46660
|
+
:ratecard_owner => ratecard_owner.value
|
46661
|
+
}
|
46662
|
+
end
|
46663
|
+
|
46664
|
+
end
|
46665
|
+
|
45379
46666
|
class RatecardUpserted < Event
|
45380
46667
|
|
45381
46668
|
attr_reader :event_id, :timestamp, :organization, :ratecard
|
@@ -47201,7 +48488,7 @@ module Io
|
|
47201
48488
|
@method = (x = opts.delete(:method); x.is_a?(::Io::Flow::V0::Models::PermittedHttpMethod) ? x : ::Io::Flow::V0::Models::PermittedHttpMethod.apply(x))
|
47202
48489
|
@path = HttpClient::Preconditions.assert_class('path', opts.delete(:path), String)
|
47203
48490
|
@authentication_techniques = HttpClient::Preconditions.assert_class('authentication_techniques', opts.delete(:authentication_techniques), Array).map { |v| (x = v; x.is_a?(::Io::Flow::V0::Models::AuthenticationTechnique) ? x : ::Io::Flow::V0::Models::AuthenticationTechnique.apply(x)) }
|
47204
|
-
@roles = HttpClient::Preconditions.assert_class('roles', opts.delete(:roles), Array).map { |v| (x = v; x.is_a?(::Io::Flow::V0::Models::FlowRole) ? x : ::Io::Flow::V0::Models::FlowRole.
|
48491
|
+
@roles = HttpClient::Preconditions.assert_class('roles', opts.delete(:roles), Array).map { |v| (x = v; x.is_a?(::Io::Flow::V0::Models::FlowRole) ? x : ::Io::Flow::V0::Models::FlowRole.apply(x)) }
|
47205
48492
|
end
|
47206
48493
|
|
47207
48494
|
def to_json
|
@@ -47217,7 +48504,7 @@ module Io
|
|
47217
48504
|
:method => method.value,
|
47218
48505
|
:path => path,
|
47219
48506
|
:authentication_techniques => authentication_techniques.map { |o| o.value },
|
47220
|
-
:roles => roles.map { |o| o.
|
48507
|
+
:roles => roles.map { |o| o.value }
|
47221
48508
|
}
|
47222
48509
|
end
|
47223
48510
|
|
@@ -47517,6 +48804,35 @@ module Io
|
|
47517
48804
|
|
47518
48805
|
end
|
47519
48806
|
|
48807
|
+
# Experiment for A/B testing
|
48808
|
+
class SessionContextExperiment
|
48809
|
+
|
48810
|
+
attr_reader :key, :variant
|
48811
|
+
|
48812
|
+
def initialize(incoming={})
|
48813
|
+
opts = HttpClient::Helper.symbolize_keys(incoming)
|
48814
|
+
HttpClient::Preconditions.require_keys(opts, [:key], 'SessionContextExperiment')
|
48815
|
+
@key = HttpClient::Preconditions.assert_class('key', opts.delete(:key), String)
|
48816
|
+
@variant = (x = opts.delete(:variant); x.nil? ? nil : (x = x; x.is_a?(::Io::Flow::V0::Models::ExperimentVariant) ? x : ::Io::Flow::V0::Models::ExperimentVariant.new(x)))
|
48817
|
+
end
|
48818
|
+
|
48819
|
+
def to_json
|
48820
|
+
JSON.dump(to_hash)
|
48821
|
+
end
|
48822
|
+
|
48823
|
+
def copy(incoming={})
|
48824
|
+
SessionContextExperiment.new(to_hash.merge(HttpClient::Helper.symbolize_keys(incoming)))
|
48825
|
+
end
|
48826
|
+
|
48827
|
+
def to_hash
|
48828
|
+
{
|
48829
|
+
:key => key,
|
48830
|
+
:variant => variant.nil? ? nil : variant.to_hash
|
48831
|
+
}
|
48832
|
+
end
|
48833
|
+
|
48834
|
+
end
|
48835
|
+
|
47520
48836
|
class SessionCurrencyFormat
|
47521
48837
|
|
47522
48838
|
attr_reader :symbol, :label_formatters
|
@@ -49170,7 +50486,7 @@ module Io
|
|
49170
50486
|
def initialize(incoming={})
|
49171
50487
|
opts = HttpClient::Helper.symbolize_keys(incoming)
|
49172
50488
|
HttpClient::Preconditions.require_keys(opts, [:cart], 'ShopifyCartConversionShopifyCart')
|
49173
|
-
@cart = (x = opts.delete(:cart); x.is_a?(::Io::Flow::Shopify::External::V0::Models::
|
50489
|
+
@cart = (x = opts.delete(:cart); x.is_a?(::Io::Flow::Shopify::External::V0::Models::ShopifyExternalCart) ? x : ::Io::Flow::Shopify::External::V0::Models::ShopifyExternalCart.new(x))
|
49174
50490
|
end
|
49175
50491
|
|
49176
50492
|
def to_json
|
@@ -50881,10 +52197,11 @@ module Io
|
|
50881
52197
|
end
|
50882
52198
|
|
50883
52199
|
# Minimal form to create a shipping label. Origin and destination are assumed
|
50884
|
-
# based on a given order's center and final shipping destination
|
52200
|
+
# based on a given order's center and final shipping destination, if no center
|
52201
|
+
# key is provided
|
50885
52202
|
class SummaryShippingLabelForm < ShippingLabelForm
|
50886
52203
|
|
50887
|
-
attr_reader :order_number, :items
|
52204
|
+
attr_reader :order_number, :items, :center_key
|
50888
52205
|
|
50889
52206
|
def initialize(incoming={})
|
50890
52207
|
super(:discriminator => ShippingLabelForm::Types::SUMMARY_SHIPPING_LABEL_FORM)
|
@@ -50892,6 +52209,7 @@ module Io
|
|
50892
52209
|
HttpClient::Preconditions.require_keys(opts, [:order_number, :items], 'SummaryShippingLabelForm')
|
50893
52210
|
@order_number = HttpClient::Preconditions.assert_class('order_number', opts.delete(:order_number), String)
|
50894
52211
|
@items = HttpClient::Preconditions.assert_class('items', opts.delete(:items), Array).map { |v| (x = v; x.is_a?(::Io::Flow::V0::Models::LineItemForm) ? x : ::Io::Flow::V0::Models::LineItemForm.new(x)) }
|
52212
|
+
@center_key = (x = opts.delete(:center_key); x.nil? ? nil : HttpClient::Preconditions.assert_class('center_key', x, String))
|
50895
52213
|
end
|
50896
52214
|
|
50897
52215
|
def to_json
|
@@ -50905,7 +52223,8 @@ module Io
|
|
50905
52223
|
def subtype_to_hash
|
50906
52224
|
{
|
50907
52225
|
:order_number => order_number,
|
50908
|
-
:items => items.map { |o| o.to_hash }
|
52226
|
+
:items => items.map { |o| o.to_hash },
|
52227
|
+
:center_key => center_key
|
50909
52228
|
}
|
50910
52229
|
end
|
50911
52230
|
|
@@ -51001,6 +52320,352 @@ module Io
|
|
51001
52320
|
|
51002
52321
|
end
|
51003
52322
|
|
52323
|
+
# Represents a duration of time with the ability to convert to a scala
|
52324
|
+
# FiniteDuration.
|
52325
|
+
class SyncDuration
|
52326
|
+
|
52327
|
+
attr_reader :unit, :value
|
52328
|
+
|
52329
|
+
def initialize(incoming={})
|
52330
|
+
opts = HttpClient::Helper.symbolize_keys(incoming)
|
52331
|
+
HttpClient::Preconditions.require_keys(opts, [:unit, :value], 'SyncDuration')
|
52332
|
+
@unit = (x = opts.delete(:unit); x.is_a?(::Io::Flow::V0::Models::SyncUnitOfTime) ? x : ::Io::Flow::V0::Models::SyncUnitOfTime.apply(x))
|
52333
|
+
@value = HttpClient::Preconditions.assert_class('value', opts.delete(:value), Integer)
|
52334
|
+
end
|
52335
|
+
|
52336
|
+
def to_json
|
52337
|
+
JSON.dump(to_hash)
|
52338
|
+
end
|
52339
|
+
|
52340
|
+
def copy(incoming={})
|
52341
|
+
SyncDuration.new(to_hash.merge(HttpClient::Helper.symbolize_keys(incoming)))
|
52342
|
+
end
|
52343
|
+
|
52344
|
+
def to_hash
|
52345
|
+
{
|
52346
|
+
:unit => unit.value,
|
52347
|
+
:value => value
|
52348
|
+
}
|
52349
|
+
end
|
52350
|
+
|
52351
|
+
end
|
52352
|
+
|
52353
|
+
class SyncPendingRecord
|
52354
|
+
|
52355
|
+
attr_reader :id, :stream, :value, :system
|
52356
|
+
|
52357
|
+
def initialize(incoming={})
|
52358
|
+
opts = HttpClient::Helper.symbolize_keys(incoming)
|
52359
|
+
HttpClient::Preconditions.require_keys(opts, [:id, :stream, :value, :system], 'SyncPendingRecord')
|
52360
|
+
@id = HttpClient::Preconditions.assert_class('id', opts.delete(:id), String)
|
52361
|
+
@stream = (x = opts.delete(:stream); x.is_a?(::Io::Flow::V0::Models::SyncStreamReference) ? x : ::Io::Flow::V0::Models::SyncStreamReference.new(x))
|
52362
|
+
@value = HttpClient::Preconditions.assert_class('value', opts.delete(:value), String)
|
52363
|
+
@system = HttpClient::Preconditions.assert_class('system', opts.delete(:system), String)
|
52364
|
+
end
|
52365
|
+
|
52366
|
+
def to_json
|
52367
|
+
JSON.dump(to_hash)
|
52368
|
+
end
|
52369
|
+
|
52370
|
+
def copy(incoming={})
|
52371
|
+
SyncPendingRecord.new(to_hash.merge(HttpClient::Helper.symbolize_keys(incoming)))
|
52372
|
+
end
|
52373
|
+
|
52374
|
+
def to_hash
|
52375
|
+
{
|
52376
|
+
:id => id,
|
52377
|
+
:stream => stream.to_hash,
|
52378
|
+
:value => value,
|
52379
|
+
:system => system
|
52380
|
+
}
|
52381
|
+
end
|
52382
|
+
|
52383
|
+
end
|
52384
|
+
|
52385
|
+
class SyncRecord
|
52386
|
+
|
52387
|
+
attr_reader :id, :system, :value, :stream
|
52388
|
+
|
52389
|
+
def initialize(incoming={})
|
52390
|
+
opts = HttpClient::Helper.symbolize_keys(incoming)
|
52391
|
+
HttpClient::Preconditions.require_keys(opts, [:id, :system, :value, :stream], 'SyncRecord')
|
52392
|
+
@id = HttpClient::Preconditions.assert_class('id', opts.delete(:id), String)
|
52393
|
+
@system = HttpClient::Preconditions.assert_class('system', opts.delete(:system), String)
|
52394
|
+
@value = HttpClient::Preconditions.assert_class('value', opts.delete(:value), String)
|
52395
|
+
@stream = (x = opts.delete(:stream); x.is_a?(::Io::Flow::V0::Models::SyncStreamReference) ? x : ::Io::Flow::V0::Models::SyncStreamReference.new(x))
|
52396
|
+
end
|
52397
|
+
|
52398
|
+
def to_json
|
52399
|
+
JSON.dump(to_hash)
|
52400
|
+
end
|
52401
|
+
|
52402
|
+
def copy(incoming={})
|
52403
|
+
SyncRecord.new(to_hash.merge(HttpClient::Helper.symbolize_keys(incoming)))
|
52404
|
+
end
|
52405
|
+
|
52406
|
+
def to_hash
|
52407
|
+
{
|
52408
|
+
:id => id,
|
52409
|
+
:system => system,
|
52410
|
+
:value => value,
|
52411
|
+
:stream => stream.to_hash
|
52412
|
+
}
|
52413
|
+
end
|
52414
|
+
|
52415
|
+
end
|
52416
|
+
|
52417
|
+
class SyncRecordFailure
|
52418
|
+
|
52419
|
+
attr_reader :id, :stream, :value, :system, :reason, :attributes
|
52420
|
+
|
52421
|
+
def initialize(incoming={})
|
52422
|
+
opts = HttpClient::Helper.symbolize_keys(incoming)
|
52423
|
+
HttpClient::Preconditions.require_keys(opts, [:id, :stream, :value, :system, :reason], 'SyncRecordFailure')
|
52424
|
+
@id = HttpClient::Preconditions.assert_class('id', opts.delete(:id), String)
|
52425
|
+
@stream = (x = opts.delete(:stream); x.is_a?(::Io::Flow::V0::Models::SyncStreamReference) ? x : ::Io::Flow::V0::Models::SyncStreamReference.new(x))
|
52426
|
+
@value = HttpClient::Preconditions.assert_class('value', opts.delete(:value), String)
|
52427
|
+
@system = HttpClient::Preconditions.assert_class('system', opts.delete(:system), String)
|
52428
|
+
@reason = (x = opts.delete(:reason); x.is_a?(::Io::Flow::V0::Models::SyncRecordFailureReason) ? x : ::Io::Flow::V0::Models::SyncRecordFailureReason.apply(x))
|
52429
|
+
@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 })
|
52430
|
+
end
|
52431
|
+
|
52432
|
+
def to_json
|
52433
|
+
JSON.dump(to_hash)
|
52434
|
+
end
|
52435
|
+
|
52436
|
+
def copy(incoming={})
|
52437
|
+
SyncRecordFailure.new(to_hash.merge(HttpClient::Helper.symbolize_keys(incoming)))
|
52438
|
+
end
|
52439
|
+
|
52440
|
+
def to_hash
|
52441
|
+
{
|
52442
|
+
:id => id,
|
52443
|
+
:stream => stream.to_hash,
|
52444
|
+
:value => value,
|
52445
|
+
:system => system,
|
52446
|
+
:reason => reason.value,
|
52447
|
+
:attributes => attributes.nil? ? nil : attributes
|
52448
|
+
}
|
52449
|
+
end
|
52450
|
+
|
52451
|
+
end
|
52452
|
+
|
52453
|
+
class SyncRecordFailureForm
|
52454
|
+
|
52455
|
+
attr_reader :stream_key, :value, :system, :reason, :attributes
|
52456
|
+
|
52457
|
+
def initialize(incoming={})
|
52458
|
+
opts = HttpClient::Helper.symbolize_keys(incoming)
|
52459
|
+
HttpClient::Preconditions.require_keys(opts, [:stream_key, :value, :system, :reason], 'SyncRecordFailureForm')
|
52460
|
+
@stream_key = HttpClient::Preconditions.assert_class('stream_key', opts.delete(:stream_key), String)
|
52461
|
+
@value = HttpClient::Preconditions.assert_class('value', opts.delete(:value), String)
|
52462
|
+
@system = HttpClient::Preconditions.assert_class('system', opts.delete(:system), String)
|
52463
|
+
@reason = (x = opts.delete(:reason); x.is_a?(::Io::Flow::V0::Models::SyncRecordFailureReason) ? x : ::Io::Flow::V0::Models::SyncRecordFailureReason.apply(x))
|
52464
|
+
@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 })
|
52465
|
+
end
|
52466
|
+
|
52467
|
+
def to_json
|
52468
|
+
JSON.dump(to_hash)
|
52469
|
+
end
|
52470
|
+
|
52471
|
+
def copy(incoming={})
|
52472
|
+
SyncRecordFailureForm.new(to_hash.merge(HttpClient::Helper.symbolize_keys(incoming)))
|
52473
|
+
end
|
52474
|
+
|
52475
|
+
def to_hash
|
52476
|
+
{
|
52477
|
+
:stream_key => stream_key,
|
52478
|
+
:value => value,
|
52479
|
+
:system => system,
|
52480
|
+
:reason => reason.value,
|
52481
|
+
:attributes => attributes.nil? ? nil : attributes
|
52482
|
+
}
|
52483
|
+
end
|
52484
|
+
|
52485
|
+
end
|
52486
|
+
|
52487
|
+
class SyncRecordForm
|
52488
|
+
|
52489
|
+
attr_reader :stream_key, :system, :value
|
52490
|
+
|
52491
|
+
def initialize(incoming={})
|
52492
|
+
opts = HttpClient::Helper.symbolize_keys(incoming)
|
52493
|
+
HttpClient::Preconditions.require_keys(opts, [:stream_key, :system, :value], 'SyncRecordForm')
|
52494
|
+
@stream_key = HttpClient::Preconditions.assert_class('stream_key', opts.delete(:stream_key), String)
|
52495
|
+
@system = HttpClient::Preconditions.assert_class('system', opts.delete(:system), String)
|
52496
|
+
@value = HttpClient::Preconditions.assert_class('value', opts.delete(:value), String)
|
52497
|
+
end
|
52498
|
+
|
52499
|
+
def to_json
|
52500
|
+
JSON.dump(to_hash)
|
52501
|
+
end
|
52502
|
+
|
52503
|
+
def copy(incoming={})
|
52504
|
+
SyncRecordForm.new(to_hash.merge(HttpClient::Helper.symbolize_keys(incoming)))
|
52505
|
+
end
|
52506
|
+
|
52507
|
+
def to_hash
|
52508
|
+
{
|
52509
|
+
:stream_key => stream_key,
|
52510
|
+
:system => system,
|
52511
|
+
:value => value
|
52512
|
+
}
|
52513
|
+
end
|
52514
|
+
|
52515
|
+
end
|
52516
|
+
|
52517
|
+
class SyncStream
|
52518
|
+
|
52519
|
+
attr_reader :id, :key, :type, :systems, :settings
|
52520
|
+
|
52521
|
+
def initialize(incoming={})
|
52522
|
+
opts = HttpClient::Helper.symbolize_keys(incoming)
|
52523
|
+
HttpClient::Preconditions.require_keys(opts, [:id, :key, :type, :systems, :settings], 'SyncStream')
|
52524
|
+
@id = HttpClient::Preconditions.assert_class('id', opts.delete(:id), String)
|
52525
|
+
@key = HttpClient::Preconditions.assert_class('key', opts.delete(:key), String)
|
52526
|
+
@type = (x = opts.delete(:type); x.is_a?(::Io::Flow::V0::Models::SyncStreamType) ? x : ::Io::Flow::V0::Models::SyncStreamType.apply(x))
|
52527
|
+
@systems = HttpClient::Preconditions.assert_class('systems', opts.delete(:systems), Array).map { |v| HttpClient::Preconditions.assert_class('systems', v, String) }
|
52528
|
+
@settings = (x = opts.delete(:settings); x.is_a?(::Io::Flow::V0::Models::SyncStreamSettings) ? x : ::Io::Flow::V0::Models::SyncStreamSettings.new(x))
|
52529
|
+
end
|
52530
|
+
|
52531
|
+
def to_json
|
52532
|
+
JSON.dump(to_hash)
|
52533
|
+
end
|
52534
|
+
|
52535
|
+
def copy(incoming={})
|
52536
|
+
SyncStream.new(to_hash.merge(HttpClient::Helper.symbolize_keys(incoming)))
|
52537
|
+
end
|
52538
|
+
|
52539
|
+
def to_hash
|
52540
|
+
{
|
52541
|
+
:id => id,
|
52542
|
+
:key => key,
|
52543
|
+
:type => type.value,
|
52544
|
+
:systems => systems,
|
52545
|
+
:settings => settings.to_hash
|
52546
|
+
}
|
52547
|
+
end
|
52548
|
+
|
52549
|
+
end
|
52550
|
+
|
52551
|
+
class SyncStreamForm
|
52552
|
+
|
52553
|
+
attr_reader :type, :systems, :settings
|
52554
|
+
|
52555
|
+
def initialize(incoming={})
|
52556
|
+
opts = HttpClient::Helper.symbolize_keys(incoming)
|
52557
|
+
HttpClient::Preconditions.require_keys(opts, [:type, :systems], 'SyncStreamForm')
|
52558
|
+
@type = (x = opts.delete(:type); x.is_a?(::Io::Flow::V0::Models::SyncStreamType) ? x : ::Io::Flow::V0::Models::SyncStreamType.apply(x))
|
52559
|
+
@systems = HttpClient::Preconditions.assert_class('systems', opts.delete(:systems), Array).map { |v| HttpClient::Preconditions.assert_class('systems', v, String) }
|
52560
|
+
@settings = (x = opts.delete(:settings); x.nil? ? nil : (x = x; x.is_a?(::Io::Flow::V0::Models::SyncStreamSettingsForm) ? x : ::Io::Flow::V0::Models::SyncStreamSettingsForm.new(x)))
|
52561
|
+
end
|
52562
|
+
|
52563
|
+
def to_json
|
52564
|
+
JSON.dump(to_hash)
|
52565
|
+
end
|
52566
|
+
|
52567
|
+
def copy(incoming={})
|
52568
|
+
SyncStreamForm.new(to_hash.merge(HttpClient::Helper.symbolize_keys(incoming)))
|
52569
|
+
end
|
52570
|
+
|
52571
|
+
def to_hash
|
52572
|
+
{
|
52573
|
+
:type => type.value,
|
52574
|
+
:systems => systems,
|
52575
|
+
:settings => settings.nil? ? nil : settings.to_hash
|
52576
|
+
}
|
52577
|
+
end
|
52578
|
+
|
52579
|
+
end
|
52580
|
+
|
52581
|
+
class SyncStreamReference
|
52582
|
+
|
52583
|
+
attr_reader :id, :key
|
52584
|
+
|
52585
|
+
def initialize(incoming={})
|
52586
|
+
opts = HttpClient::Helper.symbolize_keys(incoming)
|
52587
|
+
HttpClient::Preconditions.require_keys(opts, [:id, :key], 'SyncStreamReference')
|
52588
|
+
@id = HttpClient::Preconditions.assert_class('id', opts.delete(:id), String)
|
52589
|
+
@key = HttpClient::Preconditions.assert_class('key', opts.delete(:key), String)
|
52590
|
+
end
|
52591
|
+
|
52592
|
+
def to_json
|
52593
|
+
JSON.dump(to_hash)
|
52594
|
+
end
|
52595
|
+
|
52596
|
+
def copy(incoming={})
|
52597
|
+
SyncStreamReference.new(to_hash.merge(HttpClient::Helper.symbolize_keys(incoming)))
|
52598
|
+
end
|
52599
|
+
|
52600
|
+
def to_hash
|
52601
|
+
{
|
52602
|
+
:id => id,
|
52603
|
+
:key => key
|
52604
|
+
}
|
52605
|
+
end
|
52606
|
+
|
52607
|
+
end
|
52608
|
+
|
52609
|
+
class SyncStreamSettings
|
52610
|
+
|
52611
|
+
attr_reader :pending_record_after, :warn_after, :error_after
|
52612
|
+
|
52613
|
+
def initialize(incoming={})
|
52614
|
+
opts = HttpClient::Helper.symbolize_keys(incoming)
|
52615
|
+
HttpClient::Preconditions.require_keys(opts, [:pending_record_after, :warn_after, :error_after], 'SyncStreamSettings')
|
52616
|
+
@pending_record_after = (x = opts.delete(:pending_record_after); x.is_a?(::Io::Flow::V0::Models::SyncDuration) ? x : ::Io::Flow::V0::Models::SyncDuration.new(x))
|
52617
|
+
@warn_after = (x = opts.delete(:warn_after); x.is_a?(::Io::Flow::V0::Models::SyncDuration) ? x : ::Io::Flow::V0::Models::SyncDuration.new(x))
|
52618
|
+
@error_after = (x = opts.delete(:error_after); x.is_a?(::Io::Flow::V0::Models::SyncDuration) ? x : ::Io::Flow::V0::Models::SyncDuration.new(x))
|
52619
|
+
end
|
52620
|
+
|
52621
|
+
def to_json
|
52622
|
+
JSON.dump(to_hash)
|
52623
|
+
end
|
52624
|
+
|
52625
|
+
def copy(incoming={})
|
52626
|
+
SyncStreamSettings.new(to_hash.merge(HttpClient::Helper.symbolize_keys(incoming)))
|
52627
|
+
end
|
52628
|
+
|
52629
|
+
def to_hash
|
52630
|
+
{
|
52631
|
+
:pending_record_after => pending_record_after.to_hash,
|
52632
|
+
:warn_after => warn_after.to_hash,
|
52633
|
+
:error_after => error_after.to_hash
|
52634
|
+
}
|
52635
|
+
end
|
52636
|
+
|
52637
|
+
end
|
52638
|
+
|
52639
|
+
class SyncStreamSettingsForm
|
52640
|
+
|
52641
|
+
attr_reader :pending_record_after, :warn_after, :error_after
|
52642
|
+
|
52643
|
+
def initialize(incoming={})
|
52644
|
+
opts = HttpClient::Helper.symbolize_keys(incoming)
|
52645
|
+
HttpClient::Preconditions.require_keys(opts, [:pending_record_after, :warn_after, :error_after], 'SyncStreamSettingsForm')
|
52646
|
+
@pending_record_after = (x = opts.delete(:pending_record_after); x.is_a?(::Io::Flow::V0::Models::SyncDuration) ? x : ::Io::Flow::V0::Models::SyncDuration.new(x))
|
52647
|
+
@warn_after = (x = opts.delete(:warn_after); x.is_a?(::Io::Flow::V0::Models::SyncDuration) ? x : ::Io::Flow::V0::Models::SyncDuration.new(x))
|
52648
|
+
@error_after = (x = opts.delete(:error_after); x.is_a?(::Io::Flow::V0::Models::SyncDuration) ? x : ::Io::Flow::V0::Models::SyncDuration.new(x))
|
52649
|
+
end
|
52650
|
+
|
52651
|
+
def to_json
|
52652
|
+
JSON.dump(to_hash)
|
52653
|
+
end
|
52654
|
+
|
52655
|
+
def copy(incoming={})
|
52656
|
+
SyncStreamSettingsForm.new(to_hash.merge(HttpClient::Helper.symbolize_keys(incoming)))
|
52657
|
+
end
|
52658
|
+
|
52659
|
+
def to_hash
|
52660
|
+
{
|
52661
|
+
:pending_record_after => pending_record_after.to_hash,
|
52662
|
+
:warn_after => warn_after.to_hash,
|
52663
|
+
:error_after => error_after.to_hash
|
52664
|
+
}
|
52665
|
+
end
|
52666
|
+
|
52667
|
+
end
|
52668
|
+
|
51004
52669
|
# Represents a simple model of taxes that apply to a given item / destination.
|
51005
52670
|
class Tax
|
51006
52671
|
|
@@ -51135,6 +52800,158 @@ module Io
|
|
51135
52800
|
|
51136
52801
|
end
|
51137
52802
|
|
52803
|
+
# Information necessary to perform a 3ds Challenge action inline to the user
|
52804
|
+
# experience.
|
52805
|
+
class ThreedsChallengeActionDetails < AuthorizationResultActionDetails
|
52806
|
+
|
52807
|
+
attr_reader :threeds_challenge_action, :expires_at
|
52808
|
+
|
52809
|
+
def initialize(incoming={})
|
52810
|
+
super(:discriminator => AuthorizationResultActionDetails::Types::THREEDS_CHALLENGE_ACTION_DETAILS)
|
52811
|
+
opts = HttpClient::Helper.symbolize_keys(incoming)
|
52812
|
+
HttpClient::Preconditions.require_keys(opts, [:threeds_challenge_action, :expires_at], 'ThreedsChallengeActionDetails')
|
52813
|
+
@threeds_challenge_action = (x = opts.delete(:threeds_challenge_action); x.is_a?(::Io::Flow::V0::Models::ThreedsChallengeAction) ? x : ::Io::Flow::V0::Models::ThreedsChallengeAction.from_json(x))
|
52814
|
+
@expires_at = HttpClient::Preconditions.assert_class('expires_at', HttpClient::Helper.to_date_time_iso8601(opts.delete(:expires_at)), DateTime)
|
52815
|
+
end
|
52816
|
+
|
52817
|
+
def to_json
|
52818
|
+
JSON.dump(to_hash)
|
52819
|
+
end
|
52820
|
+
|
52821
|
+
def copy(incoming={})
|
52822
|
+
ThreedsChallengeActionDetails.new(subtype_to_hash.merge(HttpClient::Helper.symbolize_keys(incoming)))
|
52823
|
+
end
|
52824
|
+
|
52825
|
+
def subtype_to_hash
|
52826
|
+
{
|
52827
|
+
:threeds_challenge_action => threeds_challenge_action.to_hash,
|
52828
|
+
:expires_at => expires_at
|
52829
|
+
}
|
52830
|
+
end
|
52831
|
+
|
52832
|
+
end
|
52833
|
+
|
52834
|
+
# Information necessary to perform a 3ds Identify action inline to the user
|
52835
|
+
# experience.
|
52836
|
+
class ThreedsIdentifyActionDetails < AuthorizationResultActionDetails
|
52837
|
+
|
52838
|
+
attr_reader :threeds_identify_action, :expires_at
|
52839
|
+
|
52840
|
+
def initialize(incoming={})
|
52841
|
+
super(:discriminator => AuthorizationResultActionDetails::Types::THREEDS_IDENTIFY_ACTION_DETAILS)
|
52842
|
+
opts = HttpClient::Helper.symbolize_keys(incoming)
|
52843
|
+
HttpClient::Preconditions.require_keys(opts, [:threeds_identify_action, :expires_at], 'ThreedsIdentifyActionDetails')
|
52844
|
+
@threeds_identify_action = (x = opts.delete(:threeds_identify_action); x.is_a?(::Io::Flow::V0::Models::ThreedsIdentifyAction) ? x : ::Io::Flow::V0::Models::ThreedsIdentifyAction.from_json(x))
|
52845
|
+
@expires_at = HttpClient::Preconditions.assert_class('expires_at', HttpClient::Helper.to_date_time_iso8601(opts.delete(:expires_at)), DateTime)
|
52846
|
+
end
|
52847
|
+
|
52848
|
+
def to_json
|
52849
|
+
JSON.dump(to_hash)
|
52850
|
+
end
|
52851
|
+
|
52852
|
+
def copy(incoming={})
|
52853
|
+
ThreedsIdentifyActionDetails.new(subtype_to_hash.merge(HttpClient::Helper.symbolize_keys(incoming)))
|
52854
|
+
end
|
52855
|
+
|
52856
|
+
def subtype_to_hash
|
52857
|
+
{
|
52858
|
+
:threeds_identify_action => threeds_identify_action.to_hash,
|
52859
|
+
:expires_at => expires_at
|
52860
|
+
}
|
52861
|
+
end
|
52862
|
+
|
52863
|
+
end
|
52864
|
+
|
52865
|
+
# Instructions to the card issuer to render challenges to the user
|
52866
|
+
class ThreedsTwoBrowserActionConfiguration < ActionConfiguration
|
52867
|
+
|
52868
|
+
attr_reader :viewport
|
52869
|
+
|
52870
|
+
def initialize(incoming={})
|
52871
|
+
super(:discriminator => ActionConfiguration::Types::THREEDS_TWO_BROWSER_ACTION_CONFIGURATION)
|
52872
|
+
opts = HttpClient::Helper.symbolize_keys(incoming)
|
52873
|
+
@viewport = (x = (x = opts.delete(:viewport); x.nil? ? "xxx_small" : x); x.is_a?(::Io::Flow::V0::Models::ThreedsTwoChallengeViewport) ? x : ::Io::Flow::V0::Models::ThreedsTwoChallengeViewport.apply(x))
|
52874
|
+
end
|
52875
|
+
|
52876
|
+
def to_json
|
52877
|
+
JSON.dump(to_hash)
|
52878
|
+
end
|
52879
|
+
|
52880
|
+
def copy(incoming={})
|
52881
|
+
ThreedsTwoBrowserActionConfiguration.new(subtype_to_hash.merge(HttpClient::Helper.symbolize_keys(incoming)))
|
52882
|
+
end
|
52883
|
+
|
52884
|
+
def subtype_to_hash
|
52885
|
+
{
|
52886
|
+
:viewport => viewport.value
|
52887
|
+
}
|
52888
|
+
end
|
52889
|
+
|
52890
|
+
end
|
52891
|
+
|
52892
|
+
# Data that must be passed to the 3DS Client to help the issuer ACS render a
|
52893
|
+
# challenge for the user.
|
52894
|
+
class ThreedsTwoChallengeRequest < ThreedsChallengeAction
|
52895
|
+
|
52896
|
+
attr_reader :acs_url, :challenge_request, :session_data
|
52897
|
+
|
52898
|
+
def initialize(incoming={})
|
52899
|
+
super(:discriminator => ThreedsChallengeAction::Types::THREEDS_TWO_CHALLENGE_REQUEST)
|
52900
|
+
opts = HttpClient::Helper.symbolize_keys(incoming)
|
52901
|
+
HttpClient::Preconditions.require_keys(opts, [:acs_url, :challenge_request], 'ThreedsTwoChallengeRequest')
|
52902
|
+
@acs_url = HttpClient::Preconditions.assert_class('acs_url', opts.delete(:acs_url), String)
|
52903
|
+
@challenge_request = HttpClient::Preconditions.assert_class('challenge_request', opts.delete(:challenge_request), String)
|
52904
|
+
@session_data = (x = opts.delete(:session_data); x.nil? ? nil : HttpClient::Preconditions.assert_class('session_data', x, String))
|
52905
|
+
end
|
52906
|
+
|
52907
|
+
def to_json
|
52908
|
+
JSON.dump(to_hash)
|
52909
|
+
end
|
52910
|
+
|
52911
|
+
def copy(incoming={})
|
52912
|
+
ThreedsTwoChallengeRequest.new(subtype_to_hash.merge(HttpClient::Helper.symbolize_keys(incoming)))
|
52913
|
+
end
|
52914
|
+
|
52915
|
+
def subtype_to_hash
|
52916
|
+
{
|
52917
|
+
:acs_url => acs_url,
|
52918
|
+
:challenge_request => challenge_request,
|
52919
|
+
:session_data => session_data
|
52920
|
+
}
|
52921
|
+
end
|
52922
|
+
|
52923
|
+
end
|
52924
|
+
|
52925
|
+
# Data that must be rendered by the 3DS Client in order to help the issuer ACS
|
52926
|
+
# silently identify the user. This format doesn't decompose the ACS identify
|
52927
|
+
# method.
|
52928
|
+
class ThreedsTwoMethod < ThreedsIdentifyAction
|
52929
|
+
|
52930
|
+
attr_reader :method
|
52931
|
+
|
52932
|
+
def initialize(incoming={})
|
52933
|
+
super(:discriminator => ThreedsIdentifyAction::Types::THREEDS_TWO_METHOD)
|
52934
|
+
opts = HttpClient::Helper.symbolize_keys(incoming)
|
52935
|
+
HttpClient::Preconditions.require_keys(opts, [:method], 'ThreedsTwoMethod')
|
52936
|
+
@method = HttpClient::Preconditions.assert_class('method', opts.delete(:method), String)
|
52937
|
+
end
|
52938
|
+
|
52939
|
+
def to_json
|
52940
|
+
JSON.dump(to_hash)
|
52941
|
+
end
|
52942
|
+
|
52943
|
+
def copy(incoming={})
|
52944
|
+
ThreedsTwoMethod.new(subtype_to_hash.merge(HttpClient::Helper.symbolize_keys(incoming)))
|
52945
|
+
end
|
52946
|
+
|
52947
|
+
def subtype_to_hash
|
52948
|
+
{
|
52949
|
+
:method => method
|
52950
|
+
}
|
52951
|
+
end
|
52952
|
+
|
52953
|
+
end
|
52954
|
+
|
51138
52955
|
# Service shipping tier available in this tier group. e.g. Standard tier,
|
51139
52956
|
# Express tier, Economy tier
|
51140
52957
|
class Tier
|
@@ -53639,7 +55456,7 @@ module Io
|
|
53639
55456
|
end
|
53640
55457
|
|
53641
55458
|
def Helper.to_big_decimal(value)
|
53642
|
-
value ? BigDecimal
|
55459
|
+
value ? BigDecimal(value.to_s) : nil
|
53643
55460
|
end
|
53644
55461
|
|
53645
55462
|
def Helper.to_object(value)
|