flowcommerce 0.2.53 → 0.2.54

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,6 +1,6 @@
1
1
  # Generated by API Builder - https://www.apibuilder.io
2
2
  # Service version: 0.4.51
3
- # apibuilder:0.13.0 https://app.apibuilder.io/flow/api/0.4.74/ruby_client
3
+ # apibuilder 0.13.0 app.apibuilder.io/flow/api/0.4.77/ruby_client
4
4
 
5
5
  require 'cgi'
6
6
  require 'net/http'
@@ -25,7 +25,7 @@ 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.13.0 https://app.apibuilder.io/flow/api/0.4.74/ruby_client' unless defined?(Constants::USER_AGENT)
28
+ USER_AGENT = 'apibuilder 0.13.0 app.apibuilder.io/flow/api/0.4.77/ruby_client' unless defined?(Constants::USER_AGENT)
29
29
  VERSION = '0.4.51' unless defined?(Constants::VERSION)
30
30
  VERSION_MAJOR = 0 unless defined?(VERSION_MAJOR)
31
31
 
@@ -489,6 +489,21 @@ module Io
489
489
  ::Io::Flow::V0::Models::Attribute.new(r)
490
490
  end
491
491
 
492
+ # Provides visibility into recent changes of each object, including deletion
493
+ def get_versions(organization, incoming={})
494
+ HttpClient::Preconditions.assert_class('organization', organization, String)
495
+ opts = HttpClient::Helper.symbolize_keys(incoming)
496
+ query = {
497
+ :id => (x = opts.delete(:id); x.nil? ? nil : HttpClient::Preconditions.assert_class('id', x, Array).map { |v| HttpClient::Preconditions.assert_class('id', v, String) }),
498
+ :key => (x = opts.delete(:key); x.nil? ? nil : HttpClient::Preconditions.assert_class('key', x, Array).map { |v| HttpClient::Preconditions.assert_class('key', v, String) }),
499
+ :limit => HttpClient::Preconditions.assert_class('limit', (x = opts.delete(:limit); x.nil? ? 25 : x), Integer),
500
+ :offset => HttpClient::Preconditions.assert_class('offset', (x = opts.delete(:offset); x.nil? ? 0 : x), Integer),
501
+ :sort => HttpClient::Preconditions.assert_class('sort', (x = opts.delete(:sort); x.nil? ? "journal_timestamp" : x), String)
502
+ }.delete_if { |k, v| v.nil? }
503
+ r = @client.request("/#{CGI.escape(organization)}/attributes/versions").with_query(query).get
504
+ r.map { |x| ::Io::Flow::V0::Models::AttributeVersion.new(x) }
505
+ end
506
+
492
507
  # Returns information about a specific attribute.
493
508
  def get_by_key(organization, key)
494
509
  HttpClient::Preconditions.assert_class('organization', organization, String)
@@ -514,21 +529,6 @@ module Io
514
529
  nil
515
530
  end
516
531
 
517
- # Provides visibility into recent changes of each object, including deletion
518
- def get_versions(organization, incoming={})
519
- HttpClient::Preconditions.assert_class('organization', organization, String)
520
- opts = HttpClient::Helper.symbolize_keys(incoming)
521
- query = {
522
- :id => (x = opts.delete(:id); x.nil? ? nil : HttpClient::Preconditions.assert_class('id', x, Array).map { |v| HttpClient::Preconditions.assert_class('id', v, String) }),
523
- :key => (x = opts.delete(:key); x.nil? ? nil : HttpClient::Preconditions.assert_class('key', x, Array).map { |v| HttpClient::Preconditions.assert_class('key', v, String) }),
524
- :limit => HttpClient::Preconditions.assert_class('limit', (x = opts.delete(:limit); x.nil? ? 25 : x), Integer),
525
- :offset => HttpClient::Preconditions.assert_class('offset', (x = opts.delete(:offset); x.nil? ? 0 : x), Integer),
526
- :sort => HttpClient::Preconditions.assert_class('sort', (x = opts.delete(:sort); x.nil? ? "journal_timestamp" : x), String)
527
- }.delete_if { |k, v| v.nil? }
528
- r = @client.request("/#{CGI.escape(organization)}/attributes/versions").with_query(query).get
529
- r.map { |x| ::Io::Flow::V0::Models::AttributeVersion.new(x) }
530
- end
531
-
532
532
  end
533
533
 
534
534
  class Catalogs
@@ -701,6 +701,20 @@ module Io
701
701
  ::Io::Flow::V0::Models::CreditPayment.new(r)
702
702
  end
703
703
 
704
+ def get_versions(organization, incoming={})
705
+ HttpClient::Preconditions.assert_class('organization', organization, String)
706
+ opts = HttpClient::Helper.symbolize_keys(incoming)
707
+ query = {
708
+ :id => (x = opts.delete(:id); x.nil? ? nil : HttpClient::Preconditions.assert_class('id', x, Array).map { |v| HttpClient::Preconditions.assert_class('id', v, String) }),
709
+ :key => (x = opts.delete(:key); x.nil? ? nil : HttpClient::Preconditions.assert_class('key', x, Array).map { |v| HttpClient::Preconditions.assert_class('key', v, String) }),
710
+ :limit => HttpClient::Preconditions.assert_class('limit', (x = opts.delete(:limit); x.nil? ? 25 : x), Integer),
711
+ :offset => HttpClient::Preconditions.assert_class('offset', (x = opts.delete(:offset); x.nil? ? 0 : x), Integer),
712
+ :sort => HttpClient::Preconditions.assert_class('sort', (x = opts.delete(:sort); x.nil? ? "journal_timestamp" : x), String)
713
+ }.delete_if { |k, v| v.nil? }
714
+ r = @client.request("/#{CGI.escape(organization)}/credit/payments/versions").with_query(query).get
715
+ r.map { |x| ::Io::Flow::V0::Models::CreditPaymentVersion.new(x) }
716
+ end
717
+
704
718
  def get_by_key(organization, key, incoming={})
705
719
  HttpClient::Preconditions.assert_class('organization', organization, String)
706
720
  HttpClient::Preconditions.assert_class('key', key, String)
@@ -731,20 +745,6 @@ module Io
731
745
  nil
732
746
  end
733
747
 
734
- def get_versions(organization, incoming={})
735
- HttpClient::Preconditions.assert_class('organization', organization, String)
736
- opts = HttpClient::Helper.symbolize_keys(incoming)
737
- query = {
738
- :id => (x = opts.delete(:id); x.nil? ? nil : HttpClient::Preconditions.assert_class('id', x, Array).map { |v| HttpClient::Preconditions.assert_class('id', v, String) }),
739
- :key => (x = opts.delete(:key); x.nil? ? nil : HttpClient::Preconditions.assert_class('key', x, Array).map { |v| HttpClient::Preconditions.assert_class('key', v, String) }),
740
- :limit => HttpClient::Preconditions.assert_class('limit', (x = opts.delete(:limit); x.nil? ? 25 : x), Integer),
741
- :offset => HttpClient::Preconditions.assert_class('offset', (x = opts.delete(:offset); x.nil? ? 0 : x), Integer),
742
- :sort => HttpClient::Preconditions.assert_class('sort', (x = opts.delete(:sort); x.nil? ? "journal_timestamp" : x), String)
743
- }.delete_if { |k, v| v.nil? }
744
- r = @client.request("/#{CGI.escape(organization)}/credit/payments/versions").with_query(query).get
745
- r.map { |x| ::Io::Flow::V0::Models::CreditPaymentVersion.new(x) }
746
- end
747
-
748
748
  end
749
749
 
750
750
  class Experiences
@@ -781,6 +781,76 @@ module Io
781
781
  ::Io::Flow::V0::Models::Experience.new(r)
782
782
  end
783
783
 
784
+ # Formats the requested amount using the formatting settings for the
785
+ # experience.
786
+ def get_conversions_by_base_and_amount(organization, base, amount, incoming={})
787
+ HttpClient::Preconditions.assert_class('organization', organization, String)
788
+ HttpClient::Preconditions.assert_class('base', base, String)
789
+ HttpClient::Preconditions.assert_class('amount', amount, String)
790
+ opts = HttpClient::Helper.symbolize_keys(incoming)
791
+ query = {
792
+ :experience => (x = opts.delete(:experience); x.nil? ? nil : HttpClient::Preconditions.assert_class('experience', x, String)),
793
+ :country => (x = opts.delete(:country); x.nil? ? nil : HttpClient::Preconditions.assert_class('country', x, String)),
794
+ :ip => (x = opts.delete(:ip); x.nil? ? nil : HttpClient::Preconditions.assert_class('ip', x, String)),
795
+ :currency => (x = opts.delete(:currency); x.nil? ? nil : HttpClient::Preconditions.assert_class('currency', x, String))
796
+ }.delete_if { |k, v| v.nil? }
797
+ r = @client.request("/#{CGI.escape(organization)}/experiences/conversions/#{CGI.escape(base)}/#{CGI.escape(amount)}").with_query(query).get
798
+ ::Io::Flow::V0::Models::PriceWithBase.new(r)
799
+ end
800
+
801
+ # Returns localized information about 1 or more items. The items will be
802
+ # localized based on the experience selected by the query parameters in the
803
+ # order of experience, then country, then ip address.
804
+ def get_items(organization, incoming={})
805
+ HttpClient::Preconditions.assert_class('organization', organization, String)
806
+ opts = HttpClient::Helper.symbolize_keys(incoming)
807
+ query = {
808
+ :number => (x = opts.delete(:number); x.nil? ? nil : HttpClient::Preconditions.assert_class('number', x, Array).map { |v| HttpClient::Preconditions.assert_class('number', v, String) }),
809
+ :status => (x = opts.delete(:status); x.nil? ? nil : HttpClient::Preconditions.assert_class('status', x, Array).map { |v| (x = v; x.is_a?(::Io::Flow::V0::Models::SubcatalogItemStatus) ? x : ::Io::Flow::V0::Models::SubcatalogItemStatus.apply(x)).value }),
810
+ :experience => (x = opts.delete(:experience); x.nil? ? nil : HttpClient::Preconditions.assert_class('experience', x, String)),
811
+ :country => (x = opts.delete(:country); x.nil? ? nil : HttpClient::Preconditions.assert_class('country', x, String)),
812
+ :ip => (x = opts.delete(:ip); x.nil? ? nil : HttpClient::Preconditions.assert_class('ip', x, String)),
813
+ :currency => (x = opts.delete(:currency); x.nil? ? nil : HttpClient::Preconditions.assert_class('currency', x, String)),
814
+ :language => (x = opts.delete(:language); x.nil? ? nil : HttpClient::Preconditions.assert_class('language', x, String)),
815
+ :limit => HttpClient::Preconditions.assert_class('limit', (x = opts.delete(:limit); x.nil? ? 25 : x), Integer),
816
+ :offset => HttpClient::Preconditions.assert_class('offset', (x = opts.delete(:offset); x.nil? ? 0 : x), Integer),
817
+ :sort => HttpClient::Preconditions.assert_class('sort', (x = opts.delete(:sort); x.nil? ? "-created_at" : x), String)
818
+ }.delete_if { |k, v| v.nil? }
819
+ r = @client.request("/#{CGI.escape(organization)}/experiences/items").with_query(query).get
820
+ r.map { |x| ::Io::Flow::V0::Models::Item.new(x) }
821
+ end
822
+
823
+ # Returns information about this item localized based on the query parameters
824
+ def get_items_by_number(organization, number, incoming={})
825
+ HttpClient::Preconditions.assert_class('organization', organization, String)
826
+ HttpClient::Preconditions.assert_class('number', number, String)
827
+ opts = HttpClient::Helper.symbolize_keys(incoming)
828
+ query = {
829
+ :experience => (x = opts.delete(:experience); x.nil? ? nil : HttpClient::Preconditions.assert_class('experience', x, String)),
830
+ :country => (x = opts.delete(:country); x.nil? ? nil : HttpClient::Preconditions.assert_class('country', x, String)),
831
+ :ip => (x = opts.delete(:ip); x.nil? ? nil : HttpClient::Preconditions.assert_class('ip', x, String)),
832
+ :currency => (x = opts.delete(:currency); x.nil? ? nil : HttpClient::Preconditions.assert_class('currency', x, String)),
833
+ :language => (x = opts.delete(:language); x.nil? ? nil : HttpClient::Preconditions.assert_class('language', x, String))
834
+ }.delete_if { |k, v| v.nil? }
835
+ r = @client.request("/#{CGI.escape(organization)}/experiences/items/#{CGI.escape(number)}").with_query(query).get
836
+ ::Io::Flow::V0::Models::Item.new(r)
837
+ end
838
+
839
+ # Provides visibility into recent changes of each object, including deletion
840
+ def get_versions(organization, incoming={})
841
+ HttpClient::Preconditions.assert_class('organization', organization, String)
842
+ opts = HttpClient::Helper.symbolize_keys(incoming)
843
+ query = {
844
+ :id => (x = opts.delete(:id); x.nil? ? nil : HttpClient::Preconditions.assert_class('id', x, Array).map { |v| HttpClient::Preconditions.assert_class('id', v, String) }),
845
+ :key => (x = opts.delete(:key); x.nil? ? nil : HttpClient::Preconditions.assert_class('key', x, Array).map { |v| HttpClient::Preconditions.assert_class('key', v, String) }),
846
+ :limit => HttpClient::Preconditions.assert_class('limit', (x = opts.delete(:limit); x.nil? ? 25 : x), Integer),
847
+ :offset => HttpClient::Preconditions.assert_class('offset', (x = opts.delete(:offset); x.nil? ? 0 : x), Integer),
848
+ :sort => HttpClient::Preconditions.assert_class('sort', (x = opts.delete(:sort); x.nil? ? "journal_timestamp" : x), String)
849
+ }.delete_if { |k, v| v.nil? }
850
+ r = @client.request("/#{CGI.escape(organization)}/experiences/versions").with_query(query).get
851
+ r.map { |x| ::Io::Flow::V0::Models::ExperienceVersion.new(x) }
852
+ end
853
+
784
854
  def get_currency_and_formats_by_experience_key(organization, experience_key)
785
855
  HttpClient::Preconditions.assert_class('organization', organization, String)
786
856
  HttpClient::Preconditions.assert_class('experience_key', experience_key, String)
@@ -818,6 +888,20 @@ module Io
818
888
  ::Io::Flow::V0::Models::ItemMargin.new(r)
819
889
  end
820
890
 
891
+ def get_margins_and_versions_by_experience_key(organization, experience_key, incoming={})
892
+ HttpClient::Preconditions.assert_class('organization', organization, String)
893
+ HttpClient::Preconditions.assert_class('experience_key', experience_key, String)
894
+ opts = HttpClient::Helper.symbolize_keys(incoming)
895
+ query = {
896
+ :id => (x = opts.delete(:id); x.nil? ? nil : HttpClient::Preconditions.assert_class('id', x, Array).map { |v| HttpClient::Preconditions.assert_class('id', v, String) }),
897
+ :limit => HttpClient::Preconditions.assert_class('limit', (x = opts.delete(:limit); x.nil? ? 25 : x), Integer),
898
+ :offset => HttpClient::Preconditions.assert_class('offset', (x = opts.delete(:offset); x.nil? ? 0 : x), Integer),
899
+ :sort => HttpClient::Preconditions.assert_class('sort', (x = opts.delete(:sort); x.nil? ? "journal_timestamp" : x), String)
900
+ }.delete_if { |k, v| v.nil? }
901
+ r = @client.request("/#{CGI.escape(organization)}/experiences/#{CGI.escape(experience_key)}/margins/versions").with_query(query).get
902
+ r.map { |x| ::Io::Flow::V0::Models::ItemMarginVersion.new(x) }
903
+ end
904
+
821
905
  def get_margins_by_experience_key_and_key(organization, experience_key, key)
822
906
  HttpClient::Preconditions.assert_class('organization', organization, String)
823
907
  HttpClient::Preconditions.assert_class('experience_key', experience_key, String)
@@ -843,20 +927,6 @@ module Io
843
927
  nil
844
928
  end
845
929
 
846
- def get_margins_and_versions_by_experience_key(organization, experience_key, incoming={})
847
- HttpClient::Preconditions.assert_class('organization', organization, String)
848
- HttpClient::Preconditions.assert_class('experience_key', experience_key, String)
849
- opts = HttpClient::Helper.symbolize_keys(incoming)
850
- query = {
851
- :id => (x = opts.delete(:id); x.nil? ? nil : HttpClient::Preconditions.assert_class('id', x, Array).map { |v| HttpClient::Preconditions.assert_class('id', v, String) }),
852
- :limit => HttpClient::Preconditions.assert_class('limit', (x = opts.delete(:limit); x.nil? ? 25 : x), Integer),
853
- :offset => HttpClient::Preconditions.assert_class('offset', (x = opts.delete(:offset); x.nil? ? 0 : x), Integer),
854
- :sort => HttpClient::Preconditions.assert_class('sort', (x = opts.delete(:sort); x.nil? ? "journal_timestamp" : x), String)
855
- }.delete_if { |k, v| v.nil? }
856
- r = @client.request("/#{CGI.escape(organization)}/experiences/#{CGI.escape(experience_key)}/margins/versions").with_query(query).get
857
- r.map { |x| ::Io::Flow::V0::Models::ItemMarginVersion.new(x) }
858
- end
859
-
860
930
  def get_payment_method_types_by_experience_key(organization, experience_key, incoming={})
861
931
  HttpClient::Preconditions.assert_class('organization', organization, String)
862
932
  HttpClient::Preconditions.assert_class('experience_key', experience_key, String)
@@ -1004,76 +1074,6 @@ module Io
1004
1074
  ::Io::Flow::V0::Models::Experience.new(r)
1005
1075
  end
1006
1076
 
