flowcommerce 0.2.64 → 0.2.65

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: ace4f9d944adf91e60b2e2c9c4c9b61e1d511c19
4
- data.tar.gz: a06c7e68823b28ca5513761f3f7a89e441b641cf
3
+ metadata.gz: fdcb95be3b26af8394419dd0903e53694837f523
4
+ data.tar.gz: cee1a53edc4753818ef8a22956e6e51d9acb9d7a
5
5
  SHA512:
6
- metadata.gz: e8b22f46e6d80e4a1f548281623c0d14edadc0037997813e214f1b97eee48a560bd7b5b38b0e9069c2b638e5efaf0048166cf9cc104c796d7be5a8d2e5a904d5
7
- data.tar.gz: 3b29554264674b3ec100fe781a42a7905ac008f4874a48ccdbf9583f3516d6bdc9c5b6e07bb0db16aa88ec20f097e0fbcff0a6deb5b78b5093c7b6f98fc8da64
6
+ metadata.gz: 18b558c237da0681b3cacf56fd14fc1943c4b8cbeb4b7a7817c90003deae2800c12593f77d4f3db35e8c220ec91dd1cd80a3f01c890145d926408d4d57068ff3
7
+ data.tar.gz: 07ef712e1e5f345f7bda5afde517ccc6b87d5eb44765cb64ce7ef24617c368fed03296a43aeba734e49d77291ff8213415d7369b9c2f7f9f43c05465fe8676b5
@@ -1,6 +1,6 @@
1
1
  # Generated by API Builder - https://www.apibuilder.io
2
- # Service version: 0.5.59
3
- # apibuilder 0.14.3 app.apibuilder.io/flow/api/0.5.62/ruby_client
2
+ # Service version: 0.5.84
3
+ # apibuilder 0.14.3 app.apibuilder.io/flow/api/0.5.89/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.14.3 app.apibuilder.io/flow/api/0.5.62/ruby_client' unless defined?(Constants::USER_AGENT)
29
- VERSION = '0.5.59' unless defined?(Constants::VERSION)
28
+ USER_AGENT = 'apibuilder 0.14.3 app.apibuilder.io/flow/api/0.5.89/ruby_client' unless defined?(Constants::USER_AGENT)
29
+ VERSION = '0.5.84' unless defined?(Constants::VERSION)
30
30
  VERSION_MAJOR = 0 unless defined?(VERSION_MAJOR)
31
31
 
32
32
  end
@@ -96,6 +96,10 @@ module Io
96
96
  @experience_defaults ||= ::Io::Flow::V0::Clients::ExperienceDefaults.new(self)
97
97
  end
98
98
 
99
+ def experience_logistics_settings
100
+ @experience_logistics_settings ||= ::Io::Flow::V0::Clients::ExperienceLogisticsSettings.new(self)
101
+ end
102
+
99
103
  def items
100
104
  @items ||= ::Io::Flow::V0::Clients::Items.new(self)
101
105
  end
@@ -204,6 +208,10 @@ module Io
204
208
  @tariff_codes ||= ::Io::Flow::V0::Clients::TariffCodes.new(self)
205
209
  end
206
210
 
211
+ def tax_registrations
212
+ @tax_registrations ||= ::Io::Flow::V0::Clients::TaxRegistrations.new(self)
213
+ end
214
+
207
215
  def authorizations
208
216
  @authorizations ||= ::Io::Flow::V0::Clients::Authorizations.new(self)
209
217
  end
@@ -376,8 +384,8 @@ module Io
376
384
  @consumer_invoices ||= ::Io::Flow::V0::Clients::ConsumerInvoices.new(self)
377
385
  end
378
386
 
379
- def consumer_invoice_urls
380
- @consumer_invoice_urls ||= ::Io::Flow::V0::Clients::ConsumerInvoiceUrls.new(self)
387
+ def consumer_invoice_documents
388
+ @consumer_invoice_documents ||= ::Io::Flow::V0::Clients::ConsumerInvoiceDocuments.new(self)
381
389
  end
382
390
 
383
391
  def documents
@@ -456,6 +464,10 @@ module Io
456
464
  @session_authorizations ||= ::Io::Flow::V0::Clients::SessionAuthorizations.new(self)
457
465
  end
458
466
 
467
+ def shopify_carts
468
+ @shopify_carts ||= ::Io::Flow::V0::Clients::ShopifyCarts.new(self)
469
+ end
470
+
459
471
  def shopify_private_apps
460
472
  @shopify_private_apps ||= ::Io::Flow::V0::Clients::ShopifyPrivateApps.new(self)
461
473
  end
@@ -1144,6 +1156,29 @@ module Io
1144
1156
 
1145
1157
  end
1146
1158
 
1159
+ class ExperienceLogisticsSettings
1160
+
1161
+ def initialize(client)
1162
+ @client = HttpClient::Preconditions.assert_class('client', client, ::Io::Flow::V0::Client)
1163
+ end
1164
+
1165
+ def get(organization, experience_key)
1166
+ HttpClient::Preconditions.assert_class('organization', organization, String)
1167
+ HttpClient::Preconditions.assert_class('experience_key', experience_key, String)
1168
+ r = @client.request("/#{CGI.escape(organization)}/experiences/#{CGI.escape(experience_key)}/settings/logistics").get
1169
+ ::Io::Flow::V0::Models::ExperienceLogisticsSettings.new(r)
1170
+ end
1171
+
1172
+ def put(organization, experience_key, experience_logistics_settings_put_form)
1173
+ HttpClient::Preconditions.assert_class('organization', organization, String)
1174
+ HttpClient::Preconditions.assert_class('experience_key', experience_key, String)
1175
+ (x = experience_logistics_settings_put_form; x.is_a?(::Io::Flow::V0::Models::ExperienceLogisticsSettingsPutForm) ? x : ::Io::Flow::V0::Models::ExperienceLogisticsSettingsPutForm.new(x))
1176
+ r = @client.request("/#{CGI.escape(organization)}/experiences/#{CGI.escape(experience_key)}/settings/logistics").with_json(experience_logistics_settings_put_form.to_json).put
1177
+ ::Io::Flow::V0::Models::ExperienceLogisticsSettings.new(r)
1178
+ end
1179
+
1180
+ end
1181
+
1147
1182
  class Items
1148
1183
 
1149
1184
  def initialize(client)
@@ -1240,6 +1275,7 @@ module Io
1240
1275
  :identifier => (x = opts.delete(:identifier); x.nil? ? nil : HttpClient::Preconditions.assert_class('identifier', x, String)),
1241
1276
  :status => (x = opts.delete(:status); x.nil? ? nil : (x = x; x.is_a?(::Io::Flow::V0::Models::OrderStatus) ? x : ::Io::Flow::V0::Models::OrderStatus.apply(x)).value),
1242
1277
  :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)),
1278
+ :romanize => (x = opts.delete(:romanize); x.nil? ? nil : HttpClient::Preconditions.assert_class('romanize', x, Array).map { |v| HttpClient::Preconditions.assert_class('romanize', v, String) }),
1243
1279
  :limit => HttpClient::Preconditions.assert_class('limit', (x = opts.delete(:limit); x.nil? ? 25 : x), Integer),
1244
1280
  :offset => HttpClient::Preconditions.assert_class('offset', (x = opts.delete(:offset); x.nil? ? 0 : x), Integer),
1245
1281
  :sort => HttpClient::Preconditions.assert_class('sort', (x = opts.delete(:sort); x.nil? ? "-created_at" : x), String),
@@ -1261,7 +1297,8 @@ module Io
1261
1297
  :ip => (x = opts.delete(:ip); x.nil? ? nil : HttpClient::Preconditions.assert_class('ip', x, String)),
1262
1298
  :currency => (x = opts.delete(:currency); x.nil? ? nil : HttpClient::Preconditions.assert_class('currency', x, String)),
1263
1299
  :language => (x = opts.delete(:language); x.nil? ? nil : HttpClient::Preconditions.assert_class('language', x, String)),
1264
- :expand => (x = opts.delete(:expand); x.nil? ? nil : HttpClient::Preconditions.assert_class('expand', x, Array).map { |v| HttpClient::Preconditions.assert_class('expand', v, String) })
1300
+ :expand => (x = opts.delete(:expand); x.nil? ? nil : HttpClient::Preconditions.assert_class('expand', x, Array).map { |v| HttpClient::Preconditions.assert_class('expand', v, String) }),
1301
+ :romanize => (x = opts.delete(:romanize); x.nil? ? nil : HttpClient::Preconditions.assert_class('romanize', x, Array).map { |v| HttpClient::Preconditions.assert_class('romanize', v, String) })
1265
1302
  }.delete_if { |k, v| v.nil? }
1266
1303
  (x = order_form; x.is_a?(::Io::Flow::V0::Models::OrderForm) ? x : ::Io::Flow::V0::Models::OrderForm.new(x))
1267
1304
  r = @client.request("/#{CGI.escape(organization)}/orders").with_query(query).with_json(order_form.to_json).post
@@ -1302,7 +1339,8 @@ module Io
1302
1339
  HttpClient::Preconditions.assert_class('number', number, String)
1303
1340
  opts = HttpClient::Helper.symbolize_keys(incoming)
1304
1341
  query = {
1305
- :expand => (x = opts.delete(:expand); x.nil? ? nil : HttpClient::Preconditions.assert_class('expand', x, Array).map { |v| HttpClient::Preconditions.assert_class('expand', v, String) })
1342
+ :expand => (x = opts.delete(:expand); x.nil? ? nil : HttpClient::Preconditions.assert_class('expand', x, Array).map { |v| HttpClient::Preconditions.assert_class('expand', v, String) }),
1343
+ :romanize => (x = opts.delete(:romanize); x.nil? ? nil : HttpClient::Preconditions.assert_class('romanize', x, Array).map { |v| HttpClient::Preconditions.assert_class('romanize', v, String) })
1306
1344
  }.delete_if { |k, v| v.nil? }
1307
1345
  r = @client.request("/#{CGI.escape(organization)}/orders/#{CGI.escape(number)}").with_query(query).get
1308
1346
  ::Io::Flow::V0::Models::Order.new(r)
@@ -1321,7 +1359,8 @@ module Io
1321
1359
  :ip => (x = opts.delete(:ip); x.nil? ? nil : HttpClient::Preconditions.assert_class('ip', x, String)),
1322
1360
  :currency => (x = opts.delete(:currency); x.nil? ? nil : HttpClient::Preconditions.assert_class('currency', x, String)),
1323
1361
  :language => (x = opts.delete(:language); x.nil? ? nil : HttpClient::Preconditions.assert_class('language', x, String)),
1324
- :expand => (x = opts.delete(:expand); x.nil? ? nil : HttpClient::Preconditions.assert_class('expand', x, Array).map { |v| HttpClient::Preconditions.assert_class('expand', v, String) })
1362
+ :expand => (x = opts.delete(:expand); x.nil? ? nil : HttpClient::Preconditions.assert_class('expand', x, Array).map { |v| HttpClient::Preconditions.assert_class('expand', v, String) }),
1363
+ :romanize => (x = opts.delete(:romanize); x.nil? ? nil : HttpClient::Preconditions.assert_class('romanize', x, Array).map { |v| HttpClient::Preconditions.assert_class('romanize', v, String) })
1325
1364
  }.delete_if { |k, v| v.nil? }
1326
1365
  (x = order_put_form; x.is_a?(::Io::Flow::V0::Models::OrderPutForm) ? x : ::Io::Flow::V0::Models::OrderPutForm.new(x))
1327
1366
  r = @client.request("/#{CGI.escape(organization)}/orders/#{CGI.escape(number)}").with_query(query).with_json(order_put_form.to_json).put
@@ -1411,6 +1450,16 @@ module Io
1411
1450
  ::Io::Flow::V0::Models::Order.new(r)
1412
1451
  end
1413
1452
 
1453
+ # Validates a tax registration number, proxying to underlying services and
1454
+ # recording the result on the order.
1455
+ def put_tax_and_registration_by_number(organization, number, tax_registration_form)
1456
+ HttpClient::Preconditions.assert_class('organization', organization, String)
1457
+ HttpClient::Preconditions.assert_class('number', number, String)
1458
+ (x = tax_registration_form; x.is_a?(::Io::Flow::V0::Models::TaxRegistrationForm) ? x : ::Io::Flow::V0::Models::TaxRegistrationForm.new(x))
1459
+ r = @client.request("/#{CGI.escape(organization)}/orders/#{CGI.escape(number)}/tax/registration").with_json(tax_registration_form.to_json).put
1460
+ ::Io::Flow::V0::Models::TaxRegistration.new(r)
1461
+ end
1462
+
1414
1463
  # Returns the current fraud status for this order
1415
1464
  def get_status_and_fraud_by_number(organization, number)
1416
1465
  HttpClient::Preconditions.assert_class('organization', organization, String)
@@ -1419,7 +1468,7 @@ module Io
1419
1468
  ::Io::Flow::V0::Models::OrderFraudStatus.new(r)
1420
1469
  end
1421
1470
 
1422
- # Generate a shipping label given only an order number for the organziation.
1471
+ # Generate a shipping label given only an order number for the organization.
1423
1472
  # This will assume all items in the order will be shipped and that there are
1424
1473
  # no updates to the contact or destination address information.
1425
1474
  def post_labels_by_number(organization, number)
@@ -1544,7 +1593,8 @@ module Io
1544
1593
  :ip => (x = opts.delete(:ip); x.nil? ? nil : HttpClient::Preconditions.assert_class('ip', x, String)),
1545
1594
  :currency => (x = opts.delete(:currency); x.nil? ? nil : HttpClient::Preconditions.assert_class('currency', x, String)),
1546
1595
  :language => (x = opts.delete(:language); x.nil? ? nil : HttpClient::Preconditions.assert_class('language', x, String)),
1547
- :expand => (x = opts.delete(:expand); x.nil? ? nil : HttpClient::Preconditions.assert_class('expand', x, Array).map { |v| HttpClient::Preconditions.assert_class('expand', v, String) })
1596
+ :expand => (x = opts.delete(:expand); x.nil? ? nil : HttpClient::Preconditions.assert_class('expand', x, Array).map { |v| HttpClient::Preconditions.assert_class('expand', v, String) }),
1597
+ :romanize => (x = opts.delete(:romanize); x.nil? ? nil : HttpClient::Preconditions.assert_class('romanize', x, Array).map { |v| HttpClient::Preconditions.assert_class('romanize', v, String) })
1548
1598
  }.delete_if { |k, v| v.nil? }
1549
1599
  (x = order_estimate_form; x.is_a?(::Io::Flow::V0::Models::OrderEstimateForm) ? x : ::Io::Flow::V0::Models::OrderEstimateForm.new(x))
1550
1600
  r = @client.request("/#{CGI.escape(organization)}/order-estimates").with_query(query).with_json(order_estimate_form.to_json).post
@@ -1556,7 +1606,8 @@ module Io
1556
1606
  HttpClient::Preconditions.assert_class('number', number, String)
1557
1607
  opts = HttpClient::Helper.symbolize_keys(incoming)
1558
1608
  query = {
1559
- :expand => (x = opts.delete(:expand); x.nil? ? nil : HttpClient::Preconditions.assert_class('expand', x, Array).map { |v| HttpClient::Preconditions.assert_class('expand', v, String) })
1609
+ :expand => (x = opts.delete(:expand); x.nil? ? nil : HttpClient::Preconditions.assert_class('expand', x, Array).map { |v| HttpClient::Preconditions.assert_class('expand', v, String) }),
1610
+ :romanize => (x = opts.delete(:romanize); x.nil? ? nil : HttpClient::Preconditions.assert_class('romanize', x, Array).map { |v| HttpClient::Preconditions.assert_class('romanize', v, String) })
1560
1611
  }.delete_if { |k, v| v.nil? }
1561
1612
  r = @client.request("/#{CGI.escape(organization)}/order-estimates/#{CGI.escape(number)}").with_query(query).get
1562
1613
  ::Io::Flow::V0::Models::Experience.new(r)
@@ -1572,7 +1623,8 @@ module Io
1572
1623
  :ip => (x = opts.delete(:ip); x.nil? ? nil : HttpClient::Preconditions.assert_class('ip', x, String)),
1573
1624
  :currency => (x = opts.delete(:currency); x.nil? ? nil : HttpClient::Preconditions.assert_class('currency', x, String)),
1574
1625
  :language => (x = opts.delete(:language); x.nil? ? nil : HttpClient::Preconditions.assert_class('language', x, String)),
1575
- :expand => (x = opts.delete(:expand); x.nil? ? nil : HttpClient::Preconditions.assert_class('expand', x, Array).map { |v| HttpClient::Preconditions.assert_class('expand', v, String) })
1626
+ :expand => (x = opts.delete(:expand); x.nil? ? nil : HttpClient::Preconditions.assert_class('expand', x, Array).map { |v| HttpClient::Preconditions.assert_class('expand', v, String) }),
1627
+ :romanize => (x = opts.delete(:romanize); x.nil? ? nil : HttpClient::Preconditions.assert_class('romanize', x, Array).map { |v| HttpClient::Preconditions.assert_class('romanize', v, String) })
1576
1628
  }.delete_if { |k, v| v.nil? }
1577
1629
  (x = order_estimate_form; x.is_a?(::Io::Flow::V0::Models::OrderEstimateForm) ? x : ::Io::Flow::V0::Models::OrderEstimateForm.new(x))
1578
1630
  r = @client.request("/#{CGI.escape(organization)}/order-estimates/#{CGI.escape(number)}").with_query(query).with_json(order_estimate_form.to_json).put
@@ -2889,6 +2941,29 @@ module Io
2889
2941
 
2890
2942
  end
2891
2943
 
2944
+ class TaxRegistrations
2945
+
2946
+ def initialize(client)
2947
+ @client = HttpClient::Preconditions.assert_class('client', client, ::Io::Flow::V0::Client)
2948
+ end
2949
+
2950
+ def post(organization, tax_registration_form)
2951
+ HttpClient::Preconditions.assert_class('organization', organization, String)
2952
+ (x = tax_registration_form; x.is_a?(::Io::Flow::V0::Models::TaxRegistrationForm) ? x : ::Io::Flow::V0::Models::TaxRegistrationForm.new(x))
2953
+ r = @client.request("/#{CGI.escape(organization)}/tax/registrations").with_json(tax_registration_form.to_json).post
2954
+ ::Io::Flow::V0::Models::TaxRegistration.new(r)
2955
+ end
2956
+
2957
+ def put_by_key(organization, key, tax_registration_form)
2958
+ HttpClient::Preconditions.assert_class('organization', organization, String)
2959
+ HttpClient::Preconditions.assert_class('key', key, String)
2960
+ (x = tax_registration_form; x.is_a?(::Io::Flow::V0::Models::TaxRegistrationForm) ? x : ::Io::Flow::V0::Models::TaxRegistrationForm.new(x))
2961
+ r = @client.request("/#{CGI.escape(organization)}/tax/registrations/#{CGI.escape(key)}").with_json(tax_registration_form.to_json).put
2962
+ ::Io::Flow::V0::Models::TaxRegistration.new(r)
2963
+ end
2964
+
2965
+ end
2966
+
2892
2967
  class Authorizations
2893
2968
 
2894
2969
  def initialize(client)
@@ -3060,6 +3135,39 @@ module Io
3060
3135
  ::Io::Flow::V0::Models::Capture.new(r)
3061
3136
  end
3062
3137
 
3138
+ def get_identifiers_by_key(organization, key, incoming={})
3139
+ HttpClient::Preconditions.assert_class('organization', organization, String)
3140
+ HttpClient::Preconditions.assert_class('key', key, String)
3141
+ opts = HttpClient::Helper.symbolize_keys(incoming)
3142
+ query = {
3143
+ :id => (x = opts.delete(:id); x.nil? ? nil : HttpClient::Preconditions.assert_class('id', x, Array).map { |v| HttpClient::Preconditions.assert_class('id', v, String) }),
3144
+ :identifier => (x = opts.delete(:identifier); x.nil? ? nil : HttpClient::Preconditions.assert_class('identifier', x, String)),
3145
+ :limit => HttpClient::Preconditions.assert_class('limit', (x = opts.delete(:limit); x.nil? ? 25 : x), Integer),
3146
+ :offset => HttpClient::Preconditions.assert_class('offset', (x = opts.delete(:offset); x.nil? ? 0 : x), Integer),
3147
+ :sort => HttpClient::Preconditions.assert_class('sort', (x = opts.delete(:sort); x.nil? ? "-created_at" : x), String)
3148
+ }.delete_if { |k, v| v.nil? }
3149
+ r = @client.request("/#{CGI.escape(organization)}/captures/#{CGI.escape(key)}/identifiers").with_query(query).get
3150
+ r.map { |x| ::Io::Flow::V0::Models::CaptureIdentifier.new(x) }
3151
+ end
3152
+
3153
+ # Create a new identifier for this capture
3154
+ def put_identifiers_by_key_and_identifier(organization, key, identifier, identifier_form)
3155
+ HttpClient::Preconditions.assert_class('organization', organization, String)
3156
+ HttpClient::Preconditions.assert_class('key', key, String)
3157
+ HttpClient::Preconditions.assert_class('identifier', identifier, String)
3158
+ (x = identifier_form; x.is_a?(::Io::Flow::V0::Models::IdentifierForm) ? x : ::Io::Flow::V0::Models::IdentifierForm.new(x))
3159
+ r = @client.request("/#{CGI.escape(organization)}/captures/#{CGI.escape(key)}/identifiers/#{CGI.escape(identifier)}").with_json(identifier_form.to_json).put
3160
+ ::Io::Flow::V0::Models::CaptureIdentifier.new(r)
3161
+ end
3162
+
3163
+ def delete_identifiers_by_key_and_identifier(organization, key, identifier)
3164
+ HttpClient::Preconditions.assert_class('organization', organization, String)
3165
+ HttpClient::Preconditions.assert_class('key', key, String)
3166
+ HttpClient::Preconditions.assert_class('identifier', identifier, String)
3167
+ r = @client.request("/#{CGI.escape(organization)}/captures/#{CGI.escape(key)}/identifiers/#{CGI.escape(identifier)}").delete
3168
+ nil
3169
+ end
3170
+
3063
3171
  end
