flowcommerce 0.2.80 → 0.2.81

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
  SHA256:
3
- metadata.gz: c15848ac0c9fda083a1e8b1fbf823292a05e35543a26d4badc1bdee9372fa264
4
- data.tar.gz: 245f87a1fae87cb21a6c2669d109eda64669eaf8343b465b924e81b74b3a0df3
3
+ metadata.gz: 64e4aa9a200c0fbdcb2ffa2c5bca8fbdbc138956ff196538cb5876279298a5b3
4
+ data.tar.gz: 5a246655756e1d594130ae64cb3214f6407cf4110d55b84940ba5fa7982318ce
5
5
  SHA512:
6
- metadata.gz: 35b9f5a72493d0f3e5fe34839acb03a5894aebd63660c13095974c100cf78fb8a3dd70c23501cfbcb87ad9d13e105397b2ba24dcef083a974cf24fcd70005451
7
- data.tar.gz: 01ade8ed9b9cc798d402291a9d5530e7173c3bf96fc1fd19e3d3c8ffc8b70bc4756a69587b9ae7db0ce4308602c0375e8c6ee07fa8f5d2b691dd67b5113e1b01
6
+ metadata.gz: 5f71004f0cce6bb3460619278e883abdf01613c2e6b12e971e61a782b7bd0b7a2d496713d92d7f14256fdffc9513c55e824d394e00cfecf8788ac7dca373632b
7
+ data.tar.gz: b459edd07448f75486001c79a033aafbfa4bea31b1c81eb0a4128b238eee4ef3d0066b7208e938dab33fef62671bfabc37395b352128b40e7027ed5554edd77a
@@ -1,6 +1,6 @@
1
1
  # Generated by API Builder - https://www.apibuilder.io
2
- # Service version: 0.9.10
3
- # apibuilder 0.15.6 app.apibuilder.io/flow/api/latest/ruby_client
2
+ # Service version: 0.9.33
3
+ # apibuilder 0.15.8 app.apibuilder.io/flow/api/latest/ruby_client
4
4
 
5
5
  require 'cgi'
6
6
  require 'net/http'
@@ -25,8 +25,8 @@ module Io
25
25
 
26
26
  BASE_URL = 'https://api.flow.io' unless defined?(Constants::BASE_URL)
27
27
  NAMESPACE = 'io.flow.v0' unless defined?(Constants::NAMESPACE)
28
- USER_AGENT = 'apibuilder 0.15.6 app.apibuilder.io/flow/api/latest/ruby_client' unless defined?(Constants::USER_AGENT)
29
- VERSION = '0.9.10' unless defined?(Constants::VERSION)
28
+ USER_AGENT = 'apibuilder 0.15.8 app.apibuilder.io/flow/api/latest/ruby_client' unless defined?(Constants::USER_AGENT)
29
+ VERSION = '0.9.33' unless defined?(Constants::VERSION)
30
30
  VERSION_MAJOR = 0 unless defined?(VERSION_MAJOR)
31
31
 
32
32
  end
@@ -612,6 +612,22 @@ module Io
612
612
  @suggestions ||= ::Io::Flow::V0::Clients::Suggestions.new(self)
613
613
  end
614
614
 
615
+ def sync_pending_records
616
+ @sync_pending_records ||= ::Io::Flow::V0::Clients::SyncPendingRecords.new(self)
617
+ end
618
+
619
+ def sync_records
620
+ @sync_records ||= ::Io::Flow::V0::Clients::SyncRecords.new(self)
621
+ end
622
+
623
+ def sync_record_failures
624
+ @sync_record_failures ||= ::Io::Flow::V0::Clients::SyncRecordFailures.new(self)
625
+ end
626
+
627
+ def sync_streams
628
+ @sync_streams ||= ::Io::Flow::V0::Clients::SyncStreams.new(self)
629
+ end
630
+
615
631
  def tax_settings
616
632
  @tax_settings ||= ::Io::Flow::V0::Clients::TaxSettings.new(self)
617
633
  end
@@ -1743,7 +1759,9 @@ module Io
1743
1759
  opts = HttpClient::Helper.symbolize_keys(incoming)
1744
1760
  query = {
1745
1761
  :expand => (x = opts.delete(:expand); x.nil? ? nil : HttpClient::Preconditions.assert_class('expand', x, Array).map { |v| HttpClient::Preconditions.assert_class('expand', v, String) }),
1746
- :experience => (x = opts.delete(:experience); x.nil? ? nil : HttpClient::Preconditions.assert_class('experience', x, String))
1762
+ :experience => (x = opts.delete(:experience); x.nil? ? nil : HttpClient::Preconditions.assert_class('experience', x, String)),
1763
+ :currency => (x = opts.delete(:currency); x.nil? ? nil : HttpClient::Preconditions.assert_class('currency', x, String)),
1764
+ :show_selections_only => (x = opts.delete(:show_selections_only); x.nil? ? nil : HttpClient::Preconditions.assert_boolean('show_selections_only', x))
1747
1765
  }.delete_if { |k, v| v.nil? }
1748
1766
  (x = order_with_discounts_form; x.is_a?(::Io::Flow::V0::Models::OrderWithDiscountsForm) ? x : ::Io::Flow::V0::Models::OrderWithDiscountsForm.new(x))
1749
1767
  r = @client.request("/#{CGI.escape(organization)}/orders/submissions").with_query(query).with_json(order_with_discounts_form.to_json).post
@@ -2863,28 +2881,12 @@ module Io
2863
2881
  :destination => (x = opts.delete(:destination); x.nil? ? nil : HttpClient::Preconditions.assert_class('destination', x, String)),
2864
2882
  :code => (x = opts.delete(:code); x.nil? ? nil : HttpClient::Preconditions.assert_class('code', x, String)),
2865
2883
  :limit => HttpClient::Preconditions.assert_class('limit', (x = opts.delete(:limit); x.nil? ? 25 : x), Integer),
2866
- :offset => HttpClient::Preconditions.assert_class('offset', (x = opts.delete(:offset); x.nil? ? 0 : x), Integer),
2867
- :sort => HttpClient::Preconditions.assert_class('sort', (x = opts.delete(:sort); x.nil? ? "-created_at" : x), String)
2884
+ :offset => HttpClient::Preconditions.assert_class('offset', (x = opts.delete(:offset); x.nil? ? 0 : x), Integer)
2868
2885
  }.delete_if { |k, v| v.nil? }
2869
2886
  r = @client.request("/#{CGI.escape(organization)}/harmonization/hs10").with_query(query).get
2870
2887
  r.map { |x| ::Io::Flow::V0::Models::Hs10.new(x) }
2871
2888
  end
2872
2889
 
2873
- # Provides visibility into recent changes of each object, including deletion
2874
- def get_versions(organization, incoming={})
2875
- HttpClient::Preconditions.assert_class('organization', organization, String)
2876
- opts = HttpClient::Helper.symbolize_keys(incoming)
2877
- query = {
2878
- :id => (x = opts.delete(:id); x.nil? ? nil : HttpClient::Preconditions.assert_class('id', x, Array).map { |v| HttpClient::Preconditions.assert_class('id', v, String) }),
2879
- :hs10_id => (x = opts.delete(:hs10_id); x.nil? ? nil : HttpClient::Preconditions.assert_class('hs10_id', x, Array).map { |v| HttpClient::Preconditions.assert_class('hs10_id', v, String) }),
2880
- :limit => HttpClient::Preconditions.assert_class('limit', (x = opts.delete(:limit); x.nil? ? 25 : x), Integer),
2881
- :offset => HttpClient::Preconditions.assert_class('offset', (x = opts.delete(:offset); x.nil? ? 0 : x), Integer),
2882
- :sort => HttpClient::Preconditions.assert_class('sort', (x = opts.delete(:sort); x.nil? ? "journal_timestamp" : x), String)
2883
- }.delete_if { |k, v| v.nil? }
2884
- r = @client.request("/#{CGI.escape(organization)}/harmonization/hs10/versions").with_query(query).get
2885
- r.map { |x| ::Io::Flow::V0::Models::Hs10Version.new(x) }
2886
- end
2887
-
2888
2890
  end
2889
2891
 
2890
2892
  class TaxRegistrations
@@ -4107,6 +4109,7 @@ module Io
4107
4109
  :origin => (x = opts.delete(:origin); x.nil? ? nil : HttpClient::Preconditions.assert_class('origin', x, String)),
4108
4110
  :ratecard_id => (x = opts.delete(:ratecard_id); x.nil? ? nil : HttpClient::Preconditions.assert_class('ratecard_id', x, String)),
4109
4111
  :service => (x = opts.delete(:service); x.nil? ? nil : HttpClient::Preconditions.assert_class('service', x, String)),
4112
+ :ratecard_owner => (x = opts.delete(:ratecard_owner); x.nil? ? nil : (x = x; x.is_a?(::Io::Flow::V0::Models::RatecardOwner) ? x : ::Io::Flow::V0::Models::RatecardOwner.apply(x)).value),
4110
4113
  :limit => HttpClient::Preconditions.assert_class('limit', (x = opts.delete(:limit); x.nil? ? 25 : x), Integer),
4111
4114
  :offset => HttpClient::Preconditions.assert_class('offset', (x = opts.delete(:offset); x.nil? ? 0 : x), Integer),
4112
4115
  :sort => HttpClient::Preconditions.assert_class('sort', (x = opts.delete(:sort); x.nil? ? "-created_at" : x), String)
@@ -5512,11 +5515,11 @@ module Io
5512
5515
  ::Io::Flow::V0::Models::Customer.new(r)
5513
5516
  end
5514
5517
 
5515
- # Returns information about a specific customer.
5516
- def get_customer_by_client_token(organization, client_token)
5518
+ # Returns information about a specific customer given a client token.
5519
+ def post_client_and_tokens(organization, customer_client_token)
5517
5520
  HttpClient::Preconditions.assert_class('organization', organization, String)
5518
- HttpClient::Preconditions.assert_class('client_token', client_token, String)
5519
- r = @client.request("/#{CGI.escape(organization)}/customers/#{CGI.escape(client_token)}/customer").get
5521
+ (x = customer_client_token; x.is_a?(::Io::Flow::V0::Models::CustomerClientToken) ? x : ::Io::Flow::V0::Models::CustomerClientToken.new(x))
5522
+ r = @client.request("/#{CGI.escape(organization)}/customers/client/tokens").with_json(customer_client_token.to_json).post
5520
5523
  ::Io::Flow::V0::Models::Customer.new(r)
5521
5524
  end
5522
5525
 
@@ -5921,7 +5924,7 @@ module Io
5921
5924
  def get_organization_and_roles_by_organization(organization)
5922
5925
  HttpClient::Preconditions.assert_class('organization', organization, String)
5923
5926
  r = @client.request("/permission/organization/#{CGI.escape(organization)}/roles").get
5924
- r.map { |x| ::Io::Flow::V0::Models::FlowRole.from_json(x) }
5927
+ r.map { |x| ::Io::Flow::V0::Models::FlowRole.new(x) }
5925
5928
  end
5926
5929
 
5927
5930
  end
@@ -6673,101 +6676,101 @@ module Io
6673
6676
  @client = HttpClient::Preconditions.assert_class('client', client, ::Io::Flow::V0::Client)
6674
6677
  end
6675
6678
 
6676
- def post_shopify_and_organizations_by_organization(organization, session_form)
6679
+ def post_organizations_by_organization(organization, session_form)
6677
6680
  HttpClient::Preconditions.assert_class('organization', organization, String)
6678
6681
  (x = session_form; x.is_a?(::Io::Flow::V0::Models::SessionForm) ? x : ::Io::Flow::V0::Models::SessionForm.new(x))
6679
- r = @client.request("/sessions/shopify/organizations/#{CGI.escape(organization)}").with_json(session_form.to_json).post
6682
+ r = @client.request("/sessions/organizations/#{CGI.escape(organization)}").with_json(session_form.to_json).post
6680
6683
  ::Io::Flow::V0::Models::OrganizationSession.new(r)
6681
6684
  end
6682
6685
 
6683
- def get_shopify_by_session(session)
6686
+ def get_by_session(session)
6684
6687
  HttpClient::Preconditions.assert_class('session', session, String)
6685
- r = @client.request("/sessions/shopify/#{CGI.escape(session)}").get
6688
+ r = @client.request("/sessions/#{CGI.escape(session)}").get
6686
6689
  ::Io::Flow::V0::Models::Session.from_json(r)
6687
6690
  end
6688
6691
 
6689
- def put_shopify_by_session(session, session_put_form)
6692
+ def put_by_session(session, session_put_form)
6690
6693
  HttpClient::Preconditions.assert_class('session', session, String)
6691
6694
  (x = session_put_form; x.is_a?(::Io::Flow::V0::Models::SessionPutForm) ? x : ::Io::Flow::V0::Models::SessionPutForm.new(x))
6692
- r = @client.request("/sessions/shopify/#{CGI.escape(session)}").with_json(session_put_form.to_json).put
6695
+ r = @client.request("/sessions/#{CGI.escape(session)}").with_json(session_put_form.to_json).put
6693
6696
  ::Io::Flow::V0::Models::Session.from_json(r)
6694
6697
  end
6695
6698
 
6696
- def delete_shopify_by_session(session)
6699
+ def delete_by_session(session)
6697
6700
  HttpClient::Preconditions.assert_class('session', session, String)
6698
- r = @client.request("/sessions/shopify/#{CGI.escape(session)}").delete
6701
+ r = @client.request("/sessions/#{CGI.escape(session)}").delete
6699
6702
  nil
6700
6703
  end
6701
6704
 
6702
6705
  # Clears the session geo parameters
6703
- def put_shopify_and_clear_by_session(session)
6706
+ def put_clear_by_session(session)
6704
6707
  HttpClient::Preconditions.assert_class('session', session, String)
6705
- r = @client.request("/sessions/shopify/#{CGI.escape(session)}/clear").put
6708
+ r = @client.request("/sessions/#{CGI.escape(session)}/clear").put
6706
6709
  ::Io::Flow::V0::Models::Session.from_json(r)
6707
6710
  end
6708
6711
 
6709
- def put_shopify_and_organizations_by_session_and_organization(session, organization, session_put_form)
6712
+ def put_organizations_by_session_and_organization(session, organization, session_put_form)
6710
6713
  HttpClient::Preconditions.assert_class('session', session, String)
6711
6714
  HttpClient::Preconditions.assert_class('organization', organization, String)
6712
6715
  (x = session_put_form; x.is_a?(::Io::Flow::V0::Models::SessionPutForm) ? x : ::Io::Flow::V0::Models::SessionPutForm.new(x))
6713
- r = @client.request("/sessions/shopify/#{CGI.escape(session)}/organizations/#{CGI.escape(organization)}").with_json(session_put_form.to_json).put
6716
+ r = @client.request("/sessions/#{CGI.escape(session)}/organizations/#{CGI.escape(organization)}").with_json(session_put_form.to_json).put
6714
6717
  ::Io::Flow::V0::Models::OrganizationSession.new(r)
6715
6718
  end
6716
6719
 
6717
6720
  # Resets the session based on the provided geo parameters.
6718
- def put_shopify_and_reset_by_session(session, session_put_form)
6721
+ def put_reset_by_session(session, session_put_form)
6719
6722
  HttpClient::Preconditions.assert_class('session', session, String)
6720
6723
  (x = session_put_form; x.is_a?(::Io::Flow::V0::Models::SessionPutForm) ? x : ::Io::Flow::V0::Models::SessionPutForm.new(x))
6721
- r = @client.request("/sessions/shopify/#{CGI.escape(session)}/reset").with_json(session_put_form.to_json).put
6724
+ r = @client.request("/sessions/#{CGI.escape(session)}/reset").with_json(session_put_form.to_json).put
6722
6725
  ::Io::Flow::V0::Models::Session.from_json(r)
6723
6726
  end
6724
6727
 
6725
- def post_organizations_by_organization(organization, session_form)
6728
+ def post_shopify_and_organizations_by_organization(organization, session_form)
6726
6729
  HttpClient::Preconditions.assert_class('organization', organization, String)
6727
6730
  (x = session_form; x.is_a?(::Io::Flow::V0::Models::SessionForm) ? x : ::Io::Flow::V0::Models::SessionForm.new(x))
6728
- r = @client.request("/sessions/organizations/#{CGI.escape(organization)}").with_json(session_form.to_json).post
6731
+ r = @client.request("/sessions/shopify/organizations/#{CGI.escape(organization)}").with_json(session_form.to_json).post
6729
6732
  ::Io::Flow::V0::Models::OrganizationSession.new(r)
6730
6733
  end
6731
6734
 
6732
- def get_by_session(session)
6735
+ def get_shopify_by_session(session)
6733
6736
  HttpClient::Preconditions.assert_class('session', session, String)
6734
- r = @client.request("/sessions/#{CGI.escape(session)}").get
6737
+ r = @client.request("/sessions/shopify/#{CGI.escape(session)}").get
6735
6738
  ::Io::Flow::V0::Models::Session.from_json(r)
6736
6739
  end
6737
6740
 
6738
- def put_by_session(session, session_put_form)
6741
+ def put_shopify_by_session(session, session_put_form)
6739
6742
  HttpClient::Preconditions.assert_class('session', session, String)
6740
6743
  (x = session_put_form; x.is_a?(::Io::Flow::V0::Models::SessionPutForm) ? x : ::Io::Flow::V0::Models::SessionPutForm.new(x))
6741
- r = @client.request("/sessions/#{CGI.escape(session)}").with_json(session_put_form.to_json).put
6744
+ r = @client.request("/sessions/shopify/#{CGI.escape(session)}").with_json(session_put_form.to_json).put
6742
6745
  ::Io::Flow::V0::Models::Session.from_json(r)
6743
6746
  end
6744
6747
 
