flowcommerce 0.2.81 → 0.2.88

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
- SHA256:
3
- metadata.gz: 64e4aa9a200c0fbdcb2ffa2c5bca8fbdbc138956ff196538cb5876279298a5b3
4
- data.tar.gz: 5a246655756e1d594130ae64cb3214f6407cf4110d55b84940ba5fa7982318ce
2
+ SHA1:
3
+ metadata.gz: 2a71e4b1f00cc09abb9b4318b6dad318bdddbd5a
4
+ data.tar.gz: 9fdabc6f76f946008ead2620c3667258321b10c8
5
5
  SHA512:
6
- metadata.gz: 5f71004f0cce6bb3460619278e883abdf01613c2e6b12e971e61a782b7bd0b7a2d496713d92d7f14256fdffc9513c55e824d394e00cfecf8788ac7dca373632b
7
- data.tar.gz: b459edd07448f75486001c79a033aafbfa4bea31b1c81eb0a4128b238eee4ef3d0066b7208e938dab33fef62671bfabc37395b352128b40e7027ed5554edd77a
6
+ metadata.gz: 76451af39a4ace0561ebd241272c94ed58e5625847e0a80c9816d5afe15c8f97f9df9ccf9d8e697f442f9d669baae3c976138f334e9878b775a1fdb60e9289de
7
+ data.tar.gz: e1a43c81eb365db06786ef4acc9c35d64cf1e9a67d153204145725a7e0e0ab522dff8eb8ffe6ac97a3a512d70a1adba3b770892a5830951195d1a1f811c8e3fd
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.33
3
- # apibuilder 0.15.8 app.apibuilder.io/flow/api/latest/ruby_client
2
+ # Service version: 0.9.77
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.8 app.apibuilder.io/flow/api/latest/ruby_client' unless defined?(Constants::USER_AGENT)
29
- VERSION = '0.9.33' 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.77' 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) }
@@ -3990,10 +4216,14 @@ module Io
3990
4216
  r.map { |x| ::Io::Flow::V0::Models::Quote.new(x) }
3991
4217
  end
3992
4218
 
3993
- def post(organization, quote_form)
4219
+ def post(organization, quote_form, incoming={})
3994
4220
  HttpClient::Preconditions.assert_class('organization', organization, String)
4221
+ opts = HttpClient::Helper.symbolize_keys(incoming)
4222
+ query = {
4223
+ :context => (x = opts.delete(:context); x.nil? ? nil : HttpClient::Preconditions.assert_class('context', x, String))
4224
+ }.delete_if { |k, v| v.nil? }
3995
4225
  (x = quote_form; x.is_a?(::Io::Flow::V0::Models::QuoteForm) ? x : ::Io::Flow::V0::Models::QuoteForm.new(x))
3996
- r = @client.request("/#{CGI.escape(organization)}/quotes").with_json(quote_form.to_json).post
4226
+ r = @client.request("/#{CGI.escape(organization)}/quotes").with_query(query).with_json(quote_form.to_json).post
3997
4227
  ::Io::Flow::V0::Models::Quote.new(r)
3998
4228
  end
3999
4229
 
@@ -4054,6 +4284,13 @@ module Io
4054
4284
  ::Io::Flow::V0::Models::Ratecard.new(r)
4055
4285
  end
4056
4286
 
4287
+ def delete_by_id(organization, id)
4288
+ HttpClient::Preconditions.assert_class('organization', organization, String)
4289
+ HttpClient::Preconditions.assert_class('id', id, String)
4290
+ r = @client.request("/#{CGI.escape(organization)}/ratecards/#{CGI.escape(id)}").delete
4291
+ nil
4292
+ end
4293
+
4057
4294
  def put_publish_by_id(organization, id)
4058
4295
  HttpClient::Preconditions.assert_class('organization', organization, String)
4059
4296
  HttpClient::Preconditions.assert_class('id', id, String)
@@ -4075,19 +4312,27 @@ module Io
4075
4312
  # gravitational weight, the weight field must be set. When estimating based
4076
4313
  # off dimensional weight, then length/width/depth must be set. For either one,
4077
4314
  # the appropriate unit of measurement must be given.
4078
- def post(organization, ratecard_estimate_form)
4315
+ def post(organization, ratecard_estimate_form, incoming={})
4079
4316
  HttpClient::Preconditions.assert_class('organization', organization, String)
4317
+ opts = HttpClient::Helper.symbolize_keys(incoming)
4318
+ query = {
4319
+ :context => (x = opts.delete(:context); x.nil? ? nil : HttpClient::Preconditions.assert_class('context', x, String))
4320
+ }.delete_if { |k, v| v.nil? }
4080
4321
  (x = ratecard_estimate_form; x.is_a?(::Io::Flow::V0::Models::RatecardEstimateForm) ? x : ::Io::Flow::V0::Models::RatecardEstimateForm.from_json(x))
4081
- r = @client.request("/#{CGI.escape(organization)}/ratecard_estimates").with_json(ratecard_estimate_form.to_json).post
4322
+ r = @client.request("/#{CGI.escape(organization)}/ratecard_estimates").with_query(query).with_json(ratecard_estimate_form.to_json).post
4082
4323
  r.map { |x| ::Io::Flow::V0::Models::RatecardEstimate.from_json(x) }
4083
4324
  end
4084
4325
 
4085
4326
  # Endpoint to get a summary of the shipment estimates based on applicable rate
4086
4327
  # cards. An origin and destination country must be provided.
4087
- def post_summaries(organization, ratecard_estimate_summary_form)
4328
+ def post_summaries(organization, ratecard_estimate_summary_form, incoming={})
4088
4329
  HttpClient::Preconditions.assert_class('organization', organization, String)
4330
+ opts = HttpClient::Helper.symbolize_keys(incoming)
4331
+ query = {
4332
+ :context => (x = opts.delete(:context); x.nil? ? nil : HttpClient::Preconditions.assert_class('context', x, String))
4333
+ }.delete_if { |k, v| v.nil? }
4089
4334
  (x = ratecard_estimate_summary_form; x.is_a?(::Io::Flow::V0::Models::RatecardEstimateSummaryForm) ? x : ::Io::Flow::V0::Models::RatecardEstimateSummaryForm.new(x))
4090
- r = @client.request("/#{CGI.escape(organization)}/ratecard_estimates/summaries").with_json(ratecard_estimate_summary_form.to_json).post
4335
+ r = @client.request("/#{CGI.escape(organization)}/ratecard_estimates/summaries").with_query(query).with_json(ratecard_estimate_summary_form.to_json).post
4091
4336
  r.map { |x| ::Io::Flow::V0::Models::RatecardEstimate.from_json(x) }
4092
4337
  end
4093
4338
 
@@ -4472,7 +4717,8 @@ module Io
4472
4717
  HttpClient::Preconditions.assert_class('organization', organization, String)
4473
4718
  opts = HttpClient::Helper.symbolize_keys(incoming)
4474
4719
  query = {
4475
- :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))
4476
4722
  }.delete_if { |k, v| v.nil? }
4477
4723
  (x = shipping_label_form; x.is_a?(::Io::Flow::V0::Models::ShippingLabelForm) ? x : ::Io::Flow::V0::Models::ShippingLabelForm.from_json(x))
4478
4724
  r = @client.request("/#{CGI.escape(organization)}/shipping_labels").with_query(query).with_json(shipping_label_form.to_json).post
@@ -4925,7 +5171,9 @@ module Io
4925
5171
  opts = HttpClient::Helper.symbolize_keys(incoming)
4926
5172
  query = {
4927
5173
  :address => (x = opts.delete(:address); x.nil? ? nil : HttpClient::Preconditions.assert_class('address', x, String)),
4928
- :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))
4929
5177
  }.delete_if { |k, v| v.nil? }
4930
5178
  r = @client.request("/addresses").with_query(query).get
4931
5179
  r.map { |x| ::Io::Flow::V0::Models::Address.new(x) }
@@ -5324,10 +5572,14 @@ module Io
5324
5572
  nil
5325
5573
  end
5326
5574
 
5327
- def post_checkout_and_tokens_by_organization(organization, checkout_token_form)
5575
+ def post_checkout_and_tokens_by_organization(organization, checkout_token_form, incoming={})
5328
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? }
5329
5581
  (x = checkout_token_form; x.is_a?(::Io::Flow::V0::Models::CheckoutTokenForm) ? x : ::Io::Flow::V0::Models::CheckoutTokenForm.from_json(x))
5330
- 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
5331
5583
  ::Io::Flow::V0::Models::CheckoutToken.new(r)
5332
5584
  end
5333
5585
 
@@ -6676,101 +6928,117 @@ module Io
6676
6928
  @client = HttpClient::Preconditions.assert_class('client', client, ::Io::Flow::V0::Client)
6677
6929
  end
6678
6930
 
6679
- def post_organizations_by_organization(organization, session_form)
6931
+ def post_shopify_and_organizations_by_organization(organization, session_form)
6680
6932
  HttpClient::Preconditions.assert_class('organization', organization, String)
6681
6933
  (x = session_form; x.is_a?(::Io::Flow::V0::Models::SessionForm) ? x : ::Io::Flow::V0::Models::SessionForm.new(x))
6682
- r = @client.request("/sessions/organizations/#{CGI.escape(organization)}").with_json(session_form.to_json).post
6934
+ r = @client.request("/sessions/shopify/organizations/#{CGI.escape(organization)}").with_json(session_form.to_json).post
6683
6935
  ::Io::Flow::V0::Models::OrganizationSession.new(r)
6684
6936
  end
6685
6937
 
