flowcommerce 0.2.62 → 0.2.63

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: 5468d844c3c5141d7c7f88ef8c3c6d61e9d8f0ae
4
- data.tar.gz: ef05dd7a66b7e4db08f85216f0ee59da72472e80
3
+ metadata.gz: 18702d01a7a78baae688b340f68363b824cf7831
4
+ data.tar.gz: 8044fab9fb8c4c1531354a2899b75e20a2615a72
5
5
  SHA512:
6
- metadata.gz: 504bae8450758d412c3bf19e7ae6a46e2d261eb34db05f873d81faaec18846284ee13bb0365143405cc2f7aaea0d4932cc084d4c00f98ed842a94af57f38e80a
7
- data.tar.gz: 66e0e46eefc05689f9e7ca20863008c2dc0aaccce61d66a9c8221b1379c8dea6a21536a9835eb2e23cd7424582f6232afb084b278291e460a4fadc20fc961b63
6
+ metadata.gz: 8ec707d551cde0619154c03f84cf751ee97eef6d89c4048c32ad98b2b5e98a8adc89f7d5f2116a2710cd30162da651bf3073b8b3cef4ec6906a6729311dc0402
7
+ data.tar.gz: dfca66dd0db327c1fc49684610babdc0c0e6fa1a286b676b25d02bf65597b7484a3b5edccdbbb6ae3c172f957cb958f22aa20515f49e777670828996ade59f72
@@ -1,6 +1,6 @@
1
1
  # Generated by API Builder - https://www.apibuilder.io
2
- # Service version: 0.5.32
3
- # apibuilder 0.14.3 app.apibuilder.io/flow/api/0.5.33/ruby_client
2
+ # Service version: 0.5.41
3
+ # apibuilder 0.14.3 app.apibuilder.io/flow/api/0.5.41/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.14.3 app.apibuilder.io/flow/api/0.5.33/ruby_client' unless defined?(Constants::USER_AGENT)
29
- VERSION = '0.5.32' unless defined?(Constants::VERSION)
28
+ USER_AGENT = 'apibuilder 0.14.3 app.apibuilder.io/flow/api/0.5.41/ruby_client' unless defined?(Constants::USER_AGENT)
29
+ VERSION = '0.5.41' unless defined?(Constants::VERSION)
30
30
  VERSION_MAJOR = 0 unless defined?(VERSION_MAJOR)
31
31
 
32
32
  end
@@ -1641,7 +1641,8 @@ module Io
1641
1641
  opts = HttpClient::Helper.symbolize_keys(incoming)
1642
1642
  query = {
1643
1643
  :ip => (x = opts.delete(:ip); x.nil? ? nil : HttpClient::Preconditions.assert_class('ip', x, String)),
1644
- :country => (x = opts.delete(:country); x.nil? ? nil : HttpClient::Preconditions.assert_class('country', x, String))
1644
+ :country => (x = opts.delete(:country); x.nil? ? nil : HttpClient::Preconditions.assert_class('country', x, String)),
1645
+ :status => HttpClient::Preconditions.assert_class('status', (x = opts.delete(:status); x.nil? ? [] : x), Array).map { |v| (x = v; x.is_a?(::Io::Flow::V0::Models::ExperienceStatus) ? x : ::Io::Flow::V0::Models::ExperienceStatus.apply(x)).value }
1645
1646
  }.delete_if { |k, v| v.nil? }
1646
1647
  r = @client.request("/#{CGI.escape(organization)}/countries").with_query(query).get
1647
1648
  r.map { |x| ::Io::Flow::V0::Models::Country.new(x) }
@@ -3888,7 +3889,7 @@ module Io
3888
3889
 
3889
3890
  def post(organization, shipping_notification_form)
3890
3891
  HttpClient::Preconditions.assert_class('organization', organization, String)
3891
- (x = shipping_notification_form; x.is_a?(::Io::Flow::V0::Models::ShippingNotificationForm) ? x : ::Io::Flow::V0::Models::ShippingNotificationForm.new(x))
3892
+ (x = shipping_notification_form; x.is_a?(::Io::Flow::V0::Models::ShippingNotificationForm) ? x : ::Io::Flow::V0::Models::ShippingNotificationForm.from_json(x))
3892
3893
  r = @client.request("/#{CGI.escape(organization)}/shipping-notifications").with_json(shipping_notification_form.to_json).post
3893
3894
  ::Io::Flow::V0::Models::ShippingNotification.new(r)
3894
3895
  end
@@ -3914,11 +3915,11 @@ module Io
3914
3915
  ::Io::Flow::V0::Models::ShippingNotification.new(r)
3915
3916
  end
3916
3917
 
3917
- def put_by_key(organization, key, shipping_notification_form)
3918
+ def put_by_key(organization, key, detailed_shipping_notification_form)
3918
3919
  HttpClient::Preconditions.assert_class('organization', organization, String)
3919
3920
  HttpClient::Preconditions.assert_class('key', key, String)
3920
- (x = shipping_notification_form; x.is_a?(::Io::Flow::V0::Models::ShippingNotificationForm) ? x : ::Io::Flow::V0::Models::ShippingNotificationForm.new(x))
3921
- r = @client.request("/#{CGI.escape(organization)}/shipping-notifications/#{CGI.escape(key)}").with_json(shipping_notification_form.to_json).put
3921
+ (x = detailed_shipping_notification_form; x.is_a?(::Io::Flow::V0::Models::DetailedShippingNotificationForm) ? x : ::Io::Flow::V0::Models::DetailedShippingNotificationForm.new(x))
3922
+ r = @client.request("/#{CGI.escape(organization)}/shipping-notifications/#{CGI.escape(key)}").with_json(detailed_shipping_notification_form.to_json).put
3922
3923
  ::Io::Flow::V0::Models::ShippingNotification.new(r)
3923
3924
  end
3924
3925
 
@@ -5746,6 +5747,9 @@ module Io
5746
5747
  # Enables authorizations via redirect-based alternative payment methods, such as
5747
5748
  # AliPay.
5748
5749
  REDIRECT_AUTHORIZATION_FORM = 'redirect_authorization_form' unless defined?(REDIRECT_AUTHORIZATION_FORM)
5750
+ # Enables authorizations via inline widget alternative payment methods, such as
5751
+ # Klarna.
5752
+ INLINE_AUTHORIZATION_FORM = 'inline_authorization_form' unless defined?(INLINE_AUTHORIZATION_FORM)
5749
5753
  # Enables authorizations for a credit card; will eventually replace direct and
5750
5754
  # merchant of record authorization forms.
5751
5755
  CARD_AUTHORIZATION_FORM = 'card_authorization_form' unless defined?(CARD_AUTHORIZATION_FORM)
@@ -5760,7 +5764,7 @@ module Io
5760
5764
  end
5761
5765
 
5762
5766
  def subtype_to_hash
5763
- raise 'Cannot serialize an instance of authorization_form directly - must use one of the specific types: authorization_copy_form, direct_authorization_form, merchant_of_record_authorization_form, paypal_authorization_form, redirect_authorization_form, card_authorization_form'
5767
+ raise 'Cannot serialize an instance of authorization_form directly - must use one of the specific types: authorization_copy_form, direct_authorization_form, merchant_of_record_authorization_form, paypal_authorization_form, redirect_authorization_form, inline_authorization_form, card_authorization_form'
5764
5768
  end
5765
5769
 
5766
5770
  def to_hash
@@ -5779,6 +5783,7 @@ module Io
5779
5783
  when Types::MERCHANT_OF_RECORD_AUTHORIZATION_FORM; MerchantOfRecordAuthorizationForm.new(hash)
5780
5784
  when Types::PAYPAL_AUTHORIZATION_FORM; PaypalAuthorizationForm.new(hash)
5781
5785
  when Types::REDIRECT_AUTHORIZATION_FORM; RedirectAuthorizationForm.new(hash)
5786
+ when Types::INLINE_AUTHORIZATION_FORM; InlineAuthorizationForm.new(hash)
5782
5787
  when Types::CARD_AUTHORIZATION_FORM; CardAuthorizationForm.new(hash)
5783
5788
  else AuthorizationFormUndefinedType.new(:discriminator => discriminator)
5784
5789
  end
@@ -6164,6 +6169,10 @@ module Io
6164
6169
  REFUND_UPSERTED_V2 = 'refund_upserted_v2' unless defined?(REFUND_UPSERTED_V2)
6165
6170
  REFUND_CAPTURE_UPSERTED_V2 = 'refund_capture_upserted_v2' unless defined?(REFUND_CAPTURE_UPSERTED_V2)
6166
6171
  REVERSAL_UPSERTED = 'reversal_upserted' unless defined?(REVERSAL_UPSERTED)
6172
+ VIRTUAL_CARD_CAPTURE_UPSERTED = 'virtual_card_capture_upserted' unless defined?(VIRTUAL_CARD_CAPTURE_UPSERTED)
6173
+ VIRTUAL_CARD_CAPTURE_DELETED = 'virtual_card_capture_deleted' unless defined?(VIRTUAL_CARD_CAPTURE_DELETED)
6174
+ VIRTUAL_CARD_REFUND_UPSERTED = 'virtual_card_refund_upserted' unless defined?(VIRTUAL_CARD_REFUND_UPSERTED)
6175
+ VIRTUAL_CARD_REFUND_DELETED = 'virtual_card_refund_deleted' unless defined?(VIRTUAL_CARD_REFUND_DELETED)
6167
6176
  PRICE_BOOK_UPSERTED = 'price_book_upserted' unless defined?(PRICE_BOOK_UPSERTED)
6168
6177
  PRICE_BOOK_DELETED = 'price_book_deleted' unless defined?(PRICE_BOOK_DELETED)