3064
3172
 
3065
3173
  class Cards
@@ -3305,6 +3413,39 @@ module Io
3305
3413
  ::Io::Flow::V0::Models::Refund.new(r)
3306
3414
  end
3307
3415
 
3416
+ def get_identifiers_by_key(organization, key, incoming={})
3417
+ HttpClient::Preconditions.assert_class('organization', organization, String)
3418
+ HttpClient::Preconditions.assert_class('key', key, String)
3419
+ opts = HttpClient::Helper.symbolize_keys(incoming)
3420
+ query = {
3421
+ :id => (x = opts.delete(:id); x.nil? ? nil : HttpClient::Preconditions.assert_class('id', x, Array).map { |v| HttpClient::Preconditions.assert_class('id', v, String) }),
3422
+ :identifier => (x = opts.delete(:identifier); x.nil? ? nil : HttpClient::Preconditions.assert_class('identifier', x, String)),
3423
+ :limit => HttpClient::Preconditions.assert_class('limit', (x = opts.delete(:limit); x.nil? ? 25 : x), Integer),
3424
+ :offset => HttpClient::Preconditions.assert_class('offset', (x = opts.delete(:offset); x.nil? ? 0 : x), Integer),
3425
+ :sort => HttpClient::Preconditions.assert_class('sort', (x = opts.delete(:sort); x.nil? ? "-created_at" : x), String)
3426
+ }.delete_if { |k, v| v.nil? }
3427
+ r = @client.request("/#{CGI.escape(organization)}/refunds/#{CGI.escape(key)}/identifiers").with_query(query).get
3428
+ r.map { |x| ::Io::Flow::V0::Models::RefundIdentifier.new(x) }
3429
+ end
3430
+
3431
+ # Create a new identifier for this refund
3432
+ def put_identifiers_by_key_and_identifier(organization, key, identifier, identifier_form)
3433
+ HttpClient::Preconditions.assert_class('organization', organization, String)
3434
+ HttpClient::Preconditions.assert_class('key', key, String)
3435
+ HttpClient::Preconditions.assert_class('identifier', identifier, String)
3436
+ (x = identifier_form; x.is_a?(::Io::Flow::V0::Models::IdentifierForm) ? x : ::Io::Flow::V0::Models::IdentifierForm.new(x))
3437
+ r = @client.request("/#{CGI.escape(organization)}/refunds/#{CGI.escape(key)}/identifiers/#{CGI.escape(identifier)}").with_json(identifier_form.to_json).put
3438
+ ::Io::Flow::V0::Models::RefundIdentifier.new(r)
3439
+ end
3440
+
3441
+ def delete_identifiers_by_key_and_identifier(organization, key, identifier)
3442
+ HttpClient::Preconditions.assert_class('organization', organization, String)
3443
+ HttpClient::Preconditions.assert_class('key', key, String)
3444
+ HttpClient::Preconditions.assert_class('identifier', identifier, String)
3445
+ r = @client.request("/#{CGI.escape(organization)}/refunds/#{CGI.escape(key)}/identifiers/#{CGI.escape(identifier)}").delete
3446
+ nil
3447
+ end
3448
+
3308
3449
  end
3309
3450
 
3310
3451
  class Reversals
@@ -4940,17 +5081,21 @@ module Io
4940
5081
 
4941
5082
  end
4942
5083
 
4943
- class ConsumerInvoiceUrls
5084
+ class ConsumerInvoiceDocuments
4944
5085
 
4945
5086
  def initialize(client)
4946
5087
  @client = HttpClient::Preconditions.assert_class('client', client, ::Io::Flow::V0::Client)
4947
5088
  end
4948
5089
 
4949
- def get_tokens_and_type_by_token_and_type(token, type)
5090
+ def get_tokens_and_type_by_token_and_type(token, type, incoming={})
4950
5091
  HttpClient::Preconditions.assert_class('token', token, String)
4951
5092
  (x = type; x.is_a?(::Io::Flow::V0::Models::ConsumerInvoiceDocumentType) ? x : ::Io::Flow::V0::Models::ConsumerInvoiceDocumentType.apply(x))
4952
- r = @client.request("/consumer/invoice/tokens/#{CGI.escape(token)}/type/#{type.value}").get
4953
- ::Io::Flow::V0::Models::ConsumerInvoiceUrl.new(r)
5093
+ opts = HttpClient::Helper.symbolize_keys(incoming)
5094
+ query = {
5095
+ :language => (x = opts.delete(:language); x.nil? ? nil : HttpClient::Preconditions.assert_class('language', x, String))
5096
+ }.delete_if { |k, v| v.nil? }
5097
+ r = @client.request("/consumer/invoice/document/tokens/#{CGI.escape(token)}/type/#{type.value}").with_query(query).get
5098
+ ::Io::Flow::V0::Models::ConsumerInvoiceDocument.new(r)
4954
5099
  end
4955
5100
 
4956
5101
  end
@@ -5466,7 +5611,7 @@ module Io
5466
5611
  @client = HttpClient::Preconditions.assert_class('client', client, ::Io::Flow::V0::Client)
5467
5612
  end
5468
5613
 
5469
- # Get all tokens for the specifed organization
5614
+ # Get all tokens for the specified organization
5470
5615
  def get(organization, incoming={})
5471
5616
  HttpClient::Preconditions.assert_class('organization', organization, String)
5472
5617
  opts = HttpClient::Helper.symbolize_keys(incoming)
@@ -5497,7 +5642,7 @@ module Io
5497
5642
  @client = HttpClient::Preconditions.assert_class('client', client, ::Io::Flow::V0::Client)
5498
5643
  end
5499
5644
 
5500
- # Get all tokens for the specifed partner
5645
+ # Get all tokens for the specified partner
5501
5646
  def get(partner, incoming={})
5502
5647
  HttpClient::Preconditions.assert_class('partner', partner, String)
5503
5648
  opts = HttpClient::Helper.symbolize_keys(incoming)
@@ -5572,7 +5717,7 @@ module Io
5572
5717
  ::Io::Flow::V0::Models::ScheduledExport.new(r)
5573
5718
  end
5574
5719
 
5575
- # Get a single excheduled export.
5720
+ # Get a single scheduled export.
5576
5721
  def get_by_id(id)
5577
5722
  HttpClient::Preconditions.assert_class('id', id, String)
5578
5723
  r = @client.request("/users/scheduled/exports/#{CGI.escape(id)}").get
@@ -5601,6 +5746,55 @@ module Io
5601
5746
  @client = HttpClient::Preconditions.assert_class('client', client, ::Io::Flow::V0::Client)
5602
5747
  end
5603
5748
 
5749
+ def post_shopify_and_organizations_by_organization(organization, session_form)
5750
+ HttpClient::Preconditions.assert_class('organization', organization, String)
5751
+ (x = session_form; x.is_a?(::Io::Flow::V0::Models::SessionForm) ? x : ::Io::Flow::V0::Models::SessionForm.new(x))
5752
+ r = @client.request("/sessions/shopify/organizations/#{CGI.escape(organization)}").with_json(session_form.to_json).post
5753
+ ::Io::Flow::V0::Models::OrganizationSession.new(r)
5754
+ end
5755
+
5756
+ def get_shopify_by_session(session)
5757
+ HttpClient::Preconditions.assert_class('session', session, String)
5758
+ r = @client.request("/sessions/shopify/#{CGI.escape(session)}").get
5759
+ ::Io::Flow::V0::Models::Session.from_json(r)
5760
+ end
5761
+
5762
+ def put_shopify_by_session(session, session_put_form)
5763
+ HttpClient::Preconditions.assert_class('session', session, String)
5764
+ (x = session_put_form; x.is_a?(::Io::Flow::V0::Models::SessionPutForm) ? x : ::Io::Flow::V0::Models::SessionPutForm.new(x))
5765
+ r = @client.request("/sessions/shopify/#{CGI.escape(session)}").with_json(session_put_form.to_json).put
5766
+ ::Io::Flow::V0::Models::Session.from_json(r)
5767
+ end
5768
+
5769
+ def delete_shopify_by_session(session)
5770
+ HttpClient::Preconditions.assert_class('session', session, String)
5771
+ r = @client.request("/sessions/shopify/#{CGI.escape(session)}").delete
5772
+ nil
5773
+ end
5774
+
5775
+ # Clears the session geo parameters
5776
+ def put_shopify_and_clear_by_session(session)
5777
+ HttpClient::Preconditions.assert_class('session', session, String)
5778
+ r = @client.request("/sessions/shopify/#{CGI.escape(session)}/clear").put
5779
+ ::Io::Flow::V0::Models::Session.from_json(r)
5780
+ end
5781
+
5782
+ def put_shopify_and_organizations_by_session_and_organization(session, organization, session_put_form)
5783
+ HttpClient::Preconditions.assert_class('session', session, String)
5784
+ HttpClient::Preconditions.assert_class('organization', organization, String)
5785
+ (x = session_put_form; x.is_a?(::Io::Flow::V0::Models::SessionPutForm) ? x : ::Io::Flow::V0::Models::SessionPutForm.new(x))
5786
+ r = @client.request("/sessions/shopify/#{CGI.escape(session)}/organizations/#{CGI.escape(organization)}").with_json(session_put_form.to_json).put
5787
+ ::Io::Flow::V0::Models::OrganizationSession.new(r)
5788
+ end
5789
+
5790
+ # Resets the session based on the provided geo parameters.
5791
+ def put_shopify_and_reset_by_session(session, session_put_form)
5792
+ HttpClient::Preconditions.assert_class('session', session, String)
5793
+ (x = session_put_form; x.is_a?(::Io::Flow::V0::Models::SessionPutForm) ? x : ::Io::Flow::V0::Models::SessionPutForm.new(x))
5794
+ r = @client.request("/sessions/shopify/#{CGI.escape(session)}/reset").with_json(session_put_form.to_json).put
5795
+ ::Io::Flow::V0::Models::Session.from_json(r)
5796
+ end
5797
+
5604
5798
  def post_organizations_by_organization(organization, session_form)
5605
5799
  HttpClient::Preconditions.assert_class('organization', organization, String)
5606
5800
  (x = session_form; x.is_a?(::Io::Flow::V0::Models::SessionForm) ? x : ::Io::Flow::V0::Models::SessionForm.new(x))
@@ -5666,6 +5860,78 @@ module Io
5666
5860
 
5667
5861
  end
5668
5862
 
5863
+ class ShopifyCarts
5864
+
5865
+ def initialize(client)
5866
+ @client = HttpClient::Preconditions.assert_class('client', client, ::Io::Flow::V0::Client)
5867
+ end
5868
+
5869
+ # Retrieve representation of a Shopify cart given the unique cart id.
5870
+ def get_by_id_html(id)
5871
+ HttpClient::Preconditions.assert_class('id', id, String)
5872
+ r = @client.request("/shopify/carts/#{CGI.escape(id)}").get
5873
+ r
5874
+ end
5875
+
5876
+ # Retrieve representation of a Shopify cart given the unique cart id.
5877
+ def get_by_id(id)
5878
+ HttpClient::Preconditions.assert_class('id', id, String)
5879
+ r = @client.request("/shopify/carts/#{CGI.escape(id)}").get
5880
+ ::Io::Flow::V0::Models::ShopifyCart.new(r)
5881
+ end
5882
+
5883
+ # Add an item to a Shopify cart given the unique cart id.
5884
+ def post_add_by_id(id, shopify_cart_add_form)
5885
+ HttpClient::Preconditions.assert_class('id', id, String)
5886
+ (x = shopify_cart_add_form; x.is_a?(::Io::Flow::V0::Models::ShopifyCartAddForm) ? x : ::Io::Flow::V0::Models::ShopifyCartAddForm.from_json(x))
5887
+ r = @client.request("/shopify/carts/#{CGI.escape(id)}/add").with_json(shopify_cart_add_form.to_json).post
5888
+ ::Io::Flow::V0::Models::ShopifyCart.new(r)
5889
+ end
5890
+
5891
+ # Update the attribute information for the cart.
5892
+ def put_attributes_by_id(id, shopify_order_attributes_form)
5893
+ HttpClient::Preconditions.assert_class('id', id, String)
5894
+ (x = shopify_order_attributes_form; x.is_a?(::Io::Flow::V0::Models::ShopifyOrderAttributesForm) ? x : ::Io::Flow::V0::Models::ShopifyOrderAttributesForm.new(x))
5895
+ r = @client.request("/shopify/carts/#{CGI.escape(id)}/attributes").with_json(shopify_order_attributes_form.to_json).put
5896
+ ::Io::Flow::V0::Models::ShopifyCart.new(r)
5897
+ end
5898
+
5899
+ # Change/Update an item in a Shopify cart given the unique cart id.
5900
+ def post_change_by_id(id, shopify_cart_change_form)
5901
+ HttpClient::Preconditions.assert_class('id', id, String)
5902
+ (x = shopify_cart_change_form; x.is_a?(::Io::Flow::V0::Models::ShopifyCartChangeForm) ? x : ::Io::Flow::V0::Models::ShopifyCartChangeForm.new(x))
5903
+ r = @client.request("/shopify/carts/#{CGI.escape(id)}/change").with_json(shopify_cart_change_form.to_json).post
5904
+ ::Io::Flow::V0::Models::ShopifyCart.new(r)
5905
+ end
5906
+
5907
+ # Remove all cart items given the unique cart id .
5908
+ def post_clear_by_id(id)
5909
+ HttpClient::Preconditions.assert_class('id', id, String)
5910
+ r = @client.request("/shopify/carts/#{CGI.escape(id)}/clear").post
5911
+ ::Io::Flow::V0::Models::ShopifyCart.new(r)
5912
+ end
5913
+
5914
+ # Update the geo information for the cart.
5915
+ def put_geo_by_id(id, geo_form)
5916
+ HttpClient::Preconditions.assert_class('id', id, String)
5917
+ (x = geo_form; x.is_a?(::Io::Flow::V0::Models::GeoForm) ? x : ::Io::Flow::V0::Models::GeoForm.new(x))
5918
+ r = @client.request("/shopify/carts/#{CGI.escape(id)}/geo").with_json(geo_form.to_json).put
5919
+ ::Io::Flow::V0::Models::ShopifyCart.new(r)
5920
+ end
5921
+
5922
+ # Create an order from a cart.
5923
+ def post_orders_by_id(id, incoming={})
5924
+ HttpClient::Preconditions.assert_class('id', id, String)
5925
+ opts = HttpClient::Helper.symbolize_keys(incoming)
5926
+ query = {
5927
+ :expand => (x = opts.delete(:expand); x.nil? ? nil : HttpClient::Preconditions.assert_class('expand', x, Array).map { |v| HttpClient::Preconditions.assert_class('expand', v, String) })
5928
+ }.delete_if { |k, v| v.nil? }
5929
+ r = @client.request("/shopify/carts/#{CGI.escape(id)}/orders").with_query(query).post
5930
+ ::Io::Flow::V0::Models::Order.new(r)
5931
+ end
5932
+
5933
+ end
5934
+
5669
5935
  class ShopifyPrivateApps
5670
5936
 
5671
5937
  def initialize(client)
@@ -5756,7 +6022,7 @@ module Io
5756
6022
 
5757
6023
  # Preferred method to validate a token, obtaining specific information if the
5758
6024
  # token is valid (or a 404 if the token does not exist). We use an HTTP POST
5759
- # with a form body to enusre that the token itself is not logged in the
6025
+ # with a form body to ensure that the token itself is not logged in the
5760
6026
  # request logs.
5761
6027
  def post_authentications(token_authentication_form)
5762
6028
  (x = token_authentication_form; x.is_a?(::Io::Flow::V0::Models::TokenAuthenticationForm) ? x : ::Io::Flow::V0::Models::TokenAuthenticationForm.new(x))
@@ -5821,7 +6087,7 @@ module Io
5821
6087
  @client = HttpClient::Preconditions.assert_class('client', client, ::Io::Flow::V0::Client)
5822
6088
  end
5823
6089
 
5824
- # Search users. Always paginated.
6090
+ # Search users. Must specify an id or email.
5825
6091
  def get(incoming={})
5826
6092
  opts = HttpClient::Helper.symbolize_keys(incoming)