6686
- def get_by_session(session)
6938
+ def get_shopify_by_session(session)
6687
6939
  HttpClient::Preconditions.assert_class('session', session, String)
6688
- r = @client.request("/sessions/#{CGI.escape(session)}").get
6940
+ r = @client.request("/sessions/shopify/#{CGI.escape(session)}").get
6689
6941
  ::Io::Flow::V0::Models::Session.from_json(r)
6690
6942
  end
6691
6943
 
6692
- def put_by_session(session, session_put_form)
6944
+ def put_shopify_by_session(session, session_put_form)
6693
6945
  HttpClient::Preconditions.assert_class('session', session, String)
6694
6946
  (x = session_put_form; x.is_a?(::Io::Flow::V0::Models::SessionPutForm) ? x : ::Io::Flow::V0::Models::SessionPutForm.new(x))
6695
- r = @client.request("/sessions/#{CGI.escape(session)}").with_json(session_put_form.to_json).put
6947
+ r = @client.request("/sessions/shopify/#{CGI.escape(session)}").with_json(session_put_form.to_json).put
6696
6948
  ::Io::Flow::V0::Models::Session.from_json(r)
6697
6949
  end
6698
6950
 
6699
- def delete_by_session(session)
6951
+ def delete_shopify_by_session(session)
6700
6952
  HttpClient::Preconditions.assert_class('session', session, String)
6701
- r = @client.request("/sessions/#{CGI.escape(session)}").delete
6953
+ r = @client.request("/sessions/shopify/#{CGI.escape(session)}").delete
6702
6954
  nil
6703
6955
  end
6704
6956
 
6705
6957
  # Clears the session geo parameters
6706
- def put_clear_by_session(session)
6958
+ def put_shopify_and_clear_by_session(session)
6707
6959
  HttpClient::Preconditions.assert_class('session', session, String)
6708
- r = @client.request("/sessions/#{CGI.escape(session)}/clear").put
6960
+ r = @client.request("/sessions/shopify/#{CGI.escape(session)}/clear").put
6709
6961
  ::Io::Flow::V0::Models::Session.from_json(r)
6710
6962
  end
6711
6963
 
6712
- def put_organizations_by_session_and_organization(session, organization, session_put_form)
6964
+ def put_shopify_and_organizations_by_session_and_organization(session, organization, session_put_form)
6713
6965
  HttpClient::Preconditions.assert_class('session', session, String)
6714
6966
  HttpClient::Preconditions.assert_class('organization', organization, String)
6715
6967
  (x = session_put_form; x.is_a?(::Io::Flow::V0::Models::SessionPutForm) ? x : ::Io::Flow::V0::Models::SessionPutForm.new(x))
6716
- r = @client.request("/sessions/#{CGI.escape(session)}/organizations/#{CGI.escape(organization)}").with_json(session_put_form.to_json).put
6968
+ r = @client.request("/sessions/shopify/#{CGI.escape(session)}/organizations/#{CGI.escape(organization)}").with_json(session_put_form.to_json).put
6717
6969
  ::Io::Flow::V0::Models::OrganizationSession.new(r)
6718
6970
  end
6719
6971
 
6720
6972
  # Resets the session based on the provided geo parameters.
6721
- def put_reset_by_session(session, session_put_form)
6973
+ def put_shopify_and_reset_by_session(session, session_put_form)
6722
6974
  HttpClient::Preconditions.assert_class('session', session, String)
6723
6975
  (x = session_put_form; x.is_a?(::Io::Flow::V0::Models::SessionPutForm) ? x : ::Io::Flow::V0::Models::SessionPutForm.new(x))
6724
- r = @client.request("/sessions/#{CGI.escape(session)}/reset").with_json(session_put_form.to_json).put
6976
+ r = @client.request("/sessions/shopify/#{CGI.escape(session)}/reset").with_json(session_put_form.to_json).put
6725
6977
  ::Io::Flow::V0::Models::Session.from_json(r)
6726
6978
  end
6727
6979
 
6728
- def post_shopify_and_organizations_by_organization(organization, session_form)
6980
+ def post_organizations_by_organization(organization, session_form, incoming={})
6729
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? }
6730
6986
  (x = session_form; x.is_a?(::Io::Flow::V0::Models::SessionForm) ? x : ::Io::Flow::V0::Models::SessionForm.new(x))
6731
- r = @client.request("/sessions/shopify/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
6732
6988
  ::Io::Flow::V0::Models::OrganizationSession.new(r)
6733
6989
  end
6734
6990
 
6735
- def get_shopify_by_session(session)
6991
+ def get_by_session(session)
6736
6992
  HttpClient::Preconditions.assert_class('session', session, String)
6737
- r = @client.request("/sessions/shopify/#{CGI.escape(session)}").get
6993
+ r = @client.request("/sessions/#{CGI.escape(session)}").get
6738
6994
  ::Io::Flow::V0::Models::Session.from_json(r)
6739
6995
  end
6740
6996
 
6741
- def put_shopify_by_session(session, session_put_form)
6997
+ def put_by_session(session, session_put_form, incoming={})
6742
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? }
6743
7003
  (x = session_put_form; x.is_a?(::Io::Flow::V0::Models::SessionPutForm) ? x : ::Io::Flow::V0::Models::SessionPutForm.new(x))
6744
- r = @client.request("/sessions/shopify/#{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
6745
7005
  ::Io::Flow::V0::Models::Session.from_json(r)
6746
7006
  end
6747
7007
 
6748
- def delete_shopify_by_session(session)
7008
+ def delete_by_session(session)
6749
7009
  HttpClient::Preconditions.assert_class('session', session, String)
6750
- r = @client.request("/sessions/shopify/#{CGI.escape(session)}").delete
7010
+ r = @client.request("/sessions/#{CGI.escape(session)}").delete
6751
7011
  nil
6752
7012
  end
6753
7013
 
6754
7014
  # Clears the session geo parameters
6755
- def put_shopify_and_clear_by_session(session)
7015
+ def put_clear_by_session(session)
6756
7016
  HttpClient::Preconditions.assert_class('session', session, String)
6757
- r = @client.request("/sessions/shopify/#{CGI.escape(session)}/clear").put
7017
+ r = @client.request("/sessions/#{CGI.escape(session)}/clear").put
6758
7018
  ::Io::Flow::V0::Models::Session.from_json(r)
6759
7019
  end
6760
7020
 
6761
- def put_shopify_and_organizations_by_session_and_organization(session, organization, session_put_form)
7021
+ def put_organizations_by_session_and_organization(session, organization, session_put_form, incoming={})
6762
7022
  HttpClient::Preconditions.assert_class('session', session, String)
6763
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? }
6764
7028
  (x = session_put_form; x.is_a?(::Io::Flow::V0::Models::SessionPutForm) ? x : ::Io::Flow::V0::Models::SessionPutForm.new(x))
6765
- r = @client.request("/sessions/shopify/#{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
6766
7030
  ::Io::Flow::V0::Models::OrganizationSession.new(r)
6767
7031
  end
6768
7032
 
6769
7033
  # Resets the session based on the provided geo parameters.
6770
- def put_shopify_and_reset_by_session(session, session_put_form)
7034
+ def put_reset_by_session(session, session_put_form, incoming={})
6771
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? }
6772
7040
  (x = session_put_form; x.is_a?(::Io::Flow::V0::Models::SessionPutForm) ? x : ::Io::Flow::V0::Models::SessionPutForm.new(x))
6773
- r = @client.request("/sessions/shopify/#{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
6774
7042
  ::Io::Flow::V0::Models::Session.from_json(r)
6775
7043
  end
6776
7044
 
@@ -6797,47 +7065,71 @@ module Io
6797
7065
  end
6798
7066
 
6799
7067
  # Retrieve representation of a Shopify cart for the given order number.
6800
- def get_order_by_number(number)
7068
+ def get_order_by_number(number, incoming={})
6801
7069
  HttpClient::Preconditions.assert_class('number', number, String)
6802
- 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
6803
7075
  ::Io::Flow::V0::Models::ShopifyCart.new(r)
6804
7076
  end
6805
7077
 
6806
7078
  # Retrieve representation of a Shopify cart given the unique cart id.
6807
- def get_by_id_html(id)
7079
+ def get_by_id_html(id, incoming={})
6808
7080
  HttpClient::Preconditions.assert_class('id', id, String)
6809
- 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
6810
7086
  r
6811
7087
  end
6812
7088
 
6813
7089
  # Retrieve representation of a Shopify cart given the unique cart id.
6814
- def get_by_id(id)
7090
+ def get_by_id(id, incoming={})
6815
7091
  HttpClient::Preconditions.assert_class('id', id, String)
6816
- 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
6817
7097
  ::Io::Flow::V0::Models::ShopifyCart.new(r)
6818
7098
  end
6819
7099
 
6820
7100
  # Add an item to a Shopify cart given the unique cart id.
6821
- def post_add_by_id(id, shopify_cart_add_form)
7101
+ def post_add_by_id(id, shopify_cart_add_form, incoming={})
6822
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? }
6823
7107
  (x = shopify_cart_add_form; x.is_a?(::Io::Flow::V0::Models::ShopifyCartAddForm) ? x : ::Io::Flow::V0::Models::ShopifyCartAddForm.from_json(x))
6824
- 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
6825
7109
  ::Io::Flow::V0::Models::ShopifyCart.new(r)
6826
7110
  end
6827
7111
 
6828
7112
  # Update the attribute information for the cart.
