flowcommerce 0.2.82 → 0.2.89

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
- SHA1:
3
- metadata.gz: d4aec1af1549e7676afef9e8af577a559c8f25f7
4
- data.tar.gz: ea29719c4e347443b5d22195bbb5f40de6bac680
2
+ SHA256:
3
+ metadata.gz: 9870871fa06f875aa06baf8d7184cc177c6fb41cf76b4d300be4813b52a8a8e7
4
+ data.tar.gz: 9f2d4c6d58ed7bcb0df6939923b516fd3f604eecd77c9ad86633b3f4ba9c813a
5
5
  SHA512:
6
- metadata.gz: 904fcdf22f519d5bb5d1c922ee3e770e45fcdb7d82d9d09289816b2b57b71b72ddbcb1db48cfe8c035213f019fdb64515d1a4874bc9939a86b626ed5c8e87b1d
7
- data.tar.gz: e51d3987b6e4a53e50fc105fec35c04e21bfd99ca2bb55ad15cc5da58f80169fade1bab05c871acb36c16ac39e178b82d7a4df4fb6d89529895c5d748fcfff5d
6
+ metadata.gz: f857bebfcc2045c6e8e1e57b3b8ccf43f56171ddaefe86ff09cd3522e6447e499e2ae0fb557fa9585de0aed1d849bf32e8b3a9daf7169fd41e0ab0dab80df3a5
7
+ data.tar.gz: 7cc64ae8548c01741245fc9eebcd69034009e259e8ead0b35d29e56a8b695247c879c63d9ea84846ce4479976c701a3e489093925dbd1f03577b303961eb0638
data/README.md CHANGED
@@ -2,13 +2,6 @@
2
2
 
3
3
  Native ruby client to the Flow API (https://api.flow.io)
4
4
 
5
- ## Status
6
-
7
- Please note that this library and APIs are in ALPHA and are subject to
8
- change and will break in the future. Once Flow Commerce releases its
9
- official 1.0 library, API changes will be backwards compatible. Until
10
- then - we are super grateful for your patience as we finalize the API
11
- for our launch.
12
5
 
13
6
  ## Installation
14
7
 
@@ -1,6 +1,6 @@
1
1
  # Generated by API Builder - https://www.apibuilder.io
2
- # Service version: 0.9.42
3
- # apibuilder 0.15.9 app.apibuilder.io/flow/api/latest/ruby_client
2
+ # Service version: 0.9.78
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.42' 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.78' 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) }
@@ -848,10 +849,14 @@ module Io
848
849
  r.map { |x| ::Io::Flow::V0::Models::CheckoutAttribute.new(x) }
849
850
  end
850
851
 
851
- def post(organization, checkout_attribute_form)
852
+ def post(organization, checkout_attribute_form, incoming={})
852
853
  HttpClient::Preconditions.assert_class('organization', organization, String)
854
+ opts = HttpClient::Helper.symbolize_keys(incoming)
855
+ query = {
856
+ :context => (x = opts.delete(:context); x.nil? ? nil : HttpClient::Preconditions.assert_class('context', x, String))
857
+ }.delete_if { |k, v| v.nil? }
853
858
  (x = checkout_attribute_form; x.is_a?(::Io::Flow::V0::Models::CheckoutAttributeForm) ? x : ::Io::Flow::V0::Models::CheckoutAttributeForm.new(x))
854
- r = @client.request("/#{CGI.escape(organization)}/checkout/attributes").with_json(checkout_attribute_form.to_json).post
859
+ r = @client.request("/#{CGI.escape(organization)}/checkout/attributes").with_query(query).with_json(checkout_attribute_form.to_json).post
855
860
  ::Io::Flow::V0::Models::CheckoutAttribute.new(r)
856
861
  end
857
862
 
@@ -862,11 +867,15 @@ module Io
862
867
  ::Io::Flow::V0::Models::CheckoutAttribute.new(r)
863
868
  end
864
869
 
865
- def put_by_id(organization, id, checkout_attribute_form)
870
+ def put_by_id(organization, id, checkout_attribute_form, incoming={})
866
871
  HttpClient::Preconditions.assert_class('organization', organization, String)
867
872
  HttpClient::Preconditions.assert_class('id', id, String)
873
+ opts = HttpClient::Helper.symbolize_keys(incoming)
874
+ query = {
875
+ :context => (x = opts.delete(:context); x.nil? ? nil : HttpClient::Preconditions.assert_class('context', x, String))
876
+ }.delete_if { |k, v| v.nil? }
868
877
  (x = checkout_attribute_form; x.is_a?(::Io::Flow::V0::Models::CheckoutAttributeForm) ? x : ::Io::Flow::V0::Models::CheckoutAttributeForm.new(x))
869
- r = @client.request("/#{CGI.escape(organization)}/checkout/attributes/#{CGI.escape(id)}").with_json(checkout_attribute_form.to_json).put
878
+ r = @client.request("/#{CGI.escape(organization)}/checkout/attributes/#{CGI.escape(id)}").with_query(query).with_json(checkout_attribute_form.to_json).put
870
879
  ::Io::Flow::V0::Models::CheckoutAttribute.new(r)
871
880
  end
872
881
 
@@ -895,7 +904,8 @@ module Io
895
904
  query = {
896
905
  :number => (x = opts.delete(:number); x.nil? ? nil : HttpClient::Preconditions.assert_class('number', x, Array).map { |v| HttpClient::Preconditions.assert_class('number', v, String) }),
897
906
  :limit => HttpClient::Preconditions.assert_class('limit', (x = opts.delete(:limit); x.nil? ? 25 : x), Integer),
898
- :offset => HttpClient::Preconditions.assert_class('offset', (x = opts.delete(:offset); x.nil? ? 0 : x), Integer)
907
+ :offset => HttpClient::Preconditions.assert_class('offset', (x = opts.delete(:offset); x.nil? ? 0 : x), Integer),
908
+ :context => (x = opts.delete(:context); x.nil? ? nil : HttpClient::Preconditions.assert_class('context', x, String))
899
909
  }.delete_if { |k, v| v.nil? }
900
910
  r = @client.request("/#{CGI.escape(organization)}/experiences/#{CGI.escape(experience_key)}/item/content/checkout").with_query(query).get
901
911
  r.map { |x| ::Io::Flow::V0::Models::CheckoutItemContent.new(x) }
@@ -929,7 +939,8 @@ module Io
929
939
  HttpClient::Preconditions.assert_class('organization', organization, String)
930
940
  opts = HttpClient::Helper.symbolize_keys(incoming)
931
941
  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) })
942
+ :expand => (x = opts.delete(:expand); x.nil? ? nil : HttpClient::Preconditions.assert_class('expand', x, Array).map { |v| HttpClient::Preconditions.assert_class('expand', v, String) }),
943
+ :context => (x = opts.delete(:context); x.nil? ? nil : HttpClient::Preconditions.assert_class('context', x, String))
933
944
  }.delete_if { |k, v| v.nil? }
934
945
  (x = credit_payment_form; x.is_a?(::Io::Flow::V0::Models::CreditPaymentForm) ? x : ::Io::Flow::V0::Models::CreditPaymentForm.new(x))
935
946
  r = @client.request("/#{CGI.escape(organization)}/credit/payments").with_query(query).with_json(credit_payment_form.to_json).post
@@ -966,17 +977,22 @@ module Io
966
977
  HttpClient::Preconditions.assert_class('key', key, String)
967
978
  opts = HttpClient::Helper.symbolize_keys(incoming)
968
979
  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) })
980
+ :expand => (x = opts.delete(:expand); x.nil? ? nil : HttpClient::Preconditions.assert_class('expand', x, Array).map { |v| HttpClient::Preconditions.assert_class('expand', v, String) }),
981
+ :context => (x = opts.delete(:context); x.nil? ? nil : HttpClient::Preconditions.assert_class('context', x, String))
970
982
  }.delete_if { |k, v| v.nil? }
971
983
  (x = credit_payment_form; x.is_a?(::Io::Flow::V0::Models::CreditPaymentForm) ? x : ::Io::Flow::V0::Models::CreditPaymentForm.new(x))
972
984
  r = @client.request("/#{CGI.escape(organization)}/credit/payments/#{CGI.escape(key)}").with_query(query).with_json(credit_payment_form.to_json).put
973
985
  ::Io::Flow::V0::Models::CreditPayment.new(r)
974
986
  end
975
987
 
976
- def delete_by_key(organization, key)
988
+ def delete_by_key(organization, key, incoming={})
977
989
  HttpClient::Preconditions.assert_class('organization', organization, String)
978
990
  HttpClient::Preconditions.assert_class('key', key, String)
979
- r = @client.request("/#{CGI.escape(organization)}/credit/payments/#{CGI.escape(key)}").delete
991
+ opts = HttpClient::Helper.symbolize_keys(incoming)
992
+ query = {
993
+ :context => (x = opts.delete(:context); x.nil? ? nil : HttpClient::Preconditions.assert_class('context', x, String))
994
+ }.delete_if { |k, v| v.nil? }
995
+ r = @client.request("/#{CGI.escape(organization)}/credit/payments/#{CGI.escape(key)}").with_query(query).delete
980
996
  nil
981
997
  end
982
998
 
@@ -1054,6 +1070,7 @@ module Io
1054
1070
  :ip => (x = opts.delete(:ip); x.nil? ? nil : HttpClient::Preconditions.assert_class('ip', x, String)),
1055
1071
  :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
1072
  :shipping_configuration_key => (x = opts.delete(:shipping_configuration_key); x.nil? ? nil : HttpClient::Preconditions.assert_class('shipping_configuration_key', x, String)),
1073
+ :context => (x = opts.delete(:context); x.nil? ? nil : HttpClient::Preconditions.assert_class('context', x, String)),
1057
1074
  :limit => HttpClient::Preconditions.assert_class('limit', (x = opts.delete(:limit); x.nil? ? 25 : x), Integer),
1058
1075
  :offset => HttpClient::Preconditions.assert_class('offset', (x = opts.delete(:offset); x.nil? ? 0 : x), Integer),
1059
1076
  :sort => HttpClient::Preconditions.assert_class('sort', (x = opts.delete(:sort); x.nil? ? "position" : x), String)
@@ -1063,10 +1080,14 @@ module Io
1063
1080
  end
1064
1081
 
1065
1082
  # Add experience
1066
- def post(organization, experience_form)
1083
+ def post(organization, experience_form, incoming={})
1067
1084
  HttpClient::Preconditions.assert_class('organization', organization, String)
1085
+ opts = HttpClient::Helper.symbolize_keys(incoming)
1086
+ query = {
1087
+ :context => (x = opts.delete(:context); x.nil? ? nil : HttpClient::Preconditions.assert_class('context', x, String))
1088
+ }.delete_if { |k, v| v.nil? }
1068
1089
  (x = experience_form; x.is_a?(::Io::Flow::V0::Models::ExperienceForm) ? x : ::Io::Flow::V0::Models::ExperienceForm.new(x))
1069
- r = @client.request("/#{CGI.escape(organization)}/experiences").with_json(experience_form.to_json).post
1090
+ r = @client.request("/#{CGI.escape(organization)}/experiences").with_query(query).with_json(experience_form.to_json).post
1070
1091
  ::Io::Flow::V0::Models::Experience.new(r)
1071
1092
  end
1072
1093
 
@@ -1081,7 +1102,8 @@ module Io
1081
1102
  :experience => (x = opts.delete(:experience); x.nil? ? nil : HttpClient::Preconditions.assert_class('experience', x, String)),
1082
1103
  :country => (x = opts.delete(:country); x.nil? ? nil : HttpClient::Preconditions.assert_class('country', x, String)),
1083
1104
  :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))
1105
+ :currency => (x = opts.delete(:currency); x.nil? ? nil : HttpClient::Preconditions.assert_class('currency', x, String)),
1106
+ :context => (x = opts.delete(:context); x.nil? ? nil : HttpClient::Preconditions.assert_class('context', x, String))
1085
1107
  }.delete_if { |k, v| v.nil? }
1086
1108
  r = @client.request("/#{CGI.escape(organization)}/experiences/conversions/#{CGI.escape(base)}/#{CGI.escape(amount)}").with_query(query).get
1087
1109
  ::Io::Flow::V0::Models::PriceWithBase.new(r)
@@ -1101,6 +1123,7 @@ module Io
1101
1123
  :ip => (x = opts.delete(:ip); x.nil? ? nil : HttpClient::Preconditions.assert_class('ip', x, String)),
1102
1124
  :currency => (x = opts.delete(:currency); x.nil? ? nil : HttpClient::Preconditions.assert_class('currency', x, String)),
1103
1125
  :language => (x = opts.delete(:language); x.nil? ? nil : HttpClient::Preconditions.assert_class('language', x, String)),
1126
+ :context => (x = opts.delete(:context); x.nil? ? nil : HttpClient::Preconditions.assert_class('context', x, String)),
1104
1127
  :limit => HttpClient::Preconditions.assert_class('limit', (x = opts.delete(:limit); x.nil? ? 25 : x), Integer),
1105
1128
  :offset => HttpClient::Preconditions.assert_class('offset', (x = opts.delete(:offset); x.nil? ? 0 : x), Integer),
1106
1129
  :sort => HttpClient::Preconditions.assert_class('sort', (x = opts.delete(:sort); x.nil? ? "-created_at" : x), String)
@@ -1119,7 +1142,8 @@ module Io
1119
1142
  :country => (x = opts.delete(:country); x.nil? ? nil : HttpClient::Preconditions.assert_class('country', x, String)),
1120
1143
  :ip => (x = opts.delete(:ip); x.nil? ? nil : HttpClient::Preconditions.assert_class('ip', x, String)),
1121
1144
  :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))
1145
+ :language => (x = opts.delete(:language); x.nil? ? nil : HttpClient::Preconditions.assert_class('language', x, String)),
1146
+ :context => (x = opts.delete(:context); x.nil? ? nil : HttpClient::Preconditions.assert_class('context', x, String))
1123
1147
  }.delete_if { |k, v| v.nil? }
1124
1148
  r = @client.request("/#{CGI.escape(organization)}/experiences/items/#{CGI.escape(number)}").with_query(query).get
1125
1149
  ::Io::Flow::V0::Models::Item.new(r)
@@ -1140,6 +1164,7 @@ module Io
1140
1164
  query = {
1141
1165
  :id => (x = opts.delete(:id); x.nil? ? nil : HttpClient::Preconditions.assert_class('id', x, Array).map { |v| HttpClient::Preconditions.assert_class('id', v, String) }),
1142
1166
  :key => (x = opts.delete(:key); x.nil? ? nil : HttpClient::Preconditions.assert_class('key', x, Array).map { |v| HttpClient::Preconditions.assert_class('key', v, String) }),
1167
+ :context => (x = opts.delete(:context); x.nil? ? nil : HttpClient::Preconditions.assert_class('context', x, String)),
1143
1168
  :limit => HttpClient::Preconditions.assert_class('limit', (x = opts.delete(:limit); x.nil? ? 25 : x), Integer),
1144
1169
  :offset => HttpClient::Preconditions.assert_class('offset', (x = opts.delete(:offset); x.nil? ? 0 : x), Integer),
1145
1170
  :sort => HttpClient::Preconditions.assert_class('sort', (x = opts.delete(:sort); x.nil? ? "journal_timestamp" : x), String)
@@ -1148,18 +1173,26 @@ module Io
1148
1173
  r.map { |x| ::Io::Flow::V0::Models::ExperienceVersion.new(x) }
1149
1174
  end
1150
1175
 
1151
- def get_currency_and_formats_by_experience_key(organization, experience_key)
1176
+ def get_currency_and_formats_by_experience_key(organization, experience_key, incoming={})
1152
1177
  HttpClient::Preconditions.assert_class('organization', organization, String)
1153
1178
  HttpClient::Preconditions.assert_class('experience_key', experience_key, String)
1154
- r = @client.request("/#{CGI.escape(organization)}/experiences/#{CGI.escape(experience_key)}/currency/formats").get
1179
+ opts = HttpClient::Helper.symbolize_keys(incoming)
1180
+ query = {
1181
+ :context => (x = opts.delete(:context); x.nil? ? nil : HttpClient::Preconditions.assert_class('context', x, String))
1182
+ }.delete_if { |k, v| v.nil? }
1183
+ r = @client.request("/#{CGI.escape(organization)}/experiences/#{CGI.escape(experience_key)}/currency/formats").with_query(query).get
1155
1184
  ::Io::Flow::V0::Models::ExperienceCurrencyFormat.new(r)
1156
1185
  end
1157
1186
 
1158
- def put_currency_and_formats_by_experience_key(organization, experience_key, experience_currency_format_form)
1187
+ def put_currency_and_formats_by_experience_key(organization, experience_key, experience_currency_format_form, incoming={})
1159
1188
  HttpClient::Preconditions.assert_class('organization', organization, String)
1160
1189
  HttpClient::Preconditions.assert_class('experience_key', experience_key, String)
1190
+ opts = HttpClient::Helper.symbolize_keys(incoming)
1191
+ query = {
1192
+ :context => (x = opts.delete(:context); x.nil? ? nil : HttpClient::Preconditions.assert_class('context', x, String))
1193
+ }.delete_if { |k, v| v.nil? }
1161
1194
  (x = experience_currency_format_form; x.is_a?(::Io::Flow::V0::Models::ExperienceCurrencyFormatForm) ? x : ::Io::Flow::V0::Models::ExperienceCurrencyFormatForm.new(x))
1162
- r = @client.request("/#{CGI.escape(organization)}/experiences/#{CGI.escape(experience_key)}/currency/formats").with_json(experience_currency_format_form.to_json).put
1195
+ r = @client.request("/#{CGI.escape(organization)}/experiences/#{CGI.escape(experience_key)}/currency/formats").with_query(query).with_json(experience_currency_format_form.to_json).put
1163
1196
  ::Io::Flow::V0::Models::ExperienceCurrencyFormat.new(r)
1164
1197
  end
1165
1198
 
@@ -1171,7 +1204,8 @@ module Io
1171
1204
  opts = HttpClient::Helper.symbolize_keys(incoming)
1172
1205
  query = {
1173
1206
  :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))
1207
+ :currency => (x = opts.delete(:currency); x.nil? ? nil : HttpClient::Preconditions.assert_class('currency', x, String)),
1208
+ :context => (x = opts.delete(:context); x.nil? ? nil : HttpClient::Preconditions.assert_class('context', x, String))
1175
1209
  }.delete_if { |k, v| v.nil? }
1176
1210
  r = @client.request("/#{CGI.escape(organization)}/experiences/#{CGI.escape(experience_key)}/local/items").with_query(query).get
1177
1211
  r.map { |x| ::Io::Flow::V0::Models::LocalItem.new(x) }
@@ -1204,11 +1238,15 @@ module Io
1204
1238
  r.map { |x| ::Io::Flow::V0::Models::ItemMargin.new(x) }
1205
1239
  end
1206
1240
 
1207
- def post_margins_by_experience_key(organization, experience_key, item_margin_post_form)
1241
+ def post_margins_by_experience_key(organization, experience_key, item_margin_post_form, incoming={})
1208
1242
  HttpClient::Preconditions.assert_class('organization', organization, String)
1209
1243
  HttpClient::Preconditions.assert_class('experience_key', experience_key, String)
1244
+ opts = HttpClient::Helper.symbolize_keys(incoming)
1245
+ query = {
1246
+ :context => (x = opts.delete(:context); x.nil? ? nil : HttpClient::Preconditions.assert_class('context', x, String))
1247
+ }.delete_if { |k, v| v.nil? }
1210
1248
  (x = item_margin_post_form; x.is_a?(::Io::Flow::V0::Models::ItemMarginPostForm) ? x : ::Io::Flow::V0::Models::ItemMarginPostForm.new(x))
1211
- r = @client.request("/#{CGI.escape(organization)}/experiences/#{CGI.escape(experience_key)}/margins").with_json(item_margin_post_form.to_json).post
1249
+ r = @client.request("/#{CGI.escape(organization)}/experiences/#{CGI.escape(experience_key)}/margins").with_query(query).with_json(item_margin_post_form.to_json).post
1212
1250
  ::Io::Flow::V0::Models::ItemMargin.new(r)
1213
1251
  end
1214
1252
 
@@ -1234,12 +1272,16 @@ module Io
1234
1272
  ::Io::Flow::V0::Models::ItemMargin.new(r)
1235
1273
  end
1236
1274
 
1237
- def put_margins_by_experience_key_and_key(organization, experience_key, key, item_margin_put_form)
1275
+ def put_margins_by_experience_key_and_key(organization, experience_key, key, item_margin_put_form, incoming={})
1238
1276
  HttpClient::Preconditions.assert_class('organization', organization, String)
1239
1277
  HttpClient::Preconditions.assert_class('experience_key', experience_key, String)
1240
1278
  HttpClient::Preconditions.assert_class('key', key, String)
1279
+ opts = HttpClient::Helper.symbolize_keys(incoming)
1280
+ query = {
1281
+ :context => (x = opts.delete(:context); x.nil? ? nil : HttpClient::Preconditions.assert_class('context', x, String))
1282
+ }.delete_if { |k, v| v.nil? }
1241
1283
  (x = item_margin_put_form; x.is_a?(::Io::Flow::V0::Models::ItemMarginPutForm) ? x : ::Io::Flow::V0::Models::ItemMarginPutForm.new(x))
1242
- r = @client.request("/#{CGI.escape(organization)}/experiences/#{CGI.escape(experience_key)}/margins/#{CGI.escape(key)}").with_json(item_margin_put_form.to_json).put
1284
+ r = @client.request("/#{CGI.escape(organization)}/experiences/#{CGI.escape(experience_key)}/margins/#{CGI.escape(key)}").with_query(query).with_json(item_margin_put_form.to_json).put
1243
1285
  ::Io::Flow::V0::Models::ItemMargin.new(r)
1244
1286
  end
1245
1287
 
@@ -1257,7 +1299,8 @@ module Io
1257
1299
  opts = HttpClient::Helper.symbolize_keys(incoming)
1258
1300
  query = {
1259
1301
  :limit => HttpClient::Preconditions.assert_class('limit', (x = opts.delete(:limit); x.nil? ? 25 : x), Integer),
1260
- :offset => HttpClient::Preconditions.assert_class('offset', (x = opts.delete(:offset); x.nil? ? 0 : x), Integer)
1302
+ :offset => HttpClient::Preconditions.assert_class('offset', (x = opts.delete(:offset); x.nil? ? 0 : x), Integer),
1303
+ :context => (x = opts.delete(:context); x.nil? ? nil : HttpClient::Preconditions.assert_class('context', x, String))
1261
1304
  }.delete_if { |k, v| v.nil? }
1262
1305
  r = @client.request("/#{CGI.escape(organization)}/experiences/#{CGI.escape(experience_key)}/payment-method-types").with_query(query).get
1263
1306
  r.map { |x| ::Io::Flow::V0::Models::PaymentMethodType.new(x) }
@@ -1271,7 +1314,8 @@ module Io
1271
1314
  :payment_method_type => (x = opts.delete(:payment_method_type); x.nil? ? nil : HttpClient::Preconditions.assert_class('payment_method_type', x, Array).map { |v| (x = v; x.is_a?(::Io::Flow::V0::Models::PaymentMethodType) ? x : ::Io::Flow::V0::Models::PaymentMethodType.apply(x)).value }),
1272
1315
  :tags => (x = opts.delete(:tags); x.nil? ? nil : HttpClient::Preconditions.assert_class('tags', x, Array).map { |v| HttpClient::Preconditions.assert_class('tags', v, String) }),
1273
1316
  :amount => (x = opts.delete(:amount); x.nil? ? nil : HttpClient::Preconditions.assert_class('amount', x, String)),
1274
- :currency => (x = opts.delete(:currency); x.nil? ? nil : HttpClient::Preconditions.assert_class('currency', x, String))
1317
+ :currency => (x = opts.delete(:currency); x.nil? ? nil : HttpClient::Preconditions.assert_class('currency', x, String)),
1318
+ :context => (x = opts.delete(:context); x.nil? ? nil : HttpClient::Preconditions.assert_class('context', x, String))
1275
1319
  }.delete_if { |k, v| v.nil? }
1276
1320
  r = @client.request("/#{CGI.escape(organization)}/experiences/#{CGI.escape(experience_key)}/payment/method/rules").with_query(query).get
1277
1321
  r.map { |x| ::Io::Flow::V0::Models::PaymentMethodRule.new(x) }
@@ -1279,11 +1323,15 @@ module Io
1279
1323
 
1280
1324
  # Change the ordering or payment tags for an experience. Every post must
1281
1325
  # include one entry for each payment method offered by Flow.
1282
- def put_payment_and_method_and_rules_by_experience_key(organization, experience_key, experience_payment_method_rule_forms)
1326
+ def put_payment_and_method_and_rules_by_experience_key(organization, experience_key, experience_payment_method_rule_forms, incoming={})
1283
1327
  HttpClient::Preconditions.assert_class('organization', organization, String)
