flowcommerce 0.2.52 → 0.2.53

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: fe1e133e2edce54d479cb65c93db8eb32fcb670e
4
- data.tar.gz: c985d41f766c96be0eb1902fe9b0f35327a4e77c
3
+ metadata.gz: 6dddc599fbd74f1b04e2ae2868ac8a6f0ca37721
4
+ data.tar.gz: 8c482635d0b2752ac77ffc0eb268f60ada3cb6da
5
5
  SHA512:
6
- metadata.gz: 84869b9058acf51e59a325098e0e8162bbd97799d7e83855b085e028114234a86db4852fcc82b062b23c6af2dcc2cb3a3946ffb895f7a98b00f28896bfe74133
7
- data.tar.gz: 6e1489693c47af1168884147c0126eda921a693fd9c0ee4bbd4e4f3716eec26c086d903813e847533e6c671014ea2480386bc148c60faad0d9f90680e41b05d4
6
+ metadata.gz: 00130fe3ce041b8ae4cf139157d8ec0acd25f51fa675c059736c80f949575b5d8efda036b6297f4d06c474c98fb253796e3dac240b9043c7a4101a9011b9e1e4
7
+ data.tar.gz: 4b55f800224f584f1a91662412adfa9120b61b3f76cf8a920de28d163cb9809d125922891e3b33993361d3662ff0c49ce77375b31393de4bc35da77cd1767e2e
@@ -1,6 +1,6 @@
1
1
  # Generated by API Builder - https://www.apibuilder.io
2
- # Service version: 0.4.50
3
- # apibuilder:0.13.0 https://app.apibuilder.io/flow/api/0.4.60/ruby_client
2
+ # Service version: 0.4.51
3
+ # apibuilder:0.13.0 https://app.apibuilder.io/flow/api/0.4.74/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 https://app.apibuilder.io/flow/api/0.4.60/ruby_client' unless defined?(Constants::USER_AGENT)
29
- VERSION = '0.4.50' unless defined?(Constants::VERSION)
28
+ USER_AGENT = 'apibuilder:0.13.0 https://app.apibuilder.io/flow/api/0.4.74/ruby_client' unless defined?(Constants::USER_AGENT)
29
+ VERSION = '0.4.51' unless defined?(Constants::VERSION)
30
30
  VERSION_MAJOR = 0 unless defined?(VERSION_MAJOR)
31
31
 
32
32
  end
@@ -76,6 +76,10 @@ module Io
76
76
  @catalogs ||= ::Io::Flow::V0::Clients::Catalogs.new(self)
77
77
  end
78
78
 
79
+ def checkout_attributes
80
+ @checkout_attributes ||= ::Io::Flow::V0::Clients::CheckoutAttributes.new(self)
81
+ end
82
+
79
83
  def checkout_item_contents
80
84
  @checkout_item_contents ||= ::Io::Flow::V0::Clients::CheckoutItemContents.new(self)
81
85
  end
@@ -588,6 +592,58 @@ module Io
588
592
 
589
593
  end
590
594
 
595
+ class CheckoutAttributes
596
+
597
+ def initialize(client)
598
+ @client = HttpClient::Preconditions.assert_class('client', client, ::Io::Flow::V0::Client)
599
+ end
600
+
601
+ def get(organization, incoming={})
602
+ HttpClient::Preconditions.assert_class('organization', organization, String)
603
+ opts = HttpClient::Helper.symbolize_keys(incoming)
604
+ query = {
605
+ :id => (x = opts.delete(:id); x.nil? ? nil : HttpClient::Preconditions.assert_class('id', x, Array).map { |v| HttpClient::Preconditions.assert_class('id', v, String) }),
606
+ :key => (x = opts.delete(:key); x.nil? ? nil : HttpClient::Preconditions.assert_class('key', x, Array).map { |v| HttpClient::Preconditions.assert_class('key', v, String) }),
607
+ :experience_key => (x = opts.delete(:experience_key); x.nil? ? nil : HttpClient::Preconditions.assert_class('experience_key', x, String)),
608
+ :limit => HttpClient::Preconditions.assert_class('limit', (x = opts.delete(:limit); x.nil? ? 25 : x), Integer),
609
+ :offset => HttpClient::Preconditions.assert_class('offset', (x = opts.delete(:offset); x.nil? ? 0 : x), Integer),
610
+ :sort => HttpClient::Preconditions.assert_class('sort', (x = opts.delete(:sort); x.nil? ? "position" : x), String)
611
+ }.delete_if { |k, v| v.nil? }
612
+ r = @client.request("/#{CGI.escape(organization)}/checkout/attributes").with_query(query).get
613
+ r.map { |x| ::Io::Flow::V0::Models::CheckoutAttribute.new(x) }
614
+ end
615
+
616
+ def post(organization, checkout_attribute_form)
617
+ HttpClient::Preconditions.assert_class('organization', organization, String)
618
+ (x = checkout_attribute_form; x.is_a?(::Io::Flow::V0::Models::CheckoutAttributeForm) ? x : ::Io::Flow::V0::Models::CheckoutAttributeForm.new(x))
619
+ r = @client.request("/#{CGI.escape(organization)}/checkout/attributes").with_json(checkout_attribute_form.to_json).post
620
+ ::Io::Flow::V0::Models::CheckoutAttribute.new(r)
621
+ end
622
+
623
+ def get_by_id(organization, id)
624
+ HttpClient::Preconditions.assert_class('organization', organization, String)
625
+ HttpClient::Preconditions.assert_class('id', id, String)
626
+ r = @client.request("/#{CGI.escape(organization)}/checkout/attributes/#{CGI.escape(id)}").get
627
+ ::Io::Flow::V0::Models::CheckoutAttribute.new(r)
628
+ end
629
+
630
+ def put_by_id(organization, id, checkout_attribute_form)
631
+ HttpClient::Preconditions.assert_class('organization', organization, String)
632
+ HttpClient::Preconditions.assert_class('id', id, String)
633
+ (x = checkout_attribute_form; x.is_a?(::Io::Flow::V0::Models::CheckoutAttributeForm) ? x : ::Io::Flow::V0::Models::CheckoutAttributeForm.new(x))
634
+ r = @client.request("/#{CGI.escape(organization)}/checkout/attributes/#{CGI.escape(id)}").with_json(checkout_attribute_form.to_json).put
635
+ ::Io::Flow::V0::Models::CheckoutAttribute.new(r)
636
+ end
637
+
638
+ def delete_by_id(organization, id)
639
+ HttpClient::Preconditions.assert_class('organization', organization, String)
640
+ HttpClient::Preconditions.assert_class('id', id, String)
641
+ r = @client.request("/#{CGI.escape(organization)}/checkout/attributes/#{CGI.escape(id)}").delete
642
+ nil
643
+ end
644
+
645
+ end
646
+
591
647
  class CheckoutItemContents
592
648
 
593
649
  def initialize(client)
