flowcommerce 0.1.11 → 0.1.12

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: d6d7de8d9c9c0b7ff290659c807c4f560904d832
4
- data.tar.gz: e4236724a02e472368356b30d5c8802bdc50affa
3
+ metadata.gz: 36f93a0c8d7bb391183ac22007181c5e977b01bd
4
+ data.tar.gz: b7837eb6ab71b2aeed4357751f84d040004f1e5c
5
5
  SHA512:
6
- metadata.gz: 11cb7cfa979eda7e3931bd8ab3bd80903eca49935851b5ca9a72962b90d9fac073e4da5326e685b30ef67f86f592431999773a74c4cd3c5fe12313a32c6981e4
7
- data.tar.gz: 295031f2a4cc972e341a4cd87ec74407d52bbd3ca7788d29ccf4659b3912a356d03271d1e7c307a2818277aa31bccaf8e4a2ad22f4dbcd61c9f92bf43f64063d
6
+ metadata.gz: f7bbb7ce03c6ad1f23040a8a2c00f48540ffde81ecceb93105caceacde346e2e0b06e321c94f4d306edb07d021a31fc0721e86bf16ffddd05ddbb083e90f15e7
7
+ data.tar.gz: 0645962cecbf26911e66328cfac6cbf5acd823090d7788e4b4ca58b1c3d17897cd6052d54081b574d6f1ec2bffca8693b9981b2233439af098f23ba994719505
@@ -1,6 +1,6 @@
1
1
  # Generated by apidoc - http://www.apidoc.me
2
- # Service version: 0.1.77
3
- # apidoc:0.11.51 http://www.apidoc.me/flow/api/0.2.34/ruby_client
2
+ # Service version: 0.2.44
3
+ # apidoc:0.11.51 http://www.apidoc.me/flow/api/0.2.44/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 = 'apidoc:0.11.51 http://www.apidoc.me/flow/api/0.2.34/ruby_client' unless defined?(Constants::USER_AGENT)
29
- VERSION = '0.1.77' unless defined?(Constants::VERSION)
28
+ USER_AGENT = 'apidoc:0.11.51 http://www.apidoc.me/flow/api/0.2.44/ruby_client' unless defined?(Constants::USER_AGENT)
29
+ VERSION = '0.2.44' unless defined?(Constants::VERSION)
30
30
  VERSION_MAJOR = 0 unless defined?(VERSION_MAJOR)
31
31
 
32
32
  end
@@ -61,6 +61,10 @@ module Io
61
61
  request
62
62
  end
63
63
 
64
+ def allocations
65
+ @allocations ||= ::Io::Flow::V0::Clients::Allocations.new(self)
66
+ end
67
+
64
68
  def attributes
65
69
  @attributes ||= ::Io::Flow::V0::Clients::Attributes.new(self)
66
70
  end
@@ -125,10 +129,6 @@ module Io
125
129
  @rates ||= ::Io::Flow::V0::Clients::Rates.new(self)
126
130
  end
127
131
 
128
- def spot_rates
129
- @spot_rates ||= ::Io::Flow::V0::Clients::SpotRates.new(self)
130
- end
131
-
132
132
  def harmonization_settings
133
133
  @harmonization_settings ||= ::Io::Flow::V0::Clients::HarmonizationSettings.new(self)
134
134
  end
@@ -177,10 +177,6 @@ module Io
177
177
  @refunds ||= ::Io::Flow::V0::Clients::Refunds.new(self)
178
178
  end
179
179
 
180
- def carriers
181
- @carriers ||= ::Io::Flow::V0::Clients::Carriers.new(self)
182
- end
183
-
184
180
  def centers
185
181
  @centers ||= ::Io::Flow::V0::Clients::Centers.new(self)
186
182
  end
@@ -205,18 +201,10 @@ module Io
205
201
  @quotes ||= ::Io::Flow::V0::Clients::Quotes.new(self)
206
202
  end
207
203
 
208
- def quote_estimates
209
- @quote_estimates ||= ::Io::Flow::V0::Clients::QuoteEstimates.new(self)
210
- end
211
-
212
204
  def rmas
213
205
  @rmas ||= ::Io::Flow::V0::Clients::Rmas.new(self)
214
206
  end
215
207
 
216
- def services
217
- @services ||= ::Io::Flow::V0::Clients::Services.new(self)
218
- end
219
-
220
208
  def shipping_labels
221
209
  @shipping_labels ||= ::Io::Flow::V0::Clients::ShippingLabels.new(self)
222
210
  end
@@ -352,6 +340,27 @@ module Io
352
340
 
353
341
  module Clients
354
342
 
343
+ class Allocations
344
+
345
+ def initialize(client)
346
+ @client = HttpClient::Preconditions.assert_class('client', client, ::Io::Flow::V0::Client)
347
+ end
348
+
349
+ # Order-level price details allocated using a strategy among individual order
350
+ # item units.
351
+ def get(organization, number, incoming={})
352
+ HttpClient::Preconditions.assert_class('organization', organization, String)
353
+ HttpClient::Preconditions.assert_class('number', number, String)
354
+ opts = HttpClient::Helper.symbolize_keys(incoming)
355
+ query = {
356
+ :strategy => (x = (x = opts.delete(:strategy); x.nil? ? "equal" : x); x.is_a?(::Io::Flow::V0::Models::AllocationStrategy) ? x : ::Io::Flow::V0::Models::AllocationStrategy.apply(x)).value
357
+ }.delete_if { |k, v| v.nil? }
358
+ r = @client.request("/#{CGI.escape(organization)}/orders/allocations/#{CGI.escape(number)}").with_query(query).get
359
+ ::Io::Flow::V0::Models::Allocation.new(r)
360
+ end
361
+
362
+ end
363
+
355
364
  class Attributes
356
365
 
357
366
  def initialize(client)
@@ -930,6 +939,29 @@ module Io
930
939
  ::Io::Flow::V0::Models::OrderEstimate.new(r)
931
940
  end
932
941
 
942
+ def get_by_id(organization, id)
943
+ HttpClient::Preconditions.assert_class('organization', organization, String)
944
+ HttpClient::Preconditions.assert_class('id', id, String)
945
+ r = @client.request("/#{CGI.escape(organization)}/order-estimates/#{CGI.escape(id)}").get
946
+ ::Io::Flow::V0::Models::Experience.new(r)
947
+ end
948
+
949
+ def put_by_id(organization, id, order_estimate_form, incoming={})
950
+ HttpClient::Preconditions.assert_class('organization', organization, String)
951
+ HttpClient::Preconditions.assert_class('id', id, String)
952
+ opts = HttpClient::Helper.symbolize_keys(incoming)
953
+ query = {
954
+ :experience => (x = opts.delete(:experience); x.nil? ? nil : HttpClient::Preconditions.assert_class('experience', x, String)),
955
+ :country => (x = opts.delete(:country); x.nil? ? nil : HttpClient::Preconditions.assert_class('country', x, String)),
956
+ :ip => (x = opts.delete(:ip); x.nil? ? nil : HttpClient::Preconditions.assert_class('ip', x, String)),
957
+ :currency => (x = opts.delete(:currency); x.nil? ? nil : HttpClient::Preconditions.assert_class('currency', x, String)),
958
+ :language => (x = opts.delete(:language); x.nil? ? nil : HttpClient::Preconditions.assert_class('language', x, String))
959
+ }.delete_if { |k, v| v.nil? }
960
+ HttpClient::Preconditions.assert_class('order_estimate_form', order_estimate_form, ::Io::Flow::V0::Models::OrderEstimateForm)
961
+ r = @client.request("/#{CGI.escape(organization)}/order-estimates/#{CGI.escape(id)}").with_query(query).with_json(order_estimate_form.to_json).put
962
+ ::Io::Flow::V0::Models::OrderEstimate.new(r)
963
+ end
964
+
933
965
  end
934
966
 
935
967
  class Organizations
@@ -1615,23 +1647,6 @@ module Io
1615
1647
  r.map { |x| ::Io::Flow::V0::Models::Rate.new(x) }
1616
1648
  end
1617
1649
 
1618
- # Create a currency conversion rate for an organization.
1619
- def post(organization, rate_form)
1620
- HttpClient::Preconditions.assert_class('organization', organization, String)
1621
- HttpClient::Preconditions.assert_class('rate_form', rate_form, ::Io::Flow::V0::Models::RateForm)
1622
- r = @client.request("/#{CGI.escape(organization)}/currency/rates").with_json(rate_form.to_json).post
1623
- ::Io::Flow::V0::Models::Rate.new(r)
1624
- end
1625
-
1626
- # Update an existing rate by id.
1627
- def put_by_id(organization, id, rate_form)
1628
- HttpClient::Preconditions.assert_class('organization', organization, String)
1629
- HttpClient::Preconditions.assert_class('id', id, String)
1630
- HttpClient::Preconditions.assert_class('rate_form', rate_form, ::Io::Flow::V0::Models::RateForm)
1631
- r = @client.request("/#{CGI.escape(organization)}/currency/rates/#{CGI.escape(id)}").with_json(rate_form.to_json).put
1632
- ::Io::Flow::V0::Models::Rate.new(r)
1633
- end
1634
-
1635
1650
  # Provides visibility into recent changes of each object, including deletion.
1636
1651
  def get_versions(organization, incoming={})
1637
1652
  HttpClient::Preconditions.assert_class('organization', organization, String)
@@ -1650,42 +1665,6 @@ module Io
1650
1665
 
1651
1666
  end
1652
1667
 
1653
- class SpotRates
1654
-
1655
- def initialize(client)
1656
- @client = HttpClient::Preconditions.assert_class('client', client, ::Io::Flow::V0::Client)
1657
- end
1658
-
1659
- # Search spot rates. Always paginated.
1660
- def get(incoming={})
1661
- opts = HttpClient::Helper.symbolize_keys(incoming)
1662
- query = {
1663
- :id => (x = opts.delete(:id); x.nil? ? nil : HttpClient::Preconditions.assert_class('id', x, Array).map { |v| HttpClient::Preconditions.assert_class('id', v, String) }),
1664
- :base => (x = opts.delete(:base); x.nil? ? nil : HttpClient::Preconditions.assert_class('base', x, String)),
1665
- :target => (x = opts.delete(:target); x.nil? ? nil : HttpClient::Preconditions.assert_class('target', x, String)),
1666
- :limit => HttpClient::Preconditions.assert_class('limit', (x = opts.delete(:limit); x.nil? ? 25 : x), Integer),
1667
- :offset => HttpClient::Preconditions.assert_class('offset', (x = opts.delete(:offset); x.nil? ? 0 : x), Integer),
1668
- :sort => HttpClient::Preconditions.assert_class('sort', (x = opts.delete(:sort); x.nil? ? "-created_at" : x), String)
1669
- }.delete_if { |k, v| v.nil? }
1670
- r = @client.request("/currency/spot-rates").with_query(query).get
1671
- r.map { |x| ::Io::Flow::V0::Models::SpotRate.new(x) }
1672
- end
1673
-
1674
- # Provides visibility into recent changes of each object, including deletion.
1675
- def get_versions(incoming={})
1676
- opts = HttpClient::Helper.symbolize_keys(incoming)
1677
- query = {
1678
- :id => (x = opts.delete(:id); x.nil? ? nil : HttpClient::Preconditions.assert_class('id', x, Array).map { |v| HttpClient::Preconditions.assert_class('id', v, String) }),
1679
- :limit => HttpClient::Preconditions.assert_class('limit', (x = opts.delete(:limit); x.nil? ? 25 : x), Integer),
1680
- :offset => HttpClient::Preconditions.assert_class('offset', (x = opts.delete(:offset); x.nil? ? 0 : x), Integer),
1681
- :sort => HttpClient::Preconditions.assert_class('sort', (x = opts.delete(:sort); x.nil? ? "journal_timestamp" : x), String)
1682
- }.delete_if { |k, v| v.nil? }
1683
- r = @client.request("/currency/spot-rates/versions").with_query(query).get
1684
- r.map { |x| ::Io::Flow::V0::Models::SpotRateVersion.new(x) }
1685
- end
1686
-
1687
- end
1688
-
1689
1668
  class HarmonizationSettings
1690
1669
 
1691
1670
  def initialize(client)
@@ -2229,32 +2208,6 @@ module Io
2229
2208
 
2230
2209
  end
2231
2210
 
2232
- class Carriers
2233
-
2234
- def initialize(client)
2235
- @client = HttpClient::Preconditions.assert_class('client', client, ::Io::Flow::V0::Client)
2236
- end
2237
-
2238
- def get(incoming={})
2239
- opts = HttpClient::Helper.symbolize_keys(incoming)
2240
- query = {
2241
- :id => (x = opts.delete(:id); x.nil? ? nil : HttpClient::Preconditions.assert_class('id', x, Array).map { |v| HttpClient::Preconditions.assert_class('id', v, String) }),
2242
- :limit => HttpClient::Preconditions.assert_class('limit', (x = opts.delete(:limit); x.nil? ? 25 : x), Integer),
2243
- :offset => HttpClient::Preconditions.assert_class('offset', (x = opts.delete(:offset); x.nil? ? 0 : x), Integer),
2244
- :sort => HttpClient::Preconditions.assert_class('sort', (x = opts.delete(:sort); x.nil? ? "name" : x), String)
2245
- }.delete_if { |k, v| v.nil? }
2246
- r = @client.request("/carriers").with_query(query).get
2247
- r.map { |x| ::Io::Flow::V0::Models::Carrier.new(x) }
2248
- end
2249
-
2250
- def get_by_id(id)
2251
- HttpClient::Preconditions.assert_class('id', id, String)
2252
- r = @client.request("/carriers/#{CGI.escape(id)}").get
2253
- ::Io::Flow::V0::Models::Carrier.new(r)
2254
- end
2255
-
2256
- end
2257
-
2258
2211
  class Centers
