flowcommerce 0.2.49 → 0.2.50

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: d1906ff79977c217acf4de6618588aa50d2965b3
4
- data.tar.gz: 4610a02b82a1d2351d6b8190dbc7a516f51cc317
3
+ metadata.gz: a36ae883d392c973f8e24f23eee4232dd03a8d2f
4
+ data.tar.gz: 384772592d47073bccdd2a39fa2aeb1e235396da
5
5
  SHA512:
6
- metadata.gz: 279e895178e1429b84c3d77180d026c44f462acea100f31da55baeee3994566681942fd349e5a597184ab2d828366655f1ae6ec779cf695553f3669b24b3dbd5
7
- data.tar.gz: 7e1575941167b209aec641bafe56738ea9756865d3b4721163ff08431a393795e93ebc8817828b4e03b15d1a587244835455121424d5a77131d889feba84e944
6
+ metadata.gz: b6d9084069b12c128f9df931eb3cb4a08f250d14a07adc7cc97fb43d35ed6d20c63161d3184cd3a8519b189c4290ae4440ecdbeb7692f4734d1d36caba65d024
7
+ data.tar.gz: 60ffd6259d1388619ab5ff25aa6a7af2a10332288cb77fe63fd63d942231000c77c09bb4d6ac85b142b95036d9a135f8bf021eb18b0b9877fc5ab39ae9fe498c
@@ -1,6 +1,6 @@
1
1
  # Generated by API Builder - https://www.apibuilder.io
2
2
  # Service version: 0.4.11
3
- # apibuilder:0.12.87 https://app.apibuilder.io/flow/api/0.4.31/ruby_client
3
+ # apibuilder:0.12.87 https://app.apibuilder.io/flow/api/0.4.35/ruby_client
4
4
 
5
5
  require 'cgi'
6
6
  require 'net/http'
@@ -25,7 +25,7 @@ module Io
25
25
 
26
26
  BASE_URL = 'https://api.flow.io' unless defined?(Constants::BASE_URL)
27
27
  NAMESPACE = 'io.flow.v0' unless defined?(Constants::NAMESPACE)
28
- USER_AGENT = 'apibuilder:0.12.87 https://app.apibuilder.io/flow/api/0.4.31/ruby_client' unless defined?(Constants::USER_AGENT)
28
+ USER_AGENT = 'apibuilder:0.12.87 https://app.apibuilder.io/flow/api/0.4.35/ruby_client' unless defined?(Constants::USER_AGENT)
29
29
  VERSION = '0.4.11' unless defined?(Constants::VERSION)
30
30
  VERSION_MAJOR = 0 unless defined?(VERSION_MAJOR)
31
31
 
@@ -212,6 +212,10 @@ module Io
212
212
  @reversals ||= ::Io::Flow::V0::Clients::Reversals.new(self)
213
213
  end
214
214
 
215
+ def virtual_cards
216
+ @virtual_cards ||= ::Io::Flow::V0::Clients::VirtualCards.new(self)
217
+ end
218
+
215
219
  def centers
216
220
  @centers ||= ::Io::Flow::V0::Clients::Centers.new(self)
217
221
  end
@@ -2886,6 +2890,24 @@ module Io
2886
2890
 
2887
2891
  end
2888
2892
 
2893
+ class VirtualCards
2894
+
2895
+ def initialize(client)
2896
+ @client = HttpClient::Preconditions.assert_class('client', client, ::Io::Flow::V0::Client)
2897
+ end
2898
+
2899
+ # Create a new virtual card.
2900
+ def put_authorizations_by_key_and_authorization_key(organization, key, authorization_key, virtual_card_form)
2901
+ HttpClient::Preconditions.assert_class('organization', organization, String)
2902
+ HttpClient::Preconditions.assert_class('key', key, String)
2903
+ HttpClient::Preconditions.assert_class('authorization_key', authorization_key, String)
2904
+ (x = virtual_card_form; x.is_a?(::Io::Flow::V0::Models::VirtualCardForm) ? x : ::Io::Flow::V0::Models::VirtualCardForm.new(x))
2905
+ r = @client.request("/#{CGI.escape(organization)}/virtual/cards/#{CGI.escape(key)}/authorizations/#{CGI.escape(authorization_key)}").with_json(virtual_card_form.to_json).put
2906
+ ::Io::Flow::V0::Models::VirtualCard.new(r)
2907
+ end
2908
+
2909
+ end
2910
+
2889
2911
  class Centers