1007
- # Formats the requested amount using the formatting settings for the
1008
- # experience.
1009
- def get_conversions_by_base_and_amount(organization, base, amount, incoming={})
1010
- HttpClient::Preconditions.assert_class('organization', organization, String)
1011
- HttpClient::Preconditions.assert_class('base', base, String)
1012
- HttpClient::Preconditions.assert_class('amount', amount, String)
1013
- opts = HttpClient::Helper.symbolize_keys(incoming)
1014
- query = {
1015
- :experience => (x = opts.delete(:experience); x.nil? ? nil : HttpClient::Preconditions.assert_class('experience', x, String)),
1016
- :country => (x = opts.delete(:country); x.nil? ? nil : HttpClient::Preconditions.assert_class('country', x, String)),
1017
- :ip => (x = opts.delete(:ip); x.nil? ? nil : HttpClient::Preconditions.assert_class('ip', x, String)),
1018
- :currency => (x = opts.delete(:currency); x.nil? ? nil : HttpClient::Preconditions.assert_class('currency', x, String))
1019
- }.delete_if { |k, v| v.nil? }
1020
- r = @client.request("/#{CGI.escape(organization)}/experiences/conversions/#{CGI.escape(base)}/#{CGI.escape(amount)}").with_query(query).get
1021
- ::Io::Flow::V0::Models::PriceWithBase.new(r)
1022
- end
1023
-
1024
- # Returns localized information about 1 or more items. The items will be
1025
- # localized based on the experience selected by the query parameters in the
1026
- # order of experience, then country, then ip address.
1027
- def get_items(organization, incoming={})
1028
- HttpClient::Preconditions.assert_class('organization', organization, String)
1029
- opts = HttpClient::Helper.symbolize_keys(incoming)
1030
- query = {
1031
- :number => (x = opts.delete(:number); x.nil? ? nil : HttpClient::Preconditions.assert_class('number', x, Array).map { |v| HttpClient::Preconditions.assert_class('number', v, String) }),
1032
- :status => (x = opts.delete(:status); x.nil? ? nil : HttpClient::Preconditions.assert_class('status', x, Array).map { |v| (x = v; x.is_a?(::Io::Flow::V0::Models::SubcatalogItemStatus) ? x : ::Io::Flow::V0::Models::SubcatalogItemStatus.apply(x)).value }),
1033
- :experience => (x = opts.delete(:experience); x.nil? ? nil : HttpClient::Preconditions.assert_class('experience', x, String)),
1034
- :country => (x = opts.delete(:country); x.nil? ? nil : HttpClient::Preconditions.assert_class('country', x, String)),
1035
- :ip => (x = opts.delete(:ip); x.nil? ? nil : HttpClient::Preconditions.assert_class('ip', x, String)),
1036
- :currency => (x = opts.delete(:currency); x.nil? ? nil : HttpClient::Preconditions.assert_class('currency', x, String)),
1037
- :language => (x = opts.delete(:language); x.nil? ? nil : HttpClient::Preconditions.assert_class('language', x, String)),
1038
- :limit => HttpClient::Preconditions.assert_class('limit', (x = opts.delete(:limit); x.nil? ? 25 : x), Integer),
1039
- :offset => HttpClient::Preconditions.assert_class('offset', (x = opts.delete(:offset); x.nil? ? 0 : x), Integer),
1040
- :sort => HttpClient::Preconditions.assert_class('sort', (x = opts.delete(:sort); x.nil? ? "-created_at" : x), String)
1041
- }.delete_if { |k, v| v.nil? }
1042
- r = @client.request("/#{CGI.escape(organization)}/experiences/items").with_query(query).get
1043
- r.map { |x| ::Io::Flow::V0::Models::Item.new(x) }
1044
- end
1045
-
1046
- # Returns information about this item localized based on the query parameters
1047
- def get_items_by_number(organization, number, incoming={})
1048
- HttpClient::Preconditions.assert_class('organization', organization, String)
1049
- HttpClient::Preconditions.assert_class('number', number, String)
1050
- opts = HttpClient::Helper.symbolize_keys(incoming)
1051
- query = {
1052
- :experience => (x = opts.delete(:experience); x.nil? ? nil : HttpClient::Preconditions.assert_class('experience', x, String)),
1053
- :country => (x = opts.delete(:country); x.nil? ? nil : HttpClient::Preconditions.assert_class('country', x, String)),
1054
- :ip => (x = opts.delete(:ip); x.nil? ? nil : HttpClient::Preconditions.assert_class('ip', x, String)),
1055
- :currency => (x = opts.delete(:currency); x.nil? ? nil : HttpClient::Preconditions.assert_class('currency', x, String)),
1056
- :language => (x = opts.delete(:language); x.nil? ? nil : HttpClient::Preconditions.assert_class('language', x, String))
1057
- }.delete_if { |k, v| v.nil? }
1058
- r = @client.request("/#{CGI.escape(organization)}/experiences/items/#{CGI.escape(number)}").with_query(query).get
1059
- ::Io::Flow::V0::Models::Item.new(r)
1060
- end
1061
-
1062
- # Provides visibility into recent changes of each object, including deletion
1063
- def get_versions(organization, incoming={})
1064
- HttpClient::Preconditions.assert_class('organization', organization, String)
1065
- opts = HttpClient::Helper.symbolize_keys(incoming)
1066
- query = {
1067
- :id => (x = opts.delete(:id); x.nil? ? nil : HttpClient::Preconditions.assert_class('id', x, Array).map { |v| HttpClient::Preconditions.assert_class('id', v, String) }),
1068
- :key => (x = opts.delete(:key); x.nil? ? nil : HttpClient::Preconditions.assert_class('key', x, Array).map { |v| HttpClient::Preconditions.assert_class('key', v, String) }),
1069
- :limit => HttpClient::Preconditions.assert_class('limit', (x = opts.delete(:limit); x.nil? ? 25 : x), Integer),
1070
- :offset => HttpClient::Preconditions.assert_class('offset', (x = opts.delete(:offset); x.nil? ? 0 : x), Integer),
1071
- :sort => HttpClient::Preconditions.assert_class('sort', (x = opts.delete(:sort); x.nil? ? "journal_timestamp" : x), String)
1072
- }.delete_if { |k, v| v.nil? }
1073
- r = @client.request("/#{CGI.escape(organization)}/experiences/versions").with_query(query).get
1074
- r.map { |x| ::Io::Flow::V0::Models::ExperienceVersion.new(x) }
1075
- end
1076
-
1077
1077
  end
1078
1078
 
1079
1079
  class ExperienceDefaults
@@ -1124,6 +1124,21 @@ module Io
1124
1124
  ::Io::Flow::V0::Models::Item.new(r)
1125
1125
  end
1126
1126
 
1127
+ # Provides visibility into recent changes of each object, including deletion
1128
+ def get_versions(organization, incoming={})
1129
+ HttpClient::Preconditions.assert_class('organization', organization, String)
1130
+ opts = HttpClient::Helper.symbolize_keys(incoming)
1131
+ query = {
1132
+ :id => (x = opts.delete(:id); x.nil? ? nil : HttpClient::Preconditions.assert_class('id', x, Array).map { |v| HttpClient::Preconditions.assert_class('id', v, String) }),
1133
+ :number => (x = opts.delete(:number); x.nil? ? nil : HttpClient::Preconditions.assert_class('number', x, Array).map { |v| HttpClient::Preconditions.assert_class('number', v, String) }),
1134
+ :limit => HttpClient::Preconditions.assert_class('limit', (x = opts.delete(:limit); x.nil? ? 25 : x), Integer),
1135
+ :offset => HttpClient::Preconditions.assert_class('offset', (x = opts.delete(:offset); x.nil? ? 0 : x), Integer),
1136
+ :sort => HttpClient::Preconditions.assert_class('sort', (x = opts.delete(:sort); x.nil? ? "journal_timestamp" : x), String)
1137
+ }.delete_if { |k, v| v.nil? }
1138
+ r = @client.request("/#{CGI.escape(organization)}/catalog/items/versions").with_query(query).get
1139
+ r.map { |x| ::Io::Flow::V0::Models::ItemVersion.new(x) }
1140
+ end
1141
+
1127
1142
  # Returns information about a specific item.
1128
1143
  def get_by_number(organization, number)
1129
1144
  HttpClient::Preconditions.assert_class('organization', organization, String)
@@ -1158,21 +1173,6 @@ module Io
1158
1173
  ::Io::Flow::V0::Models::Item.new(r)
1159
1174
  end
1160
1175
 
1161
- # Provides visibility into recent changes of each object, including deletion
1162
- def get_versions(organization, incoming={})
1163
- HttpClient::Preconditions.assert_class('organization', organization, String)
1164
- opts = HttpClient::Helper.symbolize_keys(incoming)
1165
- query = {
1166
- :id => (x = opts.delete(:id); x.nil? ? nil : HttpClient::Preconditions.assert_class('id', x, Array).map { |v| HttpClient::Preconditions.assert_class('id', v, String) }),
1167
- :number => (x = opts.delete(:number); x.nil? ? nil : HttpClient::Preconditions.assert_class('number', x, Array).map { |v| HttpClient::Preconditions.assert_class('number', v, String) }),
1168
- :limit => HttpClient::Preconditions.assert_class('limit', (x = opts.delete(:limit); x.nil? ? 25 : x), Integer),
1169
- :offset => HttpClient::Preconditions.assert_class('offset', (x = opts.delete(:offset); x.nil? ? 0 : x), Integer),
1170
- :sort => HttpClient::Preconditions.assert_class('sort', (x = opts.delete(:sort); x.nil? ? "journal_timestamp" : x), String)
1171
- }.delete_if { |k, v| v.nil? }
1172
- r = @client.request("/#{CGI.escape(organization)}/catalog/items/versions").with_query(query).get
1173
- r.map { |x| ::Io::Flow::V0::Models::ItemVersion.new(x) }
1174
- end
1175
-
1176
1176
  end
1177
1177
 
1178
1178
  class Orders
@@ -1217,6 +1217,33 @@ module Io
1217
1217
  ::Io::Flow::V0::Models::Order.new(r)
1218
1218
  end
1219
1219
 
1220
+ # Returns information about a specific order using an identifier number
1221
+ def get_identifier_by_identifier(organization, identifier, incoming={})
1222
+ HttpClient::Preconditions.assert_class('organization', organization, String)
1223
+ HttpClient::Preconditions.assert_class('identifier', identifier, String)
1224
+ opts = HttpClient::Helper.symbolize_keys(incoming)
1225
+ query = {
1226
+ :expand => (x = opts.delete(:expand); x.nil? ? nil : HttpClient::Preconditions.assert_class('expand', x, Array).map { |v| HttpClient::Preconditions.assert_class('expand', v, String) })
1227
+ }.delete_if { |k, v| v.nil? }
1228
+ r = @client.request("/#{CGI.escape(organization)}/orders/identifier/#{CGI.escape(identifier)}").with_query(query).get
1229
+ ::Io::Flow::V0::Models::Order.new(r)
1230
+ end
1231
+
1232
+ # Provides visibility into recent changes of each order, including deletion
1233
+ def get_versions(organization, incoming={})
1234
+ HttpClient::Preconditions.assert_class('organization', organization, String)
1235
+ opts = HttpClient::Helper.symbolize_keys(incoming)
1236
+ query = {
1237
+ :id => (x = opts.delete(:id); x.nil? ? nil : HttpClient::Preconditions.assert_class('id', x, Array).map { |v| HttpClient::Preconditions.assert_class('id', v, String) }),
1238
+ :number => (x = opts.delete(:number); x.nil? ? nil : HttpClient::Preconditions.assert_class('number', x, Array).map { |v| HttpClient::Preconditions.assert_class('number', v, String) }),
1239
+ :limit => HttpClient::Preconditions.assert_class('limit', (x = opts.delete(:limit); x.nil? ? 25 : x), Integer),
1240
+ :offset => HttpClient::Preconditions.assert_class('offset', (x = opts.delete(:offset); x.nil? ? 0 : x), Integer),
1241
+ :sort => HttpClient::Preconditions.assert_class('sort', (x = opts.delete(:sort); x.nil? ? "journal_timestamp" : x), String)
1242
+ }.delete_if { |k, v| v.nil? }
1243
+ r = @client.request("/#{CGI.escape(organization)}/orders/versions").with_query(query).get
1244
+ r.map { |x| ::Io::Flow::V0::Models::OrderVersion.new(x) }
1245
+ end
1246
+
1220
1247
  # Returns information about a specific order.
1221
1248
  def get_by_number(organization, number, incoming={})
1222
1249
  HttpClient::Preconditions.assert_class('organization', organization, String)
@@ -1323,33 +1350,6 @@ module Io
1323
1350
  ::Io::Flow::V0::Models::Order.new(r)
1324
1351
  end
1325
1352
 
1326
- # Returns information about a specific order using an identifier number
1327
- def get_identifier_by_identifier(organization, identifier, incoming={})
1328
- HttpClient::Preconditions.assert_class('organization', organization, String)
1329
- HttpClient::Preconditions.assert_class('identifier', identifier, String)
1330
- opts = HttpClient::Helper.symbolize_keys(incoming)
1331
- query = {
1332
- :expand => (x = opts.delete(:expand); x.nil? ? nil : HttpClient::Preconditions.assert_class('expand', x, Array).map { |v| HttpClient::Preconditions.assert_class('expand', v, String) })
1333
- }.delete_if { |k, v| v.nil? }
1334
- r = @client.request("/#{CGI.escape(organization)}/orders/identifier/#{CGI.escape(identifier)}").with_query(query).get
1335
- ::Io::Flow::V0::Models::Order.new(r)
1336
- end
1337
-
1338
- # Provides visibility into recent changes of each order, including deletion
1339
- def get_versions(organization, incoming={})
1340
- HttpClient::Preconditions.assert_class('organization', organization, String)
1341
- opts = HttpClient::Helper.symbolize_keys(incoming)
1342
- query = {
1343
- :id => (x = opts.delete(:id); x.nil? ? nil : HttpClient::Preconditions.assert_class('id', x, Array).map { |v| HttpClient::Preconditions.assert_class('id', v, String) }),
1344
- :number => (x = opts.delete(:number); x.nil? ? nil : HttpClient::Preconditions.assert_class('number', x, Array).map { |v| HttpClient::Preconditions.assert_class('number', v, String) }),
1345
- :limit => HttpClient::Preconditions.assert_class('limit', (x = opts.delete(:limit); x.nil? ? 25 : x), Integer),
1346
- :offset => HttpClient::Preconditions.assert_class('offset', (x = opts.delete(:offset); x.nil? ? 0 : x), Integer),
1347
- :sort => HttpClient::Preconditions.assert_class('sort', (x = opts.delete(:sort); x.nil? ? "journal_timestamp" : x), String)
1348
- }.delete_if { |k, v| v.nil? }
1349
- r = @client.request("/#{CGI.escape(organization)}/orders/versions").with_query(query).get
1350
- r.map { |x| ::Io::Flow::V0::Models::OrderVersion.new(x) }
1351
- end
1352
-
1353
1353
  # Returns the current fraud status for this order
1354
1354
  def get_status_and_fraud_by_number(organization, number)
1355
1355
  HttpClient::Preconditions.assert_class('organization', organization, String)
@@ -1409,6 +1409,30 @@ module Io
1409
1409
  ::Io::Flow::V0::Models::OrderBuilder.new(r)
1410
1410
  end
1411
1411
 
1412
+ def put_destination_by_number(organization, number, order_builder_destination_form, incoming={})
1413
+ HttpClient::Preconditions.assert_class('organization', organization, String)
1414
+ HttpClient::Preconditions.assert_class('number', number, String)
1415
+ opts = HttpClient::Helper.symbolize_keys(incoming)
1416
+ query = {
1417
+ :expand => (x = opts.delete(:expand); x.nil? ? nil : HttpClient::Preconditions.assert_class('expand', x, Array).map { |v| HttpClient::Preconditions.assert_class('expand', v, String) })
1418
+ }.delete_if { |k, v| v.nil? }
1419
+ (x = order_builder_destination_form; x.is_a?(::Io::Flow::V0::Models::OrderBuilderDestinationForm) ? x : ::Io::Flow::V0::Models::OrderBuilderDestinationForm.new(x))
1420
+ r = @client.request("/#{CGI.escape(organization)}/order/builders/#{CGI.escape(number)}/destination").with_query(query).with_json(order_builder_destination_form.to_json).put
1421
+ ::Io::Flow::V0::Models::OrderBuilder.new(r)
1422
+ end
1423
+
1424
+ def put_duty_by_number(organization, number, order_builder_delivered_duty_form, incoming={})
1425
+ HttpClient::Preconditions.assert_class('organization', organization, String)
1426
+ HttpClient::Preconditions.assert_class('number', number, String)
1427
+ opts = HttpClient::Helper.symbolize_keys(incoming)
1428
+ query = {
1429
+ :expand => (x = opts.delete(:expand); x.nil? ? nil : HttpClient::Preconditions.assert_class('expand', x, Array).map { |v| HttpClient::Preconditions.assert_class('expand', v, String) })
1430
+ }.delete_if { |k, v| v.nil? }
1431
+ (x = order_builder_delivered_duty_form; x.is_a?(::Io::Flow::V0::Models::OrderBuilderDeliveredDutyForm) ? x : ::Io::Flow::V0::Models::OrderBuilderDeliveredDutyForm.new(x))
1432
+ r = @client.request("/#{CGI.escape(organization)}/order/builders/#{CGI.escape(number)}/duty").with_query(query).with_json(order_builder_delivered_duty_form.to_json).put
1433
+ ::Io::Flow::V0::Models::OrderBuilder.new(r)
1434
+ end
1435
+
1412
1436
  end
1413
1437
 
1414
1438
  class OrderEstimates
@@ -1495,6 +1519,19 @@ module Io
1495
1519
  ::Io::Flow::V0::Models::OrderIdentifier.new(r)
1496
1520
  end
1497
1521
 
1522
+ def get_versions(organization, incoming={})
1523
+ HttpClient::Preconditions.assert_class('organization', organization, String)
1524
+ opts = HttpClient::Helper.symbolize_keys(incoming)
1525
+ query = {
1526
+ :id => (x = opts.delete(:id); x.nil? ? nil : HttpClient::Preconditions.assert_class('id', x, Array).map { |v| HttpClient::Preconditions.assert_class('id', v, String) }),
1527
+ :limit => HttpClient::Preconditions.assert_class('limit', (x = opts.delete(:limit); x.nil? ? 25 : x), Integer),
1528
+ :offset => HttpClient::Preconditions.assert_class('offset', (x = opts.delete(:offset); x.nil? ? 0 : x), Integer),
1529
+ :sort => HttpClient::Preconditions.assert_class('sort', (x = opts.delete(:sort); x.nil? ? "journal_timestamp" : x), String)
1530
+ }.delete_if { |k, v| v.nil? }
1531
+ r = @client.request("/#{CGI.escape(organization)}/order-identifiers/versions").with_query(query).get
1532
+ r.map { |x| ::Io::Flow::V0::Models::OrderIdentifierVersion.new(x) }
1533
+ end
1534
+
1498
1535
  def get_by_identifier(organization, identifier)