6745
- def delete_by_session(session)
6748
+ def delete_shopify_by_session(session)
6746
6749
  HttpClient::Preconditions.assert_class('session', session, String)
6747
- r = @client.request("/sessions/#{CGI.escape(session)}").delete
6750
+ r = @client.request("/sessions/shopify/#{CGI.escape(session)}").delete
6748
6751
  nil
6749
6752
  end
6750
6753
 
6751
6754
  # Clears the session geo parameters
6752
- def put_clear_by_session(session)
6755
+ def put_shopify_and_clear_by_session(session)
6753
6756
  HttpClient::Preconditions.assert_class('session', session, String)
6754
- r = @client.request("/sessions/#{CGI.escape(session)}/clear").put
6757
+ r = @client.request("/sessions/shopify/#{CGI.escape(session)}/clear").put
6755
6758
  ::Io::Flow::V0::Models::Session.from_json(r)
6756
6759
  end
6757
6760
 
6758
- def put_organizations_by_session_and_organization(session, organization, session_put_form)
6761
+ def put_shopify_and_organizations_by_session_and_organization(session, organization, session_put_form)
6759
6762
  HttpClient::Preconditions.assert_class('session', session, String)
6760
6763
  HttpClient::Preconditions.assert_class('organization', organization, String)
6761
6764
  (x = session_put_form; x.is_a?(::Io::Flow::V0::Models::SessionPutForm) ? x : ::Io::Flow::V0::Models::SessionPutForm.new(x))
6762
- r = @client.request("/sessions/#{CGI.escape(session)}/organizations/#{CGI.escape(organization)}").with_json(session_put_form.to_json).put
6765
+ r = @client.request("/sessions/shopify/#{CGI.escape(session)}/organizations/#{CGI.escape(organization)}").with_json(session_put_form.to_json).put
6763
6766
  ::Io::Flow::V0::Models::OrganizationSession.new(r)
6764
6767
  end
6765
6768
 
6766
6769
  # Resets the session based on the provided geo parameters.
6767
- def put_reset_by_session(session, session_put_form)
6770
+ def put_shopify_and_reset_by_session(session, session_put_form)
6768
6771
  HttpClient::Preconditions.assert_class('session', session, String)
6769
6772
  (x = session_put_form; x.is_a?(::Io::Flow::V0::Models::SessionPutForm) ? x : ::Io::Flow::V0::Models::SessionPutForm.new(x))
6770
- r = @client.request("/sessions/#{CGI.escape(session)}/reset").with_json(session_put_form.to_json).put
6773
+ r = @client.request("/sessions/shopify/#{CGI.escape(session)}/reset").with_json(session_put_form.to_json).put
6771
6774
  ::Io::Flow::V0::Models::Session.from_json(r)
6772
6775
  end
6773
6776
 
@@ -6873,15 +6876,15 @@ module Io
6873
6876
  end
6874
6877
 
6875
6878
  # Creates a shopify cart conversion from a shopify cart
6876
- def post_conversions(organization, experience_key, io_flow_shopify_external_v0_models_shopify_cart, incoming={})
6879
+ def post_conversions(organization, experience_key, io_flow_shopify_external_v0_models_shopify_external_cart, incoming={})
6877
6880
  HttpClient::Preconditions.assert_class('organization', organization, String)
6878
6881
  HttpClient::Preconditions.assert_class('experience_key', experience_key, String)
6879
6882
  opts = HttpClient::Helper.symbolize_keys(incoming)
6880
6883
  query = {
6881
6884
  :expand => (x = opts.delete(:expand); x.nil? ? nil : HttpClient::Preconditions.assert_class('expand', x, Array).map { |v| HttpClient::Preconditions.assert_class('expand', v, String) })
6882
6885
  }.delete_if { |k, v| v.nil? }
6883
- (x = io_flow_shopify_external_v0_models_shopify_cart; x.is_a?(::Io::Flow::Shopify::External::V0::Models::ShopifyCart) ? x : ::Io::Flow::Shopify::External::V0::Models::ShopifyCart.new(x))
6884
- r = @client.request("/#{CGI.escape(organization)}/experiences/#{CGI.escape(experience_key)}/shopify/cart/conversions").with_query(query).with_json(io_flow_shopify_external_v0_models_shopify_cart.to_json).post
6886
+ (x = io_flow_shopify_external_v0_models_shopify_external_cart; x.is_a?(::Io::Flow::Shopify::External::V0::Models::ShopifyExternalCart) ? x : ::Io::Flow::Shopify::External::V0::Models::ShopifyExternalCart.new(x))
6887
+ r = @client.request("/#{CGI.escape(organization)}/experiences/#{CGI.escape(experience_key)}/shopify/cart/conversions").with_query(query).with_json(io_flow_shopify_external_v0_models_shopify_external_cart.to_json).post
6885
6888
  ::Io::Flow::V0::Models::ShopifyCartConversion.new(r)
6886
6889
  end
6887
6890
 
@@ -7074,6 +7077,209 @@ module Io
7074
7077
 
7075
7078
  end
7076
7079
 
7080
+ class SyncPendingRecords
7081
+
7082
+ def initialize(client)
7083
+ @client = HttpClient::Preconditions.assert_class('client', client, ::Io::Flow::V0::Client)
7084
+ end
7085
+
7086
+ def get(organization, incoming={})
7087
+ HttpClient::Preconditions.assert_class('organization', organization, String)
7088
+ opts = HttpClient::Helper.symbolize_keys(incoming)
7089
+ query = {
7090
+ :id => (x = opts.delete(:id); x.nil? ? nil : HttpClient::Preconditions.assert_class('id', x, Array).map { |v| HttpClient::Preconditions.assert_class('id', v, String) }),
7091
+ :stream_key => (x = opts.delete(:stream_key); x.nil? ? nil : HttpClient::Preconditions.assert_class('stream_key', x, String)),
7092
+ :value => (x = opts.delete(:value); x.nil? ? nil : HttpClient::Preconditions.assert_class('value', x, String)),
7093
+ :system => (x = opts.delete(:system); x.nil? ? nil : HttpClient::Preconditions.assert_class('system', x, String)),
7094
+ :limit => HttpClient::Preconditions.assert_class('limit', (x = opts.delete(:limit); x.nil? ? 25 : x), Integer),
7095
+ :offset => HttpClient::Preconditions.assert_class('offset', (x = opts.delete(:offset); x.nil? ? 0 : x), Integer),
7096
+ :sort => HttpClient::Preconditions.assert_class('sort', (x = opts.delete(:sort); x.nil? ? "-created_at" : x), String)
7097
+ }.delete_if { |k, v| v.nil? }
7098
+ r = @client.request("/#{CGI.escape(organization)}/sync/pending/records").with_query(query).get
7099
+ r.map { |x| ::Io::Flow::V0::Models::SyncPendingRecord.new(x) }
7100
+ end
7101
+
7102
+ end
7103
+
7104
+ class SyncRecords
7105
+
7106
+ def initialize(client)
7107
+ @client = HttpClient::Preconditions.assert_class('client', client, ::Io::Flow::V0::Client)
7108
+ end
7109
+
7110
+ def get(organization, incoming={})
7111
+ HttpClient::Preconditions.assert_class('organization', organization, String)
7112
+ opts = HttpClient::Helper.symbolize_keys(incoming)
7113
+ query = {
7114
+ :id => (x = opts.delete(:id); x.nil? ? nil : HttpClient::Preconditions.assert_class('id', x, Array).map { |v| HttpClient::Preconditions.assert_class('id', v, String) }),
7115
+ :stream_key => (x = opts.delete(:stream_key); x.nil? ? nil : HttpClient::Preconditions.assert_class('stream_key', x, String)),
7116
+ :system => (x = opts.delete(:system); x.nil? ? nil : HttpClient::Preconditions.assert_class('system', x, String)),
7117
+ :value => (x = opts.delete(:value); x.nil? ? nil : HttpClient::Preconditions.assert_class('value', x, String)),
7118
+ :limit => HttpClient::Preconditions.assert_class('limit', (x = opts.delete(:limit); x.nil? ? 25 : x), Integer),
7119
+ :offset => HttpClient::Preconditions.assert_class('offset', (x = opts.delete(:offset); x.nil? ? 0 : x), Integer),
7120
+ :sort => HttpClient::Preconditions.assert_class('sort', (x = opts.delete(:sort); x.nil? ? "-created_at" : x), String)
7121
+ }.delete_if { |k, v| v.nil? }
7122
+ r = @client.request("/#{CGI.escape(organization)}/sync/records").with_query(query).get
7123
+ r.map { |x| ::Io::Flow::V0::Models::SyncRecord.new(x) }
7124
+ end
7125
+
7126
+ def post(organization, sync_record_form)
7127
+ HttpClient::Preconditions.assert_class('organization', organization, String)
7128
+ (x = sync_record_form; x.is_a?(::Io::Flow::V0::Models::SyncRecordForm) ? x : ::Io::Flow::V0::Models::SyncRecordForm.new(x))
7129
+ r = @client.request("/#{CGI.escape(organization)}/sync/records").with_json(sync_record_form.to_json).post
7130
+ ::Io::Flow::V0::Models::SyncRecord.new(r)
7131
+ end
7132
+
7133
+ # Idempotent method to upsert a value for a system for this stream.
7134
+ def put_streams_and_systems_and_values_by_stream_key_and_system_and_value(organization, stream_key, system, value)
7135
+ HttpClient::Preconditions.assert_class('organization', organization, String)
7136
+ HttpClient::Preconditions.assert_class('stream_key', stream_key, String)
7137
+ HttpClient::Preconditions.assert_class('system', system, String)
7138
+ HttpClient::Preconditions.assert_class('value', value, String)
7139
+ r = @client.request("/#{CGI.escape(organization)}/sync/records/streams/#{CGI.escape(stream_key)}/systems/#{CGI.escape(system)}/values/#{CGI.escape(value)}").put
7140
+ ::Io::Flow::V0::Models::SyncRecord.new(r)
7141
+ end
7142
+
7143
+ # Delete a value for a system for this stream.
7144
+ def delete_streams_and_systems_and_values_by_stream_key_and_system_and_value(organization, stream_key, system, value)
7145
+ HttpClient::Preconditions.assert_class('organization', organization, String)
7146
+ HttpClient::Preconditions.assert_class('stream_key', stream_key, String)
7147
+ HttpClient::Preconditions.assert_class('system', system, String)
7148
+ HttpClient::Preconditions.assert_class('value', value, String)
7149
+ r = @client.request("/#{CGI.escape(organization)}/sync/records/streams/#{CGI.escape(stream_key)}/systems/#{CGI.escape(system)}/values/#{CGI.escape(value)}").delete
7150
+ nil
7151
+ end
7152
+
7153
+ def get_by_id(organization, id)
7154
+ HttpClient::Preconditions.assert_class('organization', organization, String)
7155
+ HttpClient::Preconditions.assert_class('id', id, String)
7156
+ r = @client.request("/#{CGI.escape(organization)}/sync/records/#{CGI.escape(id)}").get
7157
+ ::Io::Flow::V0::Models::SyncRecord.new(r)
7158
+ end
7159
+
7160
+ def put_by_id(organization, id, sync_record_form)
7161
+ HttpClient::Preconditions.assert_class('organization', organization, String)
7162
+ HttpClient::Preconditions.assert_class('id', id, String)
7163
+ (x = sync_record_form; x.is_a?(::Io::Flow::V0::Models::SyncRecordForm) ? x : ::Io::Flow::V0::Models::SyncRecordForm.new(x))
7164
+ r = @client.request("/#{CGI.escape(organization)}/sync/records/#{CGI.escape(id)}").with_json(sync_record_form.to_json).put
7165
+ ::Io::Flow::V0::Models::SyncRecord.new(r)
7166
+ end
7167
+
7168
+ def delete_by_id(organization, id)
7169
+ HttpClient::Preconditions.assert_class('organization', organization, String)
7170
+ HttpClient::Preconditions.assert_class('id', id, String)
7171
+ r = @client.request("/#{CGI.escape(organization)}/sync/records/#{CGI.escape(id)}").delete
7172
+ nil
7173
+ end
7174
+
7175
+ end
7176
+
7177
+ class SyncRecordFailures
7178
+
7179
+ def initialize(client)
7180
+ @client = HttpClient::Preconditions.assert_class('client', client, ::Io::Flow::V0::Client)
7181
+ end
7182
+
7183
+ def get(organization, incoming={})
7184
+ HttpClient::Preconditions.assert_class('organization', organization, String)
7185
+ opts = HttpClient::Helper.symbolize_keys(incoming)
7186
+ query = {
7187
+ :id => (x = opts.delete(:id); x.nil? ? nil : HttpClient::Preconditions.assert_class('id', x, Array).map { |v| HttpClient::Preconditions.assert_class('id', v, String) }),
7188
+ :stream_key => (x = opts.delete(:stream_key); x.nil? ? nil : HttpClient::Preconditions.assert_class('stream_key', x, String)),
7189
+ :value => (x = opts.delete(:value); x.nil? ? nil : HttpClient::Preconditions.assert_class('value', x, String)),
7190
+ :system => (x = opts.delete(:system); x.nil? ? nil : HttpClient::Preconditions.assert_class('system', x, String)),
7191
+ :reason => (x = opts.delete(:reason); x.nil? ? nil : (x = x; x.is_a?(::Io::Flow::V0::Models::SyncRecordFailureReason) ? x : ::Io::Flow::V0::Models::SyncRecordFailureReason.apply(x)).value),
7192
+ :limit => HttpClient::Preconditions.assert_class('limit', (x = opts.delete(:limit); x.nil? ? 25 : x), Integer),
7193
+ :offset => HttpClient::Preconditions.assert_class('offset', (x = opts.delete(:offset); x.nil? ? 0 : x), Integer),
7194
+ :sort => HttpClient::Preconditions.assert_class('sort', (x = opts.delete(:sort); x.nil? ? "-created_at" : x), String)
7195
+ }.delete_if { |k, v| v.nil? }
7196
+ r = @client.request("/#{CGI.escape(organization)}/sync/record/failures").with_query(query).get
7197
+ r.map { |x| ::Io::Flow::V0::Models::SyncRecordFailure.new(x) }
7198
+ end
7199
+
7200
+ def post(organization, sync_record_failure_form)
7201
+ HttpClient::Preconditions.assert_class('organization', organization, String)
7202
+ (x = sync_record_failure_form; x.is_a?(::Io::Flow::V0::Models::SyncRecordFailureForm) ? x : ::Io::Flow::V0::Models::SyncRecordFailureForm.new(x))
7203
+ r = @client.request("/#{CGI.escape(organization)}/sync/record/failures").with_json(sync_record_failure_form.to_json).post
7204
+ ::Io::Flow::V0::Models::SyncRecordFailure.new(r)
7205
+ end
7206
+
7207
+ def get_by_id(organization, id)
7208
+ HttpClient::Preconditions.assert_class('organization', organization, String)
7209
+ HttpClient::Preconditions.assert_class('id', id, String)
7210
+ r = @client.request("/#{CGI.escape(organization)}/sync/record/failures/#{CGI.escape(id)}").get
7211
+ ::Io::Flow::V0::Models::SyncRecordFailure.new(r)
7212
+ end
7213
+
7214
+ def put_by_id(organization, id, sync_record_failure_form)
7215
+ HttpClient::Preconditions.assert_class('organization', organization, String)
7216
+ HttpClient::Preconditions.assert_class('id', id, String)
7217
+ (x = sync_record_failure_form; x.is_a?(::Io::Flow::V0::Models::SyncRecordFailureForm) ? x : ::Io::Flow::V0::Models::SyncRecordFailureForm.new(x))
7218
+ r = @client.request("/#{CGI.escape(organization)}/sync/record/failures/#{CGI.escape(id)}").with_json(sync_record_failure_form.to_json).put
7219
+ ::Io::Flow::V0::Models::SyncRecordFailure.new(r)
7220
+ end
7221
+
7222
+ def delete_by_id(organization, id)
7223
+ HttpClient::Preconditions.assert_class('organization', organization, String)
7224
+ HttpClient::Preconditions.assert_class('id', id, String)
7225
+ r = @client.request("/#{CGI.escape(organization)}/sync/record/failures/#{CGI.escape(id)}").delete
7226
+ nil
7227
+ end
7228
+
7229
+ end
7230
+
7231
+ class SyncStreams
7232
+
7233
+ def initialize(client)
7234
+ @client = HttpClient::Preconditions.assert_class('client', client, ::Io::Flow::V0::Client)
7235
+ end
7236
+
7237
+ def get(organization, incoming={})
7238
+ HttpClient::Preconditions.assert_class('organization', organization, String)
7239
+ opts = HttpClient::Helper.symbolize_keys(incoming)
7240
+ query = {
7241
+ :id => (x = opts.delete(:id); x.nil? ? nil : HttpClient::Preconditions.assert_class('id', x, Array).map { |v| HttpClient::Preconditions.assert_class('id', v, String) }),
7242
+ :key => (x = opts.delete(:key); x.nil? ? nil : HttpClient::Preconditions.assert_class('key', x, String)),
7243
+ :type => (x = opts.delete(:type); x.nil? ? nil : (x = x; x.is_a?(::Io::Flow::V0::Models::SyncStreamType) ? x : ::Io::Flow::V0::Models::SyncStreamType.apply(x)).value),
7244
+ :limit => HttpClient::Preconditions.assert_class('limit', (x = opts.delete(:limit); x.nil? ? 25 : x), Integer),
7245
+ :offset => HttpClient::Preconditions.assert_class('offset', (x = opts.delete(:offset); x.nil? ? 0 : x), Integer),
7246
+ :sort => HttpClient::Preconditions.assert_class('sort', (x = opts.delete(:sort); x.nil? ? "-created_at" : x), String)
7247
+ }.delete_if { |k, v| v.nil? }
7248
+ r = @client.request("/#{CGI.escape(organization)}/sync/streams").with_query(query).get
7249
+ r.map { |x| ::Io::Flow::V0::Models::SyncStream.new(x) }
7250
+ end
7251
+
7252
+ def post(organization, sync_stream_form)
7253
+ HttpClient::Preconditions.assert_class('organization', organization, String)
7254
+ (x = sync_stream_form; x.is_a?(::Io::Flow::V0::Models::SyncStreamForm) ? x : ::Io::Flow::V0::Models::SyncStreamForm.new(x))
7255
+ r = @client.request("/#{CGI.escape(organization)}/sync/streams").with_json(sync_stream_form.to_json).post
7256
+ ::Io::Flow::V0::Models::SyncStream.new(r)
7257
+ end
7258
+
7259
+ def get_by_key(organization, key)
7260
+ HttpClient::Preconditions.assert_class('organization', organization, String)
7261
+ HttpClient::Preconditions.assert_class('key', key, String)
7262
+ r = @client.request("/#{CGI.escape(organization)}/sync/streams/#{CGI.escape(key)}").get
7263
+ ::Io::Flow::V0::Models::SyncStream.new(r)
7264
+ end
7265
+
7266
+ def put_by_key(organization, key, sync_stream_form)
7267
+ HttpClient::Preconditions.assert_class('organization', organization, String)
7268
+ HttpClient::Preconditions.assert_class('key', key, String)
7269
+ (x = sync_stream_form; x.is_a?(::Io::Flow::V0::Models::SyncStreamForm) ? x : ::Io::Flow::V0::Models::SyncStreamForm.new(x))
7270
+ r = @client.request("/#{CGI.escape(organization)}/sync/streams/#{CGI.escape(key)}").with_json(sync_stream_form.to_json).put
7271
+ ::Io::Flow::V0::Models::SyncStream.new(r)
7272
+ end
7273
+
7274
+ def delete_by_key(organization, key)
7275
+ HttpClient::Preconditions.assert_class('organization', organization, String)
7276
+ HttpClient::Preconditions.assert_class('key', key, String)
7277
+ r = @client.request("/#{CGI.escape(organization)}/sync/streams/#{CGI.escape(key)}").delete
7278
+ nil
7279
+ end
7280
+
7281
+ end
7282
+
7077
7283
  class TaxSettings