6169
6178
  PRICE_BOOK_ITEM_UPSERTED = 'price_book_item_upserted' unless defined?(PRICE_BOOK_ITEM_UPSERTED)
@@ -6187,7 +6196,7 @@ module Io
6187
6196
  end
6188
6197
 
6189
6198
  def subtype_to_hash
6190
- 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, serial_upserted, serial_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'
6199
+ 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, serial_upserted, serial_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, virtual_card_capture_upserted, virtual_card_capture_deleted, virtual_card_refund_upserted, virtual_card_refund_deleted, 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'
6191
6200
  end
6192
6201
 
6193
6202
  def to_hash
@@ -6291,6 +6300,10 @@ module Io
6291
6300
  when Types::REFUND_UPSERTED_V2; RefundUpsertedV2.new(hash)
6292
6301
  when Types::REFUND_CAPTURE_UPSERTED_V2; RefundCaptureUpsertedV2.new(hash)
6293
6302
  when Types::REVERSAL_UPSERTED; ReversalUpserted.new(hash)
6303
+ when Types::VIRTUAL_CARD_CAPTURE_UPSERTED; VirtualCardCaptureUpserted.new(hash)
6304
+ when Types::VIRTUAL_CARD_CAPTURE_DELETED; VirtualCardCaptureDeleted.new(hash)
6305
+ when Types::VIRTUAL_CARD_REFUND_UPSERTED; VirtualCardRefundUpserted.new(hash)
6306
+ when Types::VIRTUAL_CARD_REFUND_DELETED; VirtualCardRefundDeleted.new(hash)
6294
6307
  when Types::PRICE_BOOK_UPSERTED; PriceBookUpserted.new(hash)
6295
6308
  when Types::PRICE_BOOK_DELETED; PriceBookDeleted.new(hash)
6296
6309
  when Types::PRICE_BOOK_ITEM_UPSERTED; PriceBookItemUpserted.new(hash)
@@ -7188,6 +7201,7 @@ module Io
7188
7201
  module Types
7189
7202
  PAYPAL_AUTHORIZATION_DETAILS = 'paypal_authorization_details' unless defined?(PAYPAL_AUTHORIZATION_DETAILS)
7190
7203
  REDIRECT_AUTHORIZATION_DETAILS = 'redirect_authorization_details' unless defined?(REDIRECT_AUTHORIZATION_DETAILS)
7204
+ INLINE_AUTHORIZATION_DETAILS = 'inline_authorization_details' unless defined?(INLINE_AUTHORIZATION_DETAILS)
7191
7205
  end
7192
7206
 
7193
7207
  attr_reader :discriminator
@@ -7199,7 +7213,7 @@ module Io
7199
7213
  end
7200
7214
 
7201
7215
  def subtype_to_hash
7202
- raise 'Cannot serialize an instance of online_authorization_details directly - must use one of the specific types: paypal_authorization_details, redirect_authorization_details'
7216
+ raise 'Cannot serialize an instance of online_authorization_details directly - must use one of the specific types: paypal_authorization_details, redirect_authorization_details, inline_authorization_details'
7203
7217
  end
7204
7218
 
7205
7219
  def to_hash
@@ -7215,6 +7229,7 @@ module Io
7215
7229
  case discriminator
7216
7230
  when Types::PAYPAL_AUTHORIZATION_DETAILS; PaypalAuthorizationDetails.new(hash)
7217
7231
  when Types::REDIRECT_AUTHORIZATION_DETAILS; RedirectAuthorizationDetails.new(hash)
7232
+ when Types::INLINE_AUTHORIZATION_DETAILS; InlineAuthorizationDetails.new(hash)
7218
7233
  else OnlineAuthorizationDetailsUndefinedType.new(:discriminator => discriminator)
7219
7234
  end
7220
7235
  end
@@ -7861,6 +7876,71 @@ module Io
7861
7876
 
7862
7877
  end
7863
7878
 
7879
+ # Form for information about a client-facilitated shipment where the shipping
7880
+ # label and fulfillment was not handled by Flow. For merchant-of-record and
7881
+ # tracking purposes, clients doing their own shipping will need to notify Flow
7882
+ # of shipped packages.
7883
+ class ShippingNotificationForm
7884
+
7885
+ module Types
7886
+ DETAILED_SHIPPING_NOTIFICATION_FORM = 'detailed_shipping_notification_form' unless defined?(DETAILED_SHIPPING_NOTIFICATION_FORM)
7887
+ SINGLE_PACKAGE_SHIPPING_NOTIFICATION_FORM = 'single_package_shipping_notification_form' unless defined?(SINGLE_PACKAGE_SHIPPING_NOTIFICATION_FORM)
7888
+ end
7889
+
7890
+ attr_reader :discriminator
7891
+
7892
+ def initialize(incoming={})
7893
+ opts = HttpClient::Helper.symbolize_keys(incoming)
7894
+ @discriminator = HttpClient::Preconditions.assert_class('discriminator', opts.delete(:discriminator) || 'detailed_shipping_notification_form', String)
7895
+ end
7896
+
7897
+ def subtype_to_hash
7898
+ raise 'Cannot serialize an instance of shipping_notification_form directly - must use one of the specific types: detailed_shipping_notification_form, single_package_shipping_notification_form'
7899
+ end
7900
+
7901
+ def to_hash
7902
+ subtype_to_hash.merge(:discriminator => @discriminator)
7903
+ end
7904
+
7905
+ def ShippingNotificationForm.from_json(hash)
7906
+ HttpClient::Preconditions.assert_class('hash', hash, Hash)
7907
+ discriminator = HttpClient::Helper.symbolize_keys(hash)[:discriminator].to_s.strip
7908
+ if discriminator.empty?
7909
+ raise "Union type[shipping_notification_form] requires a field named 'discriminator'"
7910
+ end
7911
+ case discriminator
7912
+ when Types::DETAILED_SHIPPING_NOTIFICATION_FORM; DetailedShippingNotificationForm.new(hash)
7913
+ when Types::SINGLE_PACKAGE_SHIPPING_NOTIFICATION_FORM; SinglePackageShippingNotificationForm.new(hash)
7914
+ else ShippingNotificationFormUndefinedType.new(:discriminator => discriminator)
7915
+ end
7916
+ end
7917
+
7918
+ end
7919
+
7920
+ class ShippingNotificationFormUndefinedType < ShippingNotificationForm
7921
+
7922
+ attr_reader :name
7923
+
7924
+ def initialize(incoming={})
7925
+ super(:discriminator => 'undefined_type')
7926
+ opts = HttpClient::Helper.symbolize_keys(incoming)
7927
+ @name = HttpClient::Preconditions.assert_class('name', opts.delete(:discriminator), String)
7928
+ end
7929
+
7930
+ def subtype_to_hash
7931
+ raise 'Unable to serialize undefined type to json'
7932
+ end
7933
+
7934
+ def copy(incoming={})
7935
+ raise 'Operation not supported for undefined type'
7936
+ end
7937
+
7938
+ def to_hash
7939
+ raise 'Operation not supported for undefined type'
7940
+ end
7941
+
7942
+ end
7943
+
7864
7944
  # Possible outcome types from a tier rule
7865
7945
  class TierRuleOutcome
7866
7946
 
@@ -8850,6 +8930,60 @@ module Io
8850
8930
 
8851
8931
  end
8852
8932
 
8933
+ class CaptureStatus
8934
+
8935
+ attr_reader :value
8936
+
8937
+ def initialize(value)
8938
+ @value = HttpClient::Preconditions.assert_class('value', value, String)
8939
+ end
8940
+
8941
+ # Returns the instance of CaptureStatus for this value, creating a new instance for an unknown value
8942
+ def CaptureStatus.apply(value)
8943
+ if value.instance_of?(CaptureStatus)
8944
+ value
8945
+ else
8946
+ HttpClient::Preconditions.assert_class_or_nil('value', value, String)
8947
+ value.nil? ? nil : (from_string(value) || CaptureStatus.new(value))
8948
+ end
8949
+ end
8950
+
8951
+ # Returns the instance of CaptureStatus for this value, or nil if not found
8952
+ def CaptureStatus.from_string(value)
8953
+ HttpClient::Preconditions.assert_class('value', value, String)
8954
+ CaptureStatus.ALL.find { |v| v.value == value }
8955
+ end
8956
+
8957
+ def CaptureStatus.ALL
8958
+ @@all ||= [CaptureStatus.pending, CaptureStatus.succeeded, CaptureStatus.failed, CaptureStatus.canceled]
8959
+ end
8960
+
8961
+ # The capture has been initiated and requires time to complete.
8962
+ def CaptureStatus.pending
8963
+ @@_pending ||= CaptureStatus.new('pending')
8964
+ end
8965
+
8966
+ # The capture has been processed successfully.
8967
+ def CaptureStatus.succeeded
8968
+ @@_succeeded ||= CaptureStatus.new('succeeded')
8969
+ end
8970
+
8971
+ # The capture failed to process.
8972
+ def CaptureStatus.failed
8973
+ @@_failed ||= CaptureStatus.new('failed')
8974
+ end
8975
+
8976
+ # The capture was canceled.
8977
+ def CaptureStatus.canceled
8978
+ @@_canceled ||= CaptureStatus.new('canceled')
8979
+ end
8980
+
8981
+ def to_hash
8982
+ value
8983
+ end
8984
+
8985
+ end
8986
+
8853
8987
  class CardErrorCode
8854
8988
 
8855
8989
  attr_reader :value
@@ -9003,6 +9137,56 @@ module Io
9003
9137
 
9004
9138
  end
9005
9139
 
