flowcommerce 0.2.39 → 0.2.40

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: 19b9488d1584681608258d0cef0ca67247127ae4
4
+ data.tar.gz: 32cef782749086cfd60253f5e5c213a346388e61
5
+ SHA512:
6
+ metadata.gz: 989e1e7280086432e5cf75b5e5243f6c39f2b8b5b3a5f2414fb6cec4e4c5c2a91a04f23dedc9786ee3fd19324ea32fa74129d8b5b878550a6cc4e299d02b30c9
7
+ data.tar.gz: 37e029ad48c293923074862d9f5e341cc800b430b1a15611af394b24d0aad991d0fbb0794db47cd6ac00621947fac7f1c8c754390e6793209f80473de399533e
@@ -1,6 +1,6 @@
1
1
  # Generated by API Builder - https://www.apibuilder.io
2
2
  # Service version: 0.3.65
3
- # apibuilder:0.12.61 https://app.apibuilder.io/flow/api/0.3.89/ruby_client
3
+ # apibuilder:0.12.61 https://app.apibuilder.io/flow/api/0.3.93/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.61 https://app.apibuilder.io/flow/api/0.3.89/ruby_client' unless defined?(Constants::USER_AGENT)
28
+ USER_AGENT = 'apibuilder:0.12.61 https://app.apibuilder.io/flow/api/0.3.93/ruby_client' unless defined?(Constants::USER_AGENT)
29
29
  VERSION = '0.3.65' unless defined?(Constants::VERSION)
30
30
  VERSION_MAJOR = 0 unless defined?(VERSION_MAJOR)
31
31
 
@@ -1351,14 +1351,6 @@ module Io
1351
1351
  r.map { |x| ::Io::Flow::V0::Models::RegionSetting.new(x) }
1352
1352
  end
1353
1353
 
1354
- # Updates or creates a region setting for a specific organization
1355
- def put_settings_and_regions_by_organization_id(organization_id, region_setting_form)
1356
- HttpClient::Preconditions.assert_class('organization_id', organization_id, String)
1357
- (x = region_setting_form; x.is_a?(::Io::Flow::V0::Models::RegionSettingForm) ? x : ::Io::Flow::V0::Models::RegionSettingForm.new(x))
1358
- r = @client.request("/organizations/#{CGI.escape(organization_id)}/settings/regions").with_json(region_setting_form.to_json).put
1359
- ::Io::Flow::V0::Models::RegionSetting.new(r)
1360
- end
1361
-
1362
1354
  # Removes the setting for this region for a specific organization
1363
1355
  def delete_settings_and_regions_by_organization_id_and_id(organization_id, id)
1364
1356
  HttpClient::Preconditions.assert_class('organization_id', organization_id, String)
@@ -1367,6 +1359,15 @@ module Io
1367
1359
  nil
1368
1360
  end
1369
1361
 
1362
+ # Updates or creates a region setting for a specific organization
1363
+ def put_settings_and_regions_by_organization_id_and_region(organization_id, region, region_setting_form)
1364
+ HttpClient::Preconditions.assert_class('organization_id', organization_id, String)
1365
+ HttpClient::Preconditions.assert_class('region', region, String)
1366
+ (x = region_setting_form; x.is_a?(::Io::Flow::V0::Models::RegionSettingForm) ? x : ::Io::Flow::V0::Models::RegionSettingForm.new(x))
1367
+ r = @client.request("/organizations/#{CGI.escape(organization_id)}/settings/regions/#{CGI.escape(region)}").with_json(region_setting_form.to_json).put
1368
+ ::Io::Flow::V0::Models::RegionSetting.new(r)
1369
+ end
1370
+
1370
1371
  # Returns the list of enabled countries based on the region settings for a
1371
1372
  # specific organization
1372
1373
  def get_settings_and_regions_and_countries_and_available_by_organization_id(organization_id)