7078
7284
 
7079
7285
  def initialize(client)
@@ -9370,8 +9576,8 @@ module Io
9370
9576
  HARMONIZATION_OVERVIEW_EXPORT_TYPE = 'harmonization_overview_export_type' unless defined?(HARMONIZATION_OVERVIEW_EXPORT_TYPE)
9371
9577
  HARMONIZATION_HS6_EXPORT_TYPE = 'harmonization_hs6_export_type' unless defined?(HARMONIZATION_HS6_EXPORT_TYPE)
9372
9578
  HARMONIZATION_HS10_EXPORT_TYPE = 'harmonization_hs10_export_type' unless defined?(HARMONIZATION_HS10_EXPORT_TYPE)
9579
+ HARMONIZATION_TARIFF_CODES_EXPORT_TYPE = 'harmonization_tariff_codes_export_type' unless defined?(HARMONIZATION_TARIFF_CODES_EXPORT_TYPE)
9373
9580
  UNHARMONIZED_ITEM_EXPORT_TYPE = 'unharmonized_item_export_type' unless defined?(UNHARMONIZED_ITEM_EXPORT_TYPE)
9374
- HARMONIZATION_LANDED_COST_EXPORT_TYPE = 'harmonization_landed_cost_export_type' unless defined?(HARMONIZATION_LANDED_COST_EXPORT_TYPE)
9375
9581
  ORDER_EXPORT_TYPE = 'order_export_type' unless defined?(ORDER_EXPORT_TYPE)
9376
9582
  PRICE_BOOK_ITEM_EXPORT_TYPE = 'price_book_item_export_type' unless defined?(PRICE_BOOK_ITEM_EXPORT_TYPE)
9377
9583
  SOLIDUS_PRODUCT_EXPORT_TYPE = 'solidus_product_export_type' unless defined?(SOLIDUS_PRODUCT_EXPORT_TYPE)
@@ -9389,7 +9595,7 @@ module Io
9389
9595
  end
9390
9596
 
9391
9597
  def subtype_to_hash
9392
- raise 'Cannot serialize an instance of export_type directly - must use one of the specific types: account_transactions_export_type, account_orders_export_type, analytics_export_type, catalog_item_export_type, experience_export_type, harmonization_overview_export_type, harmonization_hs6_export_type, harmonization_hs10_export_type, unharmonized_item_export_type, harmonization_landed_cost_export_type, order_export_type, price_book_item_export_type, solidus_product_export_type, solidus_variant_export_type, localized_item_prices_export_type, marketing_feeds_export_type'
9598
+ raise 'Cannot serialize an instance of export_type directly - must use one of the specific types: account_transactions_export_type, account_orders_export_type, analytics_export_type, catalog_item_export_type, experience_export_type, harmonization_overview_export_type, harmonization_hs6_export_type, harmonization_hs10_export_type, harmonization_tariff_codes_export_type, unharmonized_item_export_type, order_export_type, price_book_item_export_type, solidus_product_export_type, solidus_variant_export_type, localized_item_prices_export_type, marketing_feeds_export_type'
9393
9599
  end
9394
9600
 
9395
9601
  def to_hash
@@ -9411,8 +9617,8 @@ module Io
9411
9617
  when Types::HARMONIZATION_OVERVIEW_EXPORT_TYPE; HarmonizationOverviewExportType.new(hash)
9412
9618
  when Types::HARMONIZATION_HS6_EXPORT_TYPE; HarmonizationHs6ExportType.new(hash)
9413
9619
  when Types::HARMONIZATION_HS10_EXPORT_TYPE; HarmonizationHs10ExportType.new(hash)
9620
+ when Types::HARMONIZATION_TARIFF_CODES_EXPORT_TYPE; HarmonizationTariffCodesExportType.new(hash)
9414
9621
  when Types::UNHARMONIZED_ITEM_EXPORT_TYPE; UnharmonizedItemExportType.new(hash)
9415
- when Types::HARMONIZATION_LANDED_COST_EXPORT_TYPE; HarmonizationLandedCostExportType.new(hash)
9416
9622
  when Types::ORDER_EXPORT_TYPE; OrderExportType.new(hash)
9417
9623
  when Types::PRICE_BOOK_ITEM_EXPORT_TYPE; PriceBookItemExportType.new(hash)
9418
9624
  when Types::SOLIDUS_PRODUCT_EXPORT_TYPE; SolidusProductExportType.new(hash)
@@ -9515,46 +9721,43 @@ module Io
9515
9721
 
9516
9722
  end
9517
9723
 
9518
- # All roles available to attach to a user.
9519
- class FlowRole
9724
+ class GatewayAuthenticationData
9520
9725
 
9521
9726
  module Types
9522
- FLOW_USER_ROLE = 'flow_user_role' unless defined?(FLOW_USER_ROLE)
9523
- FLOW_ADDON_ROLE = 'flow_addon_role' unless defined?(FLOW_ADDON_ROLE)
9727
+ STRIPE_AUTHENTICATION_DATA = 'stripe_authentication_data' unless defined?(STRIPE_AUTHENTICATION_DATA)
9524
9728
  end
9525
9729
 
9526
9730
  attr_reader :discriminator
9527
9731
 
9528
9732
  def initialize(incoming={})
9529
9733
  opts = HttpClient::Helper.symbolize_keys(incoming)
9530
- HttpClient::Preconditions.require_keys(opts, [:discriminator], 'FlowRole')
9734
+ HttpClient::Preconditions.require_keys(opts, [:discriminator], 'GatewayAuthenticationData')
9531
9735
  @discriminator = HttpClient::Preconditions.assert_class('discriminator', opts.delete(:discriminator), String)
9532
9736
  end
9533
9737
 
9534
9738
  def subtype_to_hash
9535
- raise 'Cannot serialize an instance of flow_role directly - must use one of the specific types: flow_user_role, flow_addon_role'
9739
+ raise 'Cannot serialize an instance of gateway_authentication_data directly - must use one of the specific types: stripe_authentication_data'
9536
9740
  end
9537
9741
 
9538
9742
  def to_hash
9539
9743
  subtype_to_hash.merge(:discriminator => @discriminator)
9540
9744
  end
9541
9745
 
9542
- def FlowRole.from_json(hash)
9746
+ def GatewayAuthenticationData.from_json(hash)
9543
9747
  HttpClient::Preconditions.assert_class('hash', hash, Hash)
9544
9748
  discriminator = HttpClient::Helper.symbolize_keys(hash)[:discriminator].to_s.strip
9545
9749
  if discriminator.empty?
9546
- raise "Union type[flow_role] requires a field named 'discriminator'"
9750
+ raise "Union type[gateway_authentication_data] requires a field named 'discriminator'"
9547
9751
  end
9548
9752
  case discriminator
9549
- when Types::FLOW_USER_ROLE; FlowUserRole.new(hash)
9550
- when Types::FLOW_ADDON_ROLE; FlowAddonRole.new(hash)
9551
- else FlowRoleUndefinedType.new(:discriminator => discriminator)
9753
+ when Types::STRIPE_AUTHENTICATION_DATA; StripeAuthenticationData.new(hash)
9754
+ else GatewayAuthenticationDataUndefinedType.new(:discriminator => discriminator)
9552
9755
  end
9553
9756
  end
9554
9757
 
9555
9758
  end
9556
9759
 
9557
- class FlowRoleUndefinedType < FlowRole
9760
+ class GatewayAuthenticationDataUndefinedType < GatewayAuthenticationData
9558
9761
 
9559
9762
  attr_reader :name
9560
9763
 
@@ -9578,43 +9781,43 @@ module Io
9578
9781
 
9579
9782
  end
9580
9783
 
9581
- class GatewayAuthenticationData
9784
+ class GatewayAuthenticationDataForm
9582
9785
 
9583
9786
  module Types
9584
- STRIPE_AUTHENTICATION_DATA = 'stripe_authentication_data' unless defined?(STRIPE_AUTHENTICATION_DATA)
9787
+ STRIPE_AUTHENTICATION_DATA_FORM = 'stripe_authentication_data_form' unless defined?(STRIPE_AUTHENTICATION_DATA_FORM)
9585
9788
  end
9586
9789
 
9587
9790
  attr_reader :discriminator
9588
9791
 
9589
9792
  def initialize(incoming={})
9590
9793
  opts = HttpClient::Helper.symbolize_keys(incoming)
9591
- HttpClient::Preconditions.require_keys(opts, [:discriminator], 'GatewayAuthenticationData')
9794
+ HttpClient::Preconditions.require_keys(opts, [:discriminator], 'GatewayAuthenticationDataForm')
9592
9795
  @discriminator = HttpClient::Preconditions.assert_class('discriminator', opts.delete(:discriminator), String)
9593
9796
  end
9594
9797
 
9595
9798
  def subtype_to_hash
9596
- raise 'Cannot serialize an instance of gateway_authentication_data directly - must use one of the specific types: stripe_authentication_data'
9799
+ raise 'Cannot serialize an instance of gateway_authentication_data_form directly - must use one of the specific types: stripe_authentication_data_form'
9597
9800
  end
9598
9801
 
9599
9802
  def to_hash
9600
9803
  subtype_to_hash.merge(:discriminator => @discriminator)
9601
9804
  end
9602
9805
 
9603
- def GatewayAuthenticationData.from_json(hash)
9806
+ def GatewayAuthenticationDataForm.from_json(hash)
9604
9807
  HttpClient::Preconditions.assert_class('hash', hash, Hash)
9605
9808
  discriminator = HttpClient::Helper.symbolize_keys(hash)[:discriminator].to_s.strip
9606
9809
  if discriminator.empty?
9607
- raise "Union type[gateway_authentication_data] requires a field named 'discriminator'"
9810
+ raise "Union type[gateway_authentication_data_form] requires a field named 'discriminator'"
9608
9811
  end
9609
9812
  case discriminator
9610
- when Types::STRIPE_AUTHENTICATION_DATA; StripeAuthenticationData.new(hash)
9611
- else GatewayAuthenticationDataUndefinedType.new(:discriminator => discriminator)
9813
+ when Types::STRIPE_AUTHENTICATION_DATA_FORM; StripeAuthenticationDataForm.new(hash)
9814
+ else GatewayAuthenticationDataFormUndefinedType.new(:discriminator => discriminator)
9612
9815
  end
9613
9816
  end
9614
9817
 
9615
9818
  end
9616
9819
 
9617
- class GatewayAuthenticationDataUndefinedType < GatewayAuthenticationData
9820
+ class GatewayAuthenticationDataFormUndefinedType < GatewayAuthenticationDataForm
9618
9821
 
9619
9822
  attr_reader :name
9620
9823
 
@@ -9638,103 +9841,43 @@ module Io
9638
9841
 
9639
9842
  end
9640
9843
 
9641
- class GatewayAuthenticationDataForm
9844
+ class InputSpecificationLimitation
9642
9845
 
9643
9846
  module Types
9644
- STRIPE_AUTHENTICATION_DATA_FORM = 'stripe_authentication_data_form' unless defined?(STRIPE_AUTHENTICATION_DATA_FORM)
9847
+ INPUT_SPECIFICATION_LIMITATION_MAX = 'input_specification_limitation_max' unless defined?(INPUT_SPECIFICATION_LIMITATION_MAX)
9645
9848
  end
9646
9849
 
9647
9850
  attr_reader :discriminator
9648
9851
 
9649
9852
  def initialize(incoming={})
9650
9853
  opts = HttpClient::Helper.symbolize_keys(incoming)
9651
- HttpClient::Preconditions.require_keys(opts, [:discriminator], 'GatewayAuthenticationDataForm')
9854
+ HttpClient::Preconditions.require_keys(opts, [:discriminator], 'InputSpecificationLimitation')
9652
9855
  @discriminator = HttpClient::Preconditions.assert_class('discriminator', opts.delete(:discriminator), String)
9653
9856
  end
9654
9857
 
9655
9858
  def subtype_to_hash
9656
- raise 'Cannot serialize an instance of gateway_authentication_data_form directly - must use one of the specific types: stripe_authentication_data_form'
9859
+ raise 'Cannot serialize an instance of input_specification_limitation directly - must use one of the specific types: input_specification_limitation_max'
9657
9860
  end
9658
9861
 
9659
9862
  def to_hash
9660
9863
  subtype_to_hash.merge(:discriminator => @discriminator)
9661
9864
  end
9662
9865
 
9663
- def GatewayAuthenticationDataForm.from_json(hash)
9866
+ def InputSpecificationLimitation.from_json(hash)
9664
9867
  HttpClient::Preconditions.assert_class('hash', hash, Hash)
9665
9868
  discriminator = HttpClient::Helper.symbolize_keys(hash)[:discriminator].to_s.strip
9666
9869
  if discriminator.empty?
9667
- raise "Union type[gateway_authentication_data_form] requires a field named 'discriminator'"
9870
+ raise "Union type[input_specification_limitation] requires a field named 'discriminator'"
9668
9871
  end
9669
9872
  case discriminator
9670
- when Types::STRIPE_AUTHENTICATION_DATA_FORM; StripeAuthenticationDataForm.new(hash)
9671
- else GatewayAuthenticationDataFormUndefinedType.new(:discriminator => discriminator)
9873
+ when Types::INPUT_SPECIFICATION_LIMITATION_MAX; InputSpecificationLimitationMax.new(hash)
9874
+ else InputSpecificationLimitationUndefinedType.new(:discriminator => discriminator)
9672
9875
  end
9673
9876
  end
9674
9877
 
9675
9878
  end
9676
9879
 
9677
- class GatewayAuthenticationDataFormUndefinedType < GatewayAuthenticationDataForm
9678
-
9679
- attr_reader :name
9680
-
9681
- def initialize(incoming={})
9682
- super(:discriminator => 'undefined_type')
9683
- opts = HttpClient::Helper.symbolize_keys(incoming)
9684
- @name = HttpClient::Preconditions.assert_class('name', opts.delete(:discriminator), String)
9685
- end
9686
-
9687
- def subtype_to_hash
9688
- raise 'Unable to serialize undefined type to json'
9689
- end
9690
-
9691
- def copy(incoming={})
9692
- raise 'Operation not supported for undefined type'
9693
- end
9694
-
9695
- def to_hash
9696
- raise 'Operation not supported for undefined type'
9697
- end
9698
-
9699
- end
9700
-
9701
- class InputSpecificationLimitation
9702
-
9703
- module Types
9704
- INPUT_SPECIFICATION_LIMITATION_MAX = 'input_specification_limitation_max' unless defined?(INPUT_SPECIFICATION_LIMITATION_MAX)
9705
- end
9706
-
9707
- attr_reader :discriminator
9708
-
9709
- def initialize(incoming={})
9710
- opts = HttpClient::Helper.symbolize_keys(incoming)
9711
- HttpClient::Preconditions.require_keys(opts, [:discriminator], 'InputSpecificationLimitation')
9712
- @discriminator = HttpClient::Preconditions.assert_class('discriminator', opts.delete(:discriminator), String)
9713
- end
9714
-
9715
- def subtype_to_hash
9716
- raise 'Cannot serialize an instance of input_specification_limitation directly - must use one of the specific types: input_specification_limitation_max'
9717
- end
9718
-
9719
- def to_hash
9720
- subtype_to_hash.merge(:discriminator => @discriminator)
9721
- end
9722
-
9723
- def InputSpecificationLimitation.from_json(hash)
9724
- HttpClient::Preconditions.assert_class('hash', hash, Hash)
9725
- discriminator = HttpClient::Helper.symbolize_keys(hash)[:discriminator].to_s.strip
9726
- if discriminator.empty?
9727
- raise "Union type[input_specification_limitation] requires a field named 'discriminator'"
9728
- end
9729
- case discriminator
9730
- when Types::INPUT_SPECIFICATION_LIMITATION_MAX; InputSpecificationLimitationMax.new(hash)
9731
- else InputSpecificationLimitationUndefinedType.new(:discriminator => discriminator)
9732
- end
9733
- end
9734
-
9735
- end
9736
-
9737
- class InputSpecificationLimitationUndefinedType < InputSpecificationLimitation
9880
+ class InputSpecificationLimitationUndefinedType < InputSpecificationLimitation
9738
9881
 