9140
+ class CenterCapability
9141
+
9142
+ attr_reader :value
9143
+
9144
+ def initialize(value)
9145
+ @value = HttpClient::Preconditions.assert_class('value', value, String)
9146
+ end
9147
+
9148
+ # Returns the instance of CenterCapability for this value, creating a new instance for an unknown value
9149
+ def CenterCapability.apply(value)
9150
+ if value.instance_of?(CenterCapability)
9151
+ value
9152
+ else
9153
+ HttpClient::Preconditions.assert_class_or_nil('value', value, String)
9154
+ value.nil? ? nil : (from_string(value) || CenterCapability.new(value))
9155
+ end
9156
+ end
9157
+
9158
+ # Returns the instance of CenterCapability for this value, or nil if not found
9159
+ def CenterCapability.from_string(value)
9160
+ HttpClient::Preconditions.assert_class('value', value, String)
9161
+ CenterCapability.ALL.find { |v| v.value == value }
9162
+ end
9163
+
9164
+ def CenterCapability.ALL
9165
+ @@all ||= [CenterCapability.international, CenterCapability.domestic, CenterCapability.crossdock, CenterCapability.commercial_invoice]
9166
+ end
9167
+
9168
+ def CenterCapability.international
9169
+ @@_international ||= CenterCapability.new('international')
9170
+ end
9171
+
9172
+ def CenterCapability.domestic
9173
+ @@_domestic ||= CenterCapability.new('domestic')
9174
+ end
9175
+
9176
+ def CenterCapability.crossdock
9177
+ @@_crossdock ||= CenterCapability.new('crossdock')
9178
+ end
9179
+
9180
+ def CenterCapability.commercial_invoice
9181
+ @@_commercial_invoice ||= CenterCapability.new('commercial_invoice')
9182
+ end
9183
+
9184
+ def to_hash
9185
+ value
9186
+ end
9187
+
9188
+ end
9189
+
9006
9190
  class ChangeType
9007
9191
 
9008
9192
  attr_reader :value
@@ -9741,7 +9925,7 @@ module Io
9741
9925
  end
9742
9926
 
9743
9927
  def EventType.ALL
9744
- @@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.serial_upserted, EventType.serial_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]
9928
+ @@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.serial_upserted, EventType.serial_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.virtual_card_capture_upserted, EventType.virtual_card_capture_deleted, EventType.virtual_card_refund_upserted, EventType.virtual_card_refund_deleted, 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]
9745
9929
  end
9746
9930
 
9747
9931
  def EventType.attribute_upserted
@@ -10104,6 +10288,22 @@ module Io
10104
10288
  @@_reversal_upserted ||= EventType.new('reversal_upserted')
10105
10289
  end
10106
10290
 
10291
+ def EventType.virtual_card_capture_upserted
10292
+ @@_virtual_card_capture_upserted ||= EventType.new('virtual_card_capture_upserted')
10293
+ end
10294
+
10295
+ def EventType.virtual_card_capture_deleted
10296
+ @@_virtual_card_capture_deleted ||= EventType.new('virtual_card_capture_deleted')
10297
+ end
10298
+
10299
+ def EventType.virtual_card_refund_upserted
10300
+ @@_virtual_card_refund_upserted ||= EventType.new('virtual_card_refund_upserted')
10301
+ end
10302
+
10303
+ def EventType.virtual_card_refund_deleted
10304
+ @@_virtual_card_refund_deleted ||= EventType.new('virtual_card_refund_deleted')
10305
+ end
10306
+
10107
10307
  def EventType.price_book_upserted
10108
10308
  @@_price_book_upserted ||= EventType.new('price_book_upserted')
10109
10309
  end
@@ -10392,6 +10592,48 @@ module Io
10392
10592
 
10393
10593
  end
10394
10594
 
10595
+ class FraudLiability
10596
+
10597
+ attr_reader :value
10598
+
10599
+ def initialize(value)
10600
+ @value = HttpClient::Preconditions.assert_class('value', value, String)
10601
+ end
10602
+
10603
+ # Returns the instance of FraudLiability for this value, creating a new instance for an unknown value
10604
+ def FraudLiability.apply(value)
10605
+ if value.instance_of?(FraudLiability)
10606
+ value
10607
+ else
10608
+ HttpClient::Preconditions.assert_class_or_nil('value', value, String)
10609
+ value.nil? ? nil : (from_string(value) || FraudLiability.new(value))
10610
+ end
10611
+ end
10612
+
10613
+ # Returns the instance of FraudLiability for this value, or nil if not found
10614
+ def FraudLiability.from_string(value)
10615
+ HttpClient::Preconditions.assert_class('value', value, String)
10616
+ FraudLiability.ALL.find { |v| v.value == value }
10617
+ end
10618
+
10619
+ def FraudLiability.ALL
10620
+ @@all ||= [FraudLiability.flow, FraudLiability.organization]
10621
+ end
10622
+
10623
+ def FraudLiability.flow
10624
+ @@_flow ||= FraudLiability.new('flow')
10625
+ end
10626
+
10627
+ def FraudLiability.organization
10628
+ @@_organization ||= FraudLiability.new('organization')
10629
+ end
10630
+
10631
+ def to_hash
10632
+ value
10633
+ end
10634
+
10635
+ end
10636
+
10395
10637
  class FraudStatus
10396
10638
 
10397
10639
  attr_reader :value
@@ -10417,7 +10659,7 @@ module Io
10417
10659
  end
10418
10660
 
10419
10661
  def FraudStatus.ALL
10420
- @@all ||= [FraudStatus.pending, FraudStatus.approved, FraudStatus.declined]
10662
+ @@all ||= [FraudStatus.pending, FraudStatus.approved, FraudStatus.declined, FraudStatus.review]
10421
10663
  end
10422
10664
 
10423
10665
  # If an immediate response is not available, the state will be 'pending'.
@@ -10435,6 +10677,12 @@ module Io
10435
10677
  @@_declined ||= FraudStatus.new('declined')
10436
10678
  end
10437
10679
 
10680
+ # Indicates the fraud check decision from the fraud providing service is being
10681
+ # reviewed.
10682
+ def FraudStatus.review
10683
+ @@_review ||= FraudStatus.new('review')
10684
+ end
10685
+
10438
10686
  def to_hash
10439
10687
  value
10440
10688
  end
@@ -12685,6 +12933,60 @@ module Io
12685
12933
 
12686
12934
  end
12687
12935
 
12936
+ class RefundStatus
12937
+
12938
+ attr_reader :value
12939
+
12940
+ def initialize(value)
12941
+ @value = HttpClient::Preconditions.assert_class('value', value, String)
12942
+ end
12943
+
12944
+ # Returns the instance of RefundStatus for this value, creating a new instance for an unknown value
12945
+ def RefundStatus.apply(value)
12946
+ if value.instance_of?(RefundStatus)
12947
+ value
12948
+ else
12949
+ HttpClient::Preconditions.assert_class_or_nil('value', value, String)
12950
+ value.nil? ? nil : (from_string(value) || RefundStatus.new(value))
12951
+ end
12952
+ end
12953
+
12954
+ # Returns the instance of RefundStatus for this value, or nil if not found
12955
+ def RefundStatus.from_string(value)
12956
+ HttpClient::Preconditions.assert_class('value', value, String)
12957
+ RefundStatus.ALL.find { |v| v.value == value }
12958
+ end
12959
+
12960
+ def RefundStatus.ALL
12961
+ @@all ||= [RefundStatus.pending, RefundStatus.succeeded, RefundStatus.failed, RefundStatus.canceled]
12962
+ end
12963
+
12964
+ # The refund has been initiated and requires time to complete.
12965
+ def RefundStatus.pending
12966
+ @@_pending ||= RefundStatus.new('pending')
12967
+ end
12968
+
12969
+ # The refund has been processed successfully.
12970
+ def RefundStatus.succeeded
12971
+ @@_succeeded ||= RefundStatus.new('succeeded')
12972
+ end
12973
+
12974
+ # The refund failed to process.
12975
+ def RefundStatus.failed
12976
+ @@_failed ||= RefundStatus.new('failed')
12977
+ end
12978
+
12979
+ # The refund was canceled.
12980
+ def RefundStatus.canceled
12981
+ @@_canceled ||= RefundStatus.new('canceled')
12982
+ end
12983
+
12984
+ def to_hash
12985
+ value
12986
+ end
12987
+
12988
+ end
12989
+
12688
12990
  class ReturnStatus
12689
12991
 
12690
12992
  attr_reader :value
@@ -12841,7 +13143,7 @@ module Io
12841
13143
  @@all ||= [ReversalStatus.pending, ReversalStatus.processed, ReversalStatus.failed]
12842
13144
  end
12843
13145
 
12844
- # Reversal is pending processing
13146
+ # Reversal is pending processing.
12845
13147
  def ReversalStatus.pending
12846
13148
  @@_pending ||= ReversalStatus.new('pending')
12847
13149
  end
@@ -12851,7 +13153,7 @@ module Io
12851
13153
  @@_processed ||= ReversalStatus.new('processed')
12852
13154
  end
12853
13155
 
12854
- # Reversal failed to process
13156
+ # Reversal failed to process.
12855
13157
  def ReversalStatus.failed
12856
13158
  @@_failed ||= ReversalStatus.new('failed')
12857
13159
  end
@@ -15601,7 +15903,7 @@ module Io
15601
15903
  # authorization otherwise becomes unavailable (e.g. expires).
15602
15904
  class Capture
15603
15905
 
15604
- attr_reader :id, :key, :authorization, :amount, :currency, :requested, :created_at, :attributes
15906
+ attr_reader :id, :key, :authorization, :amount, :currency, :requested, :created_at, :attributes, :status
15605
15907
 
15606
15908
  def initialize(incoming={})
