flowcommerce 0.2.83 → 0.2.86

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: dbe752bf473bf5aa658c1e78d5a9b5275ab29b85a39d8072902fd4d7cd04241f
4
- data.tar.gz: 7670b1162a4de42bccd92eb56e1dc8a54573425c5087b728e00a95c6d9799feb
3
+ metadata.gz: c43367d48796d7ff0772ac118136bbbfc4619fb819e6e77be0fcaf6e52bd68b6
4
+ data.tar.gz: '08ec019139e90fcb6f32130d5f2d66005a7da03b587b4fd73953f00a99807677'
5
5
  SHA512:
6
- metadata.gz: 558fdc64a27ce24867dc0210cae9f995c7f3da7913a8fe62adc378e6f026447002b1be1812bea3a65c24fc52b7b7696ec44182cfac3405cede7aecd57171a58a
7
- data.tar.gz: 27fc82837987310606c3c48bc9cea30196e1a367c18991bf024edbe99e661d2a6e2fcb46c72dc10a67e81a6aa3b6cd9fae77f850798ad4be30337815aeb67e4f
6
+ metadata.gz: 4efac635179720a82e4450d1a0f0062fd2afd25b03298bffa0ce974ad221d3a088ddbc53c311cc806661cda0816d6e307eb9922e0c8508695ebf14d61cf3cc0f
7
+ data.tar.gz: dd82c7fad28c22a7d9ded9d7b9a8da1458ad1bb3da3906672233f8f6adcd8a7fabba802101f8179f873fa1c8fc120ee5465caaf3a9824e9eec912d081caa1f9f
@@ -1,6 +1,6 @@
1
1
  # Generated by API Builder - https://www.apibuilder.io
2
- # Service version: 0.9.48
3
- # apibuilder 0.15.9 app.apibuilder.io/flow/api/latest/ruby_client
2
+ # Service version: 0.9.74
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.9 app.apibuilder.io/flow/api/latest/ruby_client' unless defined?(Constants::USER_AGENT)
29
- VERSION = '0.9.48' unless defined?(Constants::VERSION)
28
+ USER_AGENT = 'apibuilder 0.15.11 app.apibuilder.io/flow/api/latest/ruby_client' unless defined?(Constants::USER_AGENT)
29
+ VERSION = '0.9.74' unless defined?(Constants::VERSION)
30
30
  VERSION_MAJOR = 0 unless defined?(VERSION_MAJOR)
31
31
 
32
32
  end
@@ -662,7 +662,8 @@ module Io
662
662
  HttpClient::Preconditions.assert_class('organization', organization, String)
663
663
  opts = HttpClient::Helper.symbolize_keys(incoming)
664
664
  query = {
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) })
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))
666
667
  }.delete_if { |k, v| v.nil? }
667
668
  r = @client.request("/#{CGI.escape(organization)}/address/configurations").with_query(query).get
668
669
  r.map { |x| ::Io::Flow::V0::Models::AddressConfiguration.new(x) }
@@ -929,7 +930,8 @@ module Io
929
930
  HttpClient::Preconditions.assert_class('organization', organization, String)
930
931
  opts = HttpClient::Helper.symbolize_keys(incoming)
931
932
  query = {
932
- :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))
933
935
  }.delete_if { |k, v| v.nil? }
934
936
  (x = credit_payment_form; x.is_a?(::Io::Flow::V0::Models::CreditPaymentForm) ? x : ::Io::Flow::V0::Models::CreditPaymentForm.new(x))
935
937
  r = @client.request("/#{CGI.escape(organization)}/credit/payments").with_query(query).with_json(credit_payment_form.to_json).post
@@ -966,17 +968,22 @@ module Io
966
968
  HttpClient::Preconditions.assert_class('key', key, String)
967
969
  opts = HttpClient::Helper.symbolize_keys(incoming)
968
970
  query = {
969
- :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))
970
973
  }.delete_if { |k, v| v.nil? }
971
974
  (x = credit_payment_form; x.is_a?(::Io::Flow::V0::Models::CreditPaymentForm) ? x : ::Io::Flow::V0::Models::CreditPaymentForm.new(x))
972
975
  r = @client.request("/#{CGI.escape(organization)}/credit/payments/#{CGI.escape(key)}").with_query(query).with_json(credit_payment_form.to_json).put
973
976
  ::Io::Flow::V0::Models::CreditPayment.new(r)
974
977
  end
975
978
 
976
- def delete_by_key(organization, key)
979
+ def delete_by_key(organization, key, incoming={})
977
980
  HttpClient::Preconditions.assert_class('organization', organization, String)
978
981
  HttpClient::Preconditions.assert_class('key', key, String)
979
- r = @client.request("/#{CGI.escape(organization)}/credit/payments/#{CGI.escape(key)}").delete
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
980
987
  nil
981
988
  end
982
989
 
@@ -1054,6 +1061,7 @@ module Io
1054
1061
  :ip => (x = opts.delete(:ip); x.nil? ? nil : HttpClient::Preconditions.assert_class('ip', x, String)),
1055
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),
1056
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)),
1057
1065
  :limit => HttpClient::Preconditions.assert_class('limit', (x = opts.delete(:limit); x.nil? ? 25 : x), Integer),
1058
1066
  :offset => HttpClient::Preconditions.assert_class('offset', (x = opts.delete(:offset); x.nil? ? 0 : x), Integer),
1059
1067
  :sort => HttpClient::Preconditions.assert_class('sort', (x = opts.delete(:sort); x.nil? ? "position" : x), String)
@@ -1081,7 +1089,8 @@ module Io
1081
1089
  :experience => (x = opts.delete(:experience); x.nil? ? nil : HttpClient::Preconditions.assert_class('experience', x, String)),
1082
1090
  :country => (x = opts.delete(:country); x.nil? ? nil : HttpClient::Preconditions.assert_class('country', x, String)),
1083
1091
  :ip => (x = opts.delete(:ip); x.nil? ? nil : HttpClient::Preconditions.assert_class('ip', x, String)),
1084
- :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))
1085
1094
  }.delete_if { |k, v| v.nil? }
1086
1095
  r = @client.request("/#{CGI.escape(organization)}/experiences/conversions/#{CGI.escape(base)}/#{CGI.escape(amount)}").with_query(query).get
1087
1096
  ::Io::Flow::V0::Models::PriceWithBase.new(r)
@@ -1101,6 +1110,7 @@ module Io
1101
1110
  :ip => (x = opts.delete(:ip); x.nil? ? nil : HttpClient::Preconditions.assert_class('ip', x, String)),
1102
1111
  :currency => (x = opts.delete(:currency); x.nil? ? nil : HttpClient::Preconditions.assert_class('currency', x, String)),
1103
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)),
1104
1114
  :limit => HttpClient::Preconditions.assert_class('limit', (x = opts.delete(:limit); x.nil? ? 25 : x), Integer),
1105
1115
  :offset => HttpClient::Preconditions.assert_class('offset', (x = opts.delete(:offset); x.nil? ? 0 : x), Integer),
1106
1116
  :sort => HttpClient::Preconditions.assert_class('sort', (x = opts.delete(:sort); x.nil? ? "-created_at" : x), String)
@@ -1119,7 +1129,8 @@ module Io
1119
1129
  :country => (x = opts.delete(:country); x.nil? ? nil : HttpClient::Preconditions.assert_class('country', x, String)),
1120
1130
  :ip => (x = opts.delete(:ip); x.nil? ? nil : HttpClient::Preconditions.assert_class('ip', x, String)),
1121
1131
  :currency => (x = opts.delete(:currency); x.nil? ? nil : HttpClient::Preconditions.assert_class('currency', x, String)),
1122
- :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))
1123
1134
  }.delete_if { |k, v| v.nil? }
1124
1135
  r = @client.request("/#{CGI.escape(organization)}/experiences/items/#{CGI.escape(number)}").with_query(query).get
1125
1136
  ::Io::Flow::V0::Models::Item.new(r)
@@ -1171,7 +1182,8 @@ module Io
1171
1182
  opts = HttpClient::Helper.symbolize_keys(incoming)
1172
1183
  query = {
1173
1184
  :q => (x = opts.delete(:q); x.nil? ? nil : HttpClient::Preconditions.assert_class('q', x, String)),
1174
- :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))
1175
1187
  }.delete_if { |k, v| v.nil? }
1176
1188
  r = @client.request("/#{CGI.escape(organization)}/experiences/#{CGI.escape(experience_key)}/local/items").with_query(query).get
1177
1189
  r.map { |x| ::Io::Flow::V0::Models::LocalItem.new(x) }
@@ -1392,7 +1404,8 @@ module Io
1392
1404
  :ship_from_province => (x = opts.delete(:ship_from_province); x.nil? ? nil : HttpClient::Preconditions.assert_class('ship_from_province', x, String)),
1393
1405
  :ship_to_country => (x = opts.delete(:ship_to_country); x.nil? ? nil : HttpClient::Preconditions.assert_class('ship_to_country', x, String)),
1394
1406
  :ship_to_province => (x = opts.delete(:ship_to_province); x.nil? ? nil : HttpClient::Preconditions.assert_class('ship_to_province', x, String)),
1395
- :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))
1396
1409
  }.delete_if { |k, v| v.nil? }
1397
1410
  r = @client.request("/#{CGI.escape(organization)}/experiences/#{CGI.escape(key)}/items/#{CGI.escape(number)}/price").with_query(query).get
1398
1411
  ::Io::Flow::V0::Models::PriceCheck.new(r)
@@ -1407,11 +1420,15 @@ module Io
1407
1420
  end
1408
1421
 
1409
1422
  # Update the pricing settings for this experience
1410
- def put_pricing_by_key(organization, key, pricing)
1423
+ def put_pricing_by_key(organization, key, pricing, incoming={})
1411
1424
  HttpClient::Preconditions.assert_class('organization', organization, String)
1412
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? }
1413
1430
  (x = pricing; x.is_a?(::Io::Flow::V0::Models::Pricing) ? x : ::Io::Flow::V0::Models::Pricing.new(x))
1414
- 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
1415
1432
  ::Io::Flow::V0::Models::Pricing.new(r)
1416
1433
  end
1417
1434
 
@@ -1730,7 +1747,8 @@ module Io
1730
1747
  :currency => (x = opts.delete(:currency); x.nil? ? nil : HttpClient::Preconditions.assert_class('currency', x, String)),
1731
1748
  :language => (x = opts.delete(:language); x.nil? ? nil : HttpClient::Preconditions.assert_class('language', x, String)),