1499
1536
  HttpClient::Preconditions.assert_class('organization', organization, String)
1500
1537
  HttpClient::Preconditions.assert_class('identifier', identifier, String)
@@ -1517,19 +1554,6 @@ module Io
1517
1554
  nil
1518
1555
  end
1519
1556
 
1520
- def get_versions(organization, incoming={})
1521
- HttpClient::Preconditions.assert_class('organization', organization, String)
1522
- opts = HttpClient::Helper.symbolize_keys(incoming)
1523
- query = {
1524
- :id => (x = opts.delete(:id); x.nil? ? nil : HttpClient::Preconditions.assert_class('id', x, Array).map { |v| HttpClient::Preconditions.assert_class('id', v, String) }),
1525
- :limit => HttpClient::Preconditions.assert_class('limit', (x = opts.delete(:limit); x.nil? ? 25 : x), Integer),
1526
- :offset => HttpClient::Preconditions.assert_class('offset', (x = opts.delete(:offset); x.nil? ? 0 : x), Integer),
1527
- :sort => HttpClient::Preconditions.assert_class('sort', (x = opts.delete(:sort); x.nil? ? "journal_timestamp" : x), String)
1528
- }.delete_if { |k, v| v.nil? }
1529
- r = @client.request("/#{CGI.escape(organization)}/order-identifiers/versions").with_query(query).get
1530
- r.map { |x| ::Io::Flow::V0::Models::OrderIdentifierVersion.new(x) }
1531
- end
1532
-
1533
1557
  end
1534
1558
 
1535
1559
  class OrderPromotions
@@ -1588,15 +1612,29 @@ module Io
1588
1612
  :offset => HttpClient::Preconditions.assert_class('offset', (x = opts.delete(:offset); x.nil? ? 0 : x), Integer),
1589
1613
  :sort => HttpClient::Preconditions.assert_class('sort', (x = opts.delete(:sort); x.nil? ? "name" : x), String)
1590
1614
  }.delete_if { |k, v| v.nil? }
1591
- r = @client.request("/organizations").with_query(query).get
1592
- r.map { |x| ::Io::Flow::V0::Models::Organization.new(x) }
1593
- end
1594
-
1595
- # Create a new organization.
1596
- def post(organization_form)
1597
- (x = organization_form; x.is_a?(::Io::Flow::V0::Models::OrganizationForm) ? x : ::Io::Flow::V0::Models::OrganizationForm.new(x))
1598
- r = @client.request("/organizations").with_json(organization_form.to_json).post
1599
- ::Io::Flow::V0::Models::Organization.new(r)
1615
+ r = @client.request("/organizations").with_query(query).get
1616
+ r.map { |x| ::Io::Flow::V0::Models::Organization.new(x) }
1617
+ end
1618
+
1619
+ # Create a new organization.
1620
+ def post(organization_form)
1621
+ (x = organization_form; x.is_a?(::Io::Flow::V0::Models::OrganizationForm) ? x : ::Io::Flow::V0::Models::OrganizationForm.new(x))
1622
+ r = @client.request("/organizations").with_json(organization_form.to_json).post
1623
+ ::Io::Flow::V0::Models::Organization.new(r)
1624
+ end
1625
+
1626
+ # Provides visibility into recent changes of each object, including deletion
1627
+ def get_versions(incoming={})
1628
+ opts = HttpClient::Helper.symbolize_keys(incoming)
1629
+ query = {
1630
+ :id => (x = opts.delete(:id); x.nil? ? nil : HttpClient::Preconditions.assert_class('id', x, Array).map { |v| HttpClient::Preconditions.assert_class('id', v, String) }),
1631
+ :organization => (x = opts.delete(:organization); x.nil? ? nil : HttpClient::Preconditions.assert_class('organization', x, Array).map { |v| HttpClient::Preconditions.assert_class('organization', v, String) }),
1632
+ :limit => HttpClient::Preconditions.assert_class('limit', (x = opts.delete(:limit); x.nil? ? 25 : x), Integer),
1633
+ :offset => HttpClient::Preconditions.assert_class('offset', (x = opts.delete(:offset); x.nil? ? 0 : x), Integer),
1634
+ :sort => HttpClient::Preconditions.assert_class('sort', (x = opts.delete(:sort); x.nil? ? "journal_timestamp" : x), String)
1635
+ }.delete_if { |k, v| v.nil? }
1636
+ r = @client.request("/organizations/versions").with_query(query).get
1637
+ r.map { |x| ::Io::Flow::V0::Models::OrganizationVersion.new(x) }
1600
1638
  end
1601
1639
 
1602
1640
  # Returns information about a specific organization.
@@ -1635,6 +1673,14 @@ module Io
1635
1673
  r.map { |x| ::Io::Flow::V0::Models::RegionSetting.new(x) }
1636
1674
  end
1637
1675
 
1676
+ # Returns the list of enabled countries based on the region settings for a
1677
+ # specific organization
1678
+ def get_settings_and_regions_and_countries_and_available_by_organization_id(organization_id)
1679
+ HttpClient::Preconditions.assert_class('organization_id', organization_id, String)
1680
+ r = @client.request("/organizations/#{CGI.escape(organization_id)}/settings/regions/countries/available").get
1681
+ r.map { |x| ::Io::Flow::V0::Models::Country.new(x) }
1682
+ end
1683
+
1638
1684
  # Updates or creates a region setting for a specific organization
1639
1685
  def put_settings_and_regions_by_organization_id_and_region(organization_id, region, region_setting_form)
1640
1686
  HttpClient::Preconditions.assert_class('organization_id', organization_id, String)
@@ -1652,28 +1698,6 @@ module Io
1652
1698
  nil
1653
1699
  end
1654
1700
 
1655
- # Returns the list of enabled countries based on the region settings for a
1656
- # specific organization
1657
- def get_settings_and_regions_and_countries_and_available_by_organization_id(organization_id)
1658
- HttpClient::Preconditions.assert_class('organization_id', organization_id, String)
1659
- r = @client.request("/organizations/#{CGI.escape(organization_id)}/settings/regions/countries/available").get
1660
- r.map { |x| ::Io::Flow::V0::Models::Country.new(x) }
1661
- end
1662
-
1663
- # Provides visibility into recent changes of each object, including deletion
1664
- def get_versions(incoming={})
1665
- opts = HttpClient::Helper.symbolize_keys(incoming)
1666
- query = {
1667
- :id => (x = opts.delete(:id); x.nil? ? nil : HttpClient::Preconditions.assert_class('id', x, Array).map { |v| HttpClient::Preconditions.assert_class('id', v, String) }),
1668
- :organization => (x = opts.delete(:organization); x.nil? ? nil : HttpClient::Preconditions.assert_class('organization', x, Array).map { |v| HttpClient::Preconditions.assert_class('organization', v, String) }),
1669
- :limit => HttpClient::Preconditions.assert_class('limit', (x = opts.delete(:limit); x.nil? ? 25 : x), Integer),
1670
- :offset => HttpClient::Preconditions.assert_class('offset', (x = opts.delete(:offset); x.nil? ? 0 : x), Integer),
1671
- :sort => HttpClient::Preconditions.assert_class('sort', (x = opts.delete(:sort); x.nil? ? "journal_timestamp" : x), String)
1672
- }.delete_if { |k, v| v.nil? }
1673
- r = @client.request("/organizations/versions").with_query(query).get
1674
- r.map { |x| ::Io::Flow::V0::Models::OrganizationVersion.new(x) }
1675
- end
1676
-
1677
1701
  end
1678
1702
 
1679
1703
  class PaymentMethodRules
@@ -1877,6 +1901,20 @@ module Io
1877
1901
  ::Io::Flow::V0::Models::Subcatalog.new(r)
1878
1902
  end
1879
1903
 
1904
+ # Provides visibility into recent changes of each object, including deletion
1905
+ def get_versions(organization, incoming={})
1906
+ HttpClient::Preconditions.assert_class('organization', organization, String)
1907
+ opts = HttpClient::Helper.symbolize_keys(incoming)
1908
+ query = {
1909
+ :id => (x = opts.delete(:id); x.nil? ? nil : HttpClient::Preconditions.assert_class('id', x, Array).map { |v| HttpClient::Preconditions.assert_class('id', v, String) }),
1910
+ :limit => HttpClient::Preconditions.assert_class('limit', (x = opts.delete(:limit); x.nil? ? 25 : x), Integer),
1911
+ :offset => HttpClient::Preconditions.assert_class('offset', (x = opts.delete(:offset); x.nil? ? 0 : x), Integer),
1912
+ :sort => HttpClient::Preconditions.assert_class('sort', (x = opts.delete(:sort); x.nil? ? "journal_timestamp" : x), String)
1913
+ }.delete_if { |k, v| v.nil? }
1914
+ r = @client.request("/#{CGI.escape(organization)}/catalog/subcatalogs/versions").with_query(query).get
1915
+ r.map { |x| ::Io::Flow::V0::Models::SubcatalogVersion.new(x) }
1916
+ end
1917
+
1880
1918
  # Returns information about a specific subcatalog.
1881
1919
  def get_by_id(organization, id)
1882
1920
  HttpClient::Preconditions.assert_class('organization', organization, String)
@@ -1986,6 +2024,21 @@ module Io
1986
2024
  ::Io::Flow::V0::Models::SubcatalogFunction.new(r)
1987
2025
  end
1988
2026
 
2027
+ # Provides visibility into recent changes of each object, including deletion
2028
+ def get_functions_and_versions_by_subcatalog_id(organization, subcatalog_id, incoming={})
2029
+ HttpClient::Preconditions.assert_class('organization', organization, String)
2030
+ HttpClient::Preconditions.assert_class('subcatalog_id', subcatalog_id, String)
2031
+ opts = HttpClient::Helper.symbolize_keys(incoming)
2032
+ query = {
2033
+ :id => (x = opts.delete(:id); x.nil? ? nil : HttpClient::Preconditions.assert_class('id', x, Array).map { |v| HttpClient::Preconditions.assert_class('id', v, String) }),
2034
+ :limit => HttpClient::Preconditions.assert_class('limit', (x = opts.delete(:limit); x.nil? ? 25 : x), Integer),
2035
+ :offset => HttpClient::Preconditions.assert_class('offset', (x = opts.delete(:offset); x.nil? ? 0 : x), Integer),
2036
+ :sort => HttpClient::Preconditions.assert_class('sort', (x = opts.delete(:sort); x.nil? ? "journal_timestamp" : x), String)
2037
+ }.delete_if { |k, v| v.nil? }
2038
+ r = @client.request("/#{CGI.escape(organization)}/catalog/subcatalogs/#{CGI.escape(subcatalog_id)}/functions/versions").with_query(query).get
2039
+ r.map { |x| ::Io::Flow::V0::Models::SubcatalogFunctionVersion.new(x) }
2040
+ end
2041
+
1989
2042
  def get_functions_by_subcatalog_id_and_id(organization, subcatalog_id, id)
1990
2043
  HttpClient::Preconditions.assert_class('organization', organization, String)
1991
2044
  HttpClient::Preconditions.assert_class('subcatalog_id', subcatalog_id, String)
@@ -2005,21 +2058,6 @@ module Io
2005
2058
  nil
2006
2059
  end
2007
2060
 
2008
- # Provides visibility into recent changes of each object, including deletion
2009
- def get_functions_and_versions_by_subcatalog_id(organization, subcatalog_id, incoming={})
2010
- HttpClient::Preconditions.assert_class('organization', organization, String)
2011
- HttpClient::Preconditions.assert_class('subcatalog_id', subcatalog_id, String)
2012
- opts = HttpClient::Helper.symbolize_keys(incoming)
2013
- query = {
2014
- :id => (x = opts.delete(:id); x.nil? ? nil : HttpClient::Preconditions.assert_class('id', x, Array).map { |v| HttpClient::Preconditions.assert_class('id', v, String) }),
2015
- :limit => HttpClient::Preconditions.assert_class('limit', (x = opts.delete(:limit); x.nil? ? 25 : x), Integer),
2016
- :offset => HttpClient::Preconditions.assert_class('offset', (x = opts.delete(:offset); x.nil? ? 0 : x), Integer),
2017
- :sort => HttpClient::Preconditions.assert_class('sort', (x = opts.delete(:sort); x.nil? ? "journal_timestamp" : x), String)
2018
- }.delete_if { |k, v| v.nil? }
2019
- r = @client.request("/#{CGI.escape(organization)}/catalog/subcatalogs/#{CGI.escape(subcatalog_id)}/functions/versions").with_query(query).get
2020
- r.map { |x| ::Io::Flow::V0::Models::SubcatalogFunctionVersion.new(x) }
2021
- end
2022
-
2023
2061
  # Search inclusions. Always paginated.
2024
2062
  def get_inclusions_by_subcatalog_id(organization, subcatalog_id, incoming={})
2025
2063
  HttpClient::Preconditions.assert_class('organization', organization, String)
@@ -2114,20 +2152,6 @@ module Io
2114
2152
  ::Io::Flow::V0::Models::SubcatalogStatistics.new(r)
2115
2153
  end
2116
2154
 
2117
- # Provides visibility into recent changes of each object, including deletion
2118
- def get_versions(organization, incoming={})
2119
- HttpClient::Preconditions.assert_class('organization', organization, String)
2120
- opts = HttpClient::Helper.symbolize_keys(incoming)
2121
- query = {
2122
- :id => (x = opts.delete(:id); x.nil? ? nil : HttpClient::Preconditions.assert_class('id', x, Array).map { |v| HttpClient::Preconditions.assert_class('id', v, String) }),
2123
- :limit => HttpClient::Preconditions.assert_class('limit', (x = opts.delete(:limit); x.nil? ? 25 : x), Integer),
2124
- :offset => HttpClient::Preconditions.assert_class('offset', (x = opts.delete(:offset); x.nil? ? 0 : x), Integer),
2125
- :sort => HttpClient::Preconditions.assert_class('sort', (x = opts.delete(:sort); x.nil? ? "journal_timestamp" : x), String)
2126
- }.delete_if { |k, v| v.nil? }
2127
- r = @client.request("/#{CGI.escape(organization)}/catalog/subcatalogs/versions").with_query(query).get
2128
- r.map { |x| ::Io::Flow::V0::Models::SubcatalogVersion.new(x) }
2129
- end
2130
-
2131
2155
  end
2132
2156
 
2133
2157
  class SubcatalogItems
@@ -2154,15 +2178,6 @@ module Io
2154
2178
  r.map { |x| ::Io::Flow::V0::Models::SubcatalogItem.new(x) }
2155
2179
  end
2156
2180
 
2157
- # Returns information about specific subcatalog items.
2158
- def get_by_number(organization, subcatalog_id, number)
2159
- HttpClient::Preconditions.assert_class('organization', organization, String)
2160
- HttpClient::Preconditions.assert_class('subcatalog_id', subcatalog_id, String)
2161
- HttpClient::Preconditions.assert_class('number', number, String)
2162
- r = @client.request("/#{CGI.escape(organization)}/catalog/subcatalogs/#{CGI.escape(subcatalog_id)}/items/#{CGI.escape(number)}").get
2163
- ::Io::Flow::V0::Models::SubcatalogItem.new(r)
2164
- end
2165
-
2166
2181
  # Provides visibility into recent changes of each object, including deletion
2167
2182
  def get_versions(organization, subcatalog_id, incoming={})
2168
2183
  HttpClient::Preconditions.assert_class('organization', organization, String)
@@ -2179,6 +2194,15 @@ module Io
2179
2194
  r.map { |x| ::Io::Flow::V0::Models::SubcatalogItemVersion.new(x) }
2180
2195
  end
2181
2196
 
2197
+ # Returns information about specific subcatalog items.
2198
+ def get_by_number(organization, subcatalog_id, number)
2199
+ HttpClient::Preconditions.assert_class('organization', organization, String)
2200
+ HttpClient::Preconditions.assert_class('subcatalog_id', subcatalog_id, String)
2201
+ HttpClient::Preconditions.assert_class('number', number, String)
2202
+ r = @client.request("/#{CGI.escape(organization)}/catalog/subcatalogs/#{CGI.escape(subcatalog_id)}/items/#{CGI.escape(number)}").get
2203
+ ::Io::Flow::V0::Models::SubcatalogItem.new(r)
2204
+ end
2205
+
2182
2206
  end
2183
2207
 
2184
2208
  class Targetings
@@ -2208,6 +2232,20 @@ module Io
2208
2232
  ::Io::Flow::V0::Models::Targeting.new(r)
2209
2233
  end
2210
2234
 
2235
+ def get_versions(organization, incoming={})
2236
+ HttpClient::Preconditions.assert_class('organization', organization, String)
2237
+ opts = HttpClient::Helper.symbolize_keys(incoming)
2238
+ query = {
2239
+ :id => (x = opts.delete(:id); x.nil? ? nil : HttpClient::Preconditions.assert_class('id', x, Array).map { |v| HttpClient::Preconditions.assert_class('id', v, String) }),
2240
+ :key => (x = opts.delete(:key); x.nil? ? nil : HttpClient::Preconditions.assert_class('key', x, Array).map { |v| HttpClient::Preconditions.assert_class('key', v, String) }),
2241
+ :limit => HttpClient::Preconditions.assert_class('limit', (x = opts.delete(:limit); x.nil? ? 25 : x), Integer),
2242
+ :offset => HttpClient::Preconditions.assert_class('offset', (x = opts.delete(:offset); x.nil? ? 0 : x), Integer),
2243
+ :sort => HttpClient::Preconditions.assert_class('sort', (x = opts.delete(:sort); x.nil? ? "journal_timestamp" : x), String)
2244
+ }.delete_if { |k, v| v.nil? }
2245
+ r = @client.request("/#{CGI.escape(organization)}/catalog/targetings/versions").with_query(query).get
2246
+ r.map { |x| ::Io::Flow::V0::Models::TargetingVersion.new(x) }
2247
+ end
2248
+
2211
2249
  def get_by_key(organization, key)
2212
2250
  HttpClient::Preconditions.assert_class('organization', organization, String)
2213
2251
  HttpClient::Preconditions.assert_class('key', key, String)
@@ -2230,20 +2268,6 @@ module Io
2230
2268
  nil
2231
2269
  end
2232
2270
 