5827
6093
  query = {
@@ -5853,20 +6119,6 @@ module Io
5853
6119
  ::Io::Flow::V0::Models::User.new(r)
5854
6120
  end
5855
6121
 
5856
- # Provides visibility into recent changes of each object, including deletion
5857
- def get_versions(incoming={})
5858
- opts = HttpClient::Helper.symbolize_keys(incoming)
5859
- query = {
5860
- :id => (x = opts.delete(:id); x.nil? ? nil : HttpClient::Preconditions.assert_class('id', x, Array).map { |v| HttpClient::Preconditions.assert_class('id', v, String) }),
5861
- :user_id => (x = opts.delete(:user_id); x.nil? ? nil : HttpClient::Preconditions.assert_class('user_id', x, Array).map { |v| HttpClient::Preconditions.assert_class('user_id', v, String) }),
5862
- :limit => HttpClient::Preconditions.assert_class('limit', (x = opts.delete(:limit); x.nil? ? 25 : x), Integer),
5863
- :offset => HttpClient::Preconditions.assert_class('offset', (x = opts.delete(:offset); x.nil? ? 0 : x), Integer),
5864
- :sort => HttpClient::Preconditions.assert_class('sort', (x = opts.delete(:sort); x.nil? ? "journal_timestamp" : x), String)
5865
- }.delete_if { |k, v| v.nil? }
5866
- r = @client.request("/users/versions").with_query(query).get
5867
- r.map { |x| ::Io::Flow::V0::Models::UserVersion.new(x) }
5868
- end
5869
-
5870
6122
  # Returns information about a specific user.
5871
6123
  def get_by_id(id)
5872
6124
  HttpClient::Preconditions.assert_class('id', id, String)
@@ -6448,6 +6700,8 @@ module Io
6448
6700
  CATALOG_ITEM_DELETED = 'catalog_item_deleted' unless defined?(CATALOG_ITEM_DELETED)
6449
6701
  SUBCATALOG_ITEM_UPSERTED = 'subcatalog_item_upserted' unless defined?(SUBCATALOG_ITEM_UPSERTED)
6450
6702
  SUBCATALOG_ITEM_DELETED = 'subcatalog_item_deleted' unless defined?(SUBCATALOG_ITEM_DELETED)
6703
+ CONSUMER_INVOICE_UPSERTED = 'consumer_invoice_upserted' unless defined?(CONSUMER_INVOICE_UPSERTED)
6704
+ CONSUMER_INVOICE_DELETED = 'consumer_invoice_deleted' unless defined?(CONSUMER_INVOICE_DELETED)
6451
6705
  CROSSDOCK_SHIPMENT_UPSERTED = 'crossdock_shipment_upserted' unless defined?(CROSSDOCK_SHIPMENT_UPSERTED)
6452
6706
  RATE_DELETED = 'rate_deleted' unless defined?(RATE_DELETED)
6453
6707
  RATE_UPSERTED = 'rate_upserted' unless defined?(RATE_UPSERTED)
@@ -6488,6 +6742,8 @@ module Io
6488
6742
  DELIVERY_OPTION_DELETED = 'delivery_option_deleted' unless defined?(DELIVERY_OPTION_DELETED)
6489
6743
  SHIPPING_CONFIGURATION_UPSERTED = 'shipping_configuration_upserted' unless defined?(SHIPPING_CONFIGURATION_UPSERTED)
6490
6744
  SHIPPING_CONFIGURATION_DELETED = 'shipping_configuration_deleted' unless defined?(SHIPPING_CONFIGURATION_DELETED)
6745
+ TIER_UPSERTED_V2 = 'tier_upserted_v2' unless defined?(TIER_UPSERTED_V2)
6746
+ TIER_DELETED_V2 = 'tier_deleted_v2' unless defined?(TIER_DELETED_V2)
6491
6747
  HS6_CODE_UPSERTED = 'hs6_code_upserted' unless defined?(HS6_CODE_UPSERTED)
6492
6748
  HS6_CODE_DELETED = 'hs6_code_deleted' unless defined?(HS6_CODE_DELETED)
6493
6749
  HS10_CODE_UPSERTED = 'hs10_code_upserted' unless defined?(HS10_CODE_UPSERTED)
@@ -6537,6 +6793,10 @@ module Io
6537
6793
  REFUND_UPSERTED_V2 = 'refund_upserted_v2' unless defined?(REFUND_UPSERTED_V2)
6538
6794
  REFUND_CAPTURE_UPSERTED_V2 = 'refund_capture_upserted_v2' unless defined?(REFUND_CAPTURE_UPSERTED_V2)
6539
6795
  REVERSAL_UPSERTED = 'reversal_upserted' unless defined?(REVERSAL_UPSERTED)
6796
+ CAPTURE_IDENTIFIER_UPSERTED = 'capture_identifier_upserted' unless defined?(CAPTURE_IDENTIFIER_UPSERTED)
6797
+ CAPTURE_IDENTIFIER_DELETED = 'capture_identifier_deleted' unless defined?(CAPTURE_IDENTIFIER_DELETED)
6798
+ REFUND_IDENTIFIER_UPSERTED = 'refund_identifier_upserted' unless defined?(REFUND_IDENTIFIER_UPSERTED)
6799
+ REFUND_IDENTIFIER_DELETED = 'refund_identifier_deleted' unless defined?(REFUND_IDENTIFIER_DELETED)
6540
6800
  VIRTUAL_CARD_CAPTURE_UPSERTED = 'virtual_card_capture_upserted' unless defined?(VIRTUAL_CARD_CAPTURE_UPSERTED)
6541
6801
  VIRTUAL_CARD_CAPTURE_DELETED = 'virtual_card_capture_deleted' unless defined?(VIRTUAL_CARD_CAPTURE_DELETED)
6542
6802
  VIRTUAL_CARD_REFUND_UPSERTED = 'virtual_card_refund_upserted' unless defined?(VIRTUAL_CARD_REFUND_UPSERTED)
@@ -6552,6 +6812,7 @@ module Io
6552
6812
  RETURN_DELETED = 'return_deleted' unless defined?(RETURN_DELETED)
6553
6813
  TARGETING_ITEM_UPSERTED = 'targeting_item_upserted' unless defined?(TARGETING_ITEM_UPSERTED)
6554
6814
  TARGETING_ITEM_DELETED = 'targeting_item_deleted' unless defined?(TARGETING_ITEM_DELETED)
6815
+ TARGETING_ITEM_DELETED_V2 = 'targeting_item_deleted_v2' unless defined?(TARGETING_ITEM_DELETED_V2)
6555
6816
  TRACKING_LABEL_EVENT_UPSERTED = 'tracking_label_event_upserted' unless defined?(TRACKING_LABEL_EVENT_UPSERTED)
6556
6817
  end
6557
6818
 
@@ -6564,7 +6825,7 @@ module Io
6564
6825
  end
6565
6826
 
6566
6827
  def subtype_to_hash
6567
- raise 'Cannot serialize an instance of event directly - must use one of the specific types: attribute_upserted, attribute_deleted, attribute_upserted_v2, attribute_deleted_v2, catalog_upserted, catalog_deleted, subcatalog_upserted, subcatalog_deleted, catalog_item_upserted, catalog_item_deleted, subcatalog_item_upserted, subcatalog_item_deleted, crossdock_shipment_upserted, rate_deleted, rate_upserted, available_promotions_upserted, available_promotions_deleted, allocation_deleted_v2, allocation_upserted_v2, currency_format_deleted, currency_format_upserted, experience_deleted, experience_upserted, experience_deleted_v2, experience_upserted_v2, experience_price_book_mapping_deleted, experience_price_book_mapping_upserted, experience_logistics_settings_upserted, experience_logistics_settings_deleted, item_margin_deleted, item_margin_upserted, item_sales_margin_deleted, item_sales_margin_upserted, label_format_deleted, label_format_upserted, order_deleted, order_upserted, order_deleted_v2, order_upserted_v2, order_identifier_deleted, order_identifier_upserted, order_identifier_deleted_v2, order_identifier_upserted_v2, pricing_deleted, pricing_upserted, fraud_status_changed, tier_upserted, tier_deleted, delivery_option_upserted, delivery_option_deleted, shipping_configuration_upserted, shipping_configuration_deleted, hs6_code_upserted, hs6_code_deleted, hs10_code_upserted, hs10_code_deleted, item_origin_upserted, item_origin_deleted, harmonized_item_upserted, harmonized_item_deleted, harmonized_landed_cost_upserted, fully_harmonized_item_upserted, rule_upserted, rule_deleted, serial_upserted, serial_deleted, snapshot_upserted, snapshot_deleted, label_upserted, notification_upserted, notification_deleted, manifested_label_upserted, manifested_label_deleted, local_item_upserted, local_item_deleted, membership_upserted, membership_deleted, organization_upserted, organization_deleted, authorization_upserted, authorization_deleted, authorization_deleted_v2, authorization_status_changed, card_authorization_upserted, card_authorization_upserted_v2, online_authorization_upserted, online_authorization_upserted_v2, capture_upserted, capture_upserted_v2, card_upserted, card_upserted_v2, card_deleted, payment_upserted, payment_deleted, refund_upserted, refund_upserted_v2, refund_capture_upserted_v2, reversal_upserted, virtual_card_capture_upserted, virtual_card_capture_deleted, virtual_card_refund_upserted, virtual_card_refund_deleted, price_book_upserted, price_book_deleted, price_book_item_upserted, price_book_item_deleted, organization_rates_published, organization_countries_published, organization_ratecard_transit_windows_published, return_upserted, return_deleted, targeting_item_upserted, targeting_item_deleted, tracking_label_event_upserted'
6828
+ raise 'Cannot serialize an instance of event directly - must use one of the specific types: attribute_upserted, attribute_deleted, attribute_upserted_v2, attribute_deleted_v2, catalog_upserted, catalog_deleted, subcatalog_upserted, subcatalog_deleted, catalog_item_upserted, catalog_item_deleted, subcatalog_item_upserted, subcatalog_item_deleted, consumer_invoice_upserted, consumer_invoice_deleted, crossdock_shipment_upserted, rate_deleted, rate_upserted, available_promotions_upserted, available_promotions_deleted, allocation_deleted_v2, allocation_upserted_v2, currency_format_deleted, currency_format_upserted, experience_deleted, experience_upserted, experience_deleted_v2, experience_upserted_v2, experience_price_book_mapping_deleted, experience_price_book_mapping_upserted, experience_logistics_settings_upserted, experience_logistics_settings_deleted, item_margin_deleted, item_margin_upserted, item_sales_margin_deleted, item_sales_margin_upserted, label_format_deleted, label_format_upserted, order_deleted, order_upserted, order_deleted_v2, order_upserted_v2, order_identifier_deleted, order_identifier_upserted, order_identifier_deleted_v2, order_identifier_upserted_v2, pricing_deleted, pricing_upserted, fraud_status_changed, tier_upserted, tier_deleted, delivery_option_upserted, delivery_option_deleted, shipping_configuration_upserted, shipping_configuration_deleted, tier_upserted_v2, tier_deleted_v2, hs6_code_upserted, hs6_code_deleted, hs10_code_upserted, hs10_code_deleted, item_origin_upserted, item_origin_deleted, harmonized_item_upserted, harmonized_item_deleted, harmonized_landed_cost_upserted, fully_harmonized_item_upserted, rule_upserted, rule_deleted, serial_upserted, serial_deleted, snapshot_upserted, snapshot_deleted, label_upserted, notification_upserted, notification_deleted, manifested_label_upserted, manifested_label_deleted, local_item_upserted, local_item_deleted, membership_upserted, membership_deleted, organization_upserted, organization_deleted, authorization_upserted, authorization_deleted, authorization_deleted_v2, authorization_status_changed, card_authorization_upserted, card_authorization_upserted_v2, online_authorization_upserted, online_authorization_upserted_v2, capture_upserted, capture_upserted_v2, card_upserted, card_upserted_v2, card_deleted, payment_upserted, payment_deleted, refund_upserted, refund_upserted_v2, refund_capture_upserted_v2, reversal_upserted, capture_identifier_upserted, capture_identifier_deleted, refund_identifier_upserted, refund_identifier_deleted, virtual_card_capture_upserted, virtual_card_capture_deleted, virtual_card_refund_upserted, virtual_card_refund_deleted, price_book_upserted, price_book_deleted, price_book_item_upserted, price_book_item_deleted, organization_rates_published, organization_countries_published, organization_ratecard_transit_windows_published, return_upserted, return_deleted, targeting_item_upserted, targeting_item_deleted, targeting_item_deleted_v2, tracking_label_event_upserted'
6568
6829
  end
6569
6830
 
6570
6831
  def to_hash
@@ -6590,6 +6851,8 @@ module Io
6590
6851
  when Types::CATALOG_ITEM_DELETED; CatalogItemDeleted.new(hash)
6591
6852
  when Types::SUBCATALOG_ITEM_UPSERTED; SubcatalogItemUpserted.new(hash)
6592
6853
  when Types::SUBCATALOG_ITEM_DELETED; SubcatalogItemDeleted.new(hash)
6854
+ when Types::CONSUMER_INVOICE_UPSERTED; ConsumerInvoiceUpserted.new(hash)
6855
+ when Types::CONSUMER_INVOICE_DELETED; ConsumerInvoiceDeleted.new(hash)
6593
6856
  when Types::CROSSDOCK_SHIPMENT_UPSERTED; CrossdockShipmentUpserted.new(hash)
6594
6857
  when Types::RATE_DELETED; RateDeleted.new(hash)
6595
6858
  when Types::RATE_UPSERTED; RateUpserted.new(hash)
@@ -6630,6 +6893,8 @@ module Io
6630
6893
  when Types::DELIVERY_OPTION_DELETED; DeliveryOptionDeleted.new(hash)
6631
6894
  when Types::SHIPPING_CONFIGURATION_UPSERTED; ShippingConfigurationUpserted.new(hash)
6632
6895
  when Types::SHIPPING_CONFIGURATION_DELETED; ShippingConfigurationDeleted.new(hash)
6896
+ when Types::TIER_UPSERTED_V2; TierUpsertedV2.new(hash)
6897
+ when Types::TIER_DELETED_V2; TierDeletedV2.new(hash)
6633
6898
  when Types::HS6_CODE_UPSERTED; Hs6CodeUpserted.new(hash)
6634
6899
  when Types::HS6_CODE_DELETED; Hs6CodeDeleted.new(hash)
6635
6900
  when Types::HS10_CODE_UPSERTED; Hs10CodeUpserted.new(hash)
@@ -6676,6 +6941,10 @@ module Io
6676
6941
  when Types::REFUND_UPSERTED_V2; RefundUpsertedV2.new(hash)
6677
6942
  when Types::REFUND_CAPTURE_UPSERTED_V2; RefundCaptureUpsertedV2.new(hash)
6678
6943
  when Types::REVERSAL_UPSERTED; ReversalUpserted.new(hash)
6944
+ when Types::CAPTURE_IDENTIFIER_UPSERTED; CaptureIdentifierUpserted.new(hash)
6945
+ when Types::CAPTURE_IDENTIFIER_DELETED; CaptureIdentifierDeleted.new(hash)
6946
+ when Types::REFUND_IDENTIFIER_UPSERTED; RefundIdentifierUpserted.new(hash)
6947
+ when Types::REFUND_IDENTIFIER_DELETED; RefundIdentifierDeleted.new(hash)
6679
6948
  when Types::VIRTUAL_CARD_CAPTURE_UPSERTED; VirtualCardCaptureUpserted.new(hash)
6680
6949
  when Types::VIRTUAL_CARD_CAPTURE_DELETED; VirtualCardCaptureDeleted.new(hash)
6681
6950
  when Types::VIRTUAL_CARD_REFUND_UPSERTED; VirtualCardRefundUpserted.new(hash)
@@ -6691,6 +6960,7 @@ module Io
6691
6960
  when Types::RETURN_DELETED; ReturnDeleted.new(hash)
6692
6961
  when Types::TARGETING_ITEM_UPSERTED; TargetingItemUpserted.new(hash)
6693
6962
  when Types::TARGETING_ITEM_DELETED; TargetingItemDeleted.new(hash)
6963
+ when Types::TARGETING_ITEM_DELETED_V2; TargetingItemDeletedV2.new(hash)
6694
6964
  when Types::TRACKING_LABEL_EVENT_UPSERTED; TrackingLabelEventUpserted.new(hash)
6695
6965
  else EventUndefinedType.new(:discriminator => discriminator)
6696
6966
  end
@@ -8437,52 +8707,44 @@ module Io
8437
8707
 
8438
8708
  end
8439
8709
 
8440
- # Possible outcome types from a tier rule
8441
- class TierRuleOutcome
8710
+ class ShopifyCartAddForm
8442
8711
 
8443
8712
  module Types
8444
- # Add a certain amount on the actual base cost
8445
- AMOUNT_MARGIN = 'amount_margin' unless defined?(AMOUNT_MARGIN)
8446
- AT_COST = 'at_cost' unless defined?(AT_COST)
8447
- FLAT_RATE = 'flat_rate' unless defined?(FLAT_RATE)
8448
- # Add a certain percentage of the actual base cost
8449
- PERCENT_MARGIN = 'percent_margin' unless defined?(PERCENT_MARGIN)
8713
+ SHOPIFY_CART_ADD_SINGLE_FORM = 'shopify_cart_add_single_form' unless defined?(SHOPIFY_CART_ADD_SINGLE_FORM)
8714
+ SHOPIFY_CART_ADD_MULTIPLE_FORM = 'shopify_cart_add_multiple_form' unless defined?(SHOPIFY_CART_ADD_MULTIPLE_FORM)
8450
8715
  end
8451
8716
 
8452
8717
  attr_reader :discriminator
8453
8718
 
8454
8719
  def initialize(incoming={})
8455
8720
  opts = HttpClient::Helper.symbolize_keys(incoming)
8456
- HttpClient::Preconditions.require_keys(opts, [:discriminator], 'TierRuleOutcome')
8457
- @discriminator = HttpClient::Preconditions.assert_class('discriminator', opts.delete(:discriminator), String)
8721
+ @discriminator = HttpClient::Preconditions.assert_class('discriminator', opts.delete(:discriminator) || 'shopify_cart_add_single_form', String)
8458
8722
  end
8459
8723
 
8460
8724
  def subtype_to_hash
8461
- raise 'Cannot serialize an instance of tier_rule_outcome directly - must use one of the specific types: amount_margin, at_cost, flat_rate, percent_margin'
8725
+ raise 'Cannot serialize an instance of shopify_cart_add_form directly - must use one of the specific types: shopify_cart_add_single_form, shopify_cart_add_multiple_form'
8462
8726
  end
8463
8727
 
8464
8728
  def to_hash
8465
8729
  subtype_to_hash.merge(:discriminator => @discriminator)
8466
8730
  end
8467
8731
 
8468
- def TierRuleOutcome.from_json(hash)
8732
+ def ShopifyCartAddForm.from_json(hash)
8469
8733
  HttpClient::Preconditions.assert_class('hash', hash, Hash)
8470
8734
  discriminator = HttpClient::Helper.symbolize_keys(hash)[:discriminator].to_s.strip
8471
8735
  if discriminator.empty?
8472
- raise "Union type[tier_rule_outcome] requires a field named 'discriminator'"
8736
+ raise "Union type[shopify_cart_add_form] requires a field named 'discriminator'"
8473
8737
  end
8474
8738
  case discriminator
8475
- when Types::AMOUNT_MARGIN; AmountMargin.new(hash)
8476
- when Types::AT_COST; AtCost.new(hash)
8477
- when Types::FLAT_RATE; FlatRate.new(hash)
8478
- when Types::PERCENT_MARGIN; PercentMargin.new(hash)
8479
- else TierRuleOutcomeUndefinedType.new(:discriminator => discriminator)
8739
+ when Types::SHOPIFY_CART_ADD_SINGLE_FORM; ShopifyCartAddSingleForm.new(hash)
8740
+ when Types::SHOPIFY_CART_ADD_MULTIPLE_FORM; ShopifyCartAddMultipleForm.new(hash)
8741
+ else ShopifyCartAddFormUndefinedType.new(:discriminator => discriminator)
8480
8742
  end
8481
8743
  end
8482
8744
 
8483
8745
  end
8484
8746
 
8485
- class TierRuleOutcomeUndefinedType < TierRuleOutcome
8747
+ class ShopifyCartAddFormUndefinedType < ShopifyCartAddForm
8486
8748
 
8487
8749
  attr_reader :name
8488
8750
 
@@ -8506,12 +8768,15 @@ module Io
8506
8768
 
8507
8769
  end
8508
8770
 
8509
- class TierRuleOutcomeForm
8771
+ # Possible outcome types from a tier rule
8772
+ class TierRuleOutcome
8510
8773
 
8511
8774
  module Types
8512
- AMOUNT_MARGIN_FORM = 'amount_margin_form' unless defined?(AMOUNT_MARGIN_FORM)
8513
- FLAT_RATE_FORM = 'flat_rate_form' unless defined?(FLAT_RATE_FORM)
8775
+ # Add a certain amount on the actual base cost
8776
+ AMOUNT_MARGIN = 'amount_margin' unless defined?(AMOUNT_MARGIN)
8514
8777
  AT_COST = 'at_cost' unless defined?(AT_COST)
8778
+ FLAT_RATE = 'flat_rate' unless defined?(FLAT_RATE)
8779
+ # Add a certain percentage of the actual base cost
8515
8780
  PERCENT_MARGIN = 'percent_margin' unless defined?(PERCENT_MARGIN)
8516
8781
  end
8517
8782
 
@@ -8519,36 +8784,36 @@ module Io
8519
8784
 
8520
8785
  def initialize(incoming={})
8521
8786
  opts = HttpClient::Helper.symbolize_keys(incoming)
8522
- HttpClient::Preconditions.require_keys(opts, [:discriminator], 'TierRuleOutcomeForm')
8787
+ HttpClient::Preconditions.require_keys(opts, [:discriminator], 'TierRuleOutcome')
8523
8788
  @discriminator = HttpClient::Preconditions.assert_class('discriminator', opts.delete(:discriminator), String)
8524
8789
  end
8525
8790
 
8526
8791
  def subtype_to_hash
8527
- raise 'Cannot serialize an instance of tier_rule_outcome_form directly - must use one of the specific types: amount_margin_form, flat_rate_form, at_cost, percent_margin'
8792
+ raise 'Cannot serialize an instance of tier_rule_outcome directly - must use one of the specific types: amount_margin, at_cost, flat_rate, percent_margin'
8528
8793
  end
8529
8794
 
8530
8795
  def to_hash
8531
8796
  subtype_to_hash.merge(:discriminator => @discriminator)
8532
8797
  end
8533
8798
 
8534
- def TierRuleOutcomeForm.from_json(hash)
8799
+ def TierRuleOutcome.from_json(hash)
8535
8800
  HttpClient::Preconditions.assert_class('hash', hash, Hash)
8536
8801
  discriminator = HttpClient::Helper.symbolize_keys(hash)[:discriminator].to_s.strip
8537
8802
  if discriminator.empty?
8538
- raise "Union type[tier_rule_outcome_form] requires a field named 'discriminator'"
8803
+ raise "Union type[tier_rule_outcome] requires a field named 'discriminator'"
8539
8804
  end
8540
8805
  case discriminator
8541
- when Types::AMOUNT_MARGIN_FORM; AmountMarginForm.new(hash)
8542
- when Types::FLAT_RATE_FORM; FlatRateForm.new(hash)
8806
+ when Types::AMOUNT_MARGIN; AmountMargin.new(hash)
8543
8807
  when Types::AT_COST; AtCost.new(hash)
8808
+ when Types::FLAT_RATE; FlatRate.new(hash)
8544
8809
  when Types::PERCENT_MARGIN; PercentMargin.new(hash)
8545
- else TierRuleOutcomeFormUndefinedType.new(:discriminator => discriminator)
8810
+ else TierRuleOutcomeUndefinedType.new(:discriminator => discriminator)
8546
8811
  end
8547
8812
  end
8548
8813
 
8549
8814
  end
8550
8815
 
8551
- class TierRuleOutcomeFormUndefinedType < TierRuleOutcomeForm
8816
+ class TierRuleOutcomeUndefinedType < TierRuleOutcome
8552
8817
 
8553
8818
  attr_reader :name
8554
8819
 
@@ -8572,45 +8837,49 @@ module Io
8572
8837
 
8573
8838
  end
8574
8839
 
8575
- class Token
8840
+ class TierRuleOutcomeForm
8576
8841
 
8577
8842
  module Types
8578
- ORGANIZATION_TOKEN = 'organization_token' unless defined?(ORGANIZATION_TOKEN)
8579
- PARTNER_TOKEN = 'partner_token' unless defined?(PARTNER_TOKEN)
8843
+ AMOUNT_MARGIN_FORM = 'amount_margin_form' unless defined?(AMOUNT_MARGIN_FORM)
8844
+ FLAT_RATE_FORM = 'flat_rate_form' unless defined?(FLAT_RATE_FORM)
8845
+ AT_COST = 'at_cost' unless defined?(AT_COST)
8846
+ PERCENT_MARGIN = 'percent_margin' unless defined?(PERCENT_MARGIN)
8580
8847
  end
8581
8848
 
8582
8849
  attr_reader :discriminator
8583
8850
 
8584
8851
  def initialize(incoming={})
8585
8852
  opts = HttpClient::Helper.symbolize_keys(incoming)
8586
- HttpClient::Preconditions.require_keys(opts, [:discriminator], 'Token')
8853
+ HttpClient::Preconditions.require_keys(opts, [:discriminator], 'TierRuleOutcomeForm')
8587
8854
  @discriminator = HttpClient::Preconditions.assert_class('discriminator', opts.delete(:discriminator), String)
8588
8855
  end
8589
8856
 
8590
8857
  def subtype_to_hash
8591
- raise 'Cannot serialize an instance of token directly - must use one of the specific types: organization_token, partner_token'
8858
+ raise 'Cannot serialize an instance of tier_rule_outcome_form directly - must use one of the specific types: amount_margin_form, flat_rate_form, at_cost, percent_margin'
8592
8859
  end
8593
8860
 
8594
8861
  def to_hash
8595
8862
  subtype_to_hash.merge(:discriminator => @discriminator)
8596
8863
  end
8597
8864
 
8598
- def Token.from_json(hash)
8865
+ def TierRuleOutcomeForm.from_json(hash)
8599
8866
  HttpClient::Preconditions.assert_class('hash', hash, Hash)
8600
8867
  discriminator = HttpClient::Helper.symbolize_keys(hash)[:discriminator].to_s.strip
8601
8868
  if discriminator.empty?
8602
- raise "Union type[token] requires a field named 'discriminator'"
8869
+ raise "Union type[tier_rule_outcome_form] requires a field named 'discriminator'"
8603
8870
  end
8604
8871
  case discriminator
8605
- when Types::ORGANIZATION_TOKEN; OrganizationToken.new(hash)
8606
- when Types::PARTNER_TOKEN; PartnerToken.new(hash)
8607
- else TokenUndefinedType.new(:discriminator => discriminator)
8872
+ when Types::AMOUNT_MARGIN_FORM; AmountMarginForm.new(hash)
8873
+ when Types::FLAT_RATE_FORM; FlatRateForm.new(hash)
8874
+ when Types::AT_COST; AtCost.new(hash)
8875
+ when Types::PERCENT_MARGIN; PercentMargin.new(hash)
8876
+ else TierRuleOutcomeFormUndefinedType.new(:discriminator => discriminator)
8608
8877
  end
8609
8878
  end
8610
8879
 
8611
8880
  end
8612
8881
 
8613
- class TokenUndefinedType < Token
8882
+ class TierRuleOutcomeFormUndefinedType < TierRuleOutcomeForm
8614
8883
 
8615
8884
  attr_reader :name
8616
8885
 
@@ -8634,45 +8903,107 @@ module Io
8634
8903
 
8635
8904
  end
8636
8905
 
8637
- class TokenReference
8906
+ class Token
8638
8907
 
8639
8908
  module Types
8640
- ORGANIZATION_TOKEN_REFERENCE = 'organization_token_reference' unless defined?(ORGANIZATION_TOKEN_REFERENCE)
8641
- PARTNER_TOKEN_REFERENCE = 'partner_token_reference' unless defined?(PARTNER_TOKEN_REFERENCE)
8909
+ ORGANIZATION_TOKEN = 'organization_token' unless defined?(ORGANIZATION_TOKEN)
8910
+ PARTNER_TOKEN = 'partner_token' unless defined?(PARTNER_TOKEN)
8642
8911
  end
8643
8912
 
8644
8913
  attr_reader :discriminator
8645
8914
 
8646
8915
  def initialize(incoming={})
8647
8916
  opts = HttpClient::Helper.symbolize_keys(incoming)
8648
- HttpClient::Preconditions.require_keys(opts, [:discriminator], 'TokenReference')
8917
+ HttpClient::Preconditions.require_keys(opts, [:discriminator], 'Token')
8649
8918
  @discriminator = HttpClient::Preconditions.assert_class('discriminator', opts.delete(:discriminator), String)
8650
8919
  end
8651
8920
 
8652
8921
  def subtype_to_hash
8653
- raise 'Cannot serialize an instance of token_reference directly - must use one of the specific types: organization_token_reference, partner_token_reference'
8922
+ raise 'Cannot serialize an instance of token directly - must use one of the specific types: organization_token, partner_token'
8654
8923
  end
8655
8924
 
8656
8925
  def to_hash
8657
8926
  subtype_to_hash.merge(:discriminator => @discriminator)
8658
8927
  end
8659
8928
 
8660
- def TokenReference.from_json(hash)
8929
+ def Token.from_json(hash)
8661
8930
  HttpClient::Preconditions.assert_class('hash', hash, Hash)
8662
8931
  discriminator = HttpClient::Helper.symbolize_keys(hash)[:discriminator].to_s.strip
8663
8932
  if discriminator.empty?
8664
- raise "Union type[token_reference] requires a field named 'discriminator'"
8933
+ raise "Union type[token] requires a field named 'discriminator'"
8665
8934
  end
8666
8935
  case discriminator
8667
- when Types::ORGANIZATION_TOKEN_REFERENCE; OrganizationTokenReference.new(hash)
8668
- when Types::PARTNER_TOKEN_REFERENCE; PartnerTokenReference.new(hash)
8669
- else TokenReferenceUndefinedType.new(:discriminator => discriminator)
8936
+ when Types::ORGANIZATION_TOKEN; OrganizationToken.new(hash)
8937
+ when Types::PARTNER_TOKEN; PartnerToken.new(hash)
8938
+ else TokenUndefinedType.new(:discriminator => discriminator)
8670
8939
  end
8671
8940
  end
8672
8941
 
8673
8942
  end
8674
8943
 
8675
- class TokenReferenceUndefinedType < TokenReference
8944
+ class TokenUndefinedType < Token
8945
+
8946
+ attr_reader :name
8947
+
8948
+ def initialize(incoming={})
8949
+ super(:discriminator => 'undefined_type')
8950
+ opts = HttpClient::Helper.symbolize_keys(incoming)
8951
+ @name = HttpClient::Preconditions.assert_class('name', opts.delete(:discriminator), String)
8952
+ end
8953
+
8954
+ def subtype_to_hash
8955
+ raise 'Unable to serialize undefined type to json'
8956
+ end
8957
+
8958
+ def copy(incoming={})
8959
+ raise 'Operation not supported for undefined type'
8960
+ end
8961
+
8962
+ def to_hash
8963
+ raise 'Operation not supported for undefined type'
8964
+ end
8965
+
8966
+ end
8967
+
8968
+ class TokenReference
8969
+
8970
+ module Types
8971
+ ORGANIZATION_TOKEN_REFERENCE = 'organization_token_reference' unless defined?(ORGANIZATION_TOKEN_REFERENCE)
8972
+ PARTNER_TOKEN_REFERENCE = 'partner_token_reference' unless defined?(PARTNER_TOKEN_REFERENCE)
8973
+ end
8974
+
8975
+ attr_reader :discriminator
8976
+
8977
+ def initialize(incoming={})
8978
+ opts = HttpClient::Helper.symbolize_keys(incoming)
8979
+ HttpClient::Preconditions.require_keys(opts, [:discriminator], 'TokenReference')
8980
+ @discriminator = HttpClient::Preconditions.assert_class('discriminator', opts.delete(:discriminator), String)
8981
+ end
8982
+
8983
+ def subtype_to_hash
8984
+ raise 'Cannot serialize an instance of token_reference directly - must use one of the specific types: organization_token_reference, partner_token_reference'
8985
+ end
8986
+
8987
+ def to_hash
8988
+ subtype_to_hash.merge(:discriminator => @discriminator)
8989
+ end
8990
+
8991
+ def TokenReference.from_json(hash)
8992
+ HttpClient::Preconditions.assert_class('hash', hash, Hash)
8993
+ discriminator = HttpClient::Helper.symbolize_keys(hash)[:discriminator].to_s.strip
8994
+ if discriminator.empty?
8995
+ raise "Union type[token_reference] requires a field named 'discriminator'"
8996
+ end
8997
+ case discriminator
8998
+ when Types::ORGANIZATION_TOKEN_REFERENCE; OrganizationTokenReference.new(hash)
8999
+ when Types::PARTNER_TOKEN_REFERENCE; PartnerTokenReference.new(hash)
9000
+ else TokenReferenceUndefinedType.new(:discriminator => discriminator)
9001
+ end
9002
+ end
9003
+
9004
+ end
9005
+
9006
+ class TokenReferenceUndefinedType < TokenReference
8676
9007
 
8677
9008
  attr_reader :name
8678
9009
 
@@ -10459,7 +10790,7 @@ module Io
10459
10790
  end
10460
10791
 
10461
10792
  def EventType.ALL
10462
- @@all ||= [EventType.attribute_upserted, EventType.attribute_deleted, EventType.attribute_upserted_v2, EventType.attribute_deleted_v2, EventType.catalog_upserted, EventType.catalog_deleted, EventType.subcatalog_upserted, EventType.subcatalog_deleted, EventType.catalog_item_upserted, EventType.catalog_item_deleted, EventType.subcatalog_item_upserted, EventType.subcatalog_item_deleted, EventType.crossdock_shipment_upserted, EventType.rate_deleted, EventType.rate_upserted, EventType.available_promotions_upserted, EventType.available_promotions_deleted, EventType.allocation_deleted_v2, EventType.allocation_upserted_v2, EventType.currency_format_deleted, EventType.currency_format_upserted, EventType.experience_deleted, EventType.experience_upserted, EventType.experience_deleted_v2, EventType.experience_upserted_v2, EventType.experience_price_book_mapping_deleted, EventType.experience_price_book_mapping_upserted, EventType.experience_logistics_settings_upserted, EventType.experience_logistics_settings_deleted, EventType.item_margin_deleted, EventType.item_margin_upserted, EventType.item_sales_margin_deleted, EventType.item_sales_margin_upserted, EventType.label_format_deleted, EventType.label_format_upserted, EventType.order_deleted, EventType.order_upserted, EventType.order_deleted_v2, EventType.order_upserted_v2, EventType.order_identifier_deleted, EventType.order_identifier_upserted, EventType.order_identifier_deleted_v2, EventType.order_identifier_upserted_v2, EventType.pricing_deleted, EventType.pricing_upserted, EventType.fraud_status_changed, EventType.tier_upserted, EventType.tier_deleted, EventType.delivery_option_upserted, EventType.delivery_option_deleted, EventType.shipping_configuration_upserted, EventType.shipping_configuration_deleted, EventType.hs6_code_upserted, EventType.hs6_code_deleted, EventType.hs10_code_upserted, EventType.hs10_code_deleted, EventType.item_origin_upserted, EventType.item_origin_deleted, EventType.harmonized_item_upserted, EventType.harmonized_item_deleted, EventType.harmonized_landed_cost_upserted, EventType.fully_harmonized_item_upserted, EventType.rule_upserted, EventType.rule_deleted, EventType.serial_upserted, EventType.serial_deleted, EventType.snapshot_upserted, EventType.snapshot_deleted, EventType.label_upserted, EventType.notification_upserted, EventType.notification_deleted, EventType.manifested_label_upserted, EventType.manifested_label_deleted, EventType.local_item_upserted, EventType.local_item_deleted, EventType.membership_upserted, EventType.membership_deleted, EventType.organization_upserted, EventType.organization_deleted, EventType.authorization_upserted, EventType.authorization_deleted, EventType.authorization_deleted_v2, EventType.authorization_status_changed, EventType.card_authorization_upserted, EventType.card_authorization_upserted_v2, EventType.online_authorization_upserted, EventType.online_authorization_upserted_v2, EventType.capture_upserted, EventType.capture_upserted_v2, EventType.card_upserted, EventType.card_upserted_v2, EventType.card_deleted, EventType.payment_upserted, EventType.payment_deleted, EventType.refund_upserted, EventType.refund_upserted_v2, EventType.refund_capture_upserted_v2, EventType.reversal_upserted, EventType.virtual_card_capture_upserted, EventType.virtual_card_capture_deleted, EventType.virtual_card_refund_upserted, EventType.virtual_card_refund_deleted, EventType.price_book_upserted, EventType.price_book_deleted, EventType.price_book_item_upserted, EventType.price_book_item_deleted, EventType.organization_rates_published, EventType.organization_countries_published, EventType.organization_ratecard_transit_windows_published, EventType.return_upserted, EventType.return_deleted, EventType.targeting_item_upserted, EventType.targeting_item_deleted, EventType.tracking_label_event_upserted]
10793
+ @@all ||= [EventType.attribute_upserted, EventType.attribute_deleted, EventType.attribute_upserted_v2, EventType.attribute_deleted_v2, EventType.catalog_upserted, EventType.catalog_deleted, EventType.subcatalog_upserted, EventType.subcatalog_deleted, EventType.catalog_item_upserted, EventType.catalog_item_deleted, EventType.subcatalog_item_upserted, EventType.subcatalog_item_deleted, EventType.consumer_invoice_upserted, EventType.consumer_invoice_deleted, EventType.crossdock_shipment_upserted, EventType.rate_deleted, EventType.rate_upserted, EventType.available_promotions_upserted, EventType.available_promotions_deleted, EventType.allocation_deleted_v2, EventType.allocation_upserted_v2, EventType.currency_format_deleted, EventType.currency_format_upserted, EventType.experience_deleted, EventType.experience_upserted, EventType.experience_deleted_v2, EventType.experience_upserted_v2, EventType.experience_price_book_mapping_deleted, EventType.experience_price_book_mapping_upserted, EventType.experience_logistics_settings_upserted, EventType.experience_logistics_settings_deleted, EventType.item_margin_deleted, EventType.item_margin_upserted, EventType.item_sales_margin_deleted, EventType.item_sales_margin_upserted, EventType.label_format_deleted, EventType.label_format_upserted, EventType.order_deleted, EventType.order_upserted, EventType.order_deleted_v2, EventType.order_upserted_v2, EventType.order_identifier_deleted, EventType.order_identifier_upserted, EventType.order_identifier_deleted_v2, EventType.order_identifier_upserted_v2, EventType.pricing_deleted, EventType.pricing_upserted, EventType.fraud_status_changed, EventType.tier_upserted, EventType.tier_deleted, EventType.delivery_option_upserted, EventType.delivery_option_deleted, EventType.shipping_configuration_upserted, EventType.shipping_configuration_deleted, EventType.tier_upserted_v2, EventType.tier_deleted_v2, EventType.hs6_code_upserted, EventType.hs6_code_deleted, EventType.hs10_code_upserted, EventType.hs10_code_deleted, EventType.item_origin_upserted, EventType.item_origin_deleted, EventType.harmonized_item_upserted, EventType.harmonized_item_deleted, EventType.harmonized_landed_cost_upserted, EventType.fully_harmonized_item_upserted, EventType.rule_upserted, EventType.rule_deleted, EventType.serial_upserted, EventType.serial_deleted, EventType.snapshot_upserted, EventType.snapshot_deleted, EventType.label_upserted, EventType.notification_upserted, EventType.notification_deleted, EventType.manifested_label_upserted, EventType.manifested_label_deleted, EventType.local_item_upserted, EventType.local_item_deleted, EventType.membership_upserted, EventType.membership_deleted, EventType.organization_upserted, EventType.organization_deleted, EventType.authorization_upserted, EventType.authorization_deleted, EventType.authorization_deleted_v2, EventType.authorization_status_changed, EventType.card_authorization_upserted, EventType.card_authorization_upserted_v2, EventType.online_authorization_upserted, EventType.online_authorization_upserted_v2, EventType.capture_upserted, EventType.capture_upserted_v2, EventType.card_upserted, EventType.card_upserted_v2, EventType.card_deleted, EventType.payment_upserted, EventType.payment_deleted, EventType.refund_upserted, EventType.refund_upserted_v2, EventType.refund_capture_upserted_v2, EventType.reversal_upserted, EventType.capture_identifier_upserted, EventType.capture_identifier_deleted, EventType.refund_identifier_upserted, EventType.refund_identifier_deleted, EventType.virtual_card_capture_upserted, EventType.virtual_card_capture_deleted, EventType.virtual_card_refund_upserted, EventType.virtual_card_refund_deleted, EventType.price_book_upserted, EventType.price_book_deleted, EventType.price_book_item_upserted, EventType.price_book_item_deleted, EventType.organization_rates_published, EventType.organization_countries_published, EventType.organization_ratecard_transit_windows_published, EventType.return_upserted, EventType.return_deleted, EventType.targeting_item_upserted, EventType.targeting_item_deleted, EventType.targeting_item_deleted_v2, EventType.tracking_label_event_upserted]
10463
10794
  end
10464
10795
 
10465
10796
  def EventType.attribute_upserted
@@ -10510,6 +10841,14 @@ module Io
10510
10841
  @@_subcatalog_item_deleted ||= EventType.new('subcatalog_item_deleted')
10511
10842
  end
10512
10843
 
10844
+ def EventType.consumer_invoice_upserted
10845
+ @@_consumer_invoice_upserted ||= EventType.new('consumer_invoice_upserted')
10846
+ end
10847
+
10848
+ def EventType.consumer_invoice_deleted
10849
+ @@_consumer_invoice_deleted ||= EventType.new('consumer_invoice_deleted')
10850
+ end
10851
+
10513
10852
  def EventType.crossdock_shipment_upserted
10514
10853
  @@_crossdock_shipment_upserted ||= EventType.new('crossdock_shipment_upserted')
10515
10854
  end
@@ -10670,6 +11009,14 @@ module Io
10670
11009
  @@_shipping_configuration_deleted ||= EventType.new('shipping_configuration_deleted')
10671
11010
  end
10672
11011
 
11012
+ def EventType.tier_upserted_v2
11013
+ @@_tier_upserted_v2 ||= EventType.new('tier_upserted_v2')
11014
+ end
11015
+
11016
+ def EventType.tier_deleted_v2
11017
+ @@_tier_deleted_v2 ||= EventType.new('tier_deleted_v2')
11018
+ end
11019
+
10673
11020
  def EventType.hs6_code_upserted
10674
11021
  @@_hs6_code_upserted ||= EventType.new('hs6_code_upserted')
10675
11022
  end
@@ -10854,6 +11201,22 @@ module Io
10854
11201
  @@_reversal_upserted ||= EventType.new('reversal_upserted')
10855
11202
  end
10856
11203
 
11204
+ def EventType.capture_identifier_upserted
11205
+ @@_capture_identifier_upserted ||= EventType.new('capture_identifier_upserted')
11206
+ end
11207
+
11208
+ def EventType.capture_identifier_deleted
11209
+ @@_capture_identifier_deleted ||= EventType.new('capture_identifier_deleted')
11210
+ end
11211
+
11212
+ def EventType.refund_identifier_upserted
11213
+ @@_refund_identifier_upserted ||= EventType.new('refund_identifier_upserted')
11214
+ end
11215
+
11216
+ def EventType.refund_identifier_deleted
11217
+ @@_refund_identifier_deleted ||= EventType.new('refund_identifier_deleted')
11218
+ end
11219
+
10857
11220
  def EventType.virtual_card_capture_upserted
10858
11221
  @@_virtual_card_capture_upserted ||= EventType.new('virtual_card_capture_upserted')
10859
11222
  end
@@ -10914,6 +11277,10 @@ module Io
10914
11277
  @@_targeting_item_deleted ||= EventType.new('targeting_item_deleted')
10915
11278
  end
10916
11279
 
11280
+ def EventType.targeting_item_deleted_v2
11281
+ @@_targeting_item_deleted_v2 ||= EventType.new('targeting_item_deleted_v2')
11282
+ end
11283
+
10917
11284
  def EventType.tracking_label_event_upserted
10918
11285
  @@_tracking_label_event_upserted ||= EventType.new('tracking_label_event_upserted')
10919
11286
  end
@@ -11378,7 +11745,7 @@ module Io
11378
11745
  @@_digital ||= FulfillmentMethodValue.new('digital')
11379
11746
  end
11380
11747
 
11381
- # Indicates item will be shipped in a phystical package.
11748
+ # Indicates item will be shipped in a physical package.
11382
11749
  def FulfillmentMethodValue.physical
11383
11750
  @@_physical ||= FulfillmentMethodValue.new('physical')
11384
11751
  end
@@ -11571,7 +11938,7 @@ module Io
11571
11938
  @@_customs_descriptions ||= ImportType.new('customs_descriptions')
11572
11939
  end
11573
11940
 
11574
- # Provides upload of customs descriptions and corresponding tarrifs. These are
11941
+ # Provides upload of customs descriptions and corresponding tariffs. These are
11575
11942
  # independent of any catalog, product, or item.
11576
11943
  def ImportType.customs_description_tariffs
11577
11944
  @@_customs_description_tariffs ||= ImportType.new('customs_description_tariffs')
@@ -13773,7 +14140,7 @@ module Io
13773
14140
  @@_no_remaining_balance ||= ReversalErrorCode.new('no_remaining_balance')
13774
14141
  end
13775
14142
 
13776
- # Indiciates a request for a partial reversal when the underlying processor does
14143
+ # Indicates a request for a partial reversal when the underlying processor does
13777
14144
  # not support it
13778
14145
  def ReversalErrorCode.partial_reversal_not_supported
13779
14146
  @@_partial_reversal_not_supported ||= ReversalErrorCode.new('partial_reversal_not_supported')
@@ -14406,6 +14773,52 @@ module Io
14406
14773
 
14407
14774
  end
14408
14775
 
14776
+ class TaxVerificationResult
14777
+
14778
+ attr_reader :value
14779
+
14780
+ def initialize(value)
14781
+ @value = HttpClient::Preconditions.assert_class('value', value, String)
14782
+ end
14783
+
14784
+ # Returns the instance of TaxVerificationResult for this value, creating a new instance for an unknown value
14785
+ def TaxVerificationResult.apply(value)
14786
+ if value.instance_of?(TaxVerificationResult)
14787
+ value
14788
+ else
14789
+ HttpClient::Preconditions.assert_class_or_nil('value', value, String)
14790
+ value.nil? ? nil : (from_string(value) || TaxVerificationResult.new(value))
14791
+ end
14792
+ end
14793
+
14794
+ # Returns the instance of TaxVerificationResult for this value, or nil if not found
14795
+ def TaxVerificationResult.from_string(value)
14796
+ HttpClient::Preconditions.assert_class('value', value, String)
14797
+ TaxVerificationResult.ALL.find { |v| v.value == value }
14798
+ end
14799
+
14800
+ def TaxVerificationResult.ALL
14801
+ @@all ||= [TaxVerificationResult.valid, TaxVerificationResult.invalid, TaxVerificationResult.unable_to_validate]
14802
+ end
14803
+
14804
+ def TaxVerificationResult.valid
14805
+ @@_valid ||= TaxVerificationResult.new('valid')
14806
+ end
14807
+
14808
+ def TaxVerificationResult.invalid
14809
+ @@_invalid ||= TaxVerificationResult.new('invalid')
14810
+ end
14811
+
14812
+ def TaxVerificationResult.unable_to_validate
14813
+ @@_unable_to_validate ||= TaxVerificationResult.new('unable_to_validate')
14814
+ end
14815
+
14816
+ def to_hash
14817
+ value
14818
+ end
14819
+
14820
+ end
14821
+
14409
14822
  class TaxabilityType
14410
14823
 
14411
14824
  attr_reader :value
@@ -15011,7 +15424,7 @@ module Io
15011
15424
  @@_change ||= UpdateType.new('change')
15012
15425
  end
15013
15426
 
15014
- # Set aboluste quantity to new value with no regard for previous updates
15427
+ # Set absolute quantity to new value with no regard for previous updates
15015
15428
  def UpdateType.set
15016
15429
  @@_set ||= UpdateType.new('set')
15017
15430
  end
@@ -16775,6 +17188,132 @@ module Io
16775
17188
 
16776
17189
  end
16777
17190
 
17191
+ class CaptureIdentifier
17192
+
17193
+ attr_reader :id, :capture, :identifier, :primary
17194
+
17195
+ def initialize(incoming={})
17196
+ opts = HttpClient::Helper.symbolize_keys(incoming)
17197
+ HttpClient::Preconditions.require_keys(opts, [:id, :capture, :identifier, :primary], 'CaptureIdentifier')
17198
+ @id = HttpClient::Preconditions.assert_class('id', opts.delete(:id), String)
17199
+ @capture = (x = opts.delete(:capture); x.is_a?(::Io::Flow::V0::Models::CaptureReference) ? x : ::Io::Flow::V0::Models::CaptureReference.new(x))
17200
+ @identifier = HttpClient::Preconditions.assert_class('identifier', opts.delete(:identifier), String)
17201
+ @primary = HttpClient::Preconditions.assert_boolean('primary', opts.delete(:primary))
17202
+ end
17203
+
17204
+ def to_json
17205
+ JSON.dump(to_hash)
17206
+ end
17207
+
17208
+ def copy(incoming={})
17209
+ CaptureIdentifier.new(to_hash.merge(HttpClient::Helper.symbolize_keys(incoming)))
17210
+ end
17211
+
17212
+ def to_hash
17213
+ {
17214
+ :id => id,
17215
+ :capture => capture.to_hash,
17216
+ :identifier => identifier,
17217
+ :primary => primary
17218
+ }
17219
+ end
17220
+
17221
+ end
17222
+
17223
+ class CaptureIdentifierDeleted < Event
17224
+
17225
+ attr_reader :event_id, :timestamp, :organization, :identifier
17226
+
17227
+ def initialize(incoming={})
17228
+ super(:discriminator => Event::Types::CAPTURE_IDENTIFIER_DELETED)
17229
+ opts = HttpClient::Helper.symbolize_keys(incoming)
17230
+ HttpClient::Preconditions.require_keys(opts, [:event_id, :timestamp, :organization, :identifier], 'CaptureIdentifierDeleted')
17231
+ @event_id = HttpClient::Preconditions.assert_class('event_id', opts.delete(:event_id), String)
17232
+ @timestamp = HttpClient::Preconditions.assert_class('timestamp', HttpClient::Helper.to_date_time_iso8601(opts.delete(:timestamp)), DateTime)
17233
+ @organization = HttpClient::Preconditions.assert_class('organization', opts.delete(:organization), String)
17234
+ @identifier = (x = opts.delete(:identifier); x.is_a?(::Io::Flow::V0::Models::CaptureIdentifier) ? x : ::Io::Flow::V0::Models::CaptureIdentifier.new(x))
17235
+ end
17236
+
17237
+ def to_json
17238
+ JSON.dump(to_hash)
17239
+ end
17240
+
17241
+ def copy(incoming={})
17242
+ CaptureIdentifierDeleted.new(subtype_to_hash.merge(HttpClient::Helper.symbolize_keys(incoming)))
17243
+ end
17244
+
17245
+ def subtype_to_hash
17246
+ {
17247
+ :event_id => event_id,
17248
+ :timestamp => timestamp,
17249
+ :organization => organization,
17250
+ :identifier => identifier.to_hash
17251
+ }
17252
+ end
17253
+
17254
+ end
17255
+
17256
+ class CaptureIdentifierUpserted < Event
17257
+
17258
+ attr_reader :event_id, :timestamp, :organization, :identifier
17259
+
17260
+ def initialize(incoming={})
17261
+ super(:discriminator => Event::Types::CAPTURE_IDENTIFIER_UPSERTED)
17262
+ opts = HttpClient::Helper.symbolize_keys(incoming)
17263
+ HttpClient::Preconditions.require_keys(opts, [:event_id, :timestamp, :organization, :identifier], 'CaptureIdentifierUpserted')
17264
+ @event_id = HttpClient::Preconditions.assert_class('event_id', opts.delete(:event_id), String)
17265
+ @timestamp = HttpClient::Preconditions.assert_class('timestamp', HttpClient::Helper.to_date_time_iso8601(opts.delete(:timestamp)), DateTime)
17266
+ @organization = HttpClient::Preconditions.assert_class('organization', opts.delete(:organization), String)
17267
+ @identifier = (x = opts.delete(:identifier); x.is_a?(::Io::Flow::V0::Models::CaptureIdentifier) ? x : ::Io::Flow::V0::Models::CaptureIdentifier.new(x))
17268
+ end
17269
+
17270
+ def to_json
17271
+ JSON.dump(to_hash)
17272
+ end
17273
+
17274
+ def copy(incoming={})
17275
+ CaptureIdentifierUpserted.new(subtype_to_hash.merge(HttpClient::Helper.symbolize_keys(incoming)))
17276
+ end
17277
+
17278
+ def subtype_to_hash
17279
+ {
17280
+ :event_id => event_id,
17281
+ :timestamp => timestamp,
17282
+ :organization => organization,
17283
+ :identifier => identifier.to_hash
17284
+ }
17285
+ end
17286
+
17287
+ end
17288
+
17289
+ class CaptureReference
17290
+
17291
+ attr_reader :id, :key
17292
+
17293
+ def initialize(incoming={})
17294
+ opts = HttpClient::Helper.symbolize_keys(incoming)
17295
+ HttpClient::Preconditions.require_keys(opts, [:id, :key], 'CaptureReference')
17296
+ @id = HttpClient::Preconditions.assert_class('id', opts.delete(:id), String)
17297
+ @key = HttpClient::Preconditions.assert_class('key', opts.delete(:key), String)
17298
+ end
17299
+
17300
+ def to_json
17301
+ JSON.dump(to_hash)
17302
+ end
17303
+
17304
+ def copy(incoming={})
17305
+ CaptureReference.new(to_hash.merge(HttpClient::Helper.symbolize_keys(incoming)))
17306
+ end
17307
+
17308
+ def to_hash
17309
+ {
17310
+ :id => id,
17311
+ :key => key
17312
+ }
17313
+ end
17314
+
17315
+ end
17316
+
16778
17317
  class CaptureUpserted < Event
16779
17318
 
16780
17319
  attr_reader :event_id, :timestamp, :organization, :key, :authorization_key, :amount, :currency, :created_at
@@ -18474,12 +19013,13 @@ module Io
18474
19013
  # order. This may represent either the full order or a partial fulfillment.
18475
19014
  class ConsumerInvoice
18476
19015
 
18477
- attr_reader :id, :key, :order, :items, :documents, :attributes
19016
+ attr_reader :id, :date, :key, :order, :items, :documents, :attributes
18478
19017
 
18479
19018
  def initialize(incoming={})
18480
19019
  opts = HttpClient::Helper.symbolize_keys(incoming)
18481
- HttpClient::Preconditions.require_keys(opts, [:id, :key, :order, :items, :documents, :attributes], 'ConsumerInvoice')
19020
+ HttpClient::Preconditions.require_keys(opts, [:id, :date, :key, :order, :items, :documents, :attributes], 'ConsumerInvoice')
18482
19021
  @id = HttpClient::Preconditions.assert_class('id', opts.delete(:id), String)
19022
+ @date = HttpClient::Preconditions.assert_class('date', HttpClient::Helper.to_date_time_iso8601(opts.delete(:date)), DateTime)
18483
19023
  @key = HttpClient::Preconditions.assert_class('key', opts.delete(:key), String)
18484
19024
  @order = (x = opts.delete(:order); x.is_a?(::Io::Flow::V0::Models::OrderReference) ? x : ::Io::Flow::V0::Models::OrderReference.new(x))
18485
19025
  @items = HttpClient::Preconditions.assert_class('items', opts.delete(:items), Array).map { |v| (x = v; x.is_a?(::Io::Flow::V0::Models::ConsumerInvoiceItem) ? x : ::Io::Flow::V0::Models::ConsumerInvoiceItem.new(x)) }
@@ -18498,6 +19038,7 @@ module Io
18498
19038
  def to_hash
18499
19039
  {
18500
19040
  :id => id,
19041
+ :date => date,
18501
19042
  :key => key,
18502
19043
  :order => order.to_hash,
18503
19044
  :items => items.map { |o| o.to_hash },
@@ -18508,14 +19049,48 @@ module Io
18508
19049
 
18509
19050
  end
18510
19051
 
19052
+ class ConsumerInvoiceDeleted < Event
19053
+
19054
+ attr_reader :event_id, :timestamp, :organization, :consumer_invoice
19055
+
19056
+ def initialize(incoming={})
19057
+ super(:discriminator => Event::Types::CONSUMER_INVOICE_DELETED)
19058
+ opts = HttpClient::Helper.symbolize_keys(incoming)
19059
+ HttpClient::Preconditions.require_keys(opts, [:event_id, :timestamp, :organization, :consumer_invoice], 'ConsumerInvoiceDeleted')
19060
+ @event_id = HttpClient::Preconditions.assert_class('event_id', opts.delete(:event_id), String)
19061
+ @timestamp = HttpClient::Preconditions.assert_class('timestamp', HttpClient::Helper.to_date_time_iso8601(opts.delete(:timestamp)), DateTime)
19062
+ @organization = HttpClient::Preconditions.assert_class('organization', opts.delete(:organization), String)
19063
+ @consumer_invoice = (x = opts.delete(:consumer_invoice); x.is_a?(::Io::Flow::V0::Models::ConsumerInvoice) ? x : ::Io::Flow::V0::Models::ConsumerInvoice.new(x))
19064
+ end
19065
+
19066
+ def to_json
19067
+ JSON.dump(to_hash)
19068
+ end
19069
+
19070
+ def copy(incoming={})
19071
+ ConsumerInvoiceDeleted.new(subtype_to_hash.merge(HttpClient::Helper.symbolize_keys(incoming)))
19072
+ end
19073
+
19074
+ def subtype_to_hash
19075
+ {
19076
+ :event_id => event_id,
19077
+ :timestamp => timestamp,
19078
+ :organization => organization,
19079
+ :consumer_invoice => consumer_invoice.to_hash
19080
+ }
19081
+ end
19082
+
19083
+ end
19084
+
18511
19085
  class ConsumerInvoiceDocument
18512
19086
 
18513
- attr_reader :type, :url
19087
+ attr_reader :type, :language, :url
18514
19088
 
18515
19089
  def initialize(incoming={})
18516
19090
  opts = HttpClient::Helper.symbolize_keys(incoming)
18517
- HttpClient::Preconditions.require_keys(opts, [:type, :url], 'ConsumerInvoiceDocument')
19091
+ HttpClient::Preconditions.require_keys(opts, [:type, :language, :url], 'ConsumerInvoiceDocument')
18518
19092
  @type = (x = opts.delete(:type); x.is_a?(::Io::Flow::V0::Models::ConsumerInvoiceDocumentType) ? x : ::Io::Flow::V0::Models::ConsumerInvoiceDocumentType.apply(x))
19093
+ @language = HttpClient::Preconditions.assert_class('language', opts.delete(:language), String)
18519
19094
  @url = HttpClient::Preconditions.assert_class('url', opts.delete(:url), String)
18520
19095
  end
18521
19096
 
@@ -18530,6 +19105,7 @@ module Io
18530
19105
  def to_hash
18531
19106
  {
18532
19107
  :type => type.value,
19108
+ :language => language,
18533
19109
  :url => url
18534
19110
  }
18535
19111
  end
@@ -18622,15 +19198,18 @@ module Io
18622
19198
 
18623
19199
  end
18624
19200
 
18625
- # Provides the underlying URL to a given document for this invoice
18626
- class ConsumerInvoiceUrl
19201
+ class ConsumerInvoiceUpserted < Event
18627
19202
 
18628
- attr_reader :url
19203
+ attr_reader :event_id, :timestamp, :organization, :consumer_invoice
18629
19204
 
18630
19205
  def initialize(incoming={})
19206
+ super(:discriminator => Event::Types::CONSUMER_INVOICE_UPSERTED)
18631
19207
  opts = HttpClient::Helper.symbolize_keys(incoming)
18632
- HttpClient::Preconditions.require_keys(opts, [:url], 'ConsumerInvoiceUrl')
18633
- @url = HttpClient::Preconditions.assert_class('url', opts.delete(:url), String)
19208
+ HttpClient::Preconditions.require_keys(opts, [:event_id, :timestamp, :organization, :consumer_invoice], 'ConsumerInvoiceUpserted')
19209
+ @event_id = HttpClient::Preconditions.assert_class('event_id', opts.delete(:event_id), String)
19210
+ @timestamp = HttpClient::Preconditions.assert_class('timestamp', HttpClient::Helper.to_date_time_iso8601(opts.delete(:timestamp)), DateTime)
19211
+ @organization = HttpClient::Preconditions.assert_class('organization', opts.delete(:organization), String)
19212
+ @consumer_invoice = (x = opts.delete(:consumer_invoice); x.is_a?(::Io::Flow::V0::Models::ConsumerInvoice) ? x : ::Io::Flow::V0::Models::ConsumerInvoice.new(x))
18634
19213
  end
18635
19214
 
18636
19215
  def to_json
@@ -18638,12 +19217,15 @@ module Io
18638
19217
  end
18639
19218
 
18640
19219
  def copy(incoming={})
18641
- ConsumerInvoiceUrl.new(to_hash.merge(HttpClient::Helper.symbolize_keys(incoming)))
19220
+ ConsumerInvoiceUpserted.new(subtype_to_hash.merge(HttpClient::Helper.symbolize_keys(incoming)))
18642
19221
  end
18643
19222
 
18644
- def to_hash
19223
+ def subtype_to_hash
18645
19224
  {
18646
- :url => url
19225
+ :event_id => event_id,
19226
+ :timestamp => timestamp,
19227
+ :organization => organization,
19228
+ :consumer_invoice => consumer_invoice.to_hash
18647
19229
  }
18648
19230
  end
18649
19231
 
@@ -20504,13 +21086,13 @@ module Io
20504
21086
 
20505
21087
  class ExperienceLogisticsSettings
20506
21088
 
20507
- attr_reader :id, :experience_key, :shipping_configuration
21089
+ attr_reader :id, :experience, :shipping_configuration
20508
21090
 
20509
21091
  def initialize(incoming={})
20510
21092
  opts = HttpClient::Helper.symbolize_keys(incoming)
20511
- HttpClient::Preconditions.require_keys(opts, [:id, :experience_key, :shipping_configuration], 'ExperienceLogisticsSettings')
21093
+ HttpClient::Preconditions.require_keys(opts, [:id, :experience, :shipping_configuration], 'ExperienceLogisticsSettings')
20512
21094
  @id = HttpClient::Preconditions.assert_class('id', opts.delete(:id), String)
20513
- @experience_key = HttpClient::Preconditions.assert_class('experience_key', opts.delete(:experience_key), String)
21095
+ @experience = (x = opts.delete(:experience); x.is_a?(::Io::Flow::V0::Models::ExperienceOverview) ? x : ::Io::Flow::V0::Models::ExperienceOverview.new(x))
20514
21096
  @shipping_configuration = (x = opts.delete(:shipping_configuration); x.is_a?(::Io::Flow::V0::Models::ShippingConfigurationReference) ? x : ::Io::Flow::V0::Models::ShippingConfigurationReference.new(x))
20515
21097
  end
20516
21098
 
@@ -20525,7 +21107,7 @@ module Io
20525
21107
  def to_hash
20526
21108
  {
20527
21109
  :id => id,
20528
- :experience_key => experience_key,
21110
+ :experience => experience.to_hash,
20529
21111
  :shipping_configuration => shipping_configuration.to_hash
20530
21112
  }
20531
21113
  end
@@ -20704,6 +21286,34 @@ module Io
20704
21286
 
20705
21287
  end
20706
21288
 
21289
+ class ExperienceOverview
21290
+
21291
+ attr_reader :id, :key
21292
+
21293
+ def initialize(incoming={})
21294
+ opts = HttpClient::Helper.symbolize_keys(incoming)
21295
+ HttpClient::Preconditions.require_keys(opts, [:id, :key], 'ExperienceOverview')
21296
+ @id = HttpClient::Preconditions.assert_class('id', opts.delete(:id), String)
21297
+ @key = HttpClient::Preconditions.assert_class('key', opts.delete(:key), String)
21298
+ end
21299
+
21300
+ def to_json
21301
+ JSON.dump(to_hash)
21302
+ end
21303
+
21304
+ def copy(incoming={})
21305
+ ExperienceOverview.new(to_hash.merge(HttpClient::Helper.symbolize_keys(incoming)))
21306
+ end
21307
+
21308
+ def to_hash
21309
+ {
21310
+ :id => id,
21311
+ :key => key
21312
+ }
21313
+ end
21314
+
21315
+ end
21316
+
20707
21317
  class ExperiencePaymentMethodRuleForm
20708
21318
 
20709
21319
  attr_reader :payment_method_id, :tags
@@ -21851,8 +22461,8 @@ module Io
21851
22461
 
21852
22462
  end
21853
22463
 
21854
- # An error of some type has occured. The most common error will be validation on
21855
- # input. See messages for details.
22464
+ # An error of some type has occurred. The most common error will be validation
22465
+ # on input. See messages for details.
21856
22466
  class GenericError
21857
22467
 
21858
22468
  attr_reader :code, :messages
@@ -21908,6 +22518,41 @@ module Io
21908
22518
 
21909
22519
  end
21910
22520
 
22521
+ # Form used to update geographic preferences
22522
+ class GeoForm
22523
+
22524
+ attr_reader :country, :currency, :language, :locale, :experience
22525
+
22526
+ def initialize(incoming={})
22527
+ opts = HttpClient::Helper.symbolize_keys(incoming)
22528
+ HttpClient::Preconditions.require_keys(opts, [:country, :currency, :language, :locale, :experience], 'GeoForm')
22529
+ @country = HttpClient::Preconditions.assert_class('country', opts.delete(:country), String)
22530
+ @currency = HttpClient::Preconditions.assert_class('currency', opts.delete(:currency), String)
22531
+ @language = HttpClient::Preconditions.assert_class('language', opts.delete(:language), String)
22532
+ @locale = HttpClient::Preconditions.assert_class('locale', opts.delete(:locale), String)
22533
+ @experience = HttpClient::Preconditions.assert_class('experience', opts.delete(:experience), String)
22534
+ end
22535
+
22536
+ def to_json
22537
+ JSON.dump(to_hash)
22538
+ end
22539
+
22540
+ def copy(incoming={})
22541
+ GeoForm.new(to_hash.merge(HttpClient::Helper.symbolize_keys(incoming)))
22542
+ end
22543
+
22544
+ def to_hash
22545
+ {
22546
+ :country => country,
22547
+ :currency => currency,
22548
+ :language => language,
22549
+ :locale => locale,
22550
+ :experience => experience
22551
+ }
22552
+ end
22553
+
22554
+ end
22555
+
21911
22556
  class HarmonizationDocument < Document
21912
22557
 
21913
22558
  attr_reader :code, :categories, :origin
@@ -22496,13 +23141,14 @@ module Io
22496
23141
  # of origin).
22497
23142
  class HarmonizedLandedCost
22498
23143
 
22499
- attr_reader :address, :items
23144
+ attr_reader :address, :items, :tax_registration
22500
23145
 
22501
23146
  def initialize(incoming={})
22502
23147
  opts = HttpClient::Helper.symbolize_keys(incoming)
22503
23148
  HttpClient::Preconditions.require_keys(opts, [:address, :items], 'HarmonizedLandedCost')
22504
23149
  @address = (x = opts.delete(:address); x.is_a?(::Io::Flow::V0::Models::Address) ? x : ::Io::Flow::V0::Models::Address.new(x))
22505
23150
  @items = HttpClient::Preconditions.assert_class('items', opts.delete(:items), Array).map { |v| (x = v; x.is_a?(::Io::Flow::V0::Models::HarmonizedLandedCostItem) ? x : ::Io::Flow::V0::Models::HarmonizedLandedCostItem.new(x)) }
23151
+ @tax_registration = (x = opts.delete(:tax_registration); x.nil? ? nil : (x = x; x.is_a?(::Io::Flow::V0::Models::TaxRegistration) ? x : ::Io::Flow::V0::Models::TaxRegistration.new(x)))
22506
23152
  end
22507
23153
 
22508
23154
  def to_json
@@ -22516,7 +23162,8 @@ module Io
22516
23162
  def to_hash
22517
23163
  {
22518
23164
  :address => address.to_hash,
22519
- :items => items.map { |o| o.to_hash }
23165
+ :items => items.map { |o| o.to_hash },
23166
+ :tax_registration => tax_registration.nil? ? nil : tax_registration.to_hash
22520
23167
  }
22521
23168
  end
22522
23169
 
@@ -22526,7 +23173,7 @@ module Io
22526
23173
  # items going to a specific destination country
22527
23174
  class HarmonizedLandedCostForm
22528
23175
 
22529
- attr_reader :address, :item_numbers, :source_address, :order_number, :line_items
23176
+ attr_reader :address, :item_numbers, :source_address, :order_number, :line_items, :tax_registration_id
22530
23177
 
22531
23178
  def initialize(incoming={})
22532
23179
  opts = HttpClient::Helper.symbolize_keys(incoming)
@@ -22536,6 +23183,7 @@ module Io
22536
23183
  @source_address = (x = opts.delete(:source_address); x.nil? ? nil : (x = x; x.is_a?(::Io::Flow::V0::Models::Address) ? x : ::Io::Flow::V0::Models::Address.new(x)))
22537
23184
  @order_number = (x = opts.delete(:order_number); x.nil? ? nil : HttpClient::Preconditions.assert_class('order_number', x, String))
22538
23185
  @line_items = (x = opts.delete(:line_items); x.nil? ? nil : HttpClient::Preconditions.assert_class('line_items', x, Array).map { |v| (x = v; x.is_a?(::Io::Flow::V0::Models::LineItem) ? x : ::Io::Flow::V0::Models::LineItem.new(x)) })
23186
+ @tax_registration_id = (x = opts.delete(:tax_registration_id); x.nil? ? nil : HttpClient::Preconditions.assert_class('tax_registration_id', x, String))
22539
23187
  end
22540
23188
 
22541
23189
  def to_json
@@ -22552,7 +23200,8 @@ module Io
22552
23200
  :item_numbers => item_numbers,
22553
23201
  :source_address => source_address.nil? ? nil : source_address.to_hash,
22554
23202
  :order_number => order_number,
22555
- :line_items => line_items.nil? ? nil : line_items.map { |o| o.to_hash }
23203
+ :line_items => line_items.nil? ? nil : line_items.map { |o| o.to_hash },
23204
+ :tax_registration_id => tax_registration_id
22556
23205
  }
22557
23206
  end
22558
23207
 
@@ -23019,6 +23668,31 @@ module Io
23019
23668
 
23020
23669
  end
23021
23670
 
23671
+ class IdentifierForm
23672
+
23673
+ attr_reader :primary
23674
+
23675
+ def initialize(incoming={})
23676
+ opts = HttpClient::Helper.symbolize_keys(incoming)
23677
+ @primary = (x = opts.delete(:primary); x.nil? ? nil : HttpClient::Preconditions.assert_boolean('primary', x))
23678
+ end
23679
+
23680
+ def to_json
23681
+ JSON.dump(to_hash)
23682
+ end
23683
+
23684
+ def copy(incoming={})
23685
+ IdentifierForm.new(to_hash.merge(HttpClient::Helper.symbolize_keys(incoming)))
23686
+ end
23687
+
23688
+ def to_hash
23689
+ {
23690
+ :primary => primary
23691
+ }
23692
+ end
23693
+
23694
+ end
23695
+
23022
23696
  # The URL to an image, with optional tags. Flow Commerce primarily uses images
23023
23697
  # to enhance the administrative tools (e.g. showing an item image in console)
23024
23698
  class Image
@@ -25612,7 +26286,7 @@ module Io
25612
26286
  end
25613
26287
 
25614
26288
  # The Local Item represents all of the data for a given item that is localized
25615
- # to a given experinece.
26289
+ # to a given experience.
25616
26290
  class LocalItem
25617
26291
 
25618
26292
  attr_reader :id, :experience, :item, :pricing, :status
@@ -26186,7 +26860,7 @@ module Io
26186
26860
 
26187
26861
  end
26188
26862
 
26189
- # Represents closeout of a group of labels that have been transfered to the
26863
+ # Represents closeout of a group of labels that have been transferred to the
26190
26864
  # carrier for shipping
26191
26865
  class Manifest
26192
26866
 
@@ -26623,6 +27297,78 @@ module Io
26623
27297
 
26624
27298
  end
26625
27299
 
27300
+ # The merchant of record entity provides the legal name and address of the
27301
+ # specific Flow entity serving as merchant of record.
27302
+ class MerchantOfRecordEntity
27303
+
27304
+ attr_reader :name, :vat, :streets, :city, :province, :postal, :country, :phone, :email
27305
+
27306
+ def initialize(incoming={})
27307
+ opts = HttpClient::Helper.symbolize_keys(incoming)
27308
+ HttpClient::Preconditions.require_keys(opts, [:name, :vat, :streets, :city, :country], 'MerchantOfRecordEntity')
27309
+ @name = HttpClient::Preconditions.assert_class('name', opts.delete(:name), String)
27310
+ @vat = (x = opts.delete(:vat); x.is_a?(::Io::Flow::V0::Models::MerchantOfRecordEntityRegistration) ? x : ::Io::Flow::V0::Models::MerchantOfRecordEntityRegistration.new(x))
27311
+ @streets = HttpClient::Preconditions.assert_class('streets', opts.delete(:streets), Array).map { |v| HttpClient::Preconditions.assert_class('streets', v, String) }
27312
+ @city = HttpClient::Preconditions.assert_class('city', opts.delete(:city), String)
27313
+ @province = (x = opts.delete(:province); x.nil? ? nil : HttpClient::Preconditions.assert_class('province', x, String))
27314
+ @postal = (x = opts.delete(:postal); x.nil? ? nil : HttpClient::Preconditions.assert_class('postal', x, String))
27315
+ @country = HttpClient::Preconditions.assert_class('country', opts.delete(:country), String)
27316
+ @phone = (x = opts.delete(:phone); x.nil? ? nil : HttpClient::Preconditions.assert_class('phone', x, String))
27317
+ @email = (x = opts.delete(:email); x.nil? ? nil : HttpClient::Preconditions.assert_class('email', x, String))
27318
+ end
27319
+
27320
+ def to_json
27321
+ JSON.dump(to_hash)
27322
+ end
27323
+
27324
+ def copy(incoming={})
27325
+ MerchantOfRecordEntity.new(to_hash.merge(HttpClient::Helper.symbolize_keys(incoming)))
27326
+ end
27327
+
27328
+ def to_hash
27329
+ {
27330
+ :name => name,
27331
+ :vat => vat.to_hash,
27332
+ :streets => streets,
27333
+ :city => city,
27334
+ :province => province,
27335
+ :postal => postal,
27336
+ :country => country,
27337
+ :phone => phone,
27338
+ :email => email
27339
+ }
27340
+ end
27341
+
27342
+ end
27343
+
27344
+ class MerchantOfRecordEntityRegistration
27345
+
27346
+ attr_reader :number, :country
27347
+
27348
+ def initialize(incoming={})
27349
+ opts = HttpClient::Helper.symbolize_keys(incoming)
27350
+ HttpClient::Preconditions.require_keys(opts, [:number, :country], 'MerchantOfRecordEntityRegistration')
27351
+ @number = HttpClient::Preconditions.assert_class('number', opts.delete(:number), String)
27352
+ @country = HttpClient::Preconditions.assert_class('country', opts.delete(:country), String)
27353
+ end
27354
+
27355
+ def to_json
27356
+ JSON.dump(to_hash)
27357
+ end
27358
+
27359
+ def copy(incoming={})
27360
+ MerchantOfRecordEntityRegistration.new(to_hash.merge(HttpClient::Helper.symbolize_keys(incoming)))
27361
+ end
27362
+
27363
+ def to_hash
27364
+ {
27365
+ :number => number,
27366
+ :country => country
27367
+ }
27368
+ end
27369
+
27370
+ end
27371
+
26626
27372
  # Creates an online payment
26627
27373
  class MerchantOfRecordPaymentForm < PaymentForm
26628
27374
 
@@ -27130,7 +27876,7 @@ module Io
27130
27876
  # order.
27131
27877
  class Order < ExpandableOrder
27132
27878
 
27133
- attr_reader :id, :number, :merchant_of_record, :experience, :customer, :delivered_duty, :destination, :expires_at, :items, :deliveries, :selections, :prices, :total, :attributes, :submitted_at, :lines, :identifiers, :promotions, :payments, :balance, :rules
27879
+ attr_reader :id, :number, :merchant_of_record, :experience, :customer, :delivered_duty, :destination, :expires_at, :items, :deliveries, :selections, :prices, :total, :attributes, :submitted_at, :lines, :identifiers, :promotions, :payments, :balance, :rules, :tax_registration
27134
27880
 
27135
27881
  def initialize(incoming={})
27136
27882
  super(:discriminator => ExpandableOrder::Types::ORDER)
@@ -27157,6 +27903,7 @@ module Io
27157
27903
  @payments = (x = opts.delete(:payments); x.nil? ? nil : HttpClient::Preconditions.assert_class('payments', x, Array).map { |v| (x = v; x.is_a?(::Io::Flow::V0::Models::OrderPayment) ? x : ::Io::Flow::V0::Models::OrderPayment.new(x)) })
27158
27904
  @balance = (x = opts.delete(:balance); x.nil? ? nil : (x = x; x.is_a?(::Io::Flow::V0::Models::LocalizedTotal) ? x : ::Io::Flow::V0::Models::LocalizedTotal.new(x)))
27159
27905
  @rules = (x = opts.delete(:rules); x.nil? ? nil : (x = x; x.is_a?(::Io::Flow::V0::Models::OrderRulesSummary) ? x : ::Io::Flow::V0::Models::OrderRulesSummary.new(x)))
27906
+ @tax_registration = (x = opts.delete(:tax_registration); x.nil? ? nil : (x = x; x.is_a?(::Io::Flow::V0::Models::TaxRegistration) ? x : ::Io::Flow::V0::Models::TaxRegistration.new(x)))
27160
27907
  end
27161
27908
 
27162
27909
  def to_json
@@ -27189,7 +27936,8 @@ module Io
27189
27936
  :promotions => promotions.nil? ? nil : promotions.to_hash,
27190
27937
  :payments => payments.nil? ? nil : payments.map { |o| o.to_hash },
27191
27938
  :balance => balance.nil? ? nil : balance.to_hash,
27192
- :rules => rules.nil? ? nil : rules.to_hash
27939
+ :rules => rules.nil? ? nil : rules.to_hash,
27940
+ :tax_registration => tax_registration.nil? ? nil : tax_registration.to_hash
27193
27941
  }
