flowcommerce 0.2.54 → 0.2.55

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: cd6a43107fb41cc5ffcb03ddb671724db45c48bf
4
- data.tar.gz: 81ae598d29c9fb9c5d62fd4fddae33c57d465efe
3
+ metadata.gz: 82b3787a0e44093b4c2c577f7d5830a788d315e4
4
+ data.tar.gz: bebcd065a19439a67343dcecb8040cfd428a5575
5
5
  SHA512:
6
- metadata.gz: beb67d103fb0b4172a232e72a7038a8e1d4a369f3e5b1373859e74268d9aeab568ee00593c2a9823a378d3961ac7fcf231ebb44a1fcb73c38b742c3c4c2c6f9b
7
- data.tar.gz: 745a1b60a18f70239bb4575110438ea31520e01da1d3b12968e2c02fca358d7728a71e17d6690220f53c66110e2804f1bcd0ab39880e5a8458ff2223c7cd36b4
6
+ metadata.gz: e504673042da9c9fa06130c796ec36634f469b48dcdb07159fb458d68db0a827fc6e9f7e4f03427bd006270be8c905ec68a24e3c7cbb9df2b63f32b2863c49a2
7
+ data.tar.gz: adeff9e4d05b20bee1d4f377ff9a496e7174c642d5b138baa6912363056313d1afe537675c8fc2e69c364a7dd200a0e993b43a8f90d6648480ef68689faacd4e
@@ -1,6 +1,6 @@
1
1
  # Generated by API Builder - https://www.apibuilder.io
2
- # Service version: 0.4.51
3
- # apibuilder 0.13.0 app.apibuilder.io/flow/api/0.4.77/ruby_client
2
+ # Service version: 0.4.90
3
+ # apibuilder 0.14.3 app.apibuilder.io/flow/api/0.4.90/ruby_client
4
4
 
5
5
  require 'cgi'
6
6
  require 'net/http'
@@ -25,8 +25,8 @@ module Io
25
25
 
26
26
  BASE_URL = 'https://api.flow.io' unless defined?(Constants::BASE_URL)
27
27
  NAMESPACE = 'io.flow.v0' unless defined?(Constants::NAMESPACE)
28
- USER_AGENT = 'apibuilder 0.13.0 app.apibuilder.io/flow/api/0.4.77/ruby_client' unless defined?(Constants::USER_AGENT)
29
- VERSION = '0.4.51' unless defined?(Constants::VERSION)
28
+ USER_AGENT = 'apibuilder 0.14.3 app.apibuilder.io/flow/api/0.4.90/ruby_client' unless defined?(Constants::USER_AGENT)
29
+ VERSION = '0.4.90' unless defined?(Constants::VERSION)
30
30
  VERSION_MAJOR = 0 unless defined?(VERSION_MAJOR)
31
31
 
32
32
  end
@@ -380,6 +380,10 @@ module Io
380
380
  @imports ||= ::Io::Flow::V0::Clients::Imports.new(self)
381
381
  end
382
382
 
383
+ def import_templates
384
+ @import_templates ||= ::Io::Flow::V0::Clients::ImportTemplates.new(self)
385
+ end
386
+
383
387
  def invitations
384
388
  @invitations ||= ::Io::Flow::V0::Clients::Invitations.new(self)
385
389
  end
@@ -1189,6 +1193,8 @@ module Io
1189
1193
  :id => (x = opts.delete(:id); x.nil? ? nil : HttpClient::Preconditions.assert_class('id', x, Array).map { |v| HttpClient::Preconditions.assert_class('id', v, String) }),
1190
1194
  :number => (x = opts.delete(:number); x.nil? ? nil : HttpClient::Preconditions.assert_class('number', x, Array).map { |v| HttpClient::Preconditions.assert_class('number', v, String) }),
1191
1195
  :identifier => (x = opts.delete(:identifier); x.nil? ? nil : HttpClient::Preconditions.assert_class('identifier', x, String)),
1196
+ :status => (x = opts.delete(:status); x.nil? ? nil : (x = x; x.is_a?(::Io::Flow::V0::Models::OrderStatus) ? x : ::Io::Flow::V0::Models::OrderStatus.apply(x)).value),
1197
+ :submitted_at_on_or_after => (x = opts.delete(:submitted_at_on_or_after); x.nil? ? nil : HttpClient::Preconditions.assert_class('submitted_at_on_or_after', HttpClient::Helper.to_date_time_iso8601(x), DateTime)),
1192
1198
  :limit => HttpClient::Preconditions.assert_class('limit', (x = opts.delete(:limit); x.nil? ? 25 : x), Integer),
1193
1199
  :offset => HttpClient::Preconditions.assert_class('offset', (x = opts.delete(:offset); x.nil? ? 0 : x), Integer),
1194
1200
  :sort => HttpClient::Preconditions.assert_class('sort', (x = opts.delete(:sort); x.nil? ? "-created_at" : x), String),