2233
- def get_versions(organization, incoming={})
2234
- HttpClient::Preconditions.assert_class('organization', organization, String)
2235
- opts = HttpClient::Helper.symbolize_keys(incoming)
2236
- query = {
2237
- :id => (x = opts.delete(:id); x.nil? ? nil : HttpClient::Preconditions.assert_class('id', x, Array).map { |v| HttpClient::Preconditions.assert_class('id', v, String) }),
2238
- :key => (x = opts.delete(:key); x.nil? ? nil : HttpClient::Preconditions.assert_class('key', x, Array).map { |v| HttpClient::Preconditions.assert_class('key', v, String) }),
2239
- :limit => HttpClient::Preconditions.assert_class('limit', (x = opts.delete(:limit); x.nil? ? 25 : x), Integer),
2240
- :offset => HttpClient::Preconditions.assert_class('offset', (x = opts.delete(:offset); x.nil? ? 0 : x), Integer),
2241
- :sort => HttpClient::Preconditions.assert_class('sort', (x = opts.delete(:sort); x.nil? ? "journal_timestamp" : x), String)
2242
- }.delete_if { |k, v| v.nil? }
2243
- r = @client.request("/#{CGI.escape(organization)}/catalog/targetings/versions").with_query(query).get
2244
- r.map { |x| ::Io::Flow::V0::Models::TargetingVersion.new(x) }
2245
- end
2246
-
2247
2271
  end
2248
2272
 
2249
2273
  class TargetingItems
@@ -2298,6 +2322,20 @@ module Io
2298
2322
  ::Io::Flow::V0::Models::ItemFunction.new(r)
2299
2323
  end
2300
2324
 
2325
+ # Provides visibility into recent changes of each object, including deletion
2326
+ def get_versions(organization, incoming={})
2327
+ HttpClient::Preconditions.assert_class('organization', organization, String)
2328
+ opts = HttpClient::Helper.symbolize_keys(incoming)
2329
+ query = {
2330
+ :id => (x = opts.delete(:id); x.nil? ? nil : HttpClient::Preconditions.assert_class('id', x, Array).map { |v| HttpClient::Preconditions.assert_class('id', v, String) }),
2331
+ :limit => HttpClient::Preconditions.assert_class('limit', (x = opts.delete(:limit); x.nil? ? 25 : x), Integer),
2332
+ :offset => HttpClient::Preconditions.assert_class('offset', (x = opts.delete(:offset); x.nil? ? 0 : x), Integer),
2333
+ :sort => HttpClient::Preconditions.assert_class('sort', (x = opts.delete(:sort); x.nil? ? "journal_timestamp" : x), String)
2334
+ }.delete_if { |k, v| v.nil? }
2335
+ r = @client.request("/#{CGI.escape(organization)}/item-functions/versions").with_query(query).get
2336
+ r.map { |x| ::Io::Flow::V0::Models::ItemFunctionVersion.new(x) }
2337
+ end
2338
+
2301
2339
  # Returns information about a specific item function.
2302
2340
  def get_by_key(organization, key)
2303
2341
  HttpClient::Preconditions.assert_class('organization', organization, String)
@@ -2323,20 +2361,6 @@ module Io
2323
2361
  nil
2324
2362
  end
2325
2363
 
2326
- # Provides visibility into recent changes of each object, including deletion
2327
- def get_versions(organization, incoming={})
2328
- HttpClient::Preconditions.assert_class('organization', organization, String)
2329
- opts = HttpClient::Helper.symbolize_keys(incoming)
2330
- query = {
2331
- :id => (x = opts.delete(:id); x.nil? ? nil : HttpClient::Preconditions.assert_class('id', x, Array).map { |v| HttpClient::Preconditions.assert_class('id', v, String) }),
2332
- :limit => HttpClient::Preconditions.assert_class('limit', (x = opts.delete(:limit); x.nil? ? 25 : x), Integer),
2333
- :offset => HttpClient::Preconditions.assert_class('offset', (x = opts.delete(:offset); x.nil? ? 0 : x), Integer),
2334
- :sort => HttpClient::Preconditions.assert_class('sort', (x = opts.delete(:sort); x.nil? ? "journal_timestamp" : x), String)
2335
- }.delete_if { |k, v| v.nil? }
2336
- r = @client.request("/#{CGI.escape(organization)}/item-functions/versions").with_query(query).get
2337
- r.map { |x| ::Io::Flow::V0::Models::ItemFunctionVersion.new(x) }
2338
- end
2339
-
2340
2364
  end
2341
2365
 
2342
2366
  class OrganizationCurrencySettings
@@ -2369,6 +2393,20 @@ module Io
2369
2393
  ::Io::Flow::V0::Models::OrganizationCurrencySetting.new(r)
2370
2394
  end
2371
2395
 
2396
+ # Provides visibility into recent changes of each object, including deletion.
2397
+ def get_versions(organization, incoming={})
2398
+ HttpClient::Preconditions.assert_class('organization', organization, String)
2399
+ opts = HttpClient::Helper.symbolize_keys(incoming)
2400
+ query = {
2401
+ :id => (x = opts.delete(:id); x.nil? ? nil : HttpClient::Preconditions.assert_class('id', x, Array).map { |v| HttpClient::Preconditions.assert_class('id', v, String) }),
2402
+ :limit => HttpClient::Preconditions.assert_class('limit', (x = opts.delete(:limit); x.nil? ? 25 : x), Integer),
2403
+ :offset => HttpClient::Preconditions.assert_class('offset', (x = opts.delete(:offset); x.nil? ? 0 : x), Integer),
2404
+ :sort => HttpClient::Preconditions.assert_class('sort', (x = opts.delete(:sort); x.nil? ? "journal_timestamp" : x), String)
2405
+ }.delete_if { |k, v| v.nil? }
2406
+ r = @client.request("/#{CGI.escape(organization)}/currency/settings/versions").with_query(query).get
2407
+ r.map { |x| ::Io::Flow::V0::Models::OrganizationCurrencySettingVersion.new(x) }
2408
+ end
2409
+
2372
2410
  def get_by_id(organization, id)
2373
2411
  HttpClient::Preconditions.assert_class('organization', organization, String)
2374
2412
  HttpClient::Preconditions.assert_class('id', id, String)
@@ -2393,20 +2431,6 @@ module Io
2393
2431
  nil
2394
2432
  end
2395
2433
 
2396
- # Provides visibility into recent changes of each object, including deletion.
2397
- def get_versions(organization, incoming={})
2398
- HttpClient::Preconditions.assert_class('organization', organization, String)
2399
- opts = HttpClient::Helper.symbolize_keys(incoming)
2400
- query = {
2401
- :id => (x = opts.delete(:id); x.nil? ? nil : HttpClient::Preconditions.assert_class('id', x, Array).map { |v| HttpClient::Preconditions.assert_class('id', v, String) }),
2402
- :limit => HttpClient::Preconditions.assert_class('limit', (x = opts.delete(:limit); x.nil? ? 25 : x), Integer),
2403
- :offset => HttpClient::Preconditions.assert_class('offset', (x = opts.delete(:offset); x.nil? ? 0 : x), Integer),
2404
- :sort => HttpClient::Preconditions.assert_class('sort', (x = opts.delete(:sort); x.nil? ? "journal_timestamp" : x), String)
2405
- }.delete_if { |k, v| v.nil? }
2406
- r = @client.request("/#{CGI.escape(organization)}/currency/settings/versions").with_query(query).get
2407
- r.map { |x| ::Io::Flow::V0::Models::OrganizationCurrencySettingVersion.new(x) }
2408
- end
2409
-
2410
2434
  end
2411
2435
 
2412
2436
  class Rates
@@ -2518,6 +2542,21 @@ module Io
2518
2542
  ::Io::Flow::V0::Models::HarmonizedItem.new(r)
2519
2543
  end
2520
2544
 
2545
+ # Provides visibility into recent changes of each object, including deletion
2546
+ def get_versions(organization, incoming={})
2547
+ HttpClient::Preconditions.assert_class('organization', organization, String)
2548
+ opts = HttpClient::Helper.symbolize_keys(incoming)
2549
+ query = {
2550
+ :id => (x = opts.delete(:id); x.nil? ? nil : HttpClient::Preconditions.assert_class('id', x, Array).map { |v| HttpClient::Preconditions.assert_class('id', v, String) }),
2551
+ :item_id => (x = opts.delete(:item_id); x.nil? ? nil : HttpClient::Preconditions.assert_class('item_id', x, Array).map { |v| HttpClient::Preconditions.assert_class('item_id', v, String) }),
2552
+ :limit => HttpClient::Preconditions.assert_class('limit', (x = opts.delete(:limit); x.nil? ? 25 : x), Integer),
2553
+ :offset => HttpClient::Preconditions.assert_class('offset', (x = opts.delete(:offset); x.nil? ? 0 : x), Integer),
2554
+ :sort => HttpClient::Preconditions.assert_class('sort', (x = opts.delete(:sort); x.nil? ? "journal_timestamp" : x), String)
2555
+ }.delete_if { |k, v| v.nil? }
2556
+ r = @client.request("/#{CGI.escape(organization)}/harmonization/items/versions").with_query(query).get
2557
+ r.map { |x| ::Io::Flow::V0::Models::HarmonizedItemVersion.new(x) }
2558
+ end
2559
+
2521
2560
  def get_by_number(organization, number)
2522
2561
  HttpClient::Preconditions.assert_class('organization', organization, String)
2523
2562
  HttpClient::Preconditions.assert_class('number', number, String)
@@ -2541,21 +2580,6 @@ module Io
2541
2580
  nil
2542
2581
  end
2543
2582
 
2544
- # Provides visibility into recent changes of each object, including deletion
2545
- def get_versions(organization, incoming={})
2546
- HttpClient::Preconditions.assert_class('organization', organization, String)
2547
- opts = HttpClient::Helper.symbolize_keys(incoming)
2548
- query = {
2549
- :id => (x = opts.delete(:id); x.nil? ? nil : HttpClient::Preconditions.assert_class('id', x, Array).map { |v| HttpClient::Preconditions.assert_class('id', v, String) }),
2550
- :item_id => (x = opts.delete(:item_id); x.nil? ? nil : HttpClient::Preconditions.assert_class('item_id', x, Array).map { |v| HttpClient::Preconditions.assert_class('item_id', v, String) }),
2551
- :limit => HttpClient::Preconditions.assert_class('limit', (x = opts.delete(:limit); x.nil? ? 25 : x), Integer),
2552
- :offset => HttpClient::Preconditions.assert_class('offset', (x = opts.delete(:offset); x.nil? ? 0 : x), Integer),
2553
- :sort => HttpClient::Preconditions.assert_class('sort', (x = opts.delete(:sort); x.nil? ? "journal_timestamp" : x), String)
2554
- }.delete_if { |k, v| v.nil? }
2555
- r = @client.request("/#{CGI.escape(organization)}/harmonization/items/versions").with_query(query).get
2556
- r.map { |x| ::Io::Flow::V0::Models::HarmonizedItemVersion.new(x) }
2557
- end
2558
-
2559
2583
  end
2560
2584
 
2561
2585
  class HarmonizedItemDuties
@@ -2587,20 +2611,6 @@ module Io
2587
2611
  ::Io::Flow::V0::Models::HarmonizedItemDuty.new(r)
2588
2612
  end
2589
2613
 
2590
- def get_by_id(organization, id)
2591
- HttpClient::Preconditions.assert_class('organization', organization, String)
2592
- HttpClient::Preconditions.assert_class('id', id, String)
2593
- r = @client.request("/#{CGI.escape(organization)}/harmonization/item-duties/#{CGI.escape(id)}").get
2594
- ::Io::Flow::V0::Models::HarmonizedItemDuty.new(r)
2595
- end
2596
-
2597
- def delete_by_id(organization, id)
2598
- HttpClient::Preconditions.assert_class('organization', organization, String)
2599
- HttpClient::Preconditions.assert_class('id', id, String)
2600
- r = @client.request("/#{CGI.escape(organization)}/harmonization/item-duties/#{CGI.escape(id)}").delete
2601
- nil
2602
- end
2603
-
2604
2614
  # Provides visibility into recent changes of each object, including deletion
2605
2615
  def get_versions(organization, incoming={})
2606
2616
  HttpClient::Preconditions.assert_class('organization', organization, String)
@@ -2616,6 +2626,20 @@ module Io
2616
2626
  r.map { |x| ::Io::Flow::V0::Models::HarmonizedItemDutyVersion.new(x) }
2617
2627
  end
2618
2628
 
2629
+ def get_by_id(organization, id)
2630
+ HttpClient::Preconditions.assert_class('organization', organization, String)
2631
+ HttpClient::Preconditions.assert_class('id', id, String)
2632
+ r = @client.request("/#{CGI.escape(organization)}/harmonization/item-duties/#{CGI.escape(id)}").get
2633
+ ::Io::Flow::V0::Models::HarmonizedItemDuty.new(r)
2634
+ end
2635
+
2636
+ def delete_by_id(organization, id)
2637
+ HttpClient::Preconditions.assert_class('organization', organization, String)
2638
+ HttpClient::Preconditions.assert_class('id', id, String)
2639
+ r = @client.request("/#{CGI.escape(organization)}/harmonization/item-duties/#{CGI.escape(id)}").delete
2640
+ nil
2641
+ end
2642
+
2619
2643
  end
2620
2644
 
2621
2645
  class HarmonizedLandedCosts
@@ -2808,6 +2832,38 @@ module Io
2808
2832
  ::Io::Flow::V0::Models::Authorization.from_json(r)
2809
2833
  end
2810
2834
 
2835
+ # Create a new card authorization using card details, or the token of a
2836
+ # previously tokenized card.
2837
+ def post_card(organization, card_authorization_form)
2838
+ HttpClient::Preconditions.assert_class('organization', organization, String)
2839
+ (x = card_authorization_form; x.is_a?(::Io::Flow::V0::Models::CardAuthorizationForm) ? x : ::Io::Flow::V0::Models::CardAuthorizationForm.new(x))
2840
+ r = @client.request("/#{CGI.escape(organization)}/authorizations/card").with_json(card_authorization_form.to_json).post
2841
+ ::Io::Flow::V0::Models::CardAuthorization.new(r)
2842
+ end
2843
+
2844
+ # Create a new online authorization.
2845
+ def post_online(organization, authorization_form)
2846
+ HttpClient::Preconditions.assert_class('organization', organization, String)
2847
+ (x = authorization_form; x.is_a?(::Io::Flow::V0::Models::AuthorizationForm) ? x : ::Io::Flow::V0::Models::AuthorizationForm.from_json(x))
2848
+ r = @client.request("/#{CGI.escape(organization)}/authorizations/online").with_json(authorization_form.to_json).post
2849
+ ::Io::Flow::V0::Models::OnlineAuthorization.new(r)
2850
+ end
2851
+
2852
+ # Provides visibility into recent changes of each object, including deletion
2853
+ def get_versions(organization, incoming={})
2854
+ HttpClient::Preconditions.assert_class('organization', organization, String)
2855
+ opts = HttpClient::Helper.symbolize_keys(incoming)
2856
+ query = {
2857
+ :id => (x = opts.delete(:id); x.nil? ? nil : HttpClient::Preconditions.assert_class('id', x, Array).map { |v| HttpClient::Preconditions.assert_class('id', v, Integer) }),
2858
+ :authorization_id => (x = opts.delete(:authorization_id); x.nil? ? nil : HttpClient::Preconditions.assert_class('authorization_id', x, Array).map { |v| HttpClient::Preconditions.assert_class('authorization_id', v, String) }),
2859
+ :limit => HttpClient::Preconditions.assert_class('limit', (x = opts.delete(:limit); x.nil? ? 25 : x), Integer),
2860
+ :offset => HttpClient::Preconditions.assert_class('offset', (x = opts.delete(:offset); x.nil? ? 0 : x), Integer),
2861
+ :sort => HttpClient::Preconditions.assert_class('sort', (x = opts.delete(:sort); x.nil? ? "journal_timestamp" : x), String)
2862
+ }.delete_if { |k, v| v.nil? }
2863
+ r = @client.request("/#{CGI.escape(organization)}/authorizations/versions").with_query(query).get
2864
+ r.map { |x| ::Io::Flow::V0::Models::AuthorizationVersion.new(x) }
2865
+ end
2866
+
2811
2867
  # Returns information about a specific authorization.
2812
2868
  def get_by_key(organization, key, incoming={})
2813
2869
  HttpClient::Preconditions.assert_class('organization', organization, String)
@@ -2858,38 +2914,6 @@ module Io
2858
2914
  ::Io::Flow::V0::Models::Authorization.from_json(r)
2859
2915
  end
2860
2916
 
2861
- # Create a new card authorization using card details, or the token of a
2862
- # previously tokenized card.
2863
- def post_card(organization, card_authorization_form)
2864
- HttpClient::Preconditions.assert_class('organization', organization, String)
2865
- (x = card_authorization_form; x.is_a?(::Io::Flow::V0::Models::CardAuthorizationForm) ? x : ::Io::Flow::V0::Models::CardAuthorizationForm.new(x))
2866
- r = @client.request("/#{CGI.escape(organization)}/authorizations/card").with_json(card_authorization_form.to_json).post
2867
- ::Io::Flow::V0::Models::CardAuthorization.new(r)
2868
- end
2869
-
2870
- # Create a new online authorization.
2871
- def post_online(organization, authorization_form)
2872
- HttpClient::Preconditions.assert_class('organization', organization, String)
2873
- (x = authorization_form; x.is_a?(::Io::Flow::V0::Models::AuthorizationForm) ? x : ::Io::Flow::V0::Models::AuthorizationForm.from_json(x))
2874
- r = @client.request("/#{CGI.escape(organization)}/authorizations/online").with_json(authorization_form.to_json).post
2875
- ::Io::Flow::V0::Models::OnlineAuthorization.new(r)
2876
- end
2877
-
2878
- # Provides visibility into recent changes of each object, including deletion
2879
- def get_versions(organization, incoming={})
2880
- HttpClient::Preconditions.assert_class('organization', organization, String)
2881
- opts = HttpClient::Helper.symbolize_keys(incoming)
2882
- query = {
2883
- :id => (x = opts.delete(:id); x.nil? ? nil : HttpClient::Preconditions.assert_class('id', x, Array).map { |v| HttpClient::Preconditions.assert_class('id', v, Integer) }),
2884
- :authorization_id => (x = opts.delete(:authorization_id); x.nil? ? nil : HttpClient::Preconditions.assert_class('authorization_id', x, Array).map { |v| HttpClient::Preconditions.assert_class('authorization_id', v, String) }),
2885
- :limit => HttpClient::Preconditions.assert_class('limit', (x = opts.delete(:limit); x.nil? ? 25 : x), Integer),
2886
- :offset => HttpClient::Preconditions.assert_class('offset', (x = opts.delete(:offset); x.nil? ? 0 : x), Integer),
2887
- :sort => HttpClient::Preconditions.assert_class('sort', (x = opts.delete(:sort); x.nil? ? "journal_timestamp" : x), String)
2888
- }.delete_if { |k, v| v.nil? }
2889
- r = @client.request("/#{CGI.escape(organization)}/authorizations/versions").with_query(query).get
2890
- r.map { |x| ::Io::Flow::V0::Models::AuthorizationVersion.new(x) }
2891
- end
2892
-
2893
2917
  end