2259
2212
 
2260
2213
  def initialize(client)
@@ -2529,21 +2482,6 @@ module Io
2529
2482
 
2530
2483
  end
2531
2484
 
2532
- class QuoteEstimates
2533
-
2534
- def initialize(client)
2535
- @client = HttpClient::Preconditions.assert_class('client', client, ::Io::Flow::V0::Client)
2536
- end
2537
-
2538
- def post(organization, quote_estimate_form)
2539
- HttpClient::Preconditions.assert_class('organization', organization, String)
2540
- HttpClient::Preconditions.assert_class('quote_estimate_form', quote_estimate_form, ::Io::Flow::V0::Models::QuoteEstimateForm)
2541
- r = @client.request("/#{CGI.escape(organization)}/quote-estimates").with_json(quote_estimate_form.to_json).post
2542
- ::Io::Flow::V0::Models::QuoteEstimate.new(r)
2543
- end
2544
-
2545
- end
2546
-
2547
2485
  class Rmas
2548
2486
 
2549
2487
  def initialize(client)
@@ -2598,32 +2536,6 @@ module Io
2598
2536
 
2599
2537
  end
2600
2538
 
2601
- class Services
2602
-
2603
- def initialize(client)
2604
- @client = HttpClient::Preconditions.assert_class('client', client, ::Io::Flow::V0::Client)
2605
- end
2606
-
2607
- def get(incoming={})
2608
- opts = HttpClient::Helper.symbolize_keys(incoming)
2609
- query = {
2610
- :id => (x = opts.delete(:id); x.nil? ? nil : HttpClient::Preconditions.assert_class('id', x, Array).map { |v| HttpClient::Preconditions.assert_class('id', v, String) }),
2611
- :limit => HttpClient::Preconditions.assert_class('limit', (x = opts.delete(:limit); x.nil? ? 25 : x), Integer),
2612
- :offset => HttpClient::Preconditions.assert_class('offset', (x = opts.delete(:offset); x.nil? ? 0 : x), Integer),
2613
- :sort => HttpClient::Preconditions.assert_class('sort', (x = opts.delete(:sort); x.nil? ? "name" : x), String)
2614
- }.delete_if { |k, v| v.nil? }
2615
- r = @client.request("/services").with_query(query).get
2616
- r.map { |x| ::Io::Flow::V0::Models::Service.new(x) }
2617
- end
2618
-
2619
- def get_by_id(id)
2620
- HttpClient::Preconditions.assert_class('id', id, String)
2621
- r = @client.request("/services/#{CGI.escape(id)}").get
2622
- ::Io::Flow::V0::Models::Service.new(r)
2623
- end
2624
-
2625
- end
2626
-
2627
2539
  class ShippingLabels
2628
2540
 
2629
2541
  def initialize(client)
@@ -4208,15 +4120,8 @@ module Io
4208
4120
  CATALOG_ITEM_DELETED = 'catalog_item_deleted' unless defined?(CATALOG_ITEM_DELETED)
4209
4121
  SUBCATALOG_ITEM_UPSERTED = 'subcatalog_item_upserted' unless defined?(SUBCATALOG_ITEM_UPSERTED)
4210
4122
  SUBCATALOG_ITEM_DELETED = 'subcatalog_item_deleted' unless defined?(SUBCATALOG_ITEM_DELETED)
4211
- FLOW_CURRENCY_SETTING_DELETED = 'flow_currency_setting_deleted' unless defined?(FLOW_CURRENCY_SETTING_DELETED)
4212
- FLOW_CURRENCY_SETTING_UPSERTED = 'flow_currency_setting_upserted' unless defined?(FLOW_CURRENCY_SETTING_UPSERTED)
4213
4123
  RATE_DELETED = 'rate_deleted' unless defined?(RATE_DELETED)
4214
4124
  RATE_UPSERTED = 'rate_upserted' unless defined?(RATE_UPSERTED)
4215
- SPOT_RATE_DELETED = 'spot_rate_deleted' unless defined?(SPOT_RATE_DELETED)
4216
- SPOT_RATE_UPSERTED = 'spot_rate_upserted' unless defined?(SPOT_RATE_UPSERTED)
4217
- ORGANIZATION_CURRENCY_SETTING_DELETED = 'organization_currency_setting_deleted' unless defined?(ORGANIZATION_CURRENCY_SETTING_DELETED)
4218
- ORGANIZATION_CURRENCY_SETTING_UPSERTED = 'organization_currency_setting_upserted' unless defined?(ORGANIZATION_CURRENCY_SETTING_UPSERTED)
4219
- CONTRACTED_RATE_UPSERTED = 'contracted_rate_upserted' unless defined?(CONTRACTED_RATE_UPSERTED)
4220
4125
  EXPERIENCE_DELETED = 'experience_deleted' unless defined?(EXPERIENCE_DELETED)
4221
4126
  EXPERIENCE_UPSERTED = 'experience_upserted' unless defined?(EXPERIENCE_UPSERTED)
4222
4127
  ITEM_MARGIN_DELETED = 'item_margin_deleted' unless defined?(ITEM_MARGIN_DELETED)
@@ -4263,7 +4168,7 @@ module Io
4263
4168
  end
4264
4169
 
4265
4170
  def subtype_to_hash
4266
- raise 'Cannot serialize an instance of event directly - must use one of the specific types: catalog_upserted, catalog_deleted, subcatalog_upserted, subcatalog_deleted, catalog_item_upserted, catalog_item_deleted, subcatalog_item_upserted, subcatalog_item_deleted, flow_currency_setting_deleted, flow_currency_setting_upserted, rate_deleted, rate_upserted, spot_rate_deleted, spot_rate_upserted, organization_currency_setting_deleted, organization_currency_setting_upserted, contracted_rate_upserted, experience_deleted, experience_upserted, item_margin_deleted, item_margin_upserted, label_format_deleted, label_format_upserted, order_deleted, order_upserted, hs6_code_upserted, hs6_code_deleted, hs10_code_upserted, hs10_code_deleted, item_origin_upserted, item_origin_deleted, harmonized_item_upserted, harmonized_item_deleted, label_upserted, notification_upserted, notification_deleted, rma_upserted, rma_deleted, localized_item_upserted, localized_item_deleted, localized_item_snapshot, organization_upserted, organization_deleted, authorization_upserted, authorization_deleted, capture_upserted, card_upserted, card_deleted, refund_upserted, targeting_item_upserted, targeting_item_deleted, tracking_label_event_upserted'
4171
+ raise 'Cannot serialize an instance of event directly - must use one of the specific types: catalog_upserted, catalog_deleted, subcatalog_upserted, subcatalog_deleted, catalog_item_upserted, catalog_item_deleted, subcatalog_item_upserted, subcatalog_item_deleted, rate_deleted, rate_upserted, experience_deleted, experience_upserted, item_margin_deleted, item_margin_upserted, label_format_deleted, label_format_upserted, order_deleted, order_upserted, hs6_code_upserted, hs6_code_deleted, hs10_code_upserted, hs10_code_deleted, item_origin_upserted, item_origin_deleted, harmonized_item_upserted, harmonized_item_deleted, label_upserted, notification_upserted, notification_deleted, rma_upserted, rma_deleted, localized_item_upserted, localized_item_deleted, localized_item_snapshot, organization_upserted, organization_deleted, authorization_upserted, authorization_deleted, capture_upserted, card_upserted, card_deleted, refund_upserted, targeting_item_upserted, targeting_item_deleted, tracking_label_event_upserted'
4267
4172
  end
4268
4173
 
4269
4174
  def to_hash
@@ -4285,15 +4190,8 @@ module Io
4285
4190
  when Types::CATALOG_ITEM_DELETED; CatalogItemDeleted.new(hash)
4286
4191
  when Types::SUBCATALOG_ITEM_UPSERTED; SubcatalogItemUpserted.new(hash)
4287
4192
  when Types::SUBCATALOG_ITEM_DELETED; SubcatalogItemDeleted.new(hash)
4288
- when Types::FLOW_CURRENCY_SETTING_DELETED; FlowCurrencySettingDeleted.new(hash)
4289
- when Types::FLOW_CURRENCY_SETTING_UPSERTED; FlowCurrencySettingUpserted.new(hash)
4290
4193
  when Types::RATE_DELETED; RateDeleted.new(hash)
4291
4194
  when Types::RATE_UPSERTED; RateUpserted.new(hash)
4292
- when Types::SPOT_RATE_DELETED; SpotRateDeleted.new(hash)
4293
- when Types::SPOT_RATE_UPSERTED; SpotRateUpserted.new(hash)
4294
- when Types::ORGANIZATION_CURRENCY_SETTING_DELETED; OrganizationCurrencySettingDeleted.new(hash)
4295
- when Types::ORGANIZATION_CURRENCY_SETTING_UPSERTED; OrganizationCurrencySettingUpserted.new(hash)
4296
- when Types::CONTRACTED_RATE_UPSERTED; ContractedRateUpserted.new(hash)
4297
4195
  when Types::EXPERIENCE_DELETED; ExperienceDeleted.new(hash)
4298
4196
  when Types::EXPERIENCE_UPSERTED; ExperienceUpserted.new(hash)
4299
4197
  when Types::ITEM_MARGIN_DELETED; ItemMarginDeleted.new(hash)
@@ -4679,6 +4577,11 @@ module Io
4679
4577
 
4680
4578
  module Types
4681
4579
  CATALOG_ITEM_EXPORT_TYPE = 'catalog_item_export_type' unless defined?(CATALOG_ITEM_EXPORT_TYPE)
4580
+ HARMONIZATION_OVERVIEW_EXPORT_TYPE = 'harmonization_overview_export_type' unless defined?(HARMONIZATION_OVERVIEW_EXPORT_TYPE)
4581
+ HARMONIZATION_HS6_EXPORT_TYPE = 'harmonization_hs6_export_type' unless defined?(HARMONIZATION_HS6_EXPORT_TYPE)
4582
+ HARMONIZATION_HS10_EXPORT_TYPE = 'harmonization_hs10_export_type' unless defined?(HARMONIZATION_HS10_EXPORT_TYPE)
4583
+ ACCOUNT_TRANSACTIONS_EXPORT_TYPE = 'account_transactions_export_type' unless defined?(ACCOUNT_TRANSACTIONS_EXPORT_TYPE)
4584
+ ACCOUNT_ORDERS_EXPORT_TYPE = 'account_orders_export_type' unless defined?(ACCOUNT_ORDERS_EXPORT_TYPE)
4682
4585
  SOLIDUS_PRODUCT_EXPORT_TYPE = 'solidus_product_export_type' unless defined?(SOLIDUS_PRODUCT_EXPORT_TYPE)
4683
4586
  SOLIDUS_VARIANT_EXPORT_TYPE = 'solidus_variant_export_type' unless defined?(SOLIDUS_VARIANT_EXPORT_TYPE)
4684
4587
  end
@@ -4692,7 +4595,7 @@ module Io
4692
4595
  end
4693
4596
 
4694
4597
  def subtype_to_hash
4695
- raise 'Cannot serialize an instance of export_type directly - must use one of the specific types: catalog_item_export_type, solidus_product_export_type, solidus_variant_export_type'
4598
+ raise 'Cannot serialize an instance of export_type directly - must use one of the specific types: catalog_item_export_type, harmonization_overview_export_type, harmonization_hs6_export_type, harmonization_hs10_export_type, account_transactions_export_type, account_orders_export_type, solidus_product_export_type, solidus_variant_export_type'
4696
4599
  end
4697
4600
 
4698
4601
  def to_hash
@@ -4707,6 +4610,11 @@ module Io
4707
4610
  end
4708
4611
  case discriminator
4709
4612
  when Types::CATALOG_ITEM_EXPORT_TYPE; CatalogItemExportType.new(hash)
4613
+ when Types::HARMONIZATION_OVERVIEW_EXPORT_TYPE; HarmonizationOverviewExportType.new(hash)
4614
+ when Types::HARMONIZATION_HS6_EXPORT_TYPE; HarmonizationHs6ExportType.new(hash)
4615
+ when Types::HARMONIZATION_HS10_EXPORT_TYPE; HarmonizationHs10ExportType.new(hash)
4616
+ when Types::ACCOUNT_TRANSACTIONS_EXPORT_TYPE; AccountTransactionsExportType.new(hash)
4617
+ when Types::ACCOUNT_ORDERS_EXPORT_TYPE; AccountOrdersExportType.new(hash)
4710
4618
  when Types::SOLIDUS_PRODUCT_EXPORT_TYPE; SolidusProductExportType.new(hash)
4711
4619
  when Types::SOLIDUS_VARIANT_EXPORT_TYPE; SolidusVariantExportType.new(hash)
4712
4620
  else ExportTypeUndefinedType.new(:discriminator => discriminator)
@@ -5181,6 +5089,53 @@ module Io
5181
5089
 
5182
5090
  end
5183
5091
 