9739
9882
  attr_reader :name
9740
9883
 
@@ -11952,6 +12095,80 @@ module Io
11952
12095
 
11953
12096
  end
11954
12097
 
12098
+ class AddressFieldName
12099
+
12100
+ attr_reader :value
12101
+
12102
+ def initialize(value)
12103
+ @value = HttpClient::Preconditions.assert_class('value', value, String)
12104
+ end
12105
+
12106
+ # Returns the instance of AddressFieldName for this value, creating a new instance for an unknown value
12107
+ def AddressFieldName.apply(value)
12108
+ if value.instance_of?(AddressFieldName)
12109
+ value
12110
+ else
12111
+ HttpClient::Preconditions.assert_class_or_nil('value', value, String)
12112
+ value.nil? ? nil : (from_string(value) || AddressFieldName.new(value))
12113
+ end
12114
+ end
12115
+
12116
+ # Returns the instance of AddressFieldName for this value, or nil if not found
12117
+ def AddressFieldName.from_string(value)
12118
+ HttpClient::Preconditions.assert_class('value', value, String)
12119
+ AddressFieldName.ALL.find { |v| v.value == value }
12120
+ end
12121
+
12122
+ def AddressFieldName.ALL
12123
+ @@all ||= [AddressFieldName.first_name, AddressFieldName.last_name, AddressFieldName.street_1, AddressFieldName.street_2, AddressFieldName.city, AddressFieldName.province, AddressFieldName.postal, AddressFieldName.country, AddressFieldName.phone, AddressFieldName.company]
12124
+ end
12125
+
12126
+ def AddressFieldName.first_name
12127
+ @@_first_name ||= AddressFieldName.new('first_name')
12128
+ end
12129
+
12130
+ def AddressFieldName.last_name
12131
+ @@_last_name ||= AddressFieldName.new('last_name')
12132
+ end
12133
+
12134
+ def AddressFieldName.street_1
12135
+ @@_street_1 ||= AddressFieldName.new('street_1')
12136
+ end
12137
+
12138
+ def AddressFieldName.street_2
12139
+ @@_street_2 ||= AddressFieldName.new('street_2')
12140
+ end
12141
+
12142
+ def AddressFieldName.city
12143
+ @@_city ||= AddressFieldName.new('city')
12144
+ end
12145
+
12146
+ def AddressFieldName.province
12147
+ @@_province ||= AddressFieldName.new('province')
12148
+ end
12149
+
12150
+ def AddressFieldName.postal
12151
+ @@_postal ||= AddressFieldName.new('postal')
12152
+ end
12153
+
12154
+ def AddressFieldName.country
12155
+ @@_country ||= AddressFieldName.new('country')
12156
+ end
12157
+
12158
+ def AddressFieldName.phone
12159
+ @@_phone ||= AddressFieldName.new('phone')
12160
+ end
12161
+
12162
+ def AddressFieldName.company
12163
+ @@_company ||= AddressFieldName.new('company')
12164
+ end
12165
+
12166
+ def to_hash
12167
+ value
12168
+ end
12169
+
12170
+ end
12171
+
11955
12172
  class AdjustmentReasonKey
11956
12173
 
11957
12174
  attr_reader :value
@@ -12958,7 +13175,7 @@ module Io
12958
13175
  end
12959
13176
 
12960
13177
  def CardErrorCode.ALL
12961
- @@all ||= [CardErrorCode.invalid_address, CardErrorCode.invalid_name, CardErrorCode.invalid_number, CardErrorCode.invalid_expiration, CardErrorCode.invalid_token_type, CardErrorCode.avs, CardErrorCode.cvv, CardErrorCode.fraud, CardErrorCode.unknown]
13178
+ @@all ||= [CardErrorCode.invalid_address, CardErrorCode.invalid_currency, CardErrorCode.invalid_name, CardErrorCode.invalid_number, CardErrorCode.invalid_expiration, CardErrorCode.invalid_token_type, CardErrorCode.avs, CardErrorCode.cvv, CardErrorCode.fraud, CardErrorCode.unknown]
12962
13179
  end
12963
13180
 
12964
13181
  # Invalid billing address
@@ -12966,6 +13183,11 @@ module Io
12966
13183
  @@_invalid_address ||= CardErrorCode.new('invalid_address')
12967
13184
  end
12968
13185
 
13186
+ # Invalid requested currency
13187
+ def CardErrorCode.invalid_currency
13188
+ @@_invalid_currency ||= CardErrorCode.new('invalid_currency')
13189
+ end
13190
+
12969
13191
  # Invalid cardholder name
12970
13192
  def CardErrorCode.invalid_name
12971
13193
  @@_invalid_name ||= CardErrorCode.new('invalid_name')
@@ -15280,51 +15502,6 @@ module Io
15280
15502
 
15281
15503
  end
15282
15504
 
15283
- class FlowAddonRole < FlowRole
15284
-
15285
- attr_reader :value
15286
-
15287
- def initialize(value)
15288
- super(:name => FlowRole::Types::FLOW_ADDON_ROLE, :discriminator => 'flow_addon_role')
15289
- @value = HttpClient::Preconditions.assert_class('value', value, String)
15290
- end
15291
-
15292
- # Returns the instance of FlowAddonRole for this value, creating a new instance for an unknown value
15293
- def FlowAddonRole.apply(value)
15294
- if value.instance_of?(FlowAddonRole)
15295
- value
15296
- else
15297
- HttpClient::Preconditions.assert_class_or_nil('value', value, String)
15298
- value.nil? ? nil : (from_string(value) || FlowAddonRole.new(value))
15299
- end
15300
- end
15301
-
15302
- # Returns the instance of FlowAddonRole for this value, or nil if not found
15303
- def FlowAddonRole.from_string(value)
15304
- HttpClient::Preconditions.assert_class('value', value, String)
15305
- FlowAddonRole.ALL.find { |v| v.value == value }
15306
- end
15307
-
15308
- def FlowAddonRole.ALL
15309
- @@all ||= [FlowAddonRole.consumer_data_viewer, FlowAddonRole.membership_manager]
15310
- end
15311
-
15312
- # Can view consumer's private data
15313
- def FlowAddonRole.consumer_data_viewer
15314
- @@_consumer_data_viewer ||= FlowAddonRole.new('consumer_data_viewer')
15315
- end
15316
-
15317
- # Can invite new users to the org.
15318
- def FlowAddonRole.membership_manager
15319
- @@_membership_manager ||= FlowAddonRole.new('membership_manager')
15320
- end
15321
-
15322
- def subtype_to_hash
15323
- value
15324
- end
15325
-
15326
- end
15327
-
15328
15505
  class FlowBehavior
15329
15506
 
15330
15507
  attr_reader :value
@@ -15364,71 +15541,70 @@ module Io
15364
15541
 
15365
15542
  end
15366
15543
 
15367
- class FlowUserRole < FlowRole
15544
+ class FlowRole
15368
15545
 
15369
15546
  attr_reader :value
15370
15547
 
15371
15548
  def initialize(value)
15372
- super(:name => FlowRole::Types::FLOW_USER_ROLE, :discriminator => 'flow_user_role')
15373
15549
  @value = HttpClient::Preconditions.assert_class('value', value, String)
15374
15550
  end
15375
15551
 
15376
- # Returns the instance of FlowUserRole for this value, creating a new instance for an unknown value
15377
- def FlowUserRole.apply(value)
15378
- if value.instance_of?(FlowUserRole)
15552
+ # Returns the instance of FlowRole for this value, creating a new instance for an unknown value
15553
+ def FlowRole.apply(value)
15554
+ if value.instance_of?(FlowRole)
15379
15555
  value
15380
15556
  else
15381
15557
  HttpClient::Preconditions.assert_class_or_nil('value', value, String)
15382
- value.nil? ? nil : (from_string(value) || FlowUserRole.new(value))
15558
+ value.nil? ? nil : (from_string(value) || FlowRole.new(value))
15383
15559
  end
15384
15560
  end
15385
15561
 
15386
- # Returns the instance of FlowUserRole for this value, or nil if not found
15387
- def FlowUserRole.from_string(value)
15562
+ # Returns the instance of FlowRole for this value, or nil if not found
15563
+ def FlowRole.from_string(value)
15388
15564
  HttpClient::Preconditions.assert_class('value', value, String)
15389
- FlowUserRole.ALL.find { |v| v.value == value }
15565
+ FlowRole.ALL.find { |v| v.value == value }
15390
15566
  end
15391
15567
 
15392
- def FlowUserRole.ALL
15393
- @@all ||= [FlowUserRole.organization_admin, FlowUserRole.organization_merchant, FlowUserRole.organization_operations, FlowUserRole.organization_fulfillment, FlowUserRole.organization_marketing, FlowUserRole.organization_finance, FlowUserRole.flow_operations]
15568
+ def FlowRole.ALL
15569
+ @@all ||= [FlowRole.organization_admin, FlowRole.organization_merchant, FlowRole.organization_customer_service, FlowRole.organization_fulfillment, FlowRole.organization_marketing, FlowRole.organization_finance, FlowRole.flow_operations]
15394
15570
  end
15395
15571
 
15396
15572
  # Can fully administrate a merchant organization.
15397
- def FlowUserRole.organization_admin
15398
- @@_organization_admin ||= FlowUserRole.new('organization_admin')
15573
+ def FlowRole.organization_admin
15574
+ @@_organization_admin ||= FlowRole.new('organization_admin')
15399
15575
  end
15400
15576
 
15401
15577
  # Can access merchant functions such as analytics, billing, experiences.
15402
- def FlowUserRole.organization_merchant
15403
- @@_organization_merchant ||= FlowUserRole.new('organization_merchant')
15578
+ def FlowRole.organization_merchant
15579
+ @@_organization_merchant ||= FlowRole.new('organization_merchant')
15404
15580
  end
15405
15581
 
15406
15582
  # Can access customer service functions and retreive relevant data.
15407
- def FlowUserRole.organization_operations
15408
- @@_organization_operations ||= FlowUserRole.new('organization_operations')
15583
+ def FlowRole.organization_customer_service
15584
+ @@_organization_customer_service ||= FlowRole.new('organization_customer_service')
15409
15585
  end
15410
15586
 
15411
15587
  # Can access fulfillment functions and retreive relevant data.
15412
- def FlowUserRole.organization_fulfillment
15413
- @@_organization_fulfillment ||= FlowUserRole.new('organization_fulfillment')
15588
+ def FlowRole.organization_fulfillment
15589
+ @@_organization_fulfillment ||= FlowRole.new('organization_fulfillment')
15414
15590
  end
15415
15591
 
15416
15592
  # Can access marketing functions and retreive relevant data.
15417
- def FlowUserRole.organization_marketing
15418
- @@_organization_marketing ||= FlowUserRole.new('organization_marketing')
15593
+ def FlowRole.organization_marketing
15594
+ @@_organization_marketing ||= FlowRole.new('organization_marketing')
15419
15595
  end
15420
15596
 
15421
15597
  # Can access billing and reconcilliation functions and retreive relevant data.
15422
- def FlowUserRole.organization_finance
15423
- @@_organization_finance ||= FlowUserRole.new('organization_finance')
15598
+ def FlowRole.organization_finance
15599
+ @@_organization_finance ||= FlowRole.new('organization_finance')
15424
15600
  end
15425
15601
 
15426
15602
  # Can access Flow internal functions.
15427
- def FlowUserRole.flow_operations
15428
- @@_flow_operations ||= FlowUserRole.new('flow_operations')
15603
+ def FlowRole.flow_operations
15604
+ @@_flow_operations ||= FlowRole.new('flow_operations')
15429
15605
  end
15430
15606
 
15431
- def subtype_to_hash
15607
+ def to_hash
15432
15608
  value
15433
15609
  end
15434
15610
 
@@ -17691,6 +17867,50 @@ module Io
17691
17867
 
17692
17868
  end
17693
17869
 
17870
+ class PaymentMethodCapability
17871
+
17872
+ attr_reader :value
17873
+
17874
+ def initialize(value)
17875
+ @value = HttpClient::Preconditions.assert_class('value', value, String)
17876
+ end
17877
+
17878
+ # Returns the instance of PaymentMethodCapability for this value, creating a new instance for an unknown value
17879
+ def PaymentMethodCapability.apply(value)
17880
+ if value.instance_of?(PaymentMethodCapability)
17881
+ value
17882
+ else
17883
+ HttpClient::Preconditions.assert_class_or_nil('value', value, String)
17884
+ value.nil? ? nil : (from_string(value) || PaymentMethodCapability.new(value))
17885
+ end
17886
+ end
17887
+
17888
+ # Returns the instance of PaymentMethodCapability for this value, or nil if not found
17889
+ def PaymentMethodCapability.from_string(value)
17890
+ HttpClient::Preconditions.assert_class('value', value, String)
17891
+ PaymentMethodCapability.ALL.find { |v| v.value == value }
17892
+ end
17893
+
17894
+ def PaymentMethodCapability.ALL
17895
+ @@all ||= [PaymentMethodCapability.credit, PaymentMethodCapability.debit]
17896
+ end
17897
+
17898
+ # Credit cards provide access to a line of debt issued by a bank.
17899
+ def PaymentMethodCapability.credit
17900
+ @@_credit ||= PaymentMethodCapability.new('credit')
17901
+ end
17902
+
17903
+ # Debit cards deduct money directly from a bank account.
17904
+ def PaymentMethodCapability.debit
17905
+ @@_debit ||= PaymentMethodCapability.new('debit')
17906
+ end
17907
+
17908
+ def to_hash
17909
+ value
17910
+ end
17911
+
17912
+ end
17913
+
17694
17914
  class PaymentMethodRuleContentKey
17695
17915
 
17696
17916
  attr_reader :value
@@ -19520,6 +19740,146 @@ module Io
19520
19740
 
19521
19741
  end
19522
19742
 
19743
+ class SyncRecordFailureReason
19744
+
19745
+ attr_reader :value
19746
+
19747
+ def initialize(value)
19748
+ @value = HttpClient::Preconditions.assert_class('value', value, String)
19749
+ end
19750
+
19751
+ # Returns the instance of SyncRecordFailureReason for this value, creating a new instance for an unknown value
19752
+ def SyncRecordFailureReason.apply(value)
19753
+ if value.instance_of?(SyncRecordFailureReason)
19754
+ value
19755
+ else
19756
+ HttpClient::Preconditions.assert_class_or_nil('value', value, String)
19757
+ value.nil? ? nil : (from_string(value) || SyncRecordFailureReason.new(value))
19758
+ end
19759
+ end
19760
+
19761
+ # Returns the instance of SyncRecordFailureReason for this value, or nil if not found
19762
+ def SyncRecordFailureReason.from_string(value)
19763
+ HttpClient::Preconditions.assert_class('value', value, String)
19764
+ SyncRecordFailureReason.ALL.find { |v| v.value == value }
19765
+ end
19766
+
19767
+ def SyncRecordFailureReason.ALL
19768
+ @@all ||= [SyncRecordFailureReason.inventory, SyncRecordFailureReason.address, SyncRecordFailureReason.promotion, SyncRecordFailureReason.other]
19769
+ end
19770
+
19771
+ def SyncRecordFailureReason.inventory
19772
+ @@_inventory ||= SyncRecordFailureReason.new('inventory')
19773
+ end
19774
+
19775
+ def SyncRecordFailureReason.address
19776
+ @@_address ||= SyncRecordFailureReason.new('address')
19777
+ end
19778
+
19779
+ def SyncRecordFailureReason.promotion
19780
+ @@_promotion ||= SyncRecordFailureReason.new('promotion')
19781
+ end
19782
+
19783
+ def SyncRecordFailureReason.other
19784
+ @@_other ||= SyncRecordFailureReason.new('other')
19785
+ end
19786
+
19787
+ def to_hash
19788
+ value
19789
+ end
19790
+
19791
+ end
19792
+
19793
+ class SyncStreamType
19794
+
19795
+ attr_reader :value
19796
+
19797
+ def initialize(value)
19798
+ @value = HttpClient::Preconditions.assert_class('value', value, String)
19799
+ end
19800
+
19801
+ # Returns the instance of SyncStreamType for this value, creating a new instance for an unknown value
19802
+ def SyncStreamType.apply(value)
19803
+ if value.instance_of?(SyncStreamType)
19804
+ value
19805
+ else
19806
+ HttpClient::Preconditions.assert_class_or_nil('value', value, String)
19807
+ value.nil? ? nil : (from_string(value) || SyncStreamType.new(value))
19808
+ end
19809
+ end
19810
+
19811
+ # Returns the instance of SyncStreamType for this value, or nil if not found
19812
+ def SyncStreamType.from_string(value)
19813
+ HttpClient::Preconditions.assert_class('value', value, String)
19814
+ SyncStreamType.ALL.find { |v| v.value == value }
19815
+ end
19816
+
19817
+ def SyncStreamType.ALL
19818
+ @@all ||= [SyncStreamType.submitted_order]
19819
+ end
19820
+
19821
+ # Represents a sync stream of submitted orders - ie each record reported
19822
+ # represents a submitted order
19823
+ def SyncStreamType.submitted_order
19824
+ @@_submitted_order ||= SyncStreamType.new('submitted_order')
19825
+ end
19826
+
19827
+ def to_hash
19828
+ value
19829
+ end
19830
+
19831
+ end
19832
+
19833
+ class SyncUnitOfTime
19834
+
19835
+ attr_reader :value
19836
+
19837
+ def initialize(value)
19838
+ @value = HttpClient::Preconditions.assert_class('value', value, String)
19839
+ end
19840
+
19841
+ # Returns the instance of SyncUnitOfTime for this value, creating a new instance for an unknown value
19842
+ def SyncUnitOfTime.apply(value)
19843
+ if value.instance_of?(SyncUnitOfTime)
19844
+ value
19845
+ else
19846
+ HttpClient::Preconditions.assert_class_or_nil('value', value, String)
19847
+ value.nil? ? nil : (from_string(value) || SyncUnitOfTime.new(value))
19848
+ end
19849
+ end
19850
+
19851
+ # Returns the instance of SyncUnitOfTime for this value, or nil if not found
19852
+ def SyncUnitOfTime.from_string(value)
19853
+ HttpClient::Preconditions.assert_class('value', value, String)
19854
+ SyncUnitOfTime.ALL.find { |v| v.value == value }
19855
+ end
19856
+
19857
+ def SyncUnitOfTime.ALL
19858
+ @@all ||= [SyncUnitOfTime.day, SyncUnitOfTime.hour, SyncUnitOfTime.minute, SyncUnitOfTime.second]
19859
+ end
19860
+
19861
+ def SyncUnitOfTime.day
19862
+ @@_day ||= SyncUnitOfTime.new('day')
19863
+ end
19864
+
19865
+ def SyncUnitOfTime.hour
19866
+ @@_hour ||= SyncUnitOfTime.new('hour')
19867
+ end
19868
+
19869
+ def SyncUnitOfTime.minute
19870
+ @@_minute ||= SyncUnitOfTime.new('minute')
19871
+ end
19872
+
19873
+ def SyncUnitOfTime.second
19874
+ @@_second ||= SyncUnitOfTime.new('second')
19875
+ end
19876
+
19877
+ def to_hash
19878
+ value
19879
+ end
19880
+
19881
+ end
19882
+
19523
19883
  class TaxApplicability