@@ -1236,6 +1242,7 @@ module Io
1236
1242
  query = {
1237
1243
  :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
1244
  :number => (x = opts.delete(:number); x.nil? ? nil : HttpClient::Preconditions.assert_class('number', x, Array).map { |v| HttpClient::Preconditions.assert_class('number', v, String) }),
1245
+ :journal_timestamp_on_or_after => (x = opts.delete(:journal_timestamp_on_or_after); x.nil? ? nil : HttpClient::Preconditions.assert_class('journal_timestamp_on_or_after', HttpClient::Helper.to_date_time_iso8601(x), DateTime)),
1239
1246
  :limit => HttpClient::Preconditions.assert_class('limit', (x = opts.delete(:limit); x.nil? ? 25 : x), Integer),
1240
1247
  :offset => HttpClient::Preconditions.assert_class('offset', (x = opts.delete(:offset); x.nil? ? 0 : x), Integer),
1241
1248
  :sort => HttpClient::Preconditions.assert_class('sort', (x = opts.delete(:sort); x.nil? ? "journal_timestamp" : x), String)
@@ -4764,6 +4771,27 @@ module Io
4764
4771
 
4765
4772
  end
4766
4773
 
4774
+ class ImportTemplates
4775
+
4776
+ def initialize(client)
4777
+ @client = HttpClient::Preconditions.assert_class('client', client, ::Io::Flow::V0::Client)
4778
+ end
4779
+
4780
+ def get(organization)
4781
+ HttpClient::Preconditions.assert_class('organization', organization, String)
4782
+ r = @client.request("/#{CGI.escape(organization)}/import/templates").get
4783
+ r.map { |x| ::Io::Flow::V0::Models::ImportTemplate.new(x) }
4784
+ end
4785
+
4786
+ def post(organization, import_template_form)
4787
+ HttpClient::Preconditions.assert_class('organization', organization, String)
4788
+ (x = import_template_form; x.is_a?(::Io::Flow::V0::Models::ImportTemplateForm) ? x : ::Io::Flow::V0::Models::ImportTemplateForm.new(x))
4789
+ r = @client.request("/#{CGI.escape(organization)}/import/templates").with_json(import_template_form.to_json).post
4790
+ ::Io::Flow::V0::Models::ImportTemplateExample.new(r)
4791
+ end
4792
+
4793
+ end
4794
+
4767
4795
  class Invitations
4768
4796
 
4769
4797
  def initialize(client)
@@ -5185,31 +5213,6 @@ module Io
5185
5213
  r.map { |x| ::Io::Flow::V0::Models::Suggestion.new(x) }
5186
5214
  end
5187
5215
 
5188
- # Returns search suggestions for harmonization data
5189
- def get_harmonization(organization, incoming={})
5190
- HttpClient::Preconditions.assert_class('organization', organization, String)
5191
- opts = HttpClient::Helper.symbolize_keys(incoming)
5192
- query = {
5193
- :q => (x = opts.delete(:q); x.nil? ? nil : HttpClient::Preconditions.assert_class('q', x, String)),
5194
- :limit => HttpClient::Preconditions.assert_class('limit', (x = opts.delete(:limit); x.nil? ? 25 : x), Integer),
5195
- :offset => HttpClient::Preconditions.assert_class('offset', (x = opts.delete(:offset); x.nil? ? 0 : x), Integer),
5196
- :sort => HttpClient::Preconditions.assert_class('sort', (x = opts.delete(:sort); x.nil? ? "-created_at" : x), String)
5197
- }.delete_if { |k, v| v.nil? }
5198
- r = @client.request("/#{CGI.escape(organization)}/suggestion/harmonization").with_query(query).get
5199
- r.map { |x| ::Io::Flow::V0::Models::Suggestion.new(x) }
5200
- end
5201
-
5202
- # Returns link to CSV with suggested phrases for harmonization
5203
- def get_harmonization_and_phrases(organization, incoming={})
5204
- HttpClient::Preconditions.assert_class('organization', organization, String)
5205
- opts = HttpClient::Helper.symbolize_keys(incoming)
5206
- query = {
5207
- :url => HttpClient::Preconditions.assert_class('url', opts.delete(:url), String)
5208
- }.delete_if { |k, v| v.nil? }
5209
- r = @client.request("/#{CGI.escape(organization)}/suggestion/harmonization/phrases").with_query(query).get
5210
- r
5211
- end
5212
-
5213
5216
  end
5214
5217
 
5215
5218
  class Tokens
@@ -5923,6 +5926,7 @@ module Io
5923
5926
  CATALOG_ITEM_DELETED = 'catalog_item_deleted' unless defined?(CATALOG_ITEM_DELETED)
5924
5927
  SUBCATALOG_ITEM_UPSERTED = 'subcatalog_item_upserted' unless defined?(SUBCATALOG_ITEM_UPSERTED)
5925
5928
  SUBCATALOG_ITEM_DELETED = 'subcatalog_item_deleted' unless defined?(SUBCATALOG_ITEM_DELETED)
5929
+ CROSSDOCK_SHIPMENT_UPSERTED = 'crossdock_shipment_upserted' unless defined?(CROSSDOCK_SHIPMENT_UPSERTED)
5926
5930
  RATE_DELETED = 'rate_deleted' unless defined?(RATE_DELETED)
5927
5931
  RATE_UPSERTED = 'rate_upserted' unless defined?(RATE_UPSERTED)
5928
5932
  AVAILABLE_PROMOTIONS_UPSERTED = 'available_promotions_upserted' unless defined?(AVAILABLE_PROMOTIONS_UPSERTED)
@@ -5969,7 +5973,6 @@ module Io
5969
5973
  SNAPSHOT_UPSERTED = 'snapshot_upserted' unless defined?(SNAPSHOT_UPSERTED)
5970
5974
  SNAPSHOT_DELETED = 'snapshot_deleted' unless defined?(SNAPSHOT_DELETED)
5971
5975
  LABEL_UPSERTED = 'label_upserted' unless defined?(LABEL_UPSERTED)
5972
- LABEL_UPSERTED_V2 = 'label_upserted_v2' unless defined?(LABEL_UPSERTED_V2)
5973
5976
  NOTIFICATION_UPSERTED = 'notification_upserted' unless defined?(NOTIFICATION_UPSERTED)
5974
5977
  NOTIFICATION_DELETED = 'notification_deleted' unless defined?(NOTIFICATION_DELETED)
5975
5978
  MANIFESTED_LABEL_UPSERTED = 'manifested_label_upserted' unless defined?(MANIFESTED_LABEL_UPSERTED)
@@ -6025,7 +6028,7 @@ module Io
6025
6028
  end
6026
6029
 
6027
6030
  def subtype_to_hash
6028
- raise 'Cannot serialize an instance of event directly - must use one of the specific types: attribute_upserted, attribute_deleted, attribute_upserted_v2, attribute_deleted_v2, catalog_upserted, catalog_deleted, subcatalog_upserted, subcatalog_deleted, catalog_item_upserted, catalog_item_deleted, subcatalog_item_upserted, subcatalog_item_deleted, rate_deleted, rate_upserted, available_promotions_upserted, available_promotions_deleted, allocation_deleted_v2, allocation_upserted_v2, currency_format_deleted, currency_format_upserted, experience_deleted, experience_upserted, experience_price_book_mapping_deleted, experience_price_book_mapping_upserted, item_margin_deleted, item_margin_upserted, item_sales_margin_deleted, item_sales_margin_upserted, label_format_deleted, label_format_upserted, order_deleted, order_upserted, order_identifier_deleted, order_identifier_upserted, order_identifier_deleted_v2, order_identifier_upserted_v2, pricing_deleted, pricing_upserted, fraud_status_changed, tier_upserted, tier_deleted, delivery_option_upserted, delivery_option_deleted, hs6_code_upserted, hs6_code_deleted, hs10_code_upserted, hs10_code_deleted, item_origin_upserted, item_origin_deleted, harmonized_item_upserted, harmonized_item_deleted, harmonized_landed_cost_upserted, fully_harmonized_item_upserted, rule_upserted, rule_deleted, snapshot_upserted, snapshot_deleted, label_upserted, label_upserted_v2, notification_upserted, notification_deleted, manifested_label_upserted, manifested_label_deleted, local_item_upserted, local_item_deleted, membership_upserted, membership_deleted, organization_upserted, organization_deleted, authorization_upserted, authorization_deleted, authorization_deleted_v2, authorization_status_changed, card_authorization_upserted, card_authorization_upserted_v2, online_authorization_upserted, online_authorization_upserted_v2, capture_upserted, capture_upserted_v2, card_upserted, card_upserted_v2, card_deleted, payment_upserted, payment_deleted, refund_upserted, refund_upserted_v2, refund_capture_upserted_v2, reversal_upserted, price_book_upserted, price_book_deleted, price_book_item_upserted, price_book_item_deleted, organization_rates_published, organization_countries_published, organization_ratecard_transit_windows_published, return_upserted, return_deleted, targeting_item_upserted, targeting_item_deleted, tracking_label_event_upserted'
6031
+ raise 'Cannot serialize an instance of event directly - must use one of the specific types: attribute_upserted, attribute_deleted, attribute_upserted_v2, attribute_deleted_v2, catalog_upserted, catalog_deleted, subcatalog_upserted, subcatalog_deleted, catalog_item_upserted, catalog_item_deleted, subcatalog_item_upserted, subcatalog_item_deleted, crossdock_shipment_upserted, rate_deleted, rate_upserted, available_promotions_upserted, available_promotions_deleted, allocation_deleted_v2, allocation_upserted_v2, currency_format_deleted, currency_format_upserted, experience_deleted, experience_upserted, experience_price_book_mapping_deleted, experience_price_book_mapping_upserted, item_margin_deleted, item_margin_upserted, item_sales_margin_deleted, item_sales_margin_upserted, label_format_deleted, label_format_upserted, order_deleted, order_upserted, order_identifier_deleted, order_identifier_upserted, order_identifier_deleted_v2, order_identifier_upserted_v2, pricing_deleted, pricing_upserted, fraud_status_changed, tier_upserted, tier_deleted, delivery_option_upserted, delivery_option_deleted, hs6_code_upserted, hs6_code_deleted, hs10_code_upserted, hs10_code_deleted, item_origin_upserted, item_origin_deleted, harmonized_item_upserted, harmonized_item_deleted, harmonized_landed_cost_upserted, fully_harmonized_item_upserted, rule_upserted, rule_deleted, snapshot_upserted, snapshot_deleted, label_upserted, notification_upserted, notification_deleted, manifested_label_upserted, manifested_label_deleted, local_item_upserted, local_item_deleted, membership_upserted, membership_deleted, organization_upserted, organization_deleted, authorization_upserted, authorization_deleted, authorization_deleted_v2, authorization_status_changed, card_authorization_upserted, card_authorization_upserted_v2, online_authorization_upserted, online_authorization_upserted_v2, capture_upserted, capture_upserted_v2, card_upserted, card_upserted_v2, card_deleted, payment_upserted, payment_deleted, refund_upserted, refund_upserted_v2, refund_capture_upserted_v2, reversal_upserted, price_book_upserted, price_book_deleted, price_book_item_upserted, price_book_item_deleted, organization_rates_published, organization_countries_published, organization_ratecard_transit_windows_published, return_upserted, return_deleted, targeting_item_upserted, targeting_item_deleted, tracking_label_event_upserted'
6029
6032
  end
6030
6033
 
6031
6034
  def to_hash
@@ -6051,6 +6054,7 @@ module Io
6051
6054
  when Types::CATALOG_ITEM_DELETED; CatalogItemDeleted.new(hash)
6052
6055
  when Types::SUBCATALOG_ITEM_UPSERTED; SubcatalogItemUpserted.new(hash)
6053
6056
  when Types::SUBCATALOG_ITEM_DELETED; SubcatalogItemDeleted.new(hash)
6057
+ when Types::CROSSDOCK_SHIPMENT_UPSERTED; CrossdockShipmentUpserted.new(hash)
6054
6058
  when Types::RATE_DELETED; RateDeleted.new(hash)
6055
6059
  when Types::RATE_UPSERTED; RateUpserted.new(hash)
6056
6060
  when Types::AVAILABLE_PROMOTIONS_UPSERTED; AvailablePromotionsUpserted.new(hash)
@@ -6097,7 +6101,6 @@ module Io
6097
6101
  when Types::SNAPSHOT_UPSERTED; SnapshotUpserted.new(hash)
6098
6102
  when Types::SNAPSHOT_DELETED; SnapshotDeleted.new(hash)
6099
6103
  when Types::LABEL_UPSERTED; LabelUpserted.new(hash)
6100
- when Types::LABEL_UPSERTED_V2; LabelUpsertedV2.new(hash)
6101
6104
  when Types::NOTIFICATION_UPSERTED; NotificationUpserted.new(hash)
6102
6105
  when Types::NOTIFICATION_DELETED; NotificationDeleted.new(hash)
6103
6106
  when Types::MANIFESTED_LABEL_UPSERTED; ManifestedLabelUpserted.new(hash)
@@ -8014,50 +8017,44 @@ module Io
8014
8017
  @@all ||= [AttributeIntent.brand, AttributeIntent.product_id, AttributeIntent.fulfillment_method, AttributeIntent.hazardous, AttributeIntent.price, AttributeIntent.size, AttributeIntent.sku, AttributeIntent.taxability]
8015
8018
  end
8016
8019
 
8017
- # Attributes with this data type imply that this is the brand name of the item
8018
- # for retailers that sell multiple brands
8020
+ # A brand name of the item (for retailers that sell multiple brands)
8019
8021
  def AttributeIntent.brand
8020
8022
  @@_brand ||= AttributeIntent.new('brand')
8021
8023
  end
8022
8024
 
8023
- # Attributes with this data type imply that the value of this attribute
8024
- # identifies the product Id which can then be used to group multiple items
8025
- # together.
8025
+ # An identifier used to group items that are variations of the same product,
8026
+ # such as different sizes or colors of the same shirt
8026
8027
  def AttributeIntent.product_id
8027
8028
  @@_product_id ||= AttributeIntent.new('product_id')
8028
8029
  end
8029
8030
 
8030
- # Attributes with this data type imply whether delivery is a package or digital
8031
- # good.
8031
+ # Identifies whether the item is a physical or digital good
8032
8032
  def AttributeIntent.fulfillment_method
8033
8033
  @@_fulfillment_method ||= AttributeIntent.new('fulfillment_method')
8034
8034
  end
8035
8035
 
8036
- # Attributes with this data type imply whether this item may contain hazardous
8037
- # materials.
8036
+ # Identifies whether this item may contain hazardous materials
8038
8037
  def AttributeIntent.hazardous
8039
8038
  @@_hazardous ||= AttributeIntent.new('hazardous')
8040
8039
  end
8041
8040
 
8042
- # Attributes with this data type are inferred to be prices in the organization's
8043
- # base currency and will be localized based on each Experience's pricing policy.
8041
+ # A price for the item in the organization's base currency (will be localized
8042
+ # based on each Experience's pricing policy)
8044
8043
  def AttributeIntent.price
8045
8044
  @@_price ||= AttributeIntent.new('price')
8046
8045
  end
8047
8046
 
8048
- # Attributes with this data type imply that that this is the clothing size of
8049
- # the item.
8047
+ # A size label of the item
8050
8048
  def AttributeIntent.size
8051
8049
  @@_size ||= AttributeIntent.new('size')
8052
8050
  end
8053
8051
 
8054
- # Attributes with this data type imply that this is the retailers SKU for the
8055
- # item.
8052
+ # An SKU for the item
8056
8053
  def AttributeIntent.sku
8057
8054
  @@_sku ||= AttributeIntent.new('sku')
8058
8055
  end
8059
8056
 
8060
- # Attributes with this data type imply whether taxes are applicable to an item.
8057
+ # Identifies whether taxes are applicable to an item
8061
8058
  def AttributeIntent.taxability
8062
8059
  @@_taxability ||= AttributeIntent.new('taxability')
8063
8060
  end
@@ -9261,7 +9258,7 @@ module Io
9261
9258
  end
9262
9259
 
9263
9260
  def EventType.ALL
9264
- @@all ||= [EventType.attribute_upserted, EventType.attribute_deleted, EventType.attribute_upserted_v2, EventType.attribute_deleted_v2, EventType.catalog_upserted, EventType.catalog_deleted, EventType.subcatalog_upserted, EventType.subcatalog_deleted, EventType.catalog_item_upserted, EventType.catalog_item_deleted, EventType.subcatalog_item_upserted, EventType.subcatalog_item_deleted, EventType.rate_deleted, EventType.rate_upserted, EventType.available_promotions_upserted, EventType.available_promotions_deleted, EventType.allocation_deleted_v2, EventType.allocation_upserted_v2, EventType.currency_format_deleted, EventType.currency_format_upserted, EventType.experience_deleted, EventType.experience_upserted, EventType.experience_price_book_mapping_deleted, EventType.experience_price_book_mapping_upserted, EventType.item_margin_deleted, EventType.item_margin_upserted, EventType.item_sales_margin_deleted, EventType.item_sales_margin_upserted, EventType.label_format_deleted, EventType.label_format_upserted, EventType.order_deleted, EventType.order_upserted, EventType.order_identifier_deleted, EventType.order_identifier_upserted, EventType.order_identifier_deleted_v2, EventType.order_identifier_upserted_v2, EventType.pricing_deleted, EventType.pricing_upserted, EventType.fraud_status_changed, EventType.tier_upserted, EventType.tier_deleted, EventType.delivery_option_upserted, EventType.delivery_option_deleted, EventType.hs6_code_upserted, EventType.hs6_code_deleted, EventType.hs10_code_upserted, EventType.hs10_code_deleted, EventType.item_origin_upserted, EventType.item_origin_deleted, EventType.harmonized_item_upserted, EventType.harmonized_item_deleted, EventType.harmonized_landed_cost_upserted, EventType.fully_harmonized_item_upserted, EventType.rule_upserted, EventType.rule_deleted, EventType.snapshot_upserted, EventType.snapshot_deleted, EventType.label_upserted, EventType.label_upserted_v2, EventType.notification_upserted, EventType.notification_deleted, EventType.manifested_label_upserted, EventType.manifested_label_deleted, EventType.local_item_upserted, EventType.local_item_deleted, EventType.membership_upserted, EventType.membership_deleted, EventType.organization_upserted, EventType.organization_deleted, EventType.authorization_upserted, EventType.authorization_deleted, EventType.authorization_deleted_v2, EventType.authorization_status_changed, EventType.card_authorization_upserted, EventType.card_authorization_upserted_v2, EventType.online_authorization_upserted, EventType.online_authorization_upserted_v2, EventType.capture_upserted, EventType.capture_upserted_v2, EventType.card_upserted, EventType.card_upserted_v2, EventType.card_deleted, EventType.payment_upserted, EventType.payment_deleted, EventType.refund_upserted, EventType.refund_upserted_v2, EventType.refund_capture_upserted_v2, EventType.reversal_upserted, EventType.price_book_upserted, EventType.price_book_deleted, EventType.price_book_item_upserted, EventType.price_book_item_deleted, EventType.organization_rates_published, EventType.organization_countries_published, EventType.organization_ratecard_transit_windows_published, EventType.return_upserted, EventType.return_deleted, EventType.targeting_item_upserted, EventType.targeting_item_deleted, EventType.tracking_label_event_upserted]
9261
+ @@all ||= [EventType.attribute_upserted, EventType.attribute_deleted, EventType.attribute_upserted_v2, EventType.attribute_deleted_v2, EventType.catalog_upserted, EventType.catalog_deleted, EventType.subcatalog_upserted, EventType.subcatalog_deleted, EventType.catalog_item_upserted, EventType.catalog_item_deleted, EventType.subcatalog_item_upserted, EventType.subcatalog_item_deleted, EventType.crossdock_shipment_upserted, EventType.rate_deleted, EventType.rate_upserted, EventType.available_promotions_upserted, EventType.available_promotions_deleted, EventType.allocation_deleted_v2, EventType.allocation_upserted_v2, EventType.currency_format_deleted, EventType.currency_format_upserted, EventType.experience_deleted, EventType.experience_upserted, EventType.experience_price_book_mapping_deleted, EventType.experience_price_book_mapping_upserted, EventType.item_margin_deleted, EventType.item_margin_upserted, EventType.item_sales_margin_deleted, EventType.item_sales_margin_upserted, EventType.label_format_deleted, EventType.label_format_upserted, EventType.order_deleted, EventType.order_upserted, EventType.order_identifier_deleted, EventType.order_identifier_upserted, EventType.order_identifier_deleted_v2, EventType.order_identifier_upserted_v2, EventType.pricing_deleted, EventType.pricing_upserted, EventType.fraud_status_changed, EventType.tier_upserted, EventType.tier_deleted, EventType.delivery_option_upserted, EventType.delivery_option_deleted, EventType.hs6_code_upserted, EventType.hs6_code_deleted, EventType.hs10_code_upserted, EventType.hs10_code_deleted, EventType.item_origin_upserted, EventType.item_origin_deleted, EventType.harmonized_item_upserted, EventType.harmonized_item_deleted, EventType.harmonized_landed_cost_upserted, EventType.fully_harmonized_item_upserted, EventType.rule_upserted, EventType.rule_deleted, EventType.snapshot_upserted, EventType.snapshot_deleted, EventType.label_upserted, EventType.notification_upserted, EventType.notification_deleted, EventType.manifested_label_upserted, EventType.manifested_label_deleted, EventType.local_item_upserted, EventType.local_item_deleted, EventType.membership_upserted, EventType.membership_deleted, EventType.organization_upserted, EventType.organization_deleted, EventType.authorization_upserted, EventType.authorization_deleted, EventType.authorization_deleted_v2, EventType.authorization_status_changed, EventType.card_authorization_upserted, EventType.card_authorization_upserted_v2, EventType.online_authorization_upserted, EventType.online_authorization_upserted_v2, EventType.capture_upserted, EventType.capture_upserted_v2, EventType.card_upserted, EventType.card_upserted_v2, EventType.card_deleted, EventType.payment_upserted, EventType.payment_deleted, EventType.refund_upserted, EventType.refund_upserted_v2, EventType.refund_capture_upserted_v2, EventType.reversal_upserted, EventType.price_book_upserted, EventType.price_book_deleted, EventType.price_book_item_upserted, EventType.price_book_item_deleted, EventType.organization_rates_published, EventType.organization_countries_published, EventType.organization_ratecard_transit_windows_published, EventType.return_upserted, EventType.return_deleted, EventType.targeting_item_upserted, EventType.targeting_item_deleted, EventType.tracking_label_event_upserted]
9265
9262
  end
9266
9263
 
9267
9264
  def EventType.attribute_upserted
@@ -9312,6 +9309,10 @@ module Io
9312
9309
  @@_subcatalog_item_deleted ||= EventType.new('subcatalog_item_deleted')
9313
9310
  end
9314
9311
 
9312
+ def EventType.crossdock_shipment_upserted
9313
+ @@_crossdock_shipment_upserted ||= EventType.new('crossdock_shipment_upserted')
9314
+ end
9315
+
9315
9316
  def EventType.rate_deleted
9316
9317
  @@_rate_deleted ||= EventType.new('rate_deleted')
9317
9318
  end
@@ -9496,10 +9497,6 @@ module Io
9496
9497
  @@_label_upserted ||= EventType.new('label_upserted')
9497
9498
  end
9498
9499
 
9499
- def EventType.label_upserted_v2
9500
- @@_label_upserted_v2 ||= EventType.new('label_upserted_v2')
9501
- end
9502
-
9503
9500
  def EventType.notification_upserted
9504
9501
  @@_notification_upserted ||= EventType.new('notification_upserted')
9505
9502
  end
@@ -12437,6 +12434,55 @@ module Io
12437
12434
 
12438
12435
  end
12439
12436
 
12437
+ class ShipmentRecipient
12438
+
12439
+ attr_reader :value
12440
+
12441
+ def initialize(value)
12442
+ @value = HttpClient::Preconditions.assert_class('value', value, String)
12443
+ end
12444
+
12445
+ # Returns the instance of ShipmentRecipient for this value, creating a new instance for an unknown value
12446
+ def ShipmentRecipient.apply(value)
12447
+ if value.instance_of?(ShipmentRecipient)
12448
+ value
12449
+ else
12450
+ HttpClient::Preconditions.assert_class_or_nil('value', value, String)
12451
+ value.nil? ? nil : (from_string(value) || ShipmentRecipient.new(value))
12452
+ end
12453
+ end
12454
+
12455
+ # Returns the instance of ShipmentRecipient for this value, or nil if not found
12456
+ def ShipmentRecipient.from_string(value)
12457
+ HttpClient::Preconditions.assert_class('value', value, String)
12458
+ ShipmentRecipient.ALL.find { |v| v.value == value }
12459
+ end
12460
+
12461
+ def ShipmentRecipient.ALL
12462
+ @@all ||= [ShipmentRecipient.customer, ShipmentRecipient.return, ShipmentRecipient.crossdock]
12463
+ end
12464
+
12465
+ # Outbound shipment to the customer
12466
+ def ShipmentRecipient.customer
12467
+ @@_customer ||= ShipmentRecipient.new('customer')
12468
+ end
12469
+
12470
+ # Inbound or return shipment
12471
+ def ShipmentRecipient.return
12472
+ @@_return ||= ShipmentRecipient.new('return')
12473
+ end
12474
+
12475
+ # Outbound shipment to a crossdock
12476
+ def ShipmentRecipient.crossdock
12477
+ @@_crossdock ||= ShipmentRecipient.new('crossdock')
12478
+ end
12479
+
12480
+ def to_hash
12481
+ value
12482
+ end
12483
+
12484
+ end
12485
+
12440
12486
  class SortDirection
12441
12487
 
12442
12488
  attr_reader :value
@@ -12699,6 +12745,52 @@ module Io
12699
12745
 
12700
12746
  end
12701
12747
 
12748
+ class TierEstimateType
12749
+
12750
+ attr_reader :value
12751
+
12752
+ def initialize(value)
12753
+ @value = HttpClient::Preconditions.assert_class('value', value, String)
12754
+ end
12755
+
12756
+ # Returns the instance of TierEstimateType for this value, creating a new instance for an unknown value
12757
+ def TierEstimateType.apply(value)
12758
+ if value.instance_of?(TierEstimateType)
12759
+ value
12760
+ else
12761
+ HttpClient::Preconditions.assert_class_or_nil('value', value, String)
12762
+ value.nil? ? nil : (from_string(value) || TierEstimateType.new(value))
12763
+ end
12764
+ end
12765
+
12766
+ # Returns the instance of TierEstimateType for this value, or nil if not found
12767
+ def TierEstimateType.from_string(value)
12768
+ HttpClient::Preconditions.assert_class('value', value, String)
12769
+ TierEstimateType.ALL.find { |v| v.value == value }
12770
+ end
12771
+
12772
+ def TierEstimateType.ALL
12773
+ @@all ||= [TierEstimateType.calculated, TierEstimateType.custom]
12774
+ end
12775
+
12776
+ # Displays the calculated delivery window estimate next to the shipping tier
12777
+ # name.
12778
+ def TierEstimateType.calculated
12779
+ @@_calculated ||= TierEstimateType.new('calculated')
12780
+ end
12781
+
12782
+ # Shows a custom label next to the shipping tier name instead of a delivery
12783
+ # window estimate.
12784
+ def TierEstimateType.custom
12785
+ @@_custom ||= TierEstimateType.new('custom')
12786
+ end
12787
+
12788
+ def to_hash
12789
+ value
12790
+ end
12791
+
12792
+ end
12793
+
12702
12794
  class TierStrategy
12703
12795
 
12704
12796
  attr_reader :value
@@ -14504,13 +14596,13 @@ module Io
14504
14596
  @organization = HttpClient::Preconditions.assert_class('organization', opts.delete(:organization), String)
14505
14597
  @key = HttpClient::Preconditions.assert_class('key', opts.delete(:key), String)
14506
14598
  @order_number = (x = opts.delete(:order_number); x.nil? ? nil : HttpClient::Preconditions.assert_class('order_number', x, String))
14507
- @card = HttpClient::Preconditions.assert_class('card', HttpClient::Helper.to_object(opts.delete(:card)), Hash)
14599
+ @card = (x = opts.delete(:card); x.is_a?(::Io::Flow::V0::Models::ExpandableCard) ? x : ::Io::Flow::V0::Models::ExpandableCard.from_json(x))
14508
14600
  @amount = HttpClient::Preconditions.assert_class('amount', HttpClient::Helper.to_big_decimal(opts.delete(:amount)), BigDecimal)
14509
14601
  @currency = HttpClient::Preconditions.assert_class('currency', opts.delete(:currency), String)
14510
- @customer = HttpClient::Preconditions.assert_class('customer', HttpClient::Helper.to_object(opts.delete(:customer)), Hash)
14602
+ @customer = (x = opts.delete(:customer); x.is_a?(::Io::Flow::V0::Models::Customer) ? x : ::Io::Flow::V0::Models::Customer.new(x))
14511
14603
  @attributes = HttpClient::Preconditions.assert_class('attributes', opts.delete(:attributes), Hash).inject({}) { |h, d| h[d[0]] = HttpClient::Preconditions.assert_class('attributes', d[1], String); h }
14512
- @destination = (x = opts.delete(:destination); x.nil? ? nil : HttpClient::Preconditions.assert_class('destination', HttpClient::Helper.to_object(x), Hash))
14513
- @result = HttpClient::Preconditions.assert_class('result', HttpClient::Helper.to_object(opts.delete(:result)), Hash)
14604
+ @destination = (x = opts.delete(:destination); x.nil? ? nil : (x = x; x.is_a?(::Io::Flow::V0::Models::Address) ? x : ::Io::Flow::V0::Models::Address.new(x)))
14605
+ @result = (x = opts.delete(:result); x.is_a?(::Io::Flow::V0::Models::AuthorizationResult) ? x : ::Io::Flow::V0::Models::AuthorizationResult.new(x))
14514
14606
  @ip = (x = opts.delete(:ip); x.nil? ? nil : HttpClient::Preconditions.assert_class('ip', x, String))
14515
14607
  @created_at = HttpClient::Preconditions.assert_class('created_at', HttpClient::Helper.to_date_time_iso8601(opts.delete(:created_at)), DateTime)
14516
14608
  end
@@ -14530,13 +14622,13 @@ module Io
14530
14622
  :organization => organization,
14531
14623
  :key => key,
14532
14624
  :order_number => order_number,
14533
- :card => card,
14625
+ :card => card.to_hash,
14534
14626
  :amount => amount,
14535
14627
  :currency => currency,
14536
- :customer => customer,
14628
+ :customer => customer.to_hash,
14537
14629
  :attributes => attributes,
14538
- :destination => destination,
14539
- :result => result,
14630
+ :destination => destination.nil? ? nil : destination.to_hash,
14631
+ :result => result.to_hash,
14540
14632
  :ip => ip,
14541
14633
  :created_at => created_at
14542
14634
  }