2890
2912
 
2891
2913
  def initialize(client)
@@ -5510,6 +5532,8 @@ module Io
5510
5532
  PRICING_UPSERTED = 'pricing_upserted' unless defined?(PRICING_UPSERTED)
5511
5533
  TIER_UPSERTED = 'tier_upserted' unless defined?(TIER_UPSERTED)
5512
5534
  TIER_DELETED = 'tier_deleted' unless defined?(TIER_DELETED)
5535
+ DELIVERY_OPTION_UPSERTED = 'delivery_option_upserted' unless defined?(DELIVERY_OPTION_UPSERTED)
5536
+ DELIVERY_OPTION_DELETED = 'delivery_option_deleted' unless defined?(DELIVERY_OPTION_DELETED)
5513
5537
  HS6_CODE_UPSERTED = 'hs6_code_upserted' unless defined?(HS6_CODE_UPSERTED)
5514
5538
  HS6_CODE_DELETED = 'hs6_code_deleted' unless defined?(HS6_CODE_DELETED)
5515
5539
  HS10_CODE_UPSERTED = 'hs10_code_upserted' unless defined?(HS10_CODE_UPSERTED)
@@ -5575,7 +5599,7 @@ module Io
5575
5599
  end
5576
5600
 
5577
5601
  def subtype_to_hash
5578
- raise 'Cannot serialize an instance of event directly - must use one of the specific types: attribute_upserted, attribute_deleted, 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, experience_deleted, experience_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, tier_upserted, tier_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, reversal_upserted, 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'
5602
+ raise 'Cannot serialize an instance of event directly - must use one of the specific types: attribute_upserted, attribute_deleted, 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, experience_deleted, experience_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, 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, reversal_upserted, 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'
5579
5603
  end
5580
5604
 
5581
5605
  def to_hash
@@ -5623,6 +5647,8 @@ module Io
5623
5647
  when Types::PRICING_UPSERTED; PricingUpserted.new(hash)
5624
5648
  when Types::TIER_UPSERTED; TierUpserted.new(hash)
5625
5649
  when Types::TIER_DELETED; TierDeleted.new(hash)
5650
+ when Types::DELIVERY_OPTION_UPSERTED; DeliveryOptionUpserted.new(hash)
5651
+ when Types::DELIVERY_OPTION_DELETED; DeliveryOptionDeleted.new(hash)
5626
5652
  when Types::HS6_CODE_UPSERTED; Hs6CodeUpserted.new(hash)
5627
5653
  when Types::HS6_CODE_DELETED; Hs6CodeDeleted.new(hash)
5628
5654
  when Types::HS10_CODE_UPSERTED; Hs10CodeUpserted.new(hash)
@@ -8453,6 +8479,56 @@ module Io
8453
8479
 
8454
8480
  end
8455
8481
 
8482
+ class DeliveryWindowComponentSource
8483
+
8484
+ attr_reader :value
8485
+
8486
+ def initialize(value)
8487
+ @value = HttpClient::Preconditions.assert_class('value', value, String)
8488
+ end
8489
+
8490
+ # Returns the instance of DeliveryWindowComponentSource for this value, creating a new instance for an unknown value
8491
+ def DeliveryWindowComponentSource.apply(value)
8492
+ if value.instance_of?(DeliveryWindowComponentSource)
8493
+ value
8494
+ else
8495
+ HttpClient::Preconditions.assert_class_or_nil('value', value, String)
8496
+ value.nil? ? nil : (from_string(value) || DeliveryWindowComponentSource.new(value))
8497
+ end
8498
+ end
8499
+
8500
+ # Returns the instance of DeliveryWindowComponentSource for this value, or nil if not found
8501
+ def DeliveryWindowComponentSource.from_string(value)
8502
+ HttpClient::Preconditions.assert_class('value', value, String)
8503
+ DeliveryWindowComponentSource.ALL.find { |v| v.value == value }
8504
+ end
8505
+
8506
+ def DeliveryWindowComponentSource.ALL
8507
+ @@all ||= [DeliveryWindowComponentSource.flow, DeliveryWindowComponentSource.organization, DeliveryWindowComponentSource.carrier, DeliveryWindowComponentSource.center]
8508
+ end
8509
+
8510
+ def DeliveryWindowComponentSource.flow
8511
+ @@_flow ||= DeliveryWindowComponentSource.new('flow')
8512
+ end
8513
+
8514
+ def DeliveryWindowComponentSource.organization
8515
+ @@_organization ||= DeliveryWindowComponentSource.new('organization')
8516
+ end
8517
+
8518
+ def DeliveryWindowComponentSource.carrier
8519
+ @@_carrier ||= DeliveryWindowComponentSource.new('carrier')
8520
+ end
8521
+
8522
+ def DeliveryWindowComponentSource.center
8523
+ @@_center ||= DeliveryWindowComponentSource.new('center')
8524
+ end
8525
+
8526
+ def to_hash
8527
+ value
8528
+ end
8529
+
8530
+ end
8531
+
8456
8532
  class Direction