6829
- def put_attributes_by_id(id, shopify_order_attributes_form)
7113
+ def put_attributes_by_id(id, shopify_order_attributes_form, incoming={})
6830
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? }
6831
7119
  (x = shopify_order_attributes_form; x.is_a?(::Io::Flow::V0::Models::ShopifyOrderAttributesForm) ? x : ::Io::Flow::V0::Models::ShopifyOrderAttributesForm.new(x))
6832
- 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
6833
7121
  ::Io::Flow::V0::Models::ShopifyCart.new(r)
6834
7122
  end
6835
7123
 
6836
7124
  # Change/Update an item in a Shopify cart given the unique cart id.
6837
- def post_change_by_id(id, shopify_cart_change_form)
7125
+ def post_change_by_id(id, shopify_cart_change_form, incoming={})
6838
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? }
6839
7131
  (x = shopify_cart_change_form; x.is_a?(::Io::Flow::V0::Models::ShopifyCartChangeForm) ? x : ::Io::Flow::V0::Models::ShopifyCartChangeForm.new(x))
6840
- 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
6841
7133
  ::Io::Flow::V0::Models::ShopifyCart.new(r)
6842
7134
  end
6843
7135
 
@@ -6849,10 +7141,14 @@ module Io
6849
7141
  end
6850
7142
 
6851
7143
  # Update the geo information for the cart.
6852
- def put_geo_by_id(id, geo_form)
7144
+ def put_geo_by_id(id, geo_form, incoming={})
6853
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? }
6854
7150
  (x = geo_form; x.is_a?(::Io::Flow::V0::Models::GeoForm) ? x : ::Io::Flow::V0::Models::GeoForm.new(x))
6855
- 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
6856
7152
  ::Io::Flow::V0::Models::ShopifyCart.new(r)
6857
7153
  end
6858
7154
 
@@ -6861,7 +7157,8 @@ module Io
6861
7157
  HttpClient::Preconditions.assert_class('id', id, String)
6862
7158
  opts = HttpClient::Helper.symbolize_keys(incoming)
6863
7159
  query = {
6864
- :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))
6865
7162
  }.delete_if { |k, v| v.nil? }
6866
7163
  r = @client.request("/shopify/carts/#{CGI.escape(id)}/orders").with_query(query).post
6867
7164
  ::Io::Flow::V0::Models::Order.new(r)
@@ -6881,7 +7178,8 @@ module Io
6881
7178
  HttpClient::Preconditions.assert_class('experience_key', experience_key, String)
6882
7179
  opts = HttpClient::Helper.symbolize_keys(incoming)
6883
7180
  query = {
6884
- :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))
6885
7183
  }.delete_if { |k, v| v.nil? }
6886
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))
6887
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
@@ -7467,6 +7765,68 @@ module Io
7467
7765
 
7468
7766
  module Models
7469
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
+
7470
7830
  class AdyenNativeData
7471
7831
 
7472
7832
  module Types
@@ -7936,6 +8296,8 @@ module Io
7936
8296
  module Types
7937
8297
  ADYEN_NATIVE_ACTION_DETAILS = 'adyen_native_action_details' unless defined?(ADYEN_NATIVE_ACTION_DETAILS)
7938
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)
7939
8301
  end
7940
8302
 
7941
8303
  attr_reader :discriminator
@@ -7947,7 +8309,7 @@ module Io
7947
8309
  end
7948
8310
 
7949
8311
  def subtype_to_hash
7950
- 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'
7951
8313
  end
7952
8314
 
7953
8315
  def to_hash
@@ -7963,6 +8325,8 @@ module Io
7963
8325
  case discriminator
7964
8326
  when Types::ADYEN_NATIVE_ACTION_DETAILS; AdyenNativeActionDetails.new(hash)
7965
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)
7966
8330
  else AuthorizationResultActionDetailsUndefinedType.new(:discriminator => discriminator)
7967
8331
  end
7968
8332
  end
@@ -11794,6 +12158,130 @@ module Io
11794
12158
 
11795
12159
  end
11796
12160
 
12161
+ # Different version sets of 3ds challenge actions.
12162
+ class ThreedsChallengeAction
12163
+
12164
+ module Types
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)
12167
+ end
12168
+
12169
+ attr_reader :discriminator
12170
+
12171
+ def initialize(incoming={})
12172
+ opts = HttpClient::Helper.symbolize_keys(incoming)
12173
+ HttpClient::Preconditions.require_keys(opts, [:discriminator], 'ThreedsChallengeAction')
12174
+ @discriminator = HttpClient::Preconditions.assert_class('discriminator', opts.delete(:discriminator), String)
12175
+ end
12176
+
12177
+ def subtype_to_hash
12178
+ raise 'Cannot serialize an instance of threeds_challenge_action directly - must use one of the specific types: threeds_two_challenge_request'
12179
+ end
12180
+
12181
+ def to_hash
12182
+ subtype_to_hash.merge(:discriminator => @discriminator)
12183
+ end
12184
+
12185
+ def ThreedsChallengeAction.from_json(hash)
12186
+ HttpClient::Preconditions.assert_class('hash', hash, Hash)
12187
+ discriminator = HttpClient::Helper.symbolize_keys(hash)[:discriminator].to_s.strip
12188
+ if discriminator.empty?
12189
+ raise "Union type[threeds_challenge_action] requires a field named 'discriminator'"
12190
+ end
12191
+ case discriminator
12192
+ when Types::THREEDS_TWO_CHALLENGE_REQUEST; ThreedsTwoChallengeRequest.new(hash)
12193
+ else ThreedsChallengeActionUndefinedType.new(:discriminator => discriminator)
12194
+ end
12195
+ end
12196
+
12197
+ end
12198
+
12199
+ class ThreedsChallengeActionUndefinedType < ThreedsChallengeAction
12200
+
12201
+ attr_reader :name
12202
+
12203
+ def initialize(incoming={})
12204
+ super(:discriminator => 'undefined_type')
12205
+ opts = HttpClient::Helper.symbolize_keys(incoming)
12206
+ @name = HttpClient::Preconditions.assert_class('name', opts.delete(:discriminator), String)
12207
+ end
12208
+
12209
+ def subtype_to_hash
12210
+ raise 'Unable to serialize undefined type to json'
12211
+ end
12212
+
12213
+ def copy(incoming={})
12214
+ raise 'Operation not supported for undefined type'
12215
+ end
12216
+
12217
+ def to_hash
12218
+ raise 'Operation not supported for undefined type'
12219
+ end
12220
+
12221
+ end
12222
+
12223
+ # Different version sets of 3ds identify actions.
12224
+ class ThreedsIdentifyAction
12225
+
12226
+ module Types
12227
+ # Used for 2.1 and 2.2 versions of 3ds
12228
+ THREEDS_TWO_METHOD = 'threeds_two_method' unless defined?(THREEDS_TWO_METHOD)
12229
+ end
12230
+
12231
+ attr_reader :discriminator
12232
+
12233
+ def initialize(incoming={})
12234
+ opts = HttpClient::Helper.symbolize_keys(incoming)
12235
+ HttpClient::Preconditions.require_keys(opts, [:discriminator], 'ThreedsIdentifyAction')
12236
+ @discriminator = HttpClient::Preconditions.assert_class('discriminator', opts.delete(:discriminator), String)
12237
+ end
12238
+
12239
+ def subtype_to_hash
12240
+ raise 'Cannot serialize an instance of threeds_identify_action directly - must use one of the specific types: threeds_two_method'
12241
+ end
12242
+
12243
+ def to_hash
12244
+ subtype_to_hash.merge(:discriminator => @discriminator)
12245
+ end
12246
+
12247
+ def ThreedsIdentifyAction.from_json(hash)
12248
+ HttpClient::Preconditions.assert_class('hash', hash, Hash)
12249
+ discriminator = HttpClient::Helper.symbolize_keys(hash)[:discriminator].to_s.strip
12250
+ if discriminator.empty?
12251
+ raise "Union type[threeds_identify_action] requires a field named 'discriminator'"
12252
+ end
12253
+ case discriminator
12254
+ when Types::THREEDS_TWO_METHOD; ThreedsTwoMethod.new(hash)
12255
+ else ThreedsIdentifyActionUndefinedType.new(:discriminator => discriminator)
12256
+ end
12257
+ end
12258
+
12259
+ end
12260
+
12261
+ class ThreedsIdentifyActionUndefinedType < ThreedsIdentifyAction
12262
+
12263
+ attr_reader :name
12264
+
12265
+ def initialize(incoming={})
12266
+ super(:discriminator => 'undefined_type')
12267
+ opts = HttpClient::Helper.symbolize_keys(incoming)
12268
+ @name = HttpClient::Preconditions.assert_class('name', opts.delete(:discriminator), String)
12269
+ end
12270
+
12271
+ def subtype_to_hash
12272
+ raise 'Unable to serialize undefined type to json'
12273
+ end
12274
+
12275
+ def copy(incoming={})
12276
+ raise 'Operation not supported for undefined type'
12277
+ end
12278
+
12279
+ def to_hash
12280
+ raise 'Operation not supported for undefined type'
12281
+ end
12282
+
12283
+ end
12284
+
11797
12285
  # Possible outcome types from a tier rule
11798
12286
  class TierRuleOutcome
11799
12287
 
@@ -12337,7 +12825,7 @@ module Io
12337
12825
  end
12338
12826
 
12339
12827
  def AttributeIntent.ALL
12340
- @@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]
12341
12829
  end
12342
12830
 
12343
12831
  # A brand name of the item (for retailers that sell multiple brands)
@@ -12412,6 +12900,28 @@ module Io
12412
12900
  @@_facet ||= AttributeIntent.new('facet')
12413
12901
  end