15607
15909
  opts = HttpClient::Helper.symbolize_keys(incoming)
@@ -15614,6 +15916,7 @@ module Io
15614
15916
  @requested = (x = opts.delete(:requested); x.nil? ? nil : (x = x; x.is_a?(::Io::Flow::V0::Models::Money) ? x : ::Io::Flow::V0::Models::Money.new(x)))
15615
15917
  @created_at = HttpClient::Preconditions.assert_class('created_at', HttpClient::Helper.to_date_time_iso8601(opts.delete(:created_at)), DateTime)
15616
15918
  @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 })
15919
+ @status = (x = (x = opts.delete(:status); x.nil? ? "succeeded" : x); x.is_a?(::Io::Flow::V0::Models::CaptureStatus) ? x : ::Io::Flow::V0::Models::CaptureStatus.apply(x))
15617
15920
  end
15618
15921
 
15619
15922
  def to_json
@@ -15633,7 +15936,8 @@ module Io
15633
15936
  :currency => currency,
15634
15937
  :requested => requested.nil? ? nil : requested.to_hash,
15635
15938
  :created_at => created_at,
15636
- :attributes => attributes.nil? ? nil : attributes
15939
+ :attributes => attributes.nil? ? nil : attributes,
15940
+ :status => status.value
15637
15941
  }
15638
15942
  end
15639
15943
 
@@ -17028,7 +17332,7 @@ module Io
17028
17332
  @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)) }
17029
17333
  @schedule = (x = opts.delete(:schedule); x.is_a?(::Io::Flow::V0::Models::Schedule) ? x : ::Io::Flow::V0::Models::Schedule.new(x))
17030
17334
  @timezone = HttpClient::Preconditions.assert_class('timezone', opts.delete(:timezone), String)
17031
- @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)))
17335
+ @capabilities = (x = opts.delete(:capabilities); x.nil? ? nil : HttpClient::Preconditions.assert_class('capabilities', x, Array).map { |v| (x = v; x.is_a?(::Io::Flow::V0::Models::CenterCapability) ? x : ::Io::Flow::V0::Models::CenterCapability.apply(x)) })
17032
17336
  @partner_center = (x = opts.delete(:partner_center); x.nil? ? nil : (x = x; x.is_a?(::Io::Flow::V0::Models::PartnerCenter) ? x : ::Io::Flow::V0::Models::PartnerCenter.new(x)))
17033
17337
  end
17034
17338
 
@@ -17050,47 +17354,13 @@ module Io
17050
17354
  :services => services.map { |o| o.to_hash },
17051
17355
  :schedule => schedule.to_hash,
17052
17356
  :timezone => timezone,
17053
- :capabilities => capabilities.nil? ? nil : capabilities.to_hash,
17357
+ :capabilities => capabilities.nil? ? nil : capabilities.map { |o| o.value },
17054
17358
  :partner_center => partner_center.nil? ? nil : partner_center.to_hash
17055
17359
  }
17056
17360
  end
17057
17361
 
17058
17362
  end
17059
17363
 
17060
- # Capabilities of each center. This is used when determining if a crossdock
17061
- # solution is required
17062
- class CenterCapabilities
17063
-
17064
- attr_reader :domestic_shipping, :internal_shipping, :commercial_invoice, :crossdock
17065
-
17066
- def initialize(incoming={})
17067
- opts = HttpClient::Helper.symbolize_keys(incoming)
17068
- HttpClient::Preconditions.require_keys(opts, [:domestic_shipping, :internal_shipping, :commercial_invoice, :crossdock], 'CenterCapabilities')
17069
- @domestic_shipping = HttpClient::Preconditions.assert_boolean('domestic_shipping', opts.delete(:domestic_shipping))
17070
- @internal_shipping = HttpClient::Preconditions.assert_boolean('internal_shipping', opts.delete(:internal_shipping))
17071
- @commercial_invoice = HttpClient::Preconditions.assert_boolean('commercial_invoice', opts.delete(:commercial_invoice))
17072
- @crossdock = HttpClient::Preconditions.assert_boolean('crossdock', opts.delete(:crossdock))
17073
- end
17074
-
17075
- def to_json
17076
- JSON.dump(to_hash)
17077
- end
17078
-
17079
- def copy(incoming={})
17080
- CenterCapabilities.new(to_hash.merge(HttpClient::Helper.symbolize_keys(incoming)))
17081
- end
17082
-
17083
- def to_hash
17084
- {
17085
- :domestic_shipping => domestic_shipping,
17086
- :internal_shipping => internal_shipping,
17087
- :commercial_invoice => commercial_invoice,
17088
- :crossdock => crossdock
17089
- }
17090
- end
17091
-
17092
- end
17093
-
17094
17364
  class CenterForm
17095
17365
 
17096
17366
  attr_reader :address, :packaging, :name, :services, :schedule, :timezone, :key, :capabilities, :partner_center_form
@@ -17105,7 +17375,7 @@ module Io
17105
17375
  @schedule = (x = opts.delete(:schedule); x.is_a?(::Io::Flow::V0::Models::Schedule) ? x : ::Io::Flow::V0::Models::Schedule.new(x))
17106
17376
  @timezone = (x = opts.delete(:timezone); x.nil? ? nil : HttpClient::Preconditions.assert_class('timezone', x, String))
17107
17377
  @key = (x = opts.delete(:key); x.nil? ? nil : HttpClient::Preconditions.assert_class('key', x, String))
17108
- @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)))
17378
+ @capabilities = (x = opts.delete(:capabilities); x.nil? ? nil : HttpClient::Preconditions.assert_class('capabilities', x, Array).map { |v| (x = v; x.is_a?(::Io::Flow::V0::Models::CenterCapability) ? x : ::Io::Flow::V0::Models::CenterCapability.apply(x)) })
17109
17379
  @partner_center_form = (x = opts.delete(:partner_center_form); x.nil? ? nil : (x = x; x.is_a?(::Io::Flow::V0::Models::PartnerCenterForm) ? x : ::Io::Flow::V0::Models::PartnerCenterForm.new(x)))
17110
17380
  end
17111
17381
 
@@ -17126,7 +17396,7 @@ module Io
17126
17396
  :schedule => schedule.to_hash,
17127
17397
  :timezone => timezone,
17128
17398
  :key => key,
17129
- :capabilities => capabilities.nil? ? nil : capabilities.to_hash,
17399
+ :capabilities => capabilities.nil? ? nil : capabilities.map { |o| o.value },
17130
17400
  :partner_center_form => partner_center_form.nil? ? nil : partner_center_form.to_hash
17131
17401
  }
17132
17402
  end
@@ -18598,6 +18868,51 @@ module Io
18598
18868
 
18599
18869
  end
18600
18870
 
18871
+ # Detailed form for information about a client-facilitated shipment where the
18872
+ # shipping label and fulfillment was not handled by Flow.
18873
+ class DetailedShippingNotificationForm < ShippingNotificationForm
18874
+
18875
+ attr_reader :key, :attributes, :carrier_tracking_number, :destination, :order_number, :package, :service, :origin, :shipment_recipient
18876
+
18877
+ def initialize(incoming={})
18878
+ super(:discriminator => ShippingNotificationForm::Types::DETAILED_SHIPPING_NOTIFICATION_FORM)
18879
+ opts = HttpClient::Helper.symbolize_keys(incoming)
18880
+ HttpClient::Preconditions.require_keys(opts, [:carrier_tracking_number, :destination, :order_number, :package, :service], 'DetailedShippingNotificationForm')
18881
+ @key = (x = opts.delete(:key); x.nil? ? nil : HttpClient::Preconditions.assert_class('key', x, String))
18882
+ @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 })
18883
+ @carrier_tracking_number = HttpClient::Preconditions.assert_class('carrier_tracking_number', opts.delete(:carrier_tracking_number), String)
18884
+ @destination = (x = opts.delete(:destination); x.is_a?(::Io::Flow::V0::Models::ShippingAddress) ? x : ::Io::Flow::V0::Models::ShippingAddress.new(x))
18885
+ @order_number = HttpClient::Preconditions.assert_class('order_number', opts.delete(:order_number), String)
18886
+ @package = (x = opts.delete(:package); x.is_a?(::Io::Flow::V0::Models::ShippingLabelPackage) ? x : ::Io::Flow::V0::Models::ShippingLabelPackage.new(x))
18887
+ @service = HttpClient::Preconditions.assert_class('service', opts.delete(:service), String)
18888
+ @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)))
18889
+ @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)))
18890
+ end
18891
+
18892
+ def to_json
18893
+ JSON.dump(to_hash)
18894
+ end
18895
+
18896
+ def copy(incoming={})
18897
+ DetailedShippingNotificationForm.new(subtype_to_hash.merge(HttpClient::Helper.symbolize_keys(incoming)))
18898
+ end
18899
+
18900
+ def subtype_to_hash
18901
+ {
18902
+ :key => key,
18903
+ :attributes => attributes.nil? ? nil : attributes,
18904
+ :carrier_tracking_number => carrier_tracking_number,
18905
+ :destination => destination.to_hash,
18906
+ :order_number => order_number,
18907
+ :package => package.to_hash,
18908
+ :service => service,
18909
+ :origin => origin.nil? ? nil : origin.to_hash,
18910
+ :shipment_recipient => shipment_recipient.nil? ? nil : shipment_recipient.value
18911
+ }
18912
+ end
18913
+
18914
+ end
18915
+
18601
18916
  # Represents a collection of items that are digitally available and do not
18602
18917
  # require a physical shipment
18603
18918
  class DigitalDelivery < Delivery
@@ -21842,6 +22157,79 @@ module Io
21842
22157
 
21843
22158
  end
21844
22159
 