8457
8533
 
8458
8534
  attr_reader :value
@@ -8568,7 +8644,7 @@ module Io
8568
8644
  end
8569
8645
 
8570
8646
  def EventType.ALL
8571
- @@all ||= [EventType.attribute_upserted, EventType.attribute_deleted, 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.experience_deleted, EventType.experience_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.tier_upserted, EventType.tier_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.reversal_upserted, 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]
8647
+ @@all ||= [EventType.attribute_upserted, EventType.attribute_deleted, 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.experience_deleted, EventType.experience_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.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.reversal_upserted, 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]
8572
8648
  end
8573
8649
 
8574
8650
  def EventType.attribute_upserted
@@ -8707,6 +8783,14 @@ module Io
8707
8783
  @@_tier_deleted ||= EventType.new('tier_deleted')
8708
8784
  end
8709
8785
 
8786
+ def EventType.delivery_option_upserted
8787
+ @@_delivery_option_upserted ||= EventType.new('delivery_option_upserted')
8788
+ end
8789
+
8790
+ def EventType.delivery_option_deleted
8791
+ @@_delivery_option_deleted ||= EventType.new('delivery_option_deleted')
8792
+ end
8793
+
8710
8794
  def EventType.hs6_code_upserted
8711
8795
  @@_hs6_code_upserted ||= EventType.new('hs6_code_upserted')
8712
8796
  end
@@ -15791,6 +15875,39 @@ module Io
15791
15875
 
15792
15876
  end
15793
15877
 
15878
+ class DeliveryOptionDeleted < Event
15879
+
15880
+ attr_reader :event_id, :timestamp, :organization, :id
15881
+
15882
+ def initialize(incoming={})
15883
+ super(:discriminator => Event::Types::DELIVERY_OPTION_DELETED)
15884
+ opts = HttpClient::Helper.symbolize_keys(incoming)
15885
+ HttpClient::Preconditions.require_keys(opts, [:event_id, :timestamp, :organization, :id], 'DeliveryOptionDeleted')
15886
+ @event_id = HttpClient::Preconditions.assert_class('event_id', opts.delete(:event_id), String)
15887
+ @timestamp = HttpClient::Preconditions.assert_class('timestamp', HttpClient::Helper.to_date_time_iso8601(opts.delete(:timestamp)), DateTime)
15888
+ @organization = HttpClient::Preconditions.assert_class('organization', opts.delete(:organization), String)
15889
+ @id = HttpClient::Preconditions.assert_class('id', opts.delete(:id), String)
15890
+ end
15891
+
15892
+ def to_json
15893
+ JSON.dump(to_hash)
15894
+ end
15895
+
15896
+ def copy(incoming={})
15897
+ DeliveryOptionDeleted.new(subtype_to_hash.merge(HttpClient::Helper.symbolize_keys(incoming)))
15898
+ end
15899
+
15900
+ def subtype_to_hash
15901
+ {
15902
+ :event_id => event_id,
15903
+ :timestamp => timestamp,
15904
+ :organization => organization,
15905
+ :id => id
15906
+ }
15907
+ end
15908
+
15909
+ end
15910
+
15794
15911
  # Represents a way to fulfill a delivery, including an estimates for the date
15795
15912
  # range and cost
15796
15913
  class DeliveryOptionForm
@@ -15887,6 +16004,57 @@ module Io
15887
16004
 
15888
16005
  end
15889
16006
 