2894
2918
 
2895
2919
  class Captures
@@ -2922,14 +2946,6 @@ module Io
2922
2946
  ::Io::Flow::V0::Models::Capture.new(r)
2923
2947
  end
2924
2948
 
2925
- # Returns information about a specific capture.
2926
- def get_by_key(organization, key)
2927
- HttpClient::Preconditions.assert_class('organization', organization, String)
2928
- HttpClient::Preconditions.assert_class('key', key, String)
2929
- r = @client.request("/#{CGI.escape(organization)}/captures/#{CGI.escape(key)}").get
2930
- ::Io::Flow::V0::Models::Capture.new(r)
2931
- end
2932
-
2933
2949
  # Provides visibility into recent changes of each object, including deletion
2934
2950
  def get_versions(organization, incoming={})
2935
2951
  HttpClient::Preconditions.assert_class('organization', organization, String)
@@ -2945,6 +2961,14 @@ module Io
2945
2961
  r.map { |x| ::Io::Flow::V0::Models::CaptureVersion.new(x) }
2946
2962
  end
2947
2963
 
2964
+ # Returns information about a specific capture.
2965
+ def get_by_key(organization, key)
2966
+ HttpClient::Preconditions.assert_class('organization', organization, String)
2967
+ HttpClient::Preconditions.assert_class('key', key, String)
2968
+ r = @client.request("/#{CGI.escape(organization)}/captures/#{CGI.escape(key)}").get
2969
+ ::Io::Flow::V0::Models::Capture.new(r)
2970
+ end
2971
+
2948
2972
  end
2949
2973
 
2950
2974
  class Cards
@@ -2976,22 +3000,6 @@ module Io
2976
3000
  ::Io::Flow::V0::Models::Card.new(r)
2977
3001
  end
2978
3002
 
2979
- # Returns information about a specific card.
2980
- def get_by_token(organization, token)
2981
- HttpClient::Preconditions.assert_class('organization', organization, String)
2982
- HttpClient::Preconditions.assert_class('token', token, String)
2983
- r = @client.request("/#{CGI.escape(organization)}/cards/#{CGI.escape(token)}").get
2984
- ::Io::Flow::V0::Models::Card.new(r)
2985
- end
2986
-
2987
- # Deletes the specified card
2988
- def delete_by_token(organization, token)
2989
- HttpClient::Preconditions.assert_class('organization', organization, String)
2990
- HttpClient::Preconditions.assert_class('token', token, String)
2991
- r = @client.request("/#{CGI.escape(organization)}/cards/#{CGI.escape(token)}").delete
2992
- nil
2993
- end
2994
-
2995
3003
  # Creates a card from a one time nonce. Each nonce can be used at most once
2996
3004
  # and you will receive a validation error if the nonce has already been
2997
3005
  # exchanged.
@@ -3018,6 +3026,22 @@ module Io
3018
3026
  r.map { |x| ::Io::Flow::V0::Models::CardVersion.new(x) }
3019
3027
  end
3020
3028
 
3029
+ # Returns information about a specific card.
3030
+ def get_by_token(organization, token)
3031
+ HttpClient::Preconditions.assert_class('organization', organization, String)
3032
+ HttpClient::Preconditions.assert_class('token', token, String)
3033
+ r = @client.request("/#{CGI.escape(organization)}/cards/#{CGI.escape(token)}").get
3034
+ ::Io::Flow::V0::Models::Card.new(r)
3035
+ end
3036
+
3037
+ # Deletes the specified card
3038
+ def delete_by_token(organization, token)
3039
+ HttpClient::Preconditions.assert_class('organization', organization, String)
3040
+ HttpClient::Preconditions.assert_class('token', token, String)
3041
+ r = @client.request("/#{CGI.escape(organization)}/cards/#{CGI.escape(token)}").delete
3042
+ nil
3043
+ end
3044
+
3021
3045
  end
3022
3046
 
3023
3047
  class Payments
@@ -3049,6 +3073,21 @@ module Io
3049
3073
  ::Io::Flow::V0::Models::Payment.from_json(r)
3050
3074
  end
3051
3075
 
3076
+ # Provides visibility into recent changes of each object, including deletion
3077
+ def get_versions(organization, incoming={})
3078
+ HttpClient::Preconditions.assert_class('organization', organization, String)
3079
+ opts = HttpClient::Helper.symbolize_keys(incoming)
3080
+ query = {
3081
+ :id => (x = opts.delete(:id); x.nil? ? nil : HttpClient::Preconditions.assert_class('id', x, Array).map { |v| HttpClient::Preconditions.assert_class('id', v, Integer) }),
3082
+ :payment_id => (x = opts.delete(:payment_id); x.nil? ? nil : HttpClient::Preconditions.assert_class('payment_id', x, Array).map { |v| HttpClient::Preconditions.assert_class('payment_id', v, String) }),
3083
+ :limit => HttpClient::Preconditions.assert_class('limit', (x = opts.delete(:limit); x.nil? ? 25 : x), Integer),
3084
+ :offset => HttpClient::Preconditions.assert_class('offset', (x = opts.delete(:offset); x.nil? ? 0 : x), Integer),
3085
+ :sort => HttpClient::Preconditions.assert_class('sort', (x = opts.delete(:sort); x.nil? ? "journal_timestamp" : x), String)
3086
+ }.delete_if { |k, v| v.nil? }
3087
+ r = @client.request("/#{CGI.escape(organization)}/payments/versions").with_query(query).get
3088
+ r.map { |x| ::Io::Flow::V0::Models::PaymentVersion.new(x) }
3089
+ end
3090
+
3052
3091
  # Returns information about a specific payment.
3053
3092
  def get_by_id(organization, id)
3054
3093
  HttpClient::Preconditions.assert_class('organization', organization, String)
@@ -3065,21 +3104,6 @@ module Io
3065
3104
  nil
3066
3105
  end
3067
3106
 
3068
- # Provides visibility into recent changes of each object, including deletion
3069
- def get_versions(organization, incoming={})
3070
- HttpClient::Preconditions.assert_class('organization', organization, String)
3071
- opts = HttpClient::Helper.symbolize_keys(incoming)
3072
- query = {
3073
- :id => (x = opts.delete(:id); x.nil? ? nil : HttpClient::Preconditions.assert_class('id', x, Array).map { |v| HttpClient::Preconditions.assert_class('id', v, Integer) }),
3074
- :payment_id => (x = opts.delete(:payment_id); x.nil? ? nil : HttpClient::Preconditions.assert_class('payment_id', x, Array).map { |v| HttpClient::Preconditions.assert_class('payment_id', v, String) }),
3075
- :limit => HttpClient::Preconditions.assert_class('limit', (x = opts.delete(:limit); x.nil? ? 25 : x), Integer),
3076
- :offset => HttpClient::Preconditions.assert_class('offset', (x = opts.delete(:offset); x.nil? ? 0 : x), Integer),
3077
- :sort => HttpClient::Preconditions.assert_class('sort', (x = opts.delete(:sort); x.nil? ? "journal_timestamp" : x), String)
3078
- }.delete_if { |k, v| v.nil? }
3079
- r = @client.request("/#{CGI.escape(organization)}/payments/versions").with_query(query).get
3080
- r.map { |x| ::Io::Flow::V0::Models::PaymentVersion.new(x) }
3081
- end
3082
-
3083
3107
  end
3084
3108
 
3085
3109
  class PublicKeys
@@ -3143,14 +3167,6 @@ module Io
3143
3167
  ::Io::Flow::V0::Models::Refund.new(r)
3144
3168
  end
3145
3169
 
3146
- # Returns information about a specific refund.
3147
- def get_by_key(organization, key)
3148
- HttpClient::Preconditions.assert_class('organization', organization, String)
3149
- HttpClient::Preconditions.assert_class('key', key, String)
3150
- r = @client.request("/#{CGI.escape(organization)}/refunds/#{CGI.escape(key)}").get
3151
- ::Io::Flow::V0::Models::Refund.new(r)
3152
- end
3153
-
3154
3170
  # Returns a refund order summary for the specified order.
3155
3171
  def get_summary_by_order_number(organization, order_number)
3156
3172
  HttpClient::Preconditions.assert_class('organization', organization, String)
@@ -3174,6 +3190,14 @@ module Io
3174
3190
  r.map { |x| ::Io::Flow::V0::Models::RefundVersion.new(x) }
3175
3191
  end
3176
3192
 
3193
+ # Returns information about a specific refund.
3194
+ def get_by_key(organization, key)
3195
+ HttpClient::Preconditions.assert_class('organization', organization, String)
3196
+ HttpClient::Preconditions.assert_class('key', key, String)
3197
+ r = @client.request("/#{CGI.escape(organization)}/refunds/#{CGI.escape(key)}").get
3198
+ ::Io::Flow::V0::Models::Refund.new(r)
3199
+ end
3200
+
3177
3201
  end
3178
3202
 
3179
3203
  class Reversals
@@ -3205,6 +3229,20 @@ module Io
3205
3229
  ::Io::Flow::V0::Models::Reversal.new(r)
3206
3230
  end
3207
3231
 
3232
+ def get_versions(organization, incoming={})
3233
+ HttpClient::Preconditions.assert_class('organization', organization, String)
3234
+ opts = HttpClient::Helper.symbolize_keys(incoming)
3235
+ query = {
3236
+ :id => (x = opts.delete(:id); x.nil? ? nil : HttpClient::Preconditions.assert_class('id', x, Array).map { |v| HttpClient::Preconditions.assert_class('id', v, Integer) }),
3237
+ :reversal_id => (x = opts.delete(:reversal_id); x.nil? ? nil : HttpClient::Preconditions.assert_class('reversal_id', x, Array).map { |v| HttpClient::Preconditions.assert_class('reversal_id', v, String) }),
3238
+ :limit => HttpClient::Preconditions.assert_class('limit', (x = opts.delete(:limit); x.nil? ? 25 : x), Integer),
3239
+ :offset => HttpClient::Preconditions.assert_class('offset', (x = opts.delete(:offset); x.nil? ? 0 : x), Integer),
3240
+ :sort => HttpClient::Preconditions.assert_class('sort', (x = opts.delete(:sort); x.nil? ? "journal_timestamp" : x), String)
3241
+ }.delete_if { |k, v| v.nil? }
3242
+ r = @client.request("/#{CGI.escape(organization)}/reversals/versions").with_query(query).get
3243
+ r.map { |x| ::Io::Flow::V0::Models::ReversalVersion.new(x) }
3244
+ end
3245
+
3208
3246
  def get_by_key(organization, key)
3209
3247
  HttpClient::Preconditions.assert_class('organization', organization, String)
3210
3248
  HttpClient::Preconditions.assert_class('key', key, String)
@@ -3222,20 +3260,6 @@ module Io
3222
3260
  ::Io::Flow::V0::Models::Reversal.new(r)
3223
3261
  end
3224
3262
 
3225
- def get_versions(organization, incoming={})
3226
- HttpClient::Preconditions.assert_class('organization', organization, String)
3227
- opts = HttpClient::Helper.symbolize_keys(incoming)
3228
- query = {
3229
- :id => (x = opts.delete(:id); x.nil? ? nil : HttpClient::Preconditions.assert_class('id', x, Array).map { |v| HttpClient::Preconditions.assert_class('id', v, Integer) }),
3230
- :reversal_id => (x = opts.delete(:reversal_id); x.nil? ? nil : HttpClient::Preconditions.assert_class('reversal_id', x, Array).map { |v| HttpClient::Preconditions.assert_class('reversal_id', v, String) }),
3231
- :limit => HttpClient::Preconditions.assert_class('limit', (x = opts.delete(:limit); x.nil? ? 25 : x), Integer),
3232
- :offset => HttpClient::Preconditions.assert_class('offset', (x = opts.delete(:offset); x.nil? ? 0 : x), Integer),
3233
- :sort => HttpClient::Preconditions.assert_class('sort', (x = opts.delete(:sort); x.nil? ? "journal_timestamp" : x), String)
3234
- }.delete_if { |k, v| v.nil? }
3235
- r = @client.request("/#{CGI.escape(organization)}/reversals/versions").with_query(query).get
3236
- r.map { |x| ::Io::Flow::V0::Models::ReversalVersion.new(x) }
3237
- end
3238
-
3239
3263
  end
3240
3264
 
3241
3265
  class VirtualCards
@@ -3283,6 +3307,20 @@ module Io
3283
3307
  ::Io::Flow::V0::Models::Center.new(r)
3284
3308
  end
3285
3309
 
3310
+ def get_versions(organization, incoming={})
3311
+ HttpClient::Preconditions.assert_class('organization', organization, String)
3312
+ opts = HttpClient::Helper.symbolize_keys(incoming)
3313
+ query = {
3314
+ :id => (x = opts.delete(:id); x.nil? ? nil : HttpClient::Preconditions.assert_class('id', x, Array).map { |v| HttpClient::Preconditions.assert_class('id', v, String) }),
3315
+ :key => (x = opts.delete(:key); x.nil? ? nil : HttpClient::Preconditions.assert_class('key', x, Array).map { |v| HttpClient::Preconditions.assert_class('key', v, String) }),
3316
+ :limit => HttpClient::Preconditions.assert_class('limit', (x = opts.delete(:limit); x.nil? ? 25 : x), Integer),
3317
+ :offset => HttpClient::Preconditions.assert_class('offset', (x = opts.delete(:offset); x.nil? ? 0 : x), Integer),
3318
+ :sort => HttpClient::Preconditions.assert_class('sort', (x = opts.delete(:sort); x.nil? ? "journal_timestamp" : x), String)
3319
+ }.delete_if { |k, v| v.nil? }
3320
+ r = @client.request("/#{CGI.escape(organization)}/centers/versions").with_query(query).get
3321
+ r.map { |x| ::Io::Flow::V0::Models::CenterVersion.new(x) }
3322
+ end
3323
+
3286
3324
  def get_by_key(organization, key)
3287
3325
  HttpClient::Preconditions.assert_class('organization', organization, String)
3288
3326
  HttpClient::Preconditions.assert_class('key', key, String)
@@ -3298,20 +3336,6 @@ module Io
3298
3336
  ::Io::Flow::V0::Models::Center.new(r)
3299
3337
  end
3300
3338
 
3301
- def get_versions(organization, incoming={})
3302
- HttpClient::Preconditions.assert_class('organization', organization, String)
3303
- opts = HttpClient::Helper.symbolize_keys(incoming)
3304
- query = {
3305
- :id => (x = opts.delete(:id); x.nil? ? nil : HttpClient::Preconditions.assert_class('id', x, Array).map { |v| HttpClient::Preconditions.assert_class('id', v, String) }),
3306
- :key => (x = opts.delete(:key); x.nil? ? nil : HttpClient::Preconditions.assert_class('key', x, Array).map { |v| HttpClient::Preconditions.assert_class('key', v, String) }),
3307
- :limit => HttpClient::Preconditions.assert_class('limit', (x = opts.delete(:limit); x.nil? ? 25 : x), Integer),
3308
- :offset => HttpClient::Preconditions.assert_class('offset', (x = opts.delete(:offset); x.nil? ? 0 : x), Integer),
3309
- :sort => HttpClient::Preconditions.assert_class('sort', (x = opts.delete(:sort); x.nil? ? "journal_timestamp" : x), String)
3310
- }.delete_if { |k, v| v.nil? }
3311
- r = @client.request("/#{CGI.escape(organization)}/centers/versions").with_query(query).get
3312
- r.map { |x| ::Io::Flow::V0::Models::CenterVersion.new(x) }
3313
- end
3314
-
3315
3339
  end
3316
3340
 
3317
3341
  class DeliveryWindows
@@ -3406,13 +3430,6 @@ module Io
3406
3430
  r.map { |x| ::Io::Flow::V0::Models::InventorySnapshot.new(x) }
3407
3431
  end
3408
3432
 
3409
- def get_by_id(organization, id)
3410
- HttpClient::Preconditions.assert_class('organization', organization, String)
3411
- HttpClient::Preconditions.assert_class('id', id, String)
3412
- r = @client.request("/#{CGI.escape(organization)}/inventory_snapshots/#{CGI.escape(id)}").get
3413
- ::Io::Flow::V0::Models::InventorySnapshot.new(r)
3414
- end
3415
-
3416
3433
  def get_versions(organization, incoming={})
3417
3434
  HttpClient::Preconditions.assert_class('organization', organization, String)
3418
3435
  opts = HttpClient::Helper.symbolize_keys(incoming)
@@ -3427,6 +3444,13 @@ module Io
3427
3444
  r.map { |x| ::Io::Flow::V0::Models::InventorySnapshotVersion.new(x) }
3428
3445
  end
3429
3446
 
3447
+ def get_by_id(organization, id)
3448
+ HttpClient::Preconditions.assert_class('organization', organization, String)
3449
+ HttpClient::Preconditions.assert_class('id', id, String)
3450
+ r = @client.request("/#{CGI.escape(organization)}/inventory_snapshots/#{CGI.escape(id)}").get
3451
+ ::Io::Flow::V0::Models::InventorySnapshot.new(r)
3452
+ end
3453
+
3430
3454
  end
3431
3455
 
3432
3456
  class InventoryUpdates
@@ -3457,13 +3481,6 @@ module Io
3457
3481
  ::Io::Flow::V0::Models::InventoryUpdate.new(r)
3458
3482
  end
3459
3483
 
3460
- def get_by_id(organization, id)
3461
- HttpClient::Preconditions.assert_class('organization', organization, String)
3462
- HttpClient::Preconditions.assert_class('id', id, String)
3463
- r = @client.request("/#{CGI.escape(organization)}/inventory_updates/#{CGI.escape(id)}").get
3464
- ::Io::Flow::V0::Models::InventoryUpdate.new(r)
3465
- end
3466
-
3467
3484
  def get_versions(organization, incoming={})