@@ -1234,6 +1290,13 @@ module Io
1234
1290
  ::Io::Flow::V0::Models::Order.new(r)
1235
1291
  end
1236
1292
 
1293
+ def put_inventory_and_reservations_by_number(organization, number)
1294
+ HttpClient::Preconditions.assert_class('organization', organization, String)
1295
+ HttpClient::Preconditions.assert_class('number', number, String)
1296
+ r = @client.request("/#{CGI.escape(organization)}/orders/#{CGI.escape(number)}/inventory/reservations").put
1297
+ ::Io::Flow::V0::Models::Reservation.new(r)
1298
+ end
1299
+
1237
1300
  # Creates a free shipping promotion for this order, automatically applying it
1238
1301
  # to the order if the order meets the defined promotion trigger.
1239
1302
  def put_promotions_and_free_shipping_by_number_and_key(organization, number, key, free_shipping_order_promotion_form, incoming={})
@@ -4581,7 +4644,7 @@ module Io
4581
4644
  HttpClient::Preconditions.assert_class('organization', organization, String)
4582
4645
  HttpClient::Preconditions.assert_class('number', number, String)
4583
4646
  r = @client.request("/#{CGI.escape(organization)}/orders/#{CGI.escape(number)}/fulfillments").get
4584
- ::Io::Flow::V0::Models::Fulfillment.new(r)
4647
+ r.map { |x| ::Io::Flow::V0::Models::Fulfillment.new(x) }
4585
4648
  end
4586
4649
 
4587
4650
  def put_cancellations(organization, number, fulfillment_cancellation_form)
@@ -5840,8 +5903,6 @@ module Io
5840
5903
  RATE_UPSERTED = 'rate_upserted' unless defined?(RATE_UPSERTED)
5841
5904
  AVAILABLE_PROMOTIONS_UPSERTED = 'available_promotions_upserted' unless defined?(AVAILABLE_PROMOTIONS_UPSERTED)
5842
5905
  AVAILABLE_PROMOTIONS_DELETED = 'available_promotions_deleted' unless defined?(AVAILABLE_PROMOTIONS_DELETED)
5843
- ALLOCATION_DELETED = 'allocation_deleted' unless defined?(ALLOCATION_DELETED)
5844
- ALLOCATION_UPSERTED = 'allocation_upserted' unless defined?(ALLOCATION_UPSERTED)
5845
5906
  ALLOCATION_DELETED_V2 = 'allocation_deleted_v2' unless defined?(ALLOCATION_DELETED_V2)
5846
5907
  ALLOCATION_UPSERTED_V2 = 'allocation_upserted_v2' unless defined?(ALLOCATION_UPSERTED_V2)
5847
5908
  CURRENCY_FORMAT_DELETED = 'currency_format_deleted' unless defined?(CURRENCY_FORMAT_DELETED)
@@ -5884,6 +5945,7 @@ module Io
5884
5945
  SNAPSHOT_UPSERTED = 'snapshot_upserted' unless defined?(SNAPSHOT_UPSERTED)
5885
5946
  SNAPSHOT_DELETED = 'snapshot_deleted' unless defined?(SNAPSHOT_DELETED)
5886
5947
  LABEL_UPSERTED = 'label_upserted' unless defined?(LABEL_UPSERTED)
5948
+ LABEL_UPSERTED_V2 = 'label_upserted_v2' unless defined?(LABEL_UPSERTED_V2)
5887
5949
  NOTIFICATION_UPSERTED = 'notification_upserted' unless defined?(NOTIFICATION_UPSERTED)
5888
5950
  NOTIFICATION_DELETED = 'notification_deleted' unless defined?(NOTIFICATION_DELETED)
5889
5951
  MANIFESTED_LABEL_UPSERTED = 'manifested_label_upserted' unless defined?(MANIFESTED_LABEL_UPSERTED)
@@ -5939,7 +6001,7 @@ module Io
5939
6001
  end
5940
6002
 
5941
6003
  def subtype_to_hash
5942
- 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, allocation_upserted, 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'
6004
+ 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'
5943
6005
  end
5944
6006
 
5945
6007
  def to_hash
@@ -5969,8 +6031,6 @@ module Io
5969
6031
  when Types::RATE_UPSERTED; RateUpserted.new(hash)
5970
6032
  when Types::AVAILABLE_PROMOTIONS_UPSERTED; AvailablePromotionsUpserted.new(hash)
5971
6033
  when Types::AVAILABLE_PROMOTIONS_DELETED; AvailablePromotionsDeleted.new(hash)
5972
- when Types::ALLOCATION_DELETED; AllocationDeleted.new(hash)
5973
- when Types::ALLOCATION_UPSERTED; AllocationUpserted.new(hash)
5974
6034
  when Types::ALLOCATION_DELETED_V2; AllocationDeletedV2.new(hash)
5975
6035
  when Types::ALLOCATION_UPSERTED_V2; AllocationUpsertedV2.new(hash)
5976
6036
  when Types::CURRENCY_FORMAT_DELETED; CurrencyFormatDeleted.new(hash)
@@ -6013,6 +6073,7 @@ module Io
6013
6073
  when Types::SNAPSHOT_UPSERTED; SnapshotUpserted.new(hash)
6014
6074
  when Types::SNAPSHOT_DELETED; SnapshotDeleted.new(hash)
6015
6075
  when Types::LABEL_UPSERTED; LabelUpserted.new(hash)
6076
+ when Types::LABEL_UPSERTED_V2; LabelUpsertedV2.new(hash)
6016
6077
  when Types::NOTIFICATION_UPSERTED; NotificationUpserted.new(hash)
6017
6078
  when Types::NOTIFICATION_DELETED; NotificationDeleted.new(hash)
6018
6079
  when Types::MANIFESTED_LABEL_UPSERTED; ManifestedLabelUpserted.new(hash)
@@ -7364,6 +7425,10 @@ module Io
7364
7425
  module Types
7365
7426
  # Inventory is not available for all or subset of item quantities requested
7366
7427
  NO_INVENTORY_RESERVATION_ERROR = 'no_inventory' unless defined?(NO_INVENTORY_RESERVATION_ERROR)
7428
+ # API call to external API (ex: PFS) timed out
7429
+ EXTERNAL_API_TIMEOUT_RESERVATION_ERROR = 'external_api_timeout' unless defined?(EXTERNAL_API_TIMEOUT_RESERVATION_ERROR)
7430
+ # Generic reservation error
7431
+ GENERIC_RESERVATION_ERROR = 'generic_reservation_error' unless defined?(GENERIC_RESERVATION_ERROR)
7367
7432
  end
7368
7433
 
7369
7434
  attr_reader :code
@@ -7375,7 +7440,7 @@ module Io
7375
7440
  end
7376
7441
 
7377
7442
  def subtype_to_hash