27194
27942
  end
27195
27943
 
@@ -28002,7 +28750,7 @@ module Io
28002
28750
  # Represents a top-level order price detail, e.g. 'Subtotal' or 'VAT'.
28003
28751
  class OrderPriceDetail
28004
28752
 
28005
- attr_reader :key, :currency, :amount, :label, :base, :components, :name
28753
+ attr_reader :key, :currency, :amount, :label, :base, :components, :name, :rate
28006
28754
 
28007
28755
  def initialize(incoming={})
28008
28756
  opts = HttpClient::Helper.symbolize_keys(incoming)
@@ -28014,6 +28762,7 @@ module Io
28014
28762
  @base = (x = opts.delete(:base); x.is_a?(::Io::Flow::V0::Models::Price) ? x : ::Io::Flow::V0::Models::Price.new(x))
28015
28763
  @components = HttpClient::Preconditions.assert_class('components', opts.delete(:components), Array).map { |v| (x = v; x.is_a?(::Io::Flow::V0::Models::OrderPriceDetailComponent) ? x : ::Io::Flow::V0::Models::OrderPriceDetailComponent.new(x)) }
28016
28764
  @name = (x = opts.delete(:name); x.nil? ? nil : HttpClient::Preconditions.assert_class('name', x, String))
28765
+ @rate = (x = opts.delete(:rate); x.nil? ? nil : HttpClient::Preconditions.assert_class('rate', HttpClient::Helper.to_big_decimal(x), BigDecimal))
28017
28766
  end