@@ -5423,6 +5424,8 @@ module Io
5423
5424
  HARMONIZED_ITEM_UPSERTED = 'harmonized_item_upserted' unless defined?(HARMONIZED_ITEM_UPSERTED)
5424
5425
  HARMONIZED_ITEM_DELETED = 'harmonized_item_deleted' unless defined?(HARMONIZED_ITEM_DELETED)
5425
5426
  HARMONIZED_LANDED_COST_UPSERTED = 'harmonized_landed_cost_upserted' unless defined?(HARMONIZED_LANDED_COST_UPSERTED)
5427
+ RULE_UPSERTED = 'rule_upserted' unless defined?(RULE_UPSERTED)
5428
+ RULE_DELETED = 'rule_deleted' unless defined?(RULE_DELETED)
5426
5429
  SNAPSHOT_UPSERTED = 'snapshot_upserted' unless defined?(SNAPSHOT_UPSERTED)
5427
5430
  SNAPSHOT_DELETED = 'snapshot_deleted' unless defined?(SNAPSHOT_DELETED)
5428
5431
  LABEL_UPSERTED = 'label_upserted' unless defined?(LABEL_UPSERTED)
@@ -5475,7 +5478,7 @@ module Io
5475
5478
  end
5476
5479
 
5477
5480
  def subtype_to_hash
5478
- 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, 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, 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, return_upserted, return_deleted, targeting_item_upserted, targeting_item_deleted, tracking_label_event_upserted'
5481
+ 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, 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, 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, return_upserted, return_deleted, targeting_item_upserted, targeting_item_deleted, tracking_label_event_upserted'
5479
5482
  end
5480
5483
 
5481
5484
  def to_hash
@@ -5530,6 +5533,8 @@ module Io
5530
5533
  when Types::HARMONIZED_ITEM_UPSERTED; HarmonizedItemUpserted.new(hash)
5531
5534
  when Types::HARMONIZED_ITEM_DELETED; HarmonizedItemDeleted.new(hash)
5532
5535
  when Types::HARMONIZED_LANDED_COST_UPSERTED; HarmonizedLandedCostUpserted.new(hash)
5536
+ when Types::RULE_UPSERTED; RuleUpserted.new(hash)
5537
+ when Types::RULE_DELETED; RuleDeleted.new(hash)
5533
5538
  when Types::SNAPSHOT_UPSERTED; SnapshotUpserted.new(hash)
5534
5539
  when Types::SNAPSHOT_DELETED; SnapshotDeleted.new(hash)
5535
5540
  when Types::LABEL_UPSERTED; LabelUpserted.new(hash)
@@ -8407,7 +8412,7 @@ module Io
8407
8412
  end
8408
8413
 
8409
8414
  def EventType.ALL
8410
- @@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.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.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.return_upserted, EventType.return_deleted, EventType.targeting_item_upserted, EventType.targeting_item_deleted, EventType.tracking_label_event_upserted]
8415
+ @@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.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.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.return_upserted, EventType.return_deleted, EventType.targeting_item_upserted, EventType.targeting_item_deleted, EventType.tracking_label_event_upserted]
8411
8416
  end
8412
8417
 
8413
8418
  def EventType.attribute_upserted
@@ -8574,6 +8579,14 @@ module Io
8574
8579
  @@_harmonized_landed_cost_upserted ||= EventType.new('harmonized_landed_cost_upserted')
8575
8580
  end
8576
8581
 
8582
+ def EventType.rule_upserted
8583
+ @@_rule_upserted ||= EventType.new('rule_upserted')
8584
+ end
8585
+
8586
+ def EventType.rule_deleted
8587
+ @@_rule_deleted ||= EventType.new('rule_deleted')
8588
+ end
8589
+
8577
8590
  def EventType.snapshot_upserted
8578
8591
  @@_snapshot_upserted ||= EventType.new('snapshot_upserted')
8579
8592
  end
@@ -13351,7 +13364,7 @@ module Io
13351
13364
  # authorization otherwise becomes unavailable (e.g. expires).