1732
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) }),
1733
- :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))
1734
1752
  }.delete_if { |k, v| v.nil? }
1735
1753
  (x = order_form; x.is_a?(::Io::Flow::V0::Models::OrderForm) ? x : ::Io::Flow::V0::Models::OrderForm.new(x))
1736
1754
  r = @client.request("/#{CGI.escape(organization)}/orders").with_query(query).with_json(order_form.to_json).post
@@ -1761,7 +1779,8 @@ module Io
1761
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) }),
1762
1780
  :experience => (x = opts.delete(:experience); x.nil? ? nil : HttpClient::Preconditions.assert_class('experience', x, String)),
1763
1781
  :currency => (x = opts.delete(:currency); x.nil? ? nil : HttpClient::Preconditions.assert_class('currency', x, String)),
1764
- :show_selections_only => (x = opts.delete(:show_selections_only); x.nil? ? nil : HttpClient::Preconditions.assert_boolean('show_selections_only', x))
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))
1765
1784
  }.delete_if { |k, v| v.nil? }
1766
1785
  (x = order_with_discounts_form; x.is_a?(::Io::Flow::V0::Models::OrderWithDiscountsForm) ? x : ::Io::Flow::V0::Models::OrderWithDiscountsForm.new(x))
1767
1786
  r = @client.request("/#{CGI.escape(organization)}/orders/submissions").with_query(query).with_json(order_with_discounts_form.to_json).post
@@ -1811,7 +1830,8 @@ module Io
1811
1830
  :currency => (x = opts.delete(:currency); x.nil? ? nil : HttpClient::Preconditions.assert_class('currency', x, String)),
1812
1831
  :language => (x = opts.delete(:language); x.nil? ? nil : HttpClient::Preconditions.assert_class('language', x, String)),
1813
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) }),
1814
- :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))
1815
1835
  }.delete_if { |k, v| v.nil? }
1816
1836
  (x = order_put_form; x.is_a?(::Io::Flow::V0::Models::OrderPutForm) ? x : ::Io::Flow::V0::Models::OrderPutForm.new(x))
1817
1837
  r = @client.request("/#{CGI.escape(organization)}/orders/#{CGI.escape(number)}").with_query(query).with_json(order_put_form.to_json).put
@@ -1842,7 +1862,8 @@ module Io
1842
1862
  HttpClient::Preconditions.assert_class('number', number, String)
1843
1863
  opts = HttpClient::Helper.symbolize_keys(incoming)
1844
1864
  query = {
1845
- :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))
1846
1867
  }.delete_if { |k, v| v.nil? }
1847
1868
  (x = authorization_form; x.is_a?(::Io::Flow::V0::Models::AuthorizationForm) ? x : ::Io::Flow::V0::Models::AuthorizationForm.from_json(x))
1848
1869
  r = @client.request("/#{CGI.escape(organization)}/orders/#{CGI.escape(number)}/authorizations").with_query(query).with_json(authorization_form.to_json).post
@@ -1850,21 +1871,38 @@ module Io
1850
1871
  end
1851
1872
 
1852
1873
  # Updates an order's destination address
1853
- def put_destination_by_number(organization, number, order_destination_put_form)
1874
+ def put_destination_by_number(organization, number, order_destination_put_form, incoming={})
1854
1875
  HttpClient::Preconditions.assert_class('organization', organization, String)
1855
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? }
1856
1881
  (x = order_destination_put_form; x.is_a?(::Io::Flow::V0::Models::OrderDestinationPutForm) ? x : ::Io::Flow::V0::Models::OrderDestinationPutForm.new(x))
1857
- 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
1858
1883
  ::Io::Flow::V0::Models::Order.new(r)
1859
1884
  end
1860
1885
 
1861
- def put_inventory_and_reservations_by_number(organization, number)
1886
+ def put_inventory_and_reservations_by_number(organization, number, incoming={})
1862
1887
  HttpClient::Preconditions.assert_class('organization', organization, String)
1863
1888
  HttpClient::Preconditions.assert_class('number', number, String)
1864
- r = @client.request("/#{CGI.escape(organization)}/orders/#{CGI.escape(number)}/inventory/reservations").put
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
1865
1894
  ::Io::Flow::V0::Models::Reservation.new(r)
1866
1895
  end
1867
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
+
1868
1906
  # Creates a free shipping promotion for this order, automatically applying it
1869
1907
  # to the order if the order meets the defined promotion trigger.
1870
1908
  def put_promotions_and_free_shipping_by_number_and_key(organization, number, key, free_shipping_order_promotion_form, incoming={})
@@ -1873,7 +1911,8 @@ module Io
1873
1911
  HttpClient::Preconditions.assert_class('key', key, String)
1874
1912
  opts = HttpClient::Helper.symbolize_keys(incoming)
1875
1913
  query = {
1876
- :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))
1877
1916
  }.delete_if { |k, v| v.nil? }
1878
1917
  (x = free_shipping_order_promotion_form; x.is_a?(::Io::Flow::V0::Models::FreeShippingOrderPromotionForm) ? x : ::Io::Flow::V0::Models::FreeShippingOrderPromotionForm.new(x))
1879
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
@@ -1897,7 +1936,8 @@ module Io
1897
1936
  HttpClient::Preconditions.assert_class('number', number, String)
1898
1937
  opts = HttpClient::Helper.symbolize_keys(incoming)
1899
1938
  query = {
1900
- :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))
1901
1941
  }.delete_if { |k, v| v.nil? }
1902
1942
  (x = order_submission_form; x.is_a?(::Io::Flow::V0::Models::OrderSubmissionForm) ? x : ::Io::Flow::V0::Models::OrderSubmissionForm.new(x))
1903
1943
  r = @client.request("/#{CGI.escape(organization)}/orders/#{CGI.escape(number)}/submissions").with_query(query).with_json(order_submission_form.to_json).put
@@ -1906,11 +1946,15 @@ module Io
1906
1946
 
1907
1947
  # Validates a tax registration number, proxying to underlying services and
1908
1948
  # recording the result on the order.
1909
- 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={})
1910
1950
  HttpClient::Preconditions.assert_class('organization', organization, String)
1911
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? }
1912
1956
  (x = tax_registration_form; x.is_a?(::Io::Flow::V0::Models::TaxRegistrationForm) ? x : ::Io::Flow::V0::Models::TaxRegistrationForm.new(x))
1913
- 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
1914
1958
  ::Io::Flow::V0::Models::TaxRegistration.new(r)
1915
1959
  end
1916
1960
 
@@ -1955,7 +1999,8 @@ module Io
1955
1999
  :ip => (x = opts.delete(:ip); x.nil? ? nil : HttpClient::Preconditions.assert_class('ip', x, String)),
1956
2000
  :currency => (x = opts.delete(:currency); x.nil? ? nil : HttpClient::Preconditions.assert_class('currency', x, String)),
1957
2001
  :language => (x = opts.delete(:language); x.nil? ? nil : HttpClient::Preconditions.assert_class('language', x, String)),
1958
- :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))
1959
2004
  }.delete_if { |k, v| v.nil? }
1960
2005
  (x = order_put_form; x.is_a?(::Io::Flow::V0::Models::OrderPutForm) ? x : ::Io::Flow::V0::Models::OrderPutForm.new(x))
1961
2006
  r = @client.request("/#{CGI.escape(organization)}/order/builders").with_query(query).with_json(order_put_form.to_json).post
@@ -1972,7 +2017,8 @@ module Io
1972
2017
  :ip => (x = opts.delete(:ip); x.nil? ? nil : HttpClient::Preconditions.assert_class('ip', x, String)),
1973
2018
  :currency => (x = opts.delete(:currency); x.nil? ? nil : HttpClient::Preconditions.assert_class('currency', x, String)),
1974
2019
  :language => (x = opts.delete(:language); x.nil? ? nil : HttpClient::Preconditions.assert_class('language', x, String)),
1975
- :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))
1976
2022
  }.delete_if { |k, v| v.nil? }
1977
2023
  (x = order_put_form; x.is_a?(::Io::Flow::V0::Models::OrderPutForm) ? x : ::Io::Flow::V0::Models::OrderPutForm.new(x))
1978
2024
  r = @client.request("/#{CGI.escape(organization)}/order/builders/carts/#{CGI.escape(number)}").with_query(query).with_json(order_put_form.to_json).put
@@ -2003,7 +2049,8 @@ module Io
2003
2049
  :ip => (x = opts.delete(:ip); x.nil? ? nil : HttpClient::Preconditions.assert_class('ip', x, String)),
2004
2050
  :currency => (x = opts.delete(:currency); x.nil? ? nil : HttpClient::Preconditions.assert_class('currency', x, String)),
2005
2051
  :language => (x = opts.delete(:language); x.nil? ? nil : HttpClient::Preconditions.assert_class('language', x, String)),
2006
- :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))
2007
2054
  }.delete_if { |k, v| v.nil? }
2008
2055
  (x = order_put_form; x.is_a?(::Io::Flow::V0::Models::OrderPutForm) ? x : ::Io::Flow::V0::Models::OrderPutForm.new(x))
2009
2056
  r = @client.request("/#{CGI.escape(organization)}/order/builders/#{CGI.escape(number)}").with_query(query).with_json(order_put_form.to_json).put
@@ -2015,7 +2062,8 @@ module Io
2015
2062
  HttpClient::Preconditions.assert_class('number', number, String)
2016
2063
  opts = HttpClient::Helper.symbolize_keys(incoming)
2017
2064
  query = {
2018
- :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))
2019
2067
  }.delete_if { |k, v| v.nil? }
2020
2068
  (x = order_builder_attributes_form; x.is_a?(::Io::Flow::V0::Models::OrderBuilderAttributesForm) ? x : ::Io::Flow::V0::Models::OrderBuilderAttributesForm.new(x))
2021
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
@@ -2027,7 +2075,8 @@ module Io
2027
2075
  HttpClient::Preconditions.assert_class('number', number, String)
2028
2076
  opts = HttpClient::Helper.symbolize_keys(incoming)
2029
2077
  query = {
2030
- :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))
2031
2080
  }.delete_if { |k, v| v.nil? }
2032
2081
  (x = order_builder_destination_country_form; x.is_a?(::Io::Flow::V0::Models::OrderBuilderDestinationCountryForm) ? x : ::Io::Flow::V0::Models::OrderBuilderDestinationCountryForm.new(x))
2033
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
@@ -2039,7 +2088,8 @@ module Io
2039
2088
  HttpClient::Preconditions.assert_class('number', number, String)