3468
3485
  HttpClient::Preconditions.assert_class('organization', organization, String)
3469
3486
  opts = HttpClient::Helper.symbolize_keys(incoming)
@@ -3478,6 +3495,13 @@ module Io
3478
3495
  r.map { |x| ::Io::Flow::V0::Models::InventoryUpdateVersion.new(x) }
3479
3496
  end
3480
3497
 
3498
+ def get_by_id(organization, id)
3499
+ HttpClient::Preconditions.assert_class('organization', organization, String)
3500
+ HttpClient::Preconditions.assert_class('id', id, String)
3501
+ r = @client.request("/#{CGI.escape(organization)}/inventory_updates/#{CGI.escape(id)}").get
3502
+ ::Io::Flow::V0::Models::InventoryUpdate.new(r)
3503
+ end
3504
+
3481
3505
  end
3482
3506
 
3483
3507
  class Manifests
@@ -3504,16 +3528,9 @@ module Io
3504
3528
 
3505
3529
  # Creates a new manifest/carrier BOL with specific tracking numbers
3506
3530
  def post(organization, manifest_form)
3507
- HttpClient::Preconditions.assert_class('organization', organization, String)
3508
- (x = manifest_form; x.is_a?(::Io::Flow::V0::Models::ManifestForm) ? x : ::Io::Flow::V0::Models::ManifestForm.new(x))
3509
- r = @client.request("/#{CGI.escape(organization)}/manifests").with_json(manifest_form.to_json).post
3510
- ::Io::Flow::V0::Models::Manifest.new(r)
3511
- end
3512
-
3513
- def get_by_id(organization, id)
3514
- HttpClient::Preconditions.assert_class('organization', organization, String)
3515
- HttpClient::Preconditions.assert_class('id', id, String)
3516
- r = @client.request("/#{CGI.escape(organization)}/manifests/#{CGI.escape(id)}").get
3531
+ HttpClient::Preconditions.assert_class('organization', organization, String)
3532
+ (x = manifest_form; x.is_a?(::Io::Flow::V0::Models::ManifestForm) ? x : ::Io::Flow::V0::Models::ManifestForm.new(x))
3533
+ r = @client.request("/#{CGI.escape(organization)}/manifests").with_json(manifest_form.to_json).post
3517
3534
  ::Io::Flow::V0::Models::Manifest.new(r)
3518
3535
  end
3519
3536
 
@@ -3527,6 +3544,13 @@ module Io
3527
3544
  r
3528
3545
  end
3529
3546
 
3547
+ def get_by_id(organization, id)
3548
+ HttpClient::Preconditions.assert_class('organization', organization, String)
3549
+ HttpClient::Preconditions.assert_class('id', id, String)
3550
+ r = @client.request("/#{CGI.escape(organization)}/manifests/#{CGI.escape(id)}").get
3551
+ ::Io::Flow::V0::Models::Manifest.new(r)
3552
+ end
3553
+
3530
3554
  end
3531
3555
 
3532
3556
  class Quotes
@@ -3556,13 +3580,6 @@ module Io
3556
3580
  ::Io::Flow::V0::Models::Quote.new(r)
3557
3581
  end
3558
3582
 
3559
- def get_by_id(organization, id)
3560
- HttpClient::Preconditions.assert_class('organization', organization, String)
3561
- HttpClient::Preconditions.assert_class('id', id, String)
3562
- r = @client.request("/#{CGI.escape(organization)}/quotes/#{CGI.escape(id)}").get
3563
- ::Io::Flow::V0::Models::Quote.new(r)
3564
- end
3565
-
3566
3583
  def get_versions(organization, incoming={})
3567
3584
  HttpClient::Preconditions.assert_class('organization', organization, String)
3568
3585
  opts = HttpClient::Helper.symbolize_keys(incoming)
@@ -3577,6 +3594,13 @@ module Io
3577
3594
  r.map { |x| ::Io::Flow::V0::Models::QuoteVersion.new(x) }
3578
3595
  end
3579
3596
 
3597
+ def get_by_id(organization, id)
3598
+ HttpClient::Preconditions.assert_class('organization', organization, String)
3599
+ HttpClient::Preconditions.assert_class('id', id, String)
3600
+ r = @client.request("/#{CGI.escape(organization)}/quotes/#{CGI.escape(id)}").get
3601
+ ::Io::Flow::V0::Models::Quote.new(r)
3602
+ end
3603
+
3580
3604
  end
3581
3605
 
3582
3606
  class Reservations
@@ -3647,6 +3671,20 @@ module Io
3647
3671
  ::Io::Flow::V0::Models::Return.new(r)
3648
3672
  end
3649
3673
 
3674
+ def get_versions(organization, incoming={})
3675
+ HttpClient::Preconditions.assert_class('organization', organization, String)
3676
+ opts = HttpClient::Helper.symbolize_keys(incoming)
3677
+ query = {
3678
+ :id => (x = opts.delete(:id); x.nil? ? nil : HttpClient::Preconditions.assert_class('id', x, Array).map { |v| HttpClient::Preconditions.assert_class('id', v, String) }),
3679
+ :key => (x = opts.delete(:key); x.nil? ? nil : HttpClient::Preconditions.assert_class('key', x, Array).map { |v| HttpClient::Preconditions.assert_class('key', v, String) }),
3680
+ :limit => HttpClient::Preconditions.assert_class('limit', (x = opts.delete(:limit); x.nil? ? 25 : x), Integer),
3681
+ :offset => HttpClient::Preconditions.assert_class('offset', (x = opts.delete(:offset); x.nil? ? 0 : x), Integer),
3682
+ :sort => HttpClient::Preconditions.assert_class('sort', (x = opts.delete(:sort); x.nil? ? "journal_timestamp" : x), String)
3683
+ }.delete_if { |k, v| v.nil? }
3684
+ r = @client.request("/#{CGI.escape(organization)}/returns/versions").with_query(query).get
3685
+ r.map { |x| ::Io::Flow::V0::Models::ReturnVersion.new(x) }
3686
+ end
3687
+
3650
3688
  def get_by_key(organization, key)
3651
3689
  HttpClient::Preconditions.assert_class('organization', organization, String)
3652
3690
  HttpClient::Preconditions.assert_class('key', key, String)
@@ -3669,20 +3707,6 @@ module Io
3669
3707
  nil
3670
3708
  end
3671
3709
 
3672
- def get_versions(organization, incoming={})
3673
- HttpClient::Preconditions.assert_class('organization', organization, String)
3674
- opts = HttpClient::Helper.symbolize_keys(incoming)
3675
- query = {
3676
- :id => (x = opts.delete(:id); x.nil? ? nil : HttpClient::Preconditions.assert_class('id', x, Array).map { |v| HttpClient::Preconditions.assert_class('id', v, String) }),
3677
- :key => (x = opts.delete(:key); x.nil? ? nil : HttpClient::Preconditions.assert_class('key', x, Array).map { |v| HttpClient::Preconditions.assert_class('key', v, String) }),
3678
- :limit => HttpClient::Preconditions.assert_class('limit', (x = opts.delete(:limit); x.nil? ? 25 : x), Integer),
3679
- :offset => HttpClient::Preconditions.assert_class('offset', (x = opts.delete(:offset); x.nil? ? 0 : x), Integer),
3680
- :sort => HttpClient::Preconditions.assert_class('sort', (x = opts.delete(:sort); x.nil? ? "journal_timestamp" : x), String)
3681
- }.delete_if { |k, v| v.nil? }
3682
- r = @client.request("/#{CGI.escape(organization)}/returns/versions").with_query(query).get
3683
- r.map { |x| ::Io::Flow::V0::Models::ReturnVersion.new(x) }
3684
- end
3685
-
3686
3710
  end
3687
3711
 
3688
3712
  class ShippingLabels
@@ -3719,13 +3743,6 @@ module Io
3719
3743
  ::Io::Flow::V0::Models::ShippingLabel.new(r)
3720
3744
  end
3721
3745
 
3722
- def get_by_id(organization, id)
3723
- HttpClient::Preconditions.assert_class('organization', organization, String)
3724
- HttpClient::Preconditions.assert_class('id', id, String)
3725
- r = @client.request("/#{CGI.escape(organization)}/shipping_labels/#{CGI.escape(id)}").get
3726
- ::Io::Flow::V0::Models::ShippingLabel.new(r)
3727
- end
3728
-
3729
3746
  def get_versions(organization, incoming={})
3730
3747
  HttpClient::Preconditions.assert_class('organization', organization, String)
3731
3748
  opts = HttpClient::Helper.symbolize_keys(incoming)
@@ -3740,6 +3757,13 @@ module Io
3740
3757
  r.map { |x| ::Io::Flow::V0::Models::ShippingLabelVersion.new(x) }
3741
3758
  end
3742
3759
 
3760
+ def get_by_id(organization, id)
3761
+ HttpClient::Preconditions.assert_class('organization', organization, String)
3762
+ HttpClient::Preconditions.assert_class('id', id, String)
3763
+ r = @client.request("/#{CGI.escape(organization)}/shipping_labels/#{CGI.escape(id)}").get
3764
+ ::Io::Flow::V0::Models::ShippingLabel.new(r)
3765
+ end
3766
+
3743
3767
  end
3744
3768
 
3745
3769
  class ShippingNotifications
@@ -3773,6 +3797,20 @@ module Io
3773
3797
  ::Io::Flow::V0::Models::ShippingNotification.new(r)
3774
3798
  end
3775
3799
 
3800
+ def get_versions(organization, incoming={})
3801
+ HttpClient::Preconditions.assert_class('organization', organization, String)
3802
+ opts = HttpClient::Helper.symbolize_keys(incoming)
3803
+ query = {
3804
+ :id => (x = opts.delete(:id); x.nil? ? nil : HttpClient::Preconditions.assert_class('id', x, Array).map { |v| HttpClient::Preconditions.assert_class('id', v, String) }),
3805
+ :key => (x = opts.delete(:key); x.nil? ? nil : HttpClient::Preconditions.assert_class('key', x, Array).map { |v| HttpClient::Preconditions.assert_class('key', v, String) }),
3806
+ :limit => HttpClient::Preconditions.assert_class('limit', (x = opts.delete(:limit); x.nil? ? 25 : x), Integer),
3807
+ :offset => HttpClient::Preconditions.assert_class('offset', (x = opts.delete(:offset); x.nil? ? 0 : x), Integer),
3808
+ :sort => HttpClient::Preconditions.assert_class('sort', (x = opts.delete(:sort); x.nil? ? "journal_timestamp" : x), String)
3809
+ }.delete_if { |k, v| v.nil? }
3810
+ r = @client.request("/#{CGI.escape(organization)}/shipping-notifications/versions").with_query(query).get
3811
+ r.map { |x| ::Io::Flow::V0::Models::ShippingNotificationVersion.new(x) }
3812
+ end
3813
+
3776
3814
  def get_by_key(organization, key)
3777
3815
  HttpClient::Preconditions.assert_class('organization', organization, String)
3778
3816
  HttpClient::Preconditions.assert_class('key', key, String)
@@ -3795,20 +3833,6 @@ module Io
3795
3833
  nil
3796
3834
  end
3797
3835
 
3798
- def get_versions(organization, incoming={})
3799
- HttpClient::Preconditions.assert_class('organization', organization, String)
3800
- opts = HttpClient::Helper.symbolize_keys(incoming)
3801
- query = {
3802
- :id => (x = opts.delete(:id); x.nil? ? nil : HttpClient::Preconditions.assert_class('id', x, Array).map { |v| HttpClient::Preconditions.assert_class('id', v, String) }),
3803
- :key => (x = opts.delete(:key); x.nil? ? nil : HttpClient::Preconditions.assert_class('key', x, Array).map { |v| HttpClient::Preconditions.assert_class('key', v, String) }),
3804
- :limit => HttpClient::Preconditions.assert_class('limit', (x = opts.delete(:limit); x.nil? ? 25 : x), Integer),
3805
- :offset => HttpClient::Preconditions.assert_class('offset', (x = opts.delete(:offset); x.nil? ? 0 : x), Integer),
3806
- :sort => HttpClient::Preconditions.assert_class('sort', (x = opts.delete(:sort); x.nil? ? "journal_timestamp" : x), String)
3807
- }.delete_if { |k, v| v.nil? }
3808
- r = @client.request("/#{CGI.escape(organization)}/shipping-notifications/versions").with_query(query).get
3809
- r.map { |x| ::Io::Flow::V0::Models::ShippingNotificationVersion.new(x) }
3810
- end
3811
-
3812
3836
  end
3813
3837
 
3814
3838
  class Tiers
@@ -3839,6 +3863,20 @@ module Io
3839
3863
  ::Io::Flow::V0::Models::Tier.new(r)
3840
3864
  end
3841
3865
 
3866
+ def get_versions(organization, incoming={})
3867
+ HttpClient::Preconditions.assert_class('organization', organization, String)
3868
+ opts = HttpClient::Helper.symbolize_keys(incoming)
3869
+ query = {
3870
+ :id => (x = opts.delete(:id); x.nil? ? nil : HttpClient::Preconditions.assert_class('id', x, Array).map { |v| HttpClient::Preconditions.assert_class('id', v, String) }),
3871
+ :tier => (x = opts.delete(:tier); x.nil? ? nil : HttpClient::Preconditions.assert_class('tier', x, Array).map { |v| HttpClient::Preconditions.assert_class('tier', v, String) }),
3872
+ :limit => HttpClient::Preconditions.assert_class('limit', (x = opts.delete(:limit); x.nil? ? 25 : x), Integer),
3873
+ :offset => HttpClient::Preconditions.assert_class('offset', (x = opts.delete(:offset); x.nil? ? 0 : x), Integer),
3874
+ :sort => HttpClient::Preconditions.assert_class('sort', (x = opts.delete(:sort); x.nil? ? "journal_timestamp" : x), String)
3875
+ }.delete_if { |k, v| v.nil? }
3876
+ r = @client.request("/#{CGI.escape(organization)}/tiers/versions").with_query(query).get
3877
+ r.map { |x| ::Io::Flow::V0::Models::TierVersion.new(x) }
3878
+ end
3879
+
3842
3880
  def get_by_id(organization, id)
3843
3881
  HttpClient::Preconditions.assert_class('organization', organization, String)
3844
3882
  HttpClient::Preconditions.assert_class('id', id, String)
@@ -3861,20 +3899,6 @@ module Io
3861
3899
  nil
3862
3900
  end
3863
3901
 
3864
- def get_versions(organization, incoming={})
3865
- HttpClient::Preconditions.assert_class('organization', organization, String)
3866
- opts = HttpClient::Helper.symbolize_keys(incoming)
3867
- query = {
3868
- :id => (x = opts.delete(:id); x.nil? ? nil : HttpClient::Preconditions.assert_class('id', x, Array).map { |v| HttpClient::Preconditions.assert_class('id', v, String) }),
3869
- :tier => (x = opts.delete(:tier); x.nil? ? nil : HttpClient::Preconditions.assert_class('tier', x, Array).map { |v| HttpClient::Preconditions.assert_class('tier', v, String) }),
3870
- :limit => HttpClient::Preconditions.assert_class('limit', (x = opts.delete(:limit); x.nil? ? 25 : x), Integer),
3871
- :offset => HttpClient::Preconditions.assert_class('offset', (x = opts.delete(:offset); x.nil? ? 0 : x), Integer),
3872
- :sort => HttpClient::Preconditions.assert_class('sort', (x = opts.delete(:sort); x.nil? ? "journal_timestamp" : x), String)
3873
- }.delete_if { |k, v| v.nil? }
3874
- r = @client.request("/#{CGI.escape(organization)}/tiers/versions").with_query(query).get
3875
- r.map { |x| ::Io::Flow::V0::Models::TierVersion.new(x) }
3876
- end
3877
-
3878
3902
  end
3879
3903
 
3880
3904
  class TierDefaults
@@ -3904,13 +3928,6 @@ module Io
3904
3928
  ::Io::Flow::V0::Models::TierDefault.new(r)
3905
3929
  end
3906
3930
 
3907
- def get_by_id(organization, id)
3908
- HttpClient::Preconditions.assert_class('organization', organization, String)
3909
- HttpClient::Preconditions.assert_class('id', id, String)
3910
- r = @client.request("/#{CGI.escape(organization)}/tier_defaults/#{CGI.escape(id)}").get
3911
- ::Io::Flow::V0::Models::TierDefault.new(r)
3912
- end
3913
-
3914
3931
  def get_versions(organization, incoming={})
3915
3932
  HttpClient::Preconditions.assert_class('organization', organization, String)
3916
3933
  opts = HttpClient::Helper.symbolize_keys(incoming)
@@ -3925,6 +3942,13 @@ module Io
3925
3942
  r.map { |x| ::Io::Flow::V0::Models::TierDefaultVersion.new(x) }
3926
3943
  end
3927
3944
 
3945
+ def get_by_id(organization, id)
3946
+ HttpClient::Preconditions.assert_class('organization', organization, String)
3947
+ HttpClient::Preconditions.assert_class('id', id, String)
3948
+ r = @client.request("/#{CGI.escape(organization)}/tier_defaults/#{CGI.escape(id)}").get
3949
+ ::Io::Flow::V0::Models::TierDefault.new(r)
3950
+ end
3951
+
3928
3952
  end
3929
3953
 
3930
3954
  class TierRules
@@ -3955,6 +3979,21 @@ module Io
3955
3979
  ::Io::Flow::V0::Models::TierRule.new(r)
3956
3980
  end
3957
3981
 
3982
+ def get_versions(organization, tier_id, incoming={})
3983
+ HttpClient::Preconditions.assert_class('organization', organization, String)
3984
+ HttpClient::Preconditions.assert_class('tier_id', tier_id, String)
3985
+ opts = HttpClient::Helper.symbolize_keys(incoming)
3986
+ query = {
3987
+ :id => (x = opts.delete(:id); x.nil? ? nil : HttpClient::Preconditions.assert_class('id', x, Array).map { |v| HttpClient::Preconditions.assert_class('id', v, String) }),
3988
+ :tier_rule => (x = opts.delete(:tier_rule); x.nil? ? nil : HttpClient::Preconditions.assert_class('tier_rule', x, Array).map { |v| HttpClient::Preconditions.assert_class('tier_rule', v, String) }),
3989
+ :limit => HttpClient::Preconditions.assert_class('limit', (x = opts.delete(:limit); x.nil? ? 25 : x), Integer),
3990
+ :offset => HttpClient::Preconditions.assert_class('offset', (x = opts.delete(:offset); x.nil? ? 0 : x), Integer),
3991
+ :sort => HttpClient::Preconditions.assert_class('sort', (x = opts.delete(:sort); x.nil? ? "journal_timestamp" : x), String)
3992
+ }.delete_if { |k, v| v.nil? }
3993
+ r = @client.request("/#{CGI.escape(organization)}/tiers/#{CGI.escape(tier_id)}/rules/versions").with_query(query).get
3994
+ r.map { |x| ::Io::Flow::V0::Models::TierRuleVersion.new(x) }
3995
+ end
3996
+
3958
3997
  def get_by_id(organization, tier_id, id)