5092
+ class AllocationStrategy
5093
+
5094
+ attr_reader :value
5095
+
5096
+ def initialize(value)
5097
+ @value = HttpClient::Preconditions.assert_class('value', value, String)
5098
+ end
5099
+
5100
+ # Returns the instance of AllocationStrategy for this value, creating a new instance for an unknown value
5101
+ def AllocationStrategy.apply(value)
5102
+ if value.instance_of?(AllocationStrategy)
5103
+ value
5104
+ else
5105
+ HttpClient::Preconditions.assert_class_or_nil('value', value, String)
5106
+ value.nil? ? nil : (from_string(value) || AllocationStrategy.new(value))
5107
+ end
5108
+ end
5109
+
5110
+ # Returns the instance of AllocationStrategy for this value, or nil if not found
5111
+ def AllocationStrategy.from_string(value)
5112
+ HttpClient::Preconditions.assert_class('value', value, String)
5113
+ AllocationStrategy.ALL.find { |v| v.value == value }
5114
+ end
5115
+
5116
+ def AllocationStrategy.ALL
5117
+ @@all ||= [AllocationStrategy.equal, AllocationStrategy.proportional]
5118
+ end
5119
+
5120
+ # Distribution of order-specific (freight, insurance) order-level price details
5121
+ # is done evenly regardless of item unit value, and equally across all items
5122
+ def AllocationStrategy.equal
5123
+ @@_equal ||= AllocationStrategy.new('equal')
5124
+ end
5125
+
5126
+ # Distribution of order-specific (freight, insurance) order-level price details
5127
+ # among units based on inidividual unit values as a proportion of the item
5128
+ # subtotal
5129
+ def AllocationStrategy.proportional
5130
+ @@_proportional ||= AllocationStrategy.new('proportional')
5131
+ end
5132
+
5133
+ def to_hash
5134
+ value
5135
+ end
5136
+
5137
+ end
5138
+
5184
5139
  class AuthorizationDeclineCode
5185
5140
 
5186
5141
  attr_reader :value
@@ -5940,7 +5895,7 @@ module Io
5940
5895
  end
5941
5896
 
5942
5897
  def EventType.ALL
5943
- @@all ||= [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.flow_currency_setting_deleted, EventType.flow_currency_setting_upserted, EventType.rate_deleted, EventType.rate_upserted, EventType.spot_rate_deleted, EventType.spot_rate_upserted, EventType.organization_currency_setting_deleted, EventType.organization_currency_setting_upserted, EventType.contracted_rate_upserted, EventType.experience_deleted, EventType.experience_upserted, EventType.item_margin_deleted, EventType.item_margin_upserted, EventType.label_format_deleted, EventType.label_format_upserted, EventType.order_deleted, EventType.order_upserted, 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.label_upserted, EventType.notification_upserted, EventType.notification_deleted, EventType.rma_upserted, EventType.rma_deleted, EventType.localized_item_upserted, EventType.localized_item_deleted, EventType.localized_item_snapshot, EventType.organization_upserted, EventType.organization_deleted, EventType.authorization_upserted, EventType.authorization_deleted, EventType.capture_upserted, EventType.card_upserted, EventType.card_deleted, EventType.refund_upserted, EventType.targeting_item_upserted, EventType.targeting_item_deleted, EventType.tracking_label_event_upserted]
5898
+ @@all ||= [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.rate_deleted, EventType.rate_upserted, EventType.experience_deleted, EventType.experience_upserted, EventType.item_margin_deleted, EventType.item_margin_upserted, EventType.label_format_deleted, EventType.label_format_upserted, EventType.order_deleted, EventType.order_upserted, 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.label_upserted, EventType.notification_upserted, EventType.notification_deleted, EventType.rma_upserted, EventType.rma_deleted, EventType.localized_item_upserted, EventType.localized_item_deleted, EventType.localized_item_snapshot, EventType.organization_upserted, EventType.organization_deleted, EventType.authorization_upserted, EventType.authorization_deleted, EventType.capture_upserted, EventType.card_upserted, EventType.card_deleted, EventType.refund_upserted, EventType.targeting_item_upserted, EventType.targeting_item_deleted, EventType.tracking_label_event_upserted]
5944
5899
  end
5945
5900
 
5946
5901
  def EventType.catalog_upserted
@@ -5975,14 +5930,6 @@ module Io
5975
5930
  @@_subcatalog_item_deleted ||= EventType.new('subcatalog_item_deleted')
5976
5931
  end
5977
5932
 
5978
- def EventType.flow_currency_setting_deleted
5979
- @@_flow_currency_setting_deleted ||= EventType.new('flow_currency_setting_deleted')
5980
- end
5981
-
5982
- def EventType.flow_currency_setting_upserted
5983
- @@_flow_currency_setting_upserted ||= EventType.new('flow_currency_setting_upserted')
5984
- end
5985
-
5986
5933
  def EventType.rate_deleted
5987
5934
  @@_rate_deleted ||= EventType.new('rate_deleted')
5988
5935
  end
@@ -5991,26 +5938,6 @@ module Io
5991
5938
  @@_rate_upserted ||= EventType.new('rate_upserted')
5992
5939
  end
5993
5940
 
5994
- def EventType.spot_rate_deleted
5995
- @@_spot_rate_deleted ||= EventType.new('spot_rate_deleted')
5996
- end
5997
-
5998
- def EventType.spot_rate_upserted
5999
- @@_spot_rate_upserted ||= EventType.new('spot_rate_upserted')
6000
- end
6001
-
6002
- def EventType.organization_currency_setting_deleted
6003
- @@_organization_currency_setting_deleted ||= EventType.new('organization_currency_setting_deleted')
6004
- end
6005
-
6006
- def EventType.organization_currency_setting_upserted
6007
- @@_organization_currency_setting_upserted ||= EventType.new('organization_currency_setting_upserted')
6008
- end
6009
-
6010
- def EventType.contracted_rate_upserted
6011
- @@_contracted_rate_upserted ||= EventType.new('contracted_rate_upserted')
6012
- end
6013
-
6014
5941
  def EventType.experience_deleted
6015
5942
  @@_experience_deleted ||= EventType.new('experience_deleted')
6016
5943
  end
@@ -7692,7 +7619,11 @@ module Io
7692
7619
  end
7693
7620
 
7694
7621
  def TrackingStatus.ALL
7695
- @@all ||= [TrackingStatus.pending, TrackingStatus.info_received, TrackingStatus.in_transit, TrackingStatus.out_for_delivery, TrackingStatus.attempt_fail, TrackingStatus.delivered, TrackingStatus.exception, TrackingStatus.expired]
7622
+ @@all ||= [TrackingStatus.label_created, TrackingStatus.pending, TrackingStatus.info_received, TrackingStatus.in_transit, TrackingStatus.out_for_delivery, TrackingStatus.attempt_fail, TrackingStatus.delivered, TrackingStatus.exception, TrackingStatus.expired]
7623
+ end
7624
+
7625
+ def TrackingStatus.label_created
7626
+ @@_label_created ||= TrackingStatus.new('label_created')
7696
7627
  end
7697
7628
 
7698
7629
  def TrackingStatus.pending
@@ -8137,6 +8068,78 @@ module Io
8137
8068
 
8138
8069
  end
8139
8070
 
8071
+ class AccountOrdersExportType < ExportType
8072
+
8073
+ attr_reader :payment_reference, :transaction_summary_id, :created_on_or_after, :created_after, :created_on_or_before, :created_before
8074
+
8075
+ def initialize(incoming={})
8076
+ super(:discriminator => ExportType::Types::ACCOUNT_ORDERS_EXPORT_TYPE)
8077
+ opts = HttpClient::Helper.symbolize_keys(incoming)
8078
+ @payment_reference = (x = opts.delete(:payment_reference); x.nil? ? nil : HttpClient::Preconditions.assert_class('payment_reference', x, String))
8079
+ @transaction_summary_id = (x = opts.delete(:transaction_summary_id); x.nil? ? nil : HttpClient::Preconditions.assert_class('transaction_summary_id', x, String))
8080
+ @created_on_or_after = (x = opts.delete(:created_on_or_after); x.nil? ? nil : HttpClient::Preconditions.assert_class('created_on_or_after', HttpClient::Helper.to_date_time_iso8601(x), DateTime))
8081
+ @created_after = (x = opts.delete(:created_after); x.nil? ? nil : HttpClient::Preconditions.assert_class('created_after', HttpClient::Helper.to_date_time_iso8601(x), DateTime))
8082
+ @created_on_or_before = (x = opts.delete(:created_on_or_before); x.nil? ? nil : HttpClient::Preconditions.assert_class('created_on_or_before', HttpClient::Helper.to_date_time_iso8601(x), DateTime))
8083
+ @created_before = (x = opts.delete(:created_before); x.nil? ? nil : HttpClient::Preconditions.assert_class('created_before', HttpClient::Helper.to_date_time_iso8601(x), DateTime))
8084
+ end
8085
+
8086
+ def to_json
8087
+ JSON.dump(to_hash)
8088
+ end
8089
+
8090
+ def copy(incoming={})
8091
+ AccountOrdersExportType.new(subtype_to_hash.merge(HttpClient::Helper.symbolize_keys(incoming)))
8092
+ end
8093
+
8094
+ def subtype_to_hash
8095
+ {
8096
+ :payment_reference => payment_reference,
8097
+ :transaction_summary_id => transaction_summary_id,
8098
+ :created_on_or_after => created_on_or_after,
8099
+ :created_after => created_after,
8100
+ :created_on_or_before => created_on_or_before,
8101
+ :created_before => created_before
8102
+ }
8103
+ end
8104
+
8105
+ end
8106
+
8107
+ class AccountTransactionsExportType < ExportType
8108
+
8109
+ attr_reader :payment_reference, :transaction_summary_id, :created_on_or_after, :created_after, :created_on_or_before, :created_before
8110
+
8111
+ def initialize(incoming={})
8112
+ super(:discriminator => ExportType::Types::ACCOUNT_TRANSACTIONS_EXPORT_TYPE)
8113
+ opts = HttpClient::Helper.symbolize_keys(incoming)
8114
+ @payment_reference = (x = opts.delete(:payment_reference); x.nil? ? nil : HttpClient::Preconditions.assert_class('payment_reference', x, String))
8115
+ @transaction_summary_id = (x = opts.delete(:transaction_summary_id); x.nil? ? nil : HttpClient::Preconditions.assert_class('transaction_summary_id', x, String))
8116
+ @created_on_or_after = (x = opts.delete(:created_on_or_after); x.nil? ? nil : HttpClient::Preconditions.assert_class('created_on_or_after', HttpClient::Helper.to_date_time_iso8601(x), DateTime))
8117
+ @created_after = (x = opts.delete(:created_after); x.nil? ? nil : HttpClient::Preconditions.assert_class('created_after', HttpClient::Helper.to_date_time_iso8601(x), DateTime))
8118
+ @created_on_or_before = (x = opts.delete(:created_on_or_before); x.nil? ? nil : HttpClient::Preconditions.assert_class('created_on_or_before', HttpClient::Helper.to_date_time_iso8601(x), DateTime))
8119
+ @created_before = (x = opts.delete(:created_before); x.nil? ? nil : HttpClient::Preconditions.assert_class('created_before', HttpClient::Helper.to_date_time_iso8601(x), DateTime))
8120
+ end
8121
+
8122
+ def to_json
8123
+ JSON.dump(to_hash)
8124
+ end
8125
+
8126
+ def copy(incoming={})
8127
+ AccountTransactionsExportType.new(subtype_to_hash.merge(HttpClient::Helper.symbolize_keys(incoming)))
8128
+ end
8129
+
8130
+ def subtype_to_hash
8131
+ {
8132
+ :payment_reference => payment_reference,
8133
+ :transaction_summary_id => transaction_summary_id,
8134
+ :created_on_or_after => created_on_or_after,
8135
+ :created_after => created_after,
8136
+ :created_on_or_before => created_on_or_before,
8137
+ :created_before => created_before
8138
+ }
8139
+ end
8140
+
8141
+ end
8142
+
8140
8143
  # Defines structured fields for address to be used in user/form input. Either
8141
8144
  # text or the structured input needs to be present.
8142
8145
  class Address
@@ -8279,17 +8282,17 @@ module Io
8279
8282
 
8280
8283
  end
8281
8284
 
8282
- # Rule outcome where shipping surfaced in quote is actual cost plus a predefined
8283
- # margin price
8284
- class AmountMargin < TierRuleOutcome
8285
+ class Allocation
8285
8286
 
8286
- attr_reader :addition
8287
+ attr_reader :order, :base_currency, :target_currency, :items
8287
8288
 
8288
8289
  def initialize(incoming={})
8289
- super(:discriminator => TierRuleOutcome::Types::AMOUNT_MARGIN)
8290
8290
  opts = HttpClient::Helper.symbolize_keys(incoming)
8291
- HttpClient::Preconditions.require_keys(opts, [:addition], 'AmountMargin')
8292
- @addition = (x = opts.delete(:addition); x.is_a?(::Io::Flow::V0::Models::Price) ? x : ::Io::Flow::V0::Models::Price.new(x))
8291
+ HttpClient::Preconditions.require_keys(opts, [:order, :base_currency, :target_currency, :items], 'Allocation')
8292
+ @order = (x = opts.delete(:order); x.is_a?(::Io::Flow::V0::Models::OrderReference) ? x : ::Io::Flow::V0::Models::OrderReference.new(x))
8293
+ @base_currency = HttpClient::Preconditions.assert_class('base_currency', opts.delete(:base_currency), String)
8294
+ @target_currency = HttpClient::Preconditions.assert_class('target_currency', opts.delete(:target_currency), String)
8295
+ @items = HttpClient::Preconditions.assert_class('items', opts.delete(:items), Array).map { |v| (x = v; x.is_a?(::Io::Flow::V0::Models::AllocationItem) ? x : ::Io::Flow::V0::Models::AllocationItem.new(x)) }
8293
8296
  end