2040
2089
  opts = HttpClient::Helper.symbolize_keys(incoming)
2041
2090
  query = {
2042
- :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))
2043
2093
  }.delete_if { |k, v| v.nil? }
2044
2094
  (x = order_builder_destination_form; x.is_a?(::Io::Flow::V0::Models::OrderBuilderDestinationForm) ? x : ::Io::Flow::V0::Models::OrderBuilderDestinationForm.new(x))
2045
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
@@ -2051,7 +2101,8 @@ module Io
2051
2101
  HttpClient::Preconditions.assert_class('number', number, String)
2052
2102
  opts = HttpClient::Helper.symbolize_keys(incoming)
2053
2103
  query = {
2054
- :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))
2055
2106
  }.delete_if { |k, v| v.nil? }
2056
2107
  (x = order_builder_delivered_duty_form; x.is_a?(::Io::Flow::V0::Models::OrderBuilderDeliveredDutyForm) ? x : ::Io::Flow::V0::Models::OrderBuilderDeliveredDutyForm.new(x))
2057
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
@@ -2064,13 +2115,71 @@ module Io
2064
2115
  HttpClient::Preconditions.assert_class('number', number, String)
2065
2116
  opts = HttpClient::Helper.symbolize_keys(incoming)
2066
2117
  query = {
2067
- :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))
2068
2120
  }.delete_if { |k, v| v.nil? }
2069
2121
  (x = order_builder_customer_invoice_address_form; x.is_a?(::Io::Flow::V0::Models::OrderBuilderCustomerInvoiceAddressForm) ? x : ::Io::Flow::V0::Models::OrderBuilderCustomerInvoiceAddressForm.new(x))
2070
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
2071
2123
  ::Io::Flow::V0::Models::OrderBuilder.new(r)
2072
2124
  end
2073
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
+
2074
2183
  # Validates a tax registration number, proxying to underlying services and
2075
2184
  # recording the result on the order.
2076
2185
  def put_tax_and_registration_by_number(organization, number, tax_registration_form, incoming={})
@@ -2078,7 +2187,8 @@ module Io
2078
2187
  HttpClient::Preconditions.assert_class('number', number, String)
2079
2188
  opts = HttpClient::Helper.symbolize_keys(incoming)
2080
2189
  query = {
2081
- :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))
2082
2192
  }.delete_if { |k, v| v.nil? }
2083
2193
  (x = tax_registration_form; x.is_a?(::Io::Flow::V0::Models::TaxRegistrationForm) ? x : ::Io::Flow::V0::Models::TaxRegistrationForm.new(x))
2084
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
@@ -2107,7 +2217,8 @@ module Io
2107
2217
  :currency => (x = opts.delete(:currency); x.nil? ? nil : HttpClient::Preconditions.assert_class('currency', x, String)),
2108
2218
  :language => (x = opts.delete(:language); x.nil? ? nil : HttpClient::Preconditions.assert_class('language', x, String)),
2109
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) }),
2110
- :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))
2111
2222
  }.delete_if { |k, v| v.nil? }
2112
2223
  (x = order_estimate_form; x.is_a?(::Io::Flow::V0::Models::OrderEstimateForm) ? x : ::Io::Flow::V0::Models::OrderEstimateForm.new(x))
2113
2224
  r = @client.request("/#{CGI.escape(organization)}/order-estimates").with_query(query).with_json(order_estimate_form.to_json).post
@@ -2137,7 +2248,8 @@ module Io
2137
2248
  :currency => (x = opts.delete(:currency); x.nil? ? nil : HttpClient::Preconditions.assert_class('currency', x, String)),
2138
2249
  :language => (x = opts.delete(:language); x.nil? ? nil : HttpClient::Preconditions.assert_class('language', x, String)),
2139
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) }),
2140
- :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))
2141
2253
  }.delete_if { |k, v| v.nil? }
2142
2254
  (x = order_estimate_form; x.is_a?(::Io::Flow::V0::Models::OrderEstimateForm) ? x : ::Io::Flow::V0::Models::OrderEstimateForm.new(x))
2143
2255
  r = @client.request("/#{CGI.escape(organization)}/order-estimates/#{CGI.escape(number)}").with_query(query).with_json(order_estimate_form.to_json).put
@@ -2236,6 +2348,12 @@ module Io
2236
2348
  nil
2237
2349
  end
2238
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
+
2239
2357
  end
2240
2358
 
2241
2359
  class OrderPromotions
@@ -4505,7 +4623,8 @@ module Io
4505
4623
  HttpClient::Preconditions.assert_class('organization', organization, String)
4506
4624
  opts = HttpClient::Helper.symbolize_keys(incoming)
4507
4625
  query = {
4508
- :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))
4509
4628
  }.delete_if { |k, v| v.nil? }
4510
4629
  (x = shipping_label_form; x.is_a?(::Io::Flow::V0::Models::ShippingLabelForm) ? x : ::Io::Flow::V0::Models::ShippingLabelForm.from_json(x))
4511
4630
  r = @client.request("/#{CGI.escape(organization)}/shipping_labels").with_query(query).with_json(shipping_label_form.to_json).post
@@ -5359,10 +5478,14 @@ module Io
5359
5478
  nil
5360
5479
  end
5361
5480
 
5362
- def post_checkout_and_tokens_by_organization(organization, checkout_token_form)
5481
+ def post_checkout_and_tokens_by_organization(organization, checkout_token_form, incoming={})
5363
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? }
5364
5487
  (x = checkout_token_form; x.is_a?(::Io::Flow::V0::Models::CheckoutTokenForm) ? x : ::Io::Flow::V0::Models::CheckoutTokenForm.from_json(x))
5365
- 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
5366
5489
  ::Io::Flow::V0::Models::CheckoutToken.new(r)
5367
5490
  end
5368
5491
 
@@ -6760,10 +6883,14 @@ module Io
6760
6883
  ::Io::Flow::V0::Models::Session.from_json(r)
6761
6884
  end
6762
6885
 
6763
- def post_organizations_by_organization(organization, session_form)
6886
+ def post_organizations_by_organization(organization, session_form, incoming={})
6764
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? }
6765
6892
  (x = session_form; x.is_a?(::Io::Flow::V0::Models::SessionForm) ? x : ::Io::Flow::V0::Models::SessionForm.new(x))
6766
- 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
6767
6894
  ::Io::Flow::V0::Models::OrganizationSession.new(r)
6768
6895
  end
6769
6896
 
@@ -6773,10 +6900,14 @@ module Io
6773
6900
  ::Io::Flow::V0::Models::Session.from_json(r)
6774
6901
  end
6775
6902
 
6776
- def put_by_session(session, session_put_form)
6903
+ def put_by_session(session, session_put_form, incoming={})
6777
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? }
6778
6909
  (x = session_put_form; x.is_a?(::Io::Flow::V0::Models::SessionPutForm) ? x : ::Io::Flow::V0::Models::SessionPutForm.new(x))
6779
- 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
6780
6911
  ::Io::Flow::V0::Models::Session.from_json(r)
6781
6912
  end
6782
6913
 
@@ -6793,19 +6924,27 @@ module Io
6793
6924
  ::Io::Flow::V0::Models::Session.from_json(r)
6794
6925
  end
6795
6926
 
6796
- 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={})
6797
6928
  HttpClient::Preconditions.assert_class('session', session, String)
6798
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? }
6799
6934
  (x = session_put_form; x.is_a?(::Io::Flow::V0::Models::SessionPutForm) ? x : ::Io::Flow::V0::Models::SessionPutForm.new(x))
6800
- 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
6801
6936
  ::Io::Flow::V0::Models::OrganizationSession.new(r)
6802
6937
  end
6803
6938
 
6804
6939
  # Resets the session based on the provided geo parameters.
6805
- def put_reset_by_session(session, session_put_form)
6940
+ def put_reset_by_session(session, session_put_form, incoming={})
6806
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? }
6807
6946
  (x = session_put_form; x.is_a?(::Io::Flow::V0::Models::SessionPutForm) ? x : ::Io::Flow::V0::Models::SessionPutForm.new(x))
6808
- 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
6809
6948
  ::Io::Flow::V0::Models::Session.from_json(r)
6810
6949
  end
6811
6950
 
@@ -6832,47 +6971,71 @@ module Io
6832
6971
  end
6833
6972
 
6834
6973
  # Retrieve representation of a Shopify cart for the given order number.
6835
- def get_order_by_number(number)
6974
+ def get_order_by_number(number, incoming={})
6836
6975
  HttpClient::Preconditions.assert_class('number', number, String)
6837
- r = @client.request("/shopify/carts/order/#{CGI.escape(number)}").get
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
6838
6981
  ::Io::Flow::V0::Models::ShopifyCart.new(r)
6839
6982
  end
6840
6983
 
6841
6984
  # Retrieve representation of a Shopify cart given the unique cart id.
6842
- def get_by_id_html(id)
6985
+ def get_by_id_html(id, incoming={})
6843
6986
  HttpClient::Preconditions.assert_class('id', id, String)
6844
- r = @client.request("/shopify/carts/#{CGI.escape(id)}").get
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
6845
6992
  r
6846
6993
  end
6847
6994
 
6848
6995
  # Retrieve representation of a Shopify cart given the unique cart id.
6849
- def get_by_id(id)
6996
+ def get_by_id(id, incoming={})
6850
6997
  HttpClient::Preconditions.assert_class('id', id, String)
6851
- r = @client.request("/shopify/carts/#{CGI.escape(id)}").get
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
6852
7003
  ::Io::Flow::V0::Models::ShopifyCart.new(r)
6853
7004
  end
6854
7005
 
6855
7006
  # Add an item to a Shopify cart given the unique cart id.
6856
- def post_add_by_id(id, shopify_cart_add_form)
7007
+ def post_add_by_id(id, shopify_cart_add_form, incoming={})
6857
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? }
6858
7013
  (x = shopify_cart_add_form; x.is_a?(::Io::Flow::V0::Models::ShopifyCartAddForm) ? x : ::Io::Flow::V0::Models::ShopifyCartAddForm.from_json(x))
6859
- 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
6860
7015
  ::Io::Flow::V0::Models::ShopifyCart.new(r)
6861
7016
  end
6862
7017
 
6863
7018
  # Update the attribute information for the cart.
6864
- def put_attributes_by_id(id, shopify_order_attributes_form)
7019
+ def put_attributes_by_id(id, shopify_order_attributes_form, incoming={})
6865
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? }
6866
7025
  (x = shopify_order_attributes_form; x.is_a?(::Io::Flow::V0::Models::ShopifyOrderAttributesForm) ? x : ::Io::Flow::V0::Models::ShopifyOrderAttributesForm.new(x))