1284
1328
  HttpClient::Preconditions.assert_class('experience_key', experience_key, String)
1329
+ opts = HttpClient::Helper.symbolize_keys(incoming)
1330
+ query = {
1331
+ :context => (x = opts.delete(:context); x.nil? ? nil : HttpClient::Preconditions.assert_class('context', x, String))
1332
+ }.delete_if { |k, v| v.nil? }
1285
1333
  HttpClient::Preconditions.assert_class('experience_payment_method_rule_forms', experience_payment_method_rule_forms, Array).map { |v| (x = v; x.is_a?(::Io::Flow::V0::Models::ExperiencePaymentMethodRuleForm) ? x : ::Io::Flow::V0::Models::ExperiencePaymentMethodRuleForm.new(x)) }
1286
- r = @client.request("/#{CGI.escape(organization)}/experiences/#{CGI.escape(experience_key)}/payment/method/rules").with_json(experience_payment_method_rule_forms.map { |o| o.to_hash }.to_json).put
1334
+ r = @client.request("/#{CGI.escape(organization)}/experiences/#{CGI.escape(experience_key)}/payment/method/rules").with_query(query).with_json(experience_payment_method_rule_forms.map { |o| o.to_hash }.to_json).put
1287
1335
  r.map { |x| ::Io::Flow::V0::Models::PaymentMethodRule.new(x) }
1288
1336
  end
1289
1337
 
@@ -1302,19 +1350,27 @@ module Io
1302
1350
  r.map { |x| ::Io::Flow::V0::Models::ExperiencePriceBookMapping.new(x) }
1303
1351
  end
1304
1352
 
1305
- def post_price_and_books_by_experience_key(organization, experience_key, experience_price_book_mapping_form)
1353
+ def post_price_and_books_by_experience_key(organization, experience_key, experience_price_book_mapping_form, incoming={})
1306
1354
  HttpClient::Preconditions.assert_class('organization', organization, String)
1307
1355
  HttpClient::Preconditions.assert_class('experience_key', experience_key, String)
1356
+ opts = HttpClient::Helper.symbolize_keys(incoming)
1357
+ query = {
1358
+ :context => (x = opts.delete(:context); x.nil? ? nil : HttpClient::Preconditions.assert_class('context', x, String))
1359
+ }.delete_if { |k, v| v.nil? }
1308
1360
  (x = experience_price_book_mapping_form; x.is_a?(::Io::Flow::V0::Models::ExperiencePriceBookMappingForm) ? x : ::Io::Flow::V0::Models::ExperiencePriceBookMappingForm.new(x))
1309
- r = @client.request("/#{CGI.escape(organization)}/experiences/#{CGI.escape(experience_key)}/price/books").with_json(experience_price_book_mapping_form.to_json).post
1361
+ r = @client.request("/#{CGI.escape(organization)}/experiences/#{CGI.escape(experience_key)}/price/books").with_query(query).with_json(experience_price_book_mapping_form.to_json).post
1310
1362
  ::Io::Flow::V0::Models::ExperiencePriceBookMapping.new(r)
1311
1363
  end
1312
1364
 
1313
- def put_price_and_books_by_experience_key(organization, experience_key, experience_price_book_mapping_put_form)
1365
+ def put_price_and_books_by_experience_key(organization, experience_key, experience_price_book_mapping_put_form, incoming={})
1314
1366
  HttpClient::Preconditions.assert_class('organization', organization, String)
1315
1367
  HttpClient::Preconditions.assert_class('experience_key', experience_key, String)
1368
+ opts = HttpClient::Helper.symbolize_keys(incoming)
1369
+ query = {
1370
+ :context => (x = opts.delete(:context); x.nil? ? nil : HttpClient::Preconditions.assert_class('context', x, String))
1371
+ }.delete_if { |k, v| v.nil? }
1316
1372
  (x = experience_price_book_mapping_put_form; x.is_a?(::Io::Flow::V0::Models::ExperiencePriceBookMappingPutForm) ? x : ::Io::Flow::V0::Models::ExperiencePriceBookMappingPutForm.new(x))
1317
- r = @client.request("/#{CGI.escape(organization)}/experiences/#{CGI.escape(experience_key)}/price/books").with_json(experience_price_book_mapping_put_form.to_json).put
1373
+ r = @client.request("/#{CGI.escape(organization)}/experiences/#{CGI.escape(experience_key)}/price/books").with_query(query).with_json(experience_price_book_mapping_put_form.to_json).put
1318
1374
  r.map { |x| ::Io::Flow::V0::Models::ExperiencePriceBookMapping.new(x) }
1319
1375
  end
1320
1376
 
@@ -1335,37 +1391,53 @@ module Io
1335
1391
  end
1336
1392
 
1337
1393
  # Returns information about a specific experience.
1338
- def get_by_key(organization, key)
1394
+ def get_by_key(organization, key, incoming={})
1339
1395
  HttpClient::Preconditions.assert_class('organization', organization, String)
1340
1396
  HttpClient::Preconditions.assert_class('key', key, String)
1341
- r = @client.request("/#{CGI.escape(organization)}/experiences/#{CGI.escape(key)}").get
1397
+ opts = HttpClient::Helper.symbolize_keys(incoming)
1398
+ query = {
1399
+ :context => (x = opts.delete(:context); x.nil? ? nil : HttpClient::Preconditions.assert_class('context', x, String))
1400
+ }.delete_if { |k, v| v.nil? }
1401
+ r = @client.request("/#{CGI.escape(organization)}/experiences/#{CGI.escape(key)}").with_query(query).get
1342
1402
  ::Io::Flow::V0::Models::Experience.new(r)
1343
1403
  end
1344
1404
 
1345
1405
  # Update experience with the specified key, creating if it does not exist.
1346
- def put_by_key(organization, key, experience_form)
1406
+ def put_by_key(organization, key, experience_form, incoming={})
1347
1407
  HttpClient::Preconditions.assert_class('organization', organization, String)
1348
1408
  HttpClient::Preconditions.assert_class('key', key, String)
1409
+ opts = HttpClient::Helper.symbolize_keys(incoming)
1410
+ query = {
1411
+ :context => (x = opts.delete(:context); x.nil? ? nil : HttpClient::Preconditions.assert_class('context', x, String))
1412
+ }.delete_if { |k, v| v.nil? }
1349
1413
  (x = experience_form; x.is_a?(::Io::Flow::V0::Models::ExperienceForm) ? x : ::Io::Flow::V0::Models::ExperienceForm.new(x))
1350
- r = @client.request("/#{CGI.escape(organization)}/experiences/#{CGI.escape(key)}").with_json(experience_form.to_json).put
1414
+ r = @client.request("/#{CGI.escape(organization)}/experiences/#{CGI.escape(key)}").with_query(query).with_json(experience_form.to_json).put
1351
1415
  ::Io::Flow::V0::Models::Experience.new(r)
1352
1416
  end
1353
1417
 
1354
1418
  # Delete the experience with this key
1355
- def delete_by_key(organization, key)
1419
+ def delete_by_key(organization, key, incoming={})
1356
1420
  HttpClient::Preconditions.assert_class('organization', organization, String)
1357
1421
  HttpClient::Preconditions.assert_class('key', key, String)
1358
- r = @client.request("/#{CGI.escape(organization)}/experiences/#{CGI.escape(key)}").delete
1422
+ opts = HttpClient::Helper.symbolize_keys(incoming)
1423
+ query = {
1424
+ :context => (x = opts.delete(:context); x.nil? ? nil : HttpClient::Preconditions.assert_class('context', x, String))
1425
+ }.delete_if { |k, v| v.nil? }
1426
+ r = @client.request("/#{CGI.escape(organization)}/experiences/#{CGI.escape(key)}").with_query(query).delete
1359
1427
  nil
1360
1428
  end
1361
1429
 
1362
1430
  # Clones the experience with the specified key, using data from
1363
1431
  # experience_clone_form.
1364
- def post_clone_by_key(organization, key, experience_clone_form)
1432
+ def post_clone_by_key(organization, key, experience_clone_form, incoming={})
1365
1433
  HttpClient::Preconditions.assert_class('organization', organization, String)
1366
1434
  HttpClient::Preconditions.assert_class('key', key, String)
1435
+ opts = HttpClient::Helper.symbolize_keys(incoming)
1436
+ query = {
1437
+ :context => (x = opts.delete(:context); x.nil? ? nil : HttpClient::Preconditions.assert_class('context', x, String))
1438
+ }.delete_if { |k, v| v.nil? }
1367
1439
  (x = experience_clone_form; x.is_a?(::Io::Flow::V0::Models::ExperienceCloneForm) ? x : ::Io::Flow::V0::Models::ExperienceCloneForm.new(x))
1368
- r = @client.request("/#{CGI.escape(organization)}/experiences/#{CGI.escape(key)}/clone").with_json(experience_clone_form.to_json).post
1440
+ r = @client.request("/#{CGI.escape(organization)}/experiences/#{CGI.escape(key)}/clone").with_query(query).with_json(experience_clone_form.to_json).post
1369
1441
  ::Io::Flow::V0::Models::ExperienceClone.new(r)
1370
1442
  end
1371
1443
 
@@ -1392,43 +1464,60 @@ module Io
1392
1464
  :ship_from_province => (x = opts.delete(:ship_from_province); x.nil? ? nil : HttpClient::Preconditions.assert_class('ship_from_province', x, String)),
1393
1465
  :ship_to_country => (x = opts.delete(:ship_to_country); x.nil? ? nil : HttpClient::Preconditions.assert_class('ship_to_country', x, String)),
1394
1466
  :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))
1467
+ :currency => (x = opts.delete(:currency); x.nil? ? nil : HttpClient::Preconditions.assert_class('currency', x, String)),
1468
+ :context => (x = opts.delete(:context); x.nil? ? nil : HttpClient::Preconditions.assert_class('context', x, String))
1396
1469
  }.delete_if { |k, v| v.nil? }
1397
1470
  r = @client.request("/#{CGI.escape(organization)}/experiences/#{CGI.escape(key)}/items/#{CGI.escape(number)}/price").with_query(query).get
1398
1471
  ::Io::Flow::V0::Models::PriceCheck.new(r)
1399
1472
  end
1400
1473
 
1401
1474
  # Get the pricing settings for this experience
1402
- def get_pricing_by_key(organization, key)
1475
+ def get_pricing_by_key(organization, key, incoming={})
1403
1476
  HttpClient::Preconditions.assert_class('organization', organization, String)
1404
1477
  HttpClient::Preconditions.assert_class('key', key, String)
1405
- r = @client.request("/#{CGI.escape(organization)}/experiences/#{CGI.escape(key)}/pricing").get
1478
+ opts = HttpClient::Helper.symbolize_keys(incoming)
1479
+ query = {
1480
+ :context => (x = opts.delete(:context); x.nil? ? nil : HttpClient::Preconditions.assert_class('context', x, String))
1481
+ }.delete_if { |k, v| v.nil? }
1482
+ r = @client.request("/#{CGI.escape(organization)}/experiences/#{CGI.escape(key)}/pricing").with_query(query).get
1406
1483
  ::Io::Flow::V0::Models::Pricing.new(r)
1407
1484
  end
1408
1485
 
1409
1486
  # Update the pricing settings for this experience
1410
- def put_pricing_by_key(organization, key, pricing)
1487
+ def put_pricing_by_key(organization, key, pricing, incoming={})
1411
1488
  HttpClient::Preconditions.assert_class('organization', organization, String)
1412
1489
  HttpClient::Preconditions.assert_class('key', key, String)
1490
+ opts = HttpClient::Helper.symbolize_keys(incoming)
1491
+ query = {
1492
+ :context => (x = opts.delete(:context); x.nil? ? nil : HttpClient::Preconditions.assert_class('context', x, String))
1493
+ }.delete_if { |k, v| v.nil? }
1413
1494
  (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
1495
+ r = @client.request("/#{CGI.escape(organization)}/experiences/#{CGI.escape(key)}/pricing").with_query(query).with_json(pricing.to_json).put
1415
1496
  ::Io::Flow::V0::Models::Pricing.new(r)
1416
1497
  end
1417
1498
 
1418
1499
  # Get available promotions for the experience
1419
- def get_promotions_and_available_by_key(organization, key)
1500
+ def get_promotions_and_available_by_key(organization, key, incoming={})
1420
1501
  HttpClient::Preconditions.assert_class('organization', organization, String)
1421
1502
  HttpClient::Preconditions.assert_class('key', key, String)
1422
- r = @client.request("/#{CGI.escape(organization)}/experiences/#{CGI.escape(key)}/promotions/available").get
1503
+ opts = HttpClient::Helper.symbolize_keys(incoming)
1504
+ query = {
1505
+ :context => (x = opts.delete(:context); x.nil? ? nil : HttpClient::Preconditions.assert_class('context', x, String))
1506
+ }.delete_if { |k, v| v.nil? }
1507
+ r = @client.request("/#{CGI.escape(organization)}/experiences/#{CGI.escape(key)}/promotions/available").with_query(query).get
1423
1508
  r.map { |x| ::Io::Flow::V0::Models::Promotion.from_json(x) }
1424
1509
  end
1425
1510
 
1426
1511
  # Updates the status of a given experience.
1427
- def put_status_by_key(organization, key, experience_status_form)
1512
+ def put_status_by_key(organization, key, experience_status_form, incoming={})
1428
1513
  HttpClient::Preconditions.assert_class('organization', organization, String)
1429
1514
  HttpClient::Preconditions.assert_class('key', key, String)
1515
+ opts = HttpClient::Helper.symbolize_keys(incoming)
1516
+ query = {
1517
+ :context => (x = opts.delete(:context); x.nil? ? nil : HttpClient::Preconditions.assert_class('context', x, String))
1518
+ }.delete_if { |k, v| v.nil? }
1430
1519
  (x = experience_status_form; x.is_a?(::Io::Flow::V0::Models::ExperienceStatusForm) ? x : ::Io::Flow::V0::Models::ExperienceStatusForm.new(x))
1431
- r = @client.request("/#{CGI.escape(organization)}/experiences/#{CGI.escape(key)}/status").with_json(experience_status_form.to_json).put
1520
+ r = @client.request("/#{CGI.escape(organization)}/experiences/#{CGI.escape(key)}/status").with_query(query).with_json(experience_status_form.to_json).put
1432
1521
  ::Io::Flow::V0::Models::Experience.new(r)
1433
1522
  end
1434
1523
 
@@ -1440,18 +1529,26 @@ module Io
1440
1529
  @client = HttpClient::Preconditions.assert_class('client', client, ::Io::Flow::V0::Client)
1441
1530
  end
1442
1531
 
1443
- def get(organization, experience_key)
1532
+ def get(organization, experience_key, incoming={})
1444
1533
  HttpClient::Preconditions.assert_class('organization', organization, String)
1445
1534
  HttpClient::Preconditions.assert_class('experience_key', experience_key, String)
1446
- r = @client.request("/#{CGI.escape(organization)}/experiences/#{CGI.escape(experience_key)}/settings/checkout").get
1535
+ opts = HttpClient::Helper.symbolize_keys(incoming)
1536
+ query = {
1537
+ :context => (x = opts.delete(:context); x.nil? ? nil : HttpClient::Preconditions.assert_class('context', x, String))
1538
+ }.delete_if { |k, v| v.nil? }
1539
+ r = @client.request("/#{CGI.escape(organization)}/experiences/#{CGI.escape(experience_key)}/settings/checkout").with_query(query).get
1447
1540
  ::Io::Flow::V0::Models::ExperienceCheckoutSettings.new(r)
1448
1541
  end
1449
1542
 
1450
- def put(organization, experience_key, experience_checkout_settings_form)
1543
+ def put(organization, experience_key, experience_checkout_settings_form, incoming={})
1451
1544
  HttpClient::Preconditions.assert_class('organization', organization, String)
1452
1545
  HttpClient::Preconditions.assert_class('experience_key', experience_key, String)
1546
+ opts = HttpClient::Helper.symbolize_keys(incoming)
1547
+ query = {
1548
+ :context => (x = opts.delete(:context); x.nil? ? nil : HttpClient::Preconditions.assert_class('context', x, String))
1549
+ }.delete_if { |k, v| v.nil? }
1453
1550
  (x = experience_checkout_settings_form; x.is_a?(::Io::Flow::V0::Models::ExperienceCheckoutSettingsForm) ? x : ::Io::Flow::V0::Models::ExperienceCheckoutSettingsForm.new(x))
1454
- r = @client.request("/#{CGI.escape(organization)}/experiences/#{CGI.escape(experience_key)}/settings/checkout").with_json(experience_checkout_settings_form.to_json).put
1551
+ r = @client.request("/#{CGI.escape(organization)}/experiences/#{CGI.escape(experience_key)}/settings/checkout").with_query(query).with_json(experience_checkout_settings_form.to_json).put
1455
1552
  ::Io::Flow::V0::Models::ExperienceCheckoutSettings.new(r)
1456
1553
  end
1457
1554
 
@@ -1468,7 +1565,8 @@ module Io
1468
1565
  HttpClient::Preconditions.assert_class('organization', organization, String)
1469
1566
  opts = HttpClient::Helper.symbolize_keys(incoming)
1470
1567
  query = {
1471
- :region_id => (x = opts.delete(:region_id); x.nil? ? nil : HttpClient::Preconditions.assert_class('region_id', x, String))
1568
+ :region_id => (x = opts.delete(:region_id); x.nil? ? nil : HttpClient::Preconditions.assert_class('region_id', x, String)),
1569
+ :context => (x = opts.delete(:context); x.nil? ? nil : HttpClient::Preconditions.assert_class('context', x, String))
1472
1570
  }.delete_if { |k, v| v.nil? }
1473
1571
  r = @client.request("/#{CGI.escape(organization)}/experience/defaults").with_query(query).get
1474
1572
  ::Io::Flow::V0::Models::ExperienceDefaults.new(r)
@@ -1489,11 +1587,15 @@ module Io
1489
1587
  ::Io::Flow::V0::Models::ExperienceLogisticsSettings.new(r)
1490
1588
  end
1491
1589
 
1492
- def put(organization, experience_key, experience_logistics_settings_put_form)
1590
+ def put(organization, experience_key, experience_logistics_settings_put_form, incoming={})
1493
1591
  HttpClient::Preconditions.assert_class('organization', organization, String)
1494
1592
  HttpClient::Preconditions.assert_class('experience_key', experience_key, String)
1593
+ opts = HttpClient::Helper.symbolize_keys(incoming)
1594
+ query = {
1595
+ :context => (x = opts.delete(:context); x.nil? ? nil : HttpClient::Preconditions.assert_class('context', x, String))
1596
+ }.delete_if { |k, v| v.nil? }
1495
1597
  (x = experience_logistics_settings_put_form; x.is_a?(::Io::Flow::V0::Models::ExperienceLogisticsSettingsPutForm) ? x : ::Io::Flow::V0::Models::ExperienceLogisticsSettingsPutForm.new(x))
1496
- r = @client.request("/#{CGI.escape(organization)}/experiences/#{CGI.escape(experience_key)}/settings/logistics").with_json(experience_logistics_settings_put_form.to_json).put
1598
+ r = @client.request("/#{CGI.escape(organization)}/experiences/#{CGI.escape(experience_key)}/settings/logistics").with_query(query).with_json(experience_logistics_settings_put_form.to_json).put
1497
1599
  ::Io::Flow::V0::Models::ExperienceLogisticsSettings.new(r)
1498
1600
  end
1499
1601
 
@@ -1708,6 +1810,7 @@ module Io
1708
1810
  :customer_number => (x = opts.delete(:customer_number); x.nil? ? nil : HttpClient::Preconditions.assert_class('customer_number', x, String)),
1709
1811
  :submitted_at_on_or_after => (x = opts.delete(:submitted_at_on_or_after); x.nil? ? nil : HttpClient::Preconditions.assert_class('submitted_at_on_or_after', HttpClient::Helper.to_date_time_iso8601(x), DateTime)),
1710
1812
  :romanize => (x = opts.delete(:romanize); x.nil? ? nil : HttpClient::Preconditions.assert_class('romanize', x, Array).map { |v| HttpClient::Preconditions.assert_class('romanize', v, String) }),
1813
+ :context => (x = opts.delete(:context); x.nil? ? nil : HttpClient::Preconditions.assert_class('context', x, String)),
1711
1814
  :limit => HttpClient::Preconditions.assert_class('limit', (x = opts.delete(:limit); x.nil? ? 25 : x), Integer),
1712
1815
  :offset => HttpClient::Preconditions.assert_class('offset', (x = opts.delete(:offset); x.nil? ? 0 : x), Integer),
1713
1816
  :sort => HttpClient::Preconditions.assert_class('sort', (x = opts.delete(:sort); x.nil? ? "-created_at" : x), String),
@@ -1730,7 +1833,8 @@ module Io
1730
1833
  :currency => (x = opts.delete(:currency); x.nil? ? nil : HttpClient::Preconditions.assert_class('currency', x, String)),
1731
1834
  :language => (x = opts.delete(:language); x.nil? ? nil : HttpClient::Preconditions.assert_class('language', x, String)),
1732
1835
  :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) })
1836
+ :romanize => (x = opts.delete(:romanize); x.nil? ? nil : HttpClient::Preconditions.assert_class('romanize', x, Array).map { |v| HttpClient::Preconditions.assert_class('romanize', v, String) }),
1837
+ :context => (x = opts.delete(:context); x.nil? ? nil : HttpClient::Preconditions.assert_class('context', x, String))
1734
1838
  }.delete_if { |k, v| v.nil? }
1735
1839
  (x = order_form; x.is_a?(::Io::Flow::V0::Models::OrderForm) ? x : ::Io::Flow::V0::Models::OrderForm.new(x))
1736
1840
  r = @client.request("/#{CGI.escape(organization)}/orders").with_query(query).with_json(order_form.to_json).post
@@ -1744,7 +1848,8 @@ module Io
1744
1848
  opts = HttpClient::Helper.symbolize_keys(incoming)
1745
1849
  query = {
1746
1850
  :expand => (x = opts.delete(:expand); x.nil? ? nil : HttpClient::Preconditions.assert_class('expand', x, Array).map { |v| HttpClient::Preconditions.assert_class('expand', v, String) }),
1747
- :romanize => (x = opts.delete(:romanize); x.nil? ? nil : HttpClient::Preconditions.assert_class('romanize', x, Array).map { |v| HttpClient::Preconditions.assert_class('romanize', v, String) })
1851
+ :romanize => (x = opts.delete(:romanize); x.nil? ? nil : HttpClient::Preconditions.assert_class('romanize', x, Array).map { |v| HttpClient::Preconditions.assert_class('romanize', v, String) }),
1852
+ :context => (x = opts.delete(:context); x.nil? ? nil : HttpClient::Preconditions.assert_class('context', x, String))
1748
1853
  }.delete_if { |k, v| v.nil? }
1749
1854
  r = @client.request("/#{CGI.escape(organization)}/orders/identifier/#{CGI.escape(identifier)}").with_query(query).get
1750
1855
  ::Io::Flow::V0::Models::Order.new(r)
@@ -1761,7 +1866,8 @@ module Io
1761
1866
  :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
1867
  :experience => (x = opts.delete(:experience); x.nil? ? nil : HttpClient::Preconditions.assert_class('experience', x, String)),
1763
1868
  :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))
1869
+ :show_selections_only => (x = opts.delete(:show_selections_only); x.nil? ? nil : HttpClient::Preconditions.assert_boolean('show_selections_only', x)),
1870
+ :context => (x = opts.delete(:context); x.nil? ? nil : HttpClient::Preconditions.assert_class('context', x, String))
1765
1871
  }.delete_if { |k, v| v.nil? }
1766
1872
  (x = order_with_discounts_form; x.is_a?(::Io::Flow::V0::Models::OrderWithDiscountsForm) ? x : ::Io::Flow::V0::Models::OrderWithDiscountsForm.new(x))
1767
1873
  r = @client.request("/#{CGI.escape(organization)}/orders/submissions").with_query(query).with_json(order_with_discounts_form.to_json).post
@@ -1791,7 +1897,8 @@ module Io
1791
1897
  opts = HttpClient::Helper.symbolize_keys(incoming)
1792
1898
  query = {
1793
1899
  :expand => (x = opts.delete(:expand); x.nil? ? nil : HttpClient::Preconditions.assert_class('expand', x, Array).map { |v| HttpClient::Preconditions.assert_class('expand', v, String) }),
1794
- :romanize => (x = opts.delete(:romanize); x.nil? ? nil : HttpClient::Preconditions.assert_class('romanize', x, Array).map { |v| HttpClient::Preconditions.assert_class('romanize', v, String) })
1900
+ :romanize => (x = opts.delete(:romanize); x.nil? ? nil : HttpClient::Preconditions.assert_class('romanize', x, Array).map { |v| HttpClient::Preconditions.assert_class('romanize', v, String) }),
1901
+ :context => (x = opts.delete(:context); x.nil? ? nil : HttpClient::Preconditions.assert_class('context', x, String))
1795
1902
  }.delete_if { |k, v| v.nil? }