13352
13365
  class Capture
13353
13366
 
13354
- attr_reader :id, :key, :authorization, :amount, :currency, :original, :created_at, :attributes
13367
+ attr_reader :id, :key, :authorization, :amount, :currency, :requested, :created_at, :attributes
13355
13368
 
13356
13369
  def initialize(incoming={})
13357
13370
  opts = HttpClient::Helper.symbolize_keys(incoming)
@@ -13361,7 +13374,7 @@ module Io
13361
13374
  @authorization = (x = opts.delete(:authorization); x.is_a?(::Io::Flow::V0::Models::AuthorizationReference) ? x : ::Io::Flow::V0::Models::AuthorizationReference.new(x))
13362
13375
  @amount = HttpClient::Preconditions.assert_class('amount', HttpClient::Helper.to_big_decimal(opts.delete(:amount)), BigDecimal)
13363
13376
  @currency = HttpClient::Preconditions.assert_class('currency', opts.delete(:currency), String)
13364
- @original = (x = opts.delete(:original); x.nil? ? nil : (x = x; x.is_a?(::Io::Flow::V0::Models::Money) ? x : ::Io::Flow::V0::Models::Money.new(x)))
13377
+ @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)))
13365
13378
  @created_at = HttpClient::Preconditions.assert_class('created_at', HttpClient::Helper.to_date_time_iso8601(opts.delete(:created_at)), DateTime)
13366
13379
  @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 })
13367
13380
  end
@@ -13381,7 +13394,7 @@ module Io
13381
13394
  :authorization => authorization.to_hash,
13382
13395
  :amount => amount,
13383
13396
  :currency => currency,
13384
- :original => original.nil? ? nil : original.to_hash,
13397
+ :requested => requested.nil? ? nil : requested.to_hash,
13385
13398
  :created_at => created_at,
13386
13399
  :attributes => attributes.nil? ? nil : attributes
13387
13400
  }
@@ -13618,7 +13631,7 @@ module Io
13618
13631
  # capture up to the amount of the authorization.
13619
13632
  class CardAuthorization < Authorization
13620
13633
 
13621
- attr_reader :id, :key, :card, :amount, :currency, :customer, :attributes, :destination, :order, :ip, :result, :created_at, :expires_at
13634
+ attr_reader :id, :key, :card, :amount, :currency, :requested, :customer, :attributes, :destination, :order, :ip, :result, :created_at, :expires_at
13622
13635
 
13623
13636
  def initialize(incoming={})
13624
13637
  super(:discriminator => Authorization::Types::CARD_AUTHORIZATION)
@@ -13629,6 +13642,7 @@ module Io
13629
13642
  @card = (x = opts.delete(:card); x.is_a?(::Io::Flow::V0::Models::ExpandableCard) ? x : ::Io::Flow::V0::Models::ExpandableCard.from_json(x))
13630
13643
  @amount = HttpClient::Preconditions.assert_class('amount', HttpClient::Helper.to_big_decimal(opts.delete(:amount)), BigDecimal)
13631
13644
  @currency = HttpClient::Preconditions.assert_class('currency', opts.delete(:currency), String)
13645
+ @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)))
13632
13646
  @customer = (x = opts.delete(:customer); x.is_a?(::Io::Flow::V0::Models::Customer) ? x : ::Io::Flow::V0::Models::Customer.new(x))
13633
13647
  @attributes = HttpClient::Preconditions.assert_class('attributes', opts.delete(:attributes), Hash).inject({}) { |h, d| h[d[0]] = HttpClient::Preconditions.assert_class('attributes', d[1], String); h }
13634
13648
  @destination = (x = opts.delete(:destination); x.nil? ? nil : (x = x; x.is_a?(::Io::Flow::V0::Models::Address) ? x : ::Io::Flow::V0::Models::Address.new(x)))
@@ -13654,6 +13668,7 @@ module Io
13654
13668
  :card => card.to_hash,
13655
13669
  :amount => amount,