6867
- 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
6868
7027
  ::Io::Flow::V0::Models::ShopifyCart.new(r)
6869
7028
  end
6870
7029
 
6871
7030
  # Change/Update an item in a Shopify cart given the unique cart id.
6872
- def post_change_by_id(id, shopify_cart_change_form)
7031
+ def post_change_by_id(id, shopify_cart_change_form, incoming={})
6873
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? }
6874
7037
  (x = shopify_cart_change_form; x.is_a?(::Io::Flow::V0::Models::ShopifyCartChangeForm) ? x : ::Io::Flow::V0::Models::ShopifyCartChangeForm.new(x))
6875
- 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
6876
7039
  ::Io::Flow::V0::Models::ShopifyCart.new(r)
6877
7040
  end
6878
7041
 
@@ -6884,10 +7047,14 @@ module Io
6884
7047
  end
6885
7048
 
6886
7049
  # Update the geo information for the cart.
6887
- def put_geo_by_id(id, geo_form)
7050
+ def put_geo_by_id(id, geo_form, incoming={})
6888
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? }
6889
7056
  (x = geo_form; x.is_a?(::Io::Flow::V0::Models::GeoForm) ? x : ::Io::Flow::V0::Models::GeoForm.new(x))
6890
- 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
6891
7058
  ::Io::Flow::V0::Models::ShopifyCart.new(r)
6892
7059
  end
6893
7060
 
@@ -6896,7 +7063,8 @@ module Io
6896
7063
  HttpClient::Preconditions.assert_class('id', id, String)
6897
7064
  opts = HttpClient::Helper.symbolize_keys(incoming)
6898
7065
  query = {
6899
- :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))
6900
7068
  }.delete_if { |k, v| v.nil? }
6901
7069
  r = @client.request("/shopify/carts/#{CGI.escape(id)}/orders").with_query(query).post
6902
7070
  ::Io::Flow::V0::Models::Order.new(r)
@@ -6916,7 +7084,8 @@ module Io
6916
7084
  HttpClient::Preconditions.assert_class('experience_key', experience_key, String)
6917
7085
  opts = HttpClient::Helper.symbolize_keys(incoming)
6918
7086
  query = {
6919
- :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))
6920
7089
  }.delete_if { |k, v| v.nil? }
6921
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))
6922
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
@@ -7502,6 +7671,68 @@ module Io
7502
7671
 
7503
7672
  module Models
7504
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
+
7505
7736
  class AdyenNativeData
7506
7737
 
7507
7738
  module Types
@@ -7971,6 +8202,8 @@ module Io
7971
8202
  module Types
7972
8203
  ADYEN_NATIVE_ACTION_DETAILS = 'adyen_native_action_details' unless defined?(ADYEN_NATIVE_ACTION_DETAILS)
7973
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)
7974
8207
  end
7975
8208
 
7976
8209
  attr_reader :discriminator
@@ -7982,7 +8215,7 @@ module Io
7982
8215
  end
7983
8216
 
7984
8217
  def subtype_to_hash
7985
- 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'
7986
8219
  end
7987
8220
 
7988
8221
  def to_hash
@@ -7998,6 +8231,8 @@ module Io
7998
8231
  case discriminator
7999
8232
  when Types::ADYEN_NATIVE_ACTION_DETAILS; AdyenNativeActionDetails.new(hash)
8000
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)
8001
8236
  else AuthorizationResultActionDetailsUndefinedType.new(:discriminator => discriminator)
8002
8237
  end
8003
8238
  end
@@ -11829,52 +12064,176 @@ module Io
11829
12064
 
11830
12065
  end
11831
12066
 
11832
- # Possible outcome types from a tier rule
11833
- class TierRuleOutcome
12067
+ # Different version sets of 3ds challenge actions.
12068
+ class ThreedsChallengeAction
11834
12069
 
11835
12070
  module Types
11836
- # Add a certain amount on the actual base cost
11837
- AMOUNT_MARGIN = 'amount_margin' unless defined?(AMOUNT_MARGIN)
11838
- AT_COST = 'at_cost' unless defined?(AT_COST)
11839
- FLAT_RATE = 'flat_rate' unless defined?(FLAT_RATE)
11840
- # Add a certain percentage of the actual base cost
11841
- PERCENT_MARGIN = 'percent_margin' unless defined?(PERCENT_MARGIN)
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)
11842
12073
  end
11843
12074
 
11844
12075
  attr_reader :discriminator
11845
12076
 
11846
12077
  def initialize(incoming={})
11847
12078
  opts = HttpClient::Helper.symbolize_keys(incoming)
11848
- HttpClient::Preconditions.require_keys(opts, [:discriminator], 'TierRuleOutcome')
12079
+ HttpClient::Preconditions.require_keys(opts, [:discriminator], 'ThreedsChallengeAction')
11849
12080
  @discriminator = HttpClient::Preconditions.assert_class('discriminator', opts.delete(:discriminator), String)
11850
12081
  end
11851
12082
 
11852
12083
  def subtype_to_hash
11853
- raise 'Cannot serialize an instance of tier_rule_outcome directly - must use one of the specific types: amount_margin, at_cost, flat_rate, percent_margin'
12084
+ raise 'Cannot serialize an instance of threeds_challenge_action directly - must use one of the specific types: threeds_two_challenge_request'
11854
12085
  end
11855
12086
 
11856
12087
  def to_hash
11857
12088
  subtype_to_hash.merge(:discriminator => @discriminator)
11858
12089
  end
11859
12090
 
11860
- def TierRuleOutcome.from_json(hash)
12091
+ def ThreedsChallengeAction.from_json(hash)
11861
12092
  HttpClient::Preconditions.assert_class('hash', hash, Hash)
11862
12093
  discriminator = HttpClient::Helper.symbolize_keys(hash)[:discriminator].to_s.strip
11863
12094
  if discriminator.empty?
11864
- raise "Union type[tier_rule_outcome] requires a field named 'discriminator'"
12095
+ raise "Union type[threeds_challenge_action] requires a field named 'discriminator'"
11865
12096
  end
11866
12097
  case discriminator
11867
- when Types::AMOUNT_MARGIN; AmountMargin.new(hash)
11868
- when Types::AT_COST; AtCost.new(hash)
11869
- when Types::FLAT_RATE; FlatRate.new(hash)
11870
- when Types::PERCENT_MARGIN; PercentMargin.new(hash)
11871
- else TierRuleOutcomeUndefinedType.new(:discriminator => discriminator)
12098
+ when Types::THREEDS_TWO_CHALLENGE_REQUEST; ThreedsTwoChallengeRequest.new(hash)
12099
+ else ThreedsChallengeActionUndefinedType.new(:discriminator => discriminator)
11872
12100
  end
11873
12101
  end
11874
12102
 
11875
12103
  end
11876
12104
 
11877
- class TierRuleOutcomeUndefinedType < TierRuleOutcome
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
+
12191
+ # Possible outcome types from a tier rule
12192
+ class TierRuleOutcome
12193
+
12194
+ module Types
12195
+ # Add a certain amount on the actual base cost
12196
+ AMOUNT_MARGIN = 'amount_margin' unless defined?(AMOUNT_MARGIN)
12197
+ AT_COST = 'at_cost' unless defined?(AT_COST)
12198
+ FLAT_RATE = 'flat_rate' unless defined?(FLAT_RATE)
12199
+ # Add a certain percentage of the actual base cost
12200
+ PERCENT_MARGIN = 'percent_margin' unless defined?(PERCENT_MARGIN)
12201
+ end
12202
+
12203
+ attr_reader :discriminator
12204
+
12205
+ def initialize(incoming={})
12206
+ opts = HttpClient::Helper.symbolize_keys(incoming)
12207
+ HttpClient::Preconditions.require_keys(opts, [:discriminator], 'TierRuleOutcome')
12208
+ @discriminator = HttpClient::Preconditions.assert_class('discriminator', opts.delete(:discriminator), String)
12209
+ end
12210
+
12211
+ def subtype_to_hash
12212
+ raise 'Cannot serialize an instance of tier_rule_outcome directly - must use one of the specific types: amount_margin, at_cost, flat_rate, percent_margin'
12213
+ end
12214
+
12215
+ def to_hash
12216
+ subtype_to_hash.merge(:discriminator => @discriminator)
12217
+ end
12218
+
12219
+ def TierRuleOutcome.from_json(hash)
12220
+ HttpClient::Preconditions.assert_class('hash', hash, Hash)
12221
+ discriminator = HttpClient::Helper.symbolize_keys(hash)[:discriminator].to_s.strip
12222
+ if discriminator.empty?
12223
+ raise "Union type[tier_rule_outcome] requires a field named 'discriminator'"
12224
+ end
12225
+ case discriminator
12226
+ when Types::AMOUNT_MARGIN; AmountMargin.new(hash)
12227
+ when Types::AT_COST; AtCost.new(hash)
12228
+ when Types::FLAT_RATE; FlatRate.new(hash)
12229
+ when Types::PERCENT_MARGIN; PercentMargin.new(hash)
12230
+ else TierRuleOutcomeUndefinedType.new(:discriminator => discriminator)
12231
+ end
12232
+ end
12233
+
12234
+ end
12235
+
12236
+ class TierRuleOutcomeUndefinedType < TierRuleOutcome
11878
12237
 
11879
12238
  attr_reader :name
11880
12239
 
@@ -12372,7 +12731,7 @@ module Io
12372
12731
  end
12373
12732
 
12374
12733
  def AttributeIntent.ALL
12375
- @@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]
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]
12376
12735
  end
12377
12736
 
12378
12737
  # A brand name of the item (for retailers that sell multiple brands)
@@ -12458,6 +12817,12 @@ module Io
12458
12817
  @@_eccn ||= AttributeIntent.new('eccn')
12459
12818
  end
12460
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
+
12461
12826
  def to_hash
12462
12827
  value
12463
12828
  end
@@ -15587,6 +15952,55 @@ module Io
15587
15952
 
15588
15953
  end
15589
15954
 