1796
1903
  r = @client.request("/#{CGI.escape(organization)}/orders/#{CGI.escape(number)}").with_query(query).get
1797
1904
  ::Io::Flow::V0::Models::Order.new(r)
@@ -1811,7 +1918,8 @@ module Io
1811
1918
  :currency => (x = opts.delete(:currency); x.nil? ? nil : HttpClient::Preconditions.assert_class('currency', x, String)),
1812
1919
  :language => (x = opts.delete(:language); x.nil? ? nil : HttpClient::Preconditions.assert_class('language', x, String)),
1813
1920
  :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) })
1921
+ :romanize => (x = opts.delete(:romanize); x.nil? ? nil : HttpClient::Preconditions.assert_class('romanize', x, Array).map { |v| HttpClient::Preconditions.assert_class('romanize', v, String) }),
1922
+ :context => (x = opts.delete(:context); x.nil? ? nil : HttpClient::Preconditions.assert_class('context', x, String))
1815
1923
  }.delete_if { |k, v| v.nil? }
1816
1924
  (x = order_put_form; x.is_a?(::Io::Flow::V0::Models::OrderPutForm) ? x : ::Io::Flow::V0::Models::OrderPutForm.new(x))
1817
1925
  r = @client.request("/#{CGI.escape(organization)}/orders/#{CGI.escape(number)}").with_query(query).with_json(order_put_form.to_json).put
@@ -1842,7 +1950,8 @@ module Io
1842
1950
  HttpClient::Preconditions.assert_class('number', number, String)
1843
1951
  opts = HttpClient::Helper.symbolize_keys(incoming)
1844
1952
  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) })
1953
+ :expand => (x = opts.delete(:expand); x.nil? ? nil : HttpClient::Preconditions.assert_class('expand', x, Array).map { |v| HttpClient::Preconditions.assert_class('expand', v, String) }),
1954
+ :context => (x = opts.delete(:context); x.nil? ? nil : HttpClient::Preconditions.assert_class('context', x, String))
1846
1955
  }.delete_if { |k, v| v.nil? }
1847
1956
  (x = authorization_form; x.is_a?(::Io::Flow::V0::Models::AuthorizationForm) ? x : ::Io::Flow::V0::Models::AuthorizationForm.from_json(x))
1848
1957
  r = @client.request("/#{CGI.escape(organization)}/orders/#{CGI.escape(number)}/authorizations").with_query(query).with_json(authorization_form.to_json).post
@@ -1850,21 +1959,38 @@ module Io
1850
1959
  end
1851
1960
 
1852
1961
  # Updates an order's destination address
1853
- def put_destination_by_number(organization, number, order_destination_put_form)
1962
+ def put_destination_by_number(organization, number, order_destination_put_form, incoming={})
1854
1963
  HttpClient::Preconditions.assert_class('organization', organization, String)
1855
1964
  HttpClient::Preconditions.assert_class('number', number, String)
1965
+ opts = HttpClient::Helper.symbolize_keys(incoming)
1966
+ query = {
1967
+ :context => (x = opts.delete(:context); x.nil? ? nil : HttpClient::Preconditions.assert_class('context', x, String))
1968
+ }.delete_if { |k, v| v.nil? }
1856
1969
  (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
1970
+ r = @client.request("/#{CGI.escape(organization)}/orders/#{CGI.escape(number)}/destination").with_query(query).with_json(order_destination_put_form.to_json).put
1858
1971
  ::Io::Flow::V0::Models::Order.new(r)
1859
1972
  end
1860
1973
 
1861
- def put_inventory_and_reservations_by_number(organization, number)
1974
+ def put_inventory_and_reservations_by_number(organization, number, incoming={})
1862
1975
  HttpClient::Preconditions.assert_class('organization', organization, String)
1863
1976
  HttpClient::Preconditions.assert_class('number', number, String)
1864
- r = @client.request("/#{CGI.escape(organization)}/orders/#{CGI.escape(number)}/inventory/reservations").put
1977
+ opts = HttpClient::Helper.symbolize_keys(incoming)
1978
+ query = {
1979
+ :context => (x = opts.delete(:context); x.nil? ? nil : HttpClient::Preconditions.assert_class('context', x, String))
1980
+ }.delete_if { |k, v| v.nil? }
1981
+ r = @client.request("/#{CGI.escape(organization)}/orders/#{CGI.escape(number)}/inventory/reservations").with_query(query).put
1865
1982
  ::Io::Flow::V0::Models::Reservation.new(r)
1866
1983
  end
1867
1984
 
1985
+ # Creates an order payment by applying the authorization to the order.
1986
+ def post_payments_by_number(organization, number, authorization)
1987
+ HttpClient::Preconditions.assert_class('organization', organization, String)
1988
+ HttpClient::Preconditions.assert_class('number', number, String)
1989
+ (x = authorization; x.is_a?(::Io::Flow::V0::Models::Authorization) ? x : ::Io::Flow::V0::Models::Authorization.from_json(x))
1990
+ r = @client.request("/#{CGI.escape(organization)}/orders/#{CGI.escape(number)}/payments").with_json(authorization.to_json).post
1991
+ ::Io::Flow::V0::Models::Order.new(r)
1992
+ end
1993
+
1868
1994
  # Creates a free shipping promotion for this order, automatically applying it
1869
1995
  # to the order if the order meets the defined promotion trigger.
1870
1996
  def put_promotions_and_free_shipping_by_number_and_key(organization, number, key, free_shipping_order_promotion_form, incoming={})
@@ -1873,7 +1999,8 @@ module Io
1873
1999
  HttpClient::Preconditions.assert_class('key', key, String)
1874
2000
  opts = HttpClient::Helper.symbolize_keys(incoming)
1875
2001
  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) })
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))
1877
2004
  }.delete_if { |k, v| v.nil? }
1878
2005
  (x = free_shipping_order_promotion_form; x.is_a?(::Io::Flow::V0::Models::FreeShippingOrderPromotionForm) ? x : ::Io::Flow::V0::Models::FreeShippingOrderPromotionForm.new(x))
1879
2006
  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 +2024,8 @@ module Io
1897
2024
  HttpClient::Preconditions.assert_class('number', number, String)
1898
2025
  opts = HttpClient::Helper.symbolize_keys(incoming)
1899
2026
  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) })
2027
+ :expand => (x = opts.delete(:expand); x.nil? ? nil : HttpClient::Preconditions.assert_class('expand', x, Array).map { |v| HttpClient::Preconditions.assert_class('expand', v, String) }),
2028
+ :context => (x = opts.delete(:context); x.nil? ? nil : HttpClient::Preconditions.assert_class('context', x, String))
1901
2029
  }.delete_if { |k, v| v.nil? }
1902
2030
  (x = order_submission_form; x.is_a?(::Io::Flow::V0::Models::OrderSubmissionForm) ? x : ::Io::Flow::V0::Models::OrderSubmissionForm.new(x))
1903
2031
  r = @client.request("/#{CGI.escape(organization)}/orders/#{CGI.escape(number)}/submissions").with_query(query).with_json(order_submission_form.to_json).put
@@ -1906,11 +2034,15 @@ module Io
1906
2034
 
1907
2035
  # Validates a tax registration number, proxying to underlying services and
1908
2036
  # recording the result on the order.
1909
- def put_tax_and_registration_by_number(organization, number, tax_registration_form)
2037
+ def put_tax_and_registration_by_number(organization, number, tax_registration_form, incoming={})
1910
2038
  HttpClient::Preconditions.assert_class('organization', organization, String)
1911
2039
  HttpClient::Preconditions.assert_class('number', number, String)
2040
+ opts = HttpClient::Helper.symbolize_keys(incoming)
2041
+ query = {
2042
+ :context => (x = opts.delete(:context); x.nil? ? nil : HttpClient::Preconditions.assert_class('context', x, String))
2043
+ }.delete_if { |k, v| v.nil? }
1912
2044
  (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
2045
+ r = @client.request("/#{CGI.escape(organization)}/orders/#{CGI.escape(number)}/tax/registration").with_query(query).with_json(tax_registration_form.to_json).put
1914
2046
  ::Io::Flow::V0::Models::TaxRegistration.new(r)
1915
2047
  end
1916
2048
 
@@ -1955,7 +2087,8 @@ module Io
1955
2087
  :ip => (x = opts.delete(:ip); x.nil? ? nil : HttpClient::Preconditions.assert_class('ip', x, String)),
1956
2088
  :currency => (x = opts.delete(:currency); x.nil? ? nil : HttpClient::Preconditions.assert_class('currency', x, String)),
1957
2089
  :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) })
2090
+ :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
+ :context => (x = opts.delete(:context); x.nil? ? nil : HttpClient::Preconditions.assert_class('context', x, String))
1959
2092
  }.delete_if { |k, v| v.nil? }
1960
2093
  (x = order_put_form; x.is_a?(::Io::Flow::V0::Models::OrderPutForm) ? x : ::Io::Flow::V0::Models::OrderPutForm.new(x))
1961
2094
  r = @client.request("/#{CGI.escape(organization)}/order/builders").with_query(query).with_json(order_put_form.to_json).post
@@ -1972,7 +2105,8 @@ module Io
1972
2105
  :ip => (x = opts.delete(:ip); x.nil? ? nil : HttpClient::Preconditions.assert_class('ip', x, String)),
1973
2106
  :currency => (x = opts.delete(:currency); x.nil? ? nil : HttpClient::Preconditions.assert_class('currency', x, String)),
1974
2107
  :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) })
2108
+ :expand => (x = opts.delete(:expand); x.nil? ? nil : HttpClient::Preconditions.assert_class('expand', x, Array).map { |v| HttpClient::Preconditions.assert_class('expand', v, String) }),
2109
+ :context => (x = opts.delete(:context); x.nil? ? nil : HttpClient::Preconditions.assert_class('context', x, String))
1976
2110
  }.delete_if { |k, v| v.nil? }
1977
2111
  (x = order_put_form; x.is_a?(::Io::Flow::V0::Models::OrderPutForm) ? x : ::Io::Flow::V0::Models::OrderPutForm.new(x))
1978
2112
  r = @client.request("/#{CGI.escape(organization)}/order/builders/carts/#{CGI.escape(number)}").with_query(query).with_json(order_put_form.to_json).put
@@ -1987,7 +2121,8 @@ module Io
1987
2121
  opts = HttpClient::Helper.symbolize_keys(incoming)
1988
2122
  query = {
1989
2123
  :expand => (x = opts.delete(:expand); x.nil? ? nil : HttpClient::Preconditions.assert_class('expand', x, Array).map { |v| HttpClient::Preconditions.assert_class('expand', v, String) }),
1990
- :romanize => (x = opts.delete(:romanize); x.nil? ? nil : HttpClient::Preconditions.assert_class('romanize', x, Array).map { |v| HttpClient::Preconditions.assert_class('romanize', v, String) })
2124
+ :romanize => (x = opts.delete(:romanize); x.nil? ? nil : HttpClient::Preconditions.assert_class('romanize', x, Array).map { |v| HttpClient::Preconditions.assert_class('romanize', v, String) }),
2125
+ :context => (x = opts.delete(:context); x.nil? ? nil : HttpClient::Preconditions.assert_class('context', x, String))
1991
2126
  }.delete_if { |k, v| v.nil? }
1992
2127
  r = @client.request("/#{CGI.escape(organization)}/order/builders/#{CGI.escape(number)}").with_query(query).get
1993
2128
  ::Io::Flow::V0::Models::OrderBuilder.new(r)
@@ -2003,7 +2138,8 @@ module Io
2003
2138
  :ip => (x = opts.delete(:ip); x.nil? ? nil : HttpClient::Preconditions.assert_class('ip', x, String)),
2004
2139
  :currency => (x = opts.delete(:currency); x.nil? ? nil : HttpClient::Preconditions.assert_class('currency', x, String)),
2005
2140
  :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) })
2141
+ :expand => (x = opts.delete(:expand); x.nil? ? nil : HttpClient::Preconditions.assert_class('expand', x, Array).map { |v| HttpClient::Preconditions.assert_class('expand', v, String) }),
2142
+ :context => (x = opts.delete(:context); x.nil? ? nil : HttpClient::Preconditions.assert_class('context', x, String))
2007
2143
  }.delete_if { |k, v| v.nil? }
2008
2144
  (x = order_put_form; x.is_a?(::Io::Flow::V0::Models::OrderPutForm) ? x : ::Io::Flow::V0::Models::OrderPutForm.new(x))
2009
2145
  r = @client.request("/#{CGI.escape(organization)}/order/builders/#{CGI.escape(number)}").with_query(query).with_json(order_put_form.to_json).put
@@ -2015,7 +2151,8 @@ module Io
2015
2151
  HttpClient::Preconditions.assert_class('number', number, String)
2016
2152
  opts = HttpClient::Helper.symbolize_keys(incoming)
2017
2153
  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) })
2154
+ :expand => (x = opts.delete(:expand); x.nil? ? nil : HttpClient::Preconditions.assert_class('expand', x, Array).map { |v| HttpClient::Preconditions.assert_class('expand', v, String) }),
2155
+ :context => (x = opts.delete(:context); x.nil? ? nil : HttpClient::Preconditions.assert_class('context', x, String))
2019
2156
  }.delete_if { |k, v| v.nil? }
2020
2157
  (x = order_builder_attributes_form; x.is_a?(::Io::Flow::V0::Models::OrderBuilderAttributesForm) ? x : ::Io::Flow::V0::Models::OrderBuilderAttributesForm.new(x))
2021
2158
  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 +2164,8 @@ module Io
2027
2164
  HttpClient::Preconditions.assert_class('number', number, String)
2028
2165
  opts = HttpClient::Helper.symbolize_keys(incoming)
2029
2166
  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) })
2167
+ :expand => (x = opts.delete(:expand); x.nil? ? nil : HttpClient::Preconditions.assert_class('expand', x, Array).map { |v| HttpClient::Preconditions.assert_class('expand', v, String) }),
2168
+ :context => (x = opts.delete(:context); x.nil? ? nil : HttpClient::Preconditions.assert_class('context', x, String))
2031
2169
  }.delete_if { |k, v| v.nil? }
2032
2170
  (x = order_builder_destination_country_form; x.is_a?(::Io::Flow::V0::Models::OrderBuilderDestinationCountryForm) ? x : ::Io::Flow::V0::Models::OrderBuilderDestinationCountryForm.new(x))
2033
2171
  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 +2177,8 @@ module Io
2039
2177
  HttpClient::Preconditions.assert_class('number', number, String)
2040
2178
  opts = HttpClient::Helper.symbolize_keys(incoming)
2041
2179
  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) })
2180
+ :expand => (x = opts.delete(:expand); x.nil? ? nil : HttpClient::Preconditions.assert_class('expand', x, Array).map { |v| HttpClient::Preconditions.assert_class('expand', v, String) }),
2181
+ :context => (x = opts.delete(:context); x.nil? ? nil : HttpClient::Preconditions.assert_class('context', x, String))
2043
2182
  }.delete_if { |k, v| v.nil? }
2044
2183
  (x = order_builder_destination_form; x.is_a?(::Io::Flow::V0::Models::OrderBuilderDestinationForm) ? x : ::Io::Flow::V0::Models::OrderBuilderDestinationForm.new(x))
2045
2184
  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 +2190,8 @@ module Io
2051
2190
  HttpClient::Preconditions.assert_class('number', number, String)
2052
2191
  opts = HttpClient::Helper.symbolize_keys(incoming)
2053
2192
  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) })
2193
+ :expand => (x = opts.delete(:expand); x.nil? ? nil : HttpClient::Preconditions.assert_class('expand', x, Array).map { |v| HttpClient::Preconditions.assert_class('expand', v, String) }),
2194
+ :context => (x = opts.delete(:context); x.nil? ? nil : HttpClient::Preconditions.assert_class('context', x, String))
2055
2195
  }.delete_if { |k, v| v.nil? }
2056
2196
  (x = order_builder_delivered_duty_form; x.is_a?(::Io::Flow::V0::Models::OrderBuilderDeliveredDutyForm) ? x : ::Io::Flow::V0::Models::OrderBuilderDeliveredDutyForm.new(x))
2057
2197
  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 +2204,71 @@ module Io
2064
2204
  HttpClient::Preconditions.assert_class('number', number, String)
2065
2205
  opts = HttpClient::Helper.symbolize_keys(incoming)
2066
2206
  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) })
2207
+ :expand => (x = opts.delete(:expand); x.nil? ? nil : HttpClient::Preconditions.assert_class('expand', x, Array).map { |v| HttpClient::Preconditions.assert_class('expand', v, String) }),
2208
+ :context => (x = opts.delete(:context); x.nil? ? nil : HttpClient::Preconditions.assert_class('context', x, String))
2068
2209
  }.delete_if { |k, v| v.nil? }
2069
2210
  (x = order_builder_customer_invoice_address_form; x.is_a?(::Io::Flow::V0::Models::OrderBuilderCustomerInvoiceAddressForm) ? x : ::Io::Flow::V0::Models::OrderBuilderCustomerInvoiceAddressForm.new(x))
2070
2211
  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
2212
  ::Io::Flow::V0::Models::OrderBuilder.new(r)
2072
2213
  end
2073
2214
 
2215
+ # Adds a line item to the order.
2216
+ def post_lines_by_number(organization, number, line_item_form)
2217
+ HttpClient::Preconditions.assert_class('organization', organization, String)
2218
+ HttpClient::Preconditions.assert_class('number', number, String)
2219
+ (x = line_item_form; x.is_a?(::Io::Flow::V0::Models::LineItemForm) ? x : ::Io::Flow::V0::Models::LineItemForm.new(x))
2220
+ r = @client.request("/#{CGI.escape(organization)}/order/builders/#{CGI.escape(number)}/lines").with_json(line_item_form.to_json).post
2221
+ ::Io::Flow::V0::Models::Order.new(r)
2222
+ end
2223
+
2224
+ # Replaces all line items in the order.
2225
+ def put_lines_by_number(organization, number, line_item_forms)
2226
+ HttpClient::Preconditions.assert_class('organization', organization, String)
2227
+ HttpClient::Preconditions.assert_class('number', number, String)
2228
+ 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)) }
2229
+ 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
2230
+ ::Io::Flow::V0::Models::Order.new(r)
2231
+ end
2232
+
2233
+ # Replaces line item in the order specifed by the line item id.
2234
+ def put_lines_by_number_and_id(organization, number, id, line_item_form)
2235
+ HttpClient::Preconditions.assert_class('organization', organization, String)
2236
+ HttpClient::Preconditions.assert_class('number', number, String)
2237
+ HttpClient::Preconditions.assert_class('id', id, String)
2238
+ (x = line_item_form; x.is_a?(::Io::Flow::V0::Models::LineItemForm) ? x : ::Io::Flow::V0::Models::LineItemForm.new(x))
2239
+ r = @client.request("/#{CGI.escape(organization)}/order/builders/#{CGI.escape(number)}/lines/#{CGI.escape(id)}").with_json(line_item_form.to_json).put
2240
+ ::Io::Flow::V0::Models::Order.new(r)
2241
+ end
2242
+
2243
+ # Deletes line item in the order specifed by the line item id.
2244
+ def delete_lines_by_number_and_id(organization, number, id)
2245
+ HttpClient::Preconditions.assert_class('organization', organization, String)
2246
+ HttpClient::Preconditions.assert_class('number', number, String)
2247
+ HttpClient::Preconditions.assert_class('id', id, String)
2248
+ r = @client.request("/#{CGI.escape(organization)}/order/builders/#{CGI.escape(number)}/lines/#{CGI.escape(id)}").delete
2249
+ ::Io::Flow::V0::Models::OrderBuilder.new(r)
2250
+ end
2251
+
2252
+ # Updates line item attributes in the order specifed by the line item id.
2253
+ def put_lines_and_attributes_by_number_and_id(organization, number, id, line_item_attributes_form)
2254
+ HttpClient::Preconditions.assert_class('organization', organization, String)
2255
+ HttpClient::Preconditions.assert_class('number', number, String)
2256
+ HttpClient::Preconditions.assert_class('id', id, String)
2257
+ (x = line_item_attributes_form; x.is_a?(::Io::Flow::V0::Models::LineItemAttributesForm) ? x : ::Io::Flow::V0::Models::LineItemAttributesForm.new(x))
2258
+ 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
2259
+ ::Io::Flow::V0::Models::Order.new(r)
2260
+ end
2261
+
2262
+ # Updates line item quantity in the order specifed by the line item id.
2263
+ def put_lines_and_quantity_by_number_and_id(organization, number, id, line_item_quantity_form)
2264
+ HttpClient::Preconditions.assert_class('organization', organization, String)
2265
+ HttpClient::Preconditions.assert_class('number', number, String)
2266
+ HttpClient::Preconditions.assert_class('id', id, String)
2267
+ (x = line_item_quantity_form; x.is_a?(::Io::Flow::V0::Models::LineItemQuantityForm) ? x : ::Io::Flow::V0::Models::LineItemQuantityForm.new(x))
2268
+ 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
2269
+ ::Io::Flow::V0::Models::Order.new(r)
2270
+ end
2271
+
2074
2272
  # Validates a tax registration number, proxying to underlying services and
2075
2273
  # recording the result on the order.
2076
2274
  def put_tax_and_registration_by_number(organization, number, tax_registration_form, incoming={})
@@ -2078,7 +2276,8 @@ module Io
2078
2276
  HttpClient::Preconditions.assert_class('number', number, String)
2079
2277
  opts = HttpClient::Helper.symbolize_keys(incoming)
2080
2278
  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) })
2279
+ :expand => (x = opts.delete(:expand); x.nil? ? nil : HttpClient::Preconditions.assert_class('expand', x, Array).map { |v| HttpClient::Preconditions.assert_class('expand', v, String) }),
2280
+ :context => (x = opts.delete(:context); x.nil? ? nil : HttpClient::Preconditions.assert_class('context', x, String))
2082
2281
  }.delete_if { |k, v| v.nil? }
2083
2282
  (x = tax_registration_form; x.is_a?(::Io::Flow::V0::Models::TaxRegistrationForm) ? x : ::Io::Flow::V0::Models::TaxRegistrationForm.new(x))
2084
2283
  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 +2306,8 @@ module Io
2107
2306
  :currency => (x = opts.delete(:currency); x.nil? ? nil : HttpClient::Preconditions.assert_class('currency', x, String)),
2108
2307
  :language => (x = opts.delete(:language); x.nil? ? nil : HttpClient::Preconditions.assert_class('language', x, String)),
2109
2308
  :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) })
2309
+ :romanize => (x = opts.delete(:romanize); x.nil? ? nil : HttpClient::Preconditions.assert_class('romanize', x, Array).map { |v| HttpClient::Preconditions.assert_class('romanize', v, String) }),
2310
+ :context => (x = opts.delete(:context); x.nil? ? nil : HttpClient::Preconditions.assert_class('context', x, String))
2111
2311
  }.delete_if { |k, v| v.nil? }
2112
2312
  (x = order_estimate_form; x.is_a?(::Io::Flow::V0::Models::OrderEstimateForm) ? x : ::Io::Flow::V0::Models::OrderEstimateForm.new(x))
2113
2313
  r = @client.request("/#{CGI.escape(organization)}/order-estimates").with_query(query).with_json(order_estimate_form.to_json).post
@@ -2120,7 +2320,8 @@ module Io
2120
2320
  opts = HttpClient::Helper.symbolize_keys(incoming)
2121
2321
  query = {
2122
2322
  :expand => (x = opts.delete(:expand); x.nil? ? nil : HttpClient::Preconditions.assert_class('expand', x, Array).map { |v| HttpClient::Preconditions.assert_class('expand', v, String) }),
2123
- :romanize => (x = opts.delete(:romanize); x.nil? ? nil : HttpClient::Preconditions.assert_class('romanize', x, Array).map { |v| HttpClient::Preconditions.assert_class('romanize', v, String) })
2323
+ :romanize => (x = opts.delete(:romanize); x.nil? ? nil : HttpClient::Preconditions.assert_class('romanize', x, Array).map { |v| HttpClient::Preconditions.assert_class('romanize', v, String) }),
2324
+ :context => (x = opts.delete(:context); x.nil? ? nil : HttpClient::Preconditions.assert_class('context', x, String))
2124
2325
  }.delete_if { |k, v| v.nil? }
2125
2326
  r = @client.request("/#{CGI.escape(organization)}/order-estimates/#{CGI.escape(number)}").with_query(query).get