22160
+ # Represents an online payment that requires the client token from underlying
22161
+ # payment processor before entering their payment information.
22162
+ class InlineAuthorizationDetails < OnlineAuthorizationDetails
22163
+
22164
+ attr_reader :id, :client_token
22165
+
22166
+ def initialize(incoming={})
22167
+ super(:discriminator => OnlineAuthorizationDetails::Types::INLINE_AUTHORIZATION_DETAILS)
22168
+ opts = HttpClient::Helper.symbolize_keys(incoming)
22169
+ HttpClient::Preconditions.require_keys(opts, [:id, :client_token], 'InlineAuthorizationDetails')
22170
+ @id = HttpClient::Preconditions.assert_class('id', opts.delete(:id), String)
22171
+ @client_token = HttpClient::Preconditions.assert_class('client_token', opts.delete(:client_token), String)
22172
+ end
22173
+
22174
+ def to_json
22175
+ JSON.dump(to_hash)
22176
+ end
22177
+
22178
+ def copy(incoming={})
22179
+ InlineAuthorizationDetails.new(subtype_to_hash.merge(HttpClient::Helper.symbolize_keys(incoming)))
22180
+ end
22181
+
22182
+ def subtype_to_hash
22183
+ {
22184
+ :id => id,
22185
+ :client_token => client_token
22186
+ }
22187
+ end
22188
+
22189
+ end
22190
+
22191
+ # Executes a widget-based payment based on the provided payment method.
22192
+ class InlineAuthorizationForm < AuthorizationForm
22193
+
22194
+ attr_reader :method, :issuer, :order_number, :amount, :currency, :key, :attributes, :ip
22195
+
22196
+ def initialize(incoming={})
22197
+ super(:discriminator => AuthorizationForm::Types::INLINE_AUTHORIZATION_FORM)
22198
+ opts = HttpClient::Helper.symbolize_keys(incoming)
22199
+ HttpClient::Preconditions.require_keys(opts, [:method, :order_number, :amount, :currency], 'InlineAuthorizationForm')
22200
+ @method = HttpClient::Preconditions.assert_class('method', opts.delete(:method), String)
22201
+ @issuer = (x = opts.delete(:issuer); x.nil? ? nil : (x = x; x.is_a?(::Io::Flow::V0::Models::IssuerReference) ? x : ::Io::Flow::V0::Models::IssuerReference.new(x)))
22202
+ @order_number = HttpClient::Preconditions.assert_class('order_number', opts.delete(:order_number), String)
22203
+ @amount = HttpClient::Preconditions.assert_class('amount', HttpClient::Helper.to_big_decimal(opts.delete(:amount)), BigDecimal)
22204
+ @currency = HttpClient::Preconditions.assert_class('currency', opts.delete(:currency), String)
22205
+ @key = (x = opts.delete(:key); x.nil? ? nil : HttpClient::Preconditions.assert_class('key', x, String))
22206
+ @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 })
22207
+ @ip = (x = opts.delete(:ip); x.nil? ? nil : HttpClient::Preconditions.assert_class('ip', x, String))
22208
+ end
22209
+
22210
+ def to_json
22211
+ JSON.dump(to_hash)
22212
+ end
22213
+
22214
+ def copy(incoming={})
22215
+ InlineAuthorizationForm.new(subtype_to_hash.merge(HttpClient::Helper.symbolize_keys(incoming)))
22216
+ end
22217
+
22218
+ def subtype_to_hash
22219
+ {
22220
+ :method => method,
22221
+ :issuer => issuer.nil? ? nil : issuer.to_hash,
22222
+ :order_number => order_number,
22223
+ :amount => amount,
22224
+ :currency => currency,
22225
+ :key => key,
22226
+ :attributes => attributes.nil? ? nil : attributes,
22227
+ :ip => ip
22228
+ }
22229
+ end
22230
+
22231
+ end
22232
+
21845
22233
  class InstallmentPlanPaymentError
21846
22234
 
21847
22235
  attr_reader :code, :messages, :codes
@@ -22587,6 +22975,38 @@ module Io
22587
22975
 
22588
22976
  end
22589
22977
 
22978
+ class Issuer
22979
+
22980
+ attr_reader :iin, :card_brand, :card_type, :name
22981
+
22982
+ def initialize(incoming={})
22983
+ opts = HttpClient::Helper.symbolize_keys(incoming)
22984
+ HttpClient::Preconditions.require_keys(opts, [:iin, :card_brand], 'Issuer')
22985
+ @iin = HttpClient::Preconditions.assert_class('iin', opts.delete(:iin), String)
22986
+ @card_brand = HttpClient::Preconditions.assert_class('card_brand', opts.delete(:card_brand), String)
22987
+ @card_type = (x = opts.delete(:card_type); x.nil? ? nil : HttpClient::Preconditions.assert_class('card_type', x, String))
22988
+ @name = (x = opts.delete(:name); x.nil? ? nil : HttpClient::Preconditions.assert_class('name', x, String))
22989
+ end
22990
+
22991
+ def to_json
22992
+ JSON.dump(to_hash)
22993
+ end
22994
+
22995
+ def copy(incoming={})
22996
+ Issuer.new(to_hash.merge(HttpClient::Helper.symbolize_keys(incoming)))
22997
+ end
22998
+
22999
+ def to_hash
23000
+ {
23001
+ :iin => iin,
23002
+ :card_brand => card_brand,
23003
+ :card_type => card_type,
23004
+ :name => name
23005
+ }
23006
+ end
23007
+
23008
+ end
23009
+
22590
23010
  class IssuerReference
22591
23011
 
22592
23012
  attr_reader :id
@@ -26504,7 +26924,7 @@ module Io
26504
26924
 
26505
26925
  class OrderUpserted < Event
26506
26926
 
26507
- attr_reader :event_id, :timestamp, :organization, :number, :environment, :experience_id, :expires_at, :customer, :selections, :items, :destination, :deliveries, :prices, :payments, :discount, :delivered_duty, :total, :created_at, :updated_at, :submitted_at, :lines, :attributes, :geo, :merchant_of_record
26927
+ attr_reader :event_id, :timestamp, :organization, :number, :environment, :experience_id, :expires_at, :customer, :selections, :items, :destination, :deliveries, :prices, :order_id, :payments, :discount, :delivered_duty, :total, :created_at, :updated_at, :submitted_at, :lines, :attributes, :geo, :merchant_of_record
26508
26928
 
26509
26929
  def initialize(incoming={})
26510
26930
  super(:discriminator => Event::Types::ORDER_UPSERTED)
@@ -26523,6 +26943,7 @@ module Io
26523
26943
  @destination = (x = opts.delete(:destination); x.is_a?(::Io::Flow::V0::Models::OrderAddress) ? x : ::Io::Flow::V0::Models::OrderAddress.new(x))
26524
26944
  @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)) }
26525
26945
  @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)) }
26946
+ @order_id = (x = opts.delete(:order_id); x.nil? ? nil : HttpClient::Preconditions.assert_class('order_id', x, String))
26526
26947
  @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)) })
26527
26948
  @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)))
26528
26949
  @delivered_duty = (x = opts.delete(:delivered_duty); x.nil? ? nil : HttpClient::Preconditions.assert_class('delivered_duty', x, String))
@@ -26559,6 +26980,7 @@ module Io
26559
26980
  :destination => destination.to_hash,
26560
26981
  :deliveries => deliveries.map { |o| o.to_hash },
26561
26982
  :prices => prices.map { |o| o.to_hash },
26983
+ :order_id => order_id,
26562
26984
  :payments => payments.nil? ? nil : payments.map { |o| o.to_hash },
26563
26985
  :discount => discount.nil? ? nil : discount.to_hash,
26564
26986
  :delivered_duty => delivered_duty,
@@ -29934,7 +30356,7 @@ module Io
29934
30356
  # execute the refund).
29935
30357
  class Refund
29936
30358
 
29937
- attr_reader :id, :key, :authorization, :amount, :currency, :requested, :captures, :created_at, :attributes
30359
+ attr_reader :id, :key, :authorization, :amount, :currency, :requested, :captures, :created_at, :attributes, :status
29938
30360
 
29939
30361
  def initialize(incoming={})
29940
30362
  opts = HttpClient::Helper.symbolize_keys(incoming)
@@ -29948,6 +30370,7 @@ module Io
29948
30370
  @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)) }
29949
30371
  @created_at = HttpClient::Preconditions.assert_class('created_at', HttpClient::Helper.to_date_time_iso8601(opts.delete(:created_at)), DateTime)
29950
30372
  @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 })
30373
+ @status = (x = (x = opts.delete(:status); x.nil? ? "succeeded" : x); x.is_a?(::Io::Flow::V0::Models::RefundStatus) ? x : ::Io::Flow::V0::Models::RefundStatus.apply(x))
29951
30374
  end
29952
30375
 
29953
30376
  def to_json
@@ -29968,7 +30391,8 @@ module Io
29968
30391
  :requested => requested.nil? ? nil : requested.to_hash,
29969
30392
  :captures => captures.map { |o| o.to_hash },
29970
30393
  :created_at => created_at,
29971
- :attributes => attributes.nil? ? nil : attributes
30394
+ :attributes => attributes.nil? ? nil : attributes,
30395
+ :status => status.value
29972
30396
  }
29973
30397
  end
29974
30398
 
@@ -29978,7 +30402,7 @@ module Io
29978
30402
  # against a specific capture
29979
30403
  class RefundCapture
29980
30404
 
29981
- attr_reader :id, :refund, :capture, :amount, :currency, :base
30405
+ attr_reader :id, :refund, :capture, :amount, :currency, :base, :status
29982
30406
 
29983
30407
  def initialize(incoming={})
29984
30408
  opts = HttpClient::Helper.symbolize_keys(incoming)