13656
13670
  :currency => currency,
13671
+ :requested => requested.nil? ? nil : requested.to_hash,
13657
13672
  :customer => customer.to_hash,
13658
13673
  :attributes => attributes,
13659
13674
  :destination => destination.nil? ? nil : destination.to_hash,
@@ -21139,7 +21154,7 @@ module Io
21139
21154
 
21140
21155
  class OnlineAuthorization < Authorization
21141
21156
 
21142
- attr_reader :id, :key, :method, :details, :payment, :amount, :currency, :customer, :attributes, :destination, :order, :ip, :result, :created_at, :expires_at
21157
+ attr_reader :id, :key, :method, :details, :payment, :amount, :currency, :requested, :customer, :attributes, :destination, :order, :ip, :result, :created_at, :expires_at
21143
21158
 
21144
21159
  def initialize(incoming={})
21145
21160
  super(:discriminator => Authorization::Types::ONLINE_AUTHORIZATION)
@@ -21152,6 +21167,7 @@ module Io
21152
21167
  @payment = (x = opts.delete(:payment); x.nil? ? nil : HttpClient::Preconditions.assert_class('payment', HttpClient::Helper.to_object(x), Hash))
21153
21168
  @amount = HttpClient::Preconditions.assert_class('amount', HttpClient::Helper.to_big_decimal(opts.delete(:amount)), BigDecimal)
21154
21169
  @currency = HttpClient::Preconditions.assert_class('currency', opts.delete(:currency), String)
21170
+ @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)))
21155
21171
  @customer = (x = opts.delete(:customer); x.is_a?(::Io::Flow::V0::Models::Customer) ? x : ::Io::Flow::V0::Models::Customer.new(x))
21156
21172
  @attributes = HttpClient::Preconditions.assert_class('attributes', opts.delete(:attributes), Hash).inject({}) { |h, d| h[d[0]] = HttpClient::Preconditions.assert_class('attributes', d[1], String); h }
21157
21173
  @destination = (x = opts.delete(:destination); x.nil? ? nil : (x = x; x.is_a?(::Io::Flow::V0::Models::Address) ? x : ::Io::Flow::V0::Models::Address.new(x)))
@@ -21179,6 +21195,7 @@ module Io
21179
21195
  :payment => payment,
21180
21196
  :amount => amount,
21181
21197
  :currency => currency,
21198
+ :requested => requested.nil? ? nil : requested.to_hash,
21182
21199
  :customer => customer.to_hash,
21183
21200
  :attributes => attributes,
21184
21201
  :destination => destination.nil? ? nil : destination.to_hash,
@@ -24805,7 +24822,7 @@ module Io
24805
24822
  # execute the refund).
24806
24823
  class Refund
24807
24824
 
24808
- attr_reader :id, :key, :authorization, :amount, :currency, :captures, :created_at, :attributes
24825
+ attr_reader :id, :key, :authorization, :amount, :currency, :requested, :captures, :created_at, :attributes
24809
24826
 
24810
24827
  def initialize(incoming={})
24811
24828
  opts = HttpClient::Helper.symbolize_keys(incoming)
@@ -24815,6 +24832,7 @@ module Io
24815
24832
  @authorization = (x = opts.delete(:authorization); x.is_a?(::Io::Flow::V0::Models::AuthorizationReference) ? x : ::Io::Flow::V0::Models::AuthorizationReference.new(x))
24816
24833
  @amount = HttpClient::Preconditions.assert_class('amount', HttpClient::Helper.to_big_decimal(opts.delete(:amount)), BigDecimal)
24817
24834
  @currency = HttpClient::Preconditions.assert_class('currency', opts.delete(:currency), String)
24835
+ @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)))
24818
24836
  @captures = HttpClient::Preconditions.assert_class('captures', opts.delete(:captures), Array).map { |v| (x = v; x.is_a?(::Io::Flow::V0::Models::RefundCapture) ? x : ::Io::Flow::V0::Models::RefundCapture.new(x)) }