28018
28767
 
28019
28768
  def to_json
@@ -28032,7 +28781,8 @@ module Io
28032
28781
  :label => label,
28033
28782
  :base => base.to_hash,
28034
28783
  :components => components.map { |o| o.to_hash },
28035
- :name => name
28784
+ :name => name,
28785
+ :rate => rate
28036
28786
  }
28037
28787
  end
28038
28788
 
@@ -28229,7 +28979,7 @@ module Io
28229
28979
 
28230
28980
  class OrderUpserted < Event
28231
28981
 
28232
- attr_reader :event_id, :timestamp, :organization, :number, :environment, :experience_id, :expires_at, :customer, :selections, :items, :destination, :deliveries, :prices, :order_id, :payments, :discount, :delivered_duty, :total, :created_at, :updated_at, :submitted_at, :lines, :attributes, :geo, :merchant_of_record
28982
+ attr_reader :event_id, :timestamp, :organization, :number, :environment, :experience_id, :expires_at, :customer, :selections, :items, :destination, :deliveries, :prices, :order_id, :payments, :discount, :delivered_duty, :total, :created_at, :updated_at, :submitted_at, :lines, :attributes, :geo, :merchant_of_record, :tax_registration
28233
28983
 
28234
28984
  def initialize(incoming={})
28235
28985
  super(:discriminator => Event::Types::ORDER_UPSERTED)