@@ -29989,6 +30413,7 @@ module Io
29989
30413
  @amount = HttpClient::Preconditions.assert_class('amount', HttpClient::Helper.to_big_decimal(opts.delete(:amount)), BigDecimal)
29990
30414
  @currency = HttpClient::Preconditions.assert_class('currency', opts.delete(:currency), String)
29991
30415
  @base = (x = opts.delete(:base); x.is_a?(::Io::Flow::V0::Models::Money) ? x : ::Io::Flow::V0::Models::Money.new(x))
30416
+ @status = (x = (x = opts.delete(:status); x.nil? ? "succeeded" : x); x.is_a?(::Io::Flow::V0::Models::RefundStatus) ? x : ::Io::Flow::V0::Models::RefundStatus.apply(x))
29992
30417
  end
29993
30418
 
29994
30419
  def to_json
@@ -30006,7 +30431,8 @@ module Io
30006
30431
  :capture => capture.to_hash,
30007
30432
  :amount => amount,
30008
30433
  :currency => currency,
30009
- :base => base.to_hash
30434
+ :base => base.to_hash,
30435
+ :status => status.value
30010
30436
  }
30011
30437
  end
30012
30438
 
@@ -32298,26 +32724,17 @@ module Io
32298
32724
 
32299
32725
  end
32300
32726
 
32301
- # Form for information about a client-facilitated shipment where the shipping
32302
- # label and fulfillment was not handled by Flow. For merchant-of-record and
32303
- # tracking purposes, clients doing their own shipping will need to notify Flow
32304
- # of shipped packages.
32305
- class ShippingNotificationForm
32727
+ class ShippingNotificationVersion
32306
32728
 
32307
- attr_reader :key, :attributes, :carrier_tracking_number, :destination, :order_number, :package, :service, :origin, :shipment_recipient
32729
+ attr_reader :id, :timestamp, :type, :shipping_notification
32308
32730
 
32309
32731
  def initialize(incoming={})
32310
32732
  opts = HttpClient::Helper.symbolize_keys(incoming)
32311
- HttpClient::Preconditions.require_keys(opts, [:carrier_tracking_number, :destination, :order_number, :package, :service], 'ShippingNotificationForm')
32312
- @key = (x = opts.delete(:key); x.nil? ? nil : HttpClient::Preconditions.assert_class('key', x, String))
32313
- @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 })
32314
- @carrier_tracking_number = HttpClient::Preconditions.assert_class('carrier_tracking_number', opts.delete(:carrier_tracking_number), String)
32315
- @destination = (x = opts.delete(:destination); x.is_a?(::Io::Flow::V0::Models::ShippingAddress) ? x : ::Io::Flow::V0::Models::ShippingAddress.new(x))
32316
- @order_number = HttpClient::Preconditions.assert_class('order_number', opts.delete(:order_number), String)
32317
- @package = (x = opts.delete(:package); x.is_a?(::Io::Flow::V0::Models::ShippingLabelPackage) ? x : ::Io::Flow::V0::Models::ShippingLabelPackage.new(x))
32318
- @service = HttpClient::Preconditions.assert_class('service', opts.delete(:service), String)
32319
- @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)))
32320
- @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)))
32733
+ HttpClient::Preconditions.require_keys(opts, [:id, :timestamp, :type, :shipping_notification], 'ShippingNotificationVersion')
32734
+ @id = HttpClient::Preconditions.assert_class('id', opts.delete(:id), String)
32735
+ @timestamp = HttpClient::Preconditions.assert_class('timestamp', HttpClient::Helper.to_date_time_iso8601(opts.delete(:timestamp)), DateTime)
32736
+ @type = (x = opts.delete(:type); x.is_a?(::Io::Flow::V0::Models::ChangeType) ? x : ::Io::Flow::V0::Models::ChangeType.apply(x))
32737
+ @shipping_notification = (x = opts.delete(:shipping_notification); x.is_a?(::Io::Flow::V0::Models::ShippingNotification) ? x : ::Io::Flow::V0::Models::ShippingNotification.new(x))
32321
32738
  end
32322
32739
 
32323
32740
  def to_json
@@ -32325,36 +32742,29 @@ module Io
32325
32742
  end
32326
32743
 
32327
32744
  def copy(incoming={})
32328
- ShippingNotificationForm.new(to_hash.merge(HttpClient::Helper.symbolize_keys(incoming)))
32745
+ ShippingNotificationVersion.new(to_hash.merge(HttpClient::Helper.symbolize_keys(incoming)))
32329
32746
  end
32330
32747
 
32331
32748
  def to_hash
32332
32749
  {
32333
- :key => key,
32334
- :attributes => attributes.nil? ? nil : attributes,
32335
- :carrier_tracking_number => carrier_tracking_number,
32336
- :destination => destination.to_hash,
32337
- :order_number => order_number,
32338
- :package => package.to_hash,
32339
- :service => service,
32340
- :origin => origin.nil? ? nil : origin.to_hash,
32341
- :shipment_recipient => shipment_recipient.nil? ? nil : shipment_recipient.value
32750
+ :id => id,
32751
+ :timestamp => timestamp,
32752
+ :type => type.value,
32753
+ :shipping_notification => shipping_notification.to_hash
32342
32754
  }
32343
32755
  end
32344
32756
 
32345
32757
  end
32346
32758
 
32347
- class ShippingNotificationVersion
32759
+ # Model to represent details available in a customer metafield.
32760
+ class ShopifyCustomerMetafieldValue
32348
32761
 
32349
- attr_reader :id, :timestamp, :type, :shipping_notification
32762
+ attr_reader :flow_consumer_id
32350
32763
 
32351
32764
  def initialize(incoming={})
32352
32765
  opts = HttpClient::Helper.symbolize_keys(incoming)
32353
- HttpClient::Preconditions.require_keys(opts, [:id, :timestamp, :type, :shipping_notification], 'ShippingNotificationVersion')
32354
- @id = HttpClient::Preconditions.assert_class('id', opts.delete(:id), String)
32355
- @timestamp = HttpClient::Preconditions.assert_class('timestamp', HttpClient::Helper.to_date_time_iso8601(opts.delete(:timestamp)), DateTime)
32356
- @type = (x = opts.delete(:type); x.is_a?(::Io::Flow::V0::Models::ChangeType) ? x : ::Io::Flow::V0::Models::ChangeType.apply(x))
32357
- @shipping_notification = (x = opts.delete(:shipping_notification); x.is_a?(::Io::Flow::V0::Models::ShippingNotification) ? x : ::Io::Flow::V0::Models::ShippingNotification.new(x))
32766
+ HttpClient::Preconditions.require_keys(opts, [:flow_consumer_id], 'ShopifyCustomerMetafieldValue')
32767
+ @flow_consumer_id = HttpClient::Preconditions.assert_class('flow_consumer_id', opts.delete(:flow_consumer_id), String)
32358
32768
  end
32359
32769
 
32360
32770
  def to_json
@@ -32362,15 +32772,105 @@ module Io
32362
32772
  end
32363
32773
 
32364
32774
  def copy(incoming={})
32365
- ShippingNotificationVersion.new(to_hash.merge(HttpClient::Helper.symbolize_keys(incoming)))
32775
+ ShopifyCustomerMetafieldValue.new(to_hash.merge(HttpClient::Helper.symbolize_keys(incoming)))
32366
32776
  end
32367
32777
 
32368
32778
  def to_hash
32369
32779
  {
32370
- :id => id,
32371
- :timestamp => timestamp,
32372
- :type => type.value,
32373
- :shipping_notification => shipping_notification.to_hash
32780
+ :flow_consumer_id => flow_consumer_id
32781
+ }
32782
+ end
32783
+
32784
+ end
32785
+
32786
+ # Provide top level localized item price.
32787
+ class ShopifyLocalizedItemPrice
32788
+
32789
+ attr_reader :label
32790
+
32791
+ def initialize(incoming={})
32792
+ opts = HttpClient::Helper.symbolize_keys(incoming)
32793
+ HttpClient::Preconditions.require_keys(opts, [:label], 'ShopifyLocalizedItemPrice')
32794
+ @label = HttpClient::Preconditions.assert_class('label', opts.delete(:label), String)
32795
+ end
32796
+
32797
+ def to_json
32798
+ JSON.dump(to_hash)
32799
+ end
32800
+
32801
+ def copy(incoming={})
32802
+ ShopifyLocalizedItemPrice.new(to_hash.merge(HttpClient::Helper.symbolize_keys(incoming)))
32803
+ end
32804
+
32805
+ def to_hash
32806
+ {
32807
+ :label => label
32808
+ }
32809
+ end
32810
+
32811
+ end
32812
+
32813
+ # Model to represent details available in an order metafield.
32814
+ class ShopifyOrderMetafieldValue
32815
+
32816
+ attr_reader :merchant_of_record, :items, :prices, :total, :flow_order_id
32817
+
32818
+ def initialize(incoming={})
32819
+ opts = HttpClient::Helper.symbolize_keys(incoming)
32820
+ HttpClient::Preconditions.require_keys(opts, [:items, :prices, :total], 'ShopifyOrderMetafieldValue')
32821
+ @merchant_of_record = (x = (x = opts.delete(:merchant_of_record); x.nil? ? "flow" : x); x.is_a?(::Io::Flow::V0::Models::OrderMerchantOfRecord) ? x : ::Io::Flow::V0::Models::OrderMerchantOfRecord.apply(x))
32822
+ @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)) }
32823
+ @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)) }
32824
+ @total = (x = opts.delete(:total); x.is_a?(::Io::Flow::V0::Models::LocalizedTotal) ? x : ::Io::Flow::V0::Models::LocalizedTotal.new(x))
32825
+ @flow_order_id = (x = opts.delete(:flow_order_id); x.nil? ? nil : HttpClient::Preconditions.assert_class('flow_order_id', x, String))
32826
+ end
32827
+
32828
+ def to_json
32829
+ JSON.dump(to_hash)
32830
+ end
32831
+
32832
+ def copy(incoming={})
32833
+ ShopifyOrderMetafieldValue.new(to_hash.merge(HttpClient::Helper.symbolize_keys(incoming)))
32834
+ end
32835
+
32836
+ def to_hash
32837
+ {
32838
+ :merchant_of_record => merchant_of_record.value,
32839
+ :items => items.map { |o| o.to_hash },
32840
+ :prices => prices.map { |o| o.to_hash },
32841
+ :total => total.to_hash,
32842
+ :flow_order_id => flow_order_id
32843
+ }
32844
+ end
32845
+
32846
+ end
32847
+
32848
+ # Representation of a localized price type.
32849
+ class ShopifyPriceLabel
32850
+
32851
+ attr_reader :key, :label, :name
32852
+
32853
+ def initialize(incoming={})
32854
+ opts = HttpClient::Helper.symbolize_keys(incoming)
32855
+ HttpClient::Preconditions.require_keys(opts, [:key, :label], 'ShopifyPriceLabel')
32856
+ @key = HttpClient::Preconditions.assert_class('key', opts.delete(:key), String)
32857
+ @label = HttpClient::Preconditions.assert_class('label', opts.delete(:label), String)
32858
+ @name = (x = opts.delete(:name); x.nil? ? nil : HttpClient::Preconditions.assert_class('name', x, String))
32859
+ end
32860
+
32861
+ def to_json
32862
+ JSON.dump(to_hash)
32863
+ end
32864
+
32865
+ def copy(incoming={})
32866
+ ShopifyPriceLabel.new(to_hash.merge(HttpClient::Helper.symbolize_keys(incoming)))
32867
+ end
32868
+
32869
+ def to_hash
32870
+ {
32871
+ :key => key,
32872
+ :label => label,
32873
+ :name => name
32374
32874
  }