24819
24837
  @created_at = HttpClient::Preconditions.assert_class('created_at', HttpClient::Helper.to_date_time_iso8601(opts.delete(:created_at)), DateTime)
24820
24838
  @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 })
@@ -24835,6 +24853,7 @@ module Io
24835
24853
  :authorization => authorization.to_hash,
24836
24854
  :amount => amount,
24837
24855
  :currency => currency,
24856
+ :requested => requested.nil? ? nil : requested.to_hash,
24838
24857
  :captures => captures.map { |o| o.to_hash },
24839
24858
  :created_at => created_at,
24840
24859
  :attributes => attributes.nil? ? nil : attributes
@@ -25202,7 +25221,7 @@ module Io
25202
25221
  opts = HttpClient::Helper.symbolize_keys(incoming)
25203
25222
  HttpClient::Preconditions.require_keys(opts, [:id, :region, :status], 'RegionSetting')
25204
25223
  @id = HttpClient::Preconditions.assert_class('id', opts.delete(:id), String)
25205
- @region = (x = opts.delete(:region); x.is_a?(::Io::Flow::V0::Models::Region) ? x : ::Io::Flow::V0::Models::Region.new(x))
25224
+ @region = HttpClient::Preconditions.assert_class('region', opts.delete(:region), String)
25206
25225
  @status = (x = opts.delete(:status); x.is_a?(::Io::Flow::V0::Models::AvailabilityStatus) ? x : ::Io::Flow::V0::Models::AvailabilityStatus.apply(x))
25207
25226
  end
25208
25227
 
@@ -25217,7 +25236,7 @@ module Io
25217
25236
  def to_hash
25218
25237
  {
25219
25238
  :id => id,
25220
- :region => region.to_hash,
25239
+ :region => region,
25221
25240
  :status => status.value
25222
25241
  }
25223
25242
  end
@@ -25226,12 +25245,11 @@ module Io
25226
25245
 
25227
25246
  class RegionSettingForm
25228
25247
 
25229
- attr_reader :region_id, :status
25248
+ attr_reader :status
25230
25249
 
25231
25250
  def initialize(incoming={})
25232
25251
  opts = HttpClient::Helper.symbolize_keys(incoming)
25233
- HttpClient::Preconditions.require_keys(opts, [:region_id, :status], 'RegionSettingForm')
25234
- @region_id = HttpClient::Preconditions.assert_class('region_id', opts.delete(:region_id), String)
25252
+ HttpClient::Preconditions.require_keys(opts, [:status], 'RegionSettingForm')
25235
25253
  @status = (x = opts.delete(:status); x.is_a?(::Io::Flow::V0::Models::AvailabilityStatus) ? x : ::Io::Flow::V0::Models::AvailabilityStatus.apply(x))
25236
25254
  end
25237
25255
 
@@ -25245,7 +25263,6 @@ module Io
25245
25263
 
25246
25264
  def to_hash
25247
25265
  {
25248
- :region_id => region_id,
25249
25266
  :status => status.value
25250
25267
  }
25251
25268
  end
@@ -25595,18 +25612,18 @@ module Io
25595
25612
  # A reversal is used to clear an authorization (full or partial).
25596
25613
  class Reversal
25597
25614
 
25598
- attr_reader :id, :key, :authorization, :status, :amount, :currency, :original, :created_at, :attributes
25615
+ attr_reader :id, :key, :authorization, :status, :amount, :currency, :requested, :created_at, :attributes
25599
25616
 
25600
25617
  def initialize(incoming={})
25601
25618
  opts = HttpClient::Helper.symbolize_keys(incoming)
25602
- HttpClient::Preconditions.require_keys(opts, [:id, :key, :authorization, :status, :amount, :currency, :original, :created_at, :attributes], 'Reversal')
25619
+ HttpClient::Preconditions.require_keys(opts, [:id, :key, :authorization, :status, :amount, :currency, :requested, :created_at, :attributes], 'Reversal')
25603
25620
  @id = HttpClient::Preconditions.assert_class('id', opts.delete(:id), String)