15955
+ class FlowEntity
15956
+
15957
+ attr_reader :value
15958
+
15959
+ def initialize(value)
15960
+ @value = HttpClient::Preconditions.assert_class('value', value, String)
15961
+ end
15962
+
15963
+ # Returns the instance of FlowEntity for this value, creating a new instance for an unknown value
15964
+ def FlowEntity.apply(value)
15965
+ if value.instance_of?(FlowEntity)
15966
+ value
15967
+ else
15968
+ HttpClient::Preconditions.assert_class_or_nil('value', value, String)
15969
+ value.nil? ? nil : (from_string(value) || FlowEntity.new(value))
15970
+ end
15971
+ end
15972
+
15973
+ # Returns the instance of FlowEntity for this value, or nil if not found
15974
+ def FlowEntity.from_string(value)
15975
+ HttpClient::Preconditions.assert_class('value', value, String)
15976
+ FlowEntity.ALL.find { |v| v.value == value }
15977
+ end
15978
+
15979
+ def FlowEntity.ALL
15980
+ @@all ||= [FlowEntity.flow_usa, FlowEntity.flow_irl, FlowEntity.flow_can]
15981
+ end
15982
+
15983
+ # Flow Commerce Inc., Hoboken, NJ, USA
15984
+ def FlowEntity.flow_usa
15985
+ @@_flow_usa ||= FlowEntity.new('flow-usa')
15986
+ end
15987
+
15988
+ # Flow Commerce Ltd., Dublin, IRL
15989
+ def FlowEntity.flow_irl
15990
+ @@_flow_irl ||= FlowEntity.new('flow-irl')
15991
+ end
15992
+
15993
+ # Flow Commerce Canada Inc., Vancouver, BC, CAN
15994
+ def FlowEntity.flow_can
15995
+ @@_flow_can ||= FlowEntity.new('flow-can')
15996
+ end
15997
+
15998
+ def to_hash
15999
+ value
16000
+ end
16001
+
16002
+ end
16003
+
15590
16004
  class FlowRole
15591
16005
 
15592
16006
  attr_reader :value
@@ -16603,6 +17017,48 @@ module Io
16603
17017
 
16604
17018
  end
16605
17019
 
17020
+ class ItemIdentifier
17021
+
17022
+ attr_reader :value
17023
+
17024
+ def initialize(value)
17025
+ @value = HttpClient::Preconditions.assert_class('value', value, String)
17026
+ end
17027
+
17028
+ # Returns the instance of ItemIdentifier for this value, creating a new instance for an unknown value
17029
+ def ItemIdentifier.apply(value)
17030
+ if value.instance_of?(ItemIdentifier)
17031
+ value
17032
+ else
17033
+ HttpClient::Preconditions.assert_class_or_nil('value', value, String)
17034
+ value.nil? ? nil : (from_string(value) || ItemIdentifier.new(value))
17035
+ end
17036
+ end
17037
+
17038
+ # Returns the instance of ItemIdentifier for this value, or nil if not found
17039
+ def ItemIdentifier.from_string(value)
17040
+ HttpClient::Preconditions.assert_class('value', value, String)
17041
+ ItemIdentifier.ALL.find { |v| v.value == value }
17042
+ end
17043
+
17044
+ def ItemIdentifier.ALL
17045
+ @@all ||= [ItemIdentifier.item_number, ItemIdentifier.sku]
17046
+ end
17047
+
17048
+ def ItemIdentifier.item_number
17049
+ @@_item_number ||= ItemIdentifier.new('item_number')
17050
+ end
17051
+
17052
+ def ItemIdentifier.sku
17053
+ @@_sku ||= ItemIdentifier.new('sku')
17054
+ end
17055
+
17056
+ def to_hash
17057
+ value
17058
+ end
17059
+
17060
+ end
17061
+
16606
17062
  class LaneDirection
16607
17063
 
16608
17064
  attr_reader :value
@@ -20147,6 +20603,65 @@ module Io
20147
20603
 
20148
20604
  end
20149
20605
 
20606
+ class ThreedsTwoChallengeViewport
20607
+
20608
+ attr_reader :value
20609
+
20610
+ def initialize(value)
20611
+ @value = HttpClient::Preconditions.assert_class('value', value, String)
20612
+ end
20613
+
20614
+ # Returns the instance of ThreedsTwoChallengeViewport for this value, creating a new instance for an unknown value
20615
+ def ThreedsTwoChallengeViewport.apply(value)
20616
+ if value.instance_of?(ThreedsTwoChallengeViewport)
20617
+ value
20618
+ else
20619
+ HttpClient::Preconditions.assert_class_or_nil('value', value, String)
20620
+ value.nil? ? nil : (from_string(value) || ThreedsTwoChallengeViewport.new(value))
20621
+ end
20622
+ end
20623
+
20624
+ # Returns the instance of ThreedsTwoChallengeViewport for this value, or nil if not found
20625
+ def ThreedsTwoChallengeViewport.from_string(value)
20626
+ HttpClient::Preconditions.assert_class('value', value, String)
20627
+ ThreedsTwoChallengeViewport.ALL.find { |v| v.value == value }
20628
+ end
20629
+
20630
+ def ThreedsTwoChallengeViewport.ALL
20631
+ @@all ||= [ThreedsTwoChallengeViewport.xxx_small, ThreedsTwoChallengeViewport.xx_small, ThreedsTwoChallengeViewport.x_small, ThreedsTwoChallengeViewport.small, ThreedsTwoChallengeViewport.fullscreen]
20632
+ end
20633
+
20634
+ # 250x400
20635
+ def ThreedsTwoChallengeViewport.xxx_small
20636
+ @@_xxx_small ||= ThreedsTwoChallengeViewport.new('xxx_small')
20637
+ end
20638
+
20639
+ # 390x400
20640
+ def ThreedsTwoChallengeViewport.xx_small
20641
+ @@_xx_small ||= ThreedsTwoChallengeViewport.new('xx_small')
20642
+ end
20643
+
20644
+ # 500x600
20645
+ def ThreedsTwoChallengeViewport.x_small
20646
+ @@_x_small ||= ThreedsTwoChallengeViewport.new('x_small')
20647
+ end
20648
+
20649
+ # 600x400
20650
+ def ThreedsTwoChallengeViewport.small
20651
+ @@_small ||= ThreedsTwoChallengeViewport.new('small')
20652
+ end
20653
+
20654
+ # Full Screen. Not recommended for mobile devices at this time.
20655
+ def ThreedsTwoChallengeViewport.fullscreen
20656
+ @@_fullscreen ||= ThreedsTwoChallengeViewport.new('fullscreen')
20657
+ end
20658
+
20659
+ def to_hash
20660
+ value
20661
+ end
20662
+
20663
+ end
20664
+
20150
20665
  class TierAvailability
20151
20666
 
20152
20667
  attr_reader :value
@@ -21692,12 +22207,13 @@ module Io
21692
22207
 
21693
22208
  class AllocationLineDetail < AllocationDetail
21694
22209
 
21695
- attr_reader :number, :quantity, :key, :price, :total, :included, :not_included
22210
+ attr_reader :id, :number, :quantity, :key, :price, :total, :included, :not_included
21696
22211
 
21697
22212
  def initialize(incoming={})
21698
22213
  super(:discriminator => AllocationDetail::Types::ALLOCATION_LINE_DETAIL)
21699
22214
  opts = HttpClient::Helper.symbolize_keys(incoming)
21700
22215
  HttpClient::Preconditions.require_keys(opts, [:number, :quantity, :key, :price, :total, :included, :not_included], 'AllocationLineDetail')
22216
+ @id = (x = opts.delete(:id); x.nil? ? nil : HttpClient::Preconditions.assert_class('id', x, String))
21701
22217
  @number = HttpClient::Preconditions.assert_class('number', opts.delete(:number), String)
21702
22218
  @quantity = HttpClient::Preconditions.assert_class('quantity', opts.delete(:quantity), Integer)
21703
22219
  @key = (x = opts.delete(:key); x.is_a?(::Io::Flow::V0::Models::OrderPriceDetailKey) ? x : ::Io::Flow::V0::Models::OrderPriceDetailKey.apply(x))
@@ -21717,6 +22233,7 @@ module Io
21717
22233
 
21718
22234
  def subtype_to_hash
21719
22235
  {
22236
+ :id => id,
21720
22237
  :number => number,
21721
22238
  :quantity => quantity,
21722
22239
  :key => key.value,
@@ -23517,7 +24034,8 @@ module Io
23517
24034
 
23518
24035
  end
23519
24036
 
23520
- # Shopper browser info. All of these fields are required if you are using 3DS2.
24037
+ # Shopper browser info used as part of card authentication. All of these fields
24038
+ # are required if you are using 3DS2.
23521
24039
  class BrowserInfo
23522
24040
 
23523
24041
  attr_reader :origin, :language, :java_enabled, :color_depth, :screen_height, :screen_width, :time_zone_offset, :user_agent, :accept
@@ -24321,7 +24839,7 @@ module Io
24321
24839
  # Creates an authorization for a transaction from a card payment source.
24322
24840
  class CardPaymentSourceAuthorizationForm < AuthorizationForm
24323
24841
 
24324
- attr_reader :key, :card_payment_source_id, :order_number, :amount, :currency, :browser_info
24842
+ attr_reader :key, :card_payment_source_id, :order_number, :amount, :currency, :browser_info, :action_configuration
24325
24843
 
24326
24844
  def initialize(incoming={})
24327
24845
  super(:discriminator => AuthorizationForm::Types::CARD_PAYMENT_SOURCE_AUTHORIZATION_FORM)
@@ -24333,6 +24851,7 @@ module Io
24333
24851
  @amount = HttpClient::Preconditions.assert_class('amount', HttpClient::Helper.to_big_decimal(opts.delete(:amount)), BigDecimal)
24334
24852
  @currency = HttpClient::Preconditions.assert_class('currency', opts.delete(:currency), String)
24335
24853
  @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)))
24854
+ @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)))
24336
24855
  end
24337
24856
 
24338
24857
  def to_json
@@ -24350,7 +24869,8 @@ module Io
24350
24869
  :order_number => order_number,
24351
24870
  :amount => amount.to_f.to_s,
24352
24871
  :currency => currency,
24353
- :browser_info => browser_info.nil? ? nil : browser_info.to_hash
24872
+ :browser_info => browser_info.nil? ? nil : browser_info.to_hash,
24873
+ :action_configuration => action_configuration.nil? ? nil : action_configuration.to_hash
24354
24874
  }
24355
24875
  end
24356
24876
 
@@ -27312,14 +27832,15 @@ module Io
27312
27832
  # Represents the format used to export price book item documents
27313
27833
  class CsvPriceBookItemExportRow
27314
27834
 
27315
- attr_reader :price_book_key, :price_book_item_key, :item_number, :item_name, :amount, :item_attributes, :starts_at, :ends_at
27835
+ attr_reader :price_book_key, :price_book_item_key, :item_number, :sku, :item_name, :amount, :item_attributes, :starts_at, :ends_at
27316
27836
 