12414
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
+
12415
12925
  def to_hash
12416
12926
  value
12417
12927
  end
@@ -15541,6 +16051,55 @@ module Io
15541
16051
 
15542
16052
  end
15543
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
+
15544
16103
  class FlowRole
15545
16104
 
15546
16105
  attr_reader :value
@@ -16557,6 +17116,48 @@ module Io
16557
17116
 
16558
17117
  end
16559
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
+
16560
17161
  class LaneDirection
16561
17162
 
16562
17163
  attr_reader :value
@@ -19815,7 +20416,7 @@ module Io
19815
20416
  end
19816
20417
 
19817
20418
  def SyncStreamType.ALL
19818
- @@all ||= [SyncStreamType.submitted_order]
20419
+ @@all ||= [SyncStreamType.submitted_order, SyncStreamType.placed_order]
19819
20420
  end
19820
20421
 
19821
20422
  # Represents a sync stream of submitted orders - ie each record reported
@@ -19824,6 +20425,12 @@ module Io
19824
20425
  @@_submitted_order ||= SyncStreamType.new('submitted_order')
19825
20426
  end
19826
20427
 
20428
+ # Represents a sync stream of placed orders - ie each record reported represents
20429
+ # a placed order
20430
+ def SyncStreamType.placed_order
20431
+ @@_placed_order ||= SyncStreamType.new('placed_order')
20432
+ end
20433
+
19827
20434
  def to_hash
19828
20435
  value
19829
20436
  end
@@ -20095,6 +20702,65 @@ module Io
20095
20702
 
20096
20703
  end
20097
20704
 
20705
+ class ThreedsTwoChallengeViewport
20706
+
20707
+ attr_reader :value
20708
+
20709
+ def initialize(value)
20710
+ @value = HttpClient::Preconditions.assert_class('value', value, String)
20711
+ end
20712
+
20713
+ # Returns the instance of ThreedsTwoChallengeViewport for this value, creating a new instance for an unknown value
20714
+ def ThreedsTwoChallengeViewport.apply(value)
20715
+ if value.instance_of?(ThreedsTwoChallengeViewport)
20716
+ value
20717
+ else
20718
+ HttpClient::Preconditions.assert_class_or_nil('value', value, String)
20719
+ value.nil? ? nil : (from_string(value) || ThreedsTwoChallengeViewport.new(value))
20720
+ end
20721
+ end
20722
+
20723
+ # Returns the instance of ThreedsTwoChallengeViewport for this value, or nil if not found
20724
+ def ThreedsTwoChallengeViewport.from_string(value)
20725
+ HttpClient::Preconditions.assert_class('value', value, String)
20726
+ ThreedsTwoChallengeViewport.ALL.find { |v| v.value == value }
20727
+ end
20728
+
20729
+ def ThreedsTwoChallengeViewport.ALL
20730
+ @@all ||= [ThreedsTwoChallengeViewport.xxx_small, ThreedsTwoChallengeViewport.xx_small, ThreedsTwoChallengeViewport.x_small, ThreedsTwoChallengeViewport.small, ThreedsTwoChallengeViewport.fullscreen]
20731
+ end
20732
+
20733
+ # 250x400
20734
+ def ThreedsTwoChallengeViewport.xxx_small
20735
+ @@_xxx_small ||= ThreedsTwoChallengeViewport.new('xxx_small')
20736
+ end
20737
+
20738
+ # 390x400
20739
+ def ThreedsTwoChallengeViewport.xx_small
20740
+ @@_xx_small ||= ThreedsTwoChallengeViewport.new('xx_small')
20741
+ end
20742
+
20743
+ # 500x600
20744
+ def ThreedsTwoChallengeViewport.x_small
20745
+ @@_x_small ||= ThreedsTwoChallengeViewport.new('x_small')
20746
+ end
20747
+
20748
+ # 600x400
20749
+ def ThreedsTwoChallengeViewport.small
20750
+ @@_small ||= ThreedsTwoChallengeViewport.new('small')
20751
+ end
20752
+
20753
+ # Full Screen. Not recommended for mobile devices at this time.
20754
+ def ThreedsTwoChallengeViewport.fullscreen
20755
+ @@_fullscreen ||= ThreedsTwoChallengeViewport.new('fullscreen')
20756
+ end
20757
+
20758
+ def to_hash
20759
+ value
20760
+ end
20761
+
20762
+ end
20763
+
20098
20764
  class TierAvailability
20099
20765
 
20100
20766
  attr_reader :value
@@ -20444,12 +21110,12 @@ module Io
20444
21110
  @@_foot ||= UnitOfMeasurement.new('foot')
20445
21111
  end
20446
21112
 
20447
- # A unit of volume equal to one cubic inch (in?).
21113
+ # A unit of volume equal to one cubic inch (in³).
20448
21114
  def UnitOfMeasurement.cubic_inch
20449
21115
  @@_cubic_inch ||= UnitOfMeasurement.new('cubic_inch')
20450
21116
  end
20451
21117
 
20452
- # The metric unit for volume quantities (m?).
21118
+ # The metric unit for volume quantities (m³).
20453
21119
  def UnitOfMeasurement.cubic_meter
20454
21120
  @@_cubic_meter ||= UnitOfMeasurement.new('cubic_meter')
20455
21121
  end
@@ -21640,12 +22306,13 @@ module Io
21640
22306
 
21641
22307
  class AllocationLineDetail < AllocationDetail
21642
22308
 
21643
- attr_reader :number, :quantity, :key, :price, :total, :included, :not_included
22309
+ attr_reader :id, :number, :quantity, :key, :price, :total, :included, :not_included
21644
22310
 
21645
22311
  def initialize(incoming={})
21646
22312
  super(:discriminator => AllocationDetail::Types::ALLOCATION_LINE_DETAIL)
21647
22313
  opts = HttpClient::Helper.symbolize_keys(incoming)
21648
22314
  HttpClient::Preconditions.require_keys(opts, [:number, :quantity, :key, :price, :total, :included, :not_included], 'AllocationLineDetail')
22315
+ @id = (x = opts.delete(:id); x.nil? ? nil : HttpClient::Preconditions.assert_class('id', x, String))
21649
22316
  @number = HttpClient::Preconditions.assert_class('number', opts.delete(:number), String)
21650
22317
  @quantity = HttpClient::Preconditions.assert_class('quantity', opts.delete(:quantity), Integer)
21651
22318
  @key = (x = opts.delete(:key); x.is_a?(::Io::Flow::V0::Models::OrderPriceDetailKey) ? x : ::Io::Flow::V0::Models::OrderPriceDetailKey.apply(x))
@@ -21665,6 +22332,7 @@ module Io
21665
22332
 
21666
22333
  def subtype_to_hash
21667
22334
  {
22335
+ :id => id,
21668
22336
  :number => number,
21669
22337
  :quantity => quantity,
21670
22338
  :key => key.value,
@@ -23465,7 +24133,8 @@ module Io
23465
24133
 
23466
24134
  end
23467
24135
 
23468
- # Shopper browser info. All of these fields are required if you are using 3DS2.
24136
+ # Shopper browser info used as part of card authentication. All of these fields
24137
+ # are required if you are using 3DS2.
23469
24138
  class BrowserInfo
23470
24139
 
23471
24140
  attr_reader :origin, :language, :java_enabled, :color_depth, :screen_height, :screen_width, :time_zone_offset, :user_agent, :accept
@@ -24133,7 +24802,7 @@ module Io
24133
24802
 
24134
24803
  class CardForm
24135
24804
 
24136
- attr_reader :number, :cipher, :expiration_month, :expiration_year, :name, :cvv, :address, :ip, :challenge_text, :challenge_cipher, :token_type, :requested_currency
24805
+ attr_reader :number, :cipher, :expiration_month, :expiration_year, :name, :cvv, :address, :ip, :challenge_text, :challenge_cipher, :token_type, :requested_currency, :metadata
24137
24806
 
24138
24807
  def initialize(incoming={})
24139
24808
  opts = HttpClient::Helper.symbolize_keys(incoming)
@@ -24150,6 +24819,7 @@ module Io
24150
24819
  @challenge_cipher = (x = opts.delete(:challenge_cipher); x.nil? ? nil : HttpClient::Preconditions.assert_class('challenge_cipher', x, String))
24151
24820
  @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)))
24152
24821
  @requested_currency = (x = opts.delete(:requested_currency); x.nil? ? nil : HttpClient::Preconditions.assert_class('requested_currency', x, String))
24822
+ @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)))
24153
24823
  end
24154
24824
 
24155
24825
  def to_json
@@ -24173,7 +24843,33 @@ module Io
24173
24843
  :challenge_text => challenge_text,
24174
24844
  :challenge_cipher => challenge_cipher,
24175
24845
  :token_type => token_type.nil? ? nil : token_type.value,
24176
- :requested_currency => requested_currency
24846
+ :requested_currency => requested_currency,
24847
+ :metadata => metadata.nil? ? nil : metadata.to_hash
24848
+ }
24849
+ end
24850
+
24851
+ end
24852
+
24853
+ class CardMetadata
24854
+
24855
+ attr_reader :merchant_of_record
24856
+
24857
+ def initialize(incoming={})
24858
+ opts = HttpClient::Helper.symbolize_keys(incoming)
24859
+ @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)))
24860
+ end
24861
+
24862
+ def to_json
24863
+ JSON.dump(to_hash)
24864
+ end
24865
+
24866
+ def copy(incoming={})
24867
+ CardMetadata.new(to_hash.merge(HttpClient::Helper.symbolize_keys(incoming)))
24868
+ end
24869
+
24870
+ def to_hash
24871
+ {
24872
+ :merchant_of_record => merchant_of_record.nil? ? nil : merchant_of_record.value
24177
24873
  }