@@ -15392,11 +15484,11 @@ module Io
15392
15484
  @organization = HttpClient::Preconditions.assert_class('organization', opts.delete(:organization), String)
15393
15485
  @id = HttpClient::Preconditions.assert_class('id', opts.delete(:id), String)
15394
15486
  @type = HttpClient::Preconditions.assert_class('type', opts.delete(:type), String)
15395
- @expiration = HttpClient::Preconditions.assert_class('expiration', HttpClient::Helper.to_object(opts.delete(:expiration)), Hash)
15487
+ @expiration = (x = opts.delete(:expiration); x.is_a?(::Io::Flow::V0::Models::Expiration) ? x : ::Io::Flow::V0::Models::Expiration.new(x))
15396
15488
  @iin = HttpClient::Preconditions.assert_class('iin', opts.delete(:iin), String)
15397
15489
  @last4 = HttpClient::Preconditions.assert_class('last4', opts.delete(:last4), String)
15398
15490
  @name = HttpClient::Preconditions.assert_class('name', opts.delete(:name), String)
15399
- @address = (x = opts.delete(:address); x.nil? ? nil : HttpClient::Preconditions.assert_class('address', HttpClient::Helper.to_object(x), Hash))
15491
+ @address = (x = opts.delete(:address); x.nil? ? nil : (x = x; x.is_a?(::Io::Flow::V0::Models::Address) ? x : ::Io::Flow::V0::Models::Address.new(x)))
15400
15492
  end
15401
15493
 
15402
15494
  def to_json
@@ -15414,11 +15506,11 @@ module Io
15414
15506
  :organization => organization,
15415
15507
  :id => id,
15416
15508
  :type => type,
15417
- :expiration => expiration,
15509
+ :expiration => expiration.to_hash,
15418
15510
  :iin => iin,
15419
15511
  :last4 => last4,
15420
15512
  :name => name,
15421
- :address => address
15513
+ :address => address.nil? ? nil : address.to_hash
15422
15514
  }
15423
15515
  end
15424
15516
 
@@ -15491,19 +15583,18 @@ module Io
15491
15583
 
15492
15584
  end
15493
15585
 
15494
- # Partner that actually take a shipment between places (ex: FedEx, DHL, SF
15586
+ # Partner that actually takes a shipment between places (ex: FedEx, DHL, SF
15495
15587
  # Express)
15496
15588
  class Carrier
15497
15589
 
15498
- attr_reader :id, :name, :facilities, :visibility
15590
+ attr_reader :id, :name, :tracking_url
15499
15591
 
15500
15592
  def initialize(incoming={})
15501
15593
  opts = HttpClient::Helper.symbolize_keys(incoming)
15502
- HttpClient::Preconditions.require_keys(opts, [:id, :name, :facilities, :visibility], 'Carrier')
15594
+ HttpClient::Preconditions.require_keys(opts, [:id, :name, :tracking_url], 'Carrier')
15503
15595
  @id = HttpClient::Preconditions.assert_class('id', opts.delete(:id), String)
15504
15596
  @name = HttpClient::Preconditions.assert_class('name', opts.delete(:name), String)
15505
- @facilities = HttpClient::Preconditions.assert_class('facilities', opts.delete(:facilities), Array).map { |v| (x = v; x.is_a?(::Io::Flow::V0::Models::ShippingAddress) ? x : ::Io::Flow::V0::Models::ShippingAddress.new(x)) }
15506
- @visibility = (x = opts.delete(:visibility); x.is_a?(::Io::Flow::V0::Models::Visibility) ? x : ::Io::Flow::V0::Models::Visibility.apply(x))
15597
+ @tracking_url = HttpClient::Preconditions.assert_class('tracking_url', opts.delete(:tracking_url), String)
15507
15598
  end
15508
15599
 
15509
15600
  def to_json
@@ -15518,8 +15609,7 @@ module Io
15518
15609
  {
15519
15610
  :id => id,
15520
15611
  :name => name,
15521
- :facilities => facilities.map { |o| o.to_hash },
15522
- :visibility => visibility.value
15612
+ :tracking_url => tracking_url
15523
15613
  }
15524
15614
  end
15525
15615
 
@@ -15551,6 +15641,38 @@ module Io
15551
15641
 
15552
15642
  end
15553
15643
 
15644
+ # Specific service rendered by the carrier (fedex ground saturday, ups overnight
15645
+ # weekend, etc)
15646
+ class CarrierService
15647
+
15648
+ attr_reader :id, :carrier, :name
15649
+
15650
+ def initialize(incoming={})
15651
+ opts = HttpClient::Helper.symbolize_keys(incoming)
15652
+ HttpClient::Preconditions.require_keys(opts, [:id, :carrier, :name], 'CarrierService')
15653
+ @id = HttpClient::Preconditions.assert_class('id', opts.delete(:id), String)
15654
+ @carrier = (x = opts.delete(:carrier); x.is_a?(::Io::Flow::V0::Models::Carrier) ? x : ::Io::Flow::V0::Models::Carrier.new(x))
15655
+ @name = HttpClient::Preconditions.assert_class('name', opts.delete(:name), String)
15656
+ end
15657
+
15658
+ def to_json
15659
+ JSON.dump(to_hash)
15660
+ end
15661
+
15662
+ def copy(incoming={})
15663
+ CarrierService.new(to_hash.merge(HttpClient::Helper.symbolize_keys(incoming)))
15664
+ end
15665
+
15666
+ def to_hash
15667
+ {
15668
+ :id => id,
15669
+ :carrier => carrier.to_hash,
15670
+ :name => name
15671
+ }
15672
+ end
15673
+
15674
+ end
15675
+
15554
15676
  class CartReference
15555
15677
 
15556
15678
  attr_reader :id
@@ -16128,7 +16250,7 @@ module Io
16128
16250
  # Represents a facility capable of fulfilling a shipment
16129
16251
  class Center
16130
16252
 
16131
- attr_reader :id, :key, :address, :packaging, :name, :services, :schedule, :timezone
16253
+ attr_reader :id, :key, :address, :packaging, :name, :services, :schedule, :timezone, :capabilities
16132
16254
 
16133
16255
  def initialize(incoming={})
16134
16256
  opts = HttpClient::Helper.symbolize_keys(incoming)
@@ -16141,6 +16263,7 @@ module Io
16141
16263
  @services = HttpClient::Preconditions.assert_class('services', opts.delete(:services), Array).map { |v| (x = v; x.is_a?(::Io::Flow::V0::Models::AvailableService) ? x : ::Io::Flow::V0::Models::AvailableService.new(x)) }
16142
16264
  @schedule = (x = opts.delete(:schedule); x.is_a?(::Io::Flow::V0::Models::Schedule) ? x : ::Io::Flow::V0::Models::Schedule.new(x))
16143
16265
  @timezone = HttpClient::Preconditions.assert_class('timezone', opts.delete(:timezone), String)
16266
+ @capabilities = (x = opts.delete(:capabilities); x.nil? ? nil : (x = x; x.is_a?(::Io::Flow::V0::Models::CenterCapabilities) ? x : ::Io::Flow::V0::Models::CenterCapabilities.new(x)))
16144
16267
  end
16145
16268
 
16146
16269
  def to_json
@@ -16160,7 +16283,42 @@ module Io
16160
16283
  :name => name,
16161
16284
  :services => services.map { |o| o.to_hash },
16162
16285
  :schedule => schedule.to_hash,
16163
- :timezone => timezone
16286
+ :timezone => timezone,
16287
+ :capabilities => capabilities.nil? ? nil : capabilities.to_hash
16288
+ }
16289
+ end
16290
+
16291
+ end
16292
+
16293
+ # Capabilities of each center. This is used when determining if a crossdock
16294
+ # solution is required
16295
+ class CenterCapabilities
16296
+
16297
+ attr_reader :domestic_shipping, :internal_shipping, :commercial_invoice, :crossdock
16298
+
16299
+ def initialize(incoming={})
16300
+ opts = HttpClient::Helper.symbolize_keys(incoming)
16301
+ HttpClient::Preconditions.require_keys(opts, [:domestic_shipping, :internal_shipping, :commercial_invoice, :crossdock], 'CenterCapabilities')
16302
+ @domestic_shipping = HttpClient::Preconditions.assert_boolean('domestic_shipping', opts.delete(:domestic_shipping))
16303
+ @internal_shipping = HttpClient::Preconditions.assert_boolean('internal_shipping', opts.delete(:internal_shipping))
16304
+ @commercial_invoice = HttpClient::Preconditions.assert_boolean('commercial_invoice', opts.delete(:commercial_invoice))
16305
+ @crossdock = HttpClient::Preconditions.assert_boolean('crossdock', opts.delete(:crossdock))
16306
+ end
16307
+
16308
+ def to_json
16309
+ JSON.dump(to_hash)
16310
+ end
16311
+
16312
+ def copy(incoming={})
16313
+ CenterCapabilities.new(to_hash.merge(HttpClient::Helper.symbolize_keys(incoming)))
16314
+ end
16315
+
16316
+ def to_hash
16317
+ {
16318
+ :domestic_shipping => domestic_shipping,
16319
+ :internal_shipping => internal_shipping,
16320
+ :commercial_invoice => commercial_invoice,
16321
+ :crossdock => crossdock
16164
16322
  }
16165
16323
  end
16166
16324
 
@@ -16168,7 +16326,7 @@ module Io
16168
16326
 
16169
16327
  class CenterForm
16170
16328
 
16171
- attr_reader :address, :packaging, :name, :services, :schedule, :timezone, :key
16329
+ attr_reader :address, :packaging, :name, :services, :schedule, :timezone, :key, :capabilities, :partner_id
16172
16330
 
16173
16331
  def initialize(incoming={})
16174
16332
  opts = HttpClient::Helper.symbolize_keys(incoming)
@@ -16180,6 +16338,8 @@ module Io
16180
16338
  @schedule = (x = opts.delete(:schedule); x.is_a?(::Io::Flow::V0::Models::Schedule) ? x : ::Io::Flow::V0::Models::Schedule.new(x))
16181
16339
  @timezone = (x = opts.delete(:timezone); x.nil? ? nil : HttpClient::Preconditions.assert_class('timezone', x, String))
16182
16340
  @key = (x = opts.delete(:key); x.nil? ? nil : HttpClient::Preconditions.assert_class('key', x, String))
16341
+ @capabilities = (x = opts.delete(:capabilities); x.nil? ? nil : (x = x; x.is_a?(::Io::Flow::V0::Models::CenterCapabilities) ? x : ::Io::Flow::V0::Models::CenterCapabilities.new(x)))
16342
+ @partner_id = (x = opts.delete(:partner_id); x.nil? ? nil : HttpClient::Preconditions.assert_class('partner_id', x, String))
16183
16343
  end
16184
16344
 
16185
16345
  def to_json
@@ -16198,7 +16358,9 @@ module Io
16198
16358
  :services => services.map { |o| o.to_hash },
16199
16359
  :schedule => schedule.to_hash,
16200
16360
  :timezone => timezone,
16201
- :key => key
16361
+ :key => key,
16362
+ :capabilities => capabilities.nil? ? nil : capabilities.to_hash,
16363
+ :partner_id => partner_id
16202
16364
  }
16203
16365
  end
16204
16366
 
@@ -16674,6 +16836,73 @@ module Io
16674
16836
 
16675
16837
  end
16676
16838
 