8294
8297
 
8295
8298
  def to_json
@@ -8297,26 +8300,31 @@ module Io
8297
8300
  end
8298
8301
 
8299
8302
  def copy(incoming={})
8300
- AmountMargin.new(subtype_to_hash.merge(HttpClient::Helper.symbolize_keys(incoming)))
8303
+ Allocation.new(to_hash.merge(HttpClient::Helper.symbolize_keys(incoming)))
8301
8304
  end
8302
8305
 
8303
- def subtype_to_hash
8306
+ def to_hash
8304
8307
  {
8305
- :addition => addition.to_hash
8308
+ :order => order.to_hash,
8309
+ :base_currency => base_currency,
8310
+ :target_currency => target_currency,
8311
+ :items => items.map { |o| o.to_hash }
8306
8312
  }
8307
8313
  end
8308
8314
 
8309
8315
  end
8310
8316
 
8311
- # Rule outcome where shipping surfaced in quote is actual cost of the service
8312
- class AtCost < TierRuleOutcome
8317
+ class AllocationDetail
8313
8318
 
8314
- attr_reader :ignore
8319
+ attr_reader :base, :key, :target, :components
8315
8320
 
8316
8321
  def initialize(incoming={})
8317
- super(:discriminator => TierRuleOutcome::Types::AT_COST)
8318
8322
  opts = HttpClient::Helper.symbolize_keys(incoming)
8319
- @ignore = (x = opts.delete(:ignore); x.nil? ? nil : HttpClient::Preconditions.assert_class('ignore', x, String))
8323
+ HttpClient::Preconditions.require_keys(opts, [:base, :key, :target, :components], 'AllocationDetail')
8324
+ @base = HttpClient::Preconditions.assert_class('base', HttpClient::Helper.to_big_decimal(opts.delete(:base)), BigDecimal)
8325
+ @key = (x = opts.delete(:key); x.is_a?(::Io::Flow::V0::Models::OrderPriceDetailKey) ? x : ::Io::Flow::V0::Models::OrderPriceDetailKey.apply(x))
8326
+ @target = HttpClient::Preconditions.assert_class('target', HttpClient::Helper.to_big_decimal(opts.delete(:target)), BigDecimal)
8327
+ @components = HttpClient::Preconditions.assert_class('components', opts.delete(:components), Array).map { |v| (x = v; x.is_a?(::Io::Flow::V0::Models::AllocationDetailComponent) ? x : ::Io::Flow::V0::Models::AllocationDetailComponent.new(x)) }
8320
8328
  end
8321
8329
 
8322
8330
  def to_json
@@ -8324,31 +8332,30 @@ module Io
8324
8332
  end
8325
8333
 
8326
8334
  def copy(incoming={})
8327
- AtCost.new(subtype_to_hash.merge(HttpClient::Helper.symbolize_keys(incoming)))
8335
+ AllocationDetail.new(to_hash.merge(HttpClient::Helper.symbolize_keys(incoming)))
8328
8336
  end
8329
8337
 
8330
- def subtype_to_hash
8338
+ def to_hash
8331
8339
  {
8332
- :ignore => ignore
8340
+ :base => base,
8341
+ :key => key.value,
8342
+ :target => target,
8343
+ :components => components.map { |o| o.to_hash }
8333
8344
  }
8334
8345
  end
8335
8346
 
8336
8347
  end
8337
8348
 
8338
- # An attribute can be configured to be used in different ways throughout Flow. A
8339
- # common example is to identify a meaningful attribute (e.g. brand) that can
8340
- # then be displayed throughout the Flow console.
8341
- class Attribute
8349
+ class AllocationDetailComponent
8342
8350
 
8343
- attr_reader :id, :key, :options, :label
8351
+ attr_reader :base, :key, :target
8344
8352
 
8345
8353
  def initialize(incoming={})
8346
8354
  opts = HttpClient::Helper.symbolize_keys(incoming)
8347
- HttpClient::Preconditions.require_keys(opts, [:id, :key, :options], 'Attribute')
8348
- @id = HttpClient::Preconditions.assert_class('id', opts.delete(:id), String)
8349
- @key = HttpClient::Preconditions.assert_class('key', opts.delete(:key), String)
8350
- @options = (x = opts.delete(:options); x.is_a?(::Io::Flow::V0::Models::Options) ? x : ::Io::Flow::V0::Models::Options.new(x))
8351
- @label = (x = opts.delete(:label); x.nil? ? nil : HttpClient::Preconditions.assert_class('label', x, String))
8355
+ HttpClient::Preconditions.require_keys(opts, [:base, :key, :target], 'AllocationDetailComponent')
8356
+ @base = HttpClient::Preconditions.assert_class('base', HttpClient::Helper.to_big_decimal(opts.delete(:base)), BigDecimal)
8357
+ @key = (x = opts.delete(:key); x.is_a?(::Io::Flow::V0::Models::OrderPriceDetailComponentKey) ? x : ::Io::Flow::V0::Models::OrderPriceDetailComponentKey.apply(x))
8358
+ @target = HttpClient::Preconditions.assert_class('target', HttpClient::Helper.to_big_decimal(opts.delete(:target)), BigDecimal)
8352
8359
  end
8353
8360
 
8354
8361
  def to_json
@@ -8356,13 +8363,135 @@ module Io
8356
8363
  end
8357
8364
 
8358
8365
  def copy(incoming={})
8359
- Attribute.new(to_hash.merge(HttpClient::Helper.symbolize_keys(incoming)))
8366
+ AllocationDetailComponent.new(to_hash.merge(HttpClient::Helper.symbolize_keys(incoming)))
8360
8367
  end
8361
8368
 
8362
8369
  def to_hash
8363
8370
  {
8364
- :id => id,
8365
- :key => key,
8371
+ :base => base,
8372
+ :key => key.value,
8373
+ :target => target
8374
+ }
8375
+ end
8376
+
8377
+ end
8378
+
8379
+ class AllocationItem
8380
+
8381
+ attr_reader :base, :number, :target, :details
8382
+
8383
+ def initialize(incoming={})
8384
+ opts = HttpClient::Helper.symbolize_keys(incoming)
8385
+ HttpClient::Preconditions.require_keys(opts, [:base, :number, :target, :details], 'AllocationItem')
8386
+ @base = HttpClient::Preconditions.assert_class('base', HttpClient::Helper.to_big_decimal(opts.delete(:base)), BigDecimal)
8387
+ @number = HttpClient::Preconditions.assert_class('number', opts.delete(:number), String)
8388
+ @target = HttpClient::Preconditions.assert_class('target', HttpClient::Helper.to_big_decimal(opts.delete(:target)), BigDecimal)
8389
+ @details = HttpClient::Preconditions.assert_class('details', opts.delete(:details), Array).map { |v| (x = v; x.is_a?(::Io::Flow::V0::Models::AllocationDetail) ? x : ::Io::Flow::V0::Models::AllocationDetail.new(x)) }
8390
+ end
8391
+
8392
+ def to_json
8393
+ JSON.dump(to_hash)
8394
+ end
8395
+
8396
+ def copy(incoming={})
8397
+ AllocationItem.new(to_hash.merge(HttpClient::Helper.symbolize_keys(incoming)))
8398
+ end
8399
+
8400
+ def to_hash
8401
+ {
8402
+ :base => base,
8403
+ :number => number,
8404
+ :target => target,
8405
+ :details => details.map { |o| o.to_hash }
8406
+ }
8407
+ end
8408
+
8409
+ end
8410
+
8411
+ # Rule outcome where shipping surfaced in quote is actual cost plus a predefined
8412
+ # margin price
8413
+ class AmountMargin < TierRuleOutcome
8414
+
8415
+ attr_reader :addition
8416
+
8417
+ def initialize(incoming={})
8418
+ super(:discriminator => TierRuleOutcome::Types::AMOUNT_MARGIN)
8419
+ opts = HttpClient::Helper.symbolize_keys(incoming)
8420
+ HttpClient::Preconditions.require_keys(opts, [:addition], 'AmountMargin')
8421
+ @addition = (x = opts.delete(:addition); x.is_a?(::Io::Flow::V0::Models::Price) ? x : ::Io::Flow::V0::Models::Price.new(x))
8422
+ end
8423
+
8424
+ def to_json
8425
+ JSON.dump(to_hash)
8426
+ end
8427
+
8428
+ def copy(incoming={})
8429
+ AmountMargin.new(subtype_to_hash.merge(HttpClient::Helper.symbolize_keys(incoming)))
8430
+ end
8431
+
8432
+ def subtype_to_hash
8433
+ {
8434
+ :addition => addition.to_hash
8435
+ }
8436
+ end
8437
+
8438
+ end
8439
+
8440
+ # Rule outcome where shipping surfaced in quote is actual cost of the service
8441
+ class AtCost < TierRuleOutcome
8442
+
8443
+ attr_reader :ignore
8444
+
8445
+ def initialize(incoming={})
8446
+ super(:discriminator => TierRuleOutcome::Types::AT_COST)
8447
+ opts = HttpClient::Helper.symbolize_keys(incoming)
8448
+ @ignore = (x = opts.delete(:ignore); x.nil? ? nil : HttpClient::Preconditions.assert_class('ignore', x, String))
8449
+ end
8450
+
8451
+ def to_json
8452
+ JSON.dump(to_hash)
8453
+ end
8454
+
8455
+ def copy(incoming={})
8456
+ AtCost.new(subtype_to_hash.merge(HttpClient::Helper.symbolize_keys(incoming)))
8457
+ end
8458
+
8459
+ def subtype_to_hash
8460
+ {
8461
+ :ignore => ignore
8462
+ }
8463
+ end
8464
+
8465
+ end
8466
+
8467
+ # An attribute can be configured to be used in different ways throughout Flow. A
8468
+ # common example is to identify a meaningful attribute (e.g. brand) that can
8469
+ # then be displayed throughout the Flow console.
8470
+ class Attribute
8471
+
8472
+ attr_reader :id, :key, :options, :label
8473
+
8474
+ def initialize(incoming={})
8475
+ opts = HttpClient::Helper.symbolize_keys(incoming)
8476
+ HttpClient::Preconditions.require_keys(opts, [:id, :key, :options], 'Attribute')
8477
+ @id = HttpClient::Preconditions.assert_class('id', opts.delete(:id), String)
8478
+ @key = HttpClient::Preconditions.assert_class('key', opts.delete(:key), String)
8479
+ @options = (x = opts.delete(:options); x.is_a?(::Io::Flow::V0::Models::Options) ? x : ::Io::Flow::V0::Models::Options.new(x))
8480
+ @label = (x = opts.delete(:label); x.nil? ? nil : HttpClient::Preconditions.assert_class('label', x, String))
8481
+ end
8482
+
8483
+ def to_json
8484
+ JSON.dump(to_hash)
8485
+ end
8486
+
8487
+ def copy(incoming={})
8488
+ Attribute.new(to_hash.merge(HttpClient::Helper.symbolize_keys(incoming)))
8489
+ end
8490
+
8491
+ def to_hash
8492
+ {
8493
+ :id => id,
8494
+ :key => key,
8366
8495
  :options => options.to_hash,
8367
8496
  :label => label
8368
8497
  }
@@ -9493,6 +9622,36 @@ module Io
9493
9622
 
9494
9623
  end
9495
9624
 
9625
+ class CatalogItemSummary
9626
+
9627
+ attr_reader :number, :name, :attributes
9628
+
9629
+ def initialize(incoming={})
9630
+ opts = HttpClient::Helper.symbolize_keys(incoming)
9631
+ HttpClient::Preconditions.require_keys(opts, [:number, :name, :attributes], 'CatalogItemSummary')
9632
+ @number = HttpClient::Preconditions.assert_class('number', opts.delete(:number), String)
9633
+ @name = HttpClient::Preconditions.assert_class('name', opts.delete(:name), String)
9634
+ @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 }
9635
+ end
9636
+
9637
+ def to_json
9638
+ JSON.dump(to_hash)
9639
+ end
9640
+
9641
+ def copy(incoming={})
9642
+ CatalogItemSummary.new(to_hash.merge(HttpClient::Helper.symbolize_keys(incoming)))
9643
+ end
9644
+
9645
+ def to_hash
9646
+ {
9647
+ :number => number,
9648
+ :name => name,
9649
+ :attributes => attributes
9650
+ }
9651
+ end
9652
+
9653
+ end
9654
+
9496
9655
  class CatalogItemUpserted < Event
9497
9656
 
9498
9657
  attr_reader :event_id, :timestamp, :organization, :number, :catalog, :locale, :name, :currency, :price, :categories, :description, :attributes, :dimensions, :images
@@ -9894,45 +10053,6 @@ module Io
9894
10053
 
9895
10054
  end
9896
10055
 