27317
27837
  def initialize(incoming={})
27318
27838
  opts = HttpClient::Helper.symbolize_keys(incoming)
27319
- HttpClient::Preconditions.require_keys(opts, [:price_book_key, :price_book_item_key, :item_number, :item_name, :amount, :starts_at], 'CsvPriceBookItemExportRow')
27839
+ HttpClient::Preconditions.require_keys(opts, [:price_book_key, :price_book_item_key, :item_number, :sku, :item_name, :amount, :starts_at], 'CsvPriceBookItemExportRow')
27320
27840
  @price_book_key = HttpClient::Preconditions.assert_class('price_book_key', opts.delete(:price_book_key), String)
27321
27841
  @price_book_item_key = HttpClient::Preconditions.assert_class('price_book_item_key', opts.delete(:price_book_item_key), String)
27322
27842
  @item_number = HttpClient::Preconditions.assert_class('item_number', opts.delete(:item_number), String)
27843
+ @sku = HttpClient::Preconditions.assert_class('sku', opts.delete(:sku), String)
27323
27844
  @item_name = HttpClient::Preconditions.assert_class('item_name', opts.delete(:item_name), String)
27324
27845
  @amount = HttpClient::Preconditions.assert_class('amount', HttpClient::Helper.to_big_decimal(opts.delete(:amount)), BigDecimal)
27325
27846
  @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 })
@@ -27340,6 +27861,7 @@ module Io
27340
27861
  :price_book_key => price_book_key,
27341
27862
  :price_book_item_key => price_book_item_key,
27342
27863
  :item_number => item_number,
27864
+ :sku => sku,
27343
27865
  :item_name => item_name,
27344
27866
  :amount => amount.to_f.to_s,
27345
27867
  :item_attributes => item_attributes.nil? ? nil : item_attributes,
@@ -28320,11 +28842,12 @@ module Io
28320
28842
 
28321
28843
  class DeliveryItem
28322
28844
 
28323
- attr_reader :number, :quantity, :shipment_estimate, :price, :attributes, :center, :line_number
28845
+ attr_reader :id, :number, :quantity, :shipment_estimate, :price, :attributes, :center, :line_number
28324
28846
 
28325
28847
  def initialize(incoming={})
28326
28848
  opts = HttpClient::Helper.symbolize_keys(incoming)
28327
28849
  HttpClient::Preconditions.require_keys(opts, [:number, :quantity], 'DeliveryItem')
28850
+ @id = (x = opts.delete(:id); x.nil? ? nil : HttpClient::Preconditions.assert_class('id', x, String))
28328
28851
  @number = HttpClient::Preconditions.assert_class('number', opts.delete(:number), String)
28329
28852
  @quantity = HttpClient::Preconditions.assert_class('quantity', opts.delete(:quantity), Integer)
28330
28853
  @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)))
@@ -28344,6 +28867,7 @@ module Io
28344
28867
 
28345
28868
  def to_hash
28346
28869
  {
28870
+ :id => id,
28347
28871
  :number => number,
28348
28872
  :quantity => quantity,
28349
28873
  :shipment_estimate => shipment_estimate.nil? ? nil : shipment_estimate.to_hash,
@@ -29222,7 +29746,7 @@ module Io
29222
29746
  # you can capture up to the amount of the authorization.
29223
29747
  class DirectAuthorizationForm < AuthorizationForm
29224
29748
 
29225
- attr_reader :token, :amount, :currency, :customer, :key, :cvv, :attributes, :destination, :billing_address, :ip, :options, :redirect_urls, :browser_info
29749
+ attr_reader :token, :amount, :currency, :customer, :key, :cvv, :attributes, :destination, :billing_address, :ip, :options, :redirect_urls, :browser_info, :action_configuration
29226
29750
 
29227
29751
  def initialize(incoming={})
29228
29752
  super(:discriminator => AuthorizationForm::Types::DIRECT_AUTHORIZATION_FORM)
@@ -29241,6 +29765,7 @@ module Io
29241
29765
  @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)) })
29242
29766
  @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)))
29243
29767
  @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)))
29768
+ @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)))
29244
29769
  end
29245
29770
 
29246
29771
  def to_json
@@ -29265,7 +29790,8 @@ module Io
29265
29790
  :ip => ip,
29266
29791
  :options => options.nil? ? nil : options.map { |o| o.value },
29267
29792
  :redirect_urls => redirect_urls.nil? ? nil : redirect_urls.to_hash,
29268
- :browser_info => browser_info.nil? ? nil : browser_info.to_hash
29793
+ :browser_info => browser_info.nil? ? nil : browser_info.to_hash,
29794
+ :action_configuration => action_configuration.nil? ? nil : action_configuration.to_hash
29269
29795
  }
29270
29796
  end
29271
29797
 
@@ -32097,13 +32623,12 @@ module Io
32097
32623
  # Indicates a field is required
32098
32624
  class FieldValidationRequired < FieldValidationRule
32099
32625
 
32100
- attr_reader :unused
32626
+ attr_reader :placeholder
32101
32627
 
32102
32628
  def initialize(incoming={})
32103
32629
  super(:discriminator => FieldValidationRule::Types::FIELD_VALIDATION_REQUIRED)
32104
32630
  opts = HttpClient::Helper.symbolize_keys(incoming)
32105
- HttpClient::Preconditions.require_keys(opts, [:unused], 'FieldValidationRequired')
32106
- @unused = HttpClient::Preconditions.assert_class('unused', opts.delete(:unused), String)
32631
+ @placeholder = (x = opts.delete(:placeholder); x.nil? ? nil : HttpClient::Preconditions.assert_class('placeholder', x, String))
32107
32632
  end
32108
32633
 
32109
32634
  def to_json
@@ -32116,7 +32641,7 @@ module Io
32116
32641
 
32117
32642
  def subtype_to_hash
32118
32643
  {
32119
- :unused => unused
32644
+ :placeholder => placeholder
32120
32645
  }
32121
32646
  end
32122
32647
 
@@ -33167,12 +33692,11 @@ module Io
33167
33692
 
33168
33693
  class GraphqlRequest
33169
33694
 
33170
- attr_reader :id, :query, :operation_name, :variables
33695
+ attr_reader :query, :operation_name, :variables
33171
33696
 
33172
33697
  def initialize(incoming={})
33173
33698
  opts = HttpClient::Helper.symbolize_keys(incoming)
33174
- HttpClient::Preconditions.require_keys(opts, [:id, :query], 'GraphqlRequest')
33175
- @id = HttpClient::Preconditions.assert_class('id', opts.delete(:id), String)
33699
+ HttpClient::Preconditions.require_keys(opts, [:query], 'GraphqlRequest')
33176
33700
  @query = HttpClient::Preconditions.assert_class('query', opts.delete(:query), String)
33177
33701
  @operation_name = (x = opts.delete(:operation_name); x.nil? ? nil : HttpClient::Preconditions.assert_class('operation_name', x, String))
33178
33702
  @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 })
@@ -33188,7 +33712,6 @@ module Io
33188
33712
 
33189
33713
  def to_hash
33190
33714
  {
33191
- :id => id,
33192
33715
  :query => query,
33193
33716
  :operation_name => operation_name,
33194
33717
  :variables => variables.nil? ? nil : variables
@@ -33199,13 +33722,11 @@ module Io
33199
33722
 
33200
33723
  class GraphqlResponse
33201
33724
 
33202
- attr_reader :request_id, :data, :errors
33725
+ attr_reader :data, :errors
33203
33726
 
33204
33727
  def initialize(incoming={})
33205
33728
  opts = HttpClient::Helper.symbolize_keys(incoming)
33206
- HttpClient::Preconditions.require_keys(opts, [:request_id, :data], 'GraphqlResponse')
33207
- @request_id = HttpClient::Preconditions.assert_class('request_id', opts.delete(:request_id), String)
33208
- @data = HttpClient::Preconditions.assert_class('data', HttpClient::Helper.to_object(opts.delete(:data)), Hash)
33729
+ @data = (x = opts.delete(:data); x.nil? ? nil : HttpClient::Preconditions.assert_class('data', HttpClient::Helper.to_object(x), Hash))
33209
33730
  @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) })
33210
33731
  end
33211
33732
 
@@ -33219,7 +33740,6 @@ module Io
33219
33740
 
33220
33741
  def to_hash
33221
33742
  {
33222
- :request_id => request_id,
33223
33743
  :data => data,
33224
33744
  :errors => errors.nil? ? nil : errors
33225
33745
  }
@@ -36769,11 +37289,12 @@ module Io
36769
37289
  # Provides display data for a line item.
36770
37290
  class Line
36771
37291
 
36772
- attr_reader :item_number, :quantity, :price, :total, :attributes
37292
+ attr_reader :id, :item_number, :quantity, :price, :total, :attributes
36773
37293
 
36774
37294
  def initialize(incoming={})
36775
37295
  opts = HttpClient::Helper.symbolize_keys(incoming)
36776
37296
  HttpClient::Preconditions.require_keys(opts, [:item_number, :quantity, :price, :total], 'Line')
37297
+ @id = (x = opts.delete(:id); x.nil? ? nil : HttpClient::Preconditions.assert_class('id', x, String))
36777
37298
  @item_number = HttpClient::Preconditions.assert_class('item_number', opts.delete(:item_number), String)
36778
37299
  @quantity = HttpClient::Preconditions.assert_class('quantity', opts.delete(:quantity), Integer)
36779
37300
  @price = (x = opts.delete(:price); x.is_a?(::Io::Flow::V0::Models::PriceWithBase) ? x : ::Io::Flow::V0::Models::PriceWithBase.new(x))
@@ -36791,6 +37312,7 @@ module Io
36791
37312
 
36792
37313
  def to_hash
36793
37314
  {
37315
+ :id => id,
36794
37316
  :item_number => item_number,
36795
37317
  :quantity => quantity,
36796
37318
  :price => price.to_hash,
@@ -36840,6 +37362,32 @@ module Io
36840
37362
 
36841
37363
  end
36842
37364
 
37365
+ class LineItemAttributesForm
37366
+
37367
+ attr_reader :attributes
37368
+
37369
+ def initialize(incoming={})
37370
+ opts = HttpClient::Helper.symbolize_keys(incoming)
37371
+ HttpClient::Preconditions.require_keys(opts, [:attributes], 'LineItemAttributesForm')
37372
+ @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 }
37373
+ end
37374
+
37375
+ def to_json
37376
+ JSON.dump(to_hash)
37377
+ end
37378
+
37379
+ def copy(incoming={})
37380
+ LineItemAttributesForm.new(to_hash.merge(HttpClient::Helper.symbolize_keys(incoming)))
37381
+ end
37382
+
37383
+ def to_hash
37384
+ {
37385
+ :attributes => attributes
37386
+ }
37387
+ end
37388
+
37389
+ end
37390
+
36843
37391
  # Line items represent the items a consumer is purchasing, including additional