25604
25621
  @key = HttpClient::Preconditions.assert_class('key', opts.delete(:key), String)
25605
25622
  @authorization = (x = opts.delete(:authorization); x.is_a?(::Io::Flow::V0::Models::AuthorizationReference) ? x : ::Io::Flow::V0::Models::AuthorizationReference.new(x))
25606
25623
  @status = (x = opts.delete(:status); x.is_a?(::Io::Flow::V0::Models::ReversalStatus) ? x : ::Io::Flow::V0::Models::ReversalStatus.apply(x))
25607
25624
  @amount = HttpClient::Preconditions.assert_class('amount', HttpClient::Helper.to_big_decimal(opts.delete(:amount)), BigDecimal)
25608
25625
  @currency = HttpClient::Preconditions.assert_class('currency', opts.delete(:currency), String)
25609
- @original = (x = opts.delete(:original); x.is_a?(::Io::Flow::V0::Models::Money) ? x : ::Io::Flow::V0::Models::Money.new(x))
25626
+ @requested = (x = opts.delete(:requested); x.is_a?(::Io::Flow::V0::Models::Money) ? x : ::Io::Flow::V0::Models::Money.new(x))
25610
25627
  @created_at = HttpClient::Preconditions.assert_class('created_at', HttpClient::Helper.to_date_time_iso8601(opts.delete(:created_at)), DateTime)
25611
25628
  @attributes = HttpClient::Preconditions.assert_class('attributes', opts.delete(:attributes), Hash).inject({}) { |h, d| h[d[0]] = HttpClient::Preconditions.assert_class('attributes', d[1], String); h }
25612
25629
  end
@@ -25627,7 +25644,7 @@ module Io
25627
25644
  :status => status.value,
25628
25645
  :amount => amount,
25629
25646
  :currency => currency,
25630
- :original => original.to_hash,
25647
+ :requested => requested.to_hash,
25631
25648
  :created_at => created_at,
25632
25649
  :attributes => attributes
25633
25650
  }
@@ -25829,6 +25846,70 @@ module Io
25829
25846
 
25830
25847
  end
25831
25848
 
25849
+ class RuleDeleted < Event
25850
+
25851
+ attr_reader :event_id, :timestamp, :id
25852
+
25853
+ def initialize(incoming={})
25854
+ super(:discriminator => Event::Types::RULE_DELETED)
25855
+ opts = HttpClient::Helper.symbolize_keys(incoming)
25856
+ HttpClient::Preconditions.require_keys(opts, [:event_id, :timestamp, :id], 'RuleDeleted')
25857
+ @event_id = HttpClient::Preconditions.assert_class('event_id', opts.delete(:event_id), String)
25858
+ @timestamp = HttpClient::Preconditions.assert_class('timestamp', HttpClient::Helper.to_date_time_iso8601(opts.delete(:timestamp)), DateTime)
25859
+ @id = HttpClient::Preconditions.assert_class('id', opts.delete(:id), String)
25860
+ end
25861
+
25862
+ def to_json
25863
+ JSON.dump(to_hash)
25864
+ end
25865
+
25866
+ def copy(incoming={})
25867
+ RuleDeleted.new(subtype_to_hash.merge(HttpClient::Helper.symbolize_keys(incoming)))
25868
+ end
25869
+
25870
+ def subtype_to_hash
25871
+ {
25872
+ :event_id => event_id,
25873
+ :timestamp => timestamp,
25874
+ :id => id
25875
+ }
25876
+ end
25877
+
25878
+ end
25879
+
25880
+ class RuleUpserted < Event
25881
+
25882
+ attr_reader :event_id, :timestamp, :organization_id, :rule
25883
+
25884
+ def initialize(incoming={})
25885
+ super(:discriminator => Event::Types::RULE_UPSERTED)
25886
+ opts = HttpClient::Helper.symbolize_keys(incoming)
25887
+ HttpClient::Preconditions.require_keys(opts, [:event_id, :timestamp, :organization_id, :rule], 'RuleUpserted')
25888
+ @event_id = HttpClient::Preconditions.assert_class('event_id', opts.delete(:event_id), String)
25889
+ @timestamp = HttpClient::Preconditions.assert_class('timestamp', HttpClient::Helper.to_date_time_iso8601(opts.delete(:timestamp)), DateTime)
25890
+ @organization_id = HttpClient::Preconditions.assert_class('organization_id', opts.delete(:organization_id), String)
25891
+ @rule = (x = opts.delete(:rule); x.is_a?(::Io::Flow::V0::Models::InventoryRule) ? x : ::Io::Flow::V0::Models::InventoryRule.new(x))
25892
+ end
25893
+
25894
+ def to_json
25895
+ JSON.dump(to_hash)
25896
+ end
25897
+
25898
+ def copy(incoming={})
25899
+ RuleUpserted.new(subtype_to_hash.merge(HttpClient::Helper.symbolize_keys(incoming)))
25900
+ end
25901
+
25902
+ def subtype_to_hash
25903
+ {
25904
+ :event_id => event_id,
25905
+ :timestamp => timestamp,
25906
+ :organization_id => organization_id,
25907
+ :rule => rule.to_hash
25908
+ }
25909
+ end
25910
+
25911
+ end
25912
+
25832
25913
  # Represents operating calendar and holidays of a center