9897
- class ContractedRateUpserted < Event
9898
-
9899
- attr_reader :event_id, :timestamp, :organization_id, :base, :target, :effective_at, :value
9900
-
9901
- def initialize(incoming={})
9902
- super(:discriminator => Event::Types::CONTRACTED_RATE_UPSERTED)
9903
- opts = HttpClient::Helper.symbolize_keys(incoming)
9904
- HttpClient::Preconditions.require_keys(opts, [:event_id, :timestamp, :organization_id, :base, :target, :effective_at, :value], 'ContractedRateUpserted')
9905
- @event_id = HttpClient::Preconditions.assert_class('event_id', opts.delete(:event_id), String)
9906
- @timestamp = HttpClient::Preconditions.assert_class('timestamp', HttpClient::Helper.to_date_time_iso8601(opts.delete(:timestamp)), DateTime)
9907
- @organization_id = HttpClient::Preconditions.assert_class('organization_id', opts.delete(:organization_id), String)
9908
- @base = HttpClient::Preconditions.assert_class('base', opts.delete(:base), String)
9909
- @target = HttpClient::Preconditions.assert_class('target', opts.delete(:target), String)
9910
- @effective_at = HttpClient::Preconditions.assert_class('effective_at', HttpClient::Helper.to_date_time_iso8601(opts.delete(:effective_at)), DateTime)
9911
- @value = HttpClient::Preconditions.assert_class('value', HttpClient::Helper.to_big_decimal(opts.delete(:value)), BigDecimal)
9912
- end
9913
-
9914
- def to_json
9915
- JSON.dump(to_hash)
9916
- end
9917
-
9918
- def copy(incoming={})
9919
- ContractedRateUpserted.new(subtype_to_hash.merge(HttpClient::Helper.symbolize_keys(incoming)))
9920
- end
9921
-
9922
- def subtype_to_hash
9923
- {
9924
- :event_id => event_id,
9925
- :timestamp => timestamp,
9926
- :organization_id => organization_id,
9927
- :base => base,
9928
- :target => target,
9929
- :effective_at => effective_at,
9930
- :value => value
9931
- }
9932
- end
9933
-
9934
- end
9935
-
9936
10056
  # ISO 3166 country codes. Note Flow APIs will accept either the 2 or 3 character
9937
10057
  # country code, but internally we normalize data and store as the 3 character,
9938
10058
  # upper case ISO code. See https://api.flow.io/reference/countries
@@ -10164,34 +10284,6 @@ module Io
10164
10284
 
10165
10285
  end
10166
10286
 
10167
- class DeliveryEstimate
10168
-
10169
- attr_reader :items, :options
10170
-
10171
- def initialize(incoming={})
10172
- opts = HttpClient::Helper.symbolize_keys(incoming)
10173
- HttpClient::Preconditions.require_keys(opts, [:items, :options], 'DeliveryEstimate')
10174
- @items = HttpClient::Preconditions.assert_class('items', opts.delete(:items), Array).map { |v| (x = v; x.is_a?(::Io::Flow::V0::Models::LineItemForm) ? x : ::Io::Flow::V0::Models::LineItemForm.new(x)) }
10175
- @options = HttpClient::Preconditions.assert_class('options', opts.delete(:options), Array).map { |v| (x = v; x.is_a?(::Io::Flow::V0::Models::DeliveryOptionEstimate) ? x : ::Io::Flow::V0::Models::DeliveryOptionEstimate.new(x)) }
10176
- end
10177
-
10178
- def to_json
10179
- JSON.dump(to_hash)
10180
- end
10181
-
10182
- def copy(incoming={})
10183
- DeliveryEstimate.new(to_hash.merge(HttpClient::Helper.symbolize_keys(incoming)))
10184
- end
10185
-
10186
- def to_hash
10187
- {
10188
- :items => items.map { |o| o.to_hash },
10189
- :options => options.map { |o| o.to_hash }
10190
- }
10191
- end
10192
-
10193
- end
10194
-
10195
10287
  # Represents a collection of items, the available delivery option tier for that
10196
10288
  # collection of items, and metadata about those options
10197
10289
  class DeliveryForm
@@ -10236,7 +10328,7 @@ module Io
10236
10328
  @id = HttpClient::Preconditions.assert_class('id', opts.delete(:id), String)
10237
10329
  @cost = (x = opts.delete(:cost); x.is_a?(::Io::Flow::V0::Models::Price) ? x : ::Io::Flow::V0::Models::Price.new(x))
10238
10330
  @delivered_duty = (x = opts.delete(:delivered_duty); x.is_a?(::Io::Flow::V0::Models::DeliveredDuty) ? x : ::Io::Flow::V0::Models::DeliveredDuty.apply(x))
10239
- @price = (x = opts.delete(:price); x.is_a?(::Io::Flow::V0::Models::Price) ? x : ::Io::Flow::V0::Models::Price.new(x))
10331
+ @price = (x = opts.delete(:price); x.is_a?(::Io::Flow::V0::Models::PriceWithBase) ? x : ::Io::Flow::V0::Models::PriceWithBase.new(x))
10240
10332
  @service = (x = opts.delete(:service); x.is_a?(::Io::Flow::V0::Models::ServiceSummary) ? x : ::Io::Flow::V0::Models::ServiceSummary.new(x))
10241
10333
  @tier = (x = opts.delete(:tier); x.is_a?(::Io::Flow::V0::Models::TierSummary) ? x : ::Io::Flow::V0::Models::TierSummary.new(x))
10242
10334
  @window = (x = opts.delete(:window); x.is_a?(::Io::Flow::V0::Models::DatetimeRange) ? x : ::Io::Flow::V0::Models::DatetimeRange.new(x))
@@ -10264,42 +10356,6 @@ module Io
10264
10356
 
10265
10357
  end
10266
10358
 
10267
- class DeliveryOptionEstimate
10268
-
10269
- attr_reader :cost, :delivered_duty, :price, :service, :tier, :window
10270
-
10271
- def initialize(incoming={})
10272
- opts = HttpClient::Helper.symbolize_keys(incoming)
10273
- HttpClient::Preconditions.require_keys(opts, [:cost, :delivered_duty, :price, :service, :tier, :window], 'DeliveryOptionEstimate')
10274
- @cost = (x = opts.delete(:cost); x.is_a?(::Io::Flow::V0::Models::Price) ? x : ::Io::Flow::V0::Models::Price.new(x))
10275
- @delivered_duty = (x = opts.delete(:delivered_duty); x.is_a?(::Io::Flow::V0::Models::DeliveredDuty) ? x : ::Io::Flow::V0::Models::DeliveredDuty.apply(x))
10276
- @price = (x = opts.delete(:price); x.is_a?(::Io::Flow::V0::Models::Price) ? x : ::Io::Flow::V0::Models::Price.new(x))
10277
- @service = (x = opts.delete(:service); x.is_a?(::Io::Flow::V0::Models::ServiceSummary) ? x : ::Io::Flow::V0::Models::ServiceSummary.new(x))
10278
- @tier = (x = opts.delete(:tier); x.is_a?(::Io::Flow::V0::Models::TierSummary) ? x : ::Io::Flow::V0::Models::TierSummary.new(x))
10279
- @window = (x = opts.delete(:window); x.is_a?(::Io::Flow::V0::Models::DatetimeRange) ? x : ::Io::Flow::V0::Models::DatetimeRange.new(x))
10280
- end
10281
-
10282
- def to_json
10283
- JSON.dump(to_hash)
10284
- end
10285
-
10286
- def copy(incoming={})
10287
- DeliveryOptionEstimate.new(to_hash.merge(HttpClient::Helper.symbolize_keys(incoming)))
10288
- end
10289
-
10290
- def to_hash
10291
- {
10292
- :cost => cost.to_hash,
10293
- :delivered_duty => delivered_duty.value,
10294
- :price => price.to_hash,
10295
- :service => service.to_hash,
10296
- :tier => tier.to_hash,
10297
- :window => window.to_hash
10298
- }
10299
- end
10300
-
10301
- end
10302
-
10303
10359
  # Represents a way to fulfill a delivery, including an estimates for the date
10304
10360
  # range and cost
10305
10361
  class DeliveryOptionForm
@@ -11337,17 +11393,14 @@ module Io
11337
11393
 
11338
11394
  end
11339
11395
 
11340
- class FlowCurrencySettingDeleted < Event
11396
+ class FlowItemIndexMetadata
11341
11397
 
11342
- attr_reader :event_id, :timestamp, :flow_currency_setting_id
11398
+ attr_reader :status
11343
11399
 
11344
11400
  def initialize(incoming={})
11345
- super(:discriminator => Event::Types::FLOW_CURRENCY_SETTING_DELETED)
11346
11401
  opts = HttpClient::Helper.symbolize_keys(incoming)
11347
- HttpClient::Preconditions.require_keys(opts, [:event_id, :timestamp, :flow_currency_setting_id], 'FlowCurrencySettingDeleted')
11348
- @event_id = HttpClient::Preconditions.assert_class('event_id', opts.delete(:event_id), String)
11349
- @timestamp = HttpClient::Preconditions.assert_class('timestamp', HttpClient::Helper.to_date_time_iso8601(opts.delete(:timestamp)), DateTime)
11350
- @flow_currency_setting_id = HttpClient::Preconditions.assert_class('flow_currency_setting_id', opts.delete(:flow_currency_setting_id), String)
11402
+ HttpClient::Preconditions.require_keys(opts, [:status], 'FlowItemIndexMetadata')
11403
+ @status = (x = opts.delete(:status); x.is_a?(::Io::Flow::V0::Models::SubcatalogItemStatus) ? x : ::Io::Flow::V0::Models::SubcatalogItemStatus.apply(x))
11351
11404
  end
11352
11405
 
11353
11406
  def to_json
@@ -11355,36 +11408,26 @@ module Io
11355
11408
  end
11356
11409
 
11357
11410
  def copy(incoming={})
11358
- FlowCurrencySettingDeleted.new(subtype_to_hash.merge(HttpClient::Helper.symbolize_keys(incoming)))
11411
+ FlowItemIndexMetadata.new(to_hash.merge(HttpClient::Helper.symbolize_keys(incoming)))
11359
11412
  end
11360
11413
 
11361
- def subtype_to_hash
11414
+ def to_hash
11362
11415
  {
11363
- :event_id => event_id,
11364
- :timestamp => timestamp,
11365
- :flow_currency_setting_id => flow_currency_setting_id
11416
+ :status => status.value
11366
11417
  }
11367
11418
  end
11368
11419
 
11369
11420
  end
11370
11421
 
11371
- class FlowCurrencySettingUpserted < Event
11422
+ class FulfillmentExperienceReference
11372
11423
 
11373
- attr_reader :event_id, :timestamp, :flow_currency_setting_id, :organization_id, :base, :target, :margin, :rate_lock_unit, :rate_lock_value
11424
+ attr_reader :id, :currency
11374
11425
 
11375
11426
  def initialize(incoming={})
11376
- super(:discriminator => Event::Types::FLOW_CURRENCY_SETTING_UPSERTED)
11377
11427
  opts = HttpClient::Helper.symbolize_keys(incoming)
11378
- HttpClient::Preconditions.require_keys(opts, [:event_id, :timestamp, :flow_currency_setting_id, :organization_id, :base, :target, :margin, :rate_lock_unit, :rate_lock_value], 'FlowCurrencySettingUpserted')
11379
- @event_id = HttpClient::Preconditions.assert_class('event_id', opts.delete(:event_id), String)
11380
- @timestamp = HttpClient::Preconditions.assert_class('timestamp', HttpClient::Helper.to_date_time_iso8601(opts.delete(:timestamp)), DateTime)
11381
- @flow_currency_setting_id = HttpClient::Preconditions.assert_class('flow_currency_setting_id', opts.delete(:flow_currency_setting_id), String)
11382
- @organization_id = HttpClient::Preconditions.assert_class('organization_id', opts.delete(:organization_id), String)
11383
- @base = HttpClient::Preconditions.assert_class('base', opts.delete(:base), String)
11384
- @target = HttpClient::Preconditions.assert_class('target', opts.delete(:target), String)
11385
- @margin = HttpClient::Preconditions.assert_class('margin', HttpClient::Helper.to_big_decimal(opts.delete(:margin)), BigDecimal)
11386
- @rate_lock_unit = HttpClient::Preconditions.assert_class('rate_lock_unit', opts.delete(:rate_lock_unit), String)
11387
- @rate_lock_value = HttpClient::Preconditions.assert_class('rate_lock_value', opts.delete(:rate_lock_value), Integer)
11428
+ HttpClient::Preconditions.require_keys(opts, [:id, :currency], 'FulfillmentExperienceReference')
11429
+ @id = HttpClient::Preconditions.assert_class('id', opts.delete(:id), String)
11430
+ @currency = HttpClient::Preconditions.assert_class('currency', opts.delete(:currency), String)
11388
11431
  end
11389
11432
 
11390
11433
  def to_json
@@ -11392,33 +11435,29 @@ module Io
11392
11435
  end
11393
11436
 
11394
11437
  def copy(incoming={})
11395
- FlowCurrencySettingUpserted.new(subtype_to_hash.merge(HttpClient::Helper.symbolize_keys(incoming)))
11438
+ FulfillmentExperienceReference.new(to_hash.merge(HttpClient::Helper.symbolize_keys(incoming)))
11396
11439
  end
11397
11440
 