36844
37392
  # information to complete the transaction. Note that you may pass in as many
36845
37393
  # line items as you like - including repeating item numbers across line items.
@@ -36883,6 +37431,32 @@ module Io
36883
37431
 
36884
37432
  end
36885
37433
 
37434
+ class LineItemQuantityForm
37435
+
37436
+ attr_reader :quantity
37437
+
37438
+ def initialize(incoming={})
37439
+ opts = HttpClient::Helper.symbolize_keys(incoming)
37440
+ HttpClient::Preconditions.require_keys(opts, [:quantity], 'LineItemQuantityForm')
37441
+ @quantity = HttpClient::Preconditions.assert_class('quantity', opts.delete(:quantity), Integer)
37442
+ end
37443
+
37444
+ def to_json
37445
+ JSON.dump(to_hash)
37446
+ end
37447
+
37448
+ def copy(incoming={})
37449
+ LineItemQuantityForm.new(to_hash.merge(HttpClient::Helper.symbolize_keys(incoming)))
37450
+ end
37451
+
37452
+ def to_hash
37453
+ {
37454
+ :quantity => quantity
37455
+ }
37456
+ end
37457
+
37458
+ end
37459
+
36886
37460
  class Link
36887
37461
 
36888
37462
  attr_reader :url
@@ -37396,11 +37970,12 @@ module Io
37396
37970
  # Line items on the order, with localized pricing information
37397
37971
  class LocalizedLineItem
37398
37972
 
37399
- attr_reader :number, :name, :quantity, :center, :price, :discount, :discounts, :attributes, :local, :shipment_estimate, :price_source
37973
+ attr_reader :id, :number, :name, :quantity, :center, :price, :discount, :discounts, :attributes, :local, :shipment_estimate, :price_source
37400
37974
 
37401
37975
  def initialize(incoming={})
37402
37976
  opts = HttpClient::Helper.symbolize_keys(incoming)
37403
37977
  HttpClient::Preconditions.require_keys(opts, [:number, :name, :quantity, :local], 'LocalizedLineItem')
37978
+ @id = (x = opts.delete(:id); x.nil? ? nil : HttpClient::Preconditions.assert_class('id', x, String))
37404
37979
  @number = HttpClient::Preconditions.assert_class('number', opts.delete(:number), String)
37405
37980
  @name = HttpClient::Preconditions.assert_class('name', opts.delete(:name), String)
37406
37981
  @quantity = HttpClient::Preconditions.assert_class('quantity', opts.delete(:quantity), Integer)
@@ -37424,6 +37999,7 @@ module Io
37424
37999
 
37425
38000
  def to_hash
37426
38001
  {
38002
+ :id => id,
37427
38003
  :number => number,
37428
38004
  :name => name,
37429
38005
  :quantity => quantity,
@@ -38214,7 +38790,7 @@ module Io
38214
38790
  # you can capture up to the amount of the authorization
38215
38791
  class MerchantOfRecordAuthorizationForm < AuthorizationForm
38216
38792
 
38217
- attr_reader :token, :order_number, :amount, :currency, :key, :cvv, :attributes, :ip, :options, :redirect_urls, :browser_info
38793
+ attr_reader :token, :order_number, :amount, :currency, :key, :cvv, :attributes, :ip, :options, :redirect_urls, :browser_info, :action_configuration
38218
38794
 
38219
38795
  def initialize(incoming={})
38220
38796
  super(:discriminator => AuthorizationForm::Types::MERCHANT_OF_RECORD_AUTHORIZATION_FORM)
@@ -38231,6 +38807,7 @@ module Io
38231
38807
  @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)) })
38232
38808
  @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)))
38233
38809
  @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)))
38810
+ @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)))
38234
38811
  end
38235
38812
 
38236
38813
  def to_json
@@ -38253,7 +38830,8 @@ module Io
38253
38830
  :ip => ip,
38254
38831
  :options => options.nil? ? nil : options.map { |o| o.value },
38255
38832
  :redirect_urls => redirect_urls.nil? ? nil : redirect_urls.to_hash,
38256
- :browser_info => browser_info.nil? ? nil : browser_info.to_hash
38833
+ :browser_info => browser_info.nil? ? nil : browser_info.to_hash,
38834
+ :action_configuration => action_configuration.nil? ? nil : action_configuration.to_hash
38257
38835
  }
38258
38836
  end
38259
38837
 
@@ -40023,6 +40601,32 @@ module Io
40023
40601
 
40024
40602
  end
40025
40603
 
40604
+ class OrderNumberGeneratorGeneratedNumber
40605
+
40606
+ attr_reader :number
40607
+
40608
+ def initialize(incoming={})
40609
+ opts = HttpClient::Helper.symbolize_keys(incoming)
40610
+ HttpClient::Preconditions.require_keys(opts, [:number], 'OrderNumberGeneratorGeneratedNumber')
40611
+ @number = HttpClient::Preconditions.assert_class('number', opts.delete(:number), String)
40612
+ end
40613
+
40614
+ def to_json
40615
+ JSON.dump(to_hash)
40616
+ end
40617
+
40618
+ def copy(incoming={})
40619
+ OrderNumberGeneratorGeneratedNumber.new(to_hash.merge(HttpClient::Helper.symbolize_keys(incoming)))
40620
+ end
40621
+
40622
+ def to_hash
40623
+ {
40624
+ :number => number
40625
+ }
40626
+ end
40627
+
40628
+ end
40629
+
40026
40630
  # Hexadecimal generator generates a random string, starting with a letter, of a
40027
40631
  # given length
40028
40632
  class OrderNumberGeneratorHexadecimal < OrderNumberGenerator
@@ -40715,7 +41319,7 @@ module Io
40715
41319
 
40716
41320
  end
40717
41321
 
40718
- # Defines the data needed to attach an identifer to each order created by a
41322
+ # Defines the data needed to attach an identifier to each order created by a
40719
41323
  # checkout.
40720
41324
  class OrderSubmissionIdentifierForm
40721
41325
 
@@ -40751,7 +41355,7 @@ module Io
40751
41355
  # flattened to keys.
40752
41356
  class OrderSummary
40753
41357
 
40754
- attr_reader :number, :subtotal, :shipping, :tax, :duty, :insurance, :discount, :surcharges, :adjustment, :total, :lines, :identifiers
41358
+ attr_reader :number, :subtotal, :shipping, :tax, :duty, :insurance, :discount, :surcharges, :adjustment, :total, :lines, :identifiers, :attributes
40755
41359
 
40756
41360
  def initialize(incoming={})
40757
41361
  opts = HttpClient::Helper.symbolize_keys(incoming)
@@ -40768,6 +41372,7 @@ module Io
40768
41372
  @total = (x = opts.delete(:total); x.is_a?(::Io::Flow::V0::Models::OrderSummaryPriceDetail) ? x : ::Io::Flow::V0::Models::OrderSummaryPriceDetail.new(x))
40769
41373
  @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)) }
40770
41374
  @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 })
41375
+ @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 })
40771
41376
  end
40772
41377
 
40773
41378
  def to_json
@@ -40791,7 +41396,8 @@ module Io
40791
41396
  :adjustment => adjustment.nil? ? nil : adjustment.to_hash,
40792
41397
  :total => total.to_hash,
40793
41398
  :lines => lines.map { |o| o.to_hash },
40794
- :identifiers => identifiers.nil? ? nil : identifiers
41399
+ :identifiers => identifiers.nil? ? nil : identifiers,
41400
+ :attributes => attributes.nil? ? nil : attributes
40795
41401
  }
40796
41402
  end
40797
41403
 
@@ -40899,11 +41505,12 @@ module Io
40899
41505
 
40900
41506
  class OrderSummaryLineItem
40901
41507
 
40902
- attr_reader :item, :quantity, :discount, :tax, :duty, :total, :price_attributes
41508
+ attr_reader :id, :item, :quantity, :discount, :tax, :duty, :total, :price_attributes, :attributes
40903
41509
 
40904
41510
  def initialize(incoming={})
40905
41511
  opts = HttpClient::Helper.symbolize_keys(incoming)
40906
41512
  HttpClient::Preconditions.require_keys(opts, [:item, :quantity, :total, :price_attributes], 'OrderSummaryLineItem')
41513
+ @id = (x = opts.delete(:id); x.nil? ? nil : HttpClient::Preconditions.assert_class('id', x, String))
40907
41514
  @item = (x = opts.delete(:item); x.is_a?(::Io::Flow::V0::Models::OrderSummaryItem) ? x : ::Io::Flow::V0::Models::OrderSummaryItem.new(x))
40908
41515
  @quantity = HttpClient::Preconditions.assert_class('quantity', opts.delete(:quantity), Integer)
40909
41516
  @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)))
@@ -40911,6 +41518,7 @@ module Io
40911
41518
  @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)))
40912
41519
  @total = (x = opts.delete(:total); x.is_a?(::Io::Flow::V0::Models::Price) ? x : ::Io::Flow::V0::Models::Price.new(x))
40913
41520
  @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 }
41521
+ @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 })
40914
41522
  end
40915
41523
 
40916
41524
  def to_json
@@ -40923,13 +41531,15 @@ module Io
40923
41531
 
40924
41532
  def to_hash
40925
41533
  {
41534
+ :id => id,
40926
41535
  :item => item.to_hash,
40927
41536
  :quantity => quantity,
40928
41537
  :discount => discount.nil? ? nil : discount.to_hash,
40929
41538
  :tax => tax.nil? ? nil : tax.to_hash,
40930
41539
  :duty => duty.nil? ? nil : duty.to_hash,
40931
41540
  :total => total.to_hash,
40932
- :price_attributes => price_attributes.inject({}) { |hash, o| hash[o[0]] = o[1].nil? ? nil : o[1].to_hash; hash }
41541
+ :price_attributes => price_attributes.inject({}) { |hash, o| hash[o[0]] = o[1].nil? ? nil : o[1].to_hash; hash },
41542
+ :attributes => attributes.nil? ? nil : attributes
40933
41543
  }
40934
41544
  end
40935
41545
 