@@ -28260,6 +29010,7 @@ module Io
28260
29010
  @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 })
28261
29011
  @geo = (x = opts.delete(:geo); x.nil? ? nil : (x = x; x.is_a?(::Io::Flow::V0::Models::OrderGeo) ? x : ::Io::Flow::V0::Models::OrderGeo.new(x)))
28262
29012
  @merchant_of_record = (x = (x = opts.delete(:merchant_of_record); x.nil? ? "flow" : x); x.is_a?(::Io::Flow::V0::Models::OrderMerchantOfRecord) ? x : ::Io::Flow::V0::Models::OrderMerchantOfRecord.apply(x))
29013
+ @tax_registration = (x = opts.delete(:tax_registration); x.nil? ? nil : (x = x; x.is_a?(::Io::Flow::V0::Models::TaxRegistration) ? x : ::Io::Flow::V0::Models::TaxRegistration.new(x)))
28263
29014
  end
28264
29015
 
28265
29016
  def to_json
@@ -28296,7 +29047,8 @@ module Io
28296
29047
  :lines => lines.nil? ? nil : lines.map { |o| o.to_hash },
28297
29048
  :attributes => attributes.nil? ? nil : attributes,
28298
29049
  :geo => geo.nil? ? nil : geo.to_hash,
28299
- :merchant_of_record => merchant_of_record.value
29050
+ :merchant_of_record => merchant_of_record.value,
29051
+ :tax_registration => tax_registration.nil? ? nil : tax_registration.to_hash
28300
29052
  }
28301
29053
  end
28302
29054
 
@@ -31914,6 +32666,104 @@ module Io
31914
32666
 
31915
32667
  end
31916
32668
 
32669
+ class RefundIdentifier
32670
+
32671
+ attr_reader :id, :refund, :identifier, :primary
32672
+
32673
+ def initialize(incoming={})
32674
+ opts = HttpClient::Helper.symbolize_keys(incoming)
32675
+ HttpClient::Preconditions.require_keys(opts, [:id, :refund, :identifier, :primary], 'RefundIdentifier')
32676
+ @id = HttpClient::Preconditions.assert_class('id', opts.delete(:id), String)
32677
+ @refund = (x = opts.delete(:refund); x.is_a?(::Io::Flow::V0::Models::RefundReference) ? x : ::Io::Flow::V0::Models::RefundReference.new(x))
32678
+ @identifier = HttpClient::Preconditions.assert_class('identifier', opts.delete(:identifier), String)
32679
+ @primary = HttpClient::Preconditions.assert_boolean('primary', opts.delete(:primary))
32680
+ end
32681
+
32682
+ def to_json
32683
+ JSON.dump(to_hash)
32684
+ end
32685
+
32686
+ def copy(incoming={})
32687
+ RefundIdentifier.new(to_hash.merge(HttpClient::Helper.symbolize_keys(incoming)))
32688
+ end
32689
+
32690
+ def to_hash
32691
+ {
32692
+ :id => id,
32693
+ :refund => refund.to_hash,
32694
+ :identifier => identifier,
32695
+ :primary => primary
32696
+ }
32697
+ end
32698
+
32699
+ end
32700
+
32701
+ class RefundIdentifierDeleted < Event
32702
+
32703
+ attr_reader :event_id, :timestamp, :organization, :identifier
32704
+
32705
+ def initialize(incoming={})
32706
+ super(:discriminator => Event::Types::REFUND_IDENTIFIER_DELETED)
32707
+ opts = HttpClient::Helper.symbolize_keys(incoming)
32708
+ HttpClient::Preconditions.require_keys(opts, [:event_id, :timestamp, :organization, :identifier], 'RefundIdentifierDeleted')
32709
+ @event_id = HttpClient::Preconditions.assert_class('event_id', opts.delete(:event_id), String)
32710
+ @timestamp = HttpClient::Preconditions.assert_class('timestamp', HttpClient::Helper.to_date_time_iso8601(opts.delete(:timestamp)), DateTime)
32711
+ @organization = HttpClient::Preconditions.assert_class('organization', opts.delete(:organization), String)
32712
+ @identifier = (x = opts.delete(:identifier); x.is_a?(::Io::Flow::V0::Models::RefundIdentifier) ? x : ::Io::Flow::V0::Models::RefundIdentifier.new(x))
32713
+ end
32714
+
32715
+ def to_json
32716
+ JSON.dump(to_hash)
32717
+ end
32718
+
32719
+ def copy(incoming={})
32720
+ RefundIdentifierDeleted.new(subtype_to_hash.merge(HttpClient::Helper.symbolize_keys(incoming)))
32721
+ end
32722
+
32723
+ def subtype_to_hash
32724
+ {
32725
+ :event_id => event_id,
32726
+ :timestamp => timestamp,
32727
+ :organization => organization,
32728
+ :identifier => identifier.to_hash
32729
+ }
32730
+ end
32731
+
32732
+ end
32733
+
32734
+ class RefundIdentifierUpserted < Event
32735
+
32736
+ attr_reader :event_id, :timestamp, :organization, :identifier
32737
+
32738
+ def initialize(incoming={})
32739
+ super(:discriminator => Event::Types::REFUND_IDENTIFIER_UPSERTED)
32740
+ opts = HttpClient::Helper.symbolize_keys(incoming)
32741
+ HttpClient::Preconditions.require_keys(opts, [:event_id, :timestamp, :organization, :identifier], 'RefundIdentifierUpserted')
32742
+ @event_id = HttpClient::Preconditions.assert_class('event_id', opts.delete(:event_id), String)
32743
+ @timestamp = HttpClient::Preconditions.assert_class('timestamp', HttpClient::Helper.to_date_time_iso8601(opts.delete(:timestamp)), DateTime)
32744
+ @organization = HttpClient::Preconditions.assert_class('organization', opts.delete(:organization), String)
32745
+ @identifier = (x = opts.delete(:identifier); x.is_a?(::Io::Flow::V0::Models::RefundIdentifier) ? x : ::Io::Flow::V0::Models::RefundIdentifier.new(x))
32746
+ end
32747
+
32748
+ def to_json
32749
+ JSON.dump(to_hash)
32750
+ end
32751
+
32752
+ def copy(incoming={})
32753
+ RefundIdentifierUpserted.new(subtype_to_hash.merge(HttpClient::Helper.symbolize_keys(incoming)))
32754
+ end
32755
+
32756
+ def subtype_to_hash
32757
+ {
32758
+ :event_id => event_id,
32759
+ :timestamp => timestamp,
32760
+ :organization => organization,
32761
+ :identifier => identifier.to_hash
32762
+ }
32763
+ end
32764
+
32765
+ end
32766
+
31917
32767
  # For merchant of record authorizations, we provide a summary of refund