2126
2327
  ::Io::Flow::V0::Models::Experience.new(r)
@@ -2137,7 +2338,8 @@ module Io
2137
2338
  :currency => (x = opts.delete(:currency); x.nil? ? nil : HttpClient::Preconditions.assert_class('currency', x, String)),
2138
2339
  :language => (x = opts.delete(:language); x.nil? ? nil : HttpClient::Preconditions.assert_class('language', x, String)),
2139
2340
  :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) })
2341
+ :romanize => (x = opts.delete(:romanize); x.nil? ? nil : HttpClient::Preconditions.assert_class('romanize', x, Array).map { |v| HttpClient::Preconditions.assert_class('romanize', v, String) }),
2342
+ :context => (x = opts.delete(:context); x.nil? ? nil : HttpClient::Preconditions.assert_class('context', x, String))
2141
2343
  }.delete_if { |k, v| v.nil? }
2142
2344
  (x = order_estimate_form; x.is_a?(::Io::Flow::V0::Models::OrderEstimateForm) ? x : ::Io::Flow::V0::Models::OrderEstimateForm.new(x))
2143
2345
  r = @client.request("/#{CGI.escape(organization)}/order-estimates/#{CGI.escape(number)}").with_query(query).with_json(order_estimate_form.to_json).put
@@ -2236,6 +2438,12 @@ module Io
2236
2438
  nil
2237
2439
  end
2238
2440
 
2441
+ def get_generated_and_number(organization)
2442
+ HttpClient::Preconditions.assert_class('organization', organization, String)
2443
+ r = @client.request("/#{CGI.escape(organization)}/order/number/generators/generated/number").get
2444
+ ::Io::Flow::V0::Models::OrderNumberGeneratorGeneratedNumber.new(r)
2445
+ end
2446
+
2239
2447
  end
2240
2448
 
2241
2449
  class OrderPromotions
@@ -2284,7 +2492,8 @@ module Io
2284
2492
  query = {
2285
2493
  :ip => (x = opts.delete(:ip); x.nil? ? nil : HttpClient::Preconditions.assert_class('ip', x, String)),
2286
2494
  :country => (x = opts.delete(:country); x.nil? ? nil : HttpClient::Preconditions.assert_class('country', x, String)),
2287
- :status => HttpClient::Preconditions.assert_class('status', (x = opts.delete(:status); x.nil? ? [] : x), Array).map { |v| (x = v; x.is_a?(::Io::Flow::V0::Models::ExperienceStatus) ? x : ::Io::Flow::V0::Models::ExperienceStatus.apply(x)).value }
2495
+ :status => HttpClient::Preconditions.assert_class('status', (x = opts.delete(:status); x.nil? ? [] : x), Array).map { |v| (x = v; x.is_a?(::Io::Flow::V0::Models::ExperienceStatus) ? x : ::Io::Flow::V0::Models::ExperienceStatus.apply(x)).value },
2496
+ :context => (x = opts.delete(:context); x.nil? ? nil : HttpClient::Preconditions.assert_class('context', x, String))
2288
2497
  }.delete_if { |k, v| v.nil? }
2289
2498
  r = @client.request("/#{CGI.escape(organization)}/countries").with_query(query).get
2290
2499
  r.map { |x| ::Io::Flow::V0::Models::Country.new(x) }
@@ -2413,6 +2622,7 @@ module Io
2413
2622
  :currency => (x = opts.delete(:currency); x.nil? ? nil : HttpClient::Preconditions.assert_class('currency', x, String)),
2414
2623
  :experience => (x = opts.delete(:experience); x.nil? ? nil : HttpClient::Preconditions.assert_class('experience', x, String)),
2415
2624
  :ip => (x = opts.delete(:ip); x.nil? ? nil : HttpClient::Preconditions.assert_class('ip', x, String)),
2625
+ :context => (x = opts.delete(:context); x.nil? ? nil : HttpClient::Preconditions.assert_class('context', x, String)),
2416
2626
  :limit => HttpClient::Preconditions.assert_class('limit', (x = opts.delete(:limit); x.nil? ? 25 : x), Integer),
2417
2627
  :offset => HttpClient::Preconditions.assert_class('offset', (x = opts.delete(:offset); x.nil? ? 0 : x), Integer),
2418
2628
  :sort => HttpClient::Preconditions.assert_class('sort', (x = opts.delete(:sort); x.nil? ? "display_position" : x), String)
@@ -2430,6 +2640,7 @@ module Io
2430
2640
  :currency => (x = opts.delete(:currency); x.nil? ? nil : HttpClient::Preconditions.assert_class('currency', x, String)),
2431
2641
  :experience => (x = opts.delete(:experience); x.nil? ? nil : HttpClient::Preconditions.assert_class('experience', x, String)),
2432
2642
  :ip => (x = opts.delete(:ip); x.nil? ? nil : HttpClient::Preconditions.assert_class('ip', x, String)),
2643
+ :context => (x = opts.delete(:context); x.nil? ? nil : HttpClient::Preconditions.assert_class('context', x, String)),
2433
2644
  :limit => HttpClient::Preconditions.assert_class('limit', (x = opts.delete(:limit); x.nil? ? 25 : x), Integer),
2434
2645
  :offset => HttpClient::Preconditions.assert_class('offset', (x = opts.delete(:offset); x.nil? ? 0 : x), Integer),
2435
2646
  :sort => HttpClient::Preconditions.assert_class('sort', (x = opts.delete(:sort); x.nil? ? "display_position" : x), String)
@@ -2445,7 +2656,8 @@ module Io
2445
2656
  query = {
2446
2657
  :experiences => (x = opts.delete(:experiences); x.nil? ? nil : HttpClient::Preconditions.assert_class('experiences', x, Array).map { |v| HttpClient::Preconditions.assert_class('experiences', v, String) }),
2447
2658
  :limit => HttpClient::Preconditions.assert_class('limit', (x = opts.delete(:limit); x.nil? ? 25 : x), Integer),
2448
- :offset => HttpClient::Preconditions.assert_class('offset', (x = opts.delete(:offset); x.nil? ? 0 : x), Integer)
2659
+ :offset => HttpClient::Preconditions.assert_class('offset', (x = opts.delete(:offset); x.nil? ? 0 : x), Integer),
2660
+ :context => (x = opts.delete(:context); x.nil? ? nil : HttpClient::Preconditions.assert_class('context', x, String))
2449
2661
  }.delete_if { |k, v| v.nil? }
2450
2662
  r = @client.request("/#{CGI.escape(organization)}/payment/method/rules/batch").with_query(query).get
2451
2663
  r.map { |x| ::Io::Flow::V0::Models::ExperiencePaymentMethodRule.new(x) }
@@ -2902,6 +3114,18 @@ module Io
2902
3114
  ::Io::Flow::V0::Models::TaxRegistration.new(r)
2903
3115
  end
2904
3116
 
3117
+ def get_details(organization, incoming={})
3118
+ HttpClient::Preconditions.assert_class('organization', organization, String)
3119
+ opts = HttpClient::Helper.symbolize_keys(incoming)
3120
+ query = {
3121
+ :order_number => HttpClient::Preconditions.assert_class('order_number', opts.delete(:order_number), String),
3122
+ :limit => HttpClient::Preconditions.assert_class('limit', (x = opts.delete(:limit); x.nil? ? 25 : x), Integer),
3123
+ :offset => HttpClient::Preconditions.assert_class('offset', (x = opts.delete(:offset); x.nil? ? 0 : x), Integer)
3124
+ }.delete_if { |k, v| v.nil? }
3125
+ r = @client.request("/#{CGI.escape(organization)}/tax/registrations/details").with_query(query).get
3126
+ ::Io::Flow::V0::Models::DetailedTaxRegistration.new(r)
3127
+ end
3128
+
2905
3129
  def put_by_key(organization, key, tax_registration_form)
2906
3130
  HttpClient::Preconditions.assert_class('organization', organization, String)
2907
3131
  HttpClient::Preconditions.assert_class('key', key, String)
@@ -3709,7 +3933,8 @@ module Io
3709
3933
  :service => (x = opts.delete(:service); x.nil? ? nil : HttpClient::Preconditions.assert_class('service', x, String)),
3710
3934
  :item_number => (x = opts.delete(:item_number); x.nil? ? nil : HttpClient::Preconditions.assert_class('item_number', x, Array).map { |v| HttpClient::Preconditions.assert_class('item_number', v, String) }),
3711
3935
  :min_lead_days => (x = opts.delete(:min_lead_days); x.nil? ? nil : HttpClient::Preconditions.assert_class('min_lead_days', x, Integer)),
3712
- :max_lead_days => (x = opts.delete(:max_lead_days); x.nil? ? nil : HttpClient::Preconditions.assert_class('max_lead_days', x, Integer))
3936
+ :max_lead_days => (x = opts.delete(:max_lead_days); x.nil? ? nil : HttpClient::Preconditions.assert_class('max_lead_days', x, Integer)),
3937
+ :context => (x = opts.delete(:context); x.nil? ? nil : HttpClient::Preconditions.assert_class('context', x, String))
3713
3938
  }.delete_if { |k, v| v.nil? }
3714
3939
  r = @client.request("/#{CGI.escape(organization)}/delivery-windows/summary").with_query(query).get
3715
3940
  ::Io::Flow::V0::Models::DeliveryWindow.new(r)
@@ -3722,7 +3947,8 @@ module Io
3722
3947
  query = {
3723
3948
  :destination => (x = opts.delete(:destination); x.nil? ? nil : HttpClient::Preconditions.assert_class('destination', x, Array).map { |v| HttpClient::Preconditions.assert_class('destination', v, String) }),
3724
3949
  :limit => HttpClient::Preconditions.assert_class('limit', (x = opts.delete(:limit); x.nil? ? 25 : x), Integer),
3725
- :offset => HttpClient::Preconditions.assert_class('offset', (x = opts.delete(:offset); x.nil? ? 0 : x), Integer)
3950
+ :offset => HttpClient::Preconditions.assert_class('offset', (x = opts.delete(:offset); x.nil? ? 0 : x), Integer),
3951
+ :context => (x = opts.delete(:context); x.nil? ? nil : HttpClient::Preconditions.assert_class('context', x, String))
3726
3952
  }.delete_if { |k, v| v.nil? }
3727
3953
  r = @client.request("/#{CGI.escape(organization)}/delivery-windows/summary/all").with_query(query).get
3728
3954
  r.map { |x| ::Io::Flow::V0::Models::DeliveryWindowSummary.new(x) }
@@ -4491,7 +4717,8 @@ module Io
4491
4717
  HttpClient::Preconditions.assert_class('organization', organization, String)
4492
4718
  opts = HttpClient::Helper.symbolize_keys(incoming)
4493
4719
  query = {
4494
- :show_commercial_invoice => (x = opts.delete(:show_commercial_invoice); x.nil? ? nil : HttpClient::Preconditions.assert_boolean('show_commercial_invoice', x))
4720
+ :show_commercial_invoice => (x = opts.delete(:show_commercial_invoice); x.nil? ? nil : HttpClient::Preconditions.assert_boolean('show_commercial_invoice', x)),
4721
+ :context => (x = opts.delete(:context); x.nil? ? nil : HttpClient::Preconditions.assert_class('context', x, String))
4495
4722
  }.delete_if { |k, v| v.nil? }
4496
4723
  (x = shipping_label_form; x.is_a?(::Io::Flow::V0::Models::ShippingLabelForm) ? x : ::Io::Flow::V0::Models::ShippingLabelForm.from_json(x))
4497
4724
  r = @client.request("/#{CGI.escape(organization)}/shipping_labels").with_query(query).with_json(shipping_label_form.to_json).post
@@ -4944,7 +5171,9 @@ module Io
4944
5171
  opts = HttpClient::Helper.symbolize_keys(incoming)
4945
5172
  query = {
4946
5173
  :address => (x = opts.delete(:address); x.nil? ? nil : HttpClient::Preconditions.assert_class('address', x, String)),
4947
- :ip => (x = opts.delete(:ip); x.nil? ? nil : HttpClient::Preconditions.assert_class('ip', x, String))
5174
+ :ip => (x = opts.delete(:ip); x.nil? ? nil : HttpClient::Preconditions.assert_class('ip', x, String)),
5175
+ :country => (x = opts.delete(:country); x.nil? ? nil : HttpClient::Preconditions.assert_class('country', x, String)),
5176
+ :postal_prefix => (x = opts.delete(:postal_prefix); x.nil? ? nil : HttpClient::Preconditions.assert_class('postal_prefix', x, String))
4948
5177
  }.delete_if { |k, v| v.nil? }
4949
5178
  r = @client.request("/addresses").with_query(query).get
4950
5179
  r.map { |x| ::Io::Flow::V0::Models::Address.new(x) }
@@ -5343,10 +5572,14 @@ module Io
5343
5572
  nil
5344
5573
  end
5345
5574
 
5346
- def post_checkout_and_tokens_by_organization(organization, checkout_token_form)
5575
+ def post_checkout_and_tokens_by_organization(organization, checkout_token_form, incoming={})
5347
5576
  HttpClient::Preconditions.assert_class('organization', organization, String)
5577
+ opts = HttpClient::Helper.symbolize_keys(incoming)
5578
+ query = {
5579
+ :context => (x = opts.delete(:context); x.nil? ? nil : HttpClient::Preconditions.assert_class('context', x, String))
5580
+ }.delete_if { |k, v| v.nil? }
5348
5581
  (x = checkout_token_form; x.is_a?(::Io::Flow::V0::Models::CheckoutTokenForm) ? x : ::Io::Flow::V0::Models::CheckoutTokenForm.from_json(x))
5349
- r = @client.request("/#{CGI.escape(organization)}/checkout/tokens").with_json(checkout_token_form.to_json).post
5582
+ r = @client.request("/#{CGI.escape(organization)}/checkout/tokens").with_query(query).with_json(checkout_token_form.to_json).post
5350
5583
  ::Io::Flow::V0::Models::CheckoutToken.new(r)
5351
5584
  end
5352
5585
 
@@ -6744,10 +6977,14 @@ module Io
6744
6977
  ::Io::Flow::V0::Models::Session.from_json(r)
6745
6978
  end
6746
6979
 
6747
- def post_organizations_by_organization(organization, session_form)
6980
+ def post_organizations_by_organization(organization, session_form, incoming={})
6748
6981
  HttpClient::Preconditions.assert_class('organization', organization, String)
6982
+ opts = HttpClient::Helper.symbolize_keys(incoming)
6983
+ query = {
6984
+ :context => (x = opts.delete(:context); x.nil? ? nil : HttpClient::Preconditions.assert_class('context', x, String))
6985
+ }.delete_if { |k, v| v.nil? }
6749
6986
  (x = session_form; x.is_a?(::Io::Flow::V0::Models::SessionForm) ? x : ::Io::Flow::V0::Models::SessionForm.new(x))
6750
- r = @client.request("/sessions/organizations/#{CGI.escape(organization)}").with_json(session_form.to_json).post
6987
+ r = @client.request("/sessions/organizations/#{CGI.escape(organization)}").with_query(query).with_json(session_form.to_json).post
6751
6988
  ::Io::Flow::V0::Models::OrganizationSession.new(r)
6752
6989
  end
6753
6990
 
@@ -6757,10 +6994,14 @@ module Io
6757
6994
  ::Io::Flow::V0::Models::Session.from_json(r)
6758
6995
  end
6759
6996
 
6760
- def put_by_session(session, session_put_form)
6997
+ def put_by_session(session, session_put_form, incoming={})
6761
6998
  HttpClient::Preconditions.assert_class('session', session, String)
6999
+ opts = HttpClient::Helper.symbolize_keys(incoming)
7000
+ query = {
7001
+ :context => (x = opts.delete(:context); x.nil? ? nil : HttpClient::Preconditions.assert_class('context', x, String))
7002
+ }.delete_if { |k, v| v.nil? }
6762
7003
  (x = session_put_form; x.is_a?(::Io::Flow::V0::Models::SessionPutForm) ? x : ::Io::Flow::V0::Models::SessionPutForm.new(x))
6763
- r = @client.request("/sessions/#{CGI.escape(session)}").with_json(session_put_form.to_json).put
7004
+ r = @client.request("/sessions/#{CGI.escape(session)}").with_query(query).with_json(session_put_form.to_json).put
6764
7005
  ::Io::Flow::V0::Models::Session.from_json(r)
6765
7006
  end
6766
7007
 
@@ -6777,19 +7018,27 @@ module Io
6777
7018
  ::Io::Flow::V0::Models::Session.from_json(r)
6778
7019
  end
6779
7020
 
6780
- def put_organizations_by_session_and_organization(session, organization, session_put_form)
7021
+ def put_organizations_by_session_and_organization(session, organization, session_put_form, incoming={})
6781
7022
  HttpClient::Preconditions.assert_class('session', session, String)
6782
7023
  HttpClient::Preconditions.assert_class('organization', organization, String)
7024
+ opts = HttpClient::Helper.symbolize_keys(incoming)
7025
+ query = {
7026
+ :context => (x = opts.delete(:context); x.nil? ? nil : HttpClient::Preconditions.assert_class('context', x, String))
7027
+ }.delete_if { |k, v| v.nil? }
6783
7028
  (x = session_put_form; x.is_a?(::Io::Flow::V0::Models::SessionPutForm) ? x : ::Io::Flow::V0::Models::SessionPutForm.new(x))
6784
- r = @client.request("/sessions/#{CGI.escape(session)}/organizations/#{CGI.escape(organization)}").with_json(session_put_form.to_json).put
7029
+ r = @client.request("/sessions/#{CGI.escape(session)}/organizations/#{CGI.escape(organization)}").with_query(query).with_json(session_put_form.to_json).put
6785
7030
  ::Io::Flow::V0::Models::OrganizationSession.new(r)
6786
7031
  end
6787
7032
 
6788
7033
  # Resets the session based on the provided geo parameters.
6789
- def put_reset_by_session(session, session_put_form)
7034
+ def put_reset_by_session(session, session_put_form, incoming={})
6790
7035
  HttpClient::Preconditions.assert_class('session', session, String)
7036
+ opts = HttpClient::Helper.symbolize_keys(incoming)
7037
+ query = {
7038
+ :context => (x = opts.delete(:context); x.nil? ? nil : HttpClient::Preconditions.assert_class('context', x, String))
7039
+ }.delete_if { |k, v| v.nil? }
6791
7040
  (x = session_put_form; x.is_a?(::Io::Flow::V0::Models::SessionPutForm) ? x : ::Io::Flow::V0::Models::SessionPutForm.new(x))
6792
- r = @client.request("/sessions/#{CGI.escape(session)}/reset").with_json(session_put_form.to_json).put
7041
+ r = @client.request("/sessions/#{CGI.escape(session)}/reset").with_query(query).with_json(session_put_form.to_json).put
6793
7042
  ::Io::Flow::V0::Models::Session.from_json(r)
6794
7043
  end
6795
7044
 
@@ -6816,47 +7065,71 @@ module Io
6816
7065
  end
6817
7066
 
6818
7067
  # Retrieve representation of a Shopify cart for the given order number.
6819
- def get_order_by_number(number)
7068
+ def get_order_by_number(number, incoming={})
6820
7069
  HttpClient::Preconditions.assert_class('number', number, String)
6821
- r = @client.request("/shopify/carts/order/#{CGI.escape(number)}").get
7070
+ opts = HttpClient::Helper.symbolize_keys(incoming)
7071
+ query = {
7072
+ :context => (x = opts.delete(:context); x.nil? ? nil : HttpClient::Preconditions.assert_class('context', x, String))
7073
+ }.delete_if { |k, v| v.nil? }
7074
+ r = @client.request("/shopify/carts/order/#{CGI.escape(number)}").with_query(query).get
6822
7075
  ::Io::Flow::V0::Models::ShopifyCart.new(r)
6823
7076
  end
6824
7077
 
6825
7078
  # Retrieve representation of a Shopify cart given the unique cart id.
6826
- def get_by_id_html(id)
7079
+ def get_by_id_html(id, incoming={})
6827
7080
  HttpClient::Preconditions.assert_class('id', id, String)
6828
- r = @client.request("/shopify/carts/#{CGI.escape(id)}").get
7081
+ opts = HttpClient::Helper.symbolize_keys(incoming)
7082
+ query = {
7083
+ :context => (x = opts.delete(:context); x.nil? ? nil : HttpClient::Preconditions.assert_class('context', x, String))
7084
+ }.delete_if { |k, v| v.nil? }
7085
+ r = @client.request("/shopify/carts/#{CGI.escape(id)}").with_query(query).get
6829
7086
  r
6830
7087
  end
6831
7088
 
6832
7089
  # Retrieve representation of a Shopify cart given the unique cart id.
6833
- def get_by_id(id)
7090
+ def get_by_id(id, incoming={})
6834
7091
  HttpClient::Preconditions.assert_class('id', id, String)
6835
- r = @client.request("/shopify/carts/#{CGI.escape(id)}").get
7092
+ opts = HttpClient::Helper.symbolize_keys(incoming)
7093
+ query = {
7094
+ :context => (x = opts.delete(:context); x.nil? ? nil : HttpClient::Preconditions.assert_class('context', x, String))
7095
+ }.delete_if { |k, v| v.nil? }
7096
+ r = @client.request("/shopify/carts/#{CGI.escape(id)}").with_query(query).get
6836
7097
  ::Io::Flow::V0::Models::ShopifyCart.new(r)
6837
7098
  end
6838
7099
 
6839
7100
  # Add an item to a Shopify cart given the unique cart id.
6840
- def post_add_by_id(id, shopify_cart_add_form)
7101
+ def post_add_by_id(id, shopify_cart_add_form, incoming={})
6841
7102
  HttpClient::Preconditions.assert_class('id', id, String)
7103
+ opts = HttpClient::Helper.symbolize_keys(incoming)
7104
+ query = {
7105
+ :context => (x = opts.delete(:context); x.nil? ? nil : HttpClient::Preconditions.assert_class('context', x, String))
7106
+ }.delete_if { |k, v| v.nil? }
6842
7107
  (x = shopify_cart_add_form; x.is_a?(::Io::Flow::V0::Models::ShopifyCartAddForm) ? x : ::Io::Flow::V0::Models::ShopifyCartAddForm.from_json(x))
6843
- r = @client.request("/shopify/carts/#{CGI.escape(id)}/add").with_json(shopify_cart_add_form.to_json).post
7108
+ r = @client.request("/shopify/carts/#{CGI.escape(id)}/add").with_query(query).with_json(shopify_cart_add_form.to_json).post
6844
7109
  ::Io::Flow::V0::Models::ShopifyCart.new(r)
6845
7110
  end
6846
7111
 
6847
7112
  # Update the attribute information for the cart.
6848
- def put_attributes_by_id(id, shopify_order_attributes_form)
7113
+ def put_attributes_by_id(id, shopify_order_attributes_form, incoming={})
6849
7114
  HttpClient::Preconditions.assert_class('id', id, String)
7115
+ opts = HttpClient::Helper.symbolize_keys(incoming)
7116
+ query = {
7117
+ :context => (x = opts.delete(:context); x.nil? ? nil : HttpClient::Preconditions.assert_class('context', x, String))
7118
+ }.delete_if { |k, v| v.nil? }
6850
7119
  (x = shopify_order_attributes_form; x.is_a?(::Io::Flow::V0::Models::ShopifyOrderAttributesForm) ? x : ::Io::Flow::V0::Models::ShopifyOrderAttributesForm.new(x))
6851
- r = @client.request("/shopify/carts/#{CGI.escape(id)}/attributes").with_json(shopify_order_attributes_form.to_json).put
7120
+ r = @client.request("/shopify/carts/#{CGI.escape(id)}/attributes").with_query(query).with_json(shopify_order_attributes_form.to_json).put
6852
7121
  ::Io::Flow::V0::Models::ShopifyCart.new(r)
6853
7122
  end
6854
7123
 
6855
7124
  # Change/Update an item in a Shopify cart given the unique cart id.
6856
- def post_change_by_id(id, shopify_cart_change_form)
7125
+ def post_change_by_id(id, shopify_cart_change_form, incoming={})
6857
7126
  HttpClient::Preconditions.assert_class('id', id, String)
7127
+ opts = HttpClient::Helper.symbolize_keys(incoming)
7128
+ query = {
7129
+ :context => (x = opts.delete(:context); x.nil? ? nil : HttpClient::Preconditions.assert_class('context', x, String))
7130
+ }.delete_if { |k, v| v.nil? }
6858
7131
  (x = shopify_cart_change_form; x.is_a?(::Io::Flow::V0::Models::ShopifyCartChangeForm) ? x : ::Io::Flow::V0::Models::ShopifyCartChangeForm.new(x))