19524
19884
 
19525
19885
  attr_reader :value
@@ -20084,12 +20444,12 @@ module Io
20084
20444
  @@_foot ||= UnitOfMeasurement.new('foot')
20085
20445
  end
20086
20446
 
20087
- # A unit of volume equal to one cubic inch (in³).
20447
+ # A unit of volume equal to one cubic inch (in?).
20088
20448
  def UnitOfMeasurement.cubic_inch
20089
20449
  @@_cubic_inch ||= UnitOfMeasurement.new('cubic_inch')
20090
20450
  end
20091
20451
 
20092
- # The metric unit for volume quantities (m³).
20452
+ # The metric unit for volume quantities (m?).
20093
20453
  def UnitOfMeasurement.cubic_meter
20094
20454
  @@_cubic_meter ||= UnitOfMeasurement.new('cubic_meter')
20095
20455
  end
@@ -20747,7 +21107,7 @@ module Io
20747
21107
 
20748
21108
  class AddressConfiguration
20749
21109
 
20750
- attr_reader :country, :field_validation, :provinces
21110
+ attr_reader :country, :field_validation, :provinces, :formats
20751
21111
 
20752
21112
  def initialize(incoming={})
20753
21113
  opts = HttpClient::Helper.symbolize_keys(incoming)
@@ -20755,6 +21115,7 @@ module Io
20755
21115
  @country = HttpClient::Preconditions.assert_class('country', opts.delete(:country), String)
20756
21116
  @field_validation = (x = opts.delete(:field_validation); x.is_a?(::Io::Flow::V0::Models::AddressFieldValidation) ? x : ::Io::Flow::V0::Models::AddressFieldValidation.new(x))
20757
21117
  @provinces = HttpClient::Preconditions.assert_class('provinces', (x = opts.delete(:provinces); x.nil? ? [] : x), Array).map { |v| (x = v; x.is_a?(::Io::Flow::V0::Models::AddressConfigurationProvince) ? x : ::Io::Flow::V0::Models::AddressConfigurationProvince.new(x)) }
21118
+ @formats = HttpClient::Preconditions.assert_class('formats', (x = opts.delete(:formats); x.nil? ? [] : x), Array).map { |v| (x = v; x.is_a?(::Io::Flow::V0::Models::AddressConfigurationFormat) ? x : ::Io::Flow::V0::Models::AddressConfigurationFormat.new(x)) }
20758
21119
  end
20759
21120
 
20760
21121
  def to_json
@@ -20769,7 +21130,61 @@ module Io
20769
21130
  {
20770
21131
  :country => country,
20771
21132
  :field_validation => field_validation.to_hash,
20772
- :provinces => provinces.map { |o| o.to_hash }
21133
+ :provinces => provinces.map { |o| o.to_hash },
21134
+ :formats => formats.map { |o| o.to_hash }
21135
+ }
21136
+ end
21137
+
21138
+ end
21139
+
21140
+ class AddressConfigurationFieldPlacement
21141
+
21142
+ attr_reader :name
21143
+
21144
+ def initialize(incoming={})
21145
+ opts = HttpClient::Helper.symbolize_keys(incoming)
21146
+ HttpClient::Preconditions.require_keys(opts, [:name], 'AddressConfigurationFieldPlacement')
21147
+ @name = (x = opts.delete(:name); x.is_a?(::Io::Flow::V0::Models::AddressFieldName) ? x : ::Io::Flow::V0::Models::AddressFieldName.apply(x))
21148
+ end
21149
+
21150
+ def to_json
21151
+ JSON.dump(to_hash)
21152
+ end
21153
+
21154
+ def copy(incoming={})
21155
+ AddressConfigurationFieldPlacement.new(to_hash.merge(HttpClient::Helper.symbolize_keys(incoming)))
21156
+ end
21157
+
21158
+ def to_hash
21159
+ {
21160
+ :name => name.value
21161
+ }
21162
+ end
21163
+
21164
+ end
21165
+
21166
+ # Field placements within an address configuration format
21167
+ class AddressConfigurationFormat
21168
+
21169
+ attr_reader :placements
21170
+
21171
+ def initialize(incoming={})
21172
+ opts = HttpClient::Helper.symbolize_keys(incoming)
21173
+ HttpClient::Preconditions.require_keys(opts, [:placements], 'AddressConfigurationFormat')
21174
+ @placements = HttpClient::Preconditions.assert_class('placements', opts.delete(:placements), Array).map { |v| (x = v; x.is_a?(::Io::Flow::V0::Models::AddressConfigurationFieldPlacement) ? x : ::Io::Flow::V0::Models::AddressConfigurationFieldPlacement.new(x)) }
21175
+ end
21176
+
21177
+ def to_json
21178
+ JSON.dump(to_hash)
21179
+ end
21180
+
21181
+ def copy(incoming={})
21182
+ AddressConfigurationFormat.new(to_hash.merge(HttpClient::Helper.symbolize_keys(incoming)))
21183
+ end
21184
+
21185
+ def to_hash
21186
+ {
21187
+ :placements => placements.map { |o| o.to_hash }
20773
21188
  }
20774
21189
  end
20775
21190
 
@@ -22896,7 +23311,7 @@ module Io
22896
23311
  HttpClient::Preconditions.require_keys(opts, [:behavior, :authentication_techniques, :roles], 'BehaviorAudit')
22897
23312
  @behavior = (x = opts.delete(:behavior); x.is_a?(::Io::Flow::V0::Models::FlowBehavior) ? x : ::Io::Flow::V0::Models::FlowBehavior.apply(x))
22898
23313
  @authentication_techniques = HttpClient::Preconditions.assert_class('authentication_techniques', opts.delete(:authentication_techniques), Array).map { |v| (x = v; x.is_a?(::Io::Flow::V0::Models::AuthenticationTechnique) ? x : ::Io::Flow::V0::Models::AuthenticationTechnique.apply(x)) }
22899
- @roles = HttpClient::Preconditions.assert_class('roles', opts.delete(:roles), Array).map { |v| (x = v; x.is_a?(::Io::Flow::V0::Models::FlowRole) ? x : ::Io::Flow::V0::Models::FlowRole.from_json(x)) }
23314
+ @roles = HttpClient::Preconditions.assert_class('roles', opts.delete(:roles), Array).map { |v| (x = v; x.is_a?(::Io::Flow::V0::Models::FlowRole) ? x : ::Io::Flow::V0::Models::FlowRole.apply(x)) }
22900
23315
  end
22901
23316
 
22902
23317
  def to_json
@@ -22911,7 +23326,7 @@ module Io
22911
23326
  {
22912
23327
  :behavior => behavior.value,
22913
23328
  :authentication_techniques => authentication_techniques.map { |o| o.value },
22914
- :roles => roles.map { |o| o.to_hash }
23329
+ :roles => roles.map { |o| o.value }
22915
23330
  }
22916
23331
  end
22917
23332
 
@@ -23718,7 +24133,7 @@ module Io
23718
24133
 
23719
24134
  class CardForm
23720
24135
 
23721
- attr_reader :number, :cipher, :expiration_month, :expiration_year, :name, :cvv, :address, :ip, :challenge_text, :challenge_cipher, :token_type
24136
+ attr_reader :number, :cipher, :expiration_month, :expiration_year, :name, :cvv, :address, :ip, :challenge_text, :challenge_cipher, :token_type, :requested_currency
23722
24137
 
23723
24138
  def initialize(incoming={})
23724
24139
  opts = HttpClient::Helper.symbolize_keys(incoming)
@@ -23734,6 +24149,7 @@ module Io
23734
24149
  @challenge_text = (x = opts.delete(:challenge_text); x.nil? ? nil : HttpClient::Preconditions.assert_class('challenge_text', x, String))
23735
24150
  @challenge_cipher = (x = opts.delete(:challenge_cipher); x.nil? ? nil : HttpClient::Preconditions.assert_class('challenge_cipher', x, String))
23736
24151
  @token_type = (x = opts.delete(:token_type); x.nil? ? nil : (x = x; x.is_a?(::Io::Flow::V0::Models::TokenType) ? x : ::Io::Flow::V0::Models::TokenType.apply(x)))
24152
+ @requested_currency = (x = opts.delete(:requested_currency); x.nil? ? nil : HttpClient::Preconditions.assert_class('requested_currency', x, String))
23737
24153
  end
23738
24154
 
23739
24155
  def to_json
@@ -23756,7 +24172,8 @@ module Io
23756
24172
  :ip => ip,
23757
24173
  :challenge_text => challenge_text,
23758
24174
  :challenge_cipher => challenge_cipher,
23759
- :token_type => token_type.nil? ? nil : token_type.value
24175
+ :token_type => token_type.nil? ? nil : token_type.value,
24176
+ :requested_currency => requested_currency
23760
24177
  }
23761
24178
  end
23762
24179
 
@@ -25284,32 +25701,6 @@ module Io
25284
25701
 
25285
25702
  end
25286
25703
 
25287
- class CheckoutSettings
25288
-
25289
- attr_reader :configuration
25290
-
25291
- def initialize(incoming={})
25292
- opts = HttpClient::Helper.symbolize_keys(incoming)
25293
- HttpClient::Preconditions.require_keys(opts, [:configuration], 'CheckoutSettings')
25294
- @configuration = (x = opts.delete(:configuration); x.is_a?(::Io::Flow::V0::Models::ExperienceConfigurationReference) ? x : ::Io::Flow::V0::Models::ExperienceConfigurationReference.new(x))
25295
- end
25296
-
25297
- def to_json
25298
- JSON.dump(to_hash)
25299
- end
25300
-
25301
- def copy(incoming={})
25302
- CheckoutSettings.new(to_hash.merge(HttpClient::Helper.symbolize_keys(incoming)))
25303
- end
25304
-
25305
- def to_hash
25306
- {
25307
- :configuration => configuration.to_hash
25308
- }
25309
- end
25310
-
25311
- end
25312
-
25313
25704
  # Represents a secure token that can be used to redirect to Checkout UI
25314
25705
  class CheckoutToken
25315
25706
 
@@ -26165,7 +26556,7 @@ module Io
26165
26556
  opts = HttpClient::Helper.symbolize_keys(incoming)
26166
26557
  HttpClient::Preconditions.require_keys(opts, [:id, :experiments], 'Context')
26167
26558
  @id = HttpClient::Preconditions.assert_class('id', opts.delete(:id), String)
26168
- @experiments = HttpClient::Preconditions.assert_class('experiments', opts.delete(:experiments), Array).map { |v| (x = v; x.is_a?(::Io::Flow::V0::Models::Experiment) ? x : ::Io::Flow::V0::Models::Experiment.new(x)) }
26559
+ @experiments = HttpClient::Preconditions.assert_class('experiments', opts.delete(:experiments), Array).map { |v| (x = v; x.is_a?(::Io::Flow::V0::Models::SessionContextExperiment) ? x : ::Io::Flow::V0::Models::SessionContextExperiment.new(x)) }
26169
26560
  end
26170
26561
 
26171
26562
  def to_json
@@ -26192,7 +26583,7 @@ module Io
26192
26583
  def initialize(incoming={})
26193
26584
  opts = HttpClient::Helper.symbolize_keys(incoming)
26194
26585
  HttpClient::Preconditions.require_keys(opts, [:experiments], 'ContextForm')
26195
- @experiments = HttpClient::Preconditions.assert_class('experiments', opts.delete(:experiments), Array).map { |v| (x = v; x.is_a?(::Io::Flow::V0::Models::Experiment) ? x : ::Io::Flow::V0::Models::Experiment.new(x)) }
26586
+ @experiments = HttpClient::Preconditions.assert_class('experiments', opts.delete(:experiments), Array).map { |v| (x = v; x.is_a?(::Io::Flow::V0::Models::SessionContextExperiment) ? x : ::Io::Flow::V0::Models::SessionContextExperiment.new(x)) }
26196
26587
  end
26197
26588
 
26198
26589
  def to_json
@@ -27322,6 +27713,32 @@ module Io
27322
27713
 
27323
27714
  end
27324
27715
 
27716
+ class CustomerClientToken
27717
+
27718
+ attr_reader :token
27719
+
27720
+ def initialize(incoming={})
27721
+ opts = HttpClient::Helper.symbolize_keys(incoming)
27722
+ HttpClient::Preconditions.require_keys(opts, [:token], 'CustomerClientToken')
27723
+ @token = HttpClient::Preconditions.assert_class('token', opts.delete(:token), String)
27724
+ end
27725
+
27726
+ def to_json
27727
+ JSON.dump(to_hash)
27728
+ end
27729
+
27730
+ def copy(incoming={})
27731
+ CustomerClientToken.new(to_hash.merge(HttpClient::Helper.symbolize_keys(incoming)))
27732
+ end
27733
+
27734
+ def to_hash
27735
+ {
27736
+ :token => token
27737
+ }
27738
+ end
27739
+
27740
+ end
27741
+
27325
27742
  class CustomerDeleted < Event
27326
27743
 
27327
27744
  attr_reader :event_id, :timestamp, :organization, :customer
@@ -27737,6 +28154,34 @@ module Io
27737
28154
 
27738
28155
  end
27739
28156
 
28157
+ class DatetimeWithTimezone
28158
+
28159
+ attr_reader :datetime, :timezone
28160
+
28161
+ def initialize(incoming={})
28162
+ opts = HttpClient::Helper.symbolize_keys(incoming)
28163
+ HttpClient::Preconditions.require_keys(opts, [:datetime, :timezone], 'DatetimeWithTimezone')
28164
+ @datetime = HttpClient::Preconditions.assert_class('datetime', HttpClient::Helper.to_date_time_iso8601(opts.delete(:datetime)), DateTime)
28165
+ @timezone = HttpClient::Preconditions.assert_class('timezone', opts.delete(:timezone), String)
28166
+ end
28167
+
28168
+ def to_json
28169
+ JSON.dump(to_hash)
28170
+ end
28171
+
28172
+ def copy(incoming={})
28173
+ DatetimeWithTimezone.new(to_hash.merge(HttpClient::Helper.symbolize_keys(incoming)))
28174
+ end
28175
+
28176
+ def to_hash
28177
+ {
28178
+ :datetime => datetime,
28179
+ :timezone => timezone
28180
+ }
28181
+ end
28182
+
28183
+ end
28184
+
27740
28185
  class DdpRatecardFee < RatecardFee
27741
28186
 
27742
28187
  attr_reader :amount
@@ -28900,15 +29345,15 @@ module Io
28900
29345
 
28901
29346
  class DiscountRuleSettings
28902
29347
 
28903
- attr_reader :id, :name, :from, :to, :status, :experience_keys, :rule
29348
+ attr_reader :id, :name, :from_with_tz, :to_with_tz, :status, :experience_keys, :rule
28904
29349
 
28905
29350
  def initialize(incoming={})
28906
29351
  opts = HttpClient::Helper.symbolize_keys(incoming)
28907
- HttpClient::Preconditions.require_keys(opts, [:id, :name, :from, :status, :experience_keys, :rule], 'DiscountRuleSettings')
29352
+ HttpClient::Preconditions.require_keys(opts, [:id, :name, :from_with_tz, :status, :experience_keys, :rule], 'DiscountRuleSettings')
28908
29353
  @id = HttpClient::Preconditions.assert_class('id', opts.delete(:id), String)
28909
29354
  @name = HttpClient::Preconditions.assert_class('name', opts.delete(:name), String)