16839
+ class CrossdockShipment
16840
+
16841
+ attr_reader :partner_id, :center_id, :tracking_id, :order_number, :status
16842
+
16843
+ def initialize(incoming={})
16844
+ opts = HttpClient::Helper.symbolize_keys(incoming)
16845
+ HttpClient::Preconditions.require_keys(opts, [:partner_id, :center_id, :tracking_id, :order_number, :status], 'CrossdockShipment')
16846
+ @partner_id = HttpClient::Preconditions.assert_class('partner_id', opts.delete(:partner_id), String)
16847
+ @center_id = HttpClient::Preconditions.assert_class('center_id', opts.delete(:center_id), String)
16848
+ @tracking_id = HttpClient::Preconditions.assert_class('tracking_id', opts.delete(:tracking_id), String)
16849
+ @order_number = HttpClient::Preconditions.assert_class('order_number', opts.delete(:order_number), String)
16850
+ @status = HttpClient::Preconditions.assert_class('status', opts.delete(:status), String)
16851
+ end
16852
+
16853
+ def to_json
16854
+ JSON.dump(to_hash)
16855
+ end
16856
+
16857
+ def copy(incoming={})
16858
+ CrossdockShipment.new(to_hash.merge(HttpClient::Helper.symbolize_keys(incoming)))
16859
+ end
16860
+
16861
+ def to_hash
16862
+ {
16863
+ :partner_id => partner_id,
16864
+ :center_id => center_id,
16865
+ :tracking_id => tracking_id,
16866
+ :order_number => order_number,
16867
+ :status => status
16868
+ }
16869
+ end
16870
+
16871
+ end
16872
+
16873
+ class CrossdockShipmentUpserted < Event
16874
+
16875
+ attr_reader :event_id, :timestamp, :organization, :crossdock_shipment
16876
+
16877
+ def initialize(incoming={})
16878
+ super(:discriminator => Event::Types::CROSSDOCK_SHIPMENT_UPSERTED)
16879
+ opts = HttpClient::Helper.symbolize_keys(incoming)
16880
+ HttpClient::Preconditions.require_keys(opts, [:event_id, :timestamp, :organization, :crossdock_shipment], 'CrossdockShipmentUpserted')
16881
+ @event_id = HttpClient::Preconditions.assert_class('event_id', opts.delete(:event_id), String)
16882
+ @timestamp = HttpClient::Preconditions.assert_class('timestamp', HttpClient::Helper.to_date_time_iso8601(opts.delete(:timestamp)), DateTime)
16883
+ @organization = HttpClient::Preconditions.assert_class('organization', opts.delete(:organization), String)
16884
+ @crossdock_shipment = (x = opts.delete(:crossdock_shipment); x.is_a?(::Io::Flow::V0::Models::CrossdockShipment) ? x : ::Io::Flow::V0::Models::CrossdockShipment.new(x))
16885
+ end
16886
+
16887
+ def to_json
16888
+ JSON.dump(to_hash)
16889
+ end
16890
+
16891
+ def copy(incoming={})
16892
+ CrossdockShipmentUpserted.new(subtype_to_hash.merge(HttpClient::Helper.symbolize_keys(incoming)))
16893
+ end
16894
+
16895
+ def subtype_to_hash
16896
+ {
16897
+ :event_id => event_id,
16898
+ :timestamp => timestamp,
16899
+ :organization => organization,
16900
+ :crossdock_shipment => crossdock_shipment.to_hash
16901
+ }
16902
+ end
16903
+
16904
+ end
16905
+
16677
16906
  # ISO 4217 3-character currency code. See
16678
16907
  # https://api.flow.io/reference/currencies
16679
16908
  class Currency
@@ -20413,17 +20642,17 @@ module Io
20413
20642
 
20414
20643
  end
20415
20644
 
20416
- class ImportVersion
20645
+ # An import template provides an organization specific example CSV file of a
20646
+ # particular import type.
20647
+ class ImportTemplate
20417
20648
 
20418
- attr_reader :id, :timestamp, :type, :import
20649
+ attr_reader :type, :documentation_url
20419
20650
 
20420
20651
  def initialize(incoming={})
20421
20652
  opts = HttpClient::Helper.symbolize_keys(incoming)
20422
- HttpClient::Preconditions.require_keys(opts, [:id, :timestamp, :type, :import], 'ImportVersion')
20423
- @id = HttpClient::Preconditions.assert_class('id', opts.delete(:id), String)
20424
- @timestamp = HttpClient::Preconditions.assert_class('timestamp', HttpClient::Helper.to_date_time_iso8601(opts.delete(:timestamp)), DateTime)
20425
- @type = (x = opts.delete(:type); x.is_a?(::Io::Flow::V0::Models::ChangeType) ? x : ::Io::Flow::V0::Models::ChangeType.apply(x))
20426
- @import = (x = opts.delete(:import); x.is_a?(::Io::Flow::V0::Models::Import) ? x : ::Io::Flow::V0::Models::Import.new(x))
20653
+ HttpClient::Preconditions.require_keys(opts, [:type, :documentation_url], 'ImportTemplate')
20654
+ @type = (x = opts.delete(:type); x.is_a?(::Io::Flow::V0::Models::ImportType) ? x : ::Io::Flow::V0::Models::ImportType.apply(x))
20655
+ @documentation_url = HttpClient::Preconditions.assert_class('documentation_url', opts.delete(:documentation_url), String)
20427
20656
  end
20428
20657
 
20429
20658
  def to_json
@@ -20431,29 +20660,28 @@ module Io
20431
20660
  end
20432
20661
 
20433
20662
  def copy(incoming={})
20434
- ImportVersion.new(to_hash.merge(HttpClient::Helper.symbolize_keys(incoming)))
20663
+ ImportTemplate.new(to_hash.merge(HttpClient::Helper.symbolize_keys(incoming)))
20435
20664
  end
20436
20665
 
20437
20666
  def to_hash
20438
20667
  {
20439
- :id => id,
20440
- :timestamp => timestamp,
20441
20668
  :type => type.value,
20442
- :import => import.to_hash
20669
+ :documentation_url => documentation_url
20443
20670
  }
20444
20671
  end
20445
20672
 
20446
20673
  end
20447
20674
 
20448
- class IncludedLevies
20675
+ # An import template example provides a link to a real, organization specific
20676
+ # example CSV import file.
20677
+ class ImportTemplateExample
20449
20678
 
20450
- attr_reader :key, :label
20679
+ attr_reader :url
20451
20680
 
20452
20681
  def initialize(incoming={})
20453
20682
  opts = HttpClient::Helper.symbolize_keys(incoming)
20454
- HttpClient::Preconditions.require_keys(opts, [:key, :label], 'IncludedLevies')
20455
- @key = (x = opts.delete(:key); x.is_a?(::Io::Flow::V0::Models::IncludedLevyKey) ? x : ::Io::Flow::V0::Models::IncludedLevyKey.apply(x))
20456
- @label = HttpClient::Preconditions.assert_class('label', opts.delete(:label), String)
20683
+ HttpClient::Preconditions.require_keys(opts, [:url], 'ImportTemplateExample')
20684
+ @url = HttpClient::Preconditions.assert_class('url', opts.delete(:url), String)
20457
20685
  end
20458
20686
 
20459
20687
  def to_json
@@ -20461,30 +20689,25 @@ module Io
20461
20689
  end
20462
20690
 
20463
20691
  def copy(incoming={})
20464
- IncludedLevies.new(to_hash.merge(HttpClient::Helper.symbolize_keys(incoming)))
20692
+ ImportTemplateExample.new(to_hash.merge(HttpClient::Helper.symbolize_keys(incoming)))
20465
20693
  end
20466
20694
 
20467
20695
  def to_hash
20468
20696
  {
20469
- :key => key.value,
20470
- :label => label
20697
+ :url => url
20471
20698
  }
20472
20699
  end
20473
20700
 
20474
20701
  end
20475
20702
 
20476
- # Describe a feed incoming to Flow
20477
- class IncomingFeed
20703
+ class ImportTemplateForm
20478
20704
 
20479
- attr_reader :url, :format, :minute, :item_link
20705
+ attr_reader :type
20480
20706
 
20481
20707
  def initialize(incoming={})
20482
20708
  opts = HttpClient::Helper.symbolize_keys(incoming)
20483
- HttpClient::Preconditions.require_keys(opts, [:url, :format, :item_link], 'IncomingFeed')
20484
- @url = HttpClient::Preconditions.assert_class('url', opts.delete(:url), String)
20485
- @format = (x = opts.delete(:format); x.is_a?(::Io::Flow::V0::Models::IncomingFeedFormat) ? x : ::Io::Flow::V0::Models::IncomingFeedFormat.apply(x))
20486
- @minute = HttpClient::Preconditions.assert_class('minute', (x = opts.delete(:minute); x.nil? ? 55 : x), Integer)
20487
- @item_link = (x = opts.delete(:item_link); x.is_a?(::Io::Flow::V0::Models::ItemLink) ? x : ::Io::Flow::V0::Models::ItemLink.new(x))
20709
+ HttpClient::Preconditions.require_keys(opts, [:type], 'ImportTemplateForm')
20710
+ @type = (x = opts.delete(:type); x.is_a?(::Io::Flow::V0::Models::ImportType) ? x : ::Io::Flow::V0::Models::ImportType.apply(x))
20488
20711
  end
20489
20712
 
20490
20713
  def to_json
@@ -20492,15 +20715,105 @@ module Io
20492
20715
  end
20493
20716
 
20494
20717
  def copy(incoming={})
20495
- IncomingFeed.new(to_hash.merge(HttpClient::Helper.symbolize_keys(incoming)))
20718
+ ImportTemplateForm.new(to_hash.merge(HttpClient::Helper.symbolize_keys(incoming)))
20496
20719
  end
20497
20720
 
20498
20721
  def to_hash
20499
20722
  {
20500
- :url => url,
20501
- :format => format.value,
20502
- :minute => minute,
20503
- :item_link => item_link.to_hash
20723
+ :type => type.value
20724
+ }
20725
+ end
20726
+
20727
+ end
20728
+
20729
+ class ImportVersion
20730
+
20731
+ attr_reader :id, :timestamp, :type, :import
20732
+
20733
+ def initialize(incoming={})
20734
+ opts = HttpClient::Helper.symbolize_keys(incoming)
20735
+ HttpClient::Preconditions.require_keys(opts, [:id, :timestamp, :type, :import], 'ImportVersion')
20736
+ @id = HttpClient::Preconditions.assert_class('id', opts.delete(:id), String)
20737
+ @timestamp = HttpClient::Preconditions.assert_class('timestamp', HttpClient::Helper.to_date_time_iso8601(opts.delete(:timestamp)), DateTime)
20738
+ @type = (x = opts.delete(:type); x.is_a?(::Io::Flow::V0::Models::ChangeType) ? x : ::Io::Flow::V0::Models::ChangeType.apply(x))
20739
+ @import = (x = opts.delete(:import); x.is_a?(::Io::Flow::V0::Models::Import) ? x : ::Io::Flow::V0::Models::Import.new(x))
20740
+ end
20741
+
20742
+ def to_json
20743
+ JSON.dump(to_hash)
20744
+ end
20745
+
20746
+ def copy(incoming={})
20747
+ ImportVersion.new(to_hash.merge(HttpClient::Helper.symbolize_keys(incoming)))
20748
+ end
20749
+
20750
+ def to_hash
20751
+ {
20752
+ :id => id,
20753
+ :timestamp => timestamp,
20754
+ :type => type.value,
20755
+ :import => import.to_hash
20756
+ }
20757
+ end
20758
+
20759
+ end
20760
+
20761
+ class IncludedLevies
20762
+
20763
+ attr_reader :key, :label
20764
+
20765
+ def initialize(incoming={})
20766
+ opts = HttpClient::Helper.symbolize_keys(incoming)
20767
+ HttpClient::Preconditions.require_keys(opts, [:key, :label], 'IncludedLevies')
20768
+ @key = (x = opts.delete(:key); x.is_a?(::Io::Flow::V0::Models::IncludedLevyKey) ? x : ::Io::Flow::V0::Models::IncludedLevyKey.apply(x))
20769
+ @label = HttpClient::Preconditions.assert_class('label', opts.delete(:label), String)
20770
+ end
20771
+
20772
+ def to_json
20773
+ JSON.dump(to_hash)
20774
+ end
20775
+
20776
+ def copy(incoming={})
20777
+ IncludedLevies.new(to_hash.merge(HttpClient::Helper.symbolize_keys(incoming)))
20778
+ end
20779
+
20780
+ def to_hash
20781
+ {
20782
+ :key => key.value,
20783
+ :label => label
20784
+ }
20785
+ end
20786
+
20787
+ end
20788
+
20789
+ # Describe a feed incoming to Flow
20790
+ class IncomingFeed
20791
+
20792
+ attr_reader :url, :format, :minute, :item_link
20793
+
20794
+ def initialize(incoming={})
20795
+ opts = HttpClient::Helper.symbolize_keys(incoming)
20796
+ HttpClient::Preconditions.require_keys(opts, [:url, :format, :item_link], 'IncomingFeed')
20797
+ @url = HttpClient::Preconditions.assert_class('url', opts.delete(:url), String)
20798
+ @format = (x = opts.delete(:format); x.is_a?(::Io::Flow::V0::Models::IncomingFeedFormat) ? x : ::Io::Flow::V0::Models::IncomingFeedFormat.apply(x))
20799
+ @minute = HttpClient::Preconditions.assert_class('minute', (x = opts.delete(:minute); x.nil? ? 55 : x), Integer)
20800
+ @item_link = (x = opts.delete(:item_link); x.is_a?(::Io::Flow::V0::Models::ItemLink) ? x : ::Io::Flow::V0::Models::ItemLink.new(x))
20801
+ end
20802
+
20803
+ def to_json
20804
+ JSON.dump(to_hash)
20805
+ end
20806
+
20807
+ def copy(incoming={})
20808
+ IncomingFeed.new(to_hash.merge(HttpClient::Helper.symbolize_keys(incoming)))
20809
+ end
20810
+
20811
+ def to_hash
20812
+ {
20813
+ :url => url,
20814
+ :format => format.value,
20815
+ :minute => minute,
20816
+ :item_link => item_link.to_hash
20504
20817
  }
20505
20818
  end
20506
20819
 
@@ -22140,7 +22453,7 @@ module Io
22140
22453
 
22141
22454
  class LabelUpserted < Event
22142
22455
 
22143
- attr_reader :event_id, :timestamp, :organization, :label_id, :carrier_tracking_number, :commercial_invoice, :flow_tracking_number, :destination, :origin, :carrier, :service, :zpl, :pdf, :png, :order, :carrier_tracking_number_url, :flow_tracking_number_url, :center_key, :direction, :package, :order_identifier, :fulfillment_key
22456
+ attr_reader :event_id, :timestamp, :organization, :label_id, :carrier_tracking_number, :commercial_invoice, :flow_tracking_number, :destination, :origin, :carrier, :service, :zpl, :pdf, :png, :order, :carrier_tracking_number_url, :flow_tracking_number_url, :center_key, :recipient, :package, :order_identifier, :fulfillment_key
22144
22457
 
22145
22458
  def initialize(incoming={})
22146
22459
  super(:discriminator => Event::Types::LABEL_UPSERTED)
@@ -22153,8 +22466,8 @@ module Io
22153
22466
  @carrier_tracking_number = HttpClient::Preconditions.assert_class('carrier_tracking_number', opts.delete(:carrier_tracking_number), String)
22154
22467
  @commercial_invoice = HttpClient::Preconditions.assert_class('commercial_invoice', opts.delete(:commercial_invoice), String)
22155
22468
  @flow_tracking_number = HttpClient::Preconditions.assert_class('flow_tracking_number', opts.delete(:flow_tracking_number), String)