6859
- r = @client.request("/shopify/carts/#{CGI.escape(id)}/change").with_json(shopify_cart_change_form.to_json).post
7132
+ r = @client.request("/shopify/carts/#{CGI.escape(id)}/change").with_query(query).with_json(shopify_cart_change_form.to_json).post
6860
7133
  ::Io::Flow::V0::Models::ShopifyCart.new(r)
6861
7134
  end
6862
7135
 
@@ -6868,10 +7141,14 @@ module Io
6868
7141
  end
6869
7142
 
6870
7143
  # Update the geo information for the cart.
6871
- def put_geo_by_id(id, geo_form)
7144
+ def put_geo_by_id(id, geo_form, incoming={})
6872
7145
  HttpClient::Preconditions.assert_class('id', id, String)
7146
+ opts = HttpClient::Helper.symbolize_keys(incoming)
7147
+ query = {
7148
+ :context => (x = opts.delete(:context); x.nil? ? nil : HttpClient::Preconditions.assert_class('context', x, String))
7149
+ }.delete_if { |k, v| v.nil? }
6873
7150
  (x = geo_form; x.is_a?(::Io::Flow::V0::Models::GeoForm) ? x : ::Io::Flow::V0::Models::GeoForm.new(x))
6874
- r = @client.request("/shopify/carts/#{CGI.escape(id)}/geo").with_json(geo_form.to_json).put
7151
+ r = @client.request("/shopify/carts/#{CGI.escape(id)}/geo").with_query(query).with_json(geo_form.to_json).put
6875
7152
  ::Io::Flow::V0::Models::ShopifyCart.new(r)
6876
7153
  end
6877
7154
 
@@ -6880,7 +7157,8 @@ module Io
6880
7157
  HttpClient::Preconditions.assert_class('id', id, String)
6881
7158
  opts = HttpClient::Helper.symbolize_keys(incoming)
6882
7159
  query = {
6883
- :expand => (x = opts.delete(:expand); x.nil? ? nil : HttpClient::Preconditions.assert_class('expand', x, Array).map { |v| HttpClient::Preconditions.assert_class('expand', v, String) })
7160
+ :expand => (x = opts.delete(:expand); x.nil? ? nil : HttpClient::Preconditions.assert_class('expand', x, Array).map { |v| HttpClient::Preconditions.assert_class('expand', v, String) }),
7161
+ :context => (x = opts.delete(:context); x.nil? ? nil : HttpClient::Preconditions.assert_class('context', x, String))
6884
7162
  }.delete_if { |k, v| v.nil? }
6885
7163
  r = @client.request("/shopify/carts/#{CGI.escape(id)}/orders").with_query(query).post
6886
7164
  ::Io::Flow::V0::Models::Order.new(r)
@@ -6900,7 +7178,8 @@ module Io
6900
7178
  HttpClient::Preconditions.assert_class('experience_key', experience_key, String)
6901
7179
  opts = HttpClient::Helper.symbolize_keys(incoming)
6902
7180
  query = {
6903
- :expand => (x = opts.delete(:expand); x.nil? ? nil : HttpClient::Preconditions.assert_class('expand', x, Array).map { |v| HttpClient::Preconditions.assert_class('expand', v, String) })
7181
+ :expand => (x = opts.delete(:expand); x.nil? ? nil : HttpClient::Preconditions.assert_class('expand', x, Array).map { |v| HttpClient::Preconditions.assert_class('expand', v, String) }),
7182
+ :context => (x = opts.delete(:context); x.nil? ? nil : HttpClient::Preconditions.assert_class('context', x, String))
6904
7183
  }.delete_if { |k, v| v.nil? }
6905
7184
  (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))
6906
7185
  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
@@ -7486,6 +7765,68 @@ module Io
7486
7765
 
7487
7766
  module Models
7488
7767
 
7768
+ # Configurations to support payment authentication done in the user experience
7769
+ # e.g. card authentication with 3DS by an issuer ACS.
7770
+ class ActionConfiguration
7771
+
7772
+ module Types
7773
+ THREEDS_TWO_BROWSER_ACTION_CONFIGURATION = 'threeds_two_browser_action_configuration' unless defined?(THREEDS_TWO_BROWSER_ACTION_CONFIGURATION)
7774
+ end
7775
+
7776
+ attr_reader :discriminator
7777
+
7778
+ def initialize(incoming={})
7779
+ opts = HttpClient::Helper.symbolize_keys(incoming)
7780
+ HttpClient::Preconditions.require_keys(opts, [:discriminator], 'ActionConfiguration')
7781
+ @discriminator = HttpClient::Preconditions.assert_class('discriminator', opts.delete(:discriminator), String)
7782
+ end
7783
+
7784
+ def subtype_to_hash
7785
+ raise 'Cannot serialize an instance of action_configuration directly - must use one of the specific types: threeds_two_browser_action_configuration'
7786
+ end
7787
+
7788
+ def to_hash
7789
+ subtype_to_hash.merge(:discriminator => @discriminator)
7790
+ end
7791
+
7792
+ def ActionConfiguration.from_json(hash)
7793
+ HttpClient::Preconditions.assert_class('hash', hash, Hash)
7794
+ discriminator = HttpClient::Helper.symbolize_keys(hash)[:discriminator].to_s.strip
7795
+ if discriminator.empty?
7796
+ raise "Union type[action_configuration] requires a field named 'discriminator'"
7797
+ end
7798
+ case discriminator
7799
+ when Types::THREEDS_TWO_BROWSER_ACTION_CONFIGURATION; ThreedsTwoBrowserActionConfiguration.new(hash)
7800
+ else ActionConfigurationUndefinedType.new(:discriminator => discriminator)
7801
+ end
7802
+ end
7803
+
7804
+ end
7805
+
7806
+ class ActionConfigurationUndefinedType < ActionConfiguration
7807
+
7808
+ attr_reader :name
7809
+
7810
+ def initialize(incoming={})
7811
+ super(:discriminator => 'undefined_type')
7812
+ opts = HttpClient::Helper.symbolize_keys(incoming)
7813
+ @name = HttpClient::Preconditions.assert_class('name', opts.delete(:discriminator), String)
7814
+ end
7815
+
7816
+ def subtype_to_hash
7817
+ raise 'Unable to serialize undefined type to json'
7818
+ end
7819
+
7820
+ def copy(incoming={})
7821
+ raise 'Operation not supported for undefined type'
7822
+ end
7823
+
7824
+ def to_hash
7825
+ raise 'Operation not supported for undefined type'
7826
+ end
7827
+
7828
+ end
7829
+
7489
7830
  class AdyenNativeData
7490
7831
 
7491
7832
  module Types
@@ -7955,6 +8296,8 @@ module Io
7955
8296
  module Types
7956
8297
  ADYEN_NATIVE_ACTION_DETAILS = 'adyen_native_action_details' unless defined?(ADYEN_NATIVE_ACTION_DETAILS)
7957
8298
  STRIPE_AUTHORIZATION_RESULT_ACTION_DETAILS = 'stripe_authorization_result_action_details' unless defined?(STRIPE_AUTHORIZATION_RESULT_ACTION_DETAILS)
8299
+ THREEDS_IDENTIFY_ACTION_DETAILS = 'threeds_identify_action_details' unless defined?(THREEDS_IDENTIFY_ACTION_DETAILS)
8300
+ THREEDS_CHALLENGE_ACTION_DETAILS = 'threeds_challenge_action_details' unless defined?(THREEDS_CHALLENGE_ACTION_DETAILS)
7958
8301
  end
7959
8302
 
7960
8303
  attr_reader :discriminator
@@ -7966,7 +8309,7 @@ module Io
7966
8309
  end
7967
8310
 
7968
8311
  def subtype_to_hash
7969
- 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'
8312
+ 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'
7970
8313
  end
7971
8314
 
7972
8315
  def to_hash
@@ -7982,6 +8325,8 @@ module Io
7982
8325
  case discriminator
7983
8326
  when Types::ADYEN_NATIVE_ACTION_DETAILS; AdyenNativeActionDetails.new(hash)
7984
8327
  when Types::STRIPE_AUTHORIZATION_RESULT_ACTION_DETAILS; StripeAuthorizationResultActionDetails.new(hash)
8328
+ when Types::THREEDS_IDENTIFY_ACTION_DETAILS; ThreedsIdentifyActionDetails.new(hash)
8329
+ when Types::THREEDS_CHALLENGE_ACTION_DETAILS; ThreedsChallengeActionDetails.new(hash)
7985
8330
  else AuthorizationResultActionDetailsUndefinedType.new(:discriminator => discriminator)
7986
8331
  end
7987
8332
  end
@@ -11384,43 +11729,165 @@ module Io
11384
11729
 
11385
11730
  end
11386
11731
 
11387
- class Session
11732
+ class Session
11733
+
11734
+ module Types
11735
+ ORGANIZATION_SESSION = 'organization_session' unless defined?(ORGANIZATION_SESSION)
11736
+ end
11737
+
11738
+ attr_reader :discriminator
11739
+
11740
+ def initialize(incoming={})
11741
+ opts = HttpClient::Helper.symbolize_keys(incoming)
11742
+ HttpClient::Preconditions.require_keys(opts, [:discriminator], 'Session')
11743
+ @discriminator = HttpClient::Preconditions.assert_class('discriminator', opts.delete(:discriminator), String)
11744
+ end
11745
+
11746
+ def subtype_to_hash
11747
+ raise 'Cannot serialize an instance of session directly - must use one of the specific types: organization_session'
11748
+ end
11749
+
11750
+ def to_hash
11751
+ subtype_to_hash.merge(:discriminator => @discriminator)
11752
+ end
11753
+
11754
+ def Session.from_json(hash)
11755
+ HttpClient::Preconditions.assert_class('hash', hash, Hash)
11756
+ discriminator = HttpClient::Helper.symbolize_keys(hash)[:discriminator].to_s.strip
11757
+ if discriminator.empty?
11758
+ raise "Union type[session] requires a field named 'discriminator'"
11759
+ end
11760
+ case discriminator
11761
+ when Types::ORGANIZATION_SESSION; OrganizationSession.new(hash)
11762
+ else SessionUndefinedType.new(:discriminator => discriminator)
11763
+ end
11764
+ end
11765
+
11766
+ end
11767
+
11768
+ class SessionUndefinedType < Session
11769
+
11770
+ attr_reader :name
11771
+
11772
+ def initialize(incoming={})
11773
+ super(:discriminator => 'undefined_type')
11774
+ opts = HttpClient::Helper.symbolize_keys(incoming)
11775
+ @name = HttpClient::Preconditions.assert_class('name', opts.delete(:discriminator), String)
11776
+ end
11777
+
11778
+ def subtype_to_hash
11779
+ raise 'Unable to serialize undefined type to json'
11780
+ end
11781
+
11782
+ def copy(incoming={})
11783
+ raise 'Operation not supported for undefined type'
11784
+ end
11785
+
11786
+ def to_hash
11787
+ raise 'Operation not supported for undefined type'
11788
+ end
11789
+
11790
+ end
11791
+
11792
+ class SessionAuthorization
11793
+
11794
+ module Types
11795
+ ORGANIZATION_SESSION_AUTHORIZATION = 'organization_session_authorization' unless defined?(ORGANIZATION_SESSION_AUTHORIZATION)
11796
+ end
11797
+
11798
+ attr_reader :discriminator
11799
+
11800
+ def initialize(incoming={})
11801
+ opts = HttpClient::Helper.symbolize_keys(incoming)
11802
+ HttpClient::Preconditions.require_keys(opts, [:discriminator], 'SessionAuthorization')
11803
+ @discriminator = HttpClient::Preconditions.assert_class('discriminator', opts.delete(:discriminator), String)
11804
+ end
11805
+
11806
+ def subtype_to_hash
11807
+ raise 'Cannot serialize an instance of session_authorization directly - must use one of the specific types: organization_session_authorization'
11808
+ end
11809
+
11810
+ def to_hash
11811
+ subtype_to_hash.merge(:discriminator => @discriminator)
11812
+ end
11813
+
11814
+ def SessionAuthorization.from_json(hash)
11815
+ HttpClient::Preconditions.assert_class('hash', hash, Hash)
11816
+ discriminator = HttpClient::Helper.symbolize_keys(hash)[:discriminator].to_s.strip
11817
+ if discriminator.empty?
11818
+ raise "Union type[session_authorization] requires a field named 'discriminator'"
11819
+ end
11820
+ case discriminator
11821
+ when Types::ORGANIZATION_SESSION_AUTHORIZATION; OrganizationSessionAuthorization.new(hash)
11822
+ else SessionAuthorizationUndefinedType.new(:discriminator => discriminator)
11823
+ end
11824
+ end
11825
+
11826
+ end
11827
+
11828
+ class SessionAuthorizationUndefinedType < SessionAuthorization
11829
+
11830
+ attr_reader :name
11831
+
11832
+ def initialize(incoming={})
11833
+ super(:discriminator => 'undefined_type')
11834
+ opts = HttpClient::Helper.symbolize_keys(incoming)
11835
+ @name = HttpClient::Preconditions.assert_class('name', opts.delete(:discriminator), String)
11836
+ end
11837
+
11838
+ def subtype_to_hash
11839
+ raise 'Unable to serialize undefined type to json'
11840
+ end
11841
+
11842
+ def copy(incoming={})
11843
+ raise 'Operation not supported for undefined type'
11844
+ end
11845
+
11846
+ def to_hash
11847
+ raise 'Operation not supported for undefined type'
11848
+ end
11849
+
11850
+ end
11851
+
11852
+ # Different models for forms to create shipping labels
11853
+ class ShippingLabelForm
11388
11854
 
11389
11855
  module Types
11390
- ORGANIZATION_SESSION = 'organization_session' unless defined?(ORGANIZATION_SESSION)
11856
+ DETAILED_SHIPPING_LABEL_FORM = 'detailed_shipping_label_form' unless defined?(DETAILED_SHIPPING_LABEL_FORM)
11857
+ SUMMARY_SHIPPING_LABEL_FORM = 'summary_shipping_label_form' unless defined?(SUMMARY_SHIPPING_LABEL_FORM)
11391
11858
  end
11392
11859
 
11393
11860
  attr_reader :discriminator
11394
11861
 
11395
11862
  def initialize(incoming={})
11396
11863
  opts = HttpClient::Helper.symbolize_keys(incoming)
11397
- HttpClient::Preconditions.require_keys(opts, [:discriminator], 'Session')
11398
- @discriminator = HttpClient::Preconditions.assert_class('discriminator', opts.delete(:discriminator), String)
11864
+ @discriminator = HttpClient::Preconditions.assert_class('discriminator', opts.delete(:discriminator) || 'detailed_shipping_label_form', String)
11399
11865
  end
11400
11866
 
11401
11867
  def subtype_to_hash
11402
- raise 'Cannot serialize an instance of session directly - must use one of the specific types: organization_session'
11868
+ raise 'Cannot serialize an instance of shipping_label_form directly - must use one of the specific types: detailed_shipping_label_form, summary_shipping_label_form'
11403
11869
  end
11404
11870
 
11405
11871
  def to_hash
11406
11872
  subtype_to_hash.merge(:discriminator => @discriminator)
11407
11873
  end
11408
11874
 
11409
- def Session.from_json(hash)
11875
+ def ShippingLabelForm.from_json(hash)
11410
11876
  HttpClient::Preconditions.assert_class('hash', hash, Hash)
11411
11877
  discriminator = HttpClient::Helper.symbolize_keys(hash)[:discriminator].to_s.strip
11412
11878
  if discriminator.empty?
11413
- raise "Union type[session] requires a field named 'discriminator'"
11879
+ raise "Union type[shipping_label_form] requires a field named 'discriminator'"
11414
11880
  end
11415
11881
  case discriminator
11416
- when Types::ORGANIZATION_SESSION; OrganizationSession.new(hash)
11417
- else SessionUndefinedType.new(:discriminator => discriminator)
11882
+ when Types::DETAILED_SHIPPING_LABEL_FORM; DetailedShippingLabelForm.new(hash)
11883
+ when Types::SUMMARY_SHIPPING_LABEL_FORM; SummaryShippingLabelForm.new(hash)
11884
+ else ShippingLabelFormUndefinedType.new(:discriminator => discriminator)
11418
11885
  end
11419
11886
  end
11420
11887
 
11421
11888
  end
11422
11889
 
11423
- class SessionUndefinedType < Session
11890
+ class ShippingLabelFormUndefinedType < ShippingLabelForm
11424
11891
 
11425
11892
  attr_reader :name
11426
11893
 
@@ -11444,43 +11911,48 @@ module Io
11444
11911
 
11445
11912
  end
11446
11913
 
11447
- class SessionAuthorization
11914
+ # Form for information about a client-facilitated shipment where the shipping
11915
+ # label and fulfillment was not handled by Flow. For merchant-of-record and
11916
+ # tracking purposes, clients doing their own shipping will need to notify Flow
11917
+ # of shipped packages.
11918
+ class ShippingNotificationForm
11448
11919
 
11449
11920
  module Types
11450
- ORGANIZATION_SESSION_AUTHORIZATION = 'organization_session_authorization' unless defined?(ORGANIZATION_SESSION_AUTHORIZATION)
11921
+ DETAILED_SHIPPING_NOTIFICATION_FORM = 'detailed_shipping_notification_form' unless defined?(DETAILED_SHIPPING_NOTIFICATION_FORM)
11922
+ SINGLE_PACKAGE_SHIPPING_NOTIFICATION_FORM = 'single_package_shipping_notification_form' unless defined?(SINGLE_PACKAGE_SHIPPING_NOTIFICATION_FORM)
11451
11923
  end
11452
11924
 
11453
11925
  attr_reader :discriminator
11454
11926
 
11455
11927
  def initialize(incoming={})
11456
11928
  opts = HttpClient::Helper.symbolize_keys(incoming)
11457
- HttpClient::Preconditions.require_keys(opts, [:discriminator], 'SessionAuthorization')
11458
- @discriminator = HttpClient::Preconditions.assert_class('discriminator', opts.delete(:discriminator), String)
11929
+ @discriminator = HttpClient::Preconditions.assert_class('discriminator', opts.delete(:discriminator) || 'detailed_shipping_notification_form', String)
11459
11930
  end
11460
11931
 
11461
11932
  def subtype_to_hash
11462
- raise 'Cannot serialize an instance of session_authorization directly - must use one of the specific types: organization_session_authorization'
11933
+ raise 'Cannot serialize an instance of shipping_notification_form directly - must use one of the specific types: detailed_shipping_notification_form, single_package_shipping_notification_form'
11463
11934
  end
11464
11935
 
11465
11936
  def to_hash
11466
11937
  subtype_to_hash.merge(:discriminator => @discriminator)
11467
11938
  end
11468
11939
 
11469
- def SessionAuthorization.from_json(hash)
11940
+ def ShippingNotificationForm.from_json(hash)
11470
11941
  HttpClient::Preconditions.assert_class('hash', hash, Hash)
11471
11942
  discriminator = HttpClient::Helper.symbolize_keys(hash)[:discriminator].to_s.strip
11472
11943
  if discriminator.empty?
11473
- raise "Union type[session_authorization] requires a field named 'discriminator'"
11944
+ raise "Union type[shipping_notification_form] requires a field named 'discriminator'"
11474
11945
  end
11475
11946
  case discriminator
11476
- when Types::ORGANIZATION_SESSION_AUTHORIZATION; OrganizationSessionAuthorization.new(hash)
11477
- else SessionAuthorizationUndefinedType.new(:discriminator => discriminator)
11947
+ when Types::DETAILED_SHIPPING_NOTIFICATION_FORM; DetailedShippingNotificationForm.new(hash)
11948
+ when Types::SINGLE_PACKAGE_SHIPPING_NOTIFICATION_FORM; SinglePackageShippingNotificationForm.new(hash)
11949
+ else ShippingNotificationFormUndefinedType.new(:discriminator => discriminator)
11478
11950
  end
11479
11951
  end
11480
11952
 
11481
11953
  end
11482
11954
 
11483
- class SessionAuthorizationUndefinedType < SessionAuthorization
11955
+ class ShippingNotificationFormUndefinedType < ShippingNotificationForm
11484
11956
 
11485
11957
  attr_reader :name
11486
11958
 
@@ -11504,45 +11976,44 @@ module Io
11504
11976
 
11505
11977
  end
11506
11978
 
11507
- # Different models for forms to create shipping labels
11508
- class ShippingLabelForm
11979
+ class ShopifyCartAddForm
11509
11980
 
11510
11981
  module Types
11511
- DETAILED_SHIPPING_LABEL_FORM = 'detailed_shipping_label_form' unless defined?(DETAILED_SHIPPING_LABEL_FORM)
11512
- SUMMARY_SHIPPING_LABEL_FORM = 'summary_shipping_label_form' unless defined?(SUMMARY_SHIPPING_LABEL_FORM)
11982
+ SHOPIFY_CART_ADD_SINGLE_FORM = 'shopify_cart_add_single_form' unless defined?(SHOPIFY_CART_ADD_SINGLE_FORM)
11983
+ SHOPIFY_CART_ADD_MULTIPLE_FORM = 'shopify_cart_add_multiple_form' unless defined?(SHOPIFY_CART_ADD_MULTIPLE_FORM)
11513
11984
  end
11514
11985
 
11515
11986
  attr_reader :discriminator
11516
11987
 
11517
11988
  def initialize(incoming={})
11518
11989
  opts = HttpClient::Helper.symbolize_keys(incoming)
11519
- @discriminator = HttpClient::Preconditions.assert_class('discriminator', opts.delete(:discriminator) || 'detailed_shipping_label_form', String)
11990
+ @discriminator = HttpClient::Preconditions.assert_class('discriminator', opts.delete(:discriminator) || 'shopify_cart_add_single_form', String)
11520
11991
  end
11521
11992
 
11522
11993
  def subtype_to_hash
11523
- raise 'Cannot serialize an instance of shipping_label_form directly - must use one of the specific types: detailed_shipping_label_form, summary_shipping_label_form'
11994
+ raise 'Cannot serialize an instance of shopify_cart_add_form directly - must use one of the specific types: shopify_cart_add_single_form, shopify_cart_add_multiple_form'
11524
11995
  end
11525
11996
 
11526
11997
  def to_hash
11527
11998
  subtype_to_hash.merge(:discriminator => @discriminator)
11528
11999
  end
11529
12000
 
11530
- def ShippingLabelForm.from_json(hash)
12001
+ def ShopifyCartAddForm.from_json(hash)
11531
12002
  HttpClient::Preconditions.assert_class('hash', hash, Hash)
11532
12003
  discriminator = HttpClient::Helper.symbolize_keys(hash)[:discriminator].to_s.strip
11533
12004
  if discriminator.empty?
11534
- raise "Union type[shipping_label_form] requires a field named 'discriminator'"
12005
+ raise "Union type[shopify_cart_add_form] requires a field named 'discriminator'"
11535
12006
  end
11536
12007
  case discriminator
11537
- when Types::DETAILED_SHIPPING_LABEL_FORM; DetailedShippingLabelForm.new(hash)
11538
- when Types::SUMMARY_SHIPPING_LABEL_FORM; SummaryShippingLabelForm.new(hash)
11539
- else ShippingLabelFormUndefinedType.new(:discriminator => discriminator)
12008
+ when Types::SHOPIFY_CART_ADD_SINGLE_FORM; ShopifyCartAddSingleForm.new(hash)
12009
+ when Types::SHOPIFY_CART_ADD_MULTIPLE_FORM; ShopifyCartAddMultipleForm.new(hash)
12010
+ else ShopifyCartAddFormUndefinedType.new(:discriminator => discriminator)
11540
12011
  end
11541
12012
  end
11542
12013
 
11543
12014
  end
11544
12015
 
11545
- class ShippingLabelFormUndefinedType < ShippingLabelForm
12016
+ class ShopifyCartAddFormUndefinedType < ShopifyCartAddForm
11546
12017
 
11547
12018
  attr_reader :name
11548
12019
 
@@ -11566,48 +12037,42 @@ module Io
11566
12037
 
11567
12038
  end
11568
12039
 
11569
- # Form for information about a client-facilitated shipment where the shipping
11570
- # label and fulfillment was not handled by Flow. For merchant-of-record and
11571
- # tracking purposes, clients doing their own shipping will need to notify Flow
11572
- # of shipped packages.
11573
- class ShippingNotificationForm
12040
+ class ShopifyEventBucket
11574
12041
 
11575
12042
  module Types
11576
- DETAILED_SHIPPING_NOTIFICATION_FORM = 'detailed_shipping_notification_form' unless defined?(DETAILED_SHIPPING_NOTIFICATION_FORM)
11577
- SINGLE_PACKAGE_SHIPPING_NOTIFICATION_FORM = 'single_package_shipping_notification_form' unless defined?(SINGLE_PACKAGE_SHIPPING_NOTIFICATION_FORM)
12043
+ SHOPIFY_ITEM_EVENT_BUCKET = 'shopify_item_event_bucket' unless defined?(SHOPIFY_ITEM_EVENT_BUCKET)
11578
12044
  end