16007
+ class DeliveryOptionUpserted < Event
16008
+
16009
+ attr_reader :event_id, :timestamp, :organization, :id, :cost, :price, :delivered_duty, :service_id, :tier, :window, :rule_outcome, :weight, :delivery_window_components
16010
+
16011
+ def initialize(incoming={})
16012
+ super(:discriminator => Event::Types::DELIVERY_OPTION_UPSERTED)
16013
+ opts = HttpClient::Helper.symbolize_keys(incoming)
16014
+ HttpClient::Preconditions.require_keys(opts, [:event_id, :timestamp, :organization, :id, :cost, :price, :delivered_duty, :service_id, :tier, :window, :rule_outcome, :delivery_window_components], 'DeliveryOptionUpserted')
16015
+ @event_id = HttpClient::Preconditions.assert_class('event_id', opts.delete(:event_id), String)
16016
+ @timestamp = HttpClient::Preconditions.assert_class('timestamp', HttpClient::Helper.to_date_time_iso8601(opts.delete(:timestamp)), DateTime)
16017
+ @organization = HttpClient::Preconditions.assert_class('organization', opts.delete(:organization), String)
16018
+ @id = HttpClient::Preconditions.assert_class('id', opts.delete(:id), String)
16019
+ @cost = HttpClient::Preconditions.assert_class('cost', HttpClient::Helper.to_object(opts.delete(:cost)), Hash)
16020
+ @price = HttpClient::Preconditions.assert_class('price', HttpClient::Helper.to_object(opts.delete(:price)), Hash)
16021
+ @delivered_duty = HttpClient::Preconditions.assert_class('delivered_duty', opts.delete(:delivered_duty), String)
16022
+ @service_id = HttpClient::Preconditions.assert_class('service_id', opts.delete(:service_id), String)
16023
+ @tier = HttpClient::Preconditions.assert_class('tier', HttpClient::Helper.to_object(opts.delete(:tier)), Hash)
16024
+ @window = HttpClient::Preconditions.assert_class('window', HttpClient::Helper.to_object(opts.delete(:window)), Hash)
16025
+ @rule_outcome = HttpClient::Preconditions.assert_class('rule_outcome', HttpClient::Helper.to_object(opts.delete(:rule_outcome)), Hash)
16026
+ @weight = (x = opts.delete(:weight); x.nil? ? nil : HttpClient::Preconditions.assert_class('weight', HttpClient::Helper.to_object(x), Hash))
16027
+ @delivery_window_components = HttpClient::Preconditions.assert_class('delivery_window_components', HttpClient::Helper.to_object(opts.delete(:delivery_window_components)), Hash)
16028
+ end
16029
+
16030
+ def to_json
16031
+ JSON.dump(to_hash)
16032
+ end
16033
+
16034
+ def copy(incoming={})
16035
+ DeliveryOptionUpserted.new(subtype_to_hash.merge(HttpClient::Helper.symbolize_keys(incoming)))
16036
+ end
16037
+
16038
+ def subtype_to_hash
16039
+ {
16040
+ :event_id => event_id,
16041
+ :timestamp => timestamp,
16042
+ :organization => organization,
16043
+ :id => id,
16044
+ :cost => cost,
16045
+ :price => price,
16046
+ :delivered_duty => delivered_duty,
16047
+ :service_id => service_id,
16048
+ :tier => tier,
16049
+ :window => window,
16050
+ :rule_outcome => rule_outcome,
16051
+ :weight => weight,
16052
+ :delivery_window_components => delivery_window_components
16053
+ }
16054
+ end
16055
+
16056
+ end
16057
+
15890
16058
  class DeliveryOptionVersion
15891
16059
 
15892
16060
  attr_reader :id, :timestamp, :type, :delivery_option
@@ -15979,6 +16147,9 @@ module Io
15979
16147
 
15980
16148
  end
15981
16149
 
16150
+ # Flow's estimate of when a shipment for this delivery will actually arrive at
16151
+ # the final destination, taking into account a shipment estimate, center
16152
+ # schedules, and carrier transit windows.
15982
16153
  class DeliveryWindow
15983
16154
 
15984
16155
  attr_reader :from, :to, :timezone, :label
@@ -16011,6 +16182,66 @@ module Io
16011
16182
 
16012
16183
  end
16013
16184
 