7378
- raise 'Cannot serialize an instance of reservation_error directly - must use one of the specific types: no_inventory_reservation_error'
7443
+ raise 'Cannot serialize an instance of reservation_error directly - must use one of the specific types: no_inventory_reservation_error, external_api_timeout_reservation_error, generic_reservation_error'
7379
7444
  end
7380
7445
 
7381
7446
  def to_hash
@@ -7390,6 +7455,8 @@ module Io
7390
7455
  end
7391
7456
  case discriminator
7392
7457
  when Types::NO_INVENTORY_RESERVATION_ERROR; NoInventoryReservationError.new(hash)
7458
+ when Types::EXTERNAL_API_TIMEOUT_RESERVATION_ERROR; ExternalApiTimeoutReservationError.new(hash)
7459
+ when Types::GENERIC_RESERVATION_ERROR; GenericReservationError.new(hash)
7393
7460
  else ReservationErrorUndefinedType.new(:code => discriminator)
7394
7461
  end
7395
7462
  end
@@ -7920,7 +7987,7 @@ module Io
7920
7987
  end
7921
7988
 
7922
7989
  def AttributeIntent.ALL
7923
- @@all ||= [AttributeIntent.brand, AttributeIntent.checkout_content, AttributeIntent.fulfillment_method, AttributeIntent.hazardous, AttributeIntent.price, AttributeIntent.taxability]
7990
+ @@all ||= [AttributeIntent.brand, AttributeIntent.product_id, AttributeIntent.fulfillment_method, AttributeIntent.hazardous, AttributeIntent.price, AttributeIntent.size, AttributeIntent.sku, AttributeIntent.taxability]
7924
7991
  end
7925
7992
 
7926
7993
  # Attributes with this data type imply that this is the brand name of the item
@@ -7929,10 +7996,11 @@ module Io
7929
7996
  @@_brand ||= AttributeIntent.new('brand')
7930
7997
  end
7931
7998
 
7932
- # Checkout content attributes are included in the item content when rendered for
7933
- # the checkout context.
7934
- def AttributeIntent.checkout_content
7935
- @@_checkout_content ||= AttributeIntent.new('checkout_content')
7999
+ # Attributes with this data type imply that the value of this attribute
8000
+ # identifies the product Id which can then be used to group multiple items
8001
+ # together.
8002
+ def AttributeIntent.product_id
8003
+ @@_product_id ||= AttributeIntent.new('product_id')
7936
8004
  end
7937
8005
 
7938
8006
  # Attributes with this data type imply whether delivery is a package or digital
@@ -7953,6 +8021,18 @@ module Io
7953
8021
  @@_price ||= AttributeIntent.new('price')
7954
8022
  end
7955
8023
 
8024
+ # Attributes with this data type imply that that this is the clothing size of
8025
+ # the item.
8026
+ def AttributeIntent.size
8027
+ @@_size ||= AttributeIntent.new('size')
8028
+ end
8029
+
8030
+ # Attributes with this data type imply that this is the retailers SKU for the
8031
+ # item.
8032
+ def AttributeIntent.sku
8033
+ @@_sku ||= AttributeIntent.new('sku')
8034
+ end
8035
+
7956
8036
  # Attributes with this data type imply whether taxes are applicable to an item.
7957
8037
  def AttributeIntent.taxability
7958
8038
  @@_taxability ||= AttributeIntent.new('taxability')
@@ -9157,7 +9237,7 @@ module Io
9157
9237
  end
9158
9238
 
9159
9239
  def EventType.ALL
9160
- @@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, EventType.allocation_upserted, 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]
9240
+ @@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]
9161
9241
  end
9162
9242
 
9163
9243
  def EventType.attribute_upserted
@@ -9224,14 +9304,6 @@ module Io
9224
9304
  @@_available_promotions_deleted ||= EventType.new('available_promotions_deleted')
9225
9305
  end
9226
9306
 
9227
- def EventType.allocation_deleted
9228
- @@_allocation_deleted ||= EventType.new('allocation_deleted')
9229
- end
9230
-
9231
- def EventType.allocation_upserted
9232
- @@_allocation_upserted ||= EventType.new('allocation_upserted')
9233
- end
9234
-
9235
9307
  def EventType.allocation_deleted_v2
9236
9308
  @@_allocation_deleted_v2 ||= EventType.new('allocation_deleted_v2')
9237
9309
  end
@@ -9400,6 +9472,10 @@ module Io
9400
9472
  @@_label_upserted ||= EventType.new('label_upserted')
9401
9473
  end
9402
9474
 
9475
+ def EventType.label_upserted_v2
9476
+ @@_label_upserted_v2 ||= EventType.new('label_upserted_v2')
9477
+ end
9478
+
9403
9479
  def EventType.notification_upserted
9404
9480
  @@_notification_upserted ||= EventType.new('notification_upserted')
9405
9481
  end
@@ -10145,7 +10221,7 @@ module Io
10145
10221
  end
10146
10222
 
10147
10223
  def ImportType.ALL
10148
- @@all ||= [ImportType.harmonization_codes, ImportType.catalog_items, ImportType.customs_descriptions]
10224
+ @@all ||= [ImportType.harmonization_codes, ImportType.catalog_items, ImportType.customs_descriptions, ImportType.item_form_overlays]
10149
10225
  end
10150
10226
 
10151
10227
  # Provides upload of HS-6 and HS-10 codes for the items in a catalog
@@ -10163,6 +10239,11 @@ module Io
10163
10239
  @@_customs_descriptions ||= ImportType.new('customs_descriptions')
10164
10240
  end
10165
10241
 
10242
+ # Provides upload of item form overlays for the items in a catalog.
10243
+ def ImportType.item_form_overlays
10244
+ @@_item_form_overlays ||= ImportType.new('item_form_overlays')
10245
+ end
10246
+
10166
10247
  def to_hash
10167
10248
  value
10168
10249
  end
@@ -13494,37 +13575,6 @@ module Io
13494
13575
 
13495
13576
  end
13496
13577
 
13497
- class AllocationDeleted < Event
13498
-
13499
- attr_reader :event_id, :timestamp, :id
13500
-
13501
- def initialize(incoming={})
13502
- super(:discriminator => Event::Types::ALLOCATION_DELETED)
13503
- opts = HttpClient::Helper.symbolize_keys(incoming)
13504
- HttpClient::Preconditions.require_keys(opts, [:event_id, :timestamp, :id], 'AllocationDeleted')
13505
- @event_id = HttpClient::Preconditions.assert_class('event_id', opts.delete(:event_id), String)
13506
- @timestamp = HttpClient::Preconditions.assert_class('timestamp', HttpClient::Helper.to_date_time_iso8601(opts.delete(:timestamp)), DateTime)
13507
- @id = HttpClient::Preconditions.assert_class('id', opts.delete(:id), String)
13508
- end
13509
-
13510
- def to_json
13511
- JSON.dump(to_hash)
13512
- end
13513
-
13514
- def copy(incoming={})
13515
- AllocationDeleted.new(subtype_to_hash.merge(HttpClient::Helper.symbolize_keys(incoming)))
13516
- end
13517
-
13518
- def subtype_to_hash
13519
- {
13520
- :event_id => event_id,
13521
- :timestamp => timestamp,
13522
- :id => id
13523
- }
13524
- end
13525
-
13526
- end
13527
-
13528
13578
  class AllocationDeletedV2 < Event