11398
- def subtype_to_hash
11441
+ def to_hash
11399
11442
  {
11400
- :event_id => event_id,
11401
- :timestamp => timestamp,
11402
- :flow_currency_setting_id => flow_currency_setting_id,
11403
- :organization_id => organization_id,
11404
- :base => base,
11405
- :target => target,
11406
- :margin => margin,
11407
- :rate_lock_unit => rate_lock_unit,
11408
- :rate_lock_value => rate_lock_value
11443
+ :id => id,
11444
+ :currency => currency
11409
11445
  }
11410
11446
  end
11411
11447
 
11412
11448
  end
11413
11449
 
11414
- class FlowItemIndexMetadata
11450
+ # An error of some type has occured. The most common error will be validation on
11451
+ # input. See messages for details.
11452
+ class GenericError
11415
11453
 
11416
- attr_reader :status
11454
+ attr_reader :code, :messages
11417
11455
 
11418
11456
  def initialize(incoming={})
11419
11457
  opts = HttpClient::Helper.symbolize_keys(incoming)
11420
- HttpClient::Preconditions.require_keys(opts, [:status], 'FlowItemIndexMetadata')
11421
- @status = (x = opts.delete(:status); x.is_a?(::Io::Flow::V0::Models::SubcatalogItemStatus) ? x : ::Io::Flow::V0::Models::SubcatalogItemStatus.apply(x))
11458
+ HttpClient::Preconditions.require_keys(opts, [:messages], 'GenericError')
11459
+ @code = (x = (x = opts.delete(:code); x.nil? ? "generic_error" : x); x.is_a?(::Io::Flow::V0::Models::GenericErrorCode) ? x : ::Io::Flow::V0::Models::GenericErrorCode.apply(x))
11460
+ @messages = HttpClient::Preconditions.assert_class('messages', opts.delete(:messages), Array).map { |v| HttpClient::Preconditions.assert_class('messages', v, String) }
11422
11461
  end
11423
11462
 
11424
11463
  def to_json
@@ -11426,26 +11465,29 @@ module Io
11426
11465
  end
11427
11466
 
11428
11467
  def copy(incoming={})
11429
- FlowItemIndexMetadata.new(to_hash.merge(HttpClient::Helper.symbolize_keys(incoming)))
11468
+ GenericError.new(to_hash.merge(HttpClient::Helper.symbolize_keys(incoming)))
11430
11469
  end
11431
11470
 
11432
11471
  def to_hash
11433
11472
  {
11434
- :status => status.value
11473
+ :code => code.value,
11474
+ :messages => messages
11435
11475
  }
11436
11476
  end
11437
11477
 
11438
11478
  end
11439
11479
 
11440
- class FulfillmentExperienceReference
11480
+ class HarmonizationDocument < Document
11441
11481
 
11442
- attr_reader :id, :currency
11482
+ attr_reader :code, :categories, :origin
11443
11483
 
11444
11484
  def initialize(incoming={})
11485
+ super(:discriminator => Document::Types::HARMONIZATION_DOCUMENT)
11445
11486
  opts = HttpClient::Helper.symbolize_keys(incoming)
11446
- HttpClient::Preconditions.require_keys(opts, [:id, :currency], 'FulfillmentExperienceReference')
11447
- @id = HttpClient::Preconditions.assert_class('id', opts.delete(:id), String)
11448
- @currency = HttpClient::Preconditions.assert_class('currency', opts.delete(:currency), String)
11487
+ HttpClient::Preconditions.require_keys(opts, [:code, :categories], 'HarmonizationDocument')
11488
+ @code = HttpClient::Preconditions.assert_class('code', opts.delete(:code), String)
11489
+ @categories = HttpClient::Preconditions.assert_class('categories', opts.delete(:categories), Array).map { |v| (x = v; x.is_a?(::Io::Flow::V0::Models::CategorySummary) ? x : ::Io::Flow::V0::Models::CategorySummary.new(x)) }
11490
+ @origin = (x = opts.delete(:origin); x.nil? ? nil : HttpClient::Preconditions.assert_class('origin', x, String))
11449
11491
  end
11450
11492
 
11451
11493
  def to_json
@@ -11453,29 +11495,33 @@ module Io
11453
11495
  end
11454
11496
 
11455
11497
  def copy(incoming={})
11456
- FulfillmentExperienceReference.new(to_hash.merge(HttpClient::Helper.symbolize_keys(incoming)))
11498
+ HarmonizationDocument.new(subtype_to_hash.merge(HttpClient::Helper.symbolize_keys(incoming)))
11457
11499
  end
11458
11500
 
11459
- def to_hash
11501
+ def subtype_to_hash
11460
11502
  {
11461
- :id => id,
11462
- :currency => currency
11503
+ :code => code,
11504
+ :categories => categories.map { |o| o.to_hash },
11505
+ :origin => origin
11463
11506
  }
11464
11507
  end
11465
11508
 
11466
11509
  end
11467
11510
 
11468
- # An error of some type has occured. The most common error will be validation on
11469
- # input. See messages for details.
11470
- class GenericError
11511
+ # Exports harmonization HS10 codes
11512
+ class HarmonizationHs10ExportType < ExportType
11471
11513
 
11472
- attr_reader :code, :messages
11514
+ attr_reader :origin, :destination, :numbers, :has_codes, :has_origins, :sort
11473
11515
 
11474
11516
  def initialize(incoming={})
11517
+ super(:discriminator => ExportType::Types::HARMONIZATION_HS10_EXPORT_TYPE)
11475
11518
  opts = HttpClient::Helper.symbolize_keys(incoming)
11476
- HttpClient::Preconditions.require_keys(opts, [:messages], 'GenericError')
11477
- @code = (x = (x = opts.delete(:code); x.nil? ? "generic_error" : x); x.is_a?(::Io::Flow::V0::Models::GenericErrorCode) ? x : ::Io::Flow::V0::Models::GenericErrorCode.apply(x))
11478
- @messages = HttpClient::Preconditions.assert_class('messages', opts.delete(:messages), Array).map { |v| HttpClient::Preconditions.assert_class('messages', v, String) }
11519
+ @origin = (x = opts.delete(:origin); x.nil? ? nil : HttpClient::Preconditions.assert_class('origin', x, String))
11520
+ @destination = (x = opts.delete(:destination); x.nil? ? nil : HttpClient::Preconditions.assert_class('destination', x, String))
11521
+ @numbers = (x = opts.delete(:numbers); x.nil? ? nil : HttpClient::Preconditions.assert_class('numbers', x, Array).map { |v| HttpClient::Preconditions.assert_class('numbers', v, String) })
11522
+ @has_codes = (x = opts.delete(:has_codes); x.nil? ? nil : HttpClient::Preconditions.assert_boolean('has_codes', x))
11523
+ @has_origins = (x = opts.delete(:has_origins); x.nil? ? nil : HttpClient::Preconditions.assert_boolean('has_origins', x))
11524
+ @sort = (x = opts.delete(:sort); x.nil? ? nil : HttpClient::Preconditions.assert_class('sort', x, String))
11479
11525
  end
11480
11526
 
11481
11527
  def to_json
@@ -11483,29 +11529,64 @@ module Io
11483
11529
  end
11484
11530
 
11485
11531
  def copy(incoming={})
11486
- GenericError.new(to_hash.merge(HttpClient::Helper.symbolize_keys(incoming)))
11532
+ HarmonizationHs10ExportType.new(subtype_to_hash.merge(HttpClient::Helper.symbolize_keys(incoming)))
11487
11533
  end
11488
11534
 
11489
- def to_hash
11535
+ def subtype_to_hash
11490
11536
  {
11491
- :code => code.value,
11492
- :messages => messages
11537
+ :origin => origin,
11538
+ :destination => destination,
11539
+ :numbers => numbers.nil? ? nil : numbers,
11540
+ :has_codes => has_codes,
11541
+ :has_origins => has_origins,
11542
+ :sort => sort
11493
11543
  }
11494
11544
  end
11495
11545
 
11496
11546
  end
11497
11547
 
11498
- class HarmonizationDocument < Document
11548
+ # Exports HS6 codes
11549
+ class HarmonizationHs6ExportType < ExportType
11499
11550
 
11500
- attr_reader :code, :categories, :origin
11551
+ attr_reader :numbers, :has_codes, :sort
11501
11552
 
11502
11553
  def initialize(incoming={})
11503
- super(:discriminator => Document::Types::HARMONIZATION_DOCUMENT)
11554
+ super(:discriminator => ExportType::Types::HARMONIZATION_HS6_EXPORT_TYPE)
11555
+ opts = HttpClient::Helper.symbolize_keys(incoming)
11556
+ @numbers = (x = opts.delete(:numbers); x.nil? ? nil : HttpClient::Preconditions.assert_class('numbers', x, Array).map { |v| HttpClient::Preconditions.assert_class('numbers', v, String) })
11557
+ @has_codes = (x = opts.delete(:has_codes); x.nil? ? nil : HttpClient::Preconditions.assert_boolean('has_codes', x))
11558
+ @sort = (x = opts.delete(:sort); x.nil? ? nil : HttpClient::Preconditions.assert_class('sort', x, String))
11559
+ end
11560
+
11561
+ def to_json
11562
+ JSON.dump(to_hash)
11563
+ end
11564
+
11565
+ def copy(incoming={})
11566
+ HarmonizationHs6ExportType.new(subtype_to_hash.merge(HttpClient::Helper.symbolize_keys(incoming)))
11567
+ end
11568
+
11569
+ def subtype_to_hash
11570
+ {
11571
+ :numbers => numbers.nil? ? nil : numbers,
11572
+ :has_codes => has_codes,
11573
+ :sort => sort
11574
+ }
11575
+ end
11576
+
11577
+ end
11578
+
11579
+ # Exports HS10 code overview details
11580
+ class HarmonizationOverviewExportType < ExportType
11581
+
11582
+ attr_reader :origin, :destination, :sort
11583
+
11584
+ def initialize(incoming={})
11585
+ super(:discriminator => ExportType::Types::HARMONIZATION_OVERVIEW_EXPORT_TYPE)
11504
11586
  opts = HttpClient::Helper.symbolize_keys(incoming)
11505
- HttpClient::Preconditions.require_keys(opts, [:code, :categories], 'HarmonizationDocument')
11506
- @code = HttpClient::Preconditions.assert_class('code', opts.delete(:code), String)
11507
- @categories = HttpClient::Preconditions.assert_class('categories', opts.delete(:categories), Array).map { |v| (x = v; x.is_a?(::Io::Flow::V0::Models::CategorySummary) ? x : ::Io::Flow::V0::Models::CategorySummary.new(x)) }
11508
11587
  @origin = (x = opts.delete(:origin); x.nil? ? nil : HttpClient::Preconditions.assert_class('origin', x, String))
11588
+ @destination = (x = opts.delete(:destination); x.nil? ? nil : HttpClient::Preconditions.assert_class('destination', x, String))
11589
+ @sort = (x = opts.delete(:sort); x.nil? ? nil : HttpClient::Preconditions.assert_class('sort', x, String))
11509
11590
  end
11510
11591
 
11511
11592
  def to_json
@@ -11513,14 +11594,14 @@ module Io
11513
11594
  end
11514
11595
 
11515
11596
  def copy(incoming={})
11516
- HarmonizationDocument.new(subtype_to_hash.merge(HttpClient::Helper.symbolize_keys(incoming)))
11597
+ HarmonizationOverviewExportType.new(subtype_to_hash.merge(HttpClient::Helper.symbolize_keys(incoming)))
11517
11598
  end
11518
11599
 
11519
11600
  def subtype_to_hash
11520
11601
  {
11521
- :code => code,
11522
- :categories => categories.map { |o| o.to_hash },
11523
- :origin => origin
11602
+ :origin => origin,
11603
+ :destination => destination,
11604
+ :sort => sort
11524
11605
  }
11525
11606
  end
11526
11607
 
@@ -14092,7 +14173,7 @@ module Io
14092
14173
  @experience = (x = opts.delete(:experience); x.is_a?(::Io::Flow::V0::Models::ExperienceSummary) ? x : ::Io::Flow::V0::Models::ExperienceSummary.new(x))
14093
14174
  @prices = HttpClient::Preconditions.assert_class('prices', opts.delete(:prices), Array).map { |v| (x = v; x.is_a?(::Io::Flow::V0::Models::LocalizedPrice) ? x : ::Io::Flow::V0::Models::LocalizedPrice.from_json(x)) }
14094
14175
  @rates = HttpClient::Preconditions.assert_class('rates', opts.delete(:rates), Array).map { |v| (x = v; x.is_a?(::Io::Flow::V0::Models::Rate) ? x : ::Io::Flow::V0::Models::Rate.new(x)) }
14095
- @spot_rates = HttpClient::Preconditions.assert_class('spot_rates', opts.delete(:spot_rates), Array).map { |v| (x = v; x.is_a?(::Io::Flow::V0::Models::SpotRate) ? x : ::Io::Flow::V0::Models::SpotRate.new(x)) }
14176
+ @spot_rates = HttpClient::Preconditions.assert_class('spot_rates', opts.delete(:spot_rates), Array).map { |v| HttpClient::Preconditions.assert_class('spot_rates', HttpClient::Helper.to_object(v), Hash) }
14096
14177
  @status = (x = (x = opts.delete(:status); x.nil? ? "included" : x); x.is_a?(::Io::Flow::V0::Models::SubcatalogItemStatus) ? x : ::Io::Flow::V0::Models::SubcatalogItemStatus.apply(x))
14097
14178
  end