32375
32875
  end
32376
32876
 
@@ -32435,6 +32935,72 @@ module Io
32435
32935
 
32436
32936
  end
32437
32937
 
32938
+ # Model to represent display details for localized prices.
32939
+ class ShopifyVariantMetafieldValue
32940
+
32941
+ attr_reader :localized_item_price, :prices
32942
+
32943
+ def initialize(incoming={})
32944
+ opts = HttpClient::Helper.symbolize_keys(incoming)
32945
+ HttpClient::Preconditions.require_keys(opts, [:localized_item_price, :prices], 'ShopifyVariantMetafieldValue')
32946
+ @localized_item_price = (x = opts.delete(:localized_item_price); x.is_a?(::Io::Flow::V0::Models::ShopifyLocalizedItemPrice) ? x : ::Io::Flow::V0::Models::ShopifyLocalizedItemPrice.new(x))
32947
+ @prices = HttpClient::Preconditions.assert_class('prices', opts.delete(:prices), Array).map { |v| (x = v; x.is_a?(::Io::Flow::V0::Models::ShopifyPriceLabel) ? x : ::Io::Flow::V0::Models::ShopifyPriceLabel.new(x)) }
32948
+ end
32949
+
32950
+ def to_json
32951
+ JSON.dump(to_hash)
32952
+ end
32953
+
32954
+ def copy(incoming={})
32955
+ ShopifyVariantMetafieldValue.new(to_hash.merge(HttpClient::Helper.symbolize_keys(incoming)))
32956
+ end
32957
+
32958
+ def to_hash
32959
+ {
32960
+ :localized_item_price => localized_item_price.to_hash,
32961
+ :prices => prices.map { |o| o.to_hash }
32962
+ }
32963
+ end
32964
+
32965
+ end
32966
+
32967
+ # Simplified form for notifying Flow of a Fulfillment shipped entirely in a
32968
+ # single tracked package.
32969
+ class SinglePackageShippingNotificationForm < ShippingNotificationForm
32970
+
32971
+ attr_reader :fulfillment_key, :carrier_tracking_number, :package_dimensions, :service, :shipment_recipient
32972
+
32973
+ def initialize(incoming={})
32974
+ super(:discriminator => ShippingNotificationForm::Types::SINGLE_PACKAGE_SHIPPING_NOTIFICATION_FORM)
32975
+ opts = HttpClient::Helper.symbolize_keys(incoming)
32976
+ HttpClient::Preconditions.require_keys(opts, [:fulfillment_key, :carrier_tracking_number], 'SinglePackageShippingNotificationForm')
32977
+ @fulfillment_key = HttpClient::Preconditions.assert_class('fulfillment_key', opts.delete(:fulfillment_key), String)
32978
+ @carrier_tracking_number = HttpClient::Preconditions.assert_class('carrier_tracking_number', opts.delete(:carrier_tracking_number), String)
32979
+ @package_dimensions = (x = opts.delete(:package_dimensions); x.nil? ? nil : (x = x; x.is_a?(::Io::Flow::V0::Models::Dimension) ? x : ::Io::Flow::V0::Models::Dimension.new(x)))
32980
+ @service = (x = opts.delete(:service); x.nil? ? nil : HttpClient::Preconditions.assert_class('service', x, String))
32981
+ @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)))
32982
+ end
32983
+
32984
+ def to_json
32985
+ JSON.dump(to_hash)
32986
+ end
32987
+
32988
+ def copy(incoming={})
32989
+ SinglePackageShippingNotificationForm.new(subtype_to_hash.merge(HttpClient::Helper.symbolize_keys(incoming)))
32990
+ end
32991
+
32992
+ def subtype_to_hash
32993
+ {
32994
+ :fulfillment_key => fulfillment_key,
32995
+ :carrier_tracking_number => carrier_tracking_number,
32996
+ :package_dimensions => package_dimensions.nil? ? nil : package_dimensions.to_hash,
32997
+ :service => service,
32998
+ :shipment_recipient => shipment_recipient.nil? ? nil : shipment_recipient.value
32999
+ }
33000
+ end
33001
+
33002
+ end
33003
+
32438
33004
  class SnapshotDeleted < Event
32439
33005
 
32440
33006
  attr_reader :event_id, :timestamp, :snapshot_id
@@ -34981,6 +35547,112 @@ module Io
34981
35547
 
34982
35548
  end
34983
35549
 
35550
+ class VirtualCardCapture
35551
+
35552
+ attr_reader :id, :issuer, :virtual_card, :authorization, :amount, :currency, :created_at
35553
+
35554
+ def initialize(incoming={})
35555
+ opts = HttpClient::Helper.symbolize_keys(incoming)
35556
+ HttpClient::Preconditions.require_keys(opts, [:id, :issuer, :virtual_card, :authorization, :amount, :currency, :created_at], 'VirtualCardCapture')
35557
+ @id = HttpClient::Preconditions.assert_class('id', opts.delete(:id), String)
35558
+ @issuer = (x = opts.delete(:issuer); x.is_a?(::Io::Flow::V0::Models::Issuer) ? x : ::Io::Flow::V0::Models::Issuer.new(x))
35559
+ @virtual_card = (x = opts.delete(:virtual_card); x.is_a?(::Io::Flow::V0::Models::VirtualCardReference) ? x : ::Io::Flow::V0::Models::VirtualCardReference.new(x))
35560
+ @authorization = (x = opts.delete(:authorization); x.is_a?(::Io::Flow::V0::Models::AuthorizationReference) ? x : ::Io::Flow::V0::Models::AuthorizationReference.new(x))
35561
+ @amount = HttpClient::Preconditions.assert_class('amount', HttpClient::Helper.to_big_decimal(opts.delete(:amount)), BigDecimal)
35562
+ @currency = HttpClient::Preconditions.assert_class('currency', opts.delete(:currency), String)
35563
+ @created_at = HttpClient::Preconditions.assert_class('created_at', HttpClient::Helper.to_date_time_iso8601(opts.delete(:created_at)), DateTime)
35564
+ end
35565
+
35566
+ def to_json
35567
+ JSON.dump(to_hash)
35568
+ end
35569
+
35570
+ def copy(incoming={})
35571
+ VirtualCardCapture.new(to_hash.merge(HttpClient::Helper.symbolize_keys(incoming)))
35572
+ end
35573
+
35574
+ def to_hash
35575
+ {
35576
+ :id => id,
35577
+ :issuer => issuer.to_hash,
35578
+ :virtual_card => virtual_card.to_hash,
35579
+ :authorization => authorization.to_hash,
35580
+ :amount => amount,
35581
+ :currency => currency,
35582
+ :created_at => created_at
35583
+ }
35584
+ end
35585
+
35586
+ end
35587
+
35588
+ class VirtualCardCaptureDeleted < Event
35589
+
35590
+ attr_reader :event_id, :timestamp, :organization, :id
35591
+
35592
+ def initialize(incoming={})
35593
+ super(:discriminator => Event::Types::VIRTUAL_CARD_CAPTURE_DELETED)
35594
+ opts = HttpClient::Helper.symbolize_keys(incoming)
35595
+ HttpClient::Preconditions.require_keys(opts, [:event_id, :timestamp, :organization, :id], 'VirtualCardCaptureDeleted')
35596
+ @event_id = HttpClient::Preconditions.assert_class('event_id', opts.delete(:event_id), String)
35597
+ @timestamp = HttpClient::Preconditions.assert_class('timestamp', HttpClient::Helper.to_date_time_iso8601(opts.delete(:timestamp)), DateTime)
35598
+ @organization = HttpClient::Preconditions.assert_class('organization', opts.delete(:organization), String)
35599
+ @id = HttpClient::Preconditions.assert_class('id', opts.delete(:id), String)
35600
+ end
35601
+
35602
+ def to_json
35603
+ JSON.dump(to_hash)
35604
+ end
35605
+
35606
+ def copy(incoming={})
35607
+ VirtualCardCaptureDeleted.new(subtype_to_hash.merge(HttpClient::Helper.symbolize_keys(incoming)))
35608
+ end
35609
+
35610
+ def subtype_to_hash
35611
+ {
35612
+ :event_id => event_id,
35613
+ :timestamp => timestamp,
35614
+ :organization => organization,
35615
+ :id => id
35616
+ }
35617
+ end
35618
+
35619
+ end
35620
+
35621
+ class VirtualCardCaptureUpserted < Event
35622
+
35623
+ attr_reader :event_id, :timestamp, :organization, :id, :capture
35624
+
35625
+ def initialize(incoming={})
35626
+ super(:discriminator => Event::Types::VIRTUAL_CARD_CAPTURE_UPSERTED)
35627
+ opts = HttpClient::Helper.symbolize_keys(incoming)
35628
+ HttpClient::Preconditions.require_keys(opts, [:event_id, :timestamp, :organization, :id, :capture], 'VirtualCardCaptureUpserted')
35629
+ @event_id = HttpClient::Preconditions.assert_class('event_id', opts.delete(:event_id), String)
35630
+ @timestamp = HttpClient::Preconditions.assert_class('timestamp', HttpClient::Helper.to_date_time_iso8601(opts.delete(:timestamp)), DateTime)
35631
+ @organization = HttpClient::Preconditions.assert_class('organization', opts.delete(:organization), String)
35632
+ @id = HttpClient::Preconditions.assert_class('id', opts.delete(:id), String)
35633
+ @capture = (x = opts.delete(:capture); x.is_a?(::Io::Flow::V0::Models::VirtualCardCapture) ? x : ::Io::Flow::V0::Models::VirtualCardCapture.new(x))
35634
+ end
35635
+
35636
+ def to_json
35637
+ JSON.dump(to_hash)
35638
+ end
35639
+
35640
+ def copy(incoming={})
35641
+ VirtualCardCaptureUpserted.new(subtype_to_hash.merge(HttpClient::Helper.symbolize_keys(incoming)))
35642
+ end
35643
+
35644
+ def subtype_to_hash
35645
+ {
35646
+ :event_id => event_id,
35647
+ :timestamp => timestamp,
35648
+ :organization => organization,
35649
+ :id => id,
35650
+ :capture => capture.to_hash
35651
+ }
35652
+ end
35653
+
35654
+ end
35655
+
34984
35656
  class VirtualCardForm