28910
- @from = HttpClient::Preconditions.assert_class('from', HttpClient::Helper.to_date_time_iso8601(opts.delete(:from)), DateTime)
28911
- @to = (x = opts.delete(:to); x.nil? ? nil : HttpClient::Preconditions.assert_class('to', HttpClient::Helper.to_date_time_iso8601(x), DateTime))
29355
+ @from_with_tz = (x = opts.delete(:from_with_tz); x.is_a?(::Io::Flow::V0::Models::DatetimeWithTimezone) ? x : ::Io::Flow::V0::Models::DatetimeWithTimezone.new(x))
29356
+ @to_with_tz = (x = opts.delete(:to_with_tz); x.nil? ? nil : (x = x; x.is_a?(::Io::Flow::V0::Models::DatetimeWithTimezone) ? x : ::Io::Flow::V0::Models::DatetimeWithTimezone.new(x)))
28912
29357
  @status = (x = opts.delete(:status); x.is_a?(::Io::Flow::V0::Models::DiscountRuleStatus) ? x : ::Io::Flow::V0::Models::DiscountRuleStatus.apply(x))
28913
29358
  @experience_keys = HttpClient::Preconditions.assert_class('experience_keys', opts.delete(:experience_keys), Array).map { |v| HttpClient::Preconditions.assert_class('experience_keys', v, String) }
28914
29359
  @rule = (x = opts.delete(:rule); x.is_a?(::Io::Flow::V0::Models::DiscountRule) ? x : ::Io::Flow::V0::Models::DiscountRule.new(x))
@@ -28926,8 +29371,8 @@ module Io
28926
29371
  {
28927
29372
  :id => id,
28928
29373
  :name => name,
28929
- :from => from,
28930
- :to => to,
29374
+ :from_with_tz => from_with_tz.to_hash,
29375
+ :to_with_tz => to_with_tz.nil? ? nil : to_with_tz.to_hash,
28931
29376
  :status => status.value,
28932
29377
  :experience_keys => experience_keys,
28933
29378
  :rule => rule.to_hash
@@ -28938,14 +29383,14 @@ module Io
28938
29383
 
28939
29384
  class DiscountRuleSettingsForm
28940
29385
 
28941
- attr_reader :name, :from, :to, :experience_keys, :rule
29386
+ attr_reader :name, :from_with_tz, :to_with_tz, :experience_keys, :rule
28942
29387
 
28943
29388
  def initialize(incoming={})
28944
29389
  opts = HttpClient::Helper.symbolize_keys(incoming)
28945
- HttpClient::Preconditions.require_keys(opts, [:name, :from, :experience_keys, :rule], 'DiscountRuleSettingsForm')
29390
+ HttpClient::Preconditions.require_keys(opts, [:name, :from_with_tz, :experience_keys, :rule], 'DiscountRuleSettingsForm')
28946
29391
  @name = HttpClient::Preconditions.assert_class('name', opts.delete(:name), String)
28947
- @from = HttpClient::Preconditions.assert_class('from', HttpClient::Helper.to_date_time_iso8601(opts.delete(:from)), DateTime)
28948
- @to = (x = opts.delete(:to); x.nil? ? nil : HttpClient::Preconditions.assert_class('to', HttpClient::Helper.to_date_time_iso8601(x), DateTime))
29392
+ @from_with_tz = (x = opts.delete(:from_with_tz); x.is_a?(::Io::Flow::V0::Models::DatetimeWithTimezone) ? x : ::Io::Flow::V0::Models::DatetimeWithTimezone.new(x))
29393
+ @to_with_tz = (x = opts.delete(:to_with_tz); x.nil? ? nil : (x = x; x.is_a?(::Io::Flow::V0::Models::DatetimeWithTimezone) ? x : ::Io::Flow::V0::Models::DatetimeWithTimezone.new(x)))
28949
29394
  @experience_keys = HttpClient::Preconditions.assert_class('experience_keys', opts.delete(:experience_keys), Array).map { |v| HttpClient::Preconditions.assert_class('experience_keys', v, String) }
28950
29395
  @rule = (x = opts.delete(:rule); x.is_a?(::Io::Flow::V0::Models::DiscountRule) ? x : ::Io::Flow::V0::Models::DiscountRule.new(x))
28951
29396
  end
@@ -28961,8 +29406,8 @@ module Io
28961
29406
  def to_hash
28962
29407
  {
28963
29408
  :name => name,
28964
- :from => from,
28965
- :to => to,
29409
+ :from_with_tz => from_with_tz.to_hash,
29410
+ :to_with_tz => to_with_tz.nil? ? nil : to_with_tz.to_hash,
28966
29411
  :experience_keys => experience_keys,
28967
29412
  :rule => rule.to_hash
28968
29413
  }
@@ -29850,6 +30295,32 @@ module Io
29850
30295
 
29851
30296
  end
29852
30297
 
30298
+ class ExperienceCheckoutConfigurationSettings
30299
+
30300
+ attr_reader :configuration
30301
+
30302
+ def initialize(incoming={})
30303
+ opts = HttpClient::Helper.symbolize_keys(incoming)
30304
+ HttpClient::Preconditions.require_keys(opts, [:configuration], 'ExperienceCheckoutConfigurationSettings')
30305
+ @configuration = (x = opts.delete(:configuration); x.is_a?(::Io::Flow::V0::Models::ExperienceConfigurationReference) ? x : ::Io::Flow::V0::Models::ExperienceConfigurationReference.new(x))
30306
+ end
30307
+
30308
+ def to_json
30309
+ JSON.dump(to_hash)
30310
+ end
30311
+
30312
+ def copy(incoming={})
30313
+ ExperienceCheckoutConfigurationSettings.new(to_hash.merge(HttpClient::Helper.symbolize_keys(incoming)))
30314
+ end
30315
+
30316
+ def to_hash
30317
+ {
30318
+ :configuration => configuration.to_hash
30319
+ }
30320
+ end
30321
+
30322
+ end
30323
+
29853
30324
  class ExperienceCheckoutSettings
29854
30325
 
29855
30326
  attr_reader :id, :experience, :checkout_configuration
@@ -30920,7 +31391,7 @@ module Io
30920
31391
  @delivered_duty = (x = opts.delete(:delivered_duty); x.is_a?(::Io::Flow::V0::Models::DeliveredDutySetting) ? x : ::Io::Flow::V0::Models::DeliveredDutySetting.new(x))
30921
31392
  @pricing_settings = (x = opts.delete(:pricing_settings); x.nil? ? nil : (x = x; x.is_a?(::Io::Flow::V0::Models::PricingSettings) ? x : ::Io::Flow::V0::Models::PricingSettings.new(x)))
30922
31393
  @logistics_settings = (x = opts.delete(:logistics_settings); x.nil? ? nil : (x = x; x.is_a?(::Io::Flow::V0::Models::LogisticsSettings) ? x : ::Io::Flow::V0::Models::LogisticsSettings.new(x)))
30923
- @checkout_settings = (x = opts.delete(:checkout_settings); x.nil? ? nil : (x = x; x.is_a?(::Io::Flow::V0::Models::CheckoutSettings) ? x : ::Io::Flow::V0::Models::CheckoutSettings.new(x)))
31394
+ @checkout_settings = (x = opts.delete(:checkout_settings); x.nil? ? nil : (x = x; x.is_a?(::Io::Flow::V0::Models::ExperienceCheckoutConfigurationSettings) ? x : ::Io::Flow::V0::Models::ExperienceCheckoutConfigurationSettings.new(x)))
30924
31395
  end
30925
31396
 
30926
31397
  def to_json
@@ -31125,35 +31596,6 @@ module Io
31125
31596
 
31126
31597
  end
31127
31598
 
31128
- # Experiment for A/B testing
31129
- class Experiment
31130
-
31131
- attr_reader :key, :variant
31132
-
31133
- def initialize(incoming={})
31134
- opts = HttpClient::Helper.symbolize_keys(incoming)
31135
- HttpClient::Preconditions.require_keys(opts, [:key], 'Experiment')
31136
- @key = HttpClient::Preconditions.assert_class('key', opts.delete(:key), String)
31137
- @variant = (x = opts.delete(:variant); x.nil? ? nil : (x = x; x.is_a?(::Io::Flow::V0::Models::ExperimentVariant) ? x : ::Io::Flow::V0::Models::ExperimentVariant.new(x)))
31138
- end
31139
-
31140
- def to_json
31141
- JSON.dump(to_hash)
31142
- end
31143
-
31144
- def copy(incoming={})
31145
- Experiment.new(to_hash.merge(HttpClient::Helper.symbolize_keys(incoming)))
31146
- end
31147
-
31148
- def to_hash
31149
- {
31150
- :key => key,
31151
- :variant => variant.nil? ? nil : variant.to_hash
31152
- }
31153
- end
31154
-
31155
- end
31156
-
31157
31599
  # Experiment variant. Control or variant
31158
31600
  class ExperimentVariant
31159
31601
 
@@ -31663,11 +32105,12 @@ module Io
31663
32105
  # Rule to apply to enable white-listing and black-listing for an email address.
31664
32106
  class FraudEmailRule
31665
32107
 
31666
- attr_reader :email, :decision
32108
+ attr_reader :id, :email, :decision
31667
32109
 
31668
32110
  def initialize(incoming={})
31669
32111
  opts = HttpClient::Helper.symbolize_keys(incoming)
31670
32112
  HttpClient::Preconditions.require_keys(opts, [:email, :decision], 'FraudEmailRule')
32113
+ @id = (x = opts.delete(:id); x.nil? ? nil : HttpClient::Preconditions.assert_class('id', x, String))
31671
32114
  @email = HttpClient::Preconditions.assert_class('email', opts.delete(:email), String)
31672
32115
  @decision = (x = opts.delete(:decision); x.is_a?(::Io::Flow::V0::Models::FraudEmailRuleDecision) ? x : ::Io::Flow::V0::Models::FraudEmailRuleDecision.apply(x))
31673
32116
  end
@@ -31682,6 +32125,7 @@ module Io
31682
32125
 
31683
32126
  def to_hash
31684
32127
  {
32128
+ :id => id,
31685
32129
  :email => email,
31686
32130
  :decision => decision.value
31687
32131
  }
@@ -32689,16 +33133,17 @@ module Io
32689
33133
 
32690
33134
  end
32691
33135
 
32692
- # Export for landed cost items.
32693
- class HarmonizationLandedCostExportType < ExportType
33136
+ # Exports HS10 code overview details
33137
+ class HarmonizationOverviewExportType < ExportType
32694
33138
 
32695
- attr_reader :items
33139
+ attr_reader :origin, :destination, :sort
32696
33140
 
32697
33141
  def initialize(incoming={})
32698
- super(:discriminator => ExportType::Types::HARMONIZATION_LANDED_COST_EXPORT_TYPE)
33142
+ super(:discriminator => ExportType::Types::HARMONIZATION_OVERVIEW_EXPORT_TYPE)
32699
33143
  opts = HttpClient::Helper.symbolize_keys(incoming)
32700
- HttpClient::Preconditions.require_keys(opts, [:items], 'HarmonizationLandedCostExportType')
32701
- @items = HttpClient::Preconditions.assert_class('items', opts.delete(:items), Array).map { |v| (x = v; x.is_a?(::Io::Flow::V0::Models::LandedCostItem) ? x : ::Io::Flow::V0::Models::LandedCostItem.new(x)) }
33144
+ @origin = (x = opts.delete(:origin); x.nil? ? nil : HttpClient::Preconditions.assert_class('origin', x, String))
33145
+ @destination = (x = opts.delete(:destination); x.nil? ? nil : HttpClient::Preconditions.assert_class('destination', x, String))
33146
+ @sort = (x = opts.delete(:sort); x.nil? ? nil : HttpClient::Preconditions.assert_class('sort', x, String))
32702
33147
  end
32703
33148
 
32704
33149
  def to_json
@@ -32706,27 +33151,27 @@ module Io
32706
33151
  end
32707
33152
 
32708
33153
  def copy(incoming={})
32709
- HarmonizationLandedCostExportType.new(subtype_to_hash.merge(HttpClient::Helper.symbolize_keys(incoming)))
33154
+ HarmonizationOverviewExportType.new(subtype_to_hash.merge(HttpClient::Helper.symbolize_keys(incoming)))
32710
33155
  end
32711
33156
 
32712
33157
  def subtype_to_hash
32713
33158
  {
32714
- :items => items.map { |o| o.to_hash }
33159
+ :origin => origin,
33160
+ :destination => destination,
33161
+ :sort => sort
32715
33162
  }
32716
33163
  end
32717
33164
 
32718
33165
  end
32719
33166
 
32720
- # Exports HS10 code overview details
32721
- class HarmonizationOverviewExportType < ExportType
33167
+ # Exports harmonization tariff codes for all destinations
33168
+ class HarmonizationTariffCodesExportType < ExportType
32722
33169
 
32723
- attr_reader :origin, :destination, :sort
33170
+ attr_reader :sort
32724
33171
 
32725
33172
  def initialize(incoming={})
32726
- super(:discriminator => ExportType::Types::HARMONIZATION_OVERVIEW_EXPORT_TYPE)
33173
+ super(:discriminator => ExportType::Types::HARMONIZATION_TARIFF_CODES_EXPORT_TYPE)
32727
33174
  opts = HttpClient::Helper.symbolize_keys(incoming)
32728
- @origin = (x = opts.delete(:origin); x.nil? ? nil : HttpClient::Preconditions.assert_class('origin', x, String))
32729
- @destination = (x = opts.delete(:destination); x.nil? ? nil : HttpClient::Preconditions.assert_class('destination', x, String))
32730
33175
  @sort = (x = opts.delete(:sort); x.nil? ? nil : HttpClient::Preconditions.assert_class('sort', x, String))
32731
33176
  end
32732
33177
 
@@ -32735,13 +33180,11 @@ module Io
32735
33180
  end
32736
33181
 
32737
33182
  def copy(incoming={})
32738
- HarmonizationOverviewExportType.new(subtype_to_hash.merge(HttpClient::Helper.symbolize_keys(incoming)))
33183
+ HarmonizationTariffCodesExportType.new(subtype_to_hash.merge(HttpClient::Helper.symbolize_keys(incoming)))
32739
33184
  end
32740
33185
 
32741
33186
  def subtype_to_hash
32742
33187
  {
32743
- :origin => origin,
32744
- :destination => destination,
32745
33188
  :sort => sort
32746
33189
  }
32747
33190
  end
@@ -34613,7 +35056,7 @@ module Io
34613
35056
  @email = HttpClient::Preconditions.assert_class('email', opts.delete(:email), String)
34614
35057
  @name = (x = opts.delete(:name); x.is_a?(::Io::Flow::V0::Models::Name) ? x : ::Io::Flow::V0::Models::Name.new(x))
34615
35058
  @role = (x = opts.delete(:role); x.nil? ? nil : (x = x; x.is_a?(::Io::Flow::V0::Models::Role) ? x : ::Io::Flow::V0::Models::Role.apply(x)))
34616
- @roles = (x = opts.delete(:roles); x.nil? ? nil : HttpClient::Preconditions.assert_class('roles', x, Array).map { |v| (x = v; x.is_a?(::Io::Flow::V0::Models::FlowRole) ? x : ::Io::Flow::V0::Models::FlowRole.from_json(x)) })
35059
+ @roles = (x = opts.delete(:roles); x.nil? ? nil : HttpClient::Preconditions.assert_class('roles', x, Array).map { |v| (x = v; x.is_a?(::Io::Flow::V0::Models::FlowRole) ? x : ::Io::Flow::V0::Models::FlowRole.apply(x)) })
34617
35060
  @expiration = HttpClient::Preconditions.assert_class('expiration', HttpClient::Helper.to_date_time_iso8601(opts.delete(:expiration)), DateTime)
34618
35061
  end
34619
35062
 
@@ -34632,7 +35075,7 @@ module Io
34632
35075
  :email => email,
34633
35076
  :name => name.to_hash,
34634
35077
  :role => role.nil? ? nil : role.value,
34635
- :roles => roles.nil? ? nil : roles.map { |o| o.to_hash },
35078
+ :roles => roles.nil? ? nil : roles.map { |o| o.value },
34636
35079
  :expiration => expiration
34637
35080
  }
34638
35081
  end
@@ -34679,7 +35122,7 @@ module Io
34679
35122
  @email = HttpClient::Preconditions.assert_class('email', opts.delete(:email), String)
34680
35123
  @name = (x = opts.delete(:name); x.nil? ? nil : (x = x; x.is_a?(::Io::Flow::V0::Models::Name) ? x : ::Io::Flow::V0::Models::Name.new(x)))
34681
35124
  @role = (x = (x = opts.delete(:role); x.nil? ? "member" : x); x.is_a?(::Io::Flow::V0::Models::Role) ? x : ::Io::Flow::V0::Models::Role.apply(x))
34682
- @roles = (x = opts.delete(:roles); x.nil? ? nil : HttpClient::Preconditions.assert_class('roles', x, Array).map { |v| (x = v; x.is_a?(::Io::Flow::V0::Models::FlowRole) ? x : ::Io::Flow::V0::Models::FlowRole.from_json(x)) })
35125
+ @roles = (x = opts.delete(:roles); x.nil? ? nil : HttpClient::Preconditions.assert_class('roles', x, Array).map { |v| (x = v; x.is_a?(::Io::Flow::V0::Models::FlowRole) ? x : ::Io::Flow::V0::Models::FlowRole.apply(x)) })
34683
35126
  end
34684
35127
 
34685
35128
  def to_json
@@ -34696,7 +35139,7 @@ module Io
34696
35139
  :email => email,
34697
35140
  :name => name.nil? ? nil : name.to_hash,
34698
35141
  :role => role.value,
34699
- :roles => roles.nil? ? nil : roles.map { |o| o.to_hash }
35142
+ :roles => roles.nil? ? nil : roles.map { |o| o.value }
34700
35143
  }
34701
35144
  end
34702
35145
 
@@ -37199,7 +37642,7 @@ module Io
37199
37642
  @organization = (x = opts.delete(:organization); x.is_a?(::Io::Flow::V0::Models::ExpandableOrganization) ? x : ::Io::Flow::V0::Models::ExpandableOrganization.from_json(x))