14098
14179
 
@@ -14109,7 +14190,7 @@ module Io
14109
14190
  :experience => experience.to_hash,
14110
14191
  :prices => prices.map { |o| o.to_hash },
14111
14192
  :rates => rates.map { |o| o.to_hash },
14112
- :spot_rates => spot_rates.map { |o| o.to_hash },
14193
+ :spot_rates => spot_rates,
14113
14194
  :status => status.value
14114
14195
  }
14115
14196
  end
@@ -15086,15 +15167,17 @@ module Io
15086
15167
  # duties.
15087
15168
  class OrderEstimate
15088
15169
 
15089
- attr_reader :items, :destination, :deliveries, :prices, :total, :lines
15170
+ attr_reader :id, :items, :destination, :deliveries, :prices, :selections, :total, :lines
15090
15171
 
15091
15172
  def initialize(incoming={})
15092
15173
  opts = HttpClient::Helper.symbolize_keys(incoming)
15093
- HttpClient::Preconditions.require_keys(opts, [:items, :destination, :deliveries, :prices, :total], 'OrderEstimate')
15174
+ HttpClient::Preconditions.require_keys(opts, [:id, :items, :destination, :deliveries, :prices, :selections, :total], 'OrderEstimate')
15175
+ @id = HttpClient::Preconditions.assert_class('id', opts.delete(:id), String)
15094
15176
  @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)) }
15095
15177
  @destination = (x = opts.delete(:destination); x.is_a?(::Io::Flow::V0::Models::OrderAddress) ? x : ::Io::Flow::V0::Models::OrderAddress.new(x))
15096
- @deliveries = HttpClient::Preconditions.assert_class('deliveries', opts.delete(:deliveries), Array).map { |v| (x = v; x.is_a?(::Io::Flow::V0::Models::DeliveryEstimate) ? x : ::Io::Flow::V0::Models::DeliveryEstimate.new(x)) }
15178
+ @deliveries = HttpClient::Preconditions.assert_class('deliveries', opts.delete(:deliveries), Array).map { |v| (x = v; x.is_a?(::Io::Flow::V0::Models::Delivery) ? x : ::Io::Flow::V0::Models::Delivery.new(x)) }
15097
15179
  @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)) }
15180
+ @selections = HttpClient::Preconditions.assert_class('selections', opts.delete(:selections), Array).map { |v| HttpClient::Preconditions.assert_class('selections', v, String) }
15098
15181
  @total = (x = opts.delete(:total); x.is_a?(::Io::Flow::V0::Models::LocalizedTotal) ? x : ::Io::Flow::V0::Models::LocalizedTotal.new(x))
15099
15182
  @lines = (x = opts.delete(:lines); x.nil? ? nil : HttpClient::Preconditions.assert_class('lines', x, Array).map { |v| (x = v; x.is_a?(::Io::Flow::V0::Models::Line) ? x : ::Io::Flow::V0::Models::Line.new(x)) })
15100
15183
  end
@@ -15109,10 +15192,12 @@ module Io
15109
15192
 
15110
15193
  def to_hash
15111
15194
  {
15195
+ :id => id,
15112
15196
  :items => items.map { |o| o.to_hash },
15113
15197
  :destination => destination.to_hash,
15114
15198
  :deliveries => deliveries.map { |o| o.to_hash },
15115
15199
  :prices => prices.map { |o| o.to_hash },
15200
+ :selections => selections,
15116
15201
  :total => total.to_hash,
15117
15202
  :lines => lines.nil? ? nil : lines.map { |o| o.to_hash }
15118
15203
  }
@@ -15123,13 +15208,14 @@ module Io
15123
15208
  # Form to get a lightweight estimate of an order.
15124
15209
  class OrderEstimateForm
15125
15210
 
15126
- attr_reader :items, :destination
15211
+ attr_reader :items, :destination, :selections
15127
15212
 
15128
15213
  def initialize(incoming={})
15129
15214
  opts = HttpClient::Helper.symbolize_keys(incoming)
15130
15215
  HttpClient::Preconditions.require_keys(opts, [:items], 'OrderEstimateForm')
15131
15216
  @items = HttpClient::Preconditions.assert_class('items', opts.delete(:items), Array).map { |v| (x = v; x.is_a?(::Io::Flow::V0::Models::LineItemForm) ? x : ::Io::Flow::V0::Models::LineItemForm.new(x)) }
15132
15217
  @destination = (x = opts.delete(:destination); x.nil? ? nil : (x = x; x.is_a?(::Io::Flow::V0::Models::OrderAddress) ? x : ::Io::Flow::V0::Models::OrderAddress.new(x)))
15218
+ @selections = (x = opts.delete(:selections); x.nil? ? nil : HttpClient::Preconditions.assert_class('selections', x, Array).map { |v| HttpClient::Preconditions.assert_class('selections', v, String) })
15133
15219
  end
15134
15220
 
15135
15221
  def to_json
@@ -15143,7 +15229,8 @@ module Io
15143
15229
  def to_hash
15144
15230
  {
15145
15231
  :items => items.map { |o| o.to_hash },
15146
- :destination => destination.nil? ? nil : destination.to_hash
15232
+ :destination => destination.nil? ? nil : destination.to_hash,
15233
+ :selections => selections.nil? ? nil : selections
15147
15234
  }
15148
15235
  end
15149
15236
 
@@ -15548,37 +15635,6 @@ module Io
15548
15635
 
15549
15636
  end
15550
15637
 
15551
- class OrganizationCurrencySettingDeleted < Event
15552
-
15553
- attr_reader :event_id, :timestamp, :organization_currency_setting_id
15554
-
15555
- def initialize(incoming={})
15556
- super(:discriminator => Event::Types::ORGANIZATION_CURRENCY_SETTING_DELETED)
15557
- opts = HttpClient::Helper.symbolize_keys(incoming)
15558
- HttpClient::Preconditions.require_keys(opts, [:event_id, :timestamp, :organization_currency_setting_id], 'OrganizationCurrencySettingDeleted')
15559
- @event_id = HttpClient::Preconditions.assert_class('event_id', opts.delete(:event_id), String)
15560
- @timestamp = HttpClient::Preconditions.assert_class('timestamp', HttpClient::Helper.to_date_time_iso8601(opts.delete(:timestamp)), DateTime)
15561
- @organization_currency_setting_id = HttpClient::Preconditions.assert_class('organization_currency_setting_id', opts.delete(:organization_currency_setting_id), String)
15562
- end
15563
-
15564
- def to_json
15565
- JSON.dump(to_hash)
15566
- end
15567
-
15568
- def copy(incoming={})
15569
- OrganizationCurrencySettingDeleted.new(subtype_to_hash.merge(HttpClient::Helper.symbolize_keys(incoming)))
15570
- end
15571
-
15572
- def subtype_to_hash
15573
- {
15574
- :event_id => event_id,
15575
- :timestamp => timestamp,
15576
- :organization_currency_setting_id => organization_currency_setting_id
15577
- }
15578
- end
15579
-
15580
- end
15581
-
15582
15638
  # Represents the parts of an organization setting that can be updated.
15583
15639
  class OrganizationCurrencySettingForm
15584
15640
 
@@ -15610,45 +15666,6 @@ module Io
15610
15666
 
15611
15667
  end
15612
15668
 
15613
- class OrganizationCurrencySettingUpserted < Event
15614
-
15615
- attr_reader :event_id, :timestamp, :organization_currency_setting_id, :organization_id, :base, :target, :margin
15616
-
15617
- def initialize(incoming={})
15618
- super(:discriminator => Event::Types::ORGANIZATION_CURRENCY_SETTING_UPSERTED)
15619
- opts = HttpClient::Helper.symbolize_keys(incoming)
15620
- HttpClient::Preconditions.require_keys(opts, [:event_id, :timestamp, :organization_currency_setting_id, :organization_id, :base, :target, :margin], 'OrganizationCurrencySettingUpserted')
15621
- @event_id = HttpClient::Preconditions.assert_class('event_id', opts.delete(:event_id), String)
15622
- @timestamp = HttpClient::Preconditions.assert_class('timestamp', HttpClient::Helper.to_date_time_iso8601(opts.delete(:timestamp)), DateTime)
15623
- @organization_currency_setting_id = HttpClient::Preconditions.assert_class('organization_currency_setting_id', opts.delete(:organization_currency_setting_id), String)
15624
- @organization_id = HttpClient::Preconditions.assert_class('organization_id', opts.delete(:organization_id), String)
15625
- @base = HttpClient::Preconditions.assert_class('base', opts.delete(:base), String)
15626
- @target = HttpClient::Preconditions.assert_class('target', opts.delete(:target), String)
15627
- @margin = HttpClient::Preconditions.assert_class('margin', HttpClient::Helper.to_big_decimal(opts.delete(:margin)), BigDecimal)
15628
- end
15629
-
15630
- def to_json
15631
- JSON.dump(to_hash)
15632
- end
15633
-
15634
- def copy(incoming={})
15635
- OrganizationCurrencySettingUpserted.new(subtype_to_hash.merge(HttpClient::Helper.symbolize_keys(incoming)))
15636
- end
15637
-
15638
- def subtype_to_hash
15639
- {
15640
- :event_id => event_id,
15641
- :timestamp => timestamp,
15642
- :organization_currency_setting_id => organization_currency_setting_id,
15643
- :organization_id => organization_id,
15644
- :base => base,
15645
- :target => target,
15646
- :margin => margin
15647
- }
15648
- end
15649
-
15650
- end
15651
-
15652
15669
  class OrganizationCurrencySettingVersion
15653
15670
 
15654
15671
  attr_reader :id, :timestamp, :type, :organization_currency_setting
@@ -16532,11 +16549,11 @@ module Io
16532
16549
 
16533
16550
  def initialize(incoming={})
16534
16551
  opts = HttpClient::Helper.symbolize_keys(incoming)
16535
- HttpClient::Preconditions.require_keys(opts, [:currency, :amount, :label, :base], 'PriceWithBase')
16552
+ HttpClient::Preconditions.require_keys(opts, [:currency, :amount, :label], 'PriceWithBase')
16536
16553
  @currency = HttpClient::Preconditions.assert_class('currency', opts.delete(:currency), String)
16537
16554
  @amount = HttpClient::Preconditions.assert_class('amount', opts.delete(:amount), Numeric)
16538
16555
  @label = HttpClient::Preconditions.assert_class('label', opts.delete(:label), String)
16539
- @base = (x = opts.delete(:base); x.is_a?(::Io::Flow::V0::Models::Price) ? x : ::Io::Flow::V0::Models::Price.new(x))
16556
+ @base = (x = opts.delete(:base); x.nil? ? nil : (x = x; x.is_a?(::Io::Flow::V0::Models::Price) ? x : ::Io::Flow::V0::Models::Price.new(x)))
16540
16557
  end
16541
16558
 
16542
16559
  def to_json
@@ -16552,7 +16569,7 @@ module Io
16552
16569
  :currency => currency,
16553
16570
  :amount => amount,
16554
16571
  :label => label,
16555
- :base => base.to_hash
16572
+ :base => base.nil? ? nil : base.to_hash
16556
16573
  }
16557
16574
  end
16558
16575
 
@@ -16742,64 +16759,6 @@ module Io
16742
16759
 
16743
16760
  end
16744
16761
 
16745
- class QuoteEstimate
16746
-
16747
- attr_reader :destination, :deliveries
16748
-
16749
- def initialize(incoming={})
16750
- opts = HttpClient::Helper.symbolize_keys(incoming)
16751
- HttpClient::Preconditions.require_keys(opts, [:destination, :deliveries], 'QuoteEstimate')
16752
- @destination = (x = opts.delete(:destination); x.is_a?(::Io::Flow::V0::Models::Address) ? x : ::Io::Flow::V0::Models::Address.new(x))
16753
- @deliveries = HttpClient::Preconditions.assert_class('deliveries', opts.delete(:deliveries), Array).map { |v| (x = v; x.is_a?(::Io::Flow::V0::Models::DeliveryEstimate) ? x : ::Io::Flow::V0::Models::DeliveryEstimate.new(x)) }
16754
- end
16755
-
16756
- def to_json
16757
- JSON.dump(to_hash)
16758
- end
16759
-
16760
- def copy(incoming={})
16761
- QuoteEstimate.new(to_hash.merge(HttpClient::Helper.symbolize_keys(incoming)))
16762
- end
16763
-
16764
- def to_hash
16765
- {
16766
- :destination => destination.to_hash,
16767
- :deliveries => deliveries.map { |o| o.to_hash }
16768
- }
16769
- end
16770
-
16771
- end
16772
-
16773
- class QuoteEstimateForm
16774
-
16775
- attr_reader :destination, :experience, :items
16776
-
16777
- def initialize(incoming={})
16778
- opts = HttpClient::Helper.symbolize_keys(incoming)
16779
- HttpClient::Preconditions.require_keys(opts, [:destination, :experience, :items], 'QuoteEstimateForm')
16780
- @destination = (x = opts.delete(:destination); x.is_a?(::Io::Flow::V0::Models::Address) ? x : ::Io::Flow::V0::Models::Address.new(x))
16781
- @experience = HttpClient::Preconditions.assert_class('experience', opts.delete(:experience), String)
16782
- @items = HttpClient::Preconditions.assert_class('items', opts.delete(:items), Array).map { |v| (x = v; x.is_a?(::Io::Flow::V0::Models::LineItemForm) ? x : ::Io::Flow::V0::Models::LineItemForm.new(x)) }
16783
- end
16784
-
16785
- def to_json
16786
- JSON.dump(to_hash)
16787
- end
16788
-
16789
- def copy(incoming={})
16790
- QuoteEstimateForm.new(to_hash.merge(HttpClient::Helper.symbolize_keys(incoming)))
16791
- end
16792
-
16793
- def to_hash
16794
- {
16795
- :destination => destination.to_hash,
16796
- :experience => experience,
16797
- :items => items.map { |o| o.to_hash }
16798
- }
16799
- end
16800
-
16801
- end
16802
-
16803
16762
  class QuoteForm