16185
+ class DeliveryWindowComponent
16186
+
16187
+ attr_reader :from, :to, :source
16188
+
16189
+ def initialize(incoming={})
16190
+ opts = HttpClient::Helper.symbolize_keys(incoming)
16191
+ HttpClient::Preconditions.require_keys(opts, [:from, :to, :source], 'DeliveryWindowComponent')
16192
+ @from = HttpClient::Preconditions.assert_class('from', HttpClient::Helper.to_date_time_iso8601(opts.delete(:from)), DateTime)
16193
+ @to = HttpClient::Preconditions.assert_class('to', HttpClient::Helper.to_date_time_iso8601(opts.delete(:to)), DateTime)
16194
+ @source = (x = opts.delete(:source); x.is_a?(::Io::Flow::V0::Models::DeliveryWindowComponentSource) ? x : ::Io::Flow::V0::Models::DeliveryWindowComponentSource.apply(x))
16195
+ end
16196
+
16197
+ def to_json
16198
+ JSON.dump(to_hash)
16199
+ end
16200
+
16201
+ def copy(incoming={})
16202
+ DeliveryWindowComponent.new(to_hash.merge(HttpClient::Helper.symbolize_keys(incoming)))
16203
+ end
16204
+
16205
+ def to_hash
16206
+ {
16207
+ :from => from,
16208
+ :to => to,
16209
+ :source => source.value
16210
+ }
16211
+ end
16212
+
16213
+ end
16214
+
16215
+ # Components and information taken into account when calculating a final
16216
+ # delivery window.
16217
+ class DeliveryWindowComponents
16218
+
16219
+ attr_reader :shipment_estimate, :transit_estimate
16220
+
16221
+ def initialize(incoming={})
16222
+ opts = HttpClient::Helper.symbolize_keys(incoming)
16223
+ HttpClient::Preconditions.require_keys(opts, [:shipment_estimate, :transit_estimate], 'DeliveryWindowComponents')
16224
+ @shipment_estimate = (x = opts.delete(:shipment_estimate); x.is_a?(::Io::Flow::V0::Models::DeliveryWindowComponent) ? x : ::Io::Flow::V0::Models::DeliveryWindowComponent.new(x))
16225
+ @transit_estimate = (x = opts.delete(:transit_estimate); x.is_a?(::Io::Flow::V0::Models::DeliveryWindowComponent) ? x : ::Io::Flow::V0::Models::DeliveryWindowComponent.new(x))
16226
+ end
16227
+
16228
+ def to_json
16229
+ JSON.dump(to_hash)
16230
+ end
16231
+
16232
+ def copy(incoming={})
16233
+ DeliveryWindowComponents.new(to_hash.merge(HttpClient::Helper.symbolize_keys(incoming)))
16234
+ end
16235
+
16236
+ def to_hash
16237
+ {
16238
+ :shipment_estimate => shipment_estimate.to_hash,
16239
+ :transit_estimate => transit_estimate.to_hash
16240
+ }
16241
+ end
16242
+
16243
+ end
16244
+
16014
16245
  # De Minimis per item describes rules which require minimum and/or maximum
16015
16246
  # values per item
16016
16247
  class DeminimisPerItem < Deminimis
@@ -17255,8 +17486,8 @@ module Io
17255
17486
 
17256
17487
  def initialize(incoming={})
17257
17488
  opts = HttpClient::Helper.symbolize_keys(incoming)
17258
- HttpClient::Preconditions.require_keys(opts, [:change_source, :reason, :lines], 'FulfillmentCancellationForm')
17259
- @change_source = (x = opts.delete(:change_source); x.is_a?(::Io::Flow::V0::Models::OrderChangeSource) ? x : ::Io::Flow::V0::Models::OrderChangeSource.apply(x))
17489
+ HttpClient::Preconditions.require_keys(opts, [:reason, :lines], 'FulfillmentCancellationForm')
17490
+ @change_source = (x = (x = opts.delete(:change_source); x.nil? ? "fulfillment" : x); x.is_a?(::Io::Flow::V0::Models::OrderChangeSource) ? x : ::Io::Flow::V0::Models::OrderChangeSource.apply(x))
17260
17491
  @reason = (x = opts.delete(:reason); x.is_a?(::Io::Flow::V0::Models::CancelReason) ? x : ::Io::Flow::V0::Models::CancelReason.apply(x))