24178
24874
  end
24179
24875
 
@@ -24242,7 +24938,7 @@ module Io
24242
24938
  # Creates an authorization for a transaction from a card payment source.
24243
24939
  class CardPaymentSourceAuthorizationForm < AuthorizationForm
24244
24940
 
24245
- attr_reader :key, :card_payment_source_id, :order_number, :amount, :currency, :browser_info
24941
+ attr_reader :key, :card_payment_source_id, :order_number, :amount, :currency, :browser_info, :action_configuration
24246
24942
 
24247
24943
  def initialize(incoming={})
24248
24944
  super(:discriminator => AuthorizationForm::Types::CARD_PAYMENT_SOURCE_AUTHORIZATION_FORM)
@@ -24254,6 +24950,7 @@ module Io
24254
24950
  @amount = HttpClient::Preconditions.assert_class('amount', HttpClient::Helper.to_big_decimal(opts.delete(:amount)), BigDecimal)
24255
24951
  @currency = HttpClient::Preconditions.assert_class('currency', opts.delete(:currency), String)
24256
24952
  @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)))
24953
+ @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)))
24257
24954
  end
24258
24955
 
24259
24956
  def to_json
@@ -24271,7 +24968,8 @@ module Io
24271
24968
  :order_number => order_number,
24272
24969
  :amount => amount.to_f.to_s,
24273
24970
  :currency => currency,
24274
- :browser_info => browser_info.nil? ? nil : browser_info.to_hash
24971
+ :browser_info => browser_info.nil? ? nil : browser_info.to_hash,
24972
+ :action_configuration => action_configuration.nil? ? nil : action_configuration.to_hash
24275
24973
  }
24276
24974
  end
24277
24975
 
@@ -27233,14 +27931,15 @@ module Io
27233
27931
  # Represents the format used to export price book item documents
27234
27932
  class CsvPriceBookItemExportRow
27235
27933
 
27236
- attr_reader :price_book_key, :price_book_item_key, :item_number, :item_name, :amount, :item_attributes, :starts_at, :ends_at
27934
+ attr_reader :price_book_key, :price_book_item_key, :item_number, :sku, :item_name, :amount, :item_attributes, :starts_at, :ends_at
27237
27935
 
27238
27936
  def initialize(incoming={})
27239
27937
  opts = HttpClient::Helper.symbolize_keys(incoming)
27240
- HttpClient::Preconditions.require_keys(opts, [:price_book_key, :price_book_item_key, :item_number, :item_name, :amount, :starts_at], 'CsvPriceBookItemExportRow')
27938
+ HttpClient::Preconditions.require_keys(opts, [:price_book_key, :price_book_item_key, :item_number, :sku, :item_name, :amount, :starts_at], 'CsvPriceBookItemExportRow')
27241
27939
  @price_book_key = HttpClient::Preconditions.assert_class('price_book_key', opts.delete(:price_book_key), String)
27242
27940
  @price_book_item_key = HttpClient::Preconditions.assert_class('price_book_item_key', opts.delete(:price_book_item_key), String)
27243
27941
  @item_number = HttpClient::Preconditions.assert_class('item_number', opts.delete(:item_number), String)
27942
+ @sku = HttpClient::Preconditions.assert_class('sku', opts.delete(:sku), String)
27244
27943
  @item_name = HttpClient::Preconditions.assert_class('item_name', opts.delete(:item_name), String)
27245
27944
  @amount = HttpClient::Preconditions.assert_class('amount', HttpClient::Helper.to_big_decimal(opts.delete(:amount)), BigDecimal)
27246
27945
  @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 })
@@ -27261,6 +27960,7 @@ module Io
27261
27960
  :price_book_key => price_book_key,
27262
27961
  :price_book_item_key => price_book_item_key,
27263
27962
  :item_number => item_number,
27963
+ :sku => sku,
27264
27964
  :item_name => item_name,
27265
27965
  :amount => amount.to_f.to_s,
27266
27966
  :item_attributes => item_attributes.nil? ? nil : item_attributes,
@@ -28241,11 +28941,12 @@ module Io
28241
28941
 
28242
28942
  class DeliveryItem
28243
28943
 
28244
- attr_reader :number, :quantity, :shipment_estimate, :price, :attributes, :center, :line_number
28944
+ attr_reader :id, :number, :quantity, :shipment_estimate, :price, :attributes, :center, :line_number
28245
28945
 
28246
28946
  def initialize(incoming={})
28247
28947
  opts = HttpClient::Helper.symbolize_keys(incoming)
28248
28948
  HttpClient::Preconditions.require_keys(opts, [:number, :quantity], 'DeliveryItem')
28949
+ @id = (x = opts.delete(:id); x.nil? ? nil : HttpClient::Preconditions.assert_class('id', x, String))
28249
28950
  @number = HttpClient::Preconditions.assert_class('number', opts.delete(:number), String)
28250
28951
  @quantity = HttpClient::Preconditions.assert_class('quantity', opts.delete(:quantity), Integer)
28251
28952
  @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)))
@@ -28265,6 +28966,7 @@ module Io
28265
28966
 
28266
28967
  def to_hash
28267
28968
  {
28969
+ :id => id,
28268
28970
  :number => number,
28269
28971
  :quantity => quantity,
28270
28972
  :shipment_estimate => shipment_estimate.nil? ? nil : shipment_estimate.to_hash,
@@ -28894,6 +29596,58 @@ module Io
28894
29596
 
28895
29597
  end
28896
29598
 
29599
+ # Result of looking up a specific tax registration number. Includes details of
29600
+ # both the consumer request and the VIES response.
29601
+ class DetailedTaxRegistration
29602
+
29603
+ 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
29604
+
29605
+ def initialize(incoming={})
29606
+ opts = HttpClient::Helper.symbolize_keys(incoming)
29607
+ HttpClient::Preconditions.require_keys(opts, [:id, :key, :number, :country, :success, :timestamp, :vies_result, :company_name_match_result], 'DetailedTaxRegistration')
29608
+ @id = HttpClient::Preconditions.assert_class('id', opts.delete(:id), String)
29609
+ @key = HttpClient::Preconditions.assert_class('key', opts.delete(:key), String)
29610
+ @consumer_company_name = (x = opts.delete(:consumer_company_name); x.nil? ? nil : HttpClient::Preconditions.assert_class('consumer_company_name', x, String))
29611
+ @number = HttpClient::Preconditions.assert_class('number', opts.delete(:number), String)
29612
+ @country = HttpClient::Preconditions.assert_class('country', opts.delete(:country), String)
29613
+ @success = HttpClient::Preconditions.assert_boolean('success', opts.delete(:success))
29614
+ @timestamp = HttpClient::Preconditions.assert_class('timestamp', HttpClient::Helper.to_date_time_iso8601(opts.delete(:timestamp)), DateTime)
29615
+ @vies_result = (x = opts.delete(:vies_result); x.is_a?(::Io::Flow::V0::Models::TaxVerificationResult) ? x : ::Io::Flow::V0::Models::TaxVerificationResult.apply(x))
29616
+ @vies_result_reason = (x = opts.delete(:vies_result_reason); x.nil? ? nil : HttpClient::Preconditions.assert_class('vies_result_reason', x, String))
29617
+ @vies_company_name = (x = opts.delete(:vies_company_name); x.nil? ? nil : HttpClient::Preconditions.assert_class('vies_company_name', x, String))
29618
+ @vies_company_address = (x = opts.delete(:vies_company_address); x.nil? ? nil : HttpClient::Preconditions.assert_class('vies_company_address', x, String))
29619
+ @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))
29620
+ @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))
29621
+ end
29622
+
29623
+ def to_json
29624
+ JSON.dump(to_hash)
29625
+ end
29626
+
29627
+ def copy(incoming={})
29628
+ DetailedTaxRegistration.new(to_hash.merge(HttpClient::Helper.symbolize_keys(incoming)))
29629
+ end
29630
+
29631
+ def to_hash
29632
+ {
29633
+ :id => id,
29634
+ :key => key,
29635
+ :consumer_company_name => consumer_company_name,
29636
+ :number => number,
29637
+ :country => country,
29638
+ :success => success,
29639
+ :timestamp => timestamp,
29640
+ :vies_result => vies_result.value,
29641
+ :vies_result_reason => vies_result_reason,
29642
+ :vies_company_name => vies_company_name,
29643
+ :vies_company_address => vies_company_address,
29644
+ :company_name_match_result => company_name_match_result.value,
29645
+ :company_name_match_result_reason => company_name_match_result_reason
29646
+ }
29647
+ end
29648
+
29649
+ end
29650
+
28897
29651
  # Represents a collection of items that are digitally available and do not
28898
29652
  # require a physical shipment
28899
29653
  class DigitalDelivery < Delivery
@@ -29091,7 +29845,7 @@ module Io
29091
29845
  # you can capture up to the amount of the authorization.
29092
29846
  class DirectAuthorizationForm < AuthorizationForm
29093
29847
 
29094
- attr_reader :token, :amount, :currency, :customer, :key, :cvv, :attributes, :destination, :billing_address, :ip, :options, :redirect_urls, :browser_info
29848
+ attr_reader :token, :amount, :currency, :customer, :key, :cvv, :attributes, :destination, :billing_address, :ip, :options, :redirect_urls, :browser_info, :action_configuration
29095
29849
 
29096
29850
  def initialize(incoming={})