25833
25914
  class Schedule
25834
25915
 
metadata CHANGED
@@ -1,30 +1,27 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: flowcommerce
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.39
5
- prerelease:
4
+ version: 0.2.40
6
5
  platform: ruby
7
6
  authors:
8
7
  - Flow Commerce, Inc.
9
8
  autorequire:
10
9
  bindir: bin
11
10
  cert_chain: []
12
- date: 2017-09-27 00:00:00.000000000 Z
11
+ date: 2017-10-01 00:00:00.000000000 Z
13
12
  dependencies:
14
13
  - !ruby/object:Gem::Dependency
15
14
  name: json
16
15
  requirement: !ruby/object:Gem::Requirement
17
- none: false
18
16
  requirements:
19
- - - ! '>='
17
+ - - '>='
20
18
  - !ruby/object:Gem::Version
21
19
  version: '0'
22
20
  type: :runtime
23
21
  prerelease: false
24
22
  version_requirements: !ruby/object:Gem::Requirement
25
- none: false
26
23
  requirements:
27
- - - ! '>='
24
+ - - '>='
28
25
  - !ruby/object:Gem::Version
29
26
  version: '0'
30
27
  description: Native ruby client for the Flow REST API. Detailed information at https://app.apibuilder.io/flow/api
@@ -41,26 +38,25 @@ files:
41
38
  homepage: https://github.com/flowcommerce/ruby-sdk
42
39
  licenses:
43
40
  - MIT
41
+ metadata: {}
44
42
  post_install_message:
45
43
  rdoc_options: []
46
44
  require_paths:
47
45
  - lib
48
46
  required_ruby_version: !ruby/object:Gem::Requirement
49
- none: false
50
47
  requirements:
51
- - - ! '>='
48
+ - - '>='
52
49
  - !ruby/object:Gem::Version
53
50
  version: '0'
54
51
  required_rubygems_version: !ruby/object:Gem::Requirement
55
- none: false
56
52
  requirements:
57
- - - ! '>='
53
+ - - '>='
58
54
  - !ruby/object:Gem::Version
59
55
  version: '0'
60
56
  requirements: []
61
57
  rubyforge_project:
62
- rubygems_version: 1.8.23.2
58
+ rubygems_version: 2.0.14.1
63
59
  signing_key:
64
- specification_version: 3
60
+ specification_version: 4
65
61
  summary: Native ruby client for the Flow REST API.
66
62
  test_files: []