17261
17492
  @lines = HttpClient::Preconditions.assert_class('lines', opts.delete(:lines), Array).map { |v| (x = v; x.is_a?(::Io::Flow::V0::Models::FulfillmentLineCancelForm) ? x : ::Io::Flow::V0::Models::FulfillmentLineCancelForm.new(x)) }
17262
17493
  end
@@ -17287,8 +17518,8 @@ module Io
17287
17518
 
17288
17519
  def initialize(incoming={})
17289
17520
  opts = HttpClient::Helper.symbolize_keys(incoming)
17290
- HttpClient::Preconditions.require_keys(opts, [:change_source, :reason], 'FulfillmentCompleteCancellationForm')
17291
- @change_source = (x = opts.delete(:change_source); x.is_a?(::Io::Flow::V0::Models::OrderChangeSource) ? x : ::Io::Flow::V0::Models::OrderChangeSource.apply(x))
17521
+ HttpClient::Preconditions.require_keys(opts, [:reason], 'FulfillmentCompleteCancellationForm')
17522
+ @change_source = (x = (x = opts.delete(:change_source); x.nil? ? "fulfillment" : x); x.is_a?(::Io::Flow::V0::Models::OrderChangeSource) ? x : ::Io::Flow::V0::Models::OrderChangeSource.apply(x))
17292
17523
  @reason = (x = opts.delete(:reason); x.is_a?(::Io::Flow::V0::Models::CancelReason) ? x : ::Io::Flow::V0::Models::CancelReason.apply(x))
17293
17524
  end
17294
17525
 
@@ -22746,7 +22977,7 @@ module Io
22746
22977
  # type of the payment can be used to further lookup transaction level detail
22747
22978
  class OrderPayment
22748
22979
 
22749
- attr_reader :id, :type, :reference, :description, :total
22980
+ attr_reader :id, :type, :reference, :description, :total, :address
22750
22981
 
22751
22982
  def initialize(incoming={})
22752
22983
  opts = HttpClient::Helper.symbolize_keys(incoming)
@@ -22756,6 +22987,7 @@ module Io
22756
22987
  @reference = HttpClient::Preconditions.assert_class('reference', opts.delete(:reference), String)
22757
22988
  @description = HttpClient::Preconditions.assert_class('description', opts.delete(:description), String)
22758
22989
  @total = (x = opts.delete(:total); x.is_a?(::Io::Flow::V0::Models::PriceWithBase) ? x : ::Io::Flow::V0::Models::PriceWithBase.new(x))
22990
+ @address = (x = opts.delete(:address); x.nil? ? nil : (x = x; x.is_a?(::Io::Flow::V0::Models::Address) ? x : ::Io::Flow::V0::Models::Address.new(x)))
22759
22991
  end
22760
22992
 
22761
22993
  def to_json
@@ -22772,7 +23004,8 @@ module Io
22772
23004
  :type => type.value,
22773
23005
  :reference => reference,
22774
23006
  :description => description,
22775
- :total => total.to_hash
23007
+ :total => total.to_hash,
23008
+ :address => address.nil? ? nil : address.to_hash
22776
23009
  }
22777
23010
  end
22778
23011
 
@@ -30078,6 +30311,81 @@ module Io
30078
30311
 
30079
30312
  end
30080
30313
 