22156
- @destination = HttpClient::Preconditions.assert_class('destination', HttpClient::Helper.to_object(opts.delete(:destination)), Hash)
22157
- @origin = HttpClient::Preconditions.assert_class('origin', HttpClient::Helper.to_object(opts.delete(:origin)), Hash)
22469
+ @destination = (x = opts.delete(:destination); x.is_a?(::Io::Flow::V0::Models::ShippingAddress) ? x : ::Io::Flow::V0::Models::ShippingAddress.new(x))
22470
+ @origin = (x = opts.delete(:origin); x.is_a?(::Io::Flow::V0::Models::ShippingAddress) ? x : ::Io::Flow::V0::Models::ShippingAddress.new(x))
22158
22471
  @carrier = HttpClient::Preconditions.assert_class('carrier', opts.delete(:carrier), String)
22159
22472
  @service = HttpClient::Preconditions.assert_class('service', opts.delete(:service), String)
22160
22473
  @zpl = (x = opts.delete(:zpl); x.nil? ? nil : HttpClient::Preconditions.assert_class('zpl', x, String))
@@ -22164,8 +22477,8 @@ module Io
22164
22477
  @carrier_tracking_number_url = (x = opts.delete(:carrier_tracking_number_url); x.nil? ? nil : HttpClient::Preconditions.assert_class('carrier_tracking_number_url', x, String))
22165
22478
  @flow_tracking_number_url = (x = opts.delete(:flow_tracking_number_url); x.nil? ? nil : HttpClient::Preconditions.assert_class('flow_tracking_number_url', x, String))
22166
22479
  @center_key = (x = opts.delete(:center_key); x.nil? ? nil : HttpClient::Preconditions.assert_class('center_key', x, String))
22167
- @direction = (x = opts.delete(:direction); x.nil? ? nil : HttpClient::Preconditions.assert_class('direction', x, String))
22168
- @package = (x = opts.delete(:package); x.nil? ? nil : HttpClient::Preconditions.assert_class('package', HttpClient::Helper.to_object(x), Hash))
22480
+ @recipient = (x = opts.delete(:recipient); x.nil? ? nil : (x = x; x.is_a?(::Io::Flow::V0::Models::ShipmentRecipient) ? x : ::Io::Flow::V0::Models::ShipmentRecipient.apply(x)))
22481
+ @package = (x = opts.delete(:package); x.nil? ? nil : (x = x; x.is_a?(::Io::Flow::V0::Models::ShippingLabelPackage) ? x : ::Io::Flow::V0::Models::ShippingLabelPackage.new(x)))
22169
22482
  @order_identifier = (x = opts.delete(:order_identifier); x.nil? ? nil : HttpClient::Preconditions.assert_class('order_identifier', x, String))
22170
22483
  @fulfillment_key = (x = opts.delete(:fulfillment_key); x.nil? ? nil : HttpClient::Preconditions.assert_class('fulfillment_key', x, String))
22171
22484
  end
@@ -22187,8 +22500,8 @@ module Io
22187
22500
  :carrier_tracking_number => carrier_tracking_number,
22188
22501
  :commercial_invoice => commercial_invoice,
22189
22502
  :flow_tracking_number => flow_tracking_number,
22190
- :destination => destination,
22191
- :origin => origin,
22503
+ :destination => destination.to_hash,
22504
+ :origin => origin.to_hash,
22192
22505
  :carrier => carrier,
22193
22506
  :service => service,
22194
22507
  :zpl => zpl,
@@ -22198,8 +22511,8 @@ module Io
22198
22511
  :carrier_tracking_number_url => carrier_tracking_number_url,
22199
22512
  :flow_tracking_number_url => flow_tracking_number_url,
22200
22513
  :center_key => center_key,
22201
- :direction => direction,
22202
- :package => package,
22514
+ :recipient => recipient.nil? ? nil : recipient.value,
22515
+ :package => package.nil? ? nil : package.to_hash,
22203
22516
  :order_identifier => order_identifier,
22204
22517
  :fulfillment_key => fulfillment_key
22205
22518
  }
@@ -22207,71 +22520,6 @@ module Io
22207
22520
 
22208
22521
  end
22209
22522
 
22210
- class LabelUpsertedV2 < Event
22211
-
22212
- attr_reader :event_id, :timestamp, :organization, :label_id, :carrier_tracking_number, :flow_tracking_number, :destination, :origin, :carrier, :service, :order, :carrier_tracking_number_url, :flow_tracking_number_url, :center_key, :direction, :package, :order_identifier, :fulfillment_key, :label, :return_
22213
-
22214
- def initialize(incoming={})
22215
- super(:discriminator => Event::Types::LABEL_UPSERTED_V2)
22216
- opts = HttpClient::Helper.symbolize_keys(incoming)
22217
- HttpClient::Preconditions.require_keys(opts, [:event_id, :timestamp, :organization, :label_id, :carrier_tracking_number, :flow_tracking_number, :destination, :origin, :carrier, :service], 'LabelUpsertedV2')
22218
- @event_id = HttpClient::Preconditions.assert_class('event_id', opts.delete(:event_id), String)
22219
- @timestamp = HttpClient::Preconditions.assert_class('timestamp', HttpClient::Helper.to_date_time_iso8601(opts.delete(:timestamp)), DateTime)
22220
- @organization = HttpClient::Preconditions.assert_class('organization', opts.delete(:organization), String)
22221
- @label_id = HttpClient::Preconditions.assert_class('label_id', opts.delete(:label_id), String)
22222
- @carrier_tracking_number = HttpClient::Preconditions.assert_class('carrier_tracking_number', opts.delete(:carrier_tracking_number), String)
22223
- @flow_tracking_number = HttpClient::Preconditions.assert_class('flow_tracking_number', opts.delete(:flow_tracking_number), String)
22224
- @destination = HttpClient::Preconditions.assert_class('destination', HttpClient::Helper.to_object(opts.delete(:destination)), Hash)
22225
- @origin = HttpClient::Preconditions.assert_class('origin', HttpClient::Helper.to_object(opts.delete(:origin)), Hash)
22226
- @carrier = HttpClient::Preconditions.assert_class('carrier', opts.delete(:carrier), String)
22227
- @service = HttpClient::Preconditions.assert_class('service', opts.delete(:service), String)
22228
- @order = (x = opts.delete(:order); x.nil? ? nil : HttpClient::Preconditions.assert_class('order', x, String))
22229
- @carrier_tracking_number_url = (x = opts.delete(:carrier_tracking_number_url); x.nil? ? nil : HttpClient::Preconditions.assert_class('carrier_tracking_number_url', x, String))
22230
- @flow_tracking_number_url = (x = opts.delete(:flow_tracking_number_url); x.nil? ? nil : HttpClient::Preconditions.assert_class('flow_tracking_number_url', x, String))
22231
- @center_key = (x = opts.delete(:center_key); x.nil? ? nil : HttpClient::Preconditions.assert_class('center_key', x, String))
22232
- @direction = (x = opts.delete(:direction); x.nil? ? nil : HttpClient::Preconditions.assert_class('direction', x, String))
22233
- @package = (x = opts.delete(:package); x.nil? ? nil : HttpClient::Preconditions.assert_class('package', HttpClient::Helper.to_object(x), Hash))
22234
- @order_identifier = (x = opts.delete(:order_identifier); x.nil? ? nil : HttpClient::Preconditions.assert_class('order_identifier', x, String))
22235
- @fulfillment_key = (x = opts.delete(:fulfillment_key); x.nil? ? nil : HttpClient::Preconditions.assert_class('fulfillment_key', x, String))
22236
- @label = (x = opts.delete(:label); x.nil? ? nil : HttpClient::Preconditions.assert_class('label', HttpClient::Helper.to_object(x), Hash))
22237
- @return_ = (x = opts.delete(:return); x.nil? ? nil : HttpClient::Preconditions.assert_class('return', HttpClient::Helper.to_object(x), Hash))
22238
- end
22239
-
22240
- def to_json
22241
- JSON.dump(to_hash)
22242
- end
22243
-
22244
- def copy(incoming={})
22245
- LabelUpsertedV2.new(subtype_to_hash.merge(HttpClient::Helper.symbolize_keys(incoming)))
22246
- end
22247
-
22248
- def subtype_to_hash
22249
- {
22250
- :event_id => event_id,
22251
- :timestamp => timestamp,
22252
- :organization => organization,
22253
- :label_id => label_id,
22254
- :carrier_tracking_number => carrier_tracking_number,
22255
- :flow_tracking_number => flow_tracking_number,
22256
- :destination => destination,
22257
- :origin => origin,
22258
- :carrier => carrier,
22259
- :service => service,
22260
- :order => order,
22261
- :carrier_tracking_number_url => carrier_tracking_number_url,
22262
- :flow_tracking_number_url => flow_tracking_number_url,
22263
- :center_key => center_key,
22264
- :direction => direction,
22265
- :package => package,
22266
- :order_identifier => order_identifier,
22267
- :fulfillment_key => fulfillment_key,
22268
- :label => label,
22269
- :return => return_
22270
- }
22271
- end
22272
-
22273
- end
22274
-
22275
22523
  # The tariff codes, duty rates and tax rates associated with an
22276
22524
  # origin/destination pair. Does not take into account sales province
22277
22525
  class LaneLandedCost
@@ -22683,7 +22931,7 @@ module Io
22683
22931
  # will be presented here
22684
22932
  class LocalSession
22685
22933
 
22686
- attr_reader :country, :currency, :language, :locale, :experience
22934
+ attr_reader :country, :currency, :language, :locale, :experience, :experiment
22687
22935
 
22688
22936
  def initialize(incoming={})
22689
22937
  opts = HttpClient::Helper.symbolize_keys(incoming)
@@ -22693,6 +22941,7 @@ module Io
22693
22941
  @language = (x = opts.delete(:language); x.is_a?(::Io::Flow::V0::Models::Language) ? x : ::Io::Flow::V0::Models::Language.new(x))
22694
22942
  @locale = (x = opts.delete(:locale); x.is_a?(::Io::Flow::V0::Models::Locale) ? x : ::Io::Flow::V0::Models::Locale.new(x))
22695
22943
  @experience = (x = opts.delete(:experience); x.is_a?(::Io::Flow::V0::Models::ExperienceGeo) ? x : ::Io::Flow::V0::Models::ExperienceGeo.new(x))
22944
+ @experiment = (x = opts.delete(:experiment); x.nil? ? nil : (x = x; x.is_a?(::Io::Flow::V0::Models::SessionExperiment) ? x : ::Io::Flow::V0::Models::SessionExperiment.new(x)))
22696
22945
  end
22697
22946
 
22698
22947
  def to_json
@@ -22709,7 +22958,8 @@ module Io
22709
22958
  :currency => currency.to_hash,
22710
22959
  :language => language.to_hash,
22711
22960
  :locale => locale.to_hash,
22712
- :experience => experience.to_hash
22961
+ :experience => experience.to_hash,
22962
+ :experiment => experiment.nil? ? nil : experiment.to_hash
22713
22963
  }
22714
22964
  end
22715
22965
 
@@ -23660,12 +23910,12 @@ module Io
23660
23910
  @notification_id = HttpClient::Preconditions.assert_class('notification_id', opts.delete(:notification_id), String)
23661
23911
  @carrier_tracking_number = HttpClient::Preconditions.assert_class('carrier_tracking_number', opts.delete(:carrier_tracking_number), String)
23662
23912
  @flow_tracking_number = HttpClient::Preconditions.assert_class('flow_tracking_number', opts.delete(:flow_tracking_number), String)
23663
- @destination = HttpClient::Preconditions.assert_class('destination', HttpClient::Helper.to_object(opts.delete(:destination)), Hash)
23664
- @origin = HttpClient::Preconditions.assert_class('origin', HttpClient::Helper.to_object(opts.delete(:origin)), Hash)
23913
+ @destination = (x = opts.delete(:destination); x.is_a?(::Io::Flow::V0::Models::ShippingAddress) ? x : ::Io::Flow::V0::Models::ShippingAddress.new(x))
23914
+ @origin = (x = opts.delete(:origin); x.is_a?(::Io::Flow::V0::Models::ShippingAddress) ? x : ::Io::Flow::V0::Models::ShippingAddress.new(x))
23665
23915
  @carrier = HttpClient::Preconditions.assert_class('carrier', opts.delete(:carrier), String)
23666
23916
  @service = HttpClient::Preconditions.assert_class('service', opts.delete(:service), String)
23667
23917
  @order = HttpClient::Preconditions.assert_class('order', opts.delete(:order), String)
23668
- @package = HttpClient::Preconditions.assert_class('package', HttpClient::Helper.to_object(opts.delete(:package)), Hash)
23918
+ @package = (x = opts.delete(:package); x.is_a?(::Io::Flow::V0::Models::ShippingLabelPackage) ? x : ::Io::Flow::V0::Models::ShippingLabelPackage.new(x))
23669
23919
  end
23670
23920
 
23671
23921
  def to_json
@@ -23684,12 +23934,12 @@ module Io
23684
23934
  :notification_id => notification_id,
23685
23935
  :carrier_tracking_number => carrier_tracking_number,
23686
23936
  :flow_tracking_number => flow_tracking_number,
23687
- :destination => destination,
23688
- :origin => origin,
23937
+ :destination => destination.to_hash,
23938
+ :origin => origin.to_hash,
23689
23939
  :carrier => carrier,
23690
23940
  :service => service,
23691
23941
  :order => order,
23692
- :package => package
23942
+ :package => package.to_hash
23693
23943
  }
23694
23944
  end
23695
23945
 
@@ -23709,12 +23959,12 @@ module Io
23709
23959
  @notification_id = HttpClient::Preconditions.assert_class('notification_id', opts.delete(:notification_id), String)
23710
23960
  @carrier_tracking_number = HttpClient::Preconditions.assert_class('carrier_tracking_number', opts.delete(:carrier_tracking_number), String)
23711
23961
  @flow_tracking_number = HttpClient::Preconditions.assert_class('flow_tracking_number', opts.delete(:flow_tracking_number), String)
23712
- @destination = HttpClient::Preconditions.assert_class('destination', HttpClient::Helper.to_object(opts.delete(:destination)), Hash)
23713
- @origin = HttpClient::Preconditions.assert_class('origin', HttpClient::Helper.to_object(opts.delete(:origin)), Hash)
23962
+ @destination = (x = opts.delete(:destination); x.is_a?(::Io::Flow::V0::Models::ShippingAddress) ? x : ::Io::Flow::V0::Models::ShippingAddress.new(x))
23963
+ @origin = (x = opts.delete(:origin); x.is_a?(::Io::Flow::V0::Models::ShippingAddress) ? x : ::Io::Flow::V0::Models::ShippingAddress.new(x))
23714
23964
  @carrier = HttpClient::Preconditions.assert_class('carrier', opts.delete(:carrier), String)
23715
23965
  @service = HttpClient::Preconditions.assert_class('service', opts.delete(:service), String)
23716
23966
  @order = HttpClient::Preconditions.assert_class('order', opts.delete(:order), String)
23717
- @package = HttpClient::Preconditions.assert_class('package', HttpClient::Helper.to_object(opts.delete(:package)), Hash)
23967
+ @package = (x = opts.delete(:package); x.is_a?(::Io::Flow::V0::Models::ShippingLabelPackage) ? x : ::Io::Flow::V0::Models::ShippingLabelPackage.new(x))
23718
23968
  end
23719
23969
 
23720
23970
  def to_json
@@ -23733,12 +23983,12 @@ module Io
23733
23983
  :notification_id => notification_id,
23734
23984
  :carrier_tracking_number => carrier_tracking_number,
23735
23985
  :flow_tracking_number => flow_tracking_number,
23736
- :destination => destination,
23737
- :origin => origin,
23986
+ :destination => destination.to_hash,
23987
+ :origin => origin.to_hash,
23738
23988
  :carrier => carrier,
23739
23989
  :service => service,