13529
13579
 
13530
13580
  attr_reader :event_id, :timestamp, :organization, :id
@@ -13731,45 +13781,6 @@ module Io
13731
13781
 
13732
13782
  end
13733
13783
 
13734
- class AllocationUpserted < Event
13735
-
13736
- attr_reader :event_id, :timestamp, :id, :organization, :order_id, :order_number, :details
13737
-
13738
- def initialize(incoming={})
13739
- super(:discriminator => Event::Types::ALLOCATION_UPSERTED)
13740
- opts = HttpClient::Helper.symbolize_keys(incoming)
13741
- HttpClient::Preconditions.require_keys(opts, [:event_id, :timestamp, :id, :organization, :order_id, :order_number, :details], 'AllocationUpserted')
13742
- @event_id = HttpClient::Preconditions.assert_class('event_id', opts.delete(:event_id), String)
13743
- @timestamp = HttpClient::Preconditions.assert_class('timestamp', HttpClient::Helper.to_date_time_iso8601(opts.delete(:timestamp)), DateTime)
13744
- @id = HttpClient::Preconditions.assert_class('id', opts.delete(:id), String)
13745
- @organization = HttpClient::Preconditions.assert_class('organization', opts.delete(:organization), String)
13746
- @order_id = HttpClient::Preconditions.assert_class('order_id', opts.delete(:order_id), String)
13747
- @order_number = HttpClient::Preconditions.assert_class('order_number', opts.delete(:order_number), String)
13748
- @details = HttpClient::Preconditions.assert_class('details', opts.delete(:details), Array).map { |v| HttpClient::Preconditions.assert_class('details', HttpClient::Helper.to_object(v), Hash) }
13749
- end
13750
-
13751
- def to_json
13752
- JSON.dump(to_hash)
13753
- end
13754
-
13755
- def copy(incoming={})
13756
- AllocationUpserted.new(subtype_to_hash.merge(HttpClient::Helper.symbolize_keys(incoming)))
13757
- end
13758
-
13759
- def subtype_to_hash
13760
- {
13761
- :event_id => event_id,
13762
- :timestamp => timestamp,
13763
- :id => id,
13764
- :organization => organization,
13765
- :order_id => order_id,
13766
- :order_number => order_number,
13767
- :details => details
13768
- }
13769
- end
13770
-
13771
- end
13772
-
13773
13784
  class AllocationUpsertedV2 < Event
13774
13785
 
13775
13786
  attr_reader :event_id, :timestamp, :organization, :allocation
@@ -14978,7 +14989,7 @@ module Io
14978
14989
  # capture up to the amount of the authorization.
14979
14990
  class CardAuthorization < Authorization
14980
14991
 
14981
- attr_reader :id, :key, :card, :amount, :currency, :requested, :customer, :attributes, :destination, :order, :ip, :result, :created_at, :expires_at
14992
+ attr_reader :id, :key, :method, :card, :amount, :currency, :requested, :customer, :attributes, :destination, :order, :ip, :result, :created_at, :expires_at
14982
14993
 
14983
14994
  def initialize(incoming={})
14984
14995
  super(:discriminator => Authorization::Types::CARD_AUTHORIZATION)
@@ -14986,6 +14997,7 @@ module Io
14986
14997
  HttpClient::Preconditions.require_keys(opts, [:id, :key, :card, :amount, :currency, :customer, :attributes, :result, :created_at], 'CardAuthorization')
14987
14998
  @id = HttpClient::Preconditions.assert_class('id', opts.delete(:id), String)
14988
14999
  @key = HttpClient::Preconditions.assert_class('key', opts.delete(:key), String)
15000
+ @method = (x = opts.delete(:method); x.nil? ? nil : (x = x; x.is_a?(::Io::Flow::V0::Models::PaymentMethod) ? x : ::Io::Flow::V0::Models::PaymentMethod.new(x)))
14989
15001
  @card = (x = opts.delete(:card); x.is_a?(::Io::Flow::V0::Models::ExpandableCard) ? x : ::Io::Flow::V0::Models::ExpandableCard.from_json(x))
14990
15002
  @amount = HttpClient::Preconditions.assert_class('amount', HttpClient::Helper.to_big_decimal(opts.delete(:amount)), BigDecimal)
14991
15003
  @currency = HttpClient::Preconditions.assert_class('currency', opts.delete(:currency), String)