37200
37643
  @user = (x = opts.delete(:user); x.is_a?(::Io::Flow::V0::Models::ExpandableUser) ? x : ::Io::Flow::V0::Models::ExpandableUser.from_json(x))
37201
37644
  @role = (x = opts.delete(:role); x.nil? ? nil : (x = x; x.is_a?(::Io::Flow::V0::Models::Role) ? x : ::Io::Flow::V0::Models::Role.apply(x)))
37202
- @roles = HttpClient::Preconditions.assert_class('roles', opts.delete(:roles), Array).map { |v| (x = v; x.is_a?(::Io::Flow::V0::Models::FlowRole) ? x : ::Io::Flow::V0::Models::FlowRole.from_json(x)) }
37645
+ @roles = HttpClient::Preconditions.assert_class('roles', opts.delete(:roles), Array).map { |v| (x = v; x.is_a?(::Io::Flow::V0::Models::FlowRole) ? x : ::Io::Flow::V0::Models::FlowRole.apply(x)) }
37203
37646
  end
37204
37647
 
37205
37648
  def to_json
@@ -37216,7 +37659,7 @@ module Io
37216
37659
  :organization => organization.to_hash,
37217
37660
  :user => user.to_hash,
37218
37661
  :role => role.nil? ? nil : role.value,
37219
- :roles => roles.map { |o| o.to_hash }
37662
+ :roles => roles.map { |o| o.value }
37220
37663
  }
37221
37664
  end
37222
37665
 
@@ -37264,7 +37707,7 @@ module Io
37264
37707
  @organization = HttpClient::Preconditions.assert_class('organization', opts.delete(:organization), String)
37265
37708
  @user = HttpClient::Preconditions.assert_class('user', opts.delete(:user), String)
37266
37709
  @role = (x = (x = opts.delete(:role); x.nil? ? "member" : x); x.is_a?(::Io::Flow::V0::Models::Role) ? x : ::Io::Flow::V0::Models::Role.apply(x))
37267
- @roles = HttpClient::Preconditions.assert_class('roles', (x = opts.delete(:roles); x.nil? ? [] : x), Array).map { |v| (x = v; x.is_a?(::Io::Flow::V0::Models::FlowRole) ? x : ::Io::Flow::V0::Models::FlowRole.from_json(x)) }
37710
+ @roles = HttpClient::Preconditions.assert_class('roles', (x = opts.delete(:roles); x.nil? ? [] : x), Array).map { |v| (x = v; x.is_a?(::Io::Flow::V0::Models::FlowRole) ? x : ::Io::Flow::V0::Models::FlowRole.apply(x)) }
37268
37711
  end
37269
37712
 
37270
37713
  def to_json
@@ -37280,7 +37723,7 @@ module Io
37280
37723
  :organization => organization,
37281
37724
  :user => user,
37282
37725
  :role => role.value,
37283
- :roles => roles.map { |o| o.to_hash }
37726
+ :roles => roles.map { |o| o.value }
37284
37727
  }
37285
37728
  end
37286
37729
 
@@ -37294,7 +37737,7 @@ module Io
37294
37737
  def initialize(incoming={})
37295
37738
  opts = HttpClient::Helper.symbolize_keys(incoming)
37296
37739
  @role = (x = (x = opts.delete(:role); x.nil? ? "member" : x); x.is_a?(::Io::Flow::V0::Models::Role) ? x : ::Io::Flow::V0::Models::Role.apply(x))
37297
- @roles = HttpClient::Preconditions.assert_class('roles', (x = opts.delete(:roles); x.nil? ? [] : x), Array).map { |v| (x = v; x.is_a?(::Io::Flow::V0::Models::FlowRole) ? x : ::Io::Flow::V0::Models::FlowRole.from_json(x)) }
37740
+ @roles = HttpClient::Preconditions.assert_class('roles', (x = opts.delete(:roles); x.nil? ? [] : x), Array).map { |v| (x = v; x.is_a?(::Io::Flow::V0::Models::FlowRole) ? x : ::Io::Flow::V0::Models::FlowRole.apply(x)) }
37298
37741
  end
37299
37742
 
37300
37743
  def to_json
@@ -37308,7 +37751,7 @@ module Io
37308
37751
  def to_hash
37309
37752
  {
37310
37753
  :role => role.value,
37311
- :roles => roles.map { |o| o.to_hash }
37754
+ :roles => roles.map { |o| o.value }
37312
37755
  }
37313
37756
  end
37314
37757
 
@@ -42016,7 +42459,7 @@ module Io
42016
42459
  # metadata required for processing
42017
42460
  class PaymentMethod
42018
42461
 
42019
- attr_reader :id, :type, :name, :images, :regions
42462
+ attr_reader :id, :type, :name, :images, :regions, :capabilities
42020
42463
 
42021
42464
  def initialize(incoming={})
42022
42465
  opts = HttpClient::Helper.symbolize_keys(incoming)
@@ -42026,6 +42469,7 @@ module Io
42026
42469
  @name = HttpClient::Preconditions.assert_class('name', opts.delete(:name), String)
42027
42470
  @images = (x = opts.delete(:images); x.is_a?(::Io::Flow::V0::Models::PaymentMethodImages) ? x : ::Io::Flow::V0::Models::PaymentMethodImages.new(x))
42028
42471
  @regions = HttpClient::Preconditions.assert_class('regions', opts.delete(:regions), Array).map { |v| HttpClient::Preconditions.assert_class('regions', v, String) }
42472
+ @capabilities = (x = opts.delete(:capabilities); x.nil? ? nil : HttpClient::Preconditions.assert_class('capabilities', x, Array).map { |v| (x = v; x.is_a?(::Io::Flow::V0::Models::PaymentMethodCapability) ? x : ::Io::Flow::V0::Models::PaymentMethodCapability.apply(x)) })
42029
42473
  end
42030
42474
 
42031
42475
  def to_json
@@ -42042,7 +42486,8 @@ module Io
42042
42486
  :type => type.value,
42043
42487
  :name => name,
42044
42488
  :images => images.to_hash,
42045
- :regions => regions
42489
+ :regions => regions,
42490
+ :capabilities => capabilities.nil? ? nil : capabilities.map { |o| o.value }
42046
42491
  }
42047
42492
  end
42048
42493
 
@@ -42501,7 +42946,7 @@ module Io
42501
42946
  HttpClient::Preconditions.require_keys(opts, [:authentication_technique, :roles, :behaviors, :routes], 'PermissionCheck')
42502
42947
  @authentication_technique = (x = opts.delete(:authentication_technique); x.is_a?(::Io::Flow::V0::Models::AuthenticationTechnique) ? x : ::Io::Flow::V0::Models::AuthenticationTechnique.apply(x))
42503
42948
  @user = (x = opts.delete(:user); x.nil? ? nil : (x = x; x.is_a?(::Io::Flow::V0::Models::ExpandableUser) ? x : ::Io::Flow::V0::Models::ExpandableUser.from_json(x)))
42504
- @roles = HttpClient::Preconditions.assert_class('roles', opts.delete(:roles), Array).map { |v| (x = v; x.is_a?(::Io::Flow::V0::Models::FlowRole) ? x : ::Io::Flow::V0::Models::FlowRole.from_json(x)) }
42949
+ @roles = HttpClient::Preconditions.assert_class('roles', opts.delete(:roles), Array).map { |v| (x = v; x.is_a?(::Io::Flow::V0::Models::FlowRole) ? x : ::Io::Flow::V0::Models::FlowRole.apply(x)) }
42505
42950
  @behaviors = HttpClient::Preconditions.assert_class('behaviors', opts.delete(:behaviors), Array).map { |v| (x = v; x.is_a?(::Io::Flow::V0::Models::FlowBehavior) ? x : ::Io::Flow::V0::Models::FlowBehavior.apply(x)) }
42506
42951
  @routes = HttpClient::Preconditions.assert_class('routes', opts.delete(:routes), Array).map { |v| (x = v; x.is_a?(::Io::Flow::V0::Models::PermittedRoute) ? x : ::Io::Flow::V0::Models::PermittedRoute.new(x)) }
42507
42952
  end
@@ -42518,7 +42963,7 @@ module Io
42518
42963
  {
42519
42964
  :authentication_technique => authentication_technique.value,
42520
42965
  :user => user.nil? ? nil : user.to_hash,
42521
- :roles => roles.map { |o| o.to_hash },
42966
+ :roles => roles.map { |o| o.value },
42522
42967
  :behaviors => behaviors.map { |o| o.value },
42523
42968
  :routes => routes.map { |o| o.to_hash }
42524
42969
  }
@@ -42536,7 +42981,7 @@ module Io
42536
42981
  HttpClient::Preconditions.require_keys(opts, [:code, :messages], 'PermissionError')
42537
42982
  @code = (x = opts.delete(:code); x.is_a?(::Io::Flow::V0::Models::GenericErrorCode) ? x : ::Io::Flow::V0::Models::GenericErrorCode.apply(x))
42538
42983
  @messages = HttpClient::Preconditions.assert_class('messages', opts.delete(:messages), Array).map { |v| HttpClient::Preconditions.assert_class('messages', v, String) }
42539
- @granting_roles = (x = opts.delete(:granting_roles); x.nil? ? nil : HttpClient::Preconditions.assert_class('granting_roles', x, Array).map { |v| (x = v; x.is_a?(::Io::Flow::V0::Models::FlowRole) ? x : ::Io::Flow::V0::Models::FlowRole.from_json(x)) })
42984
+ @granting_roles = (x = opts.delete(:granting_roles); x.nil? ? nil : HttpClient::Preconditions.assert_class('granting_roles', x, Array).map { |v| (x = v; x.is_a?(::Io::Flow::V0::Models::FlowRole) ? x : ::Io::Flow::V0::Models::FlowRole.apply(x)) })
42540
42985
  @admin_users = (x = opts.delete(:admin_users); x.nil? ? nil : HttpClient::Preconditions.assert_class('admin_users', x, Array).map { |v| (x = v; x.is_a?(::Io::Flow::V0::Models::User) ? x : ::Io::Flow::V0::Models::User.new(x)) })
42541
42986
  end
42542
42987
 
@@ -42552,7 +42997,7 @@ module Io
42552
42997
  {
42553
42998
  :code => code.value,
42554
42999
  :messages => messages,
42555
- :granting_roles => granting_roles.nil? ? nil : granting_roles.map { |o| o.to_hash },
43000
+ :granting_roles => granting_roles.nil? ? nil : granting_roles.map { |o| o.value },
42556
43001
  :admin_users => admin_users.nil? ? nil : admin_users.map { |o| o.to_hash }
42557
43002
  }
42558
43003
  end
@@ -44933,7 +45378,7 @@ module Io
44933
45378
  opts = HttpClient::Helper.symbolize_keys(incoming)
44934
45379
  HttpClient::Preconditions.require_keys(opts, [:id, :ratecard, :currency, :delivered_duty, :shipment_window, :destination, :dim_factor, :fees, :origin, :service, :rates, :rounding, :weight_unit, :distance_unit], 'RatecardLane')
44935
45380
  @id = HttpClient::Preconditions.assert_class('id', opts.delete(:id), String)
44936
- @ratecard = (x = opts.delete(:ratecard); x.is_a?(::Io::Flow::V0::Models::RatecardReference) ? x : ::Io::Flow::V0::Models::RatecardReference.new(x))
45381
+ @ratecard = (x = opts.delete(:ratecard); x.is_a?(::Io::Flow::V0::Models::RatecardSummary) ? x : ::Io::Flow::V0::Models::RatecardSummary.new(x))
44937
45382
  @currency = HttpClient::Preconditions.assert_class('currency', opts.delete(:currency), String)
44938
45383
  @delivered_duty = (x = opts.delete(:delivered_duty); x.is_a?(::Io::Flow::V0::Models::DeliveredDuty) ? x : ::Io::Flow::V0::Models::DeliveredDuty.apply(x))
44939
45384
  @shipment_window = (x = opts.delete(:shipment_window); x.is_a?(::Io::Flow::V0::Models::ShipmentWindow) ? x : ::Io::Flow::V0::Models::ShipmentWindow.new(x))
@@ -45376,6 +45821,36 @@ module Io
45376
45821
 
45377
45822
  end
45378
45823
 
45824
+ class RatecardSummary
45825
+
45826
+ attr_reader :id, :number, :ratecard_owner
45827
+
45828
+ def initialize(incoming={})
45829
+ opts = HttpClient::Helper.symbolize_keys(incoming)
45830
+ HttpClient::Preconditions.require_keys(opts, [:id, :number, :ratecard_owner], 'RatecardSummary')
45831
+ @id = HttpClient::Preconditions.assert_class('id', opts.delete(:id), String)
45832
+ @number = HttpClient::Preconditions.assert_class('number', opts.delete(:number), String)
45833
+ @ratecard_owner = (x = opts.delete(:ratecard_owner); x.is_a?(::Io::Flow::V0::Models::RatecardOwner) ? x : ::Io::Flow::V0::Models::RatecardOwner.apply(x))
45834
+ end
45835
+
45836
+ def to_json
45837
+ JSON.dump(to_hash)
45838
+ end
45839
+
45840
+ def copy(incoming={})
45841
+ RatecardSummary.new(to_hash.merge(HttpClient::Helper.symbolize_keys(incoming)))
45842
+ end
45843
+
45844
+ def to_hash
45845
+ {
45846
+ :id => id,
45847
+ :number => number,
45848
+ :ratecard_owner => ratecard_owner.value
45849
+ }
45850
+ end
45851
+
45852
+ end
45853
+
45379
45854
  class RatecardUpserted < Event
45380
45855
 
45381
45856
  attr_reader :event_id, :timestamp, :organization, :ratecard
@@ -47201,7 +47676,7 @@ module Io
47201
47676
  @method = (x = opts.delete(:method); x.is_a?(::Io::Flow::V0::Models::PermittedHttpMethod) ? x : ::Io::Flow::V0::Models::PermittedHttpMethod.apply(x))
47202
47677
  @path = HttpClient::Preconditions.assert_class('path', opts.delete(:path), String)
47203
47678
  @authentication_techniques = HttpClient::Preconditions.assert_class('authentication_techniques', opts.delete(:authentication_techniques), Array).map { |v| (x = v; x.is_a?(::Io::Flow::V0::Models::AuthenticationTechnique) ? x : ::Io::Flow::V0::Models::AuthenticationTechnique.apply(x)) }
47204
- @roles = HttpClient::Preconditions.assert_class('roles', opts.delete(:roles), Array).map { |v| (x = v; x.is_a?(::Io::Flow::V0::Models::FlowRole) ? x : ::Io::Flow::V0::Models::FlowRole.from_json(x)) }
47679
+ @roles = HttpClient::Preconditions.assert_class('roles', opts.delete(:roles), Array).map { |v| (x = v; x.is_a?(::Io::Flow::V0::Models::FlowRole) ? x : ::Io::Flow::V0::Models::FlowRole.apply(x)) }
47205
47680
  end
47206
47681
 
47207
47682
  def to_json
@@ -47217,7 +47692,7 @@ module Io
47217
47692
  :method => method.value,
47218
47693
  :path => path,
47219
47694
  :authentication_techniques => authentication_techniques.map { |o| o.value },
47220
- :roles => roles.map { |o| o.to_hash }
47695
+ :roles => roles.map { |o| o.value }
47221
47696
  }
47222
47697
  end
47223
47698
 
@@ -47517,6 +47992,35 @@ module Io
47517
47992
 
47518
47993
  end
47519
47994
 
47995
+ # Experiment for A/B testing
47996
+ class SessionContextExperiment
47997
+
47998
+ attr_reader :key, :variant
47999
+
48000
+ def initialize(incoming={})
48001
+ opts = HttpClient::Helper.symbolize_keys(incoming)
48002
+ HttpClient::Preconditions.require_keys(opts, [:key], 'SessionContextExperiment')
48003
+ @key = HttpClient::Preconditions.assert_class('key', opts.delete(:key), String)
48004
+ @variant = (x = opts.delete(:variant); x.nil? ? nil : (x = x; x.is_a?(::Io::Flow::V0::Models::ExperimentVariant) ? x : ::Io::Flow::V0::Models::ExperimentVariant.new(x)))
48005
+ end
48006
+
48007
+ def to_json
48008
+ JSON.dump(to_hash)
48009
+ end
48010
+
48011
+ def copy(incoming={})
48012
+ SessionContextExperiment.new(to_hash.merge(HttpClient::Helper.symbolize_keys(incoming)))
48013
+ end
48014
+
48015
+ def to_hash
48016
+ {
48017
+ :key => key,
48018
+ :variant => variant.nil? ? nil : variant.to_hash
48019
+ }
48020
+ end
48021
+
48022
+ end
48023
+
47520
48024
  class SessionCurrencyFormat
47521
48025
 
47522
48026
  attr_reader :symbol, :label_formatters
@@ -49170,7 +49674,7 @@ module Io
49170
49674
  def initialize(incoming={})
49171
49675
  opts = HttpClient::Helper.symbolize_keys(incoming)
49172
49676
  HttpClient::Preconditions.require_keys(opts, [:cart], 'ShopifyCartConversionShopifyCart')
49173
- @cart = (x = opts.delete(:cart); x.is_a?(::Io::Flow::Shopify::External::V0::Models::ShopifyCart) ? x : ::Io::Flow::Shopify::External::V0::Models::ShopifyCart.new(x))
49677
+ @cart = (x = opts.delete(:cart); x.is_a?(::Io::Flow::Shopify::External::V0::Models::ShopifyExternalCart) ? x : ::Io::Flow::Shopify::External::V0::Models::ShopifyExternalCart.new(x))
49174
49678
  end
49175
49679
 
49176
49680
  def to_json
@@ -50881,10 +51385,11 @@ module Io
50881
51385
  end
50882
51386
 
50883
51387
  # Minimal form to create a shipping label. Origin and destination are assumed