23740
23990
  :order => order,
23741
- :package => package
23991
+ :package => package.to_hash
23742
23992
  }
23743
23993
  end
23744
23994
 
@@ -24900,20 +25150,20 @@ module Io
24900
25150
  @environment = HttpClient::Preconditions.assert_class('environment', opts.delete(:environment), String)
24901
25151
  @experience_id = HttpClient::Preconditions.assert_class('experience_id', opts.delete(:experience_id), String)
24902
25152
  @expires_at = HttpClient::Preconditions.assert_class('expires_at', HttpClient::Helper.to_date_time_iso8601(opts.delete(:expires_at)), DateTime)
24903
- @customer = HttpClient::Preconditions.assert_class('customer', HttpClient::Helper.to_object(opts.delete(:customer)), Hash)
25153
+ @customer = (x = opts.delete(:customer); x.is_a?(::Io::Flow::V0::Models::Customer) ? x : ::Io::Flow::V0::Models::Customer.new(x))
24904
25154
  @selections = HttpClient::Preconditions.assert_class('selections', opts.delete(:selections), Array).map { |v| HttpClient::Preconditions.assert_class('selections', v, String) }
24905
- @items = HttpClient::Preconditions.assert_class('items', opts.delete(:items), Array).map { |v| HttpClient::Preconditions.assert_class('items', HttpClient::Helper.to_object(v), Hash) }
24906
- @destination = HttpClient::Preconditions.assert_class('destination', HttpClient::Helper.to_object(opts.delete(:destination)), Hash)
24907
- @deliveries = HttpClient::Preconditions.assert_class('deliveries', opts.delete(:deliveries), Array).map { |v| HttpClient::Preconditions.assert_class('deliveries', HttpClient::Helper.to_object(v), Hash) }
24908
- @prices = HttpClient::Preconditions.assert_class('prices', opts.delete(:prices), Array).map { |v| HttpClient::Preconditions.assert_class('prices', HttpClient::Helper.to_object(v), Hash) }
24909
- @payments = (x = opts.delete(:payments); x.nil? ? nil : HttpClient::Preconditions.assert_class('payments', x, Array).map { |v| HttpClient::Preconditions.assert_class('payments', HttpClient::Helper.to_object(v), Hash) })
24910
- @discount = (x = opts.delete(:discount); x.nil? ? nil : HttpClient::Preconditions.assert_class('discount', HttpClient::Helper.to_object(x), Hash))
25155
+ @items = HttpClient::Preconditions.assert_class('items', opts.delete(:items), Array).map { |v| (x = v; x.is_a?(::Io::Flow::V0::Models::LocalizedLineItem) ? x : ::Io::Flow::V0::Models::LocalizedLineItem.new(x)) }
25156
+ @destination = (x = opts.delete(:destination); x.is_a?(::Io::Flow::V0::Models::OrderAddress) ? x : ::Io::Flow::V0::Models::OrderAddress.new(x))
25157
+ @deliveries = HttpClient::Preconditions.assert_class('deliveries', opts.delete(:deliveries), Array).map { |v| (x = v; x.is_a?(::Io::Flow::V0::Models::Delivery) ? x : ::Io::Flow::V0::Models::Delivery.from_json(x)) }
25158
+ @prices = HttpClient::Preconditions.assert_class('prices', opts.delete(:prices), Array).map { |v| (x = v; x.is_a?(::Io::Flow::V0::Models::OrderPriceDetail) ? x : ::Io::Flow::V0::Models::OrderPriceDetail.new(x)) }
25159
+ @payments = (x = opts.delete(:payments); x.nil? ? nil : HttpClient::Preconditions.assert_class('payments', x, Array).map { |v| (x = v; x.is_a?(::Io::Flow::V0::Models::OrderPayment) ? x : ::Io::Flow::V0::Models::OrderPayment.new(x)) })
25160
+ @discount = (x = opts.delete(:discount); x.nil? ? nil : (x = x; x.is_a?(::Io::Flow::V0::Models::Money) ? x : ::Io::Flow::V0::Models::Money.new(x)))
24911
25161
  @delivered_duty = (x = opts.delete(:delivered_duty); x.nil? ? nil : HttpClient::Preconditions.assert_class('delivered_duty', x, String))
24912
- @total = HttpClient::Preconditions.assert_class('total', HttpClient::Helper.to_object(opts.delete(:total)), Hash)
25162
+ @total = (x = opts.delete(:total); x.is_a?(::Io::Flow::V0::Models::LocalizedTotal) ? x : ::Io::Flow::V0::Models::LocalizedTotal.new(x))
24913
25163
  @created_at = (x = opts.delete(:created_at); x.nil? ? nil : HttpClient::Preconditions.assert_class('created_at', HttpClient::Helper.to_date_time_iso8601(x), DateTime))
24914
25164
  @updated_at = (x = opts.delete(:updated_at); x.nil? ? nil : HttpClient::Preconditions.assert_class('updated_at', HttpClient::Helper.to_date_time_iso8601(x), DateTime))
24915
25165
  @submitted_at = (x = opts.delete(:submitted_at); x.nil? ? nil : HttpClient::Preconditions.assert_class('submitted_at', HttpClient::Helper.to_date_time_iso8601(x), DateTime))
24916
- @lines = (x = opts.delete(:lines); x.nil? ? nil : HttpClient::Preconditions.assert_class('lines', x, Array).map { |v| HttpClient::Preconditions.assert_class('lines', HttpClient::Helper.to_object(v), Hash) })
25166
+ @lines = (x = opts.delete(:lines); x.nil? ? nil : HttpClient::Preconditions.assert_class('lines', x, Array).map { |v| (x = v; x.is_a?(::Io::Flow::V0::Models::Line) ? x : ::Io::Flow::V0::Models::Line.new(x)) })
24917
25167
  @attributes = (x = opts.delete(:attributes); x.nil? ? nil : HttpClient::Preconditions.assert_class('attributes', x, Hash).inject({}) { |h, d| h[d[0]] = HttpClient::Preconditions.assert_class('attributes', d[1], String); h })
24918
25168
  end
24919
25169
 
@@ -24934,20 +25184,20 @@ module Io
24934
25184
  :environment => environment,
24935
25185
  :experience_id => experience_id,
24936
25186
  :expires_at => expires_at,
24937
- :customer => customer,
25187
+ :customer => customer.to_hash,
24938
25188
  :selections => selections,
24939
- :items => items,
24940
- :destination => destination,
24941
- :deliveries => deliveries,
24942
- :prices => prices,
24943
- :payments => payments.nil? ? nil : payments,
24944
- :discount => discount,
25189
+ :items => items.map { |o| o.to_hash },
25190
+ :destination => destination.to_hash,
25191
+ :deliveries => deliveries.map { |o| o.to_hash },
25192
+ :prices => prices.map { |o| o.to_hash },
25193
+ :payments => payments.nil? ? nil : payments.map { |o| o.to_hash },
25194
+ :discount => discount.nil? ? nil : discount.to_hash,
24945
25195
  :delivered_duty => delivered_duty,
24946
- :total => total,
25196
+ :total => total.to_hash,
24947
25197
  :created_at => created_at,
24948
25198
  :updated_at => updated_at,
24949
25199
  :submitted_at => submitted_at,
24950
- :lines => lines.nil? ? nil : lines,
25200
+ :lines => lines.nil? ? nil : lines.map { |o| o.to_hash },
24951
25201
  :attributes => attributes.nil? ? nil : attributes
24952
25202
  }
24953
25203
  end
@@ -25490,7 +25740,7 @@ module Io
25490
25740
  # during this session (e.g. order).
25491
25741
  class OrganizationSession < Session
25492
25742
 
25493
- attr_reader :id, :organization, :visitor, :visit, :environment, :attributes, :ip, :local, :geo, :experience, :format
25743
+ attr_reader :id, :organization, :visitor, :visit, :environment, :attributes, :ip, :local, :geo, :experience, :format, :experiment
25494
25744
 
25495
25745
  def initialize(incoming={})
25496
25746
  super(:discriminator => Session::Types::ORGANIZATION_SESSION)
@@ -25507,6 +25757,7 @@ module Io
25507
25757
  @geo = (x = opts.delete(:geo); x.nil? ? nil : (x = x; x.is_a?(::Io::Flow::V0::Models::SessionGeo) ? x : ::Io::Flow::V0::Models::SessionGeo.new(x)))
25508
25758
  @experience = (x = opts.delete(:experience); x.nil? ? nil : (x = x; x.is_a?(::Io::Flow::V0::Models::ExperienceGeo) ? x : ::Io::Flow::V0::Models::ExperienceGeo.new(x)))
25509
25759
  @format = (x = opts.delete(:format); x.nil? ? nil : (x = x; x.is_a?(::Io::Flow::V0::Models::SessionFormat) ? x : ::Io::Flow::V0::Models::SessionFormat.new(x)))
25760
+ @experiment = (x = opts.delete(:experiment); x.nil? ? nil : (x = x; x.is_a?(::Io::Flow::V0::Models::SessionExperiment) ? x : ::Io::Flow::V0::Models::SessionExperiment.new(x)))
25510
25761
  end
25511
25762
 
25512
25763
  def to_json
@@ -25529,7 +25780,8 @@ module Io
25529
25780
  :local => local.nil? ? nil : local.to_hash,
25530
25781
  :geo => geo.nil? ? nil : geo.to_hash,
25531
25782
  :experience => experience.nil? ? nil : experience.to_hash,
25532
- :format => format.nil? ? nil : format.to_hash
25783
+ :format => format.nil? ? nil : format.to_hash,
25784
+ :experiment => experiment.nil? ? nil : experiment.to_hash
25533
25785
  }
25534
25786
  end
25535
25787
 
@@ -25896,6 +26148,32 @@ module Io
25896
26148
 
25897
26149
  end
25898
26150
 
26151
+ class PartnerReference
26152
+
26153
+ attr_reader :id
26154
+
26155
+ def initialize(incoming={})
26156
+ opts = HttpClient::Helper.symbolize_keys(incoming)
26157
+ HttpClient::Preconditions.require_keys(opts, [:id], 'PartnerReference')
26158
+ @id = HttpClient::Preconditions.assert_class('id', opts.delete(:id), String)
26159
+ end
26160
+
26161
+ def to_json
26162
+ JSON.dump(to_hash)
26163
+ end
26164
+
26165
+ def copy(incoming={})
26166
+ PartnerReference.new(to_hash.merge(HttpClient::Helper.symbolize_keys(incoming)))
26167
+ end
26168
+
26169
+ def to_hash
26170
+ {
26171
+ :id => id
26172
+ }
26173
+ end
26174
+
26175
+ end
26176
+
25899
26177
  # All of the metadata associated with a given token.
25900
26178
  class PartnerToken < Token
25901
26179
 
@@ -26644,7 +26922,7 @@ module Io
26644
26922
  # collection of items, and metadata about those options
26645
26923
  class PhysicalDelivery < Delivery
26646
26924
 
26647
- attr_reader :id, :center, :items, :options
26925
+ attr_reader :id, :center, :items, :options, :send_to
26648
26926
 
26649
26927
  def initialize(incoming={})
26650
26928
  super(:discriminator => Delivery::Types::PHYSICAL_DELIVERY)
@@ -26654,6 +26932,7 @@ module Io
26654
26932
  @center = (x = opts.delete(:center); x.nil? ? nil : (x = x; x.is_a?(::Io::Flow::V0::Models::CenterSummary) ? x : ::Io::Flow::V0::Models::CenterSummary.new(x)))
26655
26933
  @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)) }
26656
26934
  @options = HttpClient::Preconditions.assert_class('options', opts.delete(:options), Array).map { |v| (x = v; x.is_a?(::Io::Flow::V0::Models::DeliveryOption) ? x : ::Io::Flow::V0::Models::DeliveryOption.new(x)) }
26935
+ @send_to = (x = opts.delete(:send_to); x.nil? ? nil : (x = x; x.is_a?(::Io::Flow::V0::Models::Address) ? x : ::Io::Flow::V0::Models::Address.new(x)))
26657
26936
  end
26658
26937
 
26659
26938
  def to_json
@@ -26669,7 +26948,8 @@ module Io
26669
26948
  :id => id,
26670
26949
  :center => center.nil? ? nil : center.to_hash,
26671
26950
  :items => items.map { |o| o.to_hash },
26672
- :options => options.map { |o| o.to_hash }
26951
+ :options => options.map { |o| o.to_hash },
26952
+ :send_to => send_to.nil? ? nil : send_to.to_hash
26673
26953
  }
26674
26954
  end
26675
26955
 
@@ -28378,7 +28658,7 @@ module Io
28378
28658
  @authorization_key = HttpClient::Preconditions.assert_class('authorization_key', opts.delete(:authorization_key), String)
28379
28659
  @amount = HttpClient::Preconditions.assert_class('amount', HttpClient::Helper.to_big_decimal(opts.delete(:amount)), BigDecimal)
28380
28660
  @currency = HttpClient::Preconditions.assert_class('currency', opts.delete(:currency), String)
28381
- @captures = HttpClient::Preconditions.assert_class('captures', opts.delete(:captures), Array).map { |v| HttpClient::Preconditions.assert_class('captures', HttpClient::Helper.to_object(v), Hash) }
28661
+ @captures = HttpClient::Preconditions.assert_class('captures', opts.delete(:captures), Array).map { |v| (x = v; x.is_a?(::Io::Flow::V0::Models::RefundCaptureSummary) ? x : ::Io::Flow::V0::Models::RefundCaptureSummary.new(x)) }
28382
28662
  @created_at = HttpClient::Preconditions.assert_class('created_at', HttpClient::Helper.to_date_time_iso8601(opts.delete(:created_at)), DateTime)
28383
28663
  @order_number = (x = opts.delete(:order_number); x.nil? ? nil : HttpClient::Preconditions.assert_class('order_number', x, String))
28384
28664
  @rma_key = (x = opts.delete(:rma_key); x.nil? ? nil : HttpClient::Preconditions.assert_class('rma_key', x, String))
@@ -28401,7 +28681,7 @@ module Io
28401
28681
  :authorization_key => authorization_key,
28402
28682
  :amount => amount,
28403
28683
  :currency => currency,
28404
- :captures => captures,
28684
+ :captures => captures.map { |o| o.to_hash },
28405
28685
  :created_at => created_at,
28406
28686
  :order_number => order_number,
28407
28687
  :rma_key => rma_key
@@ -28839,9 +29119,9 @@ module Io
28839
29119
 
28840
29120
  def initialize(incoming={})
28841
29121
  opts = HttpClient::Helper.symbolize_keys(incoming)
28842
- HttpClient::Preconditions.require_keys(opts, [:items, :tier_id], 'ReturnForm')
29122
+ HttpClient::Preconditions.require_keys(opts, [:items], 'ReturnForm')
28843
29123
  @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)
29124
+ @tier_id = (x = opts.delete(:tier_id); x.nil? ? nil : HttpClient::Preconditions.assert_class('tier_id', x, String))
28845
29125
  @order_number = (x = opts.delete(:order_number); x.nil? ? nil : HttpClient::Preconditions.assert_class('order_number', x, String))
28846
29126
  @service = (x = opts.delete(:service); x.nil? ? nil : HttpClient::Preconditions.assert_class('service', x, String))
28847
29127
  @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)))
@@ -29049,12 +29329,12 @@ module Io
29049
29329
  @timestamp = HttpClient::Preconditions.assert_class('timestamp', HttpClient::Helper.to_date_time_iso8601(opts.delete(:timestamp)), DateTime)
29050
29330
  @id = HttpClient::Preconditions.assert_class('id', opts.delete(:id), String)
29051
29331
  @organization = HttpClient::Preconditions.assert_class('organization', opts.delete(:organization), String)