@@ -15012,6 +15024,7 @@ module Io
15012
15024
  {
15013
15025
  :id => id,
15014
15026
  :key => key,
15027
+ :method => method.nil? ? nil : method.to_hash,
15015
15028
  :card => card.to_hash,
15016
15029
  :amount => amount,
15017
15030
  :currency => currency,
@@ -16227,6 +16240,75 @@ module Io
16227
16240
 
16228
16241
  end
16229
16242
 
16243
+ # A Checkout Attribute defines an attribute that will be made available via the
16244
+ # checkout item content. This is useful if you would like to surface a specific
16245
+ # attribute (like 'size' or 'color') in checkout.
16246
+ class CheckoutAttribute
16247
+
16248
+ attr_reader :id, :experience, :key, :attribute_keys, :position
16249
+
16250
+ def initialize(incoming={})
16251
+ opts = HttpClient::Helper.symbolize_keys(incoming)
16252
+ HttpClient::Preconditions.require_keys(opts, [:id, :experience, :key, :attribute_keys, :position], 'CheckoutAttribute')
16253
+ @id = HttpClient::Preconditions.assert_class('id', opts.delete(:id), String)
16254
+ @experience = (x = opts.delete(:experience); x.is_a?(::Io::Flow::V0::Models::ExperienceReference) ? x : ::Io::Flow::V0::Models::ExperienceReference.new(x))
16255
+ @key = HttpClient::Preconditions.assert_class('key', opts.delete(:key), String)
16256
+ @attribute_keys = HttpClient::Preconditions.assert_class('attribute_keys', opts.delete(:attribute_keys), Array).map { |v| HttpClient::Preconditions.assert_class('attribute_keys', v, String) }
16257
+ @position = HttpClient::Preconditions.assert_class('position', opts.delete(:position), Integer)
16258
+ end
16259
+
16260
+ def to_json
16261
+ JSON.dump(to_hash)
16262
+ end
16263
+
16264
+ def copy(incoming={})
16265
+ CheckoutAttribute.new(to_hash.merge(HttpClient::Helper.symbolize_keys(incoming)))
16266
+ end
16267
+
16268
+ def to_hash
16269
+ {
16270
+ :id => id,
16271
+ :experience => experience.to_hash,
16272
+ :key => key,
16273
+ :attribute_keys => attribute_keys,
16274
+ :position => position
16275
+ }
16276
+ end
16277
+
16278
+ end
16279
+
16280
+ class CheckoutAttributeForm
16281
+
16282
+ attr_reader :key, :experience_key, :attribute_keys, :position
16283
+
16284
+ def initialize(incoming={})
16285
+ opts = HttpClient::Helper.symbolize_keys(incoming)
16286
+ HttpClient::Preconditions.require_keys(opts, [:key, :experience_key, :attribute_keys], 'CheckoutAttributeForm')
16287
+ @key = HttpClient::Preconditions.assert_class('key', opts.delete(:key), String)
16288
+ @experience_key = HttpClient::Preconditions.assert_class('experience_key', opts.delete(:experience_key), String)
16289
+ @attribute_keys = HttpClient::Preconditions.assert_class('attribute_keys', opts.delete(:attribute_keys), Array).map { |v| HttpClient::Preconditions.assert_class('attribute_keys', v, String) }
16290
+ @position = (x = opts.delete(:position); x.nil? ? nil : HttpClient::Preconditions.assert_class('position', x, Integer))
16291
+ end
16292
+
16293
+ def to_json
16294
+ JSON.dump(to_hash)
16295
+ end
16296
+
16297
+ def copy(incoming={})
16298
+ CheckoutAttributeForm.new(to_hash.merge(HttpClient::Helper.symbolize_keys(incoming)))
16299
+ end
16300
+
16301
+ def to_hash
16302
+ {
16303
+ :key => key,
16304
+ :experience_key => experience_key,
16305
+ :attribute_keys => attribute_keys,
16306
+ :position => position
16307
+ }
16308
+ end
16309
+
16310
+ end
16311
+
16230
16312
  # A Checkout Item Content provides information about an item to support
16231
16313
  # rendering of that item in the context of checkout
16232
16314
  class CheckoutItemContent
@@ -18446,6 +18528,33 @@ module Io
18446
18528
 
18447
18529
  end
18448
18530
 
18531
+ class ExternalApiTimeoutReservationError < ReservationError
18532
+
18533
+ attr_reader :messages
18534
+
18535
+ def initialize(incoming={})
18536
+ super(:code => ReservationError::Types::EXTERNAL_API_TIMEOUT_RESERVATION_ERROR)
18537
+ opts = HttpClient::Helper.symbolize_keys(incoming)
18538
+ HttpClient::Preconditions.require_keys(opts, [:messages], 'ExternalApiTimeoutReservationError')
18539
+ @messages = HttpClient::Preconditions.assert_class('messages', opts.delete(:messages), Array).map { |v| HttpClient::Preconditions.assert_class('messages', v, String) }
18540
+ end
18541
+
18542
+ def to_json
18543
+ JSON.dump(to_hash)
18544
+ end
18545
+
18546
+ def copy(incoming={})
18547
+ ExternalApiTimeoutReservationError.new(subtype_to_hash.merge(HttpClient::Helper.symbolize_keys(incoming)))
18548
+ end
18549
+
18550
+ def subtype_to_hash
18551
+ {
18552
+ :messages => messages
18553
+ }
18554
+ end
18555
+
18556
+ end
18557
+
18449
18558
  # A brief packet of statistics about a live feed. Will be blank for most new
18450
18559
  # feeds.
18451
18560
  class FeedStatisticsSummary
@@ -18815,7 +18924,7 @@ module Io
18815
18924
  # Used to track and manage the fulfillment of quantities of a sku
18816
18925
  class FulfillmentItem
18817
18926
 
18818
- attr_reader :item_number, :line_number, :quantities, :warehouse_sku
18927
+ attr_reader :item_number, :line_number, :quantities
18819
18928
 
18820
18929
  def initialize(incoming={})
18821
18930
  opts = HttpClient::Helper.symbolize_keys(incoming)
@@ -18823,7 +18932,6 @@ module Io
18823
18932
  @item_number = HttpClient::Preconditions.assert_class('item_number', opts.delete(:item_number), String)
18824
18933
  @line_number = HttpClient::Preconditions.assert_class('line_number', opts.delete(:line_number), Integer)
18825
18934
  @quantities = HttpClient::Preconditions.assert_class('quantities', opts.delete(:quantities), Array).map { |v| (x = v; x.is_a?(::Io::Flow::V0::Models::FulfillmentItemQuantity) ? x : ::Io::Flow::V0::Models::FulfillmentItemQuantity.new(x)) }
18826
- @warehouse_sku = (x = opts.delete(:warehouse_sku); x.nil? ? nil : HttpClient::Preconditions.assert_class('warehouse_sku', x, String))
18827
18935
  end
18828
18936
 
18829
18937
  def to_json
@@ -18838,8 +18946,7 @@ module Io
18838
18946
  {
18839
18947
  :item_number => item_number,
18840
18948
  :line_number => line_number,
18841
- :quantities => quantities.map { |o| o.to_hash },
18842
- :warehouse_sku => warehouse_sku
18949
+ :quantities => quantities.map { |o| o.to_hash }
18843
18950
  }
18844
18951
  end
18845
18952
 
@@ -18978,6 +19085,33 @@ module Io
18978
19085
 
18979
19086
  end
18980
19087
 
19088
+ class GenericReservationError < ReservationError
19089
+
19090
+ attr_reader :messages
19091
+
19092
+ def initialize(incoming={})
19093
+ super(:code => ReservationError::Types::GENERIC_RESERVATION_ERROR)
19094
+ opts = HttpClient::Helper.symbolize_keys(incoming)
19095
+ HttpClient::Preconditions.require_keys(opts, [:messages], 'GenericReservationError')
19096
+ @messages = HttpClient::Preconditions.assert_class('messages', opts.delete(:messages), Array).map { |v| HttpClient::Preconditions.assert_class('messages', v, String) }
19097
+ end
19098
+
19099
+ def to_json
19100
+ JSON.dump(to_hash)
19101
+ end
19102
+
19103
+ def copy(incoming={})
19104
+ GenericReservationError.new(subtype_to_hash.merge(HttpClient::Helper.symbolize_keys(incoming)))
19105
+ end
19106
+
19107
+ def subtype_to_hash
19108
+ {
19109
+ :messages => messages
19110
+ }
19111
+ end
19112
+
19113
+ end
19114
+
18981
19115
  class HarmonizationDocument < Document
18982
19116
 
18983
19117
  attr_reader :code, :categories, :origin
@@ -20147,14 +20281,15 @@ module Io
20147
20281
  # format to expect and what data to update
20148
20282
  class Import
20149
20283
 
20150
- attr_reader :id, :type, :source_url, :status, :created_at, :started_at, :completed_at, :results, :deliveries
20284
+ attr_reader :id, :type, :source_url, :filename, :status, :created_at, :started_at, :completed_at, :results, :deliveries
20151
20285
 
20152
20286
  def initialize(incoming={})
20153
20287
  opts = HttpClient::Helper.symbolize_keys(incoming)
20154
- HttpClient::Preconditions.require_keys(opts, [:id, :type, :source_url, :status, :created_at, :deliveries], 'Import')
20288
+ HttpClient::Preconditions.require_keys(opts, [:id, :type, :source_url, :filename, :status, :created_at, :deliveries], 'Import')
20155
20289
  @id = HttpClient::Preconditions.assert_class('id', opts.delete(:id), String)
20156
20290
  @type = (x = opts.delete(:type); x.is_a?(::Io::Flow::V0::Models::ImportType) ? x : ::Io::Flow::V0::Models::ImportType.apply(x))
20157
20291
  @source_url = HttpClient::Preconditions.assert_class('source_url', opts.delete(:source_url), String)
20292
+ @filename = HttpClient::Preconditions.assert_class('filename', opts.delete(:filename), String)
20158
20293
  @status = (x = opts.delete(:status); x.is_a?(::Io::Flow::V0::Models::ExportStatus) ? x : ::Io::Flow::V0::Models::ExportStatus.apply(x))
20159
20294
  @created_at = HttpClient::Preconditions.assert_class('created_at', HttpClient::Helper.to_date_time_iso8601(opts.delete(:created_at)), DateTime)
20160
20295
  @started_at = (x = opts.delete(:started_at); x.nil? ? nil : HttpClient::Preconditions.assert_class('started_at', HttpClient::Helper.to_date_time_iso8601(x), DateTime))
@@ -20176,6 +20311,7 @@ module Io
20176
20311
  :id => id,
20177
20312
  :type => type.value,
20178
20313
  :source_url => source_url,
20314
+ :filename => filename,
20179
20315
  :status => status.value,
20180
20316
  :created_at => created_at,
20181
20317
  :started_at => started_at,
@@ -20193,13 +20329,14 @@ module Io
20193
20329
  # file via the Flow API - see the resource named 'Upload'
20194
20330
  class ImportForm
20195
20331
 
20196
- attr_reader :type, :source_url, :emails
20332
+ attr_reader :type, :source_url, :filename, :emails
20197
20333
 
20198
20334
  def initialize(incoming={})
20199
20335
  opts = HttpClient::Helper.symbolize_keys(incoming)
20200
20336
  HttpClient::Preconditions.require_keys(opts, [:type, :source_url], 'ImportForm')
20201
20337
  @type = (x = opts.delete(:type); x.is_a?(::Io::Flow::V0::Models::ImportType) ? x : ::Io::Flow::V0::Models::ImportType.apply(x))
20202
20338
  @source_url = HttpClient::Preconditions.assert_class('source_url', opts.delete(:source_url), String)
20339
+ @filename = (x = opts.delete(:filename); x.nil? ? nil : HttpClient::Preconditions.assert_class('filename', x, String))
20203
20340
  @emails = (x = opts.delete(:emails); x.nil? ? nil : HttpClient::Preconditions.assert_class('emails', x, Array).map { |v| HttpClient::Preconditions.assert_class('emails', v, String) })
20204
20341
  end
20205
20342
 
@@ -20215,6 +20352,7 @@ module Io
20215
20352
  {
20216
20353
  :type => type.value,
20217
20354
  :source_url => source_url,
20355
+ :filename => filename,
20218
20356
  :emails => emails.nil? ? nil : emails
20219
20357
  }
20220
20358
  end
@@ -21098,6 +21236,85 @@ module Io
21098
21236
 
21099
21237
  end
21100
21238
 
21239
+ # The item form overlay defines data to merge into an item form.
21240
+ class ItemFormOverlay
21241
+
21242
+ attr_reader :id, :number, :position, :categories, :description, :attributes, :dimensions, :images
21243
+
21244
+ def initialize(incoming={})
21245
+ opts = HttpClient::Helper.symbolize_keys(incoming)
21246
+ HttpClient::Preconditions.require_keys(opts, [:id, :number, :position], 'ItemFormOverlay')
21247
+ @id = HttpClient::Preconditions.assert_class('id', opts.delete(:id), String)
21248
+ @number = HttpClient::Preconditions.assert_class('number', opts.delete(:number), String)
21249
+ @position = HttpClient::Preconditions.assert_class('position', opts.delete(:position), Integer)
21250
+ @categories = (x = opts.delete(:categories); x.nil? ? nil : HttpClient::Preconditions.assert_class('categories', x, Array).map { |v| HttpClient::Preconditions.assert_class('categories', v, String) })
21251
+ @description = (x = opts.delete(:description); x.nil? ? nil : HttpClient::Preconditions.assert_class('description', x, String))
21252
+ @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 })
21253
+ @dimensions = (x = opts.delete(:dimensions); x.nil? ? nil : (x = x; x.is_a?(::Io::Flow::V0::Models::Dimensions) ? x : ::Io::Flow::V0::Models::Dimensions.new(x)))
21254
+ @images = (x = opts.delete(:images); x.nil? ? nil : HttpClient::Preconditions.assert_class('images', x, Array).map { |v| (x = v; x.is_a?(::Io::Flow::V0::Models::ImageForm) ? x : ::Io::Flow::V0::Models::ImageForm.new(x)) })
21255
+ end
21256
+
21257
+ def to_json
21258
+ JSON.dump(to_hash)
21259
+ end
21260
+
21261
+ def copy(incoming={})
21262
+ ItemFormOverlay.new(to_hash.merge(HttpClient::Helper.symbolize_keys(incoming)))
21263
+ end
21264
+
21265
+ def to_hash
21266
+ {
21267
+ :id => id,
21268
+ :number => number,
21269
+ :position => position,
21270
+ :categories => categories.nil? ? nil : categories,
21271
+ :description => description,
21272
+ :attributes => attributes.nil? ? nil : attributes,
21273
+ :dimensions => dimensions.nil? ? nil : dimensions.to_hash,
21274
+ :images => images.nil? ? nil : images.map { |o| o.to_hash }
21275
+ }
21276
+ end
21277
+
21278
+ end
21279
+
21280
+ class ItemFormOverlayForm
21281
+
21282
+ attr_reader :number, :position, :categories, :description, :attributes, :dimensions, :images
21283
+
21284
+ def initialize(incoming={})
21285
+ opts = HttpClient::Helper.symbolize_keys(incoming)
21286
+ HttpClient::Preconditions.require_keys(opts, [:number], 'ItemFormOverlayForm')
21287
+ @number = HttpClient::Preconditions.assert_class('number', opts.delete(:number), String)
21288
+ @position = (x = opts.delete(:position); x.nil? ? nil : HttpClient::Preconditions.assert_class('position', x, Integer))
21289
+ @categories = (x = opts.delete(:categories); x.nil? ? nil : HttpClient::Preconditions.assert_class('categories', x, Array).map { |v| HttpClient::Preconditions.assert_class('categories', v, String) })
21290
+ @description = (x = opts.delete(:description); x.nil? ? nil : HttpClient::Preconditions.assert_class('description', x, String))
21291
+ @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 })
21292
+ @dimensions = (x = opts.delete(:dimensions); x.nil? ? nil : (x = x; x.is_a?(::Io::Flow::V0::Models::Dimensions) ? x : ::Io::Flow::V0::Models::Dimensions.new(x)))
21293
+ @images = (x = opts.delete(:images); x.nil? ? nil : HttpClient::Preconditions.assert_class('images', x, Array).map { |v| (x = v; x.is_a?(::Io::Flow::V0::Models::ImageForm) ? x : ::Io::Flow::V0::Models::ImageForm.new(x)) })
21294
+ end
21295
+
21296
+ def to_json
21297
+ JSON.dump(to_hash)
21298
+ end
21299
+
21300
+ def copy(incoming={})
21301
+ ItemFormOverlayForm.new(to_hash.merge(HttpClient::Helper.symbolize_keys(incoming)))
21302
+ end
21303
+
21304
+ def to_hash
21305
+ {
21306
+ :number => number,
21307
+ :position => position,
21308
+ :categories => categories.nil? ? nil : categories,
21309
+ :description => description,
21310
+ :attributes => attributes.nil? ? nil : attributes,
21311
+ :dimensions => dimensions.nil? ? nil : dimensions.to_hash,
21312
+ :images => images.nil? ? nil : images.map { |o| o.to_hash }
21313
+ }
21314
+ end
21315
+
21316
+ end
21317
+
21101
21318
  # Item Functions are javascript code used to calculate the localized price of an