@@ -43312,7 +43922,7 @@ module Io
43312
43922
  # collection of items, and metadata about those options
43313
43923
  class PhysicalDelivery < Delivery
43314
43924
 
43315
- attr_reader :id, :key, :center, :items, :options, :special_services, :prices, :total, :goods_supply
43925
+ attr_reader :id, :key, :center, :items, :options, :special_services, :prices, :total, :goods_supply, :merchant_of_record_flow_entity
43316
43926
 
43317
43927
  def initialize(incoming={})
43318
43928
  super(:discriminator => Delivery::Types::PHYSICAL_DELIVERY)
@@ -43327,6 +43937,7 @@ module Io
43327
43937
  @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)) })
43328
43938
  @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)))
43329
43939
  @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)))
43940
+ @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)))
43330
43941
  end
43331
43942
 
43332
43943
  def to_json
@@ -43347,7 +43958,8 @@ module Io
43347
43958
  :special_services => special_services.nil? ? nil : special_services.map { |o| o.value },
43348
43959
  :prices => prices.nil? ? nil : prices.map { |o| o.to_hash },
43349
43960
  :total => total.nil? ? nil : total.to_hash,
43350
- :goods_supply => goods_supply.nil? ? nil : goods_supply.value
43961
+ :goods_supply => goods_supply.nil? ? nil : goods_supply.value,
43962
+ :merchant_of_record_flow_entity => merchant_of_record_flow_entity.nil? ? nil : merchant_of_record_flow_entity.value
43351
43963
  }
43352
43964
  end
43353
43965
 
@@ -43595,7 +44207,7 @@ module Io
43595
44207
  # export
43596
44208
  class PriceBookItemExportType < ExportType
43597
44209
 
43598
- attr_reader :price_book_key, :item_numbers, :start_date, :end_date
44210
+ attr_reader :price_book_key, :item_numbers, :start_date, :end_date, :item_identifier
43599
44211
 
43600
44212
  def initialize(incoming={})
43601
44213
  super(:discriminator => ExportType::Types::PRICE_BOOK_ITEM_EXPORT_TYPE)
@@ -43604,6 +44216,7 @@ module Io
43604
44216
  @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) })
43605
44217
  @start_date = (x = opts.delete(:start_date); x.nil? ? nil : HttpClient::Preconditions.assert_class('start_date', HttpClient::Helper.to_date_time_iso8601(x), DateTime))
43606
44218
  @end_date = (x = opts.delete(:end_date); x.nil? ? nil : HttpClient::Preconditions.assert_class('end_date', HttpClient::Helper.to_date_time_iso8601(x), DateTime))
44219
+ @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))
43607
44220
  end
43608
44221
 
43609
44222
  def to_json
@@ -43619,7 +44232,8 @@ module Io
43619
44232
  :price_book_key => price_book_key,
43620
44233
  :item_numbers => item_numbers.nil? ? nil : item_numbers,
43621
44234
  :start_date => start_date,
43622
- :end_date => end_date
44235
+ :end_date => end_date,
44236
+ :item_identifier => item_identifier.value
43623
44237
  }
43624
44238
  end
43625
44239
 
@@ -52181,6 +52795,158 @@ module Io
52181
52795
 
52182
52796
  end
52183
52797
 
52798
+ # Information necessary to perform a 3ds Challenge action inline to the user
52799
+ # experience.
52800
+ class ThreedsChallengeActionDetails < AuthorizationResultActionDetails
52801
+
52802
+ attr_reader :threeds_challenge_action, :expires_at
52803
+
52804
+ def initialize(incoming={})
52805
+ super(:discriminator => AuthorizationResultActionDetails::Types::THREEDS_CHALLENGE_ACTION_DETAILS)
52806
+ opts = HttpClient::Helper.symbolize_keys(incoming)
52807
+ HttpClient::Preconditions.require_keys(opts, [:threeds_challenge_action, :expires_at], 'ThreedsChallengeActionDetails')
52808
+ @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))
52809
+ @expires_at = HttpClient::Preconditions.assert_class('expires_at', HttpClient::Helper.to_date_time_iso8601(opts.delete(:expires_at)), DateTime)
52810
+ end
52811
+
52812
+ def to_json
52813
+ JSON.dump(to_hash)
52814
+ end
52815
+
52816
+ def copy(incoming={})
52817
+ ThreedsChallengeActionDetails.new(subtype_to_hash.merge(HttpClient::Helper.symbolize_keys(incoming)))
52818
+ end
52819
+
52820
+ def subtype_to_hash
52821
+ {
52822
+ :threeds_challenge_action => threeds_challenge_action.to_hash,
52823
+ :expires_at => expires_at
52824
+ }
52825
+ end
52826
+
52827
+ end
52828
+
52829
+ # Information necessary to perform a 3ds Identify action inline to the user
52830
+ # experience.
52831
+ class ThreedsIdentifyActionDetails < AuthorizationResultActionDetails
52832
+
52833
+ attr_reader :threeds_identify_action, :expires_at
52834
+
52835
+ def initialize(incoming={})
52836
+ super(:discriminator => AuthorizationResultActionDetails::Types::THREEDS_IDENTIFY_ACTION_DETAILS)
52837
+ opts = HttpClient::Helper.symbolize_keys(incoming)
52838
+ HttpClient::Preconditions.require_keys(opts, [:threeds_identify_action, :expires_at], 'ThreedsIdentifyActionDetails')
52839
+ @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))
52840
+ @expires_at = HttpClient::Preconditions.assert_class('expires_at', HttpClient::Helper.to_date_time_iso8601(opts.delete(:expires_at)), DateTime)
52841
+ end
52842
+
52843
+ def to_json
52844
+ JSON.dump(to_hash)
52845
+ end
52846
+
52847
+ def copy(incoming={})
52848
+ ThreedsIdentifyActionDetails.new(subtype_to_hash.merge(HttpClient::Helper.symbolize_keys(incoming)))
52849
+ end
52850
+
52851
+ def subtype_to_hash
52852
+ {
52853
+ :threeds_identify_action => threeds_identify_action.to_hash,
52854
+ :expires_at => expires_at
52855
+ }
52856
+ end
52857
+
52858
+ end
52859
+
52860
+ # Instructions to the card issuer to render challenges to the user
52861
+ class ThreedsTwoBrowserActionConfiguration < ActionConfiguration
52862
+
52863
+ attr_reader :viewport
52864
+
52865
+ def initialize(incoming={})
52866
+ super(:discriminator => ActionConfiguration::Types::THREEDS_TWO_BROWSER_ACTION_CONFIGURATION)
52867
+ opts = HttpClient::Helper.symbolize_keys(incoming)
52868
+ @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))
52869
+ end
52870
+
52871
+ def to_json
52872
+ JSON.dump(to_hash)
52873
+ end
52874
+
52875
+ def copy(incoming={})
52876
+ ThreedsTwoBrowserActionConfiguration.new(subtype_to_hash.merge(HttpClient::Helper.symbolize_keys(incoming)))
52877
+ end
52878
+
52879
+ def subtype_to_hash
52880
+ {
52881
+ :viewport => viewport.value
52882
+ }
52883
+ end
52884
+
52885
+ end
52886
+
52887
+ # Data that must be passed to the 3DS Client to help the issuer ACS render a
52888
+ # challenge for the user.
52889
+ class ThreedsTwoChallengeRequest < ThreedsChallengeAction
52890
+
52891
+ attr_reader :acs_url, :challenge_request, :session_data
52892
+
52893
+ def initialize(incoming={})
52894
+ super(:discriminator => ThreedsChallengeAction::Types::THREEDS_TWO_CHALLENGE_REQUEST)
52895
+ opts = HttpClient::Helper.symbolize_keys(incoming)
52896
+ HttpClient::Preconditions.require_keys(opts, [:acs_url, :challenge_request], 'ThreedsTwoChallengeRequest')
52897
+ @acs_url = HttpClient::Preconditions.assert_class('acs_url', opts.delete(:acs_url), String)
52898
+ @challenge_request = HttpClient::Preconditions.assert_class('challenge_request', opts.delete(:challenge_request), String)
52899
+ @session_data = (x = opts.delete(:session_data); x.nil? ? nil : HttpClient::Preconditions.assert_class('session_data', x, String))
52900
+ end
52901
+
52902
+ def to_json
52903
+ JSON.dump(to_hash)
52904
+ end
52905
+
52906
+ def copy(incoming={})
52907
+ ThreedsTwoChallengeRequest.new(subtype_to_hash.merge(HttpClient::Helper.symbolize_keys(incoming)))
52908
+ end
52909
+
52910
+ def subtype_to_hash
52911
+ {
52912
+ :acs_url => acs_url,
52913
+ :challenge_request => challenge_request,
52914
+ :session_data => session_data
52915
+ }
52916
+ end
52917
+
52918
+ end
52919
+
52920
+ # Data that must be rendered by the 3DS Client in order to help the issuer ACS
52921
+ # silently identify the user. This format doesn't decompose the ACS identify
52922
+ # method.
52923
+ class ThreedsTwoMethod < ThreedsIdentifyAction
52924
+
52925
+ attr_reader :method
52926
+
52927
+ def initialize(incoming={})
52928
+ super(:discriminator => ThreedsIdentifyAction::Types::THREEDS_TWO_METHOD)
52929
+ opts = HttpClient::Helper.symbolize_keys(incoming)
52930
+ HttpClient::Preconditions.require_keys(opts, [:method], 'ThreedsTwoMethod')
52931
+ @method = HttpClient::Preconditions.assert_class('method', opts.delete(:method), String)
52932
+ end
52933
+
52934
+ def to_json
52935
+ JSON.dump(to_hash)
52936
+ end
52937
+
52938
+ def copy(incoming={})
52939
+ ThreedsTwoMethod.new(subtype_to_hash.merge(HttpClient::Helper.symbolize_keys(incoming)))
52940
+ end
52941
+
52942
+ def subtype_to_hash
52943
+ {
52944
+ :method => method
52945
+ }
52946
+ end
52947
+
52948
+ end
52949
+
52184
52950
  # Service shipping tier available in this tier group. e.g. Standard tier,
52185
52951
  # Express tier, Economy tier
52186
52952
  class Tier
@@ -54685,7 +55451,7 @@ module Io
54685
55451
  end
54686
55452
 
54687
55453
  def Helper.to_big_decimal(value)
54688
- value ? BigDecimal.new(value.to_s) : nil
55454
+ value ? BigDecimal(value.to_s) : nil
54689
55455
  end
54690
55456
 
54691
55457
  def Helper.to_object(value)