16804
16763
 
16805
16764
  attr_reader :destination, :experience, :items
@@ -17779,21 +17738,21 @@ module Io
17779
17738
  # shipper to transport a package from a given origin to destination
17780
17739
  class ShippingLabel
17781
17740
 
17782
- attr_reader :id, :attributes, :carrier_tracking_number, :commercial_invoice, :cost, :destination, :flow_tracking_number, :origin, :service, :window, :zpl, :pdf, :png, :order
17741
+ attr_reader :id, :attributes, :carrier_tracking_number, :cost, :destination, :flow_tracking_number, :origin, :service, :window, :commercial_invoice, :zpl, :pdf, :png, :order
17783
17742
 
17784
17743
  def initialize(incoming={})
17785
17744
  opts = HttpClient::Helper.symbolize_keys(incoming)
17786
- HttpClient::Preconditions.require_keys(opts, [:id, :carrier_tracking_number, :commercial_invoice, :cost, :destination, :flow_tracking_number, :origin, :service, :window], 'ShippingLabel')
17745
+ HttpClient::Preconditions.require_keys(opts, [:id, :carrier_tracking_number, :cost, :destination, :flow_tracking_number, :origin, :service, :window], 'ShippingLabel')
17787
17746
  @id = HttpClient::Preconditions.assert_class('id', opts.delete(:id), String)
17788
17747
  @attributes = HttpClient::Preconditions.assert_class('attributes', (x = opts.delete(:attributes); x.nil? ? {} : x), Hash).inject({}) { |h, d| h[d[0]] = HttpClient::Preconditions.assert_class('attributes', d[1], String); h }
17789
17748
  @carrier_tracking_number = HttpClient::Preconditions.assert_class('carrier_tracking_number', opts.delete(:carrier_tracking_number), String)
17790
- @commercial_invoice = HttpClient::Preconditions.assert_class('commercial_invoice', opts.delete(:commercial_invoice), String)
17791
17749
  @cost = (x = opts.delete(:cost); x.is_a?(::Io::Flow::V0::Models::Price) ? x : ::Io::Flow::V0::Models::Price.new(x))
17792
17750
  @destination = (x = opts.delete(:destination); x.is_a?(::Io::Flow::V0::Models::ShippingAddress) ? x : ::Io::Flow::V0::Models::ShippingAddress.new(x))
17793
17751
  @flow_tracking_number = HttpClient::Preconditions.assert_class('flow_tracking_number', opts.delete(:flow_tracking_number), String)
17794
17752
  @origin = (x = opts.delete(:origin); x.is_a?(::Io::Flow::V0::Models::ShippingAddress) ? x : ::Io::Flow::V0::Models::ShippingAddress.new(x))
17795
17753
  @service = (x = opts.delete(:service); x.is_a?(::Io::Flow::V0::Models::ServiceSummary) ? x : ::Io::Flow::V0::Models::ServiceSummary.new(x))
17796
17754
  @window = (x = opts.delete(:window); x.is_a?(::Io::Flow::V0::Models::DatetimeRange) ? x : ::Io::Flow::V0::Models::DatetimeRange.new(x))
17755
+ @commercial_invoice = (x = opts.delete(:commercial_invoice); x.nil? ? nil : HttpClient::Preconditions.assert_class('commercial_invoice', x, String))
17797
17756
  @zpl = (x = opts.delete(:zpl); x.nil? ? nil : HttpClient::Preconditions.assert_class('zpl', x, String))
17798
17757
  @pdf = (x = opts.delete(:pdf); x.nil? ? nil : HttpClient::Preconditions.assert_class('pdf', x, String))
17799
17758
  @png = (x = opts.delete(:png); x.nil? ? nil : HttpClient::Preconditions.assert_class('png', x, String))
@@ -17813,13 +17772,13 @@ module Io
17813
17772
  :id => id,
17814
17773
  :attributes => attributes,
17815
17774
  :carrier_tracking_number => carrier_tracking_number,
17816
- :commercial_invoice => commercial_invoice,
17817
17775
  :cost => cost.to_hash,
17818
17776
  :destination => destination.to_hash,
17819
17777
  :flow_tracking_number => flow_tracking_number,
17820
17778
  :origin => origin.to_hash,
17821
17779
  :service => service.to_hash,
17822
17780
  :window => window.to_hash,
17781
+ :commercial_invoice => commercial_invoice,
17823
17782
  :zpl => zpl,
17824
17783
  :pdf => pdf,
17825
17784
  :png => png,
@@ -18112,174 +18071,6 @@ module Io
18112
18071
 
18113
18072
  end
18114
18073
 
18115
- class SpotRate
18116
-
18117
- attr_reader :id, :effective_at, :base, :target, :value
18118
-
18119
- def initialize(incoming={})
18120
- opts = HttpClient::Helper.symbolize_keys(incoming)
18121
- HttpClient::Preconditions.require_keys(opts, [:id, :effective_at, :base, :target, :value], 'SpotRate')
18122
- @id = HttpClient::Preconditions.assert_class('id', opts.delete(:id), String)
18123
- @effective_at = HttpClient::Preconditions.assert_class('effective_at', HttpClient::Helper.to_date_time_iso8601(opts.delete(:effective_at)), DateTime)
18124
- @base = HttpClient::Preconditions.assert_class('base', opts.delete(:base), String)
18125
- @target = HttpClient::Preconditions.assert_class('target', opts.delete(:target), String)
18126
- @value = HttpClient::Preconditions.assert_class('value', HttpClient::Helper.to_big_decimal(opts.delete(:value)), BigDecimal)
18127
- end
18128
-
18129
- def to_json
18130
- JSON.dump(to_hash)
18131
- end
18132
-
18133
- def copy(incoming={})
18134
- SpotRate.new(to_hash.merge(HttpClient::Helper.symbolize_keys(incoming)))
18135
- end
18136
-
18137
- def to_hash
18138
- {
18139
- :id => id,
18140
- :effective_at => effective_at,
18141
- :base => base,
18142
- :target => target,
18143
- :value => value
18144
- }
18145
- end
18146
-
18147
- end
18148
-
18149
- class SpotRateDeleted < Event
18150
-
18151
- attr_reader :event_id, :timestamp, :spot_rate_id
18152
-
18153
- def initialize(incoming={})
18154
- super(:discriminator => Event::Types::SPOT_RATE_DELETED)
18155
- opts = HttpClient::Helper.symbolize_keys(incoming)
18156
- HttpClient::Preconditions.require_keys(opts, [:event_id, :timestamp, :spot_rate_id], 'SpotRateDeleted')
18157
- @event_id = HttpClient::Preconditions.assert_class('event_id', opts.delete(:event_id), String)
18158
- @timestamp = HttpClient::Preconditions.assert_class('timestamp', HttpClient::Helper.to_date_time_iso8601(opts.delete(:timestamp)), DateTime)
18159
- @spot_rate_id = HttpClient::Preconditions.assert_class('spot_rate_id', opts.delete(:spot_rate_id), String)
18160
- end
18161
-
18162
- def to_json
18163
- JSON.dump(to_hash)
18164
- end
18165
-
18166
- def copy(incoming={})
18167
- SpotRateDeleted.new(subtype_to_hash.merge(HttpClient::Helper.symbolize_keys(incoming)))
18168
- end
18169
-
18170
- def subtype_to_hash
18171
- {
18172
- :event_id => event_id,
18173
- :timestamp => timestamp,
18174
- :spot_rate_id => spot_rate_id
18175
- }
18176
- end
18177
-
18178
- end
18179
-
18180
- class SpotRateForm
18181
-
18182
- attr_reader :effective_at, :base, :target, :value
18183
-
18184
- def initialize(incoming={})
18185
- opts = HttpClient::Helper.symbolize_keys(incoming)
18186
- HttpClient::Preconditions.require_keys(opts, [:effective_at, :base, :target, :value], 'SpotRateForm')
18187
- @effective_at = HttpClient::Preconditions.assert_class('effective_at', HttpClient::Helper.to_date_time_iso8601(opts.delete(:effective_at)), DateTime)
18188
- @base = HttpClient::Preconditions.assert_class('base', opts.delete(:base), String)
18189
- @target = HttpClient::Preconditions.assert_class('target', opts.delete(:target), String)
18190
- @value = HttpClient::Preconditions.assert_class('value', HttpClient::Helper.to_big_decimal(opts.delete(:value)), BigDecimal)
18191
- end
18192
-
18193
- def to_json
18194
- JSON.dump(to_hash)
18195
- end
18196
-
18197
- def copy(incoming={})
18198
- SpotRateForm.new(to_hash.merge(HttpClient::Helper.symbolize_keys(incoming)))
18199
- end
18200
-
18201
- def to_hash
18202
- {
18203
- :effective_at => effective_at,
18204
- :base => base,
18205
- :target => target,
18206
- :value => value
18207
- }
18208
- end
18209
-
18210
- end
18211
-
18212
- class SpotRateUpserted < Event
18213
-
18214
- attr_reader :event_id, :timestamp, :spot_rate_id, :base, :target, :value, :effective_at
18215
-
18216
- def initialize(incoming={})
18217
- super(:discriminator => Event::Types::SPOT_RATE_UPSERTED)
18218
- opts = HttpClient::Helper.symbolize_keys(incoming)
18219
- HttpClient::Preconditions.require_keys(opts, [:event_id, :timestamp, :spot_rate_id, :base, :target, :value, :effective_at], 'SpotRateUpserted')
18220
- @event_id = HttpClient::Preconditions.assert_class('event_id', opts.delete(:event_id), String)
18221
- @timestamp = HttpClient::Preconditions.assert_class('timestamp', HttpClient::Helper.to_date_time_iso8601(opts.delete(:timestamp)), DateTime)
18222
- @spot_rate_id = HttpClient::Preconditions.assert_class('spot_rate_id', opts.delete(:spot_rate_id), String)
18223
- @base = HttpClient::Preconditions.assert_class('base', opts.delete(:base), String)
18224
- @target = HttpClient::Preconditions.assert_class('target', opts.delete(:target), String)
18225
- @value = HttpClient::Preconditions.assert_class('value', HttpClient::Helper.to_big_decimal(opts.delete(:value)), BigDecimal)
18226
- @effective_at = HttpClient::Preconditions.assert_class('effective_at', HttpClient::Helper.to_date_time_iso8601(opts.delete(:effective_at)), DateTime)
18227
- end
18228
-
18229
- def to_json
18230
- JSON.dump(to_hash)
18231
- end
18232
-
18233
- def copy(incoming={})
18234
- SpotRateUpserted.new(subtype_to_hash.merge(HttpClient::Helper.symbolize_keys(incoming)))
18235
- end
18236
-
18237
- def subtype_to_hash
18238
- {
18239
- :event_id => event_id,
18240
- :timestamp => timestamp,
18241
- :spot_rate_id => spot_rate_id,
18242
- :base => base,
18243
- :target => target,
18244
- :value => value,
18245
- :effective_at => effective_at
18246
- }
18247
- end
18248
-
18249
- end
18250
-
18251
- class SpotRateVersion
18252
-
18253
- attr_reader :id, :timestamp, :type, :spot_rate
18254
-
18255
- def initialize(incoming={})
18256
- opts = HttpClient::Helper.symbolize_keys(incoming)
18257
- HttpClient::Preconditions.require_keys(opts, [:id, :timestamp, :type, :spot_rate], 'SpotRateVersion')
18258
- @id = HttpClient::Preconditions.assert_class('id', opts.delete(:id), String)
18259
- @timestamp = HttpClient::Preconditions.assert_class('timestamp', HttpClient::Helper.to_date_time_iso8601(opts.delete(:timestamp)), DateTime)
18260
- @type = (x = opts.delete(:type); x.is_a?(::Io::Flow::V0::Models::ChangeType) ? x : ::Io::Flow::V0::Models::ChangeType.apply(x))
18261
- @spot_rate = (x = opts.delete(:spot_rate); x.is_a?(::Io::Flow::V0::Models::SpotRate) ? x : ::Io::Flow::V0::Models::SpotRate.new(x))
18262
- end
18263
-
18264
- def to_json
18265
- JSON.dump(to_hash)
18266
- end
18267
-
18268
- def copy(incoming={})
18269
- SpotRateVersion.new(to_hash.merge(HttpClient::Helper.symbolize_keys(incoming)))
18270
- end
18271
-
18272
- def to_hash
18273
- {
18274
- :id => id,
18275
- :timestamp => timestamp,
18276
- :type => type.value,
18277
- :spot_rate => spot_rate.to_hash
18278
- }
18279
- end
18280
-
18281
- end
18282
-
18283
18074
  # A configuration with custom query to select a subset of master catalog items
18284
18075
  # for a localized experience
18285
18076
  class Subcatalog < ExpandableSubcatalog