21102
21319
  # additional item. Each function can be associated with an optional query
21103
21320
  # identifying the products to which the function applies. Flow selects the first
@@ -21966,6 +22183,71 @@ module Io
21966
22183
 
21967
22184
  end
21968
22185
 
22186
+ class LabelUpsertedV2 < Event
22187
+
22188
+ 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_
22189
+
22190
+ def initialize(incoming={})
22191
+ super(:discriminator => Event::Types::LABEL_UPSERTED_V2)
22192
+ opts = HttpClient::Helper.symbolize_keys(incoming)
22193
+ HttpClient::Preconditions.require_keys(opts, [:event_id, :timestamp, :organization, :label_id, :carrier_tracking_number, :flow_tracking_number, :destination, :origin, :carrier, :service], 'LabelUpsertedV2')
22194
+ @event_id = HttpClient::Preconditions.assert_class('event_id', opts.delete(:event_id), String)
22195
+ @timestamp = HttpClient::Preconditions.assert_class('timestamp', HttpClient::Helper.to_date_time_iso8601(opts.delete(:timestamp)), DateTime)
22196
+ @organization = HttpClient::Preconditions.assert_class('organization', opts.delete(:organization), String)
22197
+ @label_id = HttpClient::Preconditions.assert_class('label_id', opts.delete(:label_id), String)
22198
+ @carrier_tracking_number = HttpClient::Preconditions.assert_class('carrier_tracking_number', opts.delete(:carrier_tracking_number), String)
22199
+ @flow_tracking_number = HttpClient::Preconditions.assert_class('flow_tracking_number', opts.delete(:flow_tracking_number), String)
22200
+ @destination = HttpClient::Preconditions.assert_class('destination', HttpClient::Helper.to_object(opts.delete(:destination)), Hash)
22201
+ @origin = HttpClient::Preconditions.assert_class('origin', HttpClient::Helper.to_object(opts.delete(:origin)), Hash)
22202
+ @carrier = HttpClient::Preconditions.assert_class('carrier', opts.delete(:carrier), String)
22203
+ @service = HttpClient::Preconditions.assert_class('service', opts.delete(:service), String)
22204
+ @order = (x = opts.delete(:order); x.nil? ? nil : HttpClient::Preconditions.assert_class('order', x, String))
22205
+ @carrier_tracking_number_url = (x = opts.delete(:carrier_tracking_number_url); x.nil? ? nil : HttpClient::Preconditions.assert_class('carrier_tracking_number_url', x, String))
22206
+ @flow_tracking_number_url = (x = opts.delete(:flow_tracking_number_url); x.nil? ? nil : HttpClient::Preconditions.assert_class('flow_tracking_number_url', x, String))
22207
+ @center_key = (x = opts.delete(:center_key); x.nil? ? nil : HttpClient::Preconditions.assert_class('center_key', x, String))
22208
+ @direction = (x = opts.delete(:direction); x.nil? ? nil : HttpClient::Preconditions.assert_class('direction', x, String))
22209
+ @package = (x = opts.delete(:package); x.nil? ? nil : HttpClient::Preconditions.assert_class('package', HttpClient::Helper.to_object(x), Hash))
22210
+ @order_identifier = (x = opts.delete(:order_identifier); x.nil? ? nil : HttpClient::Preconditions.assert_class('order_identifier', x, String))
22211
+ @fulfillment_key = (x = opts.delete(:fulfillment_key); x.nil? ? nil : HttpClient::Preconditions.assert_class('fulfillment_key', x, String))
22212
+ @label = (x = opts.delete(:label); x.nil? ? nil : HttpClient::Preconditions.assert_class('label', HttpClient::Helper.to_object(x), Hash))
22213
+ @return_ = (x = opts.delete(:return); x.nil? ? nil : HttpClient::Preconditions.assert_class('return', HttpClient::Helper.to_object(x), Hash))
22214
+ end
22215
+
22216
+ def to_json
22217
+ JSON.dump(to_hash)
22218
+ end
22219
+
22220
+ def copy(incoming={})
22221
+ LabelUpsertedV2.new(subtype_to_hash.merge(HttpClient::Helper.symbolize_keys(incoming)))
22222
+ end
22223
+
22224
+ def subtype_to_hash
22225
+ {
22226
+ :event_id => event_id,
22227
+ :timestamp => timestamp,
22228
+ :organization => organization,
22229
+ :label_id => label_id,
22230
+ :carrier_tracking_number => carrier_tracking_number,
22231
+ :flow_tracking_number => flow_tracking_number,
22232
+ :destination => destination,
22233
+ :origin => origin,
22234
+ :carrier => carrier,
22235
+ :service => service,
22236
+ :order => order,
22237
+ :carrier_tracking_number_url => carrier_tracking_number_url,
22238
+ :flow_tracking_number_url => flow_tracking_number_url,
22239
+ :center_key => center_key,
22240
+ :direction => direction,
22241
+ :package => package,
22242
+ :order_identifier => order_identifier,
22243
+ :fulfillment_key => fulfillment_key,
22244
+ :label => label,
22245
+ :return => return_
22246
+ }
22247
+ end
22248
+
22249
+ end
22250
+
21969
22251
  # The tariff codes, duty rates and tax rates associated with an