50884
- # based on a given order's center and final shipping destination
51388
+ # based on a given order's center and final shipping destination, if no center
51389
+ # key is provided
50885
51390
  class SummaryShippingLabelForm < ShippingLabelForm
50886
51391
 
50887
- attr_reader :order_number, :items
51392
+ attr_reader :order_number, :items, :center_key
50888
51393
 
50889
51394
  def initialize(incoming={})
50890
51395
  super(:discriminator => ShippingLabelForm::Types::SUMMARY_SHIPPING_LABEL_FORM)
@@ -50892,6 +51397,7 @@ module Io
50892
51397
  HttpClient::Preconditions.require_keys(opts, [:order_number, :items], 'SummaryShippingLabelForm')
50893
51398
  @order_number = HttpClient::Preconditions.assert_class('order_number', opts.delete(:order_number), String)
50894
51399
  @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)) }
51400
+ @center_key = (x = opts.delete(:center_key); x.nil? ? nil : HttpClient::Preconditions.assert_class('center_key', x, String))
50895
51401
  end
50896
51402
 
50897
51403
  def to_json
@@ -50905,7 +51411,8 @@ module Io
50905
51411
  def subtype_to_hash
50906
51412
  {
50907
51413
  :order_number => order_number,
50908
- :items => items.map { |o| o.to_hash }
51414
+ :items => items.map { |o| o.to_hash },
51415
+ :center_key => center_key
50909
51416
  }
50910
51417
  end
50911
51418
 
@@ -51001,6 +51508,352 @@ module Io
51001
51508
 
51002
51509
  end
51003
51510
 
51511
+ # Represents a duration of time with the ability to convert to a scala
51512
+ # FiniteDuration.
51513
+ class SyncDuration
51514
+
51515
+ attr_reader :unit, :value
51516
+
51517
+ def initialize(incoming={})
51518
+ opts = HttpClient::Helper.symbolize_keys(incoming)
51519
+ HttpClient::Preconditions.require_keys(opts, [:unit, :value], 'SyncDuration')
51520
+ @unit = (x = opts.delete(:unit); x.is_a?(::Io::Flow::V0::Models::SyncUnitOfTime) ? x : ::Io::Flow::V0::Models::SyncUnitOfTime.apply(x))
51521
+ @value = HttpClient::Preconditions.assert_class('value', opts.delete(:value), Integer)
51522
+ end
51523
+
51524
+ def to_json
51525
+ JSON.dump(to_hash)
51526
+ end
51527
+
51528
+ def copy(incoming={})
51529
+ SyncDuration.new(to_hash.merge(HttpClient::Helper.symbolize_keys(incoming)))
51530
+ end
51531
+
51532
+ def to_hash
51533
+ {
51534
+ :unit => unit.value,
51535
+ :value => value
51536
+ }
51537
+ end
51538
+
51539
+ end
51540
+
51541
+ class SyncPendingRecord
51542
+
51543
+ attr_reader :id, :stream, :value, :system
51544
+
51545
+ def initialize(incoming={})
51546
+ opts = HttpClient::Helper.symbolize_keys(incoming)
51547
+ HttpClient::Preconditions.require_keys(opts, [:id, :stream, :value, :system], 'SyncPendingRecord')
51548
+ @id = HttpClient::Preconditions.assert_class('id', opts.delete(:id), String)
51549
+ @stream = (x = opts.delete(:stream); x.is_a?(::Io::Flow::V0::Models::SyncStreamReference) ? x : ::Io::Flow::V0::Models::SyncStreamReference.new(x))
51550
+ @value = HttpClient::Preconditions.assert_class('value', opts.delete(:value), String)
51551
+ @system = HttpClient::Preconditions.assert_class('system', opts.delete(:system), String)
51552
+ end
51553
+
51554
+ def to_json
51555
+ JSON.dump(to_hash)
51556
+ end
51557
+
51558
+ def copy(incoming={})
51559
+ SyncPendingRecord.new(to_hash.merge(HttpClient::Helper.symbolize_keys(incoming)))
51560
+ end
51561
+
51562
+ def to_hash
51563
+ {
51564
+ :id => id,
51565
+ :stream => stream.to_hash,
51566
+ :value => value,
51567
+ :system => system
51568
+ }
51569
+ end
51570
+
51571
+ end
51572
+
51573
+ class SyncRecord
51574
+
51575
+ attr_reader :id, :system, :value, :stream
51576
+
51577
+ def initialize(incoming={})
51578
+ opts = HttpClient::Helper.symbolize_keys(incoming)
51579
+ HttpClient::Preconditions.require_keys(opts, [:id, :system, :value, :stream], 'SyncRecord')
51580
+ @id = HttpClient::Preconditions.assert_class('id', opts.delete(:id), String)
51581
+ @system = HttpClient::Preconditions.assert_class('system', opts.delete(:system), String)
51582
+ @value = HttpClient::Preconditions.assert_class('value', opts.delete(:value), String)
51583
+ @stream = (x = opts.delete(:stream); x.is_a?(::Io::Flow::V0::Models::SyncStreamReference) ? x : ::Io::Flow::V0::Models::SyncStreamReference.new(x))
51584
+ end
51585
+
51586
+ def to_json
51587
+ JSON.dump(to_hash)
51588
+ end
51589
+
51590
+ def copy(incoming={})
51591
+ SyncRecord.new(to_hash.merge(HttpClient::Helper.symbolize_keys(incoming)))
51592
+ end
51593
+
51594
+ def to_hash
51595
+ {
51596
+ :id => id,
51597
+ :system => system,
51598
+ :value => value,
51599
+ :stream => stream.to_hash
51600
+ }
51601
+ end
51602
+
51603
+ end
51604
+
51605
+ class SyncRecordFailure
51606
+
51607
+ attr_reader :id, :stream, :value, :system, :reason, :attributes
51608
+
51609
+ def initialize(incoming={})
51610
+ opts = HttpClient::Helper.symbolize_keys(incoming)
51611
+ HttpClient::Preconditions.require_keys(opts, [:id, :stream, :value, :system, :reason], 'SyncRecordFailure')
51612
+ @id = HttpClient::Preconditions.assert_class('id', opts.delete(:id), String)
51613
+ @stream = (x = opts.delete(:stream); x.is_a?(::Io::Flow::V0::Models::SyncStreamReference) ? x : ::Io::Flow::V0::Models::SyncStreamReference.new(x))
51614
+ @value = HttpClient::Preconditions.assert_class('value', opts.delete(:value), String)
51615
+ @system = HttpClient::Preconditions.assert_class('system', opts.delete(:system), String)
51616
+ @reason = (x = opts.delete(:reason); x.is_a?(::Io::Flow::V0::Models::SyncRecordFailureReason) ? x : ::Io::Flow::V0::Models::SyncRecordFailureReason.apply(x))
51617
+ @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 })
51618
+ end
51619
+
51620
+ def to_json
51621
+ JSON.dump(to_hash)
51622
+ end
51623
+
51624
+ def copy(incoming={})
51625
+ SyncRecordFailure.new(to_hash.merge(HttpClient::Helper.symbolize_keys(incoming)))
51626
+ end
51627
+
51628
+ def to_hash
51629
+ {
51630
+ :id => id,
51631
+ :stream => stream.to_hash,
51632
+ :value => value,
51633
+ :system => system,
51634
+ :reason => reason.value,
51635
+ :attributes => attributes.nil? ? nil : attributes
51636
+ }
51637
+ end
51638
+
51639
+ end
51640
+
51641
+ class SyncRecordFailureForm
51642
+
51643
+ attr_reader :stream_key, :value, :system, :reason, :attributes
51644
+
51645
+ def initialize(incoming={})
51646
+ opts = HttpClient::Helper.symbolize_keys(incoming)
51647
+ HttpClient::Preconditions.require_keys(opts, [:stream_key, :value, :system, :reason], 'SyncRecordFailureForm')
51648
+ @stream_key = HttpClient::Preconditions.assert_class('stream_key', opts.delete(:stream_key), String)
51649
+ @value = HttpClient::Preconditions.assert_class('value', opts.delete(:value), String)
51650
+ @system = HttpClient::Preconditions.assert_class('system', opts.delete(:system), String)
51651
+ @reason = (x = opts.delete(:reason); x.is_a?(::Io::Flow::V0::Models::SyncRecordFailureReason) ? x : ::Io::Flow::V0::Models::SyncRecordFailureReason.apply(x))
51652
+ @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 })
51653
+ end
51654
+
51655
+ def to_json
51656
+ JSON.dump(to_hash)
51657
+ end
51658
+
51659
+ def copy(incoming={})
51660
+ SyncRecordFailureForm.new(to_hash.merge(HttpClient::Helper.symbolize_keys(incoming)))
51661
+ end
51662
+
51663
+ def to_hash
51664
+ {
51665
+ :stream_key => stream_key,
51666
+ :value => value,
51667
+ :system => system,
51668
+ :reason => reason.value,
51669
+ :attributes => attributes.nil? ? nil : attributes
51670
+ }
51671
+ end
51672
+
51673
+ end
51674
+
51675
+ class SyncRecordForm
51676
+
51677
+ attr_reader :stream_key, :system, :value
51678
+
51679
+ def initialize(incoming={})
51680
+ opts = HttpClient::Helper.symbolize_keys(incoming)
51681
+ HttpClient::Preconditions.require_keys(opts, [:stream_key, :system, :value], 'SyncRecordForm')
51682
+ @stream_key = HttpClient::Preconditions.assert_class('stream_key', opts.delete(:stream_key), String)
51683
+ @system = HttpClient::Preconditions.assert_class('system', opts.delete(:system), String)
51684
+ @value = HttpClient::Preconditions.assert_class('value', opts.delete(:value), String)
51685
+ end
51686
+
51687
+ def to_json
51688
+ JSON.dump(to_hash)
51689
+ end
51690
+
51691
+ def copy(incoming={})
51692
+ SyncRecordForm.new(to_hash.merge(HttpClient::Helper.symbolize_keys(incoming)))
51693
+ end
51694
+
51695
+ def to_hash
51696
+ {
51697
+ :stream_key => stream_key,
51698
+ :system => system,
51699
+ :value => value
51700
+ }
51701
+ end
51702
+
51703
+ end
51704
+
51705
+ class SyncStream
51706
+
51707
+ attr_reader :id, :key, :type, :systems, :settings
51708
+
51709
+ def initialize(incoming={})
51710
+ opts = HttpClient::Helper.symbolize_keys(incoming)
51711
+ HttpClient::Preconditions.require_keys(opts, [:id, :key, :type, :systems, :settings], 'SyncStream')
51712
+ @id = HttpClient::Preconditions.assert_class('id', opts.delete(:id), String)
51713
+ @key = HttpClient::Preconditions.assert_class('key', opts.delete(:key), String)
51714
+ @type = (x = opts.delete(:type); x.is_a?(::Io::Flow::V0::Models::SyncStreamType) ? x : ::Io::Flow::V0::Models::SyncStreamType.apply(x))
51715
+ @systems = HttpClient::Preconditions.assert_class('systems', opts.delete(:systems), Array).map { |v| HttpClient::Preconditions.assert_class('systems', v, String) }
51716
+ @settings = (x = opts.delete(:settings); x.is_a?(::Io::Flow::V0::Models::SyncStreamSettings) ? x : ::Io::Flow::V0::Models::SyncStreamSettings.new(x))
51717
+ end
51718
+
51719
+ def to_json
51720
+ JSON.dump(to_hash)
51721
+ end
51722
+
51723
+ def copy(incoming={})
51724
+ SyncStream.new(to_hash.merge(HttpClient::Helper.symbolize_keys(incoming)))
51725
+ end
51726
+
51727
+ def to_hash
51728
+ {
51729
+ :id => id,
51730
+ :key => key,
51731
+ :type => type.value,
51732
+ :systems => systems,
51733
+ :settings => settings.to_hash
51734
+ }
51735
+ end
51736
+
51737
+ end
51738
+
51739
+ class SyncStreamForm
51740
+
51741
+ attr_reader :type, :systems, :settings
51742
+
51743
+ def initialize(incoming={})
51744
+ opts = HttpClient::Helper.symbolize_keys(incoming)
51745
+ HttpClient::Preconditions.require_keys(opts, [:type, :systems], 'SyncStreamForm')
51746
+ @type = (x = opts.delete(:type); x.is_a?(::Io::Flow::V0::Models::SyncStreamType) ? x : ::Io::Flow::V0::Models::SyncStreamType.apply(x))
51747
+ @systems = HttpClient::Preconditions.assert_class('systems', opts.delete(:systems), Array).map { |v| HttpClient::Preconditions.assert_class('systems', v, String) }
51748
+ @settings = (x = opts.delete(:settings); x.nil? ? nil : (x = x; x.is_a?(::Io::Flow::V0::Models::SyncStreamSettingsForm) ? x : ::Io::Flow::V0::Models::SyncStreamSettingsForm.new(x)))
51749
+ end
51750
+
51751
+ def to_json
51752
+ JSON.dump(to_hash)
51753
+ end
51754
+
51755
+ def copy(incoming={})
51756
+ SyncStreamForm.new(to_hash.merge(HttpClient::Helper.symbolize_keys(incoming)))
51757
+ end
51758
+
51759
+ def to_hash
51760
+ {
51761
+ :type => type.value,
51762
+ :systems => systems,
51763
+ :settings => settings.nil? ? nil : settings.to_hash
51764
+ }
51765
+ end
51766
+
51767
+ end
51768
+
51769
+ class SyncStreamReference
51770
+
51771
+ attr_reader :id, :key
51772
+
51773
+ def initialize(incoming={})
51774
+ opts = HttpClient::Helper.symbolize_keys(incoming)
51775
+ HttpClient::Preconditions.require_keys(opts, [:id, :key], 'SyncStreamReference')
51776
+ @id = HttpClient::Preconditions.assert_class('id', opts.delete(:id), String)
51777
+ @key = HttpClient::Preconditions.assert_class('key', opts.delete(:key), String)
51778
+ end
51779
+
51780
+ def to_json
51781
+ JSON.dump(to_hash)
51782
+ end
51783
+
51784
+ def copy(incoming={})
51785
+ SyncStreamReference.new(to_hash.merge(HttpClient::Helper.symbolize_keys(incoming)))
51786
+ end
51787
+
51788
+ def to_hash
51789
+ {
51790
+ :id => id,
51791
+ :key => key
51792
+ }
51793
+ end
51794
+
51795
+ end
51796
+
51797
+ class SyncStreamSettings
51798
+
51799
+ attr_reader :pending_record_after, :warn_after, :error_after
51800
+
51801
+ def initialize(incoming={})
51802
+ opts = HttpClient::Helper.symbolize_keys(incoming)
51803
+ HttpClient::Preconditions.require_keys(opts, [:pending_record_after, :warn_after, :error_after], 'SyncStreamSettings')
51804
+ @pending_record_after = (x = opts.delete(:pending_record_after); x.is_a?(::Io::Flow::V0::Models::SyncDuration) ? x : ::Io::Flow::V0::Models::SyncDuration.new(x))
51805
+ @warn_after = (x = opts.delete(:warn_after); x.is_a?(::Io::Flow::V0::Models::SyncDuration) ? x : ::Io::Flow::V0::Models::SyncDuration.new(x))
51806
+ @error_after = (x = opts.delete(:error_after); x.is_a?(::Io::Flow::V0::Models::SyncDuration) ? x : ::Io::Flow::V0::Models::SyncDuration.new(x))
51807
+ end
51808
+
51809
+ def to_json
51810
+ JSON.dump(to_hash)
51811
+ end
51812
+
51813
+ def copy(incoming={})
51814
+ SyncStreamSettings.new(to_hash.merge(HttpClient::Helper.symbolize_keys(incoming)))
51815
+ end
51816
+
51817
+ def to_hash
51818
+ {
51819
+ :pending_record_after => pending_record_after.to_hash,
51820
+ :warn_after => warn_after.to_hash,
51821
+ :error_after => error_after.to_hash
51822
+ }
51823
+ end
51824
+
51825
+ end
51826
+
51827
+ class SyncStreamSettingsForm
51828
+
51829
+ attr_reader :pending_record_after, :warn_after, :error_after
51830
+
51831
+ def initialize(incoming={})
51832
+ opts = HttpClient::Helper.symbolize_keys(incoming)
51833
+ HttpClient::Preconditions.require_keys(opts, [:pending_record_after, :warn_after, :error_after], 'SyncStreamSettingsForm')
51834
+ @pending_record_after = (x = opts.delete(:pending_record_after); x.is_a?(::Io::Flow::V0::Models::SyncDuration) ? x : ::Io::Flow::V0::Models::SyncDuration.new(x))
51835
+ @warn_after = (x = opts.delete(:warn_after); x.is_a?(::Io::Flow::V0::Models::SyncDuration) ? x : ::Io::Flow::V0::Models::SyncDuration.new(x))
51836
+ @error_after = (x = opts.delete(:error_after); x.is_a?(::Io::Flow::V0::Models::SyncDuration) ? x : ::Io::Flow::V0::Models::SyncDuration.new(x))
51837
+ end
51838
+
51839
+ def to_json
51840
+ JSON.dump(to_hash)
51841
+ end
51842
+
51843
+ def copy(incoming={})
51844
+ SyncStreamSettingsForm.new(to_hash.merge(HttpClient::Helper.symbolize_keys(incoming)))
51845
+ end
51846
+
51847
+ def to_hash
51848
+ {
51849
+ :pending_record_after => pending_record_after.to_hash,
51850
+ :warn_after => warn_after.to_hash,
51851
+ :error_after => error_after.to_hash
51852
+ }
51853
+ end
51854
+
51855
+ end
51856
+
51004
51857
  # Represents a simple model of taxes that apply to a given item / destination.
51005
51858
  class Tax
51006
51859