30314
+ # Virtual card details
30315
+ class VirtualCard
30316
+
30317
+ attr_reader :id, :key, :number, :cvv, :limit, :type, :expiration, :iin, :last4, :name, :attributes
30318
+
30319
+ def initialize(incoming={})
30320
+ opts = HttpClient::Helper.symbolize_keys(incoming)
30321
+ HttpClient::Preconditions.require_keys(opts, [:id, :key, :number, :cvv, :limit, :type, :expiration, :iin, :last4, :name], 'VirtualCard')
30322
+ @id = HttpClient::Preconditions.assert_class('id', opts.delete(:id), String)
30323
+ @key = HttpClient::Preconditions.assert_class('key', opts.delete(:key), String)
30324
+ @number = HttpClient::Preconditions.assert_class('number', opts.delete(:number), String)
30325
+ @cvv = HttpClient::Preconditions.assert_class('cvv', opts.delete(:cvv), String)
30326
+ @limit = (x = opts.delete(:limit); x.is_a?(::Io::Flow::V0::Models::Price) ? x : ::Io::Flow::V0::Models::Price.new(x))
30327
+ @type = (x = opts.delete(:type); x.is_a?(::Io::Flow::V0::Models::CardType) ? x : ::Io::Flow::V0::Models::CardType.apply(x))
30328
+ @expiration = (x = opts.delete(:expiration); x.is_a?(::Io::Flow::V0::Models::Expiration) ? x : ::Io::Flow::V0::Models::Expiration.new(x))
30329
+ @iin = HttpClient::Preconditions.assert_class('iin', opts.delete(:iin), String)
30330
+ @last4 = HttpClient::Preconditions.assert_class('last4', opts.delete(:last4), String)
30331
+ @name = HttpClient::Preconditions.assert_class('name', opts.delete(:name), String)
30332
+ @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 })
30333
+ end
30334
+
30335
+ def to_json
30336
+ JSON.dump(to_hash)
30337
+ end
30338
+
30339
+ def copy(incoming={})
30340
+ VirtualCard.new(to_hash.merge(HttpClient::Helper.symbolize_keys(incoming)))
30341
+ end
30342
+
30343
+ def to_hash
30344
+ {
30345
+ :id => id,
30346
+ :key => key,
30347
+ :number => number,
30348
+ :cvv => cvv,
30349
+ :limit => limit.to_hash,
30350
+ :type => type.value,
30351
+ :expiration => expiration.to_hash,
30352
+ :iin => iin,
30353
+ :last4 => last4,
30354
+ :name => name,
30355
+ :attributes => attributes.nil? ? nil : attributes
30356
+ }
30357
+ end
30358
+
30359
+ end
30360
+
30361
+ class VirtualCardForm
30362
+
30363
+ attr_reader :limit, :attributes
30364
+
30365
+ def initialize(incoming={})
30366
+ opts = HttpClient::Helper.symbolize_keys(incoming)
30367
+ HttpClient::Preconditions.require_keys(opts, [:limit], 'VirtualCardForm')
30368
+ @limit = (x = opts.delete(:limit); x.is_a?(::Io::Flow::V0::Models::Money) ? x : ::Io::Flow::V0::Models::Money.new(x))
30369
+ @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 })
30370
+ end
30371
+
30372
+ def to_json
30373
+ JSON.dump(to_hash)
30374
+ end
30375
+
30376
+ def copy(incoming={})
30377
+ VirtualCardForm.new(to_hash.merge(HttpClient::Helper.symbolize_keys(incoming)))
30378
+ end
30379
+
30380
+ def to_hash
30381
+ {
30382
+ :limit => limit.to_hash,
30383
+ :attributes => attributes.nil? ? nil : attributes
30384
+ }
30385
+ end
30386
+
30387
+ end
30388
+
30081
30389
  class Webhook
30082
30390
 
30083
30391
  attr_reader :id, :url, :events
metadata CHANGED
@@ -1,27 +1,27 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: flowcommerce
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.49
4
+ version: 0.2.50
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-11-12 00:00:00.000000000 Z
11
+ date: 2017-11-20 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: json
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - '>='
17
+ - - ">="
18
18
  - !ruby/object:Gem::Version
19
19
  version: '0'
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
- - - '>='
24
+ - - ">="
25
25
  - !ruby/object:Gem::Version
26
26
  version: '0'
27
27
  description: Native ruby client for the Flow REST API. Detailed information at https://app.apibuilder.io/flow/api
@@ -45,17 +45,17 @@ require_paths:
45
45
  - lib
46
46
  required_ruby_version: !ruby/object:Gem::Requirement
47
47
  requirements:
48
- - - '>='
48
+ - - ">="
49
49
  - !ruby/object:Gem::Version
50
50
  version: '0'
51
51
  required_rubygems_version: !ruby/object:Gem::Requirement
52
52
  requirements:
53
- - - '>='
53
+ - - ">="
54
54
  - !ruby/object:Gem::Version
55
55
  version: '0'
56
56
  requirements: []
57
57
  rubyforge_project:
58
- rubygems_version: 2.0.14.1
58
+ rubygems_version: 2.5.2
59
59
  signing_key:
60
60
  specification_version: 4
61
61
  summary: Native ruby client for the Flow REST API.