21970
22252
  # origin/destination pair. Does not take into account sales province
21971
22253
  class LaneLandedCost
@@ -29593,7 +29875,7 @@ module Io
29593
29875
  # shipper to transport a package from a given origin to destination
29594
29876
  class ShippingLabel
29595
29877
 
29596
- 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, :order, :package, :commercial_invoice, :zpl, :pdf, :png, :order_identifier, :fulfillment_key
29878
+ 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
29597
29879
 
29598
29880
  def initialize(incoming={})
29599
29881
  opts = HttpClient::Helper.symbolize_keys(incoming)
@@ -29612,12 +29894,9 @@ module Io
29612
29894
  @window = (x = opts.delete(:window); x.is_a?(::Io::Flow::V0::Models::DatetimeRange) ? x : ::Io::Flow::V0::Models::DatetimeRange.new(x))
29613
29895
  @label = (x = opts.delete(:label); x.nil? ? nil : (x = x; x.is_a?(::Io::Flow::V0::Models::ShippingLabelDocument) ? x : ::Io::Flow::V0::Models::ShippingLabelDocument.new(x)))
29614
29896
  @invoice = (x = opts.delete(:invoice); x.nil? ? nil : (x = x; x.is_a?(::Io::Flow::V0::Models::ShippingLabelDocument) ? x : ::Io::Flow::V0::Models::ShippingLabelDocument.new(x)))