29052
- @destination = HttpClient::Preconditions.assert_class('destination', HttpClient::Helper.to_object(opts.delete(:destination)), Hash)
29053
- @items = HttpClient::Preconditions.assert_class('items', opts.delete(:items), Array).map { |v| HttpClient::Preconditions.assert_class('items', HttpClient::Helper.to_object(v), Hash) }
29332
+ @destination = (x = opts.delete(:destination); x.is_a?(::Io::Flow::V0::Models::ShippingAddress) ? x : ::Io::Flow::V0::Models::ShippingAddress.new(x))
29333
+ @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)) }
29054
29334
  @key = HttpClient::Preconditions.assert_class('key', opts.delete(:key), String)
29055
- @labels = HttpClient::Preconditions.assert_class('labels', opts.delete(:labels), Array).map { |v| HttpClient::Preconditions.assert_class('labels', HttpClient::Helper.to_object(v), Hash) }
29335
+ @labels = HttpClient::Preconditions.assert_class('labels', opts.delete(:labels), Array).map { |v| (x = v; x.is_a?(::Io::Flow::V0::Models::ShippingLabel) ? x : ::Io::Flow::V0::Models::ShippingLabel.new(x)) }
29056
29336
  @service = HttpClient::Preconditions.assert_class('service', opts.delete(:service), String)
29057
- @origin = HttpClient::Preconditions.assert_class('origin', HttpClient::Helper.to_object(opts.delete(:origin)), Hash)
29337
+ @origin = (x = opts.delete(:origin); x.is_a?(::Io::Flow::V0::Models::ShippingAddress) ? x : ::Io::Flow::V0::Models::ShippingAddress.new(x))
29058
29338
  end
29059
29339
 
29060
29340
  def to_json
@@ -29071,12 +29351,12 @@ module Io
29071
29351
  :timestamp => timestamp,
29072
29352
  :id => id,
29073
29353
  :organization => organization,
29074
- :destination => destination,
29075
- :items => items,
29354
+ :destination => destination.to_hash,
29355
+ :items => items.map { |o| o.to_hash },
29076
29356
  :key => key,
29077
- :labels => labels,
29357
+ :labels => labels.map { |o| o.to_hash },
29078
29358
  :service => service,
29079
- :origin => origin
29359
+ :origin => origin.to_hash
29080
29360
  }
29081
29361
  end
29082
29362
 
@@ -29560,38 +29840,6 @@ module Io
29560
29840
 
29561
29841
  end
29562
29842
 
29563
- # Specific service rendered by the carrier (fedex ground saturday, ups overnight
29564
- # weekend, etc)
29565
- class Service
29566
-
29567
- attr_reader :id, :carrier, :name
29568
-
29569
- def initialize(incoming={})
29570
- opts = HttpClient::Helper.symbolize_keys(incoming)
29571
- HttpClient::Preconditions.require_keys(opts, [:id, :carrier, :name], 'Service')
29572
- @id = HttpClient::Preconditions.assert_class('id', opts.delete(:id), String)
29573
- @carrier = (x = opts.delete(:carrier); x.is_a?(::Io::Flow::V0::Models::Carrier) ? x : ::Io::Flow::V0::Models::Carrier.new(x))
29574
- @name = HttpClient::Preconditions.assert_class('name', opts.delete(:name), String)
29575
- end
29576
-
29577
- def to_json
29578
- JSON.dump(to_hash)
29579
- end
29580
-
29581
- def copy(incoming={})
29582
- Service.new(to_hash.merge(HttpClient::Helper.symbolize_keys(incoming)))
29583
- end
29584
-
29585
- def to_hash
29586
- {
29587
- :id => id,
29588
- :carrier => carrier.to_hash,
29589
- :name => name
29590
- }
29591
- end
29592
-
29593
- end
29594
-
29595
29843
  class ServiceReference
29596
29844
 
29597
29845
  attr_reader :id
@@ -29705,6 +29953,62 @@ module Io
29705
29953
 
29706
29954
  end
29707
29955
 
29956
+ # Experiment for A/B testing
29957
+ class SessionExperiment
29958
+
29959
+ attr_reader :key, :variant
29960
+
29961
+ def initialize(incoming={})
29962
+ opts = HttpClient::Helper.symbolize_keys(incoming)
29963
+ HttpClient::Preconditions.require_keys(opts, [:key, :variant], 'SessionExperiment')
29964
+ @key = HttpClient::Preconditions.assert_class('key', opts.delete(:key), String)
29965
+ @variant = (x = opts.delete(:variant); x.is_a?(::Io::Flow::V0::Models::SessionExperimentVariant) ? x : ::Io::Flow::V0::Models::SessionExperimentVariant.new(x))
29966
+ end
29967
+
29968
+ def to_json
29969
+ JSON.dump(to_hash)
29970
+ end
29971
+
29972
+ def copy(incoming={})
29973
+ SessionExperiment.new(to_hash.merge(HttpClient::Helper.symbolize_keys(incoming)))
29974
+ end
29975
+
29976
+ def to_hash
29977
+ {
29978
+ :key => key,
29979
+ :variant => variant.to_hash
29980
+ }
29981
+ end
29982
+
29983
+ end
29984
+
29985
+ # Experiment variant. Control or variant
29986
+ class SessionExperimentVariant
29987
+
29988
+ attr_reader :key
29989
+
29990
+ def initialize(incoming={})
29991
+ opts = HttpClient::Helper.symbolize_keys(incoming)
29992
+ HttpClient::Preconditions.require_keys(opts, [:key], 'SessionExperimentVariant')
29993
+ @key = HttpClient::Preconditions.assert_class('key', opts.delete(:key), String)
29994
+ end
29995
+
29996
+ def to_json
29997
+ JSON.dump(to_hash)
29998
+ end
29999
+
30000
+ def copy(incoming={})
30001
+ SessionExperimentVariant.new(to_hash.merge(HttpClient::Helper.symbolize_keys(incoming)))
30002
+ end
30003
+
30004
+ def to_hash
30005
+ {
30006
+ :key => key
30007
+ }
30008
+ end
30009
+
30010
+ end
30011
+
29708
30012
  # Configures session expiration time. We default to 30 minutes to follow Google
29709
30013
  # Analytics
29710
30014
  class SessionExpirationConfig
@@ -29736,7 +30040,7 @@ module Io
29736
30040
 
29737
30041
  class SessionForm
29738
30042
 
29739
- attr_reader :ip, :experience, :country, :currency, :language, :locale, :attributes
30043
+ attr_reader :ip, :experience, :country, :currency, :language, :locale, :attributes, :experiment
29740
30044
 
29741
30045
  def initialize(incoming={})
29742
30046
  opts = HttpClient::Helper.symbolize_keys(incoming)
@@ -29747,6 +30051,7 @@ module Io
29747
30051
  @language = (x = opts.delete(:language); x.nil? ? nil : HttpClient::Preconditions.assert_class('language', x, String))
29748
30052
  @locale = (x = opts.delete(:locale); x.nil? ? nil : HttpClient::Preconditions.assert_class('locale', x, String))
29749
30053
  @attributes = (x = opts.delete(:attributes); x.nil? ? nil : HttpClient::Preconditions.assert_class('attributes', x, Hash).inject({}) { |h, d| h[d[0]] = HttpClient::Preconditions.assert_class('attributes', d[1], String); h })
30054
+ @experiment = (x = opts.delete(:experiment); x.nil? ? nil : (x = x; x.is_a?(::Io::Flow::V0::Models::SessionExperiment) ? x : ::Io::Flow::V0::Models::SessionExperiment.new(x)))
29750
30055
  end
29751
30056
 
29752
30057
  def to_json
@@ -29765,7 +30070,8 @@ module Io
29765
30070
  :currency => currency,
29766
30071
  :language => language,
29767
30072
  :locale => locale,
29768
- :attributes => attributes.nil? ? nil : attributes
30073
+ :attributes => attributes.nil? ? nil : attributes,
30074
+ :experiment => experiment.nil? ? nil : experiment.to_hash
29769
30075
  }
29770
30076
  end
29771
30077
 
@@ -29832,7 +30138,7 @@ module Io
29832
30138
 
29833
30139
  class SessionPutForm
29834
30140
 
29835
- attr_reader :ip, :experience, :country, :currency, :language, :locale, :attributes
30141
+ attr_reader :ip, :experience, :country, :currency, :language, :locale, :attributes, :experiment
29836
30142
 
29837
30143
  def initialize(incoming={})
29838
30144
  opts = HttpClient::Helper.symbolize_keys(incoming)
@@ -29843,6 +30149,7 @@ module Io
29843
30149
  @language = (x = opts.delete(:language); x.nil? ? nil : HttpClient::Preconditions.assert_class('language', x, String))
29844
30150
  @locale = (x = opts.delete(:locale); x.nil? ? nil : HttpClient::Preconditions.assert_class('locale', x, String))
29845
30151
  @attributes = (x = opts.delete(:attributes); x.nil? ? nil : HttpClient::Preconditions.assert_class('attributes', x, Hash).inject({}) { |h, d| h[d[0]] = HttpClient::Preconditions.assert_class('attributes', d[1], String); h })
30152
+ @experiment = (x = opts.delete(:experiment); x.nil? ? nil : (x = x; x.is_a?(::Io::Flow::V0::Models::SessionExperiment) ? x : ::Io::Flow::V0::Models::SessionExperiment.new(x)))
29846
30153
  end
29847
30154
 
29848
30155
  def to_json
@@ -29861,7 +30168,8 @@ module Io
29861
30168
  :currency => currency,
29862
30169
  :language => language,
29863
30170
  :locale => locale,
29864
- :attributes => attributes.nil? ? nil : attributes
30171
+ :attributes => attributes.nil? ? nil : attributes,
30172
+ :experiment => experiment.nil? ? nil : experiment.to_hash
29865
30173
  }
29866
30174
  end
29867
30175
 
@@ -29957,13 +30265,12 @@ module Io
29957
30265
  # shipper to transport a package from a given origin to destination
29958
30266
  class ShippingLabel
29959
30267
 
29960
- attr_reader :id, :direction, :attributes, :carrier_tracking_number, :carrier_tracking_number_url, :cost, :destination, :flow_tracking_number, :flow_tracking_number_url, :origin, :service, :window, :label, :invoice, :return_, :order, :package, :order_identifier, :fulfillment_key
30268
+ attr_reader :id, :attributes, :carrier_tracking_number, :carrier_tracking_number_url, :cost, :destination, :flow_tracking_number, :flow_tracking_number_url, :origin, :service, :window, :label, :invoice, :return_, :order, :package, :order_identifier, :fulfillment_key, :shipment_recipient
29961
30269
 
29962
30270
  def initialize(incoming={})
29963
30271
  opts = HttpClient::Helper.symbolize_keys(incoming)
29964
- HttpClient::Preconditions.require_keys(opts, [:id, :direction, :carrier_tracking_number, :carrier_tracking_number_url, :cost, :destination, :flow_tracking_number, :flow_tracking_number_url, :origin, :service, :window], 'ShippingLabel')
30272
+ HttpClient::Preconditions.require_keys(opts, [:id, :carrier_tracking_number, :carrier_tracking_number_url, :cost, :destination, :flow_tracking_number, :flow_tracking_number_url, :origin, :service, :window, :shipment_recipient], 'ShippingLabel')
29965
30273
  @id = HttpClient::Preconditions.assert_class('id', opts.delete(:id), String)
29966
- @direction = (x = opts.delete(:direction); x.is_a?(::Io::Flow::V0::Models::Direction) ? x : ::Io::Flow::V0::Models::Direction.apply(x))
29967
30274
  @attributes = HttpClient::Preconditions.assert_class('attributes', (x = opts.delete(:attributes); x.nil? ? {} : x), Hash).inject({}) { |h, d| h[d[0]] = HttpClient::Preconditions.assert_class('attributes', d[1], String); h }
29968
30275
  @carrier_tracking_number = HttpClient::Preconditions.assert_class('carrier_tracking_number', opts.delete(:carrier_tracking_number), String)
29969
30276
  @carrier_tracking_number_url = HttpClient::Preconditions.assert_class('carrier_tracking_number_url', opts.delete(:carrier_tracking_number_url), String)
@@ -29981,6 +30288,7 @@ module Io
29981
30288
  @package = (x = opts.delete(:package); x.nil? ? nil : (x = x; x.is_a?(::Io::Flow::V0::Models::ShippingLabelPackage) ? x : ::Io::Flow::V0::Models::ShippingLabelPackage.new(x)))
29982
30289
  @order_identifier = (x = opts.delete(:order_identifier); x.nil? ? nil : HttpClient::Preconditions.assert_class('order_identifier', x, String))
29983
30290
  @fulfillment_key = (x = opts.delete(:fulfillment_key); x.nil? ? nil : HttpClient::Preconditions.assert_class('fulfillment_key', x, String))
30291
+ @shipment_recipient = (x = opts.delete(:shipment_recipient); x.is_a?(::Io::Flow::V0::Models::ShipmentRecipient) ? x : ::Io::Flow::V0::Models::ShipmentRecipient.apply(x))
29984
30292
  end
29985
30293
 
29986
30294
  def to_json
@@ -29994,7 +30302,6 @@ module Io
29994
30302
  def to_hash
29995
30303
  {
29996
30304
  :id => id,
29997
- :direction => direction.value,
29998
30305
  :attributes => attributes,
29999
30306
  :carrier_tracking_number => carrier_tracking_number,
30000
30307
  :carrier_tracking_number_url => carrier_tracking_number_url,
@@ -30011,7 +30318,8 @@ module Io
30011
30318
  :order => order.nil? ? nil : order.to_hash,
30012
30319
  :package => package.nil? ? nil : package.to_hash,
30013
30320
  :order_identifier => order_identifier,
30014
- :fulfillment_key => fulfillment_key
30321
+ :fulfillment_key => fulfillment_key,
30322
+ :shipment_recipient => shipment_recipient.value
30015
30323
  }
30016
30324
  end
30017
30325
 
@@ -30052,7 +30360,7 @@ module Io
30052
30360
 
30053
30361
  class ShippingLabelForm
30054
30362
 
30055
- attr_reader :destination, :origin, :package, :attributes, :delivered_duty, :direction, :order_number, :service
30363
+ attr_reader :destination, :origin, :package, :attributes, :delivered_duty, :order_number, :service, :shipment_recipient
30056
30364
 
30057
30365
  def initialize(incoming={})
30058
30366
  opts = HttpClient::Helper.symbolize_keys(incoming)
@@ -30062,9 +30370,9 @@ module Io
30062
30370
  @package = (x = opts.delete(:package); x.is_a?(::Io::Flow::V0::Models::ShippingLabelPackage) ? x : ::Io::Flow::V0::Models::ShippingLabelPackage.new(x))
30063
30371
  @attributes = (x = opts.delete(:attributes); x.nil? ? nil : HttpClient::Preconditions.assert_class('attributes', x, Hash).inject({}) { |h, d| h[d[0]] = HttpClient::Preconditions.assert_class('attributes', d[1], String); h })
30064
30372
  @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)))
30065
- @direction = (x = opts.delete(:direction); x.nil? ? nil : (x = x; x.is_a?(::Io::Flow::V0::Models::Direction) ? x : ::Io::Flow::V0::Models::Direction.apply(x)))
30066
30373
  @order_number = (x = opts.delete(:order_number); x.nil? ? nil : HttpClient::Preconditions.assert_class('order_number', x, String))
30067
30374
  @service = (x = opts.delete(:service); x.nil? ? nil : HttpClient::Preconditions.assert_class('service', x, String))
30375
+ @shipment_recipient = (x = opts.delete(:shipment_recipient); x.nil? ? nil : (x = x; x.is_a?(::Io::Flow::V0::Models::ShipmentRecipient) ? x : ::Io::Flow::V0::Models::ShipmentRecipient.apply(x)))
30068
30376
  end