11579
12045
 
11580
12046
  attr_reader :discriminator
11581
12047
 
11582
12048
  def initialize(incoming={})
11583
12049
  opts = HttpClient::Helper.symbolize_keys(incoming)
11584
- @discriminator = HttpClient::Preconditions.assert_class('discriminator', opts.delete(:discriminator) || 'detailed_shipping_notification_form', String)
12050
+ @discriminator = HttpClient::Preconditions.assert_class('discriminator', opts.delete(:discriminator) || 'shopify_item_event_bucket', String)
11585
12051
  end
11586
12052
 
11587
12053
  def subtype_to_hash
11588
- raise 'Cannot serialize an instance of shipping_notification_form directly - must use one of the specific types: detailed_shipping_notification_form, single_package_shipping_notification_form'
12054
+ raise 'Cannot serialize an instance of shopify_event_bucket directly - must use one of the specific types: shopify_item_event_bucket'
11589
12055
  end
11590
12056
 
11591
12057
  def to_hash
11592
12058
  subtype_to_hash.merge(:discriminator => @discriminator)
11593
12059
  end
11594
12060
 
11595
- def ShippingNotificationForm.from_json(hash)
12061
+ def ShopifyEventBucket.from_json(hash)
11596
12062
  HttpClient::Preconditions.assert_class('hash', hash, Hash)
11597
12063
  discriminator = HttpClient::Helper.symbolize_keys(hash)[:discriminator].to_s.strip
11598
12064
  if discriminator.empty?
11599
- raise "Union type[shipping_notification_form] requires a field named 'discriminator'"
12065
+ raise "Union type[shopify_event_bucket] requires a field named 'discriminator'"
11600
12066
  end
11601
12067
  case discriminator
11602
- when Types::DETAILED_SHIPPING_NOTIFICATION_FORM; DetailedShippingNotificationForm.new(hash)
11603
- when Types::SINGLE_PACKAGE_SHIPPING_NOTIFICATION_FORM; SinglePackageShippingNotificationForm.new(hash)
11604
- else ShippingNotificationFormUndefinedType.new(:discriminator => discriminator)
12068
+ when Types::SHOPIFY_ITEM_EVENT_BUCKET; ShopifyItemEventBucket.new(hash)
12069
+ else ShopifyEventBucketUndefinedType.new(:discriminator => discriminator)
11605
12070
  end
11606
12071
  end
11607
12072
 
11608
12073
  end
11609
12074
 
11610
- class ShippingNotificationFormUndefinedType < ShippingNotificationForm
12075
+ class ShopifyEventBucketUndefinedType < ShopifyEventBucket
11611
12076
 
11612
12077
  attr_reader :name
11613
12078
 
@@ -11631,44 +12096,45 @@ module Io
11631
12096
 
11632
12097
  end
11633
12098
 
11634
- class ShopifyCartAddForm
12099
+ class TaxSetting
11635
12100
 
11636
12101
  module Types
11637
- SHOPIFY_CART_ADD_SINGLE_FORM = 'shopify_cart_add_single_form' unless defined?(SHOPIFY_CART_ADD_SINGLE_FORM)
11638
- SHOPIFY_CART_ADD_MULTIPLE_FORM = 'shopify_cart_add_multiple_form' unless defined?(SHOPIFY_CART_ADD_MULTIPLE_FORM)
12102
+ AVALARA_TAX_SETTING = 'avalara_tax_setting' unless defined?(AVALARA_TAX_SETTING)
12103
+ AVALARA_TAX_CSV_SETTING = 'avalara_tax_csv_setting' unless defined?(AVALARA_TAX_CSV_SETTING)
11639
12104
  end
11640
12105
 
11641
12106
  attr_reader :discriminator
11642
12107
 
11643
12108
  def initialize(incoming={})
11644
12109
  opts = HttpClient::Helper.symbolize_keys(incoming)
11645
- @discriminator = HttpClient::Preconditions.assert_class('discriminator', opts.delete(:discriminator) || 'shopify_cart_add_single_form', String)
12110
+ HttpClient::Preconditions.require_keys(opts, [:discriminator], 'TaxSetting')
12111
+ @discriminator = HttpClient::Preconditions.assert_class('discriminator', opts.delete(:discriminator), String)
11646
12112
  end
11647
12113
 
11648
12114
  def subtype_to_hash
11649
- raise 'Cannot serialize an instance of shopify_cart_add_form directly - must use one of the specific types: shopify_cart_add_single_form, shopify_cart_add_multiple_form'
12115
+ raise 'Cannot serialize an instance of tax_setting directly - must use one of the specific types: avalara_tax_setting, avalara_tax_csv_setting'
11650
12116
  end
11651
12117
 
11652
12118
  def to_hash
11653
12119
  subtype_to_hash.merge(:discriminator => @discriminator)
11654
12120
  end
11655
12121
 
11656
- def ShopifyCartAddForm.from_json(hash)
12122
+ def TaxSetting.from_json(hash)
11657
12123
  HttpClient::Preconditions.assert_class('hash', hash, Hash)
11658
12124
  discriminator = HttpClient::Helper.symbolize_keys(hash)[:discriminator].to_s.strip
11659
12125
  if discriminator.empty?
11660
- raise "Union type[shopify_cart_add_form] requires a field named 'discriminator'"
12126
+ raise "Union type[tax_setting] requires a field named 'discriminator'"
11661
12127
  end
11662
12128
  case discriminator
11663
- when Types::SHOPIFY_CART_ADD_SINGLE_FORM; ShopifyCartAddSingleForm.new(hash)
11664
- when Types::SHOPIFY_CART_ADD_MULTIPLE_FORM; ShopifyCartAddMultipleForm.new(hash)
11665
- else ShopifyCartAddFormUndefinedType.new(:discriminator => discriminator)
12129
+ when Types::AVALARA_TAX_SETTING; AvalaraTaxSetting.new(hash)
12130
+ when Types::AVALARA_TAX_CSV_SETTING; AvalaraTaxCsvSetting.new(hash)
12131
+ else TaxSettingUndefinedType.new(:discriminator => discriminator)
11666
12132
  end
11667
12133
  end
11668
12134
 
11669
12135
  end
11670
12136
 
11671
- class ShopifyCartAddFormUndefinedType < ShopifyCartAddForm
12137
+ class TaxSettingUndefinedType < TaxSetting
11672
12138
 
11673
12139
  attr_reader :name
11674
12140
 
@@ -11692,42 +12158,45 @@ module Io
11692
12158
 
11693
12159
  end
11694
12160
 
11695
- class ShopifyEventBucket
12161
+ # Different version sets of 3ds challenge actions.
12162
+ class ThreedsChallengeAction
11696
12163
 
11697
12164
  module Types
11698
- SHOPIFY_ITEM_EVENT_BUCKET = 'shopify_item_event_bucket' unless defined?(SHOPIFY_ITEM_EVENT_BUCKET)
12165
+ # Used for 2.1 and 2.2 versions of 3ds
12166
+ THREEDS_TWO_CHALLENGE_REQUEST = 'threeds_two_challenge_request' unless defined?(THREEDS_TWO_CHALLENGE_REQUEST)
11699
12167
  end
11700
12168
 
11701
12169
  attr_reader :discriminator
11702
12170
 
11703
12171
  def initialize(incoming={})
11704
12172
  opts = HttpClient::Helper.symbolize_keys(incoming)
11705
- @discriminator = HttpClient::Preconditions.assert_class('discriminator', opts.delete(:discriminator) || 'shopify_item_event_bucket', String)
12173
+ HttpClient::Preconditions.require_keys(opts, [:discriminator], 'ThreedsChallengeAction')
12174
+ @discriminator = HttpClient::Preconditions.assert_class('discriminator', opts.delete(:discriminator), String)
11706
12175
  end
11707
12176
 
11708
12177
  def subtype_to_hash
11709
- raise 'Cannot serialize an instance of shopify_event_bucket directly - must use one of the specific types: shopify_item_event_bucket'
12178
+ raise 'Cannot serialize an instance of threeds_challenge_action directly - must use one of the specific types: threeds_two_challenge_request'
11710
12179
  end
11711
12180
 
11712
12181
  def to_hash
11713
12182
  subtype_to_hash.merge(:discriminator => @discriminator)
11714
12183
  end
11715
12184
 
11716
- def ShopifyEventBucket.from_json(hash)
12185
+ def ThreedsChallengeAction.from_json(hash)
11717
12186
  HttpClient::Preconditions.assert_class('hash', hash, Hash)
11718
12187
  discriminator = HttpClient::Helper.symbolize_keys(hash)[:discriminator].to_s.strip
11719
12188
  if discriminator.empty?
11720
- raise "Union type[shopify_event_bucket] requires a field named 'discriminator'"
12189
+ raise "Union type[threeds_challenge_action] requires a field named 'discriminator'"
11721
12190
  end
11722
12191
  case discriminator
11723
- when Types::SHOPIFY_ITEM_EVENT_BUCKET; ShopifyItemEventBucket.new(hash)
11724
- else ShopifyEventBucketUndefinedType.new(:discriminator => discriminator)
12192
+ when Types::THREEDS_TWO_CHALLENGE_REQUEST; ThreedsTwoChallengeRequest.new(hash)
12193
+ else ThreedsChallengeActionUndefinedType.new(:discriminator => discriminator)
11725
12194
  end
11726
12195
  end
11727
12196
 
11728
12197
  end
11729
12198
 
11730
- class ShopifyEventBucketUndefinedType < ShopifyEventBucket
12199
+ class ThreedsChallengeActionUndefinedType < ThreedsChallengeAction
11731
12200
 
11732
12201
  attr_reader :name
11733
12202
 
@@ -11751,45 +12220,45 @@ module Io
11751
12220
 
11752
12221
  end
11753
12222
 
11754
- class TaxSetting
12223
+ # Different version sets of 3ds identify actions.
12224
+ class ThreedsIdentifyAction
11755
12225
 
11756
12226
  module Types
11757
- AVALARA_TAX_SETTING = 'avalara_tax_setting' unless defined?(AVALARA_TAX_SETTING)
11758
- AVALARA_TAX_CSV_SETTING = 'avalara_tax_csv_setting' unless defined?(AVALARA_TAX_CSV_SETTING)
12227
+ # Used for 2.1 and 2.2 versions of 3ds
12228
+ THREEDS_TWO_METHOD = 'threeds_two_method' unless defined?(THREEDS_TWO_METHOD)
11759
12229
  end
11760
12230
 
11761
12231
  attr_reader :discriminator
11762
12232
 
11763
12233
  def initialize(incoming={})
11764
12234
  opts = HttpClient::Helper.symbolize_keys(incoming)
11765
- HttpClient::Preconditions.require_keys(opts, [:discriminator], 'TaxSetting')
12235
+ HttpClient::Preconditions.require_keys(opts, [:discriminator], 'ThreedsIdentifyAction')
11766
12236
  @discriminator = HttpClient::Preconditions.assert_class('discriminator', opts.delete(:discriminator), String)
11767
12237
  end
11768
12238
 
11769
12239
  def subtype_to_hash
11770
- raise 'Cannot serialize an instance of tax_setting directly - must use one of the specific types: avalara_tax_setting, avalara_tax_csv_setting'
12240
+ raise 'Cannot serialize an instance of threeds_identify_action directly - must use one of the specific types: threeds_two_method'
11771
12241
  end
11772
12242
 
11773
12243
  def to_hash
11774
12244
  subtype_to_hash.merge(:discriminator => @discriminator)
11775
12245
  end
11776
12246
 
11777
- def TaxSetting.from_json(hash)
12247
+ def ThreedsIdentifyAction.from_json(hash)
11778
12248
  HttpClient::Preconditions.assert_class('hash', hash, Hash)
11779
12249
  discriminator = HttpClient::Helper.symbolize_keys(hash)[:discriminator].to_s.strip
11780
12250
  if discriminator.empty?
11781
- raise "Union type[tax_setting] requires a field named 'discriminator'"
12251
+ raise "Union type[threeds_identify_action] requires a field named 'discriminator'"
11782
12252
  end
11783
12253
  case discriminator
11784
- when Types::AVALARA_TAX_SETTING; AvalaraTaxSetting.new(hash)
11785
- when Types::AVALARA_TAX_CSV_SETTING; AvalaraTaxCsvSetting.new(hash)
11786
- else TaxSettingUndefinedType.new(:discriminator => discriminator)
12254
+ when Types::THREEDS_TWO_METHOD; ThreedsTwoMethod.new(hash)
12255
+ else ThreedsIdentifyActionUndefinedType.new(:discriminator => discriminator)
11787
12256
  end
11788
12257
  end
11789
12258
 
11790
12259
  end
11791
12260
 
11792
- class TaxSettingUndefinedType < TaxSetting
12261
+ class ThreedsIdentifyActionUndefinedType < ThreedsIdentifyAction
11793
12262
 
11794
12263
  attr_reader :name
11795
12264
 
@@ -12356,7 +12825,7 @@ module Io
12356
12825
  end
12357
12826
 
12358
12827
  def AttributeIntent.ALL
12359
- @@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]
12828
+ @@all ||= [AttributeIntent.brand, AttributeIntent.color, AttributeIntent.countries_of_origin, AttributeIntent.product_id, AttributeIntent.fulfillment_method, AttributeIntent.hazardous, AttributeIntent.price, AttributeIntent.size, AttributeIntent.sku, AttributeIntent.taxability, AttributeIntent.consumer_url, AttributeIntent.gtin, AttributeIntent.mpn, AttributeIntent.facet, AttributeIntent.eccn, AttributeIntent.returnable, AttributeIntent.searchable]
12360
12829
  end
12361
12830
 
12362
12831
  # A brand name of the item (for retailers that sell multiple brands)
@@ -12431,6 +12900,28 @@ module Io
12431
12900
  @@_facet ||= AttributeIntent.new('facet')
12432
12901
  end
12433
12902
 
12903
+ # An Export Control Classification Number (ECCN) is a five-character
12904
+ # alphanumeric key used in the Commerce Control List (CCL) to classify U.S.
12905
+ # exports and determine whether an export license is needed from the Department
12906
+ # of Commerce. If exempt, then EAR99 is used as the item’s ECCN. EAR99 is a
12907
+ # classification that indicates that an item is subject to the Export
12908
+ # Administration Regulations (EAR), but not listed with a specific Export
12909
+ # Control Classification Number (ECCN) on the Commerce Control List (CCL).
12910
+ def AttributeIntent.eccn
12911
+ @@_eccn ||= AttributeIntent.new('eccn')
12912
+ end
12913
+
12914
+ # Identifies whether the item can be returned. If not present on an item, it is
12915
+ # assumed to be returnable.
12916
+ def AttributeIntent.returnable
12917
+ @@_returnable ||= AttributeIntent.new('returnable')
12918
+ end
12919
+
12920
+ # Identifies whether the attribute can be used to search for an item.
12921
+ def AttributeIntent.searchable
12922
+ @@_searchable ||= AttributeIntent.new('searchable')
12923
+ end
12924
+
12434
12925
  def to_hash
12435
12926
  value
12436
12927
  end
@@ -15560,6 +16051,55 @@ module Io
15560
16051
 
15561
16052
  end
15562
16053
 
16054
+ class FlowEntity
16055
+
16056
+ attr_reader :value
16057
+
16058
+ def initialize(value)
16059
+ @value = HttpClient::Preconditions.assert_class('value', value, String)
16060
+ end
16061
+
16062
+ # Returns the instance of FlowEntity for this value, creating a new instance for an unknown value
16063
+ def FlowEntity.apply(value)
16064
+ if value.instance_of?(FlowEntity)
16065
+ value
16066
+ else
16067
+ HttpClient::Preconditions.assert_class_or_nil('value', value, String)
16068
+ value.nil? ? nil : (from_string(value) || FlowEntity.new(value))
16069
+ end
16070
+ end
16071
+
16072
+ # Returns the instance of FlowEntity for this value, or nil if not found
16073
+ def FlowEntity.from_string(value)
16074
+ HttpClient::Preconditions.assert_class('value', value, String)
16075
+ FlowEntity.ALL.find { |v| v.value == value }
16076
+ end
16077
+
16078
+ def FlowEntity.ALL
16079
+ @@all ||= [FlowEntity.flow_usa, FlowEntity.flow_irl, FlowEntity.flow_can]
16080
+ end
16081
+
16082
+ # Flow Commerce Inc., Hoboken, NJ, USA
16083
+ def FlowEntity.flow_usa
16084
+ @@_flow_usa ||= FlowEntity.new('flow-usa')
16085
+ end
16086
+
16087
+ # Flow Commerce Ltd., Dublin, IRL
16088
+ def FlowEntity.flow_irl
16089
+ @@_flow_irl ||= FlowEntity.new('flow-irl')
16090
+ end
16091
+
16092
+ # Flow Commerce Canada Inc., Vancouver, BC, CAN
16093
+ def FlowEntity.flow_can
16094
+ @@_flow_can ||= FlowEntity.new('flow-can')
16095
+ end
16096
+
16097
+ def to_hash
16098
+ value
16099
+ end
16100
+
16101
+ end
16102
+
15563
16103
  class FlowRole
15564
16104
 
15565
16105
  attr_reader :value
@@ -16576,6 +17116,48 @@ module Io
16576
17116
 
16577
17117
  end
16578
17118
 
17119
+ class ItemIdentifier
17120
+
17121
+ attr_reader :value
17122
+
17123
+ def initialize(value)
17124
+ @value = HttpClient::Preconditions.assert_class('value', value, String)
17125
+ end
17126
+
17127
+ # Returns the instance of ItemIdentifier for this value, creating a new instance for an unknown value
17128
+ def ItemIdentifier.apply(value)
17129
+ if value.instance_of?(ItemIdentifier)
17130
+ value
17131
+ else
17132
+ HttpClient::Preconditions.assert_class_or_nil('value', value, String)
17133
+ value.nil? ? nil : (from_string(value) || ItemIdentifier.new(value))
17134
+ end
17135
+ end
17136
+
17137
+ # Returns the instance of ItemIdentifier for this value, or nil if not found
17138
+ def ItemIdentifier.from_string(value)
17139
+ HttpClient::Preconditions.assert_class('value', value, String)
17140
+ ItemIdentifier.ALL.find { |v| v.value == value }
17141
+ end
17142
+
17143
+ def ItemIdentifier.ALL
17144
+ @@all ||= [ItemIdentifier.item_number, ItemIdentifier.sku]
17145
+ end
17146
+
17147
+ def ItemIdentifier.item_number
17148
+ @@_item_number ||= ItemIdentifier.new('item_number')
17149
+ end
17150
+
17151
+ def ItemIdentifier.sku
17152
+ @@_sku ||= ItemIdentifier.new('sku')
17153
+ end
17154
+
17155
+ def to_hash
17156
+ value
17157
+ end
17158
+
17159
+ end
17160
+
16579
17161
  class LaneDirection
16580
17162
 
16581
17163
  attr_reader :value
@@ -17810,6 +18392,55 @@ module Io
17810
18392
 
17811
18393
  end
17812
18394
 
18395
+ class OrganizationStatus
18396
+
18397
+ attr_reader :value
18398
+
18399
+ def initialize(value)
18400
+ @value = HttpClient::Preconditions.assert_class('value', value, String)
18401
+ end
18402
+
18403
+ # Returns the instance of OrganizationStatus for this value, creating a new instance for an unknown value
18404
+ def OrganizationStatus.apply(value)
18405
+ if value.instance_of?(OrganizationStatus)
18406
+ value
18407
+ else
18408
+ HttpClient::Preconditions.assert_class_or_nil('value', value, String)
18409
+ value.nil? ? nil : (from_string(value) || OrganizationStatus.new(value))
18410
+ end
18411
+ end
18412
+
18413
+ # Returns the instance of OrganizationStatus for this value, or nil if not found
18414
+ def OrganizationStatus.from_string(value)
18415
+ HttpClient::Preconditions.assert_class('value', value, String)
18416
+ OrganizationStatus.ALL.find { |v| v.value == value }
18417
+ end
18418
+
18419
+ def OrganizationStatus.ALL
18420
+ @@all ||= [OrganizationStatus.active, OrganizationStatus.inactive, OrganizationStatus.deactivated]
18421
+ end
18422
+
18423
+ def OrganizationStatus.active
18424
+ @@_active ||= OrganizationStatus.new('active')
18425
+ end
18426
+
18427
+ # Determined by usage: ex: orders placed, experience updated, catalog items
18428
+ # updated, etc...
18429
+ def OrganizationStatus.inactive
18430
+ @@_inactive ||= OrganizationStatus.new('inactive')
18431
+ end
18432
+
18433
+ # Manually deactivated
18434
+ def OrganizationStatus.deactivated
18435
+ @@_deactivated ||= OrganizationStatus.new('deactivated')
18436
+ end
18437
+
18438
+ def to_hash
18439
+ value
18440
+ end
18441
+
18442
+ end
18443
+
17813
18444
  class PaymentErrorCode
17814
18445
 
17815
18446
  attr_reader :value
@@ -20120,6 +20751,65 @@ module Io
20120
20751
 
20121
20752
  end
20122
20753
 
20754
+ class ThreedsTwoChallengeViewport
20755
+
20756
+ attr_reader :value
20757
+
20758
+ def initialize(value)
20759
+ @value = HttpClient::Preconditions.assert_class('value', value, String)
20760
+ end
20761
+
20762
+ # Returns the instance of ThreedsTwoChallengeViewport for this value, creating a new instance for an unknown value
20763
+ def ThreedsTwoChallengeViewport.apply(value)
20764
+ if value.instance_of?(ThreedsTwoChallengeViewport)
20765
+ value
20766
+ else
20767
+ HttpClient::Preconditions.assert_class_or_nil('value', value, String)
20768
+ value.nil? ? nil : (from_string(value) || ThreedsTwoChallengeViewport.new(value))
20769
+ end
20770
+ end
20771
+
20772
+ # Returns the instance of ThreedsTwoChallengeViewport for this value, or nil if not found
20773
+ def ThreedsTwoChallengeViewport.from_string(value)
20774
+ HttpClient::Preconditions.assert_class('value', value, String)
20775
+ ThreedsTwoChallengeViewport.ALL.find { |v| v.value == value }
20776
+ end
20777
+
20778
+ def ThreedsTwoChallengeViewport.ALL
20779
+ @@all ||= [ThreedsTwoChallengeViewport.xxx_small, ThreedsTwoChallengeViewport.xx_small, ThreedsTwoChallengeViewport.x_small, ThreedsTwoChallengeViewport.small, ThreedsTwoChallengeViewport.fullscreen]
20780
+ end
20781
+
20782
+ # 250x400
20783
+ def ThreedsTwoChallengeViewport.xxx_small
20784
+ @@_xxx_small ||= ThreedsTwoChallengeViewport.new('xxx_small')
20785
+ end
20786
+
20787
+ # 390x400
20788
+ def ThreedsTwoChallengeViewport.xx_small
20789
+ @@_xx_small ||= ThreedsTwoChallengeViewport.new('xx_small')
20790
+ end
20791
+
20792
+ # 500x600
20793
+ def ThreedsTwoChallengeViewport.x_small
20794
+ @@_x_small ||= ThreedsTwoChallengeViewport.new('x_small')
20795
+ end
20796
+
20797
+ # 600x400
20798
+ def ThreedsTwoChallengeViewport.small
20799
+ @@_small ||= ThreedsTwoChallengeViewport.new('small')
20800
+ end
20801
+
20802
+ # Full Screen. Not recommended for mobile devices at this time.
20803
+ def ThreedsTwoChallengeViewport.fullscreen
20804
+ @@_fullscreen ||= ThreedsTwoChallengeViewport.new('fullscreen')
20805
+ end
20806
+
20807
+ def to_hash
20808
+ value
20809
+ end
20810
+
20811
+ end
20812
+
20123
20813
  class TierAvailability
20124
20814
 
20125
20815
  attr_reader :value
@@ -21665,12 +22355,13 @@ module Io
21665
22355
 
21666
22356
  class AllocationLineDetail < AllocationDetail
21667
22357
 
21668
- attr_reader :number, :quantity, :key, :price, :total, :included, :not_included
22358
+ attr_reader :id, :number, :quantity, :key, :price, :total, :included, :not_included
21669
22359
 
21670
22360
  def initialize(incoming={})
21671
22361
  super(:discriminator => AllocationDetail::Types::ALLOCATION_LINE_DETAIL)
21672
22362
  opts = HttpClient::Helper.symbolize_keys(incoming)
21673
22363
  HttpClient::Preconditions.require_keys(opts, [:number, :quantity, :key, :price, :total, :included, :not_included], 'AllocationLineDetail')
22364
+ @id = (x = opts.delete(:id); x.nil? ? nil : HttpClient::Preconditions.assert_class('id', x, String))
21674
22365
  @number = HttpClient::Preconditions.assert_class('number', opts.delete(:number), String)