29097
29851
  super(:discriminator => AuthorizationForm::Types::DIRECT_AUTHORIZATION_FORM)
@@ -29110,6 +29864,7 @@ module Io
29110
29864
  @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)) })
29111
29865
  @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)))
29112
29866
  @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)))
29867
+ @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)))
29113
29868
  end
29114
29869
 
29115
29870
  def to_json
@@ -29134,7 +29889,8 @@ module Io
29134
29889
  :ip => ip,
29135
29890
  :options => options.nil? ? nil : options.map { |o| o.value },
29136
29891
  :redirect_urls => redirect_urls.nil? ? nil : redirect_urls.to_hash,
29137
- :browser_info => browser_info.nil? ? nil : browser_info.to_hash
29892
+ :browser_info => browser_info.nil? ? nil : browser_info.to_hash,
29893
+ :action_configuration => action_configuration.nil? ? nil : action_configuration.to_hash
29138
29894
  }
29139
29895
  end
29140
29896
 
@@ -31966,13 +32722,12 @@ module Io
31966
32722
  # Indicates a field is required
31967
32723
  class FieldValidationRequired < FieldValidationRule
31968
32724
 
31969
- attr_reader :unused
32725
+ attr_reader :placeholder
31970
32726
 
31971
32727
  def initialize(incoming={})
31972
32728
  super(:discriminator => FieldValidationRule::Types::FIELD_VALIDATION_REQUIRED)
31973
32729
  opts = HttpClient::Helper.symbolize_keys(incoming)
31974
- HttpClient::Preconditions.require_keys(opts, [:unused], 'FieldValidationRequired')
31975
- @unused = HttpClient::Preconditions.assert_class('unused', opts.delete(:unused), String)
32730
+ @placeholder = (x = opts.delete(:placeholder); x.nil? ? nil : HttpClient::Preconditions.assert_class('placeholder', x, String))
31976
32731
  end
31977
32732
 
31978
32733
  def to_json
@@ -31985,7 +32740,7 @@ module Io
31985
32740
 
31986
32741
  def subtype_to_hash
31987
32742
  {
31988
- :unused => unused
32743
+ :placeholder => placeholder
31989
32744
  }
31990
32745
  end
31991
32746
 
@@ -33034,6 +33789,63 @@ module Io
33034
33789
 
33035
33790
  end
33036
33791
 
33792
+ class GraphqlRequest
33793
+
33794
+ attr_reader :query, :operation_name, :variables
33795
+
33796
+ def initialize(incoming={})
33797
+ opts = HttpClient::Helper.symbolize_keys(incoming)
33798
+ HttpClient::Preconditions.require_keys(opts, [:query], 'GraphqlRequest')
33799
+ @query = HttpClient::Preconditions.assert_class('query', opts.delete(:query), String)
33800
+ @operation_name = (x = opts.delete(:operation_name); x.nil? ? nil : HttpClient::Preconditions.assert_class('operation_name', x, String))
33801
+ @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 })
33802
+ end
33803
+
33804
+ def to_json
33805
+ JSON.dump(to_hash)
33806
+ end
33807
+
33808
+ def copy(incoming={})
33809
+ GraphqlRequest.new(to_hash.merge(HttpClient::Helper.symbolize_keys(incoming)))
33810
+ end
33811
+
33812
+ def to_hash
33813
+ {
33814
+ :query => query,
33815
+ :operation_name => operation_name,
33816
+ :variables => variables.nil? ? nil : variables
33817
+ }
33818
+ end
33819
+
33820
+ end
33821
+
33822
+ class GraphqlResponse
33823
+
33824
+ attr_reader :data, :errors
33825
+
33826
+ def initialize(incoming={})
33827
+ opts = HttpClient::Helper.symbolize_keys(incoming)
33828
+ @data = (x = opts.delete(:data); x.nil? ? nil : HttpClient::Preconditions.assert_class('data', HttpClient::Helper.to_object(x), Hash))
33829
+ @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) })
33830
+ end
33831
+
33832
+ def to_json
33833
+ JSON.dump(to_hash)
33834
+ end
33835
+
33836
+ def copy(incoming={})
33837
+ GraphqlResponse.new(to_hash.merge(HttpClient::Helper.symbolize_keys(incoming)))
33838
+ end
33839
+
33840
+ def to_hash
33841
+ {
33842
+ :data => data,
33843
+ :errors => errors.nil? ? nil : errors
33844
+ }
33845
+ end
33846
+
33847
+ end
33848
+
33037
33849
  class HarmonizationDocument < Document
33038
33850
 
33039
33851
  attr_reader :code, :categories, :origin
@@ -34908,12 +35720,12 @@ module Io
34908
35720
  # available
34909
35721
  class InventoryUnlimited < InventoryStrategy
34910
35722
 
34911
- attr_reader :quantity
35723
+ attr_reader :placeholder
34912
35724
 
34913
35725
  def initialize(incoming={})
34914
35726
  super(:discriminator => InventoryStrategy::Types::INVENTORY_UNLIMITED)
34915
35727
  opts = HttpClient::Helper.symbolize_keys(incoming)
34916
- @quantity = HttpClient::Preconditions.assert_class('quantity', (x = opts.delete(:quantity); x.nil? ? "unlimited" : x), String)
35728
+ @placeholder = HttpClient::Preconditions.assert_class('placeholder', (x = opts.delete(:placeholder); x.nil? ? "unlimited" : x), String)
34917
35729
  end
34918
35730
 
34919
35731
  def to_json
@@ -34926,7 +35738,7 @@ module Io
34926
35738
 
34927
35739
  def subtype_to_hash
34928
35740
  {
34929
- :quantity => quantity
35741
+ :placeholder => placeholder
34930
35742
  }
34931
35743
  end
34932
35744
 
@@ -36576,11 +37388,12 @@ module Io
36576
37388
  # Provides display data for a line item.
36577
37389
  class Line
36578
37390
 
36579
- attr_reader :item_number, :quantity, :price, :total, :attributes
37391
+ attr_reader :id, :item_number, :quantity, :price, :total, :attributes
36580
37392
 
36581
37393
  def initialize(incoming={})
36582
37394
  opts = HttpClient::Helper.symbolize_keys(incoming)
36583
37395
  HttpClient::Preconditions.require_keys(opts, [:item_number, :quantity, :price, :total], 'Line')
37396
+ @id = (x = opts.delete(:id); x.nil? ? nil : HttpClient::Preconditions.assert_class('id', x, String))
36584
37397
  @item_number = HttpClient::Preconditions.assert_class('item_number', opts.delete(:item_number), String)
36585
37398
  @quantity = HttpClient::Preconditions.assert_class('quantity', opts.delete(:quantity), Integer)
36586
37399
  @price = (x = opts.delete(:price); x.is_a?(::Io::Flow::V0::Models::PriceWithBase) ? x : ::Io::Flow::V0::Models::PriceWithBase.new(x))
@@ -36598,6 +37411,7 @@ module Io
36598
37411
 
36599
37412
  def to_hash
36600
37413
  {
37414
+ :id => id,
36601
37415
  :item_number => item_number,
36602
37416
  :quantity => quantity,
36603
37417
  :price => price.to_hash,
@@ -36647,6 +37461,32 @@ module Io
36647
37461
 
36648
37462
  end
36649
37463
 
37464
+ class LineItemAttributesForm
37465
+
37466
+ attr_reader :attributes
37467
+
37468
+ def initialize(incoming={})
37469
+ opts = HttpClient::Helper.symbolize_keys(incoming)
37470
+ HttpClient::Preconditions.require_keys(opts, [:attributes], 'LineItemAttributesForm')
37471
+ @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 }
37472
+ end
37473
+
37474
+ def to_json
37475
+ JSON.dump(to_hash)
37476
+ end
37477
+
37478
+ def copy(incoming={})
37479
+ LineItemAttributesForm.new(to_hash.merge(HttpClient::Helper.symbolize_keys(incoming)))
37480
+ end
37481
+
37482
+ def to_hash
37483
+ {
37484
+ :attributes => attributes
37485
+ }
37486
+ end
37487
+
37488
+ end
37489
+
36650
37490
  # Line items represent the items a consumer is purchasing, including additional
36651
37491
  # information to complete the transaction. Note that you may pass in as many
36652
37492
  # line items as you like - including repeating item numbers across line items.
@@ -36690,6 +37530,32 @@ module Io
36690
37530
 
36691
37531
  end
36692
37532
 
37533
+ class LineItemQuantityForm
37534
+
37535
+ attr_reader :quantity
37536
+
37537
+ def initialize(incoming={})
37538
+ opts = HttpClient::Helper.symbolize_keys(incoming)
37539
+ HttpClient::Preconditions.require_keys(opts, [:quantity], 'LineItemQuantityForm')
37540
+ @quantity = HttpClient::Preconditions.assert_class('quantity', opts.delete(:quantity), Integer)
37541
+ end
37542
+
37543
+ def to_json
37544
+ JSON.dump(to_hash)
37545
+ end
37546
+
37547
+ def copy(incoming={})
37548
+ LineItemQuantityForm.new(to_hash.merge(HttpClient::Helper.symbolize_keys(incoming)))
37549
+ end
37550
+
37551
+ def to_hash
37552
+ {
37553
+ :quantity => quantity
37554
+ }
37555
+ end
37556
+
37557
+ end
37558
+
36693
37559
  class Link
36694
37560
 
36695
37561
  attr_reader :url
@@ -37203,11 +38069,12 @@ module Io
37203
38069
  # Line items on the order, with localized pricing information
37204
38070
  class LocalizedLineItem
37205
38071
 