31918
32768
  # information primarily to support customer service workflow.
31919
32769
  class RefundOrderSummary
@@ -31981,6 +32831,34 @@ module Io
31981
32831
 
31982
32832
  end
31983
32833
 
32834
+ class RefundReference
32835
+
32836
+ attr_reader :id, :key
32837
+
32838
+ def initialize(incoming={})
32839
+ opts = HttpClient::Helper.symbolize_keys(incoming)
32840
+ HttpClient::Preconditions.require_keys(opts, [:id, :key], 'RefundReference')
32841
+ @id = HttpClient::Preconditions.assert_class('id', opts.delete(:id), String)
32842
+ @key = HttpClient::Preconditions.assert_class('key', opts.delete(:key), String)
32843
+ end
32844
+
32845
+ def to_json
32846
+ JSON.dump(to_hash)
32847
+ end
32848
+
32849
+ def copy(incoming={})
32850
+ RefundReference.new(to_hash.merge(HttpClient::Helper.symbolize_keys(incoming)))
32851
+ end
32852
+
32853
+ def to_hash
32854
+ {
32855
+ :id => id,
32856
+ :key => key
32857
+ }
32858
+ end
32859
+
32860
+ end
32861
+
31984
32862
  class RefundUpserted < Event
31985
32863
 
31986
32864
  attr_reader :event_id, :timestamp, :organization, :key, :authorization_key, :amount, :currency, :captures, :created_at, :order_number, :rma_key
@@ -33498,12 +34376,13 @@ module Io
33498
34376
  # Experiment variant. Control or variant
33499
34377
  class SessionExperimentVariant
33500
34378
 
33501
- attr_reader :key
34379
+ attr_reader :key, :name
33502
34380
 
33503
34381
  def initialize(incoming={})
33504
34382
  opts = HttpClient::Helper.symbolize_keys(incoming)
33505
- HttpClient::Preconditions.require_keys(opts, [:key], 'SessionExperimentVariant')
34383
+ HttpClient::Preconditions.require_keys(opts, [:key, :name], 'SessionExperimentVariant')
33506
34384
  @key = HttpClient::Preconditions.assert_class('key', opts.delete(:key), String)
34385
+ @name = HttpClient::Preconditions.assert_class('name', opts.delete(:name), String)
33507
34386
  end
33508
34387
 
33509
34388
  def to_json
@@ -33516,7 +34395,8 @@ module Io
33516
34395
 
33517
34396
  def to_hash
33518
34397
  {
33519
- :key => key
34398
+ :key => key,
34399
+ :name => name
33520
34400
  }
33521
34401
  end
33522
34402
 
@@ -34430,6 +35310,206 @@ module Io
34430
35310
 
34431
35311
  end
34432
35312
 
35313
+ # Representation of a Shopify cart exactly as defined by shopify.com
35314
+ class ShopifyCart
35315
+
35316
+ attr_reader :id, :items, :item_count, :total_price, :local, :attributes, :note, :requires_shipping, :total_weight
35317
+
35318
+ def initialize(incoming={})
35319
+ opts = HttpClient::Helper.symbolize_keys(incoming)
35320
+ HttpClient::Preconditions.require_keys(opts, [:id, :items, :item_count, :total_price, :local], 'ShopifyCart')
35321
+ @id = HttpClient::Preconditions.assert_class('id', opts.delete(:id), String)
35322
+ @items = HttpClient::Preconditions.assert_class('items', opts.delete(:items), Array).map { |v| (x = v; x.is_a?(::Io::Flow::V0::Models::ShopifyCartItem) ? x : ::Io::Flow::V0::Models::ShopifyCartItem.new(x)) }
35323
+ @item_count = HttpClient::Preconditions.assert_class('item_count', opts.delete(:item_count), Integer)
35324
+ @total_price = HttpClient::Preconditions.assert_class('total_price', opts.delete(:total_price), Integer)
35325
+ @local = (x = opts.delete(:local); x.is_a?(::Io::Flow::V0::Models::ShopifyLocalCartMetadata) ? x : ::Io::Flow::V0::Models::ShopifyLocalCartMetadata.new(x))
35326
+ @attributes = (x = opts.delete(:attributes); x.nil? ? nil : HttpClient::Preconditions.assert_class('attributes', HttpClient::Helper.to_object(x), Hash))
35327
+ @note = (x = opts.delete(:note); x.nil? ? nil : HttpClient::Preconditions.assert_class('note', x, String))
35328
+ @requires_shipping = HttpClient::Preconditions.assert_boolean('requires_shipping', (x = opts.delete(:requires_shipping); x.nil? ? true : x))
35329
+ @total_weight = (x = opts.delete(:total_weight); x.nil? ? nil : HttpClient::Preconditions.assert_class('total_weight', x, Integer))
35330
+ end
35331
+
35332
+ def to_json
35333
+ JSON.dump(to_hash)
35334
+ end
35335
+
35336
+ def copy(incoming={})
35337
+ ShopifyCart.new(to_hash.merge(HttpClient::Helper.symbolize_keys(incoming)))
35338
+ end
35339
+
35340
+ def to_hash
35341
+ {
35342
+ :id => id,
35343
+ :items => items.map { |o| o.to_hash },
35344
+ :item_count => item_count,
35345
+ :total_price => total_price,
35346
+ :local => local.to_hash,
35347
+ :attributes => attributes,
35348
+ :note => note,
35349
+ :requires_shipping => requires_shipping,
35350
+ :total_weight => total_weight
35351
+ }
35352
+ end
35353
+
35354
+ end
35355
+
35356
+ class ShopifyCartAddMultipleForm < ShopifyCartAddForm
35357
+
35358
+ attr_reader :items
35359
+
35360
+ def initialize(incoming={})
35361
+ super(:discriminator => ShopifyCartAddForm::Types::SHOPIFY_CART_ADD_MULTIPLE_FORM)
35362
+ opts = HttpClient::Helper.symbolize_keys(incoming)
35363
+ HttpClient::Preconditions.require_keys(opts, [:items], 'ShopifyCartAddMultipleForm')
35364
+ @items = HttpClient::Preconditions.assert_class('items', opts.delete(:items), Array).map { |v| (x = v; x.is_a?(::Io::Flow::V0::Models::ShopifyCartAddSingleForm) ? x : ::Io::Flow::V0::Models::ShopifyCartAddSingleForm.new(x)) }
35365
+ end
35366
+
35367
+ def to_json
35368
+ JSON.dump(to_hash)
35369
+ end
35370
+
35371
+ def copy(incoming={})
35372
+ ShopifyCartAddMultipleForm.new(subtype_to_hash.merge(HttpClient::Helper.symbolize_keys(incoming)))
35373
+ end
35374
+
35375
+ def subtype_to_hash
35376
+ {
35377
+ :items => items.map { |o| o.to_hash }
35378
+ }
35379
+ end
35380
+
35381
+ end
35382
+
35383
+ class ShopifyCartAddSingleForm < ShopifyCartAddForm
35384
+
35385
+ attr_reader :id, :quantity, :properties
35386
+
35387
+ def initialize(incoming={})
35388
+ super(:discriminator => ShopifyCartAddForm::Types::SHOPIFY_CART_ADD_SINGLE_FORM)
35389
+ opts = HttpClient::Helper.symbolize_keys(incoming)
35390
+ HttpClient::Preconditions.require_keys(opts, [:id, :quantity], 'ShopifyCartAddSingleForm')
35391
+ @id = HttpClient::Preconditions.assert_class('id', opts.delete(:id), Integer)
35392
+ @quantity = HttpClient::Preconditions.assert_class('quantity', opts.delete(:quantity), Integer)
35393
+ @properties = (x = opts.delete(:properties); x.nil? ? nil : HttpClient::Preconditions.assert_class('properties', x, Hash).inject({}) { |h, d| h[d[0]] = HttpClient::Preconditions.assert_class('properties', d[1], String); h })
35394
+ end
35395
+
35396
+ def to_json
35397
+ JSON.dump(to_hash)
35398
+ end
35399
+
35400
+ def copy(incoming={})
35401
+ ShopifyCartAddSingleForm.new(subtype_to_hash.merge(HttpClient::Helper.symbolize_keys(incoming)))
35402
+ end
35403
+
35404
+ def subtype_to_hash
35405
+ {
35406
+ :id => id,
35407
+ :quantity => quantity,
35408
+ :properties => properties.nil? ? nil : properties
35409
+ }
35410
+ end
35411
+
35412
+ end
35413
+
35414
+ # Must provide either line or id. If you provide both, they must match
35415
+ class ShopifyCartChangeForm
35416
+
35417
+ attr_reader :quantity, :line, :id, :properties
35418
+
35419
+ def initialize(incoming={})
35420
+ opts = HttpClient::Helper.symbolize_keys(incoming)
35421
+ HttpClient::Preconditions.require_keys(opts, [:quantity], 'ShopifyCartChangeForm')
35422
+ @quantity = HttpClient::Preconditions.assert_class('quantity', opts.delete(:quantity), Integer)
35423
+ @line = (x = opts.delete(:line); x.nil? ? nil : HttpClient::Preconditions.assert_class('line', x, Integer))
35424
+ @id = (x = opts.delete(:id); x.nil? ? nil : HttpClient::Preconditions.assert_class('id', x, Integer))
35425
+ @properties = (x = opts.delete(:properties); x.nil? ? nil : HttpClient::Preconditions.assert_class('properties', x, Hash).inject({}) { |h, d| h[d[0]] = HttpClient::Preconditions.assert_class('properties', d[1], String); h })
35426
+ end
35427
+
35428
+ def to_json
35429
+ JSON.dump(to_hash)
35430
+ end
35431
+
35432
+ def copy(incoming={})
35433
+ ShopifyCartChangeForm.new(to_hash.merge(HttpClient::Helper.symbolize_keys(incoming)))
35434
+ end
35435
+
35436
+ def to_hash
35437
+ {
35438
+ :quantity => quantity,
35439
+ :line => line,
35440
+ :id => id,
35441
+ :properties => properties.nil? ? nil : properties
35442
+ }
35443
+ end
35444
+
35445
+ end
35446
+
35447
+ class ShopifyCartItem
35448
+
35449
+ attr_reader :id, :handle, :line_price, :price, :product_id, :product_title, :quantity, :title, :url, :variant_id, :local, :gift_card, :image, :product_description, :product_type, :properties, :requires_shipping, :sku, :variant_title, :variant_options, :vendor
35450
+
35451
+ def initialize(incoming={})
35452
+ opts = HttpClient::Helper.symbolize_keys(incoming)
35453
+ HttpClient::Preconditions.require_keys(opts, [:id, :handle, :line_price, :price, :product_id, :product_title, :quantity, :title, :url, :variant_id, :local], 'ShopifyCartItem')
35454
+ @id = HttpClient::Preconditions.assert_class('id', opts.delete(:id), String)
35455
+ @handle = HttpClient::Preconditions.assert_class('handle', opts.delete(:handle), String)
35456
+ @line_price = HttpClient::Preconditions.assert_class('line_price', opts.delete(:line_price), Numeric)
35457
+ @price = HttpClient::Preconditions.assert_class('price', opts.delete(:price), Integer)
35458
+ @product_id = HttpClient::Preconditions.assert_class('product_id', opts.delete(:product_id), Integer)
35459
+ @product_title = HttpClient::Preconditions.assert_class('product_title', opts.delete(:product_title), String)
35460
+ @quantity = HttpClient::Preconditions.assert_class('quantity', opts.delete(:quantity), Integer)
35461
+ @title = HttpClient::Preconditions.assert_class('title', opts.delete(:title), String)
35462
+ @url = HttpClient::Preconditions.assert_class('url', opts.delete(:url), String)
35463
+ @variant_id = HttpClient::Preconditions.assert_class('variant_id', opts.delete(:variant_id), Integer)
35464
+ @local = (x = opts.delete(:local); x.is_a?(::Io::Flow::V0::Models::ShopifyLocalCartItemMetadata) ? x : ::Io::Flow::V0::Models::ShopifyLocalCartItemMetadata.new(x))
35465
+ @gift_card = HttpClient::Preconditions.assert_boolean('gift_card', (x = opts.delete(:gift_card); x.nil? ? false : x))
35466
+ @image = (x = opts.delete(:image); x.nil? ? nil : HttpClient::Preconditions.assert_class('image', x, String))
35467
+ @product_description = (x = opts.delete(:product_description); x.nil? ? nil : HttpClient::Preconditions.assert_class('product_description', x, String))
35468
+ @product_type = (x = opts.delete(:product_type); x.nil? ? nil : HttpClient::Preconditions.assert_class('product_type', x, String))
35469
+ @properties = (x = opts.delete(:properties); x.nil? ? nil : HttpClient::Preconditions.assert_class('properties', x, Hash).inject({}) { |h, d| h[d[0]] = HttpClient::Preconditions.assert_class('properties', d[1], String); h })
35470
+ @requires_shipping = HttpClient::Preconditions.assert_boolean('requires_shipping', (x = opts.delete(:requires_shipping); x.nil? ? true : x))
35471
+ @sku = (x = opts.delete(:sku); x.nil? ? nil : HttpClient::Preconditions.assert_class('sku', x, String))
35472
+ @variant_title = (x = opts.delete(:variant_title); x.nil? ? nil : HttpClient::Preconditions.assert_class('variant_title', x, String))
35473
+ @variant_options = (x = opts.delete(:variant_options); x.nil? ? nil : HttpClient::Preconditions.assert_class('variant_options', x, Array).map { |v| HttpClient::Preconditions.assert_class('variant_options', v, String) })
35474
+ @vendor = (x = opts.delete(:vendor); x.nil? ? nil : HttpClient::Preconditions.assert_class('vendor', x, String))
35475
+ end
35476
+
35477
+ def to_json
35478
+ JSON.dump(to_hash)
35479
+ end
35480
+
35481
+ def copy(incoming={})
35482
+ ShopifyCartItem.new(to_hash.merge(HttpClient::Helper.symbolize_keys(incoming)))
35483
+ end
35484
+
35485
+ def to_hash
35486
+ {
35487
+ :id => id,
35488
+ :handle => handle,
35489
+ :line_price => line_price,
35490
+ :price => price,
35491
+ :product_id => product_id,
35492
+ :product_title => product_title,
35493
+ :quantity => quantity,
35494
+ :title => title,
35495
+ :url => url,
35496
+ :variant_id => variant_id,
35497
+ :local => local.to_hash,
35498
+ :gift_card => gift_card,
35499
+ :image => image,
35500
+ :product_description => product_description,
35501
+ :product_type => product_type,
35502
+ :properties => properties.nil? ? nil : properties,
35503
+ :requires_shipping => requires_shipping,
35504
+ :sku => sku,
35505
+ :variant_title => variant_title,
35506
+ :variant_options => variant_options.nil? ? nil : variant_options,
35507
+ :vendor => vendor
35508
+ }
35509
+ end
35510
+
35511
+ end
35512
+
34433
35513
  # Model to represent details available in a customer metafield.
34434
35514
  class ShopifyCustomerMetafieldValue
34435
35515
 
@@ -34457,6 +35537,70 @@ module Io
34457
35537
 
34458
35538
  end
34459
35539
 
35540
+ class ShopifyLocalCartItemMetadata
35541
+
35542
+ attr_reader :line_price, :price
35543
+
35544
+ def initialize(incoming={})
35545
+ opts = HttpClient::Helper.symbolize_keys(incoming)
35546
+ HttpClient::Preconditions.require_keys(opts, [:line_price, :price], 'ShopifyLocalCartItemMetadata')
35547
+ @line_price = (x = opts.delete(:line_price); x.is_a?(::Io::Flow::V0::Models::PriceWithBase) ? x : ::Io::Flow::V0::Models::PriceWithBase.new(x))
35548
+ @price = (x = opts.delete(:price); x.is_a?(::Io::Flow::V0::Models::PriceWithBase) ? x : ::Io::Flow::V0::Models::PriceWithBase.new(x))
35549
+ end
35550
+
35551
+ def to_json
35552
+ JSON.dump(to_hash)
35553
+ end
35554
+
35555
+ def copy(incoming={})
35556
+ ShopifyLocalCartItemMetadata.new(to_hash.merge(HttpClient::Helper.symbolize_keys(incoming)))
35557
+ end
35558
+
35559
+ def to_hash
35560
+ {
35561
+ :line_price => line_price.to_hash,
35562
+ :price => price.to_hash
35563
+ }
35564
+ end
35565
+
35566
+ end
35567
+
35568
+ class ShopifyLocalCartMetadata
35569
+
35570
+ attr_reader :total_price, :promotions, :rules, :subtotal, :vat, :duty
35571
+
35572
+ def initialize(incoming={})
35573
+ opts = HttpClient::Helper.symbolize_keys(incoming)
35574
+ HttpClient::Preconditions.require_keys(opts, [:total_price, :promotions, :subtotal], 'ShopifyLocalCartMetadata')
35575
+ @total_price = (x = opts.delete(:total_price); x.is_a?(::Io::Flow::V0::Models::PriceWithBase) ? x : ::Io::Flow::V0::Models::PriceWithBase.new(x))
35576
+ @promotions = (x = opts.delete(:promotions); x.is_a?(::Io::Flow::V0::Models::Promotions) ? x : ::Io::Flow::V0::Models::Promotions.new(x))
35577
+ @rules = (x = opts.delete(:rules); x.nil? ? nil : (x = x; x.is_a?(::Io::Flow::V0::Models::OrderRulesSummary) ? x : ::Io::Flow::V0::Models::OrderRulesSummary.new(x)))
35578
+ @subtotal = (x = opts.delete(:subtotal); x.is_a?(::Io::Flow::V0::Models::PriceWithBase) ? x : ::Io::Flow::V0::Models::PriceWithBase.new(x))
35579
+ @vat = (x = opts.delete(:vat); x.nil? ? nil : (x = x; x.is_a?(::Io::Flow::V0::Models::PriceWithBase) ? x : ::Io::Flow::V0::Models::PriceWithBase.new(x)))
35580
+ @duty = (x = opts.delete(:duty); x.nil? ? nil : (x = x; x.is_a?(::Io::Flow::V0::Models::PriceWithBase) ? x : ::Io::Flow::V0::Models::PriceWithBase.new(x)))
35581
+ end
35582
+
35583
+ def to_json
35584
+ JSON.dump(to_hash)
35585
+ end
35586
+
35587
+ def copy(incoming={})
35588
+ ShopifyLocalCartMetadata.new(to_hash.merge(HttpClient::Helper.symbolize_keys(incoming)))
35589
+ end
35590
+
35591
+ def to_hash
35592
+ {
35593
+ :total_price => total_price.to_hash,
35594
+ :promotions => promotions.to_hash,
35595
+ :rules => rules.nil? ? nil : rules.to_hash,
35596
+ :subtotal => subtotal.to_hash,
35597
+ :vat => vat.nil? ? nil : vat.to_hash,
35598
+ :duty => duty.nil? ? nil : duty.to_hash
35599
+ }
35600
+ end
35601
+
35602
+ end
35603
+
34460
35604
  class ShopifyLocalPriceMetadata