21675
22366
  @quantity = HttpClient::Preconditions.assert_class('quantity', opts.delete(:quantity), Integer)
21676
22367
  @key = (x = opts.delete(:key); x.is_a?(::Io::Flow::V0::Models::OrderPriceDetailKey) ? x : ::Io::Flow::V0::Models::OrderPriceDetailKey.apply(x))
@@ -21690,6 +22381,7 @@ module Io
21690
22381
 
21691
22382
  def subtype_to_hash
21692
22383
  {
22384
+ :id => id,
21693
22385
  :number => number,
21694
22386
  :quantity => quantity,
21695
22387
  :key => key.value,
@@ -23490,7 +24182,8 @@ module Io
23490
24182
 
23491
24183
  end
23492
24184
 
23493
- # Shopper browser info. All of these fields are required if you are using 3DS2.
24185
+ # Shopper browser info used as part of card authentication. All of these fields
24186
+ # are required if you are using 3DS2.
23494
24187
  class BrowserInfo
23495
24188
 
23496
24189
  attr_reader :origin, :language, :java_enabled, :color_depth, :screen_height, :screen_width, :time_zone_offset, :user_agent, :accept
@@ -24158,7 +24851,7 @@ module Io
24158
24851
 
24159
24852
  class CardForm
24160
24853
 
24161
- attr_reader :number, :cipher, :expiration_month, :expiration_year, :name, :cvv, :address, :ip, :challenge_text, :challenge_cipher, :token_type, :requested_currency
24854
+ attr_reader :number, :cipher, :expiration_month, :expiration_year, :name, :cvv, :address, :ip, :challenge_text, :challenge_cipher, :token_type, :requested_currency, :metadata
24162
24855
 
24163
24856
  def initialize(incoming={})
24164
24857
  opts = HttpClient::Helper.symbolize_keys(incoming)
@@ -24175,6 +24868,7 @@ module Io
24175
24868
  @challenge_cipher = (x = opts.delete(:challenge_cipher); x.nil? ? nil : HttpClient::Preconditions.assert_class('challenge_cipher', x, String))
24176
24869
  @token_type = (x = opts.delete(:token_type); x.nil? ? nil : (x = x; x.is_a?(::Io::Flow::V0::Models::TokenType) ? x : ::Io::Flow::V0::Models::TokenType.apply(x)))
24177
24870
  @requested_currency = (x = opts.delete(:requested_currency); x.nil? ? nil : HttpClient::Preconditions.assert_class('requested_currency', x, String))
24871
+ @metadata = (x = opts.delete(:metadata); x.nil? ? nil : (x = x; x.is_a?(::Io::Flow::V0::Models::CardMetadata) ? x : ::Io::Flow::V0::Models::CardMetadata.new(x)))
24178
24872
  end
24179
24873
 
24180
24874
  def to_json
@@ -24198,7 +24892,33 @@ module Io
24198
24892
  :challenge_text => challenge_text,
24199
24893
  :challenge_cipher => challenge_cipher,
24200
24894
  :token_type => token_type.nil? ? nil : token_type.value,
24201
- :requested_currency => requested_currency
24895
+ :requested_currency => requested_currency,
24896
+ :metadata => metadata.nil? ? nil : metadata.to_hash
24897
+ }
24898
+ end
24899
+
24900
+ end
24901
+
24902
+ class CardMetadata
24903
+
24904
+ attr_reader :merchant_of_record
24905
+
24906
+ def initialize(incoming={})
24907
+ opts = HttpClient::Helper.symbolize_keys(incoming)
24908
+ @merchant_of_record = (x = opts.delete(:merchant_of_record); x.nil? ? nil : (x = x; x.is_a?(::Io::Flow::V0::Models::OrderMerchantOfRecord) ? x : ::Io::Flow::V0::Models::OrderMerchantOfRecord.apply(x)))
24909
+ end
24910
+
24911
+ def to_json
24912
+ JSON.dump(to_hash)
24913
+ end
24914
+
24915
+ def copy(incoming={})
24916
+ CardMetadata.new(to_hash.merge(HttpClient::Helper.symbolize_keys(incoming)))
24917
+ end
24918
+
24919
+ def to_hash
24920
+ {
24921
+ :merchant_of_record => merchant_of_record.nil? ? nil : merchant_of_record.value
24202
24922
  }
24203
24923
  end
24204
24924
 
@@ -24267,7 +24987,7 @@ module Io
24267
24987
  # Creates an authorization for a transaction from a card payment source.
24268
24988
  class CardPaymentSourceAuthorizationForm < AuthorizationForm
24269
24989
 
24270
- attr_reader :key, :card_payment_source_id, :order_number, :amount, :currency, :browser_info
24990
+ attr_reader :key, :card_payment_source_id, :order_number, :amount, :currency, :browser_info, :action_configuration
24271
24991
 
24272
24992
  def initialize(incoming={})
24273
24993
  super(:discriminator => AuthorizationForm::Types::CARD_PAYMENT_SOURCE_AUTHORIZATION_FORM)
@@ -24279,6 +24999,7 @@ module Io
24279
24999
  @amount = HttpClient::Preconditions.assert_class('amount', HttpClient::Helper.to_big_decimal(opts.delete(:amount)), BigDecimal)
24280
25000
  @currency = HttpClient::Preconditions.assert_class('currency', opts.delete(:currency), String)
24281
25001
  @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)))
25002
+ @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)))
24282
25003
  end
24283
25004
 
24284
25005
  def to_json
@@ -24296,7 +25017,8 @@ module Io
24296
25017
  :order_number => order_number,
24297
25018
  :amount => amount.to_f.to_s,
24298
25019
  :currency => currency,
24299
- :browser_info => browser_info.nil? ? nil : browser_info.to_hash
25020
+ :browser_info => browser_info.nil? ? nil : browser_info.to_hash,
25021
+ :action_configuration => action_configuration.nil? ? nil : action_configuration.to_hash
24300
25022
  }
24301
25023
  end
24302
25024
 
@@ -27258,14 +27980,15 @@ module Io
27258
27980
  # Represents the format used to export price book item documents
27259
27981
  class CsvPriceBookItemExportRow
27260
27982
 
27261
- attr_reader :price_book_key, :price_book_item_key, :item_number, :item_name, :amount, :item_attributes, :starts_at, :ends_at
27983
+ attr_reader :price_book_key, :price_book_item_key, :item_number, :sku, :item_name, :amount, :item_attributes, :starts_at, :ends_at
27262
27984
 
27263
27985
  def initialize(incoming={})
27264
27986
  opts = HttpClient::Helper.symbolize_keys(incoming)
27265
- HttpClient::Preconditions.require_keys(opts, [:price_book_key, :price_book_item_key, :item_number, :item_name, :amount, :starts_at], 'CsvPriceBookItemExportRow')
27987
+ HttpClient::Preconditions.require_keys(opts, [:price_book_key, :price_book_item_key, :item_number, :sku, :item_name, :amount, :starts_at], 'CsvPriceBookItemExportRow')
27266
27988
  @price_book_key = HttpClient::Preconditions.assert_class('price_book_key', opts.delete(:price_book_key), String)
27267
27989
  @price_book_item_key = HttpClient::Preconditions.assert_class('price_book_item_key', opts.delete(:price_book_item_key), String)
27268
27990
  @item_number = HttpClient::Preconditions.assert_class('item_number', opts.delete(:item_number), String)
27991
+ @sku = HttpClient::Preconditions.assert_class('sku', opts.delete(:sku), String)
27269
27992
  @item_name = HttpClient::Preconditions.assert_class('item_name', opts.delete(:item_name), String)
27270
27993
  @amount = HttpClient::Preconditions.assert_class('amount', HttpClient::Helper.to_big_decimal(opts.delete(:amount)), BigDecimal)
27271
27994
  @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 })
@@ -27286,6 +28009,7 @@ module Io
27286
28009
  :price_book_key => price_book_key,
27287
28010
  :price_book_item_key => price_book_item_key,
27288
28011
  :item_number => item_number,
28012
+ :sku => sku,
27289
28013
  :item_name => item_name,
27290
28014
  :amount => amount.to_f.to_s,
27291
28015
  :item_attributes => item_attributes.nil? ? nil : item_attributes,
@@ -28266,11 +28990,12 @@ module Io
28266
28990
 
28267
28991
  class DeliveryItem
28268
28992
 
28269
- attr_reader :number, :quantity, :shipment_estimate, :price, :attributes, :center, :line_number
28993
+ attr_reader :id, :number, :quantity, :shipment_estimate, :price, :attributes, :center, :line_number
28270
28994
 
28271
28995
  def initialize(incoming={})
28272
28996
  opts = HttpClient::Helper.symbolize_keys(incoming)
28273
28997
  HttpClient::Preconditions.require_keys(opts, [:number, :quantity], 'DeliveryItem')
28998
+ @id = (x = opts.delete(:id); x.nil? ? nil : HttpClient::Preconditions.assert_class('id', x, String))
28274
28999
  @number = HttpClient::Preconditions.assert_class('number', opts.delete(:number), String)
28275
29000
  @quantity = HttpClient::Preconditions.assert_class('quantity', opts.delete(:quantity), Integer)
28276
29001
  @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)))
@@ -28290,6 +29015,7 @@ module Io
28290
29015
 
28291
29016
  def to_hash
28292
29017
  {
29018
+ :id => id,
28293
29019
  :number => number,
28294
29020
  :quantity => quantity,
28295
29021
  :shipment_estimate => shipment_estimate.nil? ? nil : shipment_estimate.to_hash,
@@ -28919,6 +29645,58 @@ module Io
28919
29645
 
28920
29646
  end
28921
29647
 
29648
+ # Result of looking up a specific tax registration number. Includes details of
29649
+ # both the consumer request and the VIES response.
29650
+ class DetailedTaxRegistration
29651
+
29652
+ attr_reader :id, :key, :consumer_company_name, :number, :country, :success, :timestamp, :vies_result, :vies_result_reason, :vies_company_name, :vies_company_address, :company_name_match_result, :company_name_match_result_reason
29653
+
29654
+ def initialize(incoming={})
29655
+ opts = HttpClient::Helper.symbolize_keys(incoming)
29656
+ HttpClient::Preconditions.require_keys(opts, [:id, :key, :number, :country, :success, :timestamp, :vies_result, :company_name_match_result], 'DetailedTaxRegistration')
29657
+ @id = HttpClient::Preconditions.assert_class('id', opts.delete(:id), String)
29658
+ @key = HttpClient::Preconditions.assert_class('key', opts.delete(:key), String)
29659
+ @consumer_company_name = (x = opts.delete(:consumer_company_name); x.nil? ? nil : HttpClient::Preconditions.assert_class('consumer_company_name', x, String))
29660
+ @number = HttpClient::Preconditions.assert_class('number', opts.delete(:number), String)
29661
+ @country = HttpClient::Preconditions.assert_class('country', opts.delete(:country), String)
29662
+ @success = HttpClient::Preconditions.assert_boolean('success', opts.delete(:success))
29663
+ @timestamp = HttpClient::Preconditions.assert_class('timestamp', HttpClient::Helper.to_date_time_iso8601(opts.delete(:timestamp)), DateTime)
29664
+ @vies_result = (x = opts.delete(:vies_result); x.is_a?(::Io::Flow::V0::Models::TaxVerificationResult) ? x : ::Io::Flow::V0::Models::TaxVerificationResult.apply(x))
29665
+ @vies_result_reason = (x = opts.delete(:vies_result_reason); x.nil? ? nil : HttpClient::Preconditions.assert_class('vies_result_reason', x, String))
29666
+ @vies_company_name = (x = opts.delete(:vies_company_name); x.nil? ? nil : HttpClient::Preconditions.assert_class('vies_company_name', x, String))
29667
+ @vies_company_address = (x = opts.delete(:vies_company_address); x.nil? ? nil : HttpClient::Preconditions.assert_class('vies_company_address', x, String))
29668
+ @company_name_match_result = (x = opts.delete(:company_name_match_result); x.is_a?(::Io::Flow::V0::Models::TaxVerificationResult) ? x : ::Io::Flow::V0::Models::TaxVerificationResult.apply(x))
29669
+ @company_name_match_result_reason = (x = opts.delete(:company_name_match_result_reason); x.nil? ? nil : HttpClient::Preconditions.assert_class('company_name_match_result_reason', x, String))
29670
+ end
29671
+
29672
+ def to_json
29673
+ JSON.dump(to_hash)
29674
+ end
29675
+
29676
+ def copy(incoming={})
29677
+ DetailedTaxRegistration.new(to_hash.merge(HttpClient::Helper.symbolize_keys(incoming)))
29678
+ end
29679
+
29680
+ def to_hash
29681
+ {
29682
+ :id => id,
29683
+ :key => key,
29684
+ :consumer_company_name => consumer_company_name,
29685
+ :number => number,
29686
+ :country => country,
29687
+ :success => success,
29688
+ :timestamp => timestamp,
29689
+ :vies_result => vies_result.value,
29690
+ :vies_result_reason => vies_result_reason,
29691
+ :vies_company_name => vies_company_name,
29692
+ :vies_company_address => vies_company_address,
29693
+ :company_name_match_result => company_name_match_result.value,
29694
+ :company_name_match_result_reason => company_name_match_result_reason
29695
+ }
29696
+ end
29697
+
29698
+ end
29699
+
28922
29700
  # Represents a collection of items that are digitally available and do not
28923
29701
  # require a physical shipment
28924
29702
  class DigitalDelivery < Delivery
@@ -29116,7 +29894,7 @@ module Io
29116
29894
  # you can capture up to the amount of the authorization.
29117
29895
  class DirectAuthorizationForm < AuthorizationForm
29118
29896
 
29119
- attr_reader :token, :amount, :currency, :customer, :key, :cvv, :attributes, :destination, :billing_address, :ip, :options, :redirect_urls, :browser_info
29897
+ attr_reader :token, :amount, :currency, :customer, :key, :cvv, :attributes, :destination, :billing_address, :ip, :options, :redirect_urls, :browser_info, :action_configuration
29120
29898
 
29121
29899
  def initialize(incoming={})
29122
29900
  super(:discriminator => AuthorizationForm::Types::DIRECT_AUTHORIZATION_FORM)
@@ -29135,6 +29913,7 @@ module Io
29135
29913
  @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)) })
29136
29914
  @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)))
29137
29915
  @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)))
29916
+ @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)))
29138
29917
  end
29139
29918
 
29140
29919
  def to_json
@@ -29159,7 +29938,8 @@ module Io
29159
29938
  :ip => ip,
29160
29939
  :options => options.nil? ? nil : options.map { |o| o.value },
29161
29940
  :redirect_urls => redirect_urls.nil? ? nil : redirect_urls.to_hash,
29162
- :browser_info => browser_info.nil? ? nil : browser_info.to_hash
29941
+ :browser_info => browser_info.nil? ? nil : browser_info.to_hash,
29942
+ :action_configuration => action_configuration.nil? ? nil : action_configuration.to_hash
29163
29943
  }
29164
29944
  end
29165
29945
 
@@ -31991,13 +32771,12 @@ module Io
31991
32771
  # Indicates a field is required
31992
32772
  class FieldValidationRequired < FieldValidationRule
31993
32773
 
31994
- attr_reader :unused
32774
+ attr_reader :placeholder
31995
32775
 
31996
32776
  def initialize(incoming={})
31997
32777
  super(:discriminator => FieldValidationRule::Types::FIELD_VALIDATION_REQUIRED)
31998
32778
  opts = HttpClient::Helper.symbolize_keys(incoming)
31999
- HttpClient::Preconditions.require_keys(opts, [:unused], 'FieldValidationRequired')
32000
- @unused = HttpClient::Preconditions.assert_class('unused', opts.delete(:unused), String)
32779
+ @placeholder = (x = opts.delete(:placeholder); x.nil? ? nil : HttpClient::Preconditions.assert_class('placeholder', x, String))
32001
32780
  end
32002
32781
 
32003
32782
  def to_json
@@ -32010,7 +32789,7 @@ module Io
32010
32789
 
32011
32790
  def subtype_to_hash
32012
32791
  {
32013
- :unused => unused
32792
+ :placeholder => placeholder
32014
32793
  }
32015
32794
  end
32016
32795
 
@@ -33061,12 +33840,11 @@ module Io
33061
33840
 
33062
33841
  class GraphqlRequest
33063
33842
 
33064
- attr_reader :id, :query, :operation_name, :variables
33843
+ attr_reader :query, :operation_name, :variables
33065
33844
 
33066
33845
  def initialize(incoming={})
33067
33846
  opts = HttpClient::Helper.symbolize_keys(incoming)
33068
- HttpClient::Preconditions.require_keys(opts, [:id, :query], 'GraphqlRequest')
33069
- @id = HttpClient::Preconditions.assert_class('id', opts.delete(:id), String)
33847
+ HttpClient::Preconditions.require_keys(opts, [:query], 'GraphqlRequest')
33070
33848
  @query = HttpClient::Preconditions.assert_class('query', opts.delete(:query), String)
33071
33849
  @operation_name = (x = opts.delete(:operation_name); x.nil? ? nil : HttpClient::Preconditions.assert_class('operation_name', x, String))
33072
33850
  @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 })
@@ -33082,7 +33860,6 @@ module Io
33082
33860
 
33083
33861
  def to_hash
33084
33862
  {
33085
- :id => id,
33086
33863
  :query => query,
33087
33864
  :operation_name => operation_name,
33088
33865
  :variables => variables.nil? ? nil : variables
@@ -33093,14 +33870,11 @@ module Io
33093
33870
 
33094
33871
  class GraphqlResponse
33095
33872
 
33096
- attr_reader :id, :request_id, :data, :errors
33873
+ attr_reader :data, :errors
33097
33874
 
33098
33875
  def initialize(incoming={})
33099
33876
  opts = HttpClient::Helper.symbolize_keys(incoming)
33100
- HttpClient::Preconditions.require_keys(opts, [:id, :request_id, :data], 'GraphqlResponse')
33101
- @id = HttpClient::Preconditions.assert_class('id', opts.delete(:id), String)
33102
- @request_id = HttpClient::Preconditions.assert_class('request_id', opts.delete(:request_id), String)
33103
- @data = HttpClient::Preconditions.assert_class('data', HttpClient::Helper.to_object(opts.delete(:data)), Hash)
33877
+ @data = (x = opts.delete(:data); x.nil? ? nil : HttpClient::Preconditions.assert_class('data', HttpClient::Helper.to_object(x), Hash))
33104
33878
  @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) })
33105
33879
  end
33106
33880
 
@@ -33114,8 +33888,6 @@ module Io
33114
33888
 
33115
33889
  def to_hash
33116
33890
  {
33117
- :id => id,
33118
- :request_id => request_id,
33119
33891
  :data => data,
33120
33892
  :errors => errors.nil? ? nil : errors
33121
33893
  }
@@ -35413,7 +36185,7 @@ module Io
35413
36185
  # many clients, this will map to a Sku.
35414
36186
  class Item
35415
36187
 
35416
- attr_reader :id, :number, :locale, :name, :price, :categories, :description, :attributes, :dimensions, :images, :local
36188
+ attr_reader :id, :number, :locale, :name, :price, :categories, :description, :attributes, :dimensions, :images, :local, :created_at, :updated_at
35417
36189
 
35418
36190
  def initialize(incoming={})
35419
36191
  opts = HttpClient::Helper.symbolize_keys(incoming)
@@ -35429,6 +36201,8 @@ module Io
35429
36201
  @dimensions = (x = opts.delete(:dimensions); x.is_a?(::Io::Flow::V0::Models::Dimensions) ? x : ::Io::Flow::V0::Models::Dimensions.new(x))
35430
36202
  @images = HttpClient::Preconditions.assert_class('images', (x = opts.delete(:images); x.nil? ? [] : x), Array).map { |v| (x = v; x.is_a?(::Io::Flow::V0::Models::Image) ? x : ::Io::Flow::V0::Models::Image.new(x)) }
35431
36203
  @local = (x = opts.delete(:local); x.nil? ? nil : (x = x; x.is_a?(::Io::Flow::V0::Models::Local) ? x : ::Io::Flow::V0::Models::Local.new(x)))
36204
+ @created_at = (x = opts.delete(:created_at); x.nil? ? nil : HttpClient::Preconditions.assert_class('created_at', HttpClient::Helper.to_date_time_iso8601(x), DateTime))
36205
+ @updated_at = (x = opts.delete(:updated_at); x.nil? ? nil : HttpClient::Preconditions.assert_class('updated_at', HttpClient::Helper.to_date_time_iso8601(x), DateTime))
35432
36206
  end
35433
36207
 
35434
36208
  def to_json
@@ -35451,7 +36225,9 @@ module Io
35451
36225
  :attributes => attributes,
35452
36226
  :dimensions => dimensions.to_hash,
35453
36227
  :images => images.map { |o| o.to_hash },
35454
- :local => local.nil? ? nil : local.to_hash
36228
+ :local => local.nil? ? nil : local.to_hash,
36229
+ :created_at => created_at,
36230
+ :updated_at => updated_at
35455
36231
  }
35456
36232
  end
35457
36233
 
@@ -36665,11 +37441,12 @@ module Io
36665
37441
  # Provides display data for a line item.
36666
37442
  class Line
36667
37443
 
36668
- attr_reader :item_number, :quantity, :price, :total, :attributes
37444
+ attr_reader :id, :item_number, :quantity, :price, :total, :attributes
36669
37445
 
36670
37446
  def initialize(incoming={})
36671
37447
  opts = HttpClient::Helper.symbolize_keys(incoming)
36672
37448
  HttpClient::Preconditions.require_keys(opts, [:item_number, :quantity, :price, :total], 'Line')
37449
+ @id = (x = opts.delete(:id); x.nil? ? nil : HttpClient::Preconditions.assert_class('id', x, String))
36673
37450
  @item_number = HttpClient::Preconditions.assert_class('item_number', opts.delete(:item_number), String)
36674
37451
  @quantity = HttpClient::Preconditions.assert_class('quantity', opts.delete(:quantity), Integer)
36675
37452
  @price = (x = opts.delete(:price); x.is_a?(::Io::Flow::V0::Models::PriceWithBase) ? x : ::Io::Flow::V0::Models::PriceWithBase.new(x))
@@ -36687,6 +37464,7 @@ module Io
36687
37464
 
36688
37465
  def to_hash
36689
37466
  {
37467
+ :id => id,
36690
37468
  :item_number => item_number,
36691
37469
  :quantity => quantity,
36692
37470
  :price => price.to_hash,
@@ -36736,6 +37514,32 @@ module Io
36736
37514
 
36737
37515
  end
36738
37516
 
37517
+ class LineItemAttributesForm
37518
+
37519
+ attr_reader :attributes
37520
+
37521
+ def initialize(incoming={})
37522
+ opts = HttpClient::Helper.symbolize_keys(incoming)
37523
+ HttpClient::Preconditions.require_keys(opts, [:attributes], 'LineItemAttributesForm')
37524
+ @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 }
37525
+ end
37526
+
37527
+ def to_json
37528
+ JSON.dump(to_hash)
37529
+ end
37530
+
37531
+ def copy(incoming={})
37532
+ LineItemAttributesForm.new(to_hash.merge(HttpClient::Helper.symbolize_keys(incoming)))
37533
+ end
37534
+
37535
+ def to_hash
37536
+ {
37537
+ :attributes => attributes
37538
+ }
37539
+ end
37540
+
37541
+ end
37542
+
36739
37543
  # Line items represent the items a consumer is purchasing, including additional
36740
37544
  # information to complete the transaction. Note that you may pass in as many
36741
37545
  # line items as you like - including repeating item numbers across line items.
@@ -36779,6 +37583,32 @@ module Io
36779
37583
 
36780
37584
  end
36781
37585
 
37586
+ class LineItemQuantityForm
37587
+
37588
+ attr_reader :quantity
37589
+
37590
+ def initialize(incoming={})
37591
+ opts = HttpClient::Helper.symbolize_keys(incoming)
37592
+ HttpClient::Preconditions.require_keys(opts, [:quantity], 'LineItemQuantityForm')
37593
+ @quantity = HttpClient::Preconditions.assert_class('quantity', opts.delete(:quantity), Integer)
37594
+ end
37595
+
37596
+ def to_json
37597
+ JSON.dump(to_hash)
37598
+ end
37599
+
37600
+ def copy(incoming={})
37601
+ LineItemQuantityForm.new(to_hash.merge(HttpClient::Helper.symbolize_keys(incoming)))
37602
+ end
37603
+
37604
+ def to_hash
37605
+ {
37606
+ :quantity => quantity
37607
+ }
37608
+ end
37609
+
37610
+ end
37611
+
36782
37612
  class Link
36783
37613
 
36784
37614
  attr_reader :url