37206
- attr_reader :number, :name, :quantity, :center, :price, :discount, :discounts, :attributes, :local, :shipment_estimate, :price_source
38072
+ attr_reader :id, :number, :name, :quantity, :center, :price, :discount, :discounts, :attributes, :local, :shipment_estimate, :price_source
37207
38073
 
37208
38074
  def initialize(incoming={})
37209
38075
  opts = HttpClient::Helper.symbolize_keys(incoming)
37210
38076
  HttpClient::Preconditions.require_keys(opts, [:number, :name, :quantity, :local], 'LocalizedLineItem')
38077
+ @id = (x = opts.delete(:id); x.nil? ? nil : HttpClient::Preconditions.assert_class('id', x, String))
37211
38078
  @number = HttpClient::Preconditions.assert_class('number', opts.delete(:number), String)
37212
38079
  @name = HttpClient::Preconditions.assert_class('name', opts.delete(:name), String)
37213
38080
  @quantity = HttpClient::Preconditions.assert_class('quantity', opts.delete(:quantity), Integer)
@@ -37231,6 +38098,7 @@ module Io
37231
38098
 
37232
38099
  def to_hash
37233
38100
  {
38101
+ :id => id,
37234
38102
  :number => number,
37235
38103
  :name => name,
37236
38104
  :quantity => quantity,
@@ -38021,7 +38889,7 @@ module Io
38021
38889
  # you can capture up to the amount of the authorization
38022
38890
  class MerchantOfRecordAuthorizationForm < AuthorizationForm
38023
38891
 
38024
- attr_reader :token, :order_number, :amount, :currency, :key, :cvv, :attributes, :ip, :options, :redirect_urls, :browser_info
38892
+ attr_reader :token, :order_number, :amount, :currency, :key, :cvv, :attributes, :ip, :options, :redirect_urls, :browser_info, :action_configuration
38025
38893
 
38026
38894
  def initialize(incoming={})
38027
38895
  super(:discriminator => AuthorizationForm::Types::MERCHANT_OF_RECORD_AUTHORIZATION_FORM)
@@ -38038,6 +38906,7 @@ module Io
38038
38906
  @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)) })
38039
38907
  @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)))
38040
38908
  @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)))
38909
+ @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)))
38041
38910
  end
38042
38911
 
38043
38912
  def to_json
@@ -38060,7 +38929,8 @@ module Io
38060
38929
  :ip => ip,
38061
38930
  :options => options.nil? ? nil : options.map { |o| o.value },
38062
38931
  :redirect_urls => redirect_urls.nil? ? nil : redirect_urls.to_hash,
38063
- :browser_info => browser_info.nil? ? nil : browser_info.to_hash
38932
+ :browser_info => browser_info.nil? ? nil : browser_info.to_hash,
38933
+ :action_configuration => action_configuration.nil? ? nil : action_configuration.to_hash
38064
38934
  }
38065
38935
  end
38066
38936
 
@@ -39830,6 +40700,32 @@ module Io
39830
40700
 
39831
40701
  end
39832
40702
 
40703
+ class OrderNumberGeneratorGeneratedNumber
40704
+
40705
+ attr_reader :number
40706
+
40707
+ def initialize(incoming={})
40708
+ opts = HttpClient::Helper.symbolize_keys(incoming)
40709
+ HttpClient::Preconditions.require_keys(opts, [:number], 'OrderNumberGeneratorGeneratedNumber')
40710
+ @number = HttpClient::Preconditions.assert_class('number', opts.delete(:number), String)
40711
+ end
40712
+
40713
+ def to_json
40714
+ JSON.dump(to_hash)
40715
+ end
40716
+
40717
+ def copy(incoming={})
40718
+ OrderNumberGeneratorGeneratedNumber.new(to_hash.merge(HttpClient::Helper.symbolize_keys(incoming)))
40719
+ end
40720
+
40721
+ def to_hash
40722
+ {
40723
+ :number => number
40724
+ }
40725
+ end
40726
+
40727
+ end
40728
+
39833
40729
  # Hexadecimal generator generates a random string, starting with a letter, of a
39834
40730
  # given length
39835
40731
  class OrderNumberGeneratorHexadecimal < OrderNumberGenerator
@@ -40522,7 +41418,7 @@ module Io
40522
41418
 
40523
41419
  end
40524
41420
 
40525
- # Defines the data needed to attach an identifer to each order created by a
41421
+ # Defines the data needed to attach an identifier to each order created by a
40526
41422
  # checkout.
40527
41423
  class OrderSubmissionIdentifierForm
40528
41424
 
@@ -40558,7 +41454,7 @@ module Io
40558
41454
  # flattened to keys.
40559
41455
  class OrderSummary
40560
41456
 
40561
- attr_reader :number, :subtotal, :shipping, :tax, :duty, :insurance, :discount, :surcharges, :adjustment, :total, :lines, :identifiers
41457
+ attr_reader :number, :subtotal, :shipping, :tax, :duty, :insurance, :discount, :surcharges, :adjustment, :total, :lines, :identifiers, :attributes
40562
41458
 
40563
41459
  def initialize(incoming={})
40564
41460
  opts = HttpClient::Helper.symbolize_keys(incoming)
@@ -40575,6 +41471,7 @@ module Io
40575
41471
  @total = (x = opts.delete(:total); x.is_a?(::Io::Flow::V0::Models::OrderSummaryPriceDetail) ? x : ::Io::Flow::V0::Models::OrderSummaryPriceDetail.new(x))
40576
41472
  @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)) }
40577
41473
  @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 })
41474
+ @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 })
40578
41475
  end
40579
41476
 
40580
41477
  def to_json
@@ -40598,7 +41495,8 @@ module Io
40598
41495
  :adjustment => adjustment.nil? ? nil : adjustment.to_hash,
40599
41496
  :total => total.to_hash,
40600
41497
  :lines => lines.map { |o| o.to_hash },
40601
- :identifiers => identifiers.nil? ? nil : identifiers
41498
+ :identifiers => identifiers.nil? ? nil : identifiers,
41499
+ :attributes => attributes.nil? ? nil : attributes
40602
41500
  }
40603
41501
  end
40604
41502
 
@@ -40706,11 +41604,12 @@ module Io
40706
41604
 
40707
41605
  class OrderSummaryLineItem
40708
41606
 
40709
- attr_reader :item, :quantity, :discount, :tax, :duty, :total, :price_attributes
41607
+ attr_reader :id, :item, :quantity, :discount, :tax, :duty, :total, :price_attributes, :attributes
40710
41608
 
40711
41609
  def initialize(incoming={})
40712
41610
  opts = HttpClient::Helper.symbolize_keys(incoming)
40713
41611
  HttpClient::Preconditions.require_keys(opts, [:item, :quantity, :total, :price_attributes], 'OrderSummaryLineItem')
41612
+ @id = (x = opts.delete(:id); x.nil? ? nil : HttpClient::Preconditions.assert_class('id', x, String))
40714
41613
  @item = (x = opts.delete(:item); x.is_a?(::Io::Flow::V0::Models::OrderSummaryItem) ? x : ::Io::Flow::V0::Models::OrderSummaryItem.new(x))
40715
41614
  @quantity = HttpClient::Preconditions.assert_class('quantity', opts.delete(:quantity), Integer)
40716
41615
  @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)))
@@ -40718,6 +41617,7 @@ module Io
40718
41617
  @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)))
40719
41618
  @total = (x = opts.delete(:total); x.is_a?(::Io::Flow::V0::Models::Price) ? x : ::Io::Flow::V0::Models::Price.new(x))
40720
41619
  @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 }
41620
+ @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 })
40721
41621
  end
40722
41622
 
40723
41623
  def to_json
@@ -40730,13 +41630,15 @@ module Io
40730
41630
 
40731
41631
  def to_hash
40732
41632
  {
41633
+ :id => id,
40733
41634
  :item => item.to_hash,
40734
41635
  :quantity => quantity,
40735
41636
  :discount => discount.nil? ? nil : discount.to_hash,
40736
41637
  :tax => tax.nil? ? nil : tax.to_hash,
40737
41638
  :duty => duty.nil? ? nil : duty.to_hash,
40738
41639
  :total => total.to_hash,
40739
- :price_attributes => price_attributes.inject({}) { |hash, o| hash[o[0]] = o[1].nil? ? nil : o[1].to_hash; hash }
41640
+ :price_attributes => price_attributes.inject({}) { |hash, o| hash[o[0]] = o[1].nil? ? nil : o[1].to_hash; hash },
41641
+ :attributes => attributes.nil? ? nil : attributes
40740
41642
  }
40741
41643
  end
40742
41644
 
@@ -43119,7 +44021,7 @@ module Io
43119
44021
  # collection of items, and metadata about those options
43120
44022
  class PhysicalDelivery < Delivery
43121
44023
 
43122
- attr_reader :id, :key, :center, :items, :options, :special_services, :prices, :total, :goods_supply
44024
+ attr_reader :id, :key, :center, :items, :options, :special_services, :prices, :total, :goods_supply, :merchant_of_record_flow_entity
43123
44025
 
43124
44026
  def initialize(incoming={})
43125
44027
  super(:discriminator => Delivery::Types::PHYSICAL_DELIVERY)
@@ -43134,6 +44036,7 @@ module Io
43134
44036
  @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)) })
43135
44037
  @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)))
43136
44038
  @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)))
44039
+ @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)))
43137
44040
  end
43138
44041
 
43139
44042
  def to_json
@@ -43154,7 +44057,8 @@ module Io
43154
44057
  :special_services => special_services.nil? ? nil : special_services.map { |o| o.value },