3959
3998
  HttpClient::Preconditions.assert_class('organization', organization, String)
3960
3999
  HttpClient::Preconditions.assert_class('tier_id', tier_id, String)
@@ -3980,21 +4019,6 @@ module Io
3980
4019
  nil
3981
4020
  end
3982
4021
 
3983
- def get_versions(organization, tier_id, incoming={})
3984
- HttpClient::Preconditions.assert_class('organization', organization, String)
3985
- HttpClient::Preconditions.assert_class('tier_id', tier_id, String)
3986
- opts = HttpClient::Helper.symbolize_keys(incoming)
3987
- query = {
3988
- :id => (x = opts.delete(:id); x.nil? ? nil : HttpClient::Preconditions.assert_class('id', x, Array).map { |v| HttpClient::Preconditions.assert_class('id', v, String) }),
3989
- :tier_rule => (x = opts.delete(:tier_rule); x.nil? ? nil : HttpClient::Preconditions.assert_class('tier_rule', x, Array).map { |v| HttpClient::Preconditions.assert_class('tier_rule', v, String) }),
3990
- :limit => HttpClient::Preconditions.assert_class('limit', (x = opts.delete(:limit); x.nil? ? 25 : x), Integer),
3991
- :offset => HttpClient::Preconditions.assert_class('offset', (x = opts.delete(:offset); x.nil? ? 0 : x), Integer),
3992
- :sort => HttpClient::Preconditions.assert_class('sort', (x = opts.delete(:sort); x.nil? ? "journal_timestamp" : x), String)
3993
- }.delete_if { |k, v| v.nil? }
3994
- r = @client.request("/#{CGI.escape(organization)}/tiers/#{CGI.escape(tier_id)}/rules/versions").with_query(query).get
3995
- r.map { |x| ::Io::Flow::V0::Models::TierRuleVersion.new(x) }
3996
- end
3997
-
3998
4022
  end
3999
4023
 
4000
4024
  class Trackings
@@ -4003,6 +4027,14 @@ module Io
4003
4027
  @client = HttpClient::Preconditions.assert_class('client', client, ::Io::Flow::V0::Client)
4004
4028
  end
4005
4029
 
4030
+ # Public endpoint to get all relevant information about a tracking, label(s)
4031
+ # under it, and event(s) under those label(s)
4032
+ def get_trackings_by_id(id)
4033
+ HttpClient::Preconditions.assert_class('id', id, String)
4034
+ r = @client.request("/trackings/#{CGI.escape(id)}").get
4035
+ ::Io::Flow::V0::Models::Tracking.new(r)
4036
+ end
4037
+
4006
4038
  def get_trackings_by_organization(organization, incoming={})
4007
4039
  HttpClient::Preconditions.assert_class('organization', organization, String)
4008
4040
  opts = HttpClient::Helper.symbolize_keys(incoming)
@@ -4037,14 +4069,6 @@ module Io
4037
4069
  r.map { |x| ::Io::Flow::V0::Models::TrackingVersion.new(x) }
4038
4070
  end
4039
4071
 
4040
- # Public endpoint to get all relevant information about a tracking, label(s)
4041
- # under it, and event(s) under those label(s)
4042
- def get_trackings_by_id(id)
4043
- HttpClient::Preconditions.assert_class('id', id, String)
4044
- r = @client.request("/trackings/#{CGI.escape(id)}").get
4045
- ::Io::Flow::V0::Models::Tracking.new(r)
4046
- end
4047
-
4048
4072
  end
4049
4073
 
4050
4074
  class TrackingEvents
@@ -4068,13 +4092,6 @@ module Io
4068
4092
  r.map { |x| ::Io::Flow::V0::Models::TrackingEvent.new(x) }
4069
4093
  end
4070
4094
 
4071
- def get_by_id(organization, id)
4072
- HttpClient::Preconditions.assert_class('organization', organization, String)
4073
- HttpClient::Preconditions.assert_class('id', id, String)
4074
- r = @client.request("/#{CGI.escape(organization)}/tracking-events/#{CGI.escape(id)}").get
4075
- ::Io::Flow::V0::Models::TrackingEvent.new(r)
4076
- end
4077
-
4078
4095
  def get_versions(organization, incoming={})
4079
4096
  HttpClient::Preconditions.assert_class('organization', organization, String)
4080
4097
  opts = HttpClient::Helper.symbolize_keys(incoming)
@@ -4089,6 +4106,13 @@ module Io
4089
4106
  r.map { |x| ::Io::Flow::V0::Models::TrackingEventVersion.new(x) }
4090
4107
  end
4091
4108
 
4109
+ def get_by_id(organization, id)
4110
+ HttpClient::Preconditions.assert_class('organization', organization, String)
4111
+ HttpClient::Preconditions.assert_class('id', id, String)
4112
+ r = @client.request("/#{CGI.escape(organization)}/tracking-events/#{CGI.escape(id)}").get
4113
+ ::Io::Flow::V0::Models::TrackingEvent.new(r)
4114
+ end
4115
+
4092
4116
  end
4093
4117
 
4094
4118
  class TrackingLabels
@@ -4118,13 +4142,6 @@ module Io
4118
4142
  ::Io::Flow::V0::Models::TrackingLabel.new(r)
4119
4143
  end
4120
4144
 
4121
- def get_by_id(organization, id)
4122
- HttpClient::Preconditions.assert_class('organization', organization, String)
4123
- HttpClient::Preconditions.assert_class('id', id, String)
4124
- r = @client.request("/#{CGI.escape(organization)}/tracking-labels/#{CGI.escape(id)}").get
4125
- ::Io::Flow::V0::Models::TrackingLabel.new(r)
4126
- end
4127
-
4128
4145
  def get_versions(organization, incoming={})
4129
4146
  HttpClient::Preconditions.assert_class('organization', organization, String)
4130
4147
  opts = HttpClient::Helper.symbolize_keys(incoming)
@@ -4139,6 +4156,13 @@ module Io
4139
4156
  r.map { |x| ::Io::Flow::V0::Models::TrackingLabelVersion.new(x) }
4140
4157
  end
4141
4158
 
4159
+ def get_by_id(organization, id)
4160
+ HttpClient::Preconditions.assert_class('organization', organization, String)
4161
+ HttpClient::Preconditions.assert_class('id', id, String)
4162
+ r = @client.request("/#{CGI.escape(organization)}/tracking-labels/#{CGI.escape(id)}").get
4163
+ ::Io::Flow::V0::Models::TrackingLabel.new(r)
4164
+ end
4165
+
4142
4166
  end
4143
4167
 
4144
4168
  class Webhooks
@@ -4169,6 +4193,21 @@ module Io
4169
4193
  ::Io::Flow::V0::Models::Webhook.new(r)
4170
4194
  end
4171
4195
 
4196
+ # Returns the webhook settings for an organization
4197
+ def get_settings(organization)
4198
+ HttpClient::Preconditions.assert_class('organization', organization, String)
4199
+ r = @client.request("/#{CGI.escape(organization)}/webhooks/settings").get
4200
+ ::Io::Flow::V0::Models::WebhookSettings.new(r)
4201
+ end
4202
+
4203
+ # Updates the webhook settings for an organization
4204
+ def put_settings(organization, webhook_settings)
4205
+ HttpClient::Preconditions.assert_class('organization', organization, String)
4206
+ (x = webhook_settings; x.is_a?(::Io::Flow::V0::Models::WebhookSettings) ? x : ::Io::Flow::V0::Models::WebhookSettings.new(x))
4207
+ r = @client.request("/#{CGI.escape(organization)}/webhooks/settings").with_json(webhook_settings.to_json).put
4208
+ ::Io::Flow::V0::Models::WebhookSettings.new(r)
4209
+ end
4210
+
4172
4211
  # Returns information about a specific webhook
4173
4212
  def get_by_id(organization, id)
4174
4213
  HttpClient::Preconditions.assert_class('organization', organization, String)
@@ -4194,21 +4233,6 @@ module Io
4194
4233
  nil
4195
4234
  end
4196
4235
 
4197
- # Returns the webhook settings for an organization
4198
- def get_settings(organization)
4199
- HttpClient::Preconditions.assert_class('organization', organization, String)
4200
- r = @client.request("/#{CGI.escape(organization)}/webhooks/settings").get
4201
- ::Io::Flow::V0::Models::WebhookSettings.new(r)
4202
- end
4203
-
4204
- # Updates the webhook settings for an organization
4205
- def put_settings(organization, webhook_settings)
4206
- HttpClient::Preconditions.assert_class('organization', organization, String)
4207
- (x = webhook_settings; x.is_a?(::Io::Flow::V0::Models::WebhookSettings) ? x : ::Io::Flow::V0::Models::WebhookSettings.new(x))
4208
- r = @client.request("/#{CGI.escape(organization)}/webhooks/settings").with_json(webhook_settings.to_json).put
4209
- ::Io::Flow::V0::Models::WebhookSettings.new(r)
4210
- end
4211
-
4212
4236
  end
4213
4237
 
4214
4238
  class WebhookDeliveries
@@ -4552,26 +4576,11 @@ module Io
4552
4576
  end
4553
4577
 
4554
4578
  # Create an export.
4555
- def post(organization, export_form)
4556
- HttpClient::Preconditions.assert_class('organization', organization, String)
4557
- (x = export_form; x.is_a?(::Io::Flow::V0::Models::ExportForm) ? x : ::Io::Flow::V0::Models::ExportForm.new(x))
4558
- r = @client.request("/#{CGI.escape(organization)}/exports").with_json(export_form.to_json).post
4559
- ::Io::Flow::V0::Models::Export.new(r)
4560
- end
4561
-
4562
- # Get a single export.
4563
- def get_by_id(organization, id)
4564
- HttpClient::Preconditions.assert_class('organization', organization, String)
4565
- HttpClient::Preconditions.assert_class('id', id, String)
4566
- r = @client.request("/#{CGI.escape(organization)}/exports/#{CGI.escape(id)}").get
4567
- ::Io::Flow::V0::Models::Export.new(r)
4568
- end
4569
-
4570
- def delete_by_id(organization, id)
4579
+ def post(organization, export_form)
4571
4580
  HttpClient::Preconditions.assert_class('organization', organization, String)
4572
- HttpClient::Preconditions.assert_class('id', id, String)
4573
- r = @client.request("/#{CGI.escape(organization)}/exports/#{CGI.escape(id)}").delete
4574
- nil
4581
+ (x = export_form; x.is_a?(::Io::Flow::V0::Models::ExportForm) ? x : ::Io::Flow::V0::Models::ExportForm.new(x))
4582
+ r = @client.request("/#{CGI.escape(organization)}/exports").with_json(export_form.to_json).post
4583
+ ::Io::Flow::V0::Models::Export.new(r)
4575
4584
  end
4576
4585
 
4577
4586
  # Provides visibility into recent changes of each export, including deletion.
@@ -4589,6 +4598,21 @@ module Io
4589
4598
  r.map { |x| ::Io::Flow::V0::Models::ExportVersion.new(x) }
4590
4599
  end
4591
4600
 
4601
+ # Get a single export.
4602
+ def get_by_id(organization, id)
4603
+ HttpClient::Preconditions.assert_class('organization', organization, String)
4604
+ HttpClient::Preconditions.assert_class('id', id, String)
4605
+ r = @client.request("/#{CGI.escape(organization)}/exports/#{CGI.escape(id)}").get
4606
+ ::Io::Flow::V0::Models::Export.new(r)
4607
+ end
4608
+
4609
+ def delete_by_id(organization, id)
4610
+ HttpClient::Preconditions.assert_class('organization', organization, String)
4611
+ HttpClient::Preconditions.assert_class('id', id, String)
4612
+ r = @client.request("/#{CGI.escape(organization)}/exports/#{CGI.escape(id)}").delete
4613
+ nil
4614
+ end
4615
+
4592
4616
  end
4593
4617
 
4594
4618
  class Feeds
@@ -4610,13 +4634,6 @@ module Io
4610
4634
  r.map { |x| ::Io::Flow::V0::Models::Feed.from_json(x) }
4611
4635
  end
4612
4636
 
4613
- def delete_by_id(organization, id)
4614
- HttpClient::Preconditions.assert_class('organization', organization, String)
4615
- HttpClient::Preconditions.assert_class('id', id, String)
4616
- r = @client.request("/#{CGI.escape(organization)}/feeds/#{CGI.escape(id)}").delete
4617
- nil
4618
- end
4619
-
4620
4637
  def post_catalog(organization, catalog_feed_form_post)
4621
4638
  HttpClient::Preconditions.assert_class('organization', organization, String)
4622
4639
  (x = catalog_feed_form_post; x.is_a?(::Io::Flow::V0::Models::CatalogFeedFormPost) ? x : ::Io::Flow::V0::Models::CatalogFeedFormPost.new(x))
@@ -4632,6 +4649,13 @@ module Io
4632
4649
  ::Io::Flow::V0::Models::CatalogFeed.new(r)
4633
4650
  end
4634
4651
 
4652
+ def delete_by_id(organization, id)
4653
+ HttpClient::Preconditions.assert_class('organization', organization, String)
4654
+ HttpClient::Preconditions.assert_class('id', id, String)
4655
+ r = @client.request("/#{CGI.escape(organization)}/feeds/#{CGI.escape(id)}").delete
4656
+ nil
4657
+ end
4658
+
4635
4659
  end
4636
4660
 
4637
4661
  class Fulfillments
@@ -4708,21 +4732,6 @@ module Io
4708
4732
  ::Io::Flow::V0::Models::Import.new(r)
4709
4733
  end
4710
4734
 
4711
- # Get a single import.
4712
- def get_by_id(organization, id)
4713
- HttpClient::Preconditions.assert_class('organization', organization, String)
4714
- HttpClient::Preconditions.assert_class('id', id, String)
4715
- r = @client.request("/#{CGI.escape(organization)}/imports/#{CGI.escape(id)}").get
4716
- ::Io::Flow::V0::Models::Import.new(r)
4717
- end
4718
-
4719
- def delete_by_id(organization, id)
4720
- HttpClient::Preconditions.assert_class('organization', organization, String)
4721
- HttpClient::Preconditions.assert_class('id', id, String)
4722
- r = @client.request("/#{CGI.escape(organization)}/imports/#{CGI.escape(id)}").delete
4723
- nil
4724
- end
4725
-
4726
4735
  # Provides visibility into recent changes of each import, including deletion.
4727
4736
  def get_versions(organization, incoming={})
4728
4737
  HttpClient::Preconditions.assert_class('organization', organization, String)
@@ -4738,6 +4747,21 @@ module Io
4738
4747
  r.map { |x| ::Io::Flow::V0::Models::ImportVersion.new(x) }
4739
4748
  end
4740
4749
 
4750
+ # Get a single import.
4751
+ def get_by_id(organization, id)
4752
+ HttpClient::Preconditions.assert_class('organization', organization, String)
4753
+ HttpClient::Preconditions.assert_class('id', id, String)
4754
+ r = @client.request("/#{CGI.escape(organization)}/imports/#{CGI.escape(id)}").get
4755
+ ::Io::Flow::V0::Models::Import.new(r)
4756
+ end
4757
+
4758
+ def delete_by_id(organization, id)
4759
+ HttpClient::Preconditions.assert_class('organization', organization, String)
4760
+ HttpClient::Preconditions.assert_class('id', id, String)
4761
+ r = @client.request("/#{CGI.escape(organization)}/imports/#{CGI.escape(id)}").delete
4762
+ nil
4763
+ end
4764
+
4741
4765
  end
4742
4766
 
4743
4767
  class Invitations
@@ -4770,23 +4794,6 @@ module Io
4770
4794
  ::Io::Flow::V0::Models::Invitation.new(r)
4771
4795
  end
4772
4796
 
4773
- # Returns information about a specific invitation.
4774
- def get_by_id(id, incoming={})
4775
- HttpClient::Preconditions.assert_class('id', id, String)
4776
- opts = HttpClient::Helper.symbolize_keys(incoming)
4777
- query = {
4778
- :expand => (x = opts.delete(:expand); x.nil? ? nil : HttpClient::Preconditions.assert_class('expand', x, Array).map { |v| HttpClient::Preconditions.assert_class('expand', v, String) })
4779
- }.delete_if { |k, v| v.nil? }
4780
- r = @client.request("/invitations/#{CGI.escape(id)}").with_query(query).get
4781
- ::Io::Flow::V0::Models::Invitation.new(r)
4782
- end
4783
-
4784
- def delete_by_id(id)
4785
- HttpClient::Preconditions.assert_class('id', id, String)
4786
- r = @client.request("/invitations/#{CGI.escape(id)}").delete
4787
- nil
4788
- end
4789
-
4790
4797
  # Lookup an invitation by its token.
4791
4798
  def get_tokens_by_token(token, incoming={})
4792
4799
  HttpClient::Preconditions.assert_class('token', token, String)
@@ -4822,6 +4829,23 @@ module Io
4822
4829
  r.map { |x| ::Io::Flow::V0::Models::InvitationVersion.new(x) }
4823
4830
  end
4824
4831
 
4832
+ # Returns information about a specific invitation.
4833
+ def get_by_id(id, incoming={})
4834
+ HttpClient::Preconditions.assert_class('id', id, String)
4835
+ opts = HttpClient::Helper.symbolize_keys(incoming)
4836
+ query = {
4837
+ :expand => (x = opts.delete(:expand); x.nil? ? nil : HttpClient::Preconditions.assert_class('expand', x, Array).map { |v| HttpClient::Preconditions.assert_class('expand', v, String) })
4838
+ }.delete_if { |k, v| v.nil? }
4839
+ r = @client.request("/invitations/#{CGI.escape(id)}").with_query(query).get
4840
+ ::Io::Flow::V0::Models::Invitation.new(r)
4841
+ end
4842
+
4843
+ def delete_by_id(id)
4844
+ HttpClient::Preconditions.assert_class('id', id, String)
4845
+ r = @client.request("/invitations/#{CGI.escape(id)}").delete
4846
+ nil
4847
+ end
4848
+
4825
4849
  end