30069
30377
 
30070
30378
  def to_json
@@ -30082,9 +30390,9 @@ module Io
30082
30390
  :package => package.to_hash,
30083
30391
  :attributes => attributes.nil? ? nil : attributes,
30084
30392
  :delivered_duty => delivered_duty.nil? ? nil : delivered_duty.value,
30085
- :direction => direction.nil? ? nil : direction.value,
30086
30393
  :order_number => order_number,
30087
- :service => service
30394
+ :service => service,
30395
+ :shipment_recipient => shipment_recipient.nil? ? nil : shipment_recipient.value
30088
30396
  }
30089
30397
  end
30090
30398
 
@@ -30239,7 +30547,7 @@ module Io
30239
30547
  # of shipped packages.
30240
30548
  class ShippingNotificationForm
30241
30549
 
30242
- attr_reader :key, :attributes, :carrier_tracking_number, :destination, :order_number, :package, :service, :origin
30550
+ attr_reader :key, :attributes, :carrier_tracking_number, :destination, :order_number, :package, :service, :origin, :shipment_recipient
30243
30551
 
30244
30552
  def initialize(incoming={})
30245
30553
  opts = HttpClient::Helper.symbolize_keys(incoming)
@@ -30252,6 +30560,7 @@ module Io
30252
30560
  @package = (x = opts.delete(:package); x.is_a?(::Io::Flow::V0::Models::ShippingLabelPackage) ? x : ::Io::Flow::V0::Models::ShippingLabelPackage.new(x))
30253
30561
  @service = HttpClient::Preconditions.assert_class('service', opts.delete(:service), String)
30254
30562
  @origin = (x = opts.delete(:origin); x.nil? ? nil : (x = x; x.is_a?(::Io::Flow::V0::Models::ShippingAddress) ? x : ::Io::Flow::V0::Models::ShippingAddress.new(x)))
30563
+ @shipment_recipient = (x = opts.delete(:shipment_recipient); x.nil? ? nil : (x = x; x.is_a?(::Io::Flow::V0::Models::ShipmentRecipient) ? x : ::Io::Flow::V0::Models::ShipmentRecipient.apply(x)))
30255
30564
  end
30256
30565
 
30257
30566
  def to_json
@@ -30271,7 +30580,8 @@ module Io
30271
30580
  :order_number => order_number,
30272
30581
  :package => package.to_hash,
30273
30582
  :service => service,
30274
- :origin => origin.nil? ? nil : origin.to_hash
30583
+ :origin => origin.nil? ? nil : origin.to_hash,
30584
+ :shipment_recipient => shipment_recipient.nil? ? nil : shipment_recipient.value
30275
30585
  }
30276
30586
  end
30277
30587
 
@@ -31348,7 +31658,7 @@ module Io
31348
31658
  # Express tier, Economy tier
31349
31659
  class Tier
31350
31660
 
31351
- attr_reader :id, :direction, :experience, :integration, :name, :rules, :services, :strategy, :visibility, :currency, :description
31661
+ attr_reader :id, :direction, :experience, :integration, :name, :rules, :services, :strategy, :visibility, :currency, :description, :display
31352
31662
 
31353
31663
  def initialize(incoming={})
31354
31664
  opts = HttpClient::Helper.symbolize_keys(incoming)
@@ -31359,11 +31669,12 @@ module Io
31359
31669
  @integration = (x = opts.delete(:integration); x.is_a?(::Io::Flow::V0::Models::ShipmentIntegrationType) ? x : ::Io::Flow::V0::Models::ShipmentIntegrationType.apply(x))
31360
31670
  @name = HttpClient::Preconditions.assert_class('name', opts.delete(:name), String)
31361
31671
  @rules = HttpClient::Preconditions.assert_class('rules', opts.delete(:rules), Array).map { |v| (x = v; x.is_a?(::Io::Flow::V0::Models::TierRule) ? x : ::Io::Flow::V0::Models::TierRule.new(x)) }
31362
- @services = HttpClient::Preconditions.assert_class('services', opts.delete(:services), Array).map { |v| (x = v; x.is_a?(::Io::Flow::V0::Models::Service) ? x : ::Io::Flow::V0::Models::Service.new(x)) }
31672
+ @services = HttpClient::Preconditions.assert_class('services', opts.delete(:services), Array).map { |v| (x = v; x.is_a?(::Io::Flow::V0::Models::CarrierService) ? x : ::Io::Flow::V0::Models::CarrierService.new(x)) }
31363
31673
  @strategy = (x = opts.delete(:strategy); x.is_a?(::Io::Flow::V0::Models::TierStrategy) ? x : ::Io::Flow::V0::Models::TierStrategy.apply(x))
31364
31674
  @visibility = (x = opts.delete(:visibility); x.is_a?(::Io::Flow::V0::Models::Visibility) ? x : ::Io::Flow::V0::Models::Visibility.apply(x))
31365
31675
  @currency = (x = opts.delete(:currency); x.nil? ? nil : HttpClient::Preconditions.assert_class('currency', x, String))
31366
31676
  @description = (x = opts.delete(:description); x.nil? ? nil : HttpClient::Preconditions.assert_class('description', x, String))
31677
+ @display = (x = opts.delete(:display); x.nil? ? nil : (x = x; x.is_a?(::Io::Flow::V0::Models::TierDisplay) ? x : ::Io::Flow::V0::Models::TierDisplay.new(x)))
31367
31678
  end
31368
31679
 
31369
31680
  def to_json
@@ -31386,7 +31697,8 @@ module Io
31386
31697
  :strategy => strategy.value,
31387
31698
  :visibility => visibility.value,
31388
31699
  :currency => currency,
31389
- :description => description
31700
+ :description => description,
31701
+ :display => display.nil? ? nil : display.to_hash
31390
31702
  }
31391
31703
  end
31392
31704
 
@@ -31518,11 +31830,90 @@ module Io
31518
31830
 
31519
31831
  end
31520
31832
 
31833
+ class TierDisplay
31834
+
31835
+ attr_reader :estimate
31836
+
31837
+ def initialize(incoming={})
31838
+ opts = HttpClient::Helper.symbolize_keys(incoming)
31839
+ HttpClient::Preconditions.require_keys(opts, [:estimate], 'TierDisplay')
31840
+ @estimate = (x = opts.delete(:estimate); x.is_a?(::Io::Flow::V0::Models::TierEstimate) ? x : ::Io::Flow::V0::Models::TierEstimate.new(x))
31841
+ end
31842
+
31843
+ def to_json
31844
+ JSON.dump(to_hash)
31845
+ end
31846
+
31847
+ def copy(incoming={})
31848
+ TierDisplay.new(to_hash.merge(HttpClient::Helper.symbolize_keys(incoming)))
31849
+ end
31850
+
31851
+ def to_hash
31852
+ {
31853
+ :estimate => estimate.to_hash
31854
+ }
31855
+ end
31856
+
31857
+ end
31858
+
31859
+ class TierDisplayForm
31860
+
31861
+ attr_reader :estimate
31862
+
31863
+ def initialize(incoming={})
31864
+ opts = HttpClient::Helper.symbolize_keys(incoming)
31865
+ @estimate = (x = opts.delete(:estimate); x.nil? ? nil : (x = x; x.is_a?(::Io::Flow::V0::Models::TierEstimate) ? x : ::Io::Flow::V0::Models::TierEstimate.new(x)))
31866
+ end
31867
+
31868
+ def to_json
31869
+ JSON.dump(to_hash)
31870
+ end
31871
+
31872
+ def copy(incoming={})
31873
+ TierDisplayForm.new(to_hash.merge(HttpClient::Helper.symbolize_keys(incoming)))
31874
+ end
31875
+
31876
+ def to_hash
31877
+ {
31878
+ :estimate => estimate.nil? ? nil : estimate.to_hash
31879
+ }
31880
+ end
31881
+
31882
+ end
31883
+
31884
+ class TierEstimate
31885
+
31886
+ attr_reader :type, :label
31887
+
31888
+ def initialize(incoming={})
31889
+ opts = HttpClient::Helper.symbolize_keys(incoming)
31890
+ HttpClient::Preconditions.require_keys(opts, [:type], 'TierEstimate')
31891
+ @type = (x = opts.delete(:type); x.is_a?(::Io::Flow::V0::Models::TierEstimateType) ? x : ::Io::Flow::V0::Models::TierEstimateType.apply(x))
31892
+ @label = (x = opts.delete(:label); x.nil? ? nil : HttpClient::Preconditions.assert_class('label', x, String))
31893
+ end
31894
+
31895
+ def to_json
31896
+ JSON.dump(to_hash)
31897
+ end
31898
+
31899
+ def copy(incoming={})
31900
+ TierEstimate.new(to_hash.merge(HttpClient::Helper.symbolize_keys(incoming)))
31901
+ end
31902
+
31903
+ def to_hash
31904
+ {
31905
+ :type => type.value,
31906
+ :label => label
31907
+ }
31908
+ end
31909
+
31910
+ end
31911
+
31521
31912
  # Service shipping tier available in this tier gorup. e.g. Standard tier,
31522
31913
  # Express tier, Economy tier
31523
31914
  class TierForm
31524
31915
 
31525
- attr_reader :currency, :experience, :integration, :name, :rules, :services, :strategy, :visibility, :description, :direction
31916
+ attr_reader :currency, :experience, :integration, :name, :rules, :services, :strategy, :visibility, :description, :direction, :display
31526
31917
 
31527
31918
  def initialize(incoming={})
31528
31919
  opts = HttpClient::Helper.symbolize_keys(incoming)
@@ -31537,6 +31928,7 @@ module Io
31537
31928
  @visibility = (x = opts.delete(:visibility); x.is_a?(::Io::Flow::V0::Models::Visibility) ? x : ::Io::Flow::V0::Models::Visibility.apply(x))
31538
31929
  @description = (x = opts.delete(:description); x.nil? ? nil : HttpClient::Preconditions.assert_class('description', x, String))
31539
31930
  @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)))
31931
+ @display = (x = opts.delete(:display); x.nil? ? nil : (x = x; x.is_a?(::Io::Flow::V0::Models::TierDisplayForm) ? x : ::Io::Flow::V0::Models::TierDisplayForm.new(x)))
31540
31932
  end
31541
31933
 
31542
31934
  def to_json
@@ -31558,7 +31950,8 @@ module Io
31558
31950
  :strategy => strategy.value,
31559
31951
  :visibility => visibility.value,
31560
31952
  :description => description,
31561
- :direction => direction.nil? ? nil : direction.value
31953
+ :direction => direction.nil? ? nil : direction.value,
31954
+ :display => display.nil? ? nil : display.to_hash
31562
31955
  }
31563
31956
  end
31564
31957
 
@@ -31688,7 +32081,7 @@ module Io
31688
32081
 
31689
32082
  class TierSummary
31690
32083
 
31691
- attr_reader :id, :experience, :integration, :name, :services, :strategy, :visibility, :currency
32084
+ attr_reader :id, :experience, :integration, :name, :services, :strategy, :visibility, :currency, :display
31692
32085
 
31693
32086
  def initialize(incoming={})
31694
32087
  opts = HttpClient::Helper.symbolize_keys(incoming)
@@ -31701,6 +32094,7 @@ module Io
31701
32094
  @strategy = (x = opts.delete(:strategy); x.is_a?(::Io::Flow::V0::Models::TierStrategy) ? x : ::Io::Flow::V0::Models::TierStrategy.apply(x))
31702
32095
  @visibility = (x = opts.delete(:visibility); x.is_a?(::Io::Flow::V0::Models::Visibility) ? x : ::Io::Flow::V0::Models::Visibility.apply(x))
31703
32096
  @currency = (x = opts.delete(:currency); x.nil? ? nil : HttpClient::Preconditions.assert_class('currency', x, String))
32097
+ @display = (x = opts.delete(:display); x.nil? ? nil : (x = x; x.is_a?(::Io::Flow::V0::Models::TierDisplay) ? x : ::Io::Flow::V0::Models::TierDisplay.new(x)))
31704
32098
  end
31705
32099
 
31706
32100
  def to_json
@@ -31720,7 +32114,8 @@ module Io
31720
32114
  :services => services,
31721
32115
  :strategy => strategy.value,
31722
32116
  :visibility => visibility.value,
31723
- :currency => currency
32117
+ :currency => currency,
32118
+ :display => display.nil? ? nil : display.to_hash
31724
32119
  }
31725
32120
  end
31726
32121
 
@@ -31728,7 +32123,7 @@ module Io
31728
32123
 
31729
32124
  class TierUpserted < Event
31730
32125
 
31731
- attr_reader :event_id, :timestamp, :organization, :id, :experience_key, :integration, :name, :rules, :services, :strategy, :visibility, :currency, :description, :direction
32126
+ attr_reader :event_id, :timestamp, :organization, :id, :experience_key, :integration, :name, :rules, :services, :strategy, :visibility, :currency, :description, :direction, :display
31732
32127
 
31733
32128
  def initialize(incoming={})
31734
32129
  super(:discriminator => Event::Types::TIER_UPSERTED)
@@ -31748,6 +32143,7 @@ module Io
31748
32143
  @currency = (x = opts.delete(:currency); x.nil? ? nil : HttpClient::Preconditions.assert_class('currency', x, String))
31749
32144
  @description = (x = opts.delete(:description); x.nil? ? nil : HttpClient::Preconditions.assert_class('description', x, String))
31750
32145
  @direction = (x = opts.delete(:direction); x.nil? ? nil : HttpClient::Preconditions.assert_class('direction', x, String))
32146
+ @display = (x = opts.delete(:display); x.nil? ? nil : (x = x; x.is_a?(::Io::Flow::V0::Models::TierDisplay) ? x : ::Io::Flow::V0::Models::TierDisplay.new(x)))
31751
32147
  end
31752
32148
 
31753
32149
  def to_json
@@ -31773,7 +32169,8 @@ module Io
31773
32169
  :visibility => visibility,
31774
32170
  :currency => currency,
31775
32171
  :description => description,
31776
- :direction => direction
32172
+ :direction => direction,
32173
+ :display => display.nil? ? nil : display.to_hash
31777
32174
  }
31778
32175
  end
31779
32176
 
@@ -32210,7 +32607,7 @@ module Io
32210
32607
  @event_id = HttpClient::Preconditions.assert_class('event_id', opts.delete(:event_id), String)
32211
32608
  @timestamp = HttpClient::Preconditions.assert_class('timestamp', HttpClient::Helper.to_date_time_iso8601(opts.delete(:timestamp)), DateTime)
32212
32609
  @organization = HttpClient::Preconditions.assert_class('organization', opts.delete(:organization), String)
32213
- @address = HttpClient::Preconditions.assert_class('address', HttpClient::Helper.to_object(opts.delete(:address)), Hash)
32610
+ @address = (x = opts.delete(:address); x.is_a?(::Io::Flow::V0::Models::Address) ? x : ::Io::Flow::V0::Models::Address.new(x))
32214
32611
  @carrier = HttpClient::Preconditions.assert_class('carrier', opts.delete(:carrier), String)
32215
32612
  @carrier_timestamp = HttpClient::Preconditions.assert_class('carrier_timestamp', HttpClient::Helper.to_date_time_iso8601(opts.delete(:carrier_timestamp)), DateTime)
32216
32613
  @carrier_tracking_number = HttpClient::Preconditions.assert_class('carrier_tracking_number', opts.delete(:carrier_tracking_number), String)
@@ -32234,7 +32631,7 @@ module Io
32234
32631
  :event_id => event_id,
32235
32632
  :timestamp => timestamp,
32236
32633
  :organization => organization,
32237
- :address => address,
32634
+ :address => address.to_hash,
32238
32635
  :carrier => carrier,
32239
32636
  :carrier_timestamp => carrier_timestamp,
32240
32637
  :carrier_tracking_number => carrier_tracking_number,