29897
+ @return_ = (x = opts.delete(:return); x.nil? ? nil : (x = x; x.is_a?(::Io::Flow::V0::Models::ShippingLabelDocument) ? x : ::Io::Flow::V0::Models::ShippingLabelDocument.new(x)))
29615
29898
  @order = (x = opts.delete(:order); x.nil? ? nil : (x = x; x.is_a?(::Io::Flow::V0::Models::LabelOrderSummary) ? x : ::Io::Flow::V0::Models::LabelOrderSummary.new(x)))
29616
29899
  @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)))
29617
- @commercial_invoice = (x = opts.delete(:commercial_invoice); x.nil? ? nil : HttpClient::Preconditions.assert_class('commercial_invoice', x, String))
29618
- @zpl = (x = opts.delete(:zpl); x.nil? ? nil : HttpClient::Preconditions.assert_class('zpl', x, String))
29619
- @pdf = (x = opts.delete(:pdf); x.nil? ? nil : HttpClient::Preconditions.assert_class('pdf', x, String))
29620
- @png = (x = opts.delete(:png); x.nil? ? nil : HttpClient::Preconditions.assert_class('png', x, String))
29621
29900
  @order_identifier = (x = opts.delete(:order_identifier); x.nil? ? nil : HttpClient::Preconditions.assert_class('order_identifier', x, String))
29622
29901
  @fulfillment_key = (x = opts.delete(:fulfillment_key); x.nil? ? nil : HttpClient::Preconditions.assert_class('fulfillment_key', x, String))
29623
29902
  end
@@ -29646,12 +29925,9 @@ module Io
29646
29925
  :window => window.to_hash,
29647
29926
  :label => label.nil? ? nil : label.to_hash,
29648
29927
  :invoice => invoice.nil? ? nil : invoice.to_hash,
29928
+ :return => return_.nil? ? nil : return_.to_hash,
29649
29929
  :order => order.nil? ? nil : order.to_hash,
29650
29930
  :package => package.nil? ? nil : package.to_hash,
29651
- :commercial_invoice => commercial_invoice,
29652
- :zpl => zpl,
29653
- :pdf => pdf,
29654
- :png => png,
29655
29931
  :order_identifier => order_identifier,
29656
29932
  :fulfillment_key => fulfillment_key
29657
29933
  }
@@ -29663,13 +29939,14 @@ module Io
29663
29939
  # or commercial invoices
29664
29940
  class ShippingLabelDocument
29665
29941
 
29666
- attr_reader :zpl, :pdf, :png
29942
+ attr_reader :zpl, :pdf, :png, :html
29667
29943
 
29668
29944
  def initialize(incoming={})
29669
29945
  opts = HttpClient::Helper.symbolize_keys(incoming)
29670
29946
  @zpl = (x = opts.delete(:zpl); x.nil? ? nil : HttpClient::Preconditions.assert_class('zpl', x, String))
29671
29947
  @pdf = (x = opts.delete(:pdf); x.nil? ? nil : HttpClient::Preconditions.assert_class('pdf', x, String))
29672
29948
  @png = (x = opts.delete(:png); x.nil? ? nil : HttpClient::Preconditions.assert_class('png', x, String))
29949
+ @html = (x = opts.delete(:html); x.nil? ? nil : HttpClient::Preconditions.assert_class('html', x, String))
29673
29950
  end
29674
29951
 
29675
29952
  def to_json
@@ -29684,7 +29961,8 @@ module Io
29684
29961
  {
29685
29962
  :zpl => zpl,
29686
29963
  :pdf => pdf,
29687
- :png => png
29964
+ :png => png,
29965
+ :html => html
29688
29966
  }
29689
29967
  end
29690
29968
 
@@ -31368,7 +31646,7 @@ module Io
31368
31646
 
31369
31647
  class TierUpserted < Event
31370
31648
 
31371
- attr_reader :event_id, :timestamp, :organization, :id, :experience_key, :integration, :name, :rules, :services, :strategy, :visibility, :currency, :description
31649
+ attr_reader :event_id, :timestamp, :organization, :id, :experience_key, :integration, :name, :rules, :services, :strategy, :visibility, :currency, :description, :direction
31372
31650
 
31373
31651
  def initialize(incoming={})
31374
31652
  super(:discriminator => Event::Types::TIER_UPSERTED)
@@ -31387,6 +31665,7 @@ module Io
31387
31665
  @visibility = HttpClient::Preconditions.assert_class('visibility', opts.delete(:visibility), String)
31388
31666
  @currency = (x = opts.delete(:currency); x.nil? ? nil : HttpClient::Preconditions.assert_class('currency', x, String))
31389
31667
  @description = (x = opts.delete(:description); x.nil? ? nil : HttpClient::Preconditions.assert_class('description', x, String))
31668
+ @direction = (x = opts.delete(:direction); x.nil? ? nil : HttpClient::Preconditions.assert_class('direction', x, String))
31390
31669
  end
31391
31670
 
31392
31671
  def to_json
@@ -31411,7 +31690,8 @@ module Io
31411
31690
  :strategy => strategy,
31412
31691
  :visibility => visibility,
31413
31692
  :currency => currency,
31414
- :description => description
31693
+ :description => description,
31694
+ :direction => direction
31415
31695
  }
31416
31696
  end
31417
31697
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: flowcommerce
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.52
4
+ version: 0.2.53
5
5
  platform: ruby
6
6
  authors:
7
7
  - Flow Commerce, Inc.
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-12-31 00:00:00.000000000 Z
11
+ date: 2018-01-29 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: json