43155
44058
  :prices => prices.nil? ? nil : prices.map { |o| o.to_hash },
43156
44059
  :total => total.nil? ? nil : total.to_hash,
43157
- :goods_supply => goods_supply.nil? ? nil : goods_supply.value
44060
+ :goods_supply => goods_supply.nil? ? nil : goods_supply.value,
44061
+ :merchant_of_record_flow_entity => merchant_of_record_flow_entity.nil? ? nil : merchant_of_record_flow_entity.value
43158
44062
  }
43159
44063
  end
43160
44064
 
@@ -43402,7 +44306,7 @@ module Io
43402
44306
  # export
43403
44307
  class PriceBookItemExportType < ExportType
43404
44308
 
43405
- attr_reader :price_book_key, :item_numbers, :start_date, :end_date
44309
+ attr_reader :price_book_key, :item_numbers, :start_date, :end_date, :item_identifier
43406
44310
 
43407
44311
  def initialize(incoming={})
43408
44312
  super(:discriminator => ExportType::Types::PRICE_BOOK_ITEM_EXPORT_TYPE)
@@ -43411,6 +44315,7 @@ module Io
43411
44315
  @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) })
43412
44316
  @start_date = (x = opts.delete(:start_date); x.nil? ? nil : HttpClient::Preconditions.assert_class('start_date', HttpClient::Helper.to_date_time_iso8601(x), DateTime))
43413
44317
  @end_date = (x = opts.delete(:end_date); x.nil? ? nil : HttpClient::Preconditions.assert_class('end_date', HttpClient::Helper.to_date_time_iso8601(x), DateTime))
44318
+ @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))
43414
44319
  end
43415
44320
 
43416
44321
  def to_json
@@ -43426,7 +44331,8 @@ module Io
43426
44331
  :price_book_key => price_book_key,
43427
44332
  :item_numbers => item_numbers.nil? ? nil : item_numbers,
43428
44333
  :start_date => start_date,
43429
- :end_date => end_date
44334
+ :end_date => end_date,
44335
+ :item_identifier => item_identifier.value
43430
44336
  }
43431
44337
  end
43432
44338
 
@@ -51988,6 +52894,158 @@ module Io
51988
52894
 
51989
52895
  end
51990
52896
 
52897
+ # Information necessary to perform a 3ds Challenge action inline to the user
52898
+ # experience.
52899
+ class ThreedsChallengeActionDetails < AuthorizationResultActionDetails
52900
+
52901
+ attr_reader :threeds_challenge_action, :expires_at
52902
+
52903
+ def initialize(incoming={})
52904
+ super(:discriminator => AuthorizationResultActionDetails::Types::THREEDS_CHALLENGE_ACTION_DETAILS)
52905
+ opts = HttpClient::Helper.symbolize_keys(incoming)
52906
+ HttpClient::Preconditions.require_keys(opts, [:threeds_challenge_action, :expires_at], 'ThreedsChallengeActionDetails')
52907
+ @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))
52908
+ @expires_at = HttpClient::Preconditions.assert_class('expires_at', HttpClient::Helper.to_date_time_iso8601(opts.delete(:expires_at)), DateTime)
52909
+ end
52910
+
52911
+ def to_json
52912
+ JSON.dump(to_hash)
52913
+ end
52914
+
52915
+ def copy(incoming={})
52916
+ ThreedsChallengeActionDetails.new(subtype_to_hash.merge(HttpClient::Helper.symbolize_keys(incoming)))
52917
+ end
52918
+
52919
+ def subtype_to_hash
52920
+ {
52921
+ :threeds_challenge_action => threeds_challenge_action.to_hash,
52922
+ :expires_at => expires_at
52923
+ }
52924
+ end
52925
+
52926
+ end
52927
+
52928
+ # Information necessary to perform a 3ds Identify action inline to the user
52929
+ # experience.
52930
+ class ThreedsIdentifyActionDetails < AuthorizationResultActionDetails
52931
+
52932
+ attr_reader :threeds_identify_action, :expires_at
52933
+
52934
+ def initialize(incoming={})
52935
+ super(:discriminator => AuthorizationResultActionDetails::Types::THREEDS_IDENTIFY_ACTION_DETAILS)
52936
+ opts = HttpClient::Helper.symbolize_keys(incoming)
52937
+ HttpClient::Preconditions.require_keys(opts, [:threeds_identify_action, :expires_at], 'ThreedsIdentifyActionDetails')
52938
+ @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))
52939
+ @expires_at = HttpClient::Preconditions.assert_class('expires_at', HttpClient::Helper.to_date_time_iso8601(opts.delete(:expires_at)), DateTime)
52940
+ end
52941
+
52942
+ def to_json
52943
+ JSON.dump(to_hash)
52944
+ end
52945
+
52946
+ def copy(incoming={})
52947
+ ThreedsIdentifyActionDetails.new(subtype_to_hash.merge(HttpClient::Helper.symbolize_keys(incoming)))
52948
+ end
52949
+
52950
+ def subtype_to_hash
52951
+ {
52952
+ :threeds_identify_action => threeds_identify_action.to_hash,
52953
+ :expires_at => expires_at
52954
+ }
52955
+ end
52956
+
52957
+ end
52958
+
52959
+ # Instructions to the card issuer to render challenges to the user
52960
+ class ThreedsTwoBrowserActionConfiguration < ActionConfiguration
52961
+
52962
+ attr_reader :viewport
52963
+
52964
+ def initialize(incoming={})
52965
+ super(:discriminator => ActionConfiguration::Types::THREEDS_TWO_BROWSER_ACTION_CONFIGURATION)
52966
+ opts = HttpClient::Helper.symbolize_keys(incoming)
52967
+ @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))
52968
+ end
52969
+
52970
+ def to_json
52971
+ JSON.dump(to_hash)
52972
+ end
52973
+
52974
+ def copy(incoming={})
52975
+ ThreedsTwoBrowserActionConfiguration.new(subtype_to_hash.merge(HttpClient::Helper.symbolize_keys(incoming)))
52976
+ end
52977
+
52978
+ def subtype_to_hash
52979
+ {
52980
+ :viewport => viewport.value
52981
+ }
52982
+ end
52983
+
52984
+ end
52985
+
52986
+ # Data that must be passed to the 3DS Client to help the issuer ACS render a
52987
+ # challenge for the user.
52988
+ class ThreedsTwoChallengeRequest < ThreedsChallengeAction
52989
+
52990
+ attr_reader :acs_url, :challenge_request, :session_data
52991
+
52992
+ def initialize(incoming={})
52993
+ super(:discriminator => ThreedsChallengeAction::Types::THREEDS_TWO_CHALLENGE_REQUEST)
52994
+ opts = HttpClient::Helper.symbolize_keys(incoming)
52995
+ HttpClient::Preconditions.require_keys(opts, [:acs_url, :challenge_request], 'ThreedsTwoChallengeRequest')
52996
+ @acs_url = HttpClient::Preconditions.assert_class('acs_url', opts.delete(:acs_url), String)
52997
+ @challenge_request = HttpClient::Preconditions.assert_class('challenge_request', opts.delete(:challenge_request), String)
52998
+ @session_data = (x = opts.delete(:session_data); x.nil? ? nil : HttpClient::Preconditions.assert_class('session_data', x, String))
52999
+ end
53000
+
53001
+ def to_json
53002
+ JSON.dump(to_hash)
53003
+ end
53004
+
53005
+ def copy(incoming={})
53006
+ ThreedsTwoChallengeRequest.new(subtype_to_hash.merge(HttpClient::Helper.symbolize_keys(incoming)))
53007
+ end
53008
+
53009
+ def subtype_to_hash
53010
+ {
53011
+ :acs_url => acs_url,
53012
+ :challenge_request => challenge_request,
53013
+ :session_data => session_data
53014
+ }
53015
+ end
53016
+
53017
+ end
53018
+
53019
+ # Data that must be rendered by the 3DS Client in order to help the issuer ACS
53020
+ # silently identify the user. This format doesn't decompose the ACS identify
53021
+ # method.
53022
+ class ThreedsTwoMethod < ThreedsIdentifyAction
53023
+
53024
+ attr_reader :method
53025
+
53026
+ def initialize(incoming={})
53027
+ super(:discriminator => ThreedsIdentifyAction::Types::THREEDS_TWO_METHOD)
53028
+ opts = HttpClient::Helper.symbolize_keys(incoming)
53029
+ HttpClient::Preconditions.require_keys(opts, [:method], 'ThreedsTwoMethod')
53030
+ @method = HttpClient::Preconditions.assert_class('method', opts.delete(:method), String)
53031
+ end
53032
+
53033
+ def to_json
53034
+ JSON.dump(to_hash)
53035
+ end
53036
+
53037
+ def copy(incoming={})
53038
+ ThreedsTwoMethod.new(subtype_to_hash.merge(HttpClient::Helper.symbolize_keys(incoming)))
53039
+ end
53040
+
53041
+ def subtype_to_hash
53042
+ {
53043
+ :method => method
53044
+ }
53045
+ end
53046
+
53047
+ end
53048
+
51991
53049
  # Service shipping tier available in this tier group. e.g. Standard tier,
51992
53050
  # Express tier, Economy tier
51993
53051
  class Tier
@@ -54492,7 +55550,7 @@ module Io
54492
55550
  end
54493
55551
 
54494
55552
  def Helper.to_big_decimal(value)
54495
- value ? BigDecimal.new(value.to_s) : nil
55553
+ value ? BigDecimal(value.to_s) : nil
54496
55554
  end
54497
55555
 
54498
55556
  def Helper.to_object(value)