34461
35605
 
34462
35606
  attr_reader :price
@@ -34549,20 +35693,81 @@ module Io
34549
35693
 
34550
35694
  end
34551
35695
 
35696
+ class ShopifyOrderAttributesForm
35697
+
35698
+ attr_reader :attributes
35699
+
35700
+ def initialize(incoming={})
35701
+ opts = HttpClient::Helper.symbolize_keys(incoming)
35702
+ HttpClient::Preconditions.require_keys(opts, [:attributes], 'ShopifyOrderAttributesForm')
35703
+ @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 }
35704
+ end
35705
+
35706
+ def to_json
35707
+ JSON.dump(to_hash)
35708
+ end
35709
+
35710
+ def copy(incoming={})
35711
+ ShopifyOrderAttributesForm.new(to_hash.merge(HttpClient::Helper.symbolize_keys(incoming)))
35712
+ end
35713
+
35714
+ def to_hash
35715
+ {
35716
+ :attributes => attributes
35717
+ }
35718
+ end
35719
+
35720
+ end
35721
+
35722
+ # Model to represent a delivery metafield
35723
+ class ShopifyOrderDeliveryMetafield
35724
+
35725
+ attr_reader :item_number, :quantity, :service, :window
35726
+
35727
+ def initialize(incoming={})
35728
+ opts = HttpClient::Helper.symbolize_keys(incoming)
35729
+ HttpClient::Preconditions.require_keys(opts, [:item_number, :quantity, :service, :window], 'ShopifyOrderDeliveryMetafield')
35730
+ @item_number = HttpClient::Preconditions.assert_class('item_number', opts.delete(:item_number), String)
35731
+ @quantity = HttpClient::Preconditions.assert_class('quantity', opts.delete(:quantity), Integer)
35732
+ @service = (x = opts.delete(:service); x.is_a?(::Io::Flow::V0::Models::ServiceSummary) ? x : ::Io::Flow::V0::Models::ServiceSummary.new(x))
35733
+ @window = (x = opts.delete(:window); x.is_a?(::Io::Flow::V0::Models::DeliveryWindow) ? x : ::Io::Flow::V0::Models::DeliveryWindow.new(x))
35734
+ end
35735
+
35736
+ def to_json
35737
+ JSON.dump(to_hash)
35738
+ end
35739
+
35740
+ def copy(incoming={})
35741
+ ShopifyOrderDeliveryMetafield.new(to_hash.merge(HttpClient::Helper.symbolize_keys(incoming)))
35742
+ end
35743
+
35744
+ def to_hash
35745
+ {
35746
+ :item_number => item_number,
35747
+ :quantity => quantity,
35748
+ :service => service.to_hash,
35749
+ :window => window.to_hash
35750
+ }
35751
+ end
35752
+
35753
+ end
35754
+
34552
35755
  # Model to represent details available in an order metafield.
34553
35756
  class ShopifyOrderMetafieldValue
34554
35757
 
34555
- attr_reader :merchant_of_record, :items, :prices, :total, :flow_order_id, :incoterm
35758
+ attr_reader :merchant_of_record, :merchant_of_record_entity, :items, :prices, :total, :flow_order_id, :incoterm, :tax_registration
34556
35759
 
34557
35760
  def initialize(incoming={})
34558
35761
  opts = HttpClient::Helper.symbolize_keys(incoming)
34559
35762
  HttpClient::Preconditions.require_keys(opts, [:items, :prices, :total], 'ShopifyOrderMetafieldValue')
34560
35763
  @merchant_of_record = (x = (x = opts.delete(:merchant_of_record); x.nil? ? "flow" : x); x.is_a?(::Io::Flow::V0::Models::OrderMerchantOfRecord) ? x : ::Io::Flow::V0::Models::OrderMerchantOfRecord.apply(x))
35764
+ @merchant_of_record_entity = (x = opts.delete(:merchant_of_record_entity); x.nil? ? nil : (x = x; x.is_a?(::Io::Flow::V0::Models::MerchantOfRecordEntity) ? x : ::Io::Flow::V0::Models::MerchantOfRecordEntity.new(x)))
34561
35765
  @items = HttpClient::Preconditions.assert_class('items', opts.delete(:items), Array).map { |v| (x = v; x.is_a?(::Io::Flow::V0::Models::LocalizedLineItem) ? x : ::Io::Flow::V0::Models::LocalizedLineItem.new(x)) }
34562
35766
  @prices = HttpClient::Preconditions.assert_class('prices', opts.delete(:prices), Array).map { |v| (x = v; x.is_a?(::Io::Flow::V0::Models::OrderPriceDetail) ? x : ::Io::Flow::V0::Models::OrderPriceDetail.new(x)) }
34563
35767
  @total = (x = opts.delete(:total); x.is_a?(::Io::Flow::V0::Models::LocalizedTotal) ? x : ::Io::Flow::V0::Models::LocalizedTotal.new(x))
34564
35768
  @flow_order_id = (x = opts.delete(:flow_order_id); x.nil? ? nil : HttpClient::Preconditions.assert_class('flow_order_id', x, String))
34565
35769
  @incoterm = (x = opts.delete(:incoterm); x.nil? ? nil : (x = x; x.is_a?(::Io::Flow::V0::Models::Incoterm) ? x : ::Io::Flow::V0::Models::Incoterm.apply(x)))
35770
+ @tax_registration = (x = opts.delete(:tax_registration); x.nil? ? nil : (x = x; x.is_a?(::Io::Flow::V0::Models::TaxRegistration) ? x : ::Io::Flow::V0::Models::TaxRegistration.new(x)))
34566
35771
  end
34567
35772
 
34568
35773
  def to_json
@@ -34576,11 +35781,13 @@ module Io
34576
35781
  def to_hash
34577
35782
  {
34578
35783
  :merchant_of_record => merchant_of_record.value,
35784
+ :merchant_of_record_entity => merchant_of_record_entity.nil? ? nil : merchant_of_record_entity.to_hash,
34579
35785
  :items => items.map { |o| o.to_hash },
34580
35786
  :prices => prices.map { |o| o.to_hash },
34581
35787
  :total => total.to_hash,
34582
35788
  :flow_order_id => flow_order_id,
34583
- :incoterm => incoterm.nil? ? nil : incoterm.value
35789
+ :incoterm => incoterm.nil? ? nil : incoterm.value,
35790
+ :tax_registration => tax_registration.nil? ? nil : tax_registration.to_hash
34584
35791
  }
34585
35792
  end
34586
35793
 
@@ -34683,6 +35890,47 @@ module Io
34683
35890
 
34684
35891
  end
34685
35892
 
35893
+ # The shopify variant metafield defines the individual metafield values we write
35894
+ # into Shopify for each variant. This model was introduced to enable server side
35895
+ # rendering of content (e.g. the price on the product detail page). Each field
35896
+ # in this model is available as its own metafield within a namespace named
35897
+ # 'price_abc' where abc is a unique, short identifier for an experience.
35898
+ class ShopifyVariantPriceMetafield
35899
+
35900
+ attr_reader :item, :includes, :vat, :vat_name, :duty, :compare_at
35901
+
35902
+ def initialize(incoming={})
35903
+ opts = HttpClient::Helper.symbolize_keys(incoming)
35904
+ HttpClient::Preconditions.require_keys(opts, [:item], 'ShopifyVariantPriceMetafield')
35905
+ @item = HttpClient::Preconditions.assert_class('item', opts.delete(:item), String)
35906
+ @includes = (x = opts.delete(:includes); x.nil? ? nil : HttpClient::Preconditions.assert_class('includes', x, String))
35907
+ @vat = (x = opts.delete(:vat); x.nil? ? nil : HttpClient::Preconditions.assert_class('vat', x, String))
35908
+ @vat_name = (x = opts.delete(:vat_name); x.nil? ? nil : HttpClient::Preconditions.assert_class('vat_name', x, String))
35909
+ @duty = (x = opts.delete(:duty); x.nil? ? nil : HttpClient::Preconditions.assert_class('duty', x, String))
35910
+ @compare_at = (x = opts.delete(:compare_at); x.nil? ? nil : HttpClient::Preconditions.assert_class('compare_at', x, String))
35911
+ end
35912
+
35913
+ def to_json
35914
+ JSON.dump(to_hash)
35915
+ end
35916
+
35917
+ def copy(incoming={})
35918
+ ShopifyVariantPriceMetafield.new(to_hash.merge(HttpClient::Helper.symbolize_keys(incoming)))
35919
+ end
35920
+
35921
+ def to_hash
35922
+ {
35923
+ :item => item,
35924
+ :includes => includes,
35925
+ :vat => vat,
35926
+ :vat_name => vat_name,
35927
+ :duty => duty,
35928
+ :compare_at => compare_at
35929
+ }
35930
+ end
35931
+
35932
+ end
35933
+
34686
35934
  # Simplified form for notifying Flow of a Fulfillment shipped entirely in a
34687
35935
  # single tracked package.
34688
35936
  class SinglePackageShippingNotificationForm < ShippingNotificationForm
@@ -35510,7 +36758,7 @@ module Io
35510
36758
 
35511
36759
  end
35512
36760
 
35513
- # Represents catalog items where a targeteing query is applicable
36761
+ # Represents catalog items where a targeting query is applicable
35514
36762
  class TargetingItem
35515
36763
 
35516
36764
  attr_reader :id, :targeting, :item_number, :query
@@ -35574,6 +36822,39 @@ module Io
35574
36822
 
35575
36823
  end
35576
36824
 
36825
+ class TargetingItemDeletedV2 < Event
36826
+
36827
+ attr_reader :event_id, :timestamp, :organization, :targeting_item
36828
+
36829
+ def initialize(incoming={})
36830
+ super(:discriminator => Event::Types::TARGETING_ITEM_DELETED_V2)
36831
+ opts = HttpClient::Helper.symbolize_keys(incoming)
36832
+ HttpClient::Preconditions.require_keys(opts, [:event_id, :timestamp, :organization, :targeting_item], 'TargetingItemDeletedV2')
36833
+ @event_id = HttpClient::Preconditions.assert_class('event_id', opts.delete(:event_id), String)
36834
+ @timestamp = HttpClient::Preconditions.assert_class('timestamp', HttpClient::Helper.to_date_time_iso8601(opts.delete(:timestamp)), DateTime)
36835
+ @organization = HttpClient::Preconditions.assert_class('organization', opts.delete(:organization), String)
36836
+ @targeting_item = (x = opts.delete(:targeting_item); x.is_a?(::Io::Flow::V0::Models::TargetingItem) ? x : ::Io::Flow::V0::Models::TargetingItem.new(x))
36837
+ end
36838
+
36839
+ def to_json
36840
+ JSON.dump(to_hash)
36841
+ end
36842
+
36843
+ def copy(incoming={})
36844
+ TargetingItemDeletedV2.new(subtype_to_hash.merge(HttpClient::Helper.symbolize_keys(incoming)))
36845
+ end
36846
+
36847
+ def subtype_to_hash
36848
+ {
36849
+ :event_id => event_id,
36850
+ :timestamp => timestamp,
36851
+ :organization => organization,
36852
+ :targeting_item => targeting_item.to_hash
36853
+ }
36854
+ end
36855
+
36856
+ end
36857
+
35577
36858
  # Indiciates that a given item has been targeted by the query q producing an
35578
36859
  # outcome. The item number is unique within its targeting_id.
35579
36860
  class TargetingItemUpserted < Event
@@ -35813,6 +37094,74 @@ module Io
35813
37094
 
35814
37095
  end
35815
37096
 
37097
+ # Result of looking up a specific tax registration number. Indicates validity of
37098
+ # a number for a specific country and (if valid) the associated person/company.
37099
+ class TaxRegistration
37100
+
37101
+ attr_reader :id, :key, :number, :timestamp, :result, :name, :address
37102
+
37103
+ def initialize(incoming={})
37104
+ opts = HttpClient::Helper.symbolize_keys(incoming)
37105
+ HttpClient::Preconditions.require_keys(opts, [:id, :key, :number, :timestamp, :result], 'TaxRegistration')
37106
+ @id = HttpClient::Preconditions.assert_class('id', opts.delete(:id), String)
37107
+ @key = HttpClient::Preconditions.assert_class('key', opts.delete(:key), String)
37108
+ @number = HttpClient::Preconditions.assert_class('number', opts.delete(:number), String)
37109
+ @timestamp = HttpClient::Preconditions.assert_class('timestamp', HttpClient::Helper.to_date_time_iso8601(opts.delete(:timestamp)), DateTime)
37110
+ @result = (x = opts.delete(:result); x.is_a?(::Io::Flow::V0::Models::TaxVerificationResult) ? x : ::Io::Flow::V0::Models::TaxVerificationResult.apply(x))
37111
+ @name = (x = opts.delete(:name); x.nil? ? nil : HttpClient::Preconditions.assert_class('name', x, String))
37112
+ @address = (x = opts.delete(:address); x.nil? ? nil : HttpClient::Preconditions.assert_class('address', x, String))
37113
+ end
37114
+
37115
+ def to_json
37116
+ JSON.dump(to_hash)
37117
+ end
37118
+
37119
+ def copy(incoming={})
37120
+ TaxRegistration.new(to_hash.merge(HttpClient::Helper.symbolize_keys(incoming)))
37121
+ end
37122
+
37123
+ def to_hash
37124
+ {
37125
+ :id => id,
37126
+ :key => key,
37127
+ :number => number,
37128
+ :timestamp => timestamp,
37129
+ :result => result.value,
37130
+ :name => name,
37131
+ :address => address
37132
+ }
37133
+ end
37134
+
37135
+ end
37136
+
37137
+ class TaxRegistrationForm
37138
+
37139
+ attr_reader :number, :company_name
37140
+
37141
+ def initialize(incoming={})
37142
+ opts = HttpClient::Helper.symbolize_keys(incoming)
37143
+ HttpClient::Preconditions.require_keys(opts, [:number], 'TaxRegistrationForm')
37144
+ @number = HttpClient::Preconditions.assert_class('number', opts.delete(:number), String)
37145
+ @company_name = (x = opts.delete(:company_name); x.nil? ? nil : HttpClient::Preconditions.assert_class('company_name', x, String))
37146
+ end
37147
+
37148
+ def to_json
37149
+ JSON.dump(to_hash)
37150
+ end
37151
+
37152
+ def copy(incoming={})
37153
+ TaxRegistrationForm.new(to_hash.merge(HttpClient::Helper.symbolize_keys(incoming)))
37154
+ end
37155
+
37156
+ def to_hash
37157
+ {
37158
+ :number => number,
37159
+ :company_name => company_name
37160
+ }
37161
+ end
37162
+
37163
+ end
37164
+
35816
37165
  # Service shipping tier available in this tier group. e.g. Standard tier,
35817
37166
  # Express tier, Economy tier
35818
37167
  class Tier
@@ -35897,7 +37246,7 @@ module Io
35897
37246
 
35898
37247
  end
35899
37248
 
35900
- # Form to set the defualt tier for a given experience
37249
+ # Form to set the default tier for a given experience
35901
37250
  class TierDefaultForm
35902
37251
 
35903
37252
  attr_reader :default_tier, :currency, :experience
@@ -35991,6 +37340,39 @@ module Io
35991
37340
 
35992
37341
  end
35993
37342
 
37343
+ class TierDeletedV2 < Event
37344
+
37345
+ attr_reader :event_id, :timestamp, :organization, :tier
37346
+
37347
+ def initialize(incoming={})
37348
+ super(:discriminator => Event::Types::TIER_DELETED_V2)
37349
+ opts = HttpClient::Helper.symbolize_keys(incoming)
37350
+ HttpClient::Preconditions.require_keys(opts, [:event_id, :timestamp, :organization, :tier], 'TierDeletedV2')
37351
+ @event_id = HttpClient::Preconditions.assert_class('event_id', opts.delete(:event_id), String)
37352
+ @timestamp = HttpClient::Preconditions.assert_class('timestamp', HttpClient::Helper.to_date_time_iso8601(opts.delete(:timestamp)), DateTime)
37353
+ @organization = HttpClient::Preconditions.assert_class('organization', opts.delete(:organization), String)
37354
+ @tier = (x = opts.delete(:tier); x.is_a?(::Io::Flow::V0::Models::Tier) ? x : ::Io::Flow::V0::Models::Tier.new(x))
37355
+ end
37356
+
37357
+ def to_json
37358
+ JSON.dump(to_hash)
37359
+ end
37360
+
37361
+ def copy(incoming={})
37362
+ TierDeletedV2.new(subtype_to_hash.merge(HttpClient::Helper.symbolize_keys(incoming)))
37363
+ end
37364
+
37365
+ def subtype_to_hash
37366
+ {
37367
+ :event_id => event_id,
37368
+ :timestamp => timestamp,
37369
+ :organization => organization,
37370
+ :tier => tier.to_hash
37371
+ }
37372
+ end
37373
+
37374
+ end
37375
+
35994
37376
  class TierDisplay
35995
37377
 
35996
37378
  attr_reader :estimate
@@ -36339,6 +37721,39 @@ module Io
36339
37721
 
36340
37722
  end
36341
37723
 
37724
+ class TierUpsertedV2 < Event
37725
+
37726
+ attr_reader :event_id, :timestamp, :organization, :tier
37727
+
37728
+ def initialize(incoming={})
37729
+ super(:discriminator => Event::Types::TIER_UPSERTED_V2)
37730
+ opts = HttpClient::Helper.symbolize_keys(incoming)
37731
+ HttpClient::Preconditions.require_keys(opts, [:event_id, :timestamp, :organization, :tier], 'TierUpsertedV2')
37732
+ @event_id = HttpClient::Preconditions.assert_class('event_id', opts.delete(:event_id), String)
37733
+ @timestamp = HttpClient::Preconditions.assert_class('timestamp', HttpClient::Helper.to_date_time_iso8601(opts.delete(:timestamp)), DateTime)
37734
+ @organization = HttpClient::Preconditions.assert_class('organization', opts.delete(:organization), String)
37735
+ @tier = (x = opts.delete(:tier); x.is_a?(::Io::Flow::V0::Models::Tier) ? x : ::Io::Flow::V0::Models::Tier.new(x))
37736
+ end
37737
+
37738
+ def to_json
37739
+ JSON.dump(to_hash)
37740
+ end
37741
+
37742
+ def copy(incoming={})
37743
+ TierUpsertedV2.new(subtype_to_hash.merge(HttpClient::Helper.symbolize_keys(incoming)))
37744
+ end
37745
+
37746
+ def subtype_to_hash
37747
+ {
37748
+ :event_id => event_id,
37749
+ :timestamp => timestamp,
37750
+ :organization => organization,
37751
+ :tier => tier.to_hash
37752
+ }
37753
+ end
37754
+
37755
+ end
37756
+
36342
37757
  class TierVersion
36343
37758
 
36344
37759
  attr_reader :id, :timestamp, :type, :tier
@@ -37956,12 +39371,13 @@ module Io
37956
39371
 
37957
39372
  class Zone
37958
39373
 
37959
- attr_reader :province, :country
39374
+ attr_reader :postals, :provinces, :country
37960
39375
 
37961
39376
  def initialize(incoming={})
37962
39377
  opts = HttpClient::Helper.symbolize_keys(incoming)
37963
39378
  HttpClient::Preconditions.require_keys(opts, [:country], 'Zone')
37964
- @province = (x = opts.delete(:province); x.nil? ? nil : HttpClient::Preconditions.assert_class('province', x, String))
39379
+ @postals = (x = opts.delete(:postals); x.nil? ? nil : HttpClient::Preconditions.assert_class('postals', x, Array).map { |v| HttpClient::Preconditions.assert_class('postals', v, String) })
39380
+ @provinces = (x = opts.delete(:provinces); x.nil? ? nil : HttpClient::Preconditions.assert_class('provinces', x, Array).map { |v| HttpClient::Preconditions.assert_class('provinces', v, String) })
37965
39381
  @country = HttpClient::Preconditions.assert_class('country', opts.delete(:country), String)
37966
39382
  end
37967
39383
 
@@ -37975,7 +39391,8 @@ module Io
37975
39391
 
37976
39392
  def to_hash
37977
39393
  {
37978
- :province => province,
39394
+ :postals => postals.nil? ? nil : postals,
39395
+ :provinces => provinces.nil? ? nil : provinces,
37979
39396
  :country => country
37980
39397
  }
37981
39398
  end