@@ -37292,11 +38122,12 @@ module Io
37292
38122
  # Line items on the order, with localized pricing information
37293
38123
  class LocalizedLineItem
37294
38124
 
37295
- attr_reader :number, :name, :quantity, :center, :price, :discount, :discounts, :attributes, :local, :shipment_estimate, :price_source
38125
+ attr_reader :id, :number, :name, :quantity, :center, :price, :discount, :discounts, :attributes, :local, :shipment_estimate, :price_source
37296
38126
 
37297
38127
  def initialize(incoming={})
37298
38128
  opts = HttpClient::Helper.symbolize_keys(incoming)
37299
38129
  HttpClient::Preconditions.require_keys(opts, [:number, :name, :quantity, :local], 'LocalizedLineItem')
38130
+ @id = (x = opts.delete(:id); x.nil? ? nil : HttpClient::Preconditions.assert_class('id', x, String))
37300
38131
  @number = HttpClient::Preconditions.assert_class('number', opts.delete(:number), String)
37301
38132
  @name = HttpClient::Preconditions.assert_class('name', opts.delete(:name), String)
37302
38133
  @quantity = HttpClient::Preconditions.assert_class('quantity', opts.delete(:quantity), Integer)
@@ -37320,6 +38151,7 @@ module Io
37320
38151
 
37321
38152
  def to_hash
37322
38153
  {
38154
+ :id => id,
37323
38155
  :number => number,
37324
38156
  :name => name,
37325
38157
  :quantity => quantity,
@@ -38110,7 +38942,7 @@ module Io
38110
38942
  # you can capture up to the amount of the authorization
38111
38943
  class MerchantOfRecordAuthorizationForm < AuthorizationForm
38112
38944
 
38113
- attr_reader :token, :order_number, :amount, :currency, :key, :cvv, :attributes, :ip, :options, :redirect_urls, :browser_info
38945
+ attr_reader :token, :order_number, :amount, :currency, :key, :cvv, :attributes, :ip, :options, :redirect_urls, :browser_info, :action_configuration
38114
38946
 
38115
38947
  def initialize(incoming={})
38116
38948
  super(:discriminator => AuthorizationForm::Types::MERCHANT_OF_RECORD_AUTHORIZATION_FORM)
@@ -38127,6 +38959,7 @@ module Io
38127
38959
  @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)) })
38128
38960
  @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)))
38129
38961
  @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)))
38962
+ @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)))
38130
38963
  end
38131
38964
 
38132
38965
  def to_json
@@ -38149,7 +38982,8 @@ module Io
38149
38982
  :ip => ip,
38150
38983
  :options => options.nil? ? nil : options.map { |o| o.value },
38151
38984
  :redirect_urls => redirect_urls.nil? ? nil : redirect_urls.to_hash,
38152
- :browser_info => browser_info.nil? ? nil : browser_info.to_hash
38985
+ :browser_info => browser_info.nil? ? nil : browser_info.to_hash,
38986
+ :action_configuration => action_configuration.nil? ? nil : action_configuration.to_hash
38153
38987
  }
38154
38988
  end
38155
38989
 
@@ -39919,6 +40753,32 @@ module Io
39919
40753
 
39920
40754
  end
39921
40755
 
40756
+ class OrderNumberGeneratorGeneratedNumber
40757
+
40758
+ attr_reader :number
40759
+
40760
+ def initialize(incoming={})
40761
+ opts = HttpClient::Helper.symbolize_keys(incoming)
40762
+ HttpClient::Preconditions.require_keys(opts, [:number], 'OrderNumberGeneratorGeneratedNumber')
40763
+ @number = HttpClient::Preconditions.assert_class('number', opts.delete(:number), String)
40764
+ end
40765
+
40766
+ def to_json
40767
+ JSON.dump(to_hash)
40768
+ end
40769
+
40770
+ def copy(incoming={})
40771
+ OrderNumberGeneratorGeneratedNumber.new(to_hash.merge(HttpClient::Helper.symbolize_keys(incoming)))
40772
+ end
40773
+
40774
+ def to_hash
40775
+ {
40776
+ :number => number
40777
+ }
40778
+ end
40779
+
40780
+ end
40781
+
39922
40782
  # Hexadecimal generator generates a random string, starting with a letter, of a
39923
40783
  # given length
39924
40784
  class OrderNumberGeneratorHexadecimal < OrderNumberGenerator
@@ -40611,7 +41471,7 @@ module Io
40611
41471
 
40612
41472
  end
40613
41473
 
40614
- # Defines the data needed to attach an identifer to each order created by a
41474
+ # Defines the data needed to attach an identifier to each order created by a
40615
41475
  # checkout.
40616
41476
  class OrderSubmissionIdentifierForm
40617
41477
 
@@ -40647,7 +41507,7 @@ module Io
40647
41507
  # flattened to keys.
40648
41508
  class OrderSummary
40649
41509
 
40650
- attr_reader :number, :subtotal, :shipping, :tax, :duty, :insurance, :discount, :surcharges, :adjustment, :total, :lines, :identifiers
41510
+ attr_reader :number, :subtotal, :shipping, :tax, :duty, :insurance, :discount, :surcharges, :adjustment, :total, :lines, :identifiers, :attributes
40651
41511
 
40652
41512
  def initialize(incoming={})
40653
41513
  opts = HttpClient::Helper.symbolize_keys(incoming)
@@ -40664,6 +41524,7 @@ module Io
40664
41524
  @total = (x = opts.delete(:total); x.is_a?(::Io::Flow::V0::Models::OrderSummaryPriceDetail) ? x : ::Io::Flow::V0::Models::OrderSummaryPriceDetail.new(x))
40665
41525
  @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)) }
40666
41526
  @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 })
41527
+ @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 })
40667
41528
  end
40668
41529
 
40669
41530
  def to_json
@@ -40687,7 +41548,8 @@ module Io
40687
41548
  :adjustment => adjustment.nil? ? nil : adjustment.to_hash,
40688
41549
  :total => total.to_hash,
40689
41550
  :lines => lines.map { |o| o.to_hash },
40690
- :identifiers => identifiers.nil? ? nil : identifiers
41551
+ :identifiers => identifiers.nil? ? nil : identifiers,
41552
+ :attributes => attributes.nil? ? nil : attributes
40691
41553
  }
40692
41554
  end
40693
41555
 
@@ -40795,11 +41657,12 @@ module Io
40795
41657
 
40796
41658
  class OrderSummaryLineItem
40797
41659
 
40798
- attr_reader :item, :quantity, :discount, :tax, :duty, :total, :price_attributes
41660
+ attr_reader :id, :item, :quantity, :discount, :tax, :duty, :total, :price_attributes, :attributes
40799
41661
 
40800
41662
  def initialize(incoming={})
40801
41663
  opts = HttpClient::Helper.symbolize_keys(incoming)
40802
41664
  HttpClient::Preconditions.require_keys(opts, [:item, :quantity, :total, :price_attributes], 'OrderSummaryLineItem')
41665
+ @id = (x = opts.delete(:id); x.nil? ? nil : HttpClient::Preconditions.assert_class('id', x, String))
40803
41666
  @item = (x = opts.delete(:item); x.is_a?(::Io::Flow::V0::Models::OrderSummaryItem) ? x : ::Io::Flow::V0::Models::OrderSummaryItem.new(x))
40804
41667
  @quantity = HttpClient::Preconditions.assert_class('quantity', opts.delete(:quantity), Integer)
40805
41668
  @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)))
@@ -40807,6 +41670,7 @@ module Io
40807
41670
  @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)))
40808
41671
  @total = (x = opts.delete(:total); x.is_a?(::Io::Flow::V0::Models::Price) ? x : ::Io::Flow::V0::Models::Price.new(x))
40809
41672
  @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 }
41673
+ @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 })
40810
41674
  end
40811
41675
 
40812
41676
  def to_json
@@ -40819,13 +41683,15 @@ module Io
40819
41683
 
40820
41684
  def to_hash
40821
41685
  {
41686
+ :id => id,
40822
41687
  :item => item.to_hash,
40823
41688
  :quantity => quantity,
40824
41689
  :discount => discount.nil? ? nil : discount.to_hash,
40825
41690
  :tax => tax.nil? ? nil : tax.to_hash,
40826
41691
  :duty => duty.nil? ? nil : duty.to_hash,
40827
41692
  :total => total.to_hash,
40828
- :price_attributes => price_attributes.inject({}) { |hash, o| hash[o[0]] = o[1].nil? ? nil : o[1].to_hash; hash }
41693
+ :price_attributes => price_attributes.inject({}) { |hash, o| hash[o[0]] = o[1].nil? ? nil : o[1].to_hash; hash },
41694
+ :attributes => attributes.nil? ? nil : attributes
40829
41695
  }
40830
41696
  end
40831
41697
 
@@ -41039,7 +41905,7 @@ module Io
41039
41905
  # currently operating in.
41040
41906
  class Organization < ExpandableOrganization
41041
41907
 
41042
- attr_reader :id, :name, :environment, :parent, :defaults, :created_at
41908
+ attr_reader :id, :name, :environment, :parent, :defaults, :created_at, :status
41043
41909
 
41044
41910
  def initialize(incoming={})
41045
41911
  super(:discriminator => ExpandableOrganization::Types::ORGANIZATION)
@@ -41051,6 +41917,7 @@ module Io
41051
41917
  @parent = (x = opts.delete(:parent); x.nil? ? nil : (x = x; x.is_a?(::Io::Flow::V0::Models::OrganizationReference) ? x : ::Io::Flow::V0::Models::OrganizationReference.new(x)))
41052
41918
  @defaults = (x = opts.delete(:defaults); x.nil? ? nil : (x = x; x.is_a?(::Io::Flow::V0::Models::OrganizationDefaults) ? x : ::Io::Flow::V0::Models::OrganizationDefaults.new(x)))
41053
41919
  @created_at = (x = opts.delete(:created_at); x.nil? ? nil : HttpClient::Preconditions.assert_class('created_at', HttpClient::Helper.to_date_time_iso8601(x), DateTime))
41920
+ @status = (x = (x = opts.delete(:status); x.nil? ? "active" : x); x.is_a?(::Io::Flow::V0::Models::OrganizationStatus) ? x : ::Io::Flow::V0::Models::OrganizationStatus.apply(x))
41054
41921
  end
41055
41922
 
41056
41923
  def to_json
@@ -41068,7 +41935,8 @@ module Io
41068
41935
  :environment => environment.value,
41069
41936
  :parent => parent.nil? ? nil : parent.to_hash,
41070
41937
  :defaults => defaults.nil? ? nil : defaults.to_hash,
41071
- :created_at => created_at
41938
+ :created_at => created_at,
41939
+ :status => status.value
41072
41940
  }
41073
41941
  end
41074
41942
 
@@ -41472,7 +42340,7 @@ module Io
41472
42340
  # Either id or name is required.
41473
42341
  class OrganizationForm
41474
42342
 
41475
- attr_reader :id, :name, :environment, :parent_id, :defaults
42343
+ attr_reader :id, :name, :environment, :parent_id, :defaults, :status
41476
42344
 
41477
42345
  def initialize(incoming={})
41478
42346
  opts = HttpClient::Helper.symbolize_keys(incoming)
@@ -41481,6 +42349,7 @@ module Io
41481
42349
  @environment = (x = (x = opts.delete(:environment); x.nil? ? "production" : x); x.is_a?(::Io::Flow::V0::Models::Environment) ? x : ::Io::Flow::V0::Models::Environment.apply(x))
41482
42350
  @parent_id = (x = opts.delete(:parent_id); x.nil? ? nil : HttpClient::Preconditions.assert_class('parent_id', x, String))
41483
42351
  @defaults = (x = opts.delete(:defaults); x.nil? ? nil : (x = x; x.is_a?(::Io::Flow::V0::Models::OrganizationDefaults) ? x : ::Io::Flow::V0::Models::OrganizationDefaults.new(x)))
42352
+ @status = (x = (x = opts.delete(:status); x.nil? ? "active" : x); x.is_a?(::Io::Flow::V0::Models::OrganizationStatus) ? x : ::Io::Flow::V0::Models::OrganizationStatus.apply(x))
41484
42353
  end
41485
42354
 
41486
42355
  def to_json
@@ -41497,7 +42366,8 @@ module Io
41497
42366
  :name => name,
41498
42367
  :environment => environment.value,
41499
42368
  :parent_id => parent_id,
41500
- :defaults => defaults.nil? ? nil : defaults.to_hash
42369
+ :defaults => defaults.nil? ? nil : defaults.to_hash,
42370
+ :status => status.value
41501
42371
  }
41502
42372
  end
41503
42373
 
@@ -41506,7 +42376,7 @@ module Io
41506
42376
  # Data required to upsert an organization.
41507
42377
  class OrganizationPutForm
41508
42378
 
41509
- attr_reader :name, :environment, :parent_id, :defaults
42379
+ attr_reader :name, :environment, :parent_id, :defaults, :status
41510
42380
 
41511
42381
  def initialize(incoming={})
41512
42382
  opts = HttpClient::Helper.symbolize_keys(incoming)
@@ -41514,6 +42384,7 @@ module Io
41514
42384
  @environment = (x = opts.delete(:environment); x.nil? ? nil : (x = x; x.is_a?(::Io::Flow::V0::Models::Environment) ? x : ::Io::Flow::V0::Models::Environment.apply(x)))
41515
42385
  @parent_id = (x = opts.delete(:parent_id); x.nil? ? nil : HttpClient::Preconditions.assert_class('parent_id', x, String))
41516
42386
  @defaults = (x = opts.delete(:defaults); x.nil? ? nil : (x = x; x.is_a?(::Io::Flow::V0::Models::OrganizationDefaults) ? x : ::Io::Flow::V0::Models::OrganizationDefaults.new(x)))
42387
+ @status = (x = (x = opts.delete(:status); x.nil? ? "active" : x); x.is_a?(::Io::Flow::V0::Models::OrganizationStatus) ? x : ::Io::Flow::V0::Models::OrganizationStatus.apply(x))
41517
42388
  end
41518
42389
 
41519
42390
  def to_json
@@ -41529,7 +42400,8 @@ module Io
41529
42400
  :name => name,
41530
42401
  :environment => environment.nil? ? nil : environment.value,
41531
42402
  :parent_id => parent_id,
41532
- :defaults => defaults.nil? ? nil : defaults.to_hash
42403
+ :defaults => defaults.nil? ? nil : defaults.to_hash,
42404
+ :status => status.value
41533
42405
  }
41534
42406
  end
41535
42407
 
@@ -43208,7 +44080,7 @@ module Io
43208
44080
  # collection of items, and metadata about those options
43209
44081
  class PhysicalDelivery < Delivery
43210
44082
 
43211
- attr_reader :id, :key, :center, :items, :options, :special_services, :prices, :total, :goods_supply
44083
+ attr_reader :id, :key, :center, :items, :options, :special_services, :prices, :total, :goods_supply, :merchant_of_record_flow_entity
43212
44084
 
43213
44085
  def initialize(incoming={})
43214
44086
  super(:discriminator => Delivery::Types::PHYSICAL_DELIVERY)
@@ -43223,6 +44095,7 @@ module Io
43223
44095
  @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)) })
43224
44096
  @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)))
43225
44097
  @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)))
44098
+ @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)))
43226
44099
  end
43227
44100
 
43228
44101
  def to_json
@@ -43243,7 +44116,8 @@ module Io
43243
44116
  :special_services => special_services.nil? ? nil : special_services.map { |o| o.value },
43244
44117
  :prices => prices.nil? ? nil : prices.map { |o| o.to_hash },
43245
44118
  :total => total.nil? ? nil : total.to_hash,
43246
- :goods_supply => goods_supply.nil? ? nil : goods_supply.value
44119
+ :goods_supply => goods_supply.nil? ? nil : goods_supply.value,
44120
+ :merchant_of_record_flow_entity => merchant_of_record_flow_entity.nil? ? nil : merchant_of_record_flow_entity.value
43247
44121
  }
43248
44122
  end
43249
44123
 
@@ -43491,7 +44365,7 @@ module Io
43491
44365
  # export
43492
44366
  class PriceBookItemExportType < ExportType
43493
44367
 
43494
- attr_reader :price_book_key, :item_numbers, :start_date, :end_date
44368
+ attr_reader :price_book_key, :item_numbers, :start_date, :end_date, :item_identifier
43495
44369
 
43496
44370
  def initialize(incoming={})
43497
44371
  super(:discriminator => ExportType::Types::PRICE_BOOK_ITEM_EXPORT_TYPE)
@@ -43500,6 +44374,7 @@ module Io
43500
44374
  @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) })
43501
44375
  @start_date = (x = opts.delete(:start_date); x.nil? ? nil : HttpClient::Preconditions.assert_class('start_date', HttpClient::Helper.to_date_time_iso8601(x), DateTime))
43502
44376
  @end_date = (x = opts.delete(:end_date); x.nil? ? nil : HttpClient::Preconditions.assert_class('end_date', HttpClient::Helper.to_date_time_iso8601(x), DateTime))
44377
+ @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))
43503
44378
  end
43504
44379
 
43505
44380
  def to_json
@@ -43515,7 +44390,8 @@ module Io
43515
44390
  :price_book_key => price_book_key,
43516
44391
  :item_numbers => item_numbers.nil? ? nil : item_numbers,
43517
44392
  :start_date => start_date,
43518
- :end_date => end_date
44393
+ :end_date => end_date,
44394
+ :item_identifier => item_identifier.value
43519
44395
  }
43520
44396
  end
43521
44397
 
@@ -52077,6 +52953,158 @@ module Io
52077
52953
 
52078
52954
  end
52079
52955
 
52956
+ # Information necessary to perform a 3ds Challenge action inline to the user
52957
+ # experience.
52958
+ class ThreedsChallengeActionDetails < AuthorizationResultActionDetails
52959
+
52960
+ attr_reader :threeds_challenge_action, :expires_at
52961
+
52962
+ def initialize(incoming={})
52963
+ super(:discriminator => AuthorizationResultActionDetails::Types::THREEDS_CHALLENGE_ACTION_DETAILS)
52964
+ opts = HttpClient::Helper.symbolize_keys(incoming)
52965
+ HttpClient::Preconditions.require_keys(opts, [:threeds_challenge_action, :expires_at], 'ThreedsChallengeActionDetails')
52966
+ @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))
52967
+ @expires_at = HttpClient::Preconditions.assert_class('expires_at', HttpClient::Helper.to_date_time_iso8601(opts.delete(:expires_at)), DateTime)
52968
+ end
52969
+
52970
+ def to_json
52971
+ JSON.dump(to_hash)
52972
+ end
52973
+
52974
+ def copy(incoming={})
52975
+ ThreedsChallengeActionDetails.new(subtype_to_hash.merge(HttpClient::Helper.symbolize_keys(incoming)))
52976
+ end
52977
+
52978
+ def subtype_to_hash
52979
+ {
52980
+ :threeds_challenge_action => threeds_challenge_action.to_hash,
52981
+ :expires_at => expires_at
52982
+ }
52983
+ end
52984
+
52985
+ end
52986
+
52987
+ # Information necessary to perform a 3ds Identify action inline to the user
52988
+ # experience.
52989
+ class ThreedsIdentifyActionDetails < AuthorizationResultActionDetails
52990
+
52991
+ attr_reader :threeds_identify_action, :expires_at
52992
+
52993
+ def initialize(incoming={})
52994
+ super(:discriminator => AuthorizationResultActionDetails::Types::THREEDS_IDENTIFY_ACTION_DETAILS)
52995
+ opts = HttpClient::Helper.symbolize_keys(incoming)
52996
+ HttpClient::Preconditions.require_keys(opts, [:threeds_identify_action, :expires_at], 'ThreedsIdentifyActionDetails')
52997
+ @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))
52998
+ @expires_at = HttpClient::Preconditions.assert_class('expires_at', HttpClient::Helper.to_date_time_iso8601(opts.delete(:expires_at)), DateTime)
52999
+ end
53000
+
53001
+ def to_json
53002
+ JSON.dump(to_hash)
53003
+ end
53004
+
53005
+ def copy(incoming={})
53006
+ ThreedsIdentifyActionDetails.new(subtype_to_hash.merge(HttpClient::Helper.symbolize_keys(incoming)))
53007
+ end
53008
+
53009
+ def subtype_to_hash
53010
+ {
53011
+ :threeds_identify_action => threeds_identify_action.to_hash,
53012
+ :expires_at => expires_at
53013
+ }
53014
+ end
53015
+
53016
+ end
53017
+
53018
+ # Instructions to the card issuer to render challenges to the user
53019
+ class ThreedsTwoBrowserActionConfiguration < ActionConfiguration
53020
+
53021
+ attr_reader :viewport
53022
+
53023
+ def initialize(incoming={})
53024
+ super(:discriminator => ActionConfiguration::Types::THREEDS_TWO_BROWSER_ACTION_CONFIGURATION)
53025
+ opts = HttpClient::Helper.symbolize_keys(incoming)
53026
+ @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))
53027
+ end
53028
+
53029
+ def to_json
53030
+ JSON.dump(to_hash)
53031
+ end
53032
+
53033
+ def copy(incoming={})
53034
+ ThreedsTwoBrowserActionConfiguration.new(subtype_to_hash.merge(HttpClient::Helper.symbolize_keys(incoming)))
53035
+ end
53036
+
53037
+ def subtype_to_hash
53038
+ {
53039
+ :viewport => viewport.value
53040
+ }
53041
+ end
53042
+
53043
+ end
53044
+
53045
+ # Data that must be passed to the 3DS Client to help the issuer ACS render a
53046
+ # challenge for the user.
53047
+ class ThreedsTwoChallengeRequest < ThreedsChallengeAction
53048
+
53049
+ attr_reader :acs_url, :challenge_request, :session_data
53050
+
53051
+ def initialize(incoming={})
53052
+ super(:discriminator => ThreedsChallengeAction::Types::THREEDS_TWO_CHALLENGE_REQUEST)
53053
+ opts = HttpClient::Helper.symbolize_keys(incoming)
53054
+ HttpClient::Preconditions.require_keys(opts, [:acs_url, :challenge_request], 'ThreedsTwoChallengeRequest')
53055
+ @acs_url = HttpClient::Preconditions.assert_class('acs_url', opts.delete(:acs_url), String)
53056
+ @challenge_request = HttpClient::Preconditions.assert_class('challenge_request', opts.delete(:challenge_request), String)
53057
+ @session_data = (x = opts.delete(:session_data); x.nil? ? nil : HttpClient::Preconditions.assert_class('session_data', x, String))
53058
+ end
53059
+
53060
+ def to_json
53061
+ JSON.dump(to_hash)
53062
+ end
53063
+
53064
+ def copy(incoming={})
53065
+ ThreedsTwoChallengeRequest.new(subtype_to_hash.merge(HttpClient::Helper.symbolize_keys(incoming)))
53066
+ end
53067
+
53068
+ def subtype_to_hash
53069
+ {
53070
+ :acs_url => acs_url,
53071
+ :challenge_request => challenge_request,
53072
+ :session_data => session_data
53073
+ }
53074
+ end
53075
+
53076
+ end
53077
+
53078
+ # Data that must be rendered by the 3DS Client in order to help the issuer ACS
53079
+ # silently identify the user. This format doesn't decompose the ACS identify
53080
+ # method.
53081
+ class ThreedsTwoMethod < ThreedsIdentifyAction
53082
+
53083
+ attr_reader :method
53084
+
53085
+ def initialize(incoming={})
53086
+ super(:discriminator => ThreedsIdentifyAction::Types::THREEDS_TWO_METHOD)
53087
+ opts = HttpClient::Helper.symbolize_keys(incoming)
53088
+ HttpClient::Preconditions.require_keys(opts, [:method], 'ThreedsTwoMethod')
53089
+ @method = HttpClient::Preconditions.assert_class('method', opts.delete(:method), String)
53090
+ end
53091
+
53092
+ def to_json
53093
+ JSON.dump(to_hash)
53094
+ end
53095
+
53096
+ def copy(incoming={})
53097
+ ThreedsTwoMethod.new(subtype_to_hash.merge(HttpClient::Helper.symbolize_keys(incoming)))
53098
+ end
53099
+
53100
+ def subtype_to_hash
53101
+ {
53102
+ :method => method
53103
+ }
53104
+ end
53105
+
53106
+ end
53107
+
52080
53108
  # Service shipping tier available in this tier group. e.g. Standard tier,
52081
53109
  # Express tier, Economy tier
52082
53110
  class Tier
@@ -54581,7 +55609,7 @@ module Io
54581
55609
  end
54582
55610
 
54583
55611
  def Helper.to_big_decimal(value)
54584
- value ? BigDecimal.new(value.to_s) : nil
55612
+ value ? BigDecimal(value.to_s) : nil
54585
55613
  end
54586
55614
 
54587
55615
  def Helper.to_object(value)