34985
35657
 
34986
35658
  attr_reader :limit, :attributes
@@ -35009,6 +35681,138 @@ module Io
35009
35681
 
35010
35682
  end
35011
35683
 
35684
+ class VirtualCardReference
35685
+
35686
+ attr_reader :id
35687
+
35688
+ def initialize(incoming={})
35689
+ opts = HttpClient::Helper.symbolize_keys(incoming)
35690
+ HttpClient::Preconditions.require_keys(opts, [:id], 'VirtualCardReference')
35691
+ @id = HttpClient::Preconditions.assert_class('id', opts.delete(:id), String)
35692
+ end
35693
+
35694
+ def to_json
35695
+ JSON.dump(to_hash)
35696
+ end
35697
+
35698
+ def copy(incoming={})
35699
+ VirtualCardReference.new(to_hash.merge(HttpClient::Helper.symbolize_keys(incoming)))
35700
+ end
35701
+
35702
+ def to_hash
35703
+ {
35704
+ :id => id
35705
+ }
35706
+ end
35707
+
35708
+ end
35709
+
35710
+ class VirtualCardRefund
35711
+
35712
+ attr_reader :id, :issuer, :virtual_card, :authorization, :amount, :currency, :created_at
35713
+
35714
+ def initialize(incoming={})
35715
+ opts = HttpClient::Helper.symbolize_keys(incoming)
35716
+ HttpClient::Preconditions.require_keys(opts, [:id, :issuer, :virtual_card, :authorization, :amount, :currency, :created_at], 'VirtualCardRefund')
35717
+ @id = HttpClient::Preconditions.assert_class('id', opts.delete(:id), String)
35718
+ @issuer = (x = opts.delete(:issuer); x.is_a?(::Io::Flow::V0::Models::Issuer) ? x : ::Io::Flow::V0::Models::Issuer.new(x))
35719
+ @virtual_card = (x = opts.delete(:virtual_card); x.is_a?(::Io::Flow::V0::Models::VirtualCardReference) ? x : ::Io::Flow::V0::Models::VirtualCardReference.new(x))
35720
+ @authorization = (x = opts.delete(:authorization); x.is_a?(::Io::Flow::V0::Models::AuthorizationReference) ? x : ::Io::Flow::V0::Models::AuthorizationReference.new(x))
35721
+ @amount = HttpClient::Preconditions.assert_class('amount', HttpClient::Helper.to_big_decimal(opts.delete(:amount)), BigDecimal)
35722
+ @currency = HttpClient::Preconditions.assert_class('currency', opts.delete(:currency), String)
35723
+ @created_at = HttpClient::Preconditions.assert_class('created_at', HttpClient::Helper.to_date_time_iso8601(opts.delete(:created_at)), DateTime)
35724
+ end
35725
+
35726
+ def to_json
35727
+ JSON.dump(to_hash)
35728
+ end
35729
+
35730
+ def copy(incoming={})
35731
+ VirtualCardRefund.new(to_hash.merge(HttpClient::Helper.symbolize_keys(incoming)))
35732
+ end
35733
+
35734
+ def to_hash
35735
+ {
35736
+ :id => id,
35737
+ :issuer => issuer.to_hash,
35738
+ :virtual_card => virtual_card.to_hash,
35739
+ :authorization => authorization.to_hash,
35740
+ :amount => amount,
35741
+ :currency => currency,
35742
+ :created_at => created_at
35743
+ }
35744
+ end
35745
+
35746
+ end
35747
+
35748
+ class VirtualCardRefundDeleted < Event
35749
+
35750
+ attr_reader :event_id, :timestamp, :organization, :id
35751
+
35752
+ def initialize(incoming={})
35753
+ super(:discriminator => Event::Types::VIRTUAL_CARD_REFUND_DELETED)
35754
+ opts = HttpClient::Helper.symbolize_keys(incoming)
35755
+ HttpClient::Preconditions.require_keys(opts, [:event_id, :timestamp, :organization, :id], 'VirtualCardRefundDeleted')
35756
+ @event_id = HttpClient::Preconditions.assert_class('event_id', opts.delete(:event_id), String)
35757
+ @timestamp = HttpClient::Preconditions.assert_class('timestamp', HttpClient::Helper.to_date_time_iso8601(opts.delete(:timestamp)), DateTime)
35758
+ @organization = HttpClient::Preconditions.assert_class('organization', opts.delete(:organization), String)
35759
+ @id = HttpClient::Preconditions.assert_class('id', opts.delete(:id), String)
35760
+ end
35761
+
35762
+ def to_json
35763
+ JSON.dump(to_hash)
35764
+ end
35765
+
35766
+ def copy(incoming={})
35767
+ VirtualCardRefundDeleted.new(subtype_to_hash.merge(HttpClient::Helper.symbolize_keys(incoming)))
35768
+ end
35769
+
35770
+ def subtype_to_hash
35771
+ {
35772
+ :event_id => event_id,
35773
+ :timestamp => timestamp,
35774
+ :organization => organization,
35775
+ :id => id
35776
+ }
35777
+ end
35778
+
35779
+ end
35780
+
35781
+ class VirtualCardRefundUpserted < Event
35782
+
35783
+ attr_reader :event_id, :timestamp, :organization, :id, :refund
35784
+
35785
+ def initialize(incoming={})
35786
+ super(:discriminator => Event::Types::VIRTUAL_CARD_REFUND_UPSERTED)
35787
+ opts = HttpClient::Helper.symbolize_keys(incoming)
35788
+ HttpClient::Preconditions.require_keys(opts, [:event_id, :timestamp, :organization, :id, :refund], 'VirtualCardRefundUpserted')
35789
+ @event_id = HttpClient::Preconditions.assert_class('event_id', opts.delete(:event_id), String)
35790
+ @timestamp = HttpClient::Preconditions.assert_class('timestamp', HttpClient::Helper.to_date_time_iso8601(opts.delete(:timestamp)), DateTime)
35791
+ @organization = HttpClient::Preconditions.assert_class('organization', opts.delete(:organization), String)
35792
+ @id = HttpClient::Preconditions.assert_class('id', opts.delete(:id), String)
35793
+ @refund = (x = opts.delete(:refund); x.is_a?(::Io::Flow::V0::Models::VirtualCardRefund) ? x : ::Io::Flow::V0::Models::VirtualCardRefund.new(x))
35794
+ end
35795
+
35796
+ def to_json
35797
+ JSON.dump(to_hash)
35798
+ end
35799
+
35800
+ def copy(incoming={})
35801
+ VirtualCardRefundUpserted.new(subtype_to_hash.merge(HttpClient::Helper.symbolize_keys(incoming)))
35802
+ end
35803
+
35804
+ def subtype_to_hash
35805
+ {
35806
+ :event_id => event_id,
35807
+ :timestamp => timestamp,
35808
+ :organization => organization,
35809
+ :id => id,
35810
+ :refund => refund.to_hash
35811
+ }
35812
+ end
35813
+
35814
+ end
35815
+
35012
35816
  class Webhook
35013
35817
 
35014
35818
  attr_reader :id, :url, :events