4826
4850
 
4827
4851
  class Links
@@ -4870,6 +4894,21 @@ module Io
4870
4894
  ::Io::Flow::V0::Models::Membership.new(r)
4871
4895
  end
4872
4896
 
4897
+ def get_versions(incoming={})
4898
+ opts = HttpClient::Helper.symbolize_keys(incoming)
4899
+ query = {
4900
+ :id => (x = opts.delete(:id); x.nil? ? nil : HttpClient::Preconditions.assert_class('id', x, Array).map { |v| HttpClient::Preconditions.assert_class('id', v, String) }),
4901
+ :membership => (x = opts.delete(:membership); x.nil? ? nil : HttpClient::Preconditions.assert_class('membership', x, Array).map { |v| HttpClient::Preconditions.assert_class('membership', v, String) }),
4902
+ :user => (x = opts.delete(:user); x.nil? ? nil : HttpClient::Preconditions.assert_class('user', x, String)),
4903
+ :organization => (x = opts.delete(:organization); x.nil? ? nil : HttpClient::Preconditions.assert_class('organization', x, String)),
4904
+ :limit => HttpClient::Preconditions.assert_class('limit', (x = opts.delete(:limit); x.nil? ? 25 : x), Integer),
4905
+ :offset => HttpClient::Preconditions.assert_class('offset', (x = opts.delete(:offset); x.nil? ? 0 : x), Integer),
4906
+ :sort => HttpClient::Preconditions.assert_class('sort', (x = opts.delete(:sort); x.nil? ? "journal_timestamp" : x), String)
4907
+ }.delete_if { |k, v| v.nil? }
4908
+ r = @client.request("/memberships/versions").with_query(query).get
4909
+ r.map { |x| ::Io::Flow::V0::Models::MembershipVersion.new(x) }
4910
+ end
4911
+
4873
4912
  # Returns information about a specific membership.
4874
4913
  def get_by_id(id, incoming={})
4875
4914
  HttpClient::Preconditions.assert_class('id', id, String)
@@ -4896,21 +4935,6 @@ module Io
4896
4935
  nil
4897
4936
  end
4898
4937
 
4899
- def get_versions(incoming={})
4900
- opts = HttpClient::Helper.symbolize_keys(incoming)
4901
- query = {
4902
- :id => (x = opts.delete(:id); x.nil? ? nil : HttpClient::Preconditions.assert_class('id', x, Array).map { |v| HttpClient::Preconditions.assert_class('id', v, String) }),
4903
- :membership => (x = opts.delete(:membership); x.nil? ? nil : HttpClient::Preconditions.assert_class('membership', x, Array).map { |v| HttpClient::Preconditions.assert_class('membership', v, String) }),
4904
- :user => (x = opts.delete(:user); x.nil? ? nil : HttpClient::Preconditions.assert_class('user', x, String)),
4905
- :organization => (x = opts.delete(:organization); x.nil? ? nil : HttpClient::Preconditions.assert_class('organization', x, String)),
4906
- :limit => HttpClient::Preconditions.assert_class('limit', (x = opts.delete(:limit); x.nil? ? 25 : x), Integer),
4907
- :offset => HttpClient::Preconditions.assert_class('offset', (x = opts.delete(:offset); x.nil? ? 0 : x), Integer),
4908
- :sort => HttpClient::Preconditions.assert_class('sort', (x = opts.delete(:sort); x.nil? ? "journal_timestamp" : x), String)
4909
- }.delete_if { |k, v| v.nil? }
4910
- r = @client.request("/memberships/versions").with_query(query).get
4911
- r.map { |x| ::Io::Flow::V0::Models::MembershipVersion.new(x) }
4912
- end
4913
-
4914
4938
  end
4915
4939
 
4916
4940
  class OrganizationAuthorizations
@@ -5083,6 +5107,13 @@ module Io
5083
5107
  @client = HttpClient::Preconditions.assert_class('client', client, ::Io::Flow::V0::Client)
5084
5108
  end
5085
5109
 
5110
+ def post_organizations_by_organization(organization, session_form)
5111
+ HttpClient::Preconditions.assert_class('organization', organization, String)
5112
+ (x = session_form; x.is_a?(::Io::Flow::V0::Models::SessionForm) ? x : ::Io::Flow::V0::Models::SessionForm.new(x))
5113
+ r = @client.request("/sessions/organizations/#{CGI.escape(organization)}").with_json(session_form.to_json).post
5114
+ ::Io::Flow::V0::Models::OrganizationSession.new(r)
5115
+ end
5116
+
5086
5117
  def get_by_session(session)
5087
5118
  HttpClient::Preconditions.assert_class('session', session, String)
5088
5119
  r = @client.request("/sessions/#{CGI.escape(session)}").get
@@ -5118,13 +5149,6 @@ module Io
5118
5149
  ::Io::Flow::V0::Models::Session.from_json(r)
5119
5150
  end
5120
5151
 
5121
- def post_organizations_by_organization(organization, session_form)
5122
- HttpClient::Preconditions.assert_class('organization', organization, String)
5123
- (x = session_form; x.is_a?(::Io::Flow::V0::Models::SessionForm) ? x : ::Io::Flow::V0::Models::SessionForm.new(x))
5124
- r = @client.request("/sessions/organizations/#{CGI.escape(organization)}").with_json(session_form.to_json).post
5125
- ::Io::Flow::V0::Models::OrganizationSession.new(r)
5126
- end
5127
-
5128
5152
  end
5129
5153
 
5130
5154
  class SessionAuthorizations
@@ -5212,6 +5236,16 @@ module Io
5212
5236
  r.map { |x| ::Io::Flow::V0::Models::Token.from_json(x) }
5213
5237
  end
5214
5238
 
5239
+ # Preferred method to validate a token, obtaining specific information if the
5240
+ # token is valid (or a 404 if the token does not exist). We use an HTTP POST
5241
+ # with a form body to enusre that the token itself is not logged in the
5242
+ # request logs.
5243
+ def post_authentications(token_authentication_form)
5244
+ (x = token_authentication_form; x.is_a?(::Io::Flow::V0::Models::TokenAuthenticationForm) ? x : ::Io::Flow::V0::Models::TokenAuthenticationForm.new(x))
5245
+ r = @client.request("/tokens/authentications").with_json(token_authentication_form.to_json).post
5246
+ ::Io::Flow::V0::Models::TokenReference.from_json(r)
5247
+ end
5248
+
5215
5249
  # Get metadata for the token with this ID
5216
5250
  def get_by_id(id)
5217
5251
  HttpClient::Preconditions.assert_class('id', id, String)
@@ -5232,16 +5266,6 @@ module Io
5232
5266
  ::Io::Flow::V0::Models::Cleartext.new(r)
5233
5267
  end
5234
5268
 
5235
- # Preferred method to validate a token, obtaining specific information if the
5236
- # token is valid (or a 404 if the token does not exist). We use an HTTP POST
5237
- # with a form body to enusre that the token itself is not logged in the
5238
- # request logs.
5239
- def post_authentications(token_authentication_form)
5240
- (x = token_authentication_form; x.is_a?(::Io::Flow::V0::Models::TokenAuthenticationForm) ? x : ::Io::Flow::V0::Models::TokenAuthenticationForm.new(x))
5241
- r = @client.request("/tokens/authentications").with_json(token_authentication_form.to_json).post
5242
- ::Io::Flow::V0::Models::TokenReference.from_json(r)
5243
- end
5244
-
5245
5269
  end
5246
5270
 
5247
5271
  class TokenValidations
@@ -5303,6 +5327,28 @@ module Io
5303
5327
  ::Io::Flow::V0::Models::User.new(r)
5304
5328
  end
5305
5329
 
5330
+ # Authenticates a user by email / password. Note only users that have a status
5331
+ # of active will be authorized.
5332
+ def post_authenticate(authentication_form)
5333
+ (x = authentication_form; x.is_a?(::Io::Flow::V0::Models::AuthenticationForm) ? x : ::Io::Flow::V0::Models::AuthenticationForm.new(x))
5334
+ r = @client.request("/users/authenticate").with_json(authentication_form.to_json).post
5335
+ ::Io::Flow::V0::Models::User.new(r)
5336
+ end
5337
+
5338
+ # Provides visibility into recent changes of each object, including deletion
5339
+ def get_versions(incoming={})
5340
+ opts = HttpClient::Helper.symbolize_keys(incoming)
5341
+ query = {
5342
+ :id => (x = opts.delete(:id); x.nil? ? nil : HttpClient::Preconditions.assert_class('id', x, Array).map { |v| HttpClient::Preconditions.assert_class('id', v, String) }),
5343
+ :user_id => (x = opts.delete(:user_id); x.nil? ? nil : HttpClient::Preconditions.assert_class('user_id', x, Array).map { |v| HttpClient::Preconditions.assert_class('user_id', v, String) }),
5344
+ :limit => HttpClient::Preconditions.assert_class('limit', (x = opts.delete(:limit); x.nil? ? 25 : x), Integer),
5345
+ :offset => HttpClient::Preconditions.assert_class('offset', (x = opts.delete(:offset); x.nil? ? 0 : x), Integer),
5346
+ :sort => HttpClient::Preconditions.assert_class('sort', (x = opts.delete(:sort); x.nil? ? "journal_timestamp" : x), String)
5347
+ }.delete_if { |k, v| v.nil? }
5348
+ r = @client.request("/users/versions").with_query(query).get
5349
+ r.map { |x| ::Io::Flow::V0::Models::UserVersion.new(x) }
5350
+ end
5351
+
5306
5352
  # Returns information about a specific user.
5307
5353
  def get_by_id(id)
5308
5354
  HttpClient::Preconditions.assert_class('id', id, String)
@@ -5333,28 +5379,6 @@ module Io
5333
5379
  nil
5334
5380
  end
5335
5381
 
5336
- # Authenticates a user by email / password. Note only users that have a status
5337
- # of active will be authorized.
5338
- def post_authenticate(authentication_form)
5339
- (x = authentication_form; x.is_a?(::Io::Flow::V0::Models::AuthenticationForm) ? x : ::Io::Flow::V0::Models::AuthenticationForm.new(x))
5340
- r = @client.request("/users/authenticate").with_json(authentication_form.to_json).post
5341
- ::Io::Flow::V0::Models::User.new(r)
5342
- end
5343
-
5344
- # Provides visibility into recent changes of each object, including deletion
5345
- def get_versions(incoming={})
5346
- opts = HttpClient::Helper.symbolize_keys(incoming)
5347
- query = {
5348
- :id => (x = opts.delete(:id); x.nil? ? nil : HttpClient::Preconditions.assert_class('id', x, Array).map { |v| HttpClient::Preconditions.assert_class('id', v, String) }),
5349
- :user_id => (x = opts.delete(:user_id); x.nil? ? nil : HttpClient::Preconditions.assert_class('user_id', x, Array).map { |v| HttpClient::Preconditions.assert_class('user_id', v, String) }),
5350
- :limit => HttpClient::Preconditions.assert_class('limit', (x = opts.delete(:limit); x.nil? ? 25 : x), Integer),
5351
- :offset => HttpClient::Preconditions.assert_class('offset', (x = opts.delete(:offset); x.nil? ? 0 : x), Integer),
5352
- :sort => HttpClient::Preconditions.assert_class('sort', (x = opts.delete(:sort); x.nil? ? "journal_timestamp" : x), String)
5353
- }.delete_if { |k, v| v.nil? }
5354
- r = @client.request("/users/versions").with_query(query).get
5355
- r.map { |x| ::Io::Flow::V0::Models::UserVersion.new(x) }
5356
- end
5357
-
5358
5382
  end
5359
5383
 
5360
5384
  end
@@ -24075,6 +24099,58 @@ module Io
24075
24099
 
24076
24100
  end
24077
24101
 
24102
+ class OrderBuilderDeliveredDutyForm
24103
+
24104
+ attr_reader :delivered_duty
24105
+
24106
+ def initialize(incoming={})
24107
+ opts = HttpClient::Helper.symbolize_keys(incoming)
24108
+ HttpClient::Preconditions.require_keys(opts, [:delivered_duty], 'OrderBuilderDeliveredDutyForm')
24109
+ @delivered_duty = (x = opts.delete(:delivered_duty); x.is_a?(::Io::Flow::V0::Models::DeliveredDuty) ? x : ::Io::Flow::V0::Models::DeliveredDuty.apply(x))
24110
+ end
24111
+
24112
+ def to_json
24113
+ JSON.dump(to_hash)
24114
+ end
24115
+
24116
+ def copy(incoming={})
24117
+ OrderBuilderDeliveredDutyForm.new(to_hash.merge(HttpClient::Helper.symbolize_keys(incoming)))
24118
+ end
24119
+
24120
+ def to_hash
24121
+ {
24122
+ :delivered_duty => delivered_duty.value
24123
+ }
24124
+ end
24125
+
24126
+ end
24127
+
24128
+ class OrderBuilderDestinationForm
24129
+
24130
+ attr_reader :destination
24131
+
24132
+ def initialize(incoming={})
24133
+ opts = HttpClient::Helper.symbolize_keys(incoming)
24134
+ HttpClient::Preconditions.require_keys(opts, [:destination], 'OrderBuilderDestinationForm')
24135
+ @destination = (x = opts.delete(:destination); x.is_a?(::Io::Flow::V0::Models::OrderAddress) ? x : ::Io::Flow::V0::Models::OrderAddress.new(x))
24136
+ end
24137
+
24138
+ def to_json
24139
+ JSON.dump(to_hash)
24140
+ end
24141
+
24142
+ def copy(incoming={})
24143
+ OrderBuilderDestinationForm.new(to_hash.merge(HttpClient::Helper.symbolize_keys(incoming)))
24144
+ end
24145
+
24146
+ def to_hash
24147
+ {
24148
+ :destination => destination.to_hash
24149
+ }
24150
+ end
24151
+
24152
+ end
24153
+
24078
24154
  class OrderDeleted < Event
24079
24155
 
24080
24156
  attr_reader :event_id, :timestamp, :organization, :number
@@ -27659,7 +27735,7 @@ module Io
27659
27735
 
27660
27736
  class QuoteForm
27661
27737
 
27662
- attr_reader :destination, :experience, :items, :delivered_duty, :delivered_duties
27738
+ attr_reader :destination, :experience, :items, :delivered_duty, :delivered_duties, :direction
27663
27739
 
27664
27740
  def initialize(incoming={})
27665
27741
  opts = HttpClient::Helper.symbolize_keys(incoming)
@@ -27669,6 +27745,7 @@ module Io
27669
27745
  @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)) }
27670
27746
  @delivered_duty = (x = opts.delete(:delivered_duty); x.nil? ? nil : (x = x; x.is_a?(::Io::Flow::V0::Models::DeliveredDuty) ? x : ::Io::Flow::V0::Models::DeliveredDuty.apply(x)))
27671
27747
  @delivered_duties = (x = opts.delete(:delivered_duties); x.nil? ? nil : HttpClient::Preconditions.assert_class('delivered_duties', x, Array).map { |v| (x = v; x.is_a?(::Io::Flow::V0::Models::DeliveredDuty) ? x : ::Io::Flow::V0::Models::DeliveredDuty.apply(x)) })
27748
+ @direction = (x = opts.delete(:direction); x.nil? ? nil : (x = x; x.is_a?(::Io::Flow::V0::Models::TierDirection) ? x : ::Io::Flow::V0::Models::TierDirection.apply(x)))
27672
27749
  end
27673
27750
 
27674
27751
  def to_json
@@ -27685,7 +27762,8 @@ module Io
27685
27762
  :experience => experience,
27686
27763
  :items => items.map { |o| o.to_hash },
27687
27764
  :delivered_duty => delivered_duty.nil? ? nil : delivered_duty.value,
27688
- :delivered_duties => delivered_duties.nil? ? nil : delivered_duties.map { |o| o.value }
27765
+ :delivered_duties => delivered_duties.nil? ? nil : delivered_duties.map { |o| o.value },
27766
+ :direction => direction.nil? ? nil : direction.value
27689
27767
  }
27690
27768
  end
27691
27769
 
@@ -28757,12 +28835,14 @@ module Io
28757
28835
 
28758
28836
  class ReturnForm
28759
28837
 
28760
- attr_reader :items, :service, :destination, :key, :origin
28838
+ attr_reader :items, :tier_id, :order_number, :service, :destination, :key, :origin
28761
28839
 
28762
28840
  def initialize(incoming={})
28763
28841
  opts = HttpClient::Helper.symbolize_keys(incoming)
28764
- HttpClient::Preconditions.require_keys(opts, [:items], 'ReturnForm')
28842
+ HttpClient::Preconditions.require_keys(opts, [:items, :tier_id], 'ReturnForm')
28765
28843
  @items = HttpClient::Preconditions.assert_class('items', opts.delete(:items), Array).map { |v| (x = v; x.is_a?(::Io::Flow::V0::Models::ReturnLineItem) ? x : ::Io::Flow::V0::Models::ReturnLineItem.new(x)) }
28844
+ @tier_id = HttpClient::Preconditions.assert_class('tier_id', opts.delete(:tier_id), String)
28845
+ @order_number = (x = opts.delete(:order_number); x.nil? ? nil : HttpClient::Preconditions.assert_class('order_number', x, String))
28766
28846
  @service = (x = opts.delete(:service); x.nil? ? nil : HttpClient::Preconditions.assert_class('service', x, String))
28767
28847
  @destination = (x = opts.delete(:destination); x.nil? ? nil : (x = x; x.is_a?(::Io::Flow::V0::Models::ShippingAddress) ? x : ::Io::Flow::V0::Models::ShippingAddress.new(x)))
28768
28848
  @key = (x = opts.delete(:key); x.nil? ? nil : HttpClient::Preconditions.assert_class('key', x, String))
@@ -28780,6 +28860,8 @@ module Io
28780
28860
  def to_hash
28781
28861
  {
28782
28862
  :items => items.map { |o| o.to_hash },
28863
+ :tier_id => tier_id,
28864
+ :order_number => order_number,
28783
28865
  :service => service,
28784
28866
  :destination => destination.nil? ? nil : destination.to_hash,
28785
28867
  :key => key,