flowcommerce 0.2.46 → 0.2.47

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: 04085ab6022e18b11ce059b51378cbc918d60a1d
4
- data.tar.gz: 4059fdb96e8cda440cc9711251686bf68f1ea247
3
+ metadata.gz: 22eb821e4fbc76d0a2c9907e0c94d5fb5f0b66e3
4
+ data.tar.gz: d54de4c7362c01076f1c63c0e36c6c23b761c95a
5
5
  SHA512:
6
- metadata.gz: 9b9cfc17a140fba2a205c3f9119caec8373fc9a0c80aa95899ebf53a2a6f47cddb3e9089656909564ebe93323c993135c4816f983cb74703682b8343078ce7ca
7
- data.tar.gz: 77aad10616b0cf90970dc7e2c0ae26d5fe10a5e543221d01ec7cfa42f50ad557966ea48fa75801a298de880cc1fa207de84eeb24fe180a876c687bede80d5a94
6
+ metadata.gz: e25b50c3c769171b52fc3909f3ce353aa079bb1e8385f56054e343c323b61fa54821a97a85b5b42e0938f9ff7689b8f7a46d083da72363a209040b61f4eeaf19
7
+ data.tar.gz: 69a4744899e0f7f09a7877ddca1447fa86ea3d3878a59d9355aa6c94cfbe6d76f7e403abf4bec0102a6b2cf7b7c99568e70abaa979fb8f3392dccbed8390856b
@@ -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.14/ruby_client
3
+ # apibuilder:0.12.87 https://app.apibuilder.io/flow/api/0.4.20/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.14/ruby_client' unless defined?(Constants::USER_AGENT)
28
+ USER_AGENT = 'apibuilder:0.12.87 https://app.apibuilder.io/flow/api/0.4.20/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
 
@@ -1085,6 +1085,19 @@ module Io
1085
1085
  nil
1086
1086
  end
1087
1087
 
1088
+ # Creates an authorization, automatically associating to this order.
1089
+ def post_authorizations_by_number(organization, number, authorization_form, incoming={})
1090
+ HttpClient::Preconditions.assert_class('organization', organization, String)
1091
+ HttpClient::Preconditions.assert_class('number', number, String)
1092
+ opts = HttpClient::Helper.symbolize_keys(incoming)
1093
+ query = {
1094
+ :expand => (x = opts.delete(:expand); x.nil? ? nil : HttpClient::Preconditions.assert_class('expand', x, Array).map { |v| HttpClient::Preconditions.assert_class('expand', v, String) })
1095
+ }.delete_if { |k, v| v.nil? }
1096
+ (x = authorization_form; x.is_a?(::Io::Flow::V0::Models::AuthorizationForm) ? x : ::Io::Flow::V0::Models::AuthorizationForm.from_json(x))
1097
+ r = @client.request("/#{CGI.escape(organization)}/orders/#{CGI.escape(number)}/authorizations").with_query(query).with_json(authorization_form.to_json).post
1098
+ ::Io::Flow::V0::Models::Authorization.from_json(r)
1099
+ end
1100
+
1088
1101
  def put_cancellations_by_number(organization, number, order_cancellation_form)
1089
1102
  HttpClient::Preconditions.assert_class('organization', organization, String)
1090
1103
  HttpClient::Preconditions.assert_class('number', number, String)
@@ -1162,6 +1175,16 @@ module Io
1162
1175
  ::Io::Flow::V0::Models::OrderFraudStatus.new(r)
1163
1176
  end
1164
1177
 
1178
+ # Generate a shipping label given only an order number for the organziation.
1179
+ # This will assume all items in the order will be shipped and that there are
1180
+ # no updates to the contact or destination address information.
1181
+ def post_labels_by_number(organization, number)
1182
+ HttpClient::Preconditions.assert_class('organization', organization, String)
1183
+ HttpClient::Preconditions.assert_class('number', number, String)
1184
+ r = @client.request("/#{CGI.escape(organization)}/orders/#{CGI.escape(number)}/labels").post
1185
+ ::Io::Flow::V0::Models::ShippingLabel.new(r)
1186
+ end
1187
+
1165
1188
  end
1166
1189
 
1167
1190
  class OrderEstimates
@@ -5439,6 +5462,8 @@ module Io
5439
5462
  ORDER_UPSERTED = 'order_upserted' unless defined?(ORDER_UPSERTED)
5440
5463
  ORDER_IDENTIFIER_DELETED = 'order_identifier_deleted' unless defined?(ORDER_IDENTIFIER_DELETED)
5441
5464
  ORDER_IDENTIFIER_UPSERTED = 'order_identifier_upserted' unless defined?(ORDER_IDENTIFIER_UPSERTED)
5465
+ ORDER_IDENTIFIER_DELETED_V2 = 'order_identifier_deleted_v2' unless defined?(ORDER_IDENTIFIER_DELETED_V2)
5466
+ ORDER_IDENTIFIER_UPSERTED_V2 = 'order_identifier_upserted_v2' unless defined?(ORDER_IDENTIFIER_UPSERTED_V2)
5442
5467
  PRICING_DELETED = 'pricing_deleted' unless defined?(PRICING_DELETED)
5443
5468
  PRICING_UPSERTED = 'pricing_upserted' unless defined?(PRICING_UPSERTED)
5444
5469
  TIER_UPSERTED = 'tier_upserted' unless defined?(TIER_UPSERTED)
@@ -5508,7 +5533,7 @@ module Io
5508
5533
  end
5509
5534
 
5510
5535
  def subtype_to_hash
5511
- 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, 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'
5536
+ 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'
5512
5537
  end
5513
5538
 
5514
5539
  def to_hash
@@ -5550,6 +5575,8 @@ module Io
5550
5575
  when Types::ORDER_UPSERTED; OrderUpserted.new(hash)
5551
5576
  when Types::ORDER_IDENTIFIER_DELETED; OrderIdentifierDeleted.new(hash)
5552
5577
  when Types::ORDER_IDENTIFIER_UPSERTED; OrderIdentifierUpserted.new(hash)
5578
+ when Types::ORDER_IDENTIFIER_DELETED_V2; OrderIdentifierDeletedV2.new(hash)
5579
+ when Types::ORDER_IDENTIFIER_UPSERTED_V2; OrderIdentifierUpsertedV2.new(hash)
5553
5580
  when Types::PRICING_DELETED; PricingDeleted.new(hash)
5554
5581
  when Types::PRICING_UPSERTED; PricingUpserted.new(hash)
5555
5582
  when Types::TIER_UPSERTED; TierUpserted.new(hash)
@@ -8444,7 +8471,7 @@ module Io
8444
8471
  end
8445
8472
 
8446
8473
  def EventType.ALL
8447
- @@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.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]
8474
+ @@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]
8448
8475
  end
8449
8476
 
8450
8477
  def EventType.attribute_upserted
@@ -8559,6 +8586,14 @@ module Io
8559
8586
  @@_order_identifier_upserted ||= EventType.new('order_identifier_upserted')
8560
8587
  end
8561
8588
 
8589
+ def EventType.order_identifier_deleted_v2
8590
+ @@_order_identifier_deleted_v2 ||= EventType.new('order_identifier_deleted_v2')
8591
+ end
8592
+
8593
+ def EventType.order_identifier_upserted_v2
8594
+ @@_order_identifier_upserted_v2 ||= EventType.new('order_identifier_upserted_v2')
8595
+ end
8596
+
8562
8597
  def EventType.pricing_deleted
8563
8598
  @@_pricing_deleted ||= EventType.new('pricing_deleted')
8564
8599
  end
@@ -9671,7 +9706,7 @@ module Io
9671
9706
  end
9672
9707
 
9673
9708
  def OrderErrorCode.ALL
9674
- @@all ||= [OrderErrorCode.generic_error, OrderErrorCode.order_item_not_available, OrderErrorCode.order_identifier_error, OrderErrorCode.domestic_shipping_unavailable, OrderErrorCode.value_threshold_exceeded]
9709
+ @@all ||= [OrderErrorCode.generic_error, OrderErrorCode.order_item_not_available, OrderErrorCode.order_identifier_error, OrderErrorCode.authorization_invalid, OrderErrorCode.domestic_shipping_unavailable, OrderErrorCode.value_threshold_exceeded]
9675
9710
  end
9676
9711
 
9677
9712
  def OrderErrorCode.generic_error
@@ -9692,6 +9727,12 @@ module Io
9692
9727
  @@_order_identifier_error ||= OrderErrorCode.new('order_identifier_error')
9693
9728
  end
9694
9729
 
9730
+ # The authorization key specified is invalid - either because it does not exist
9731
+ # or is not associated with this order
9732
+ def OrderErrorCode.authorization_invalid
9733
+ @@_authorization_invalid ||= OrderErrorCode.new('authorization_invalid')
9734
+ end
9735
+
9695
9736
  # Indicates that an order was created for a country to which you have asked Flow
9696
9737
  # not to ship. Usually this indicates an error that a request was made to create
9697
9738
  # an order for your domestic country
@@ -19799,7 +19840,7 @@ module Io
19799
19840
 
19800
19841
  class LabelUpserted < Event
19801
19842
 
19802
- attr_reader :event_id, :timestamp, :organization, :label_id, :carrier_tracking_number, :commercial_invoice, :flow_tracking_number, :destination, :origin, :carrier, :service, :zpl, :pdf, :png, :order, :carrier_tracking_number_url, :flow_tracking_number_url, :center_key
19843
+ attr_reader :event_id, :timestamp, :organization, :label_id, :carrier_tracking_number, :commercial_invoice, :flow_tracking_number, :destination, :origin, :carrier, :service, :zpl, :pdf, :png, :order, :carrier_tracking_number_url, :flow_tracking_number_url, :center_key, :direction, :package
19803
19844
 
19804
19845
  def initialize(incoming={})
19805
19846
  super(:discriminator => Event::Types::LABEL_UPSERTED)
@@ -19823,6 +19864,8 @@ module Io
19823
19864
  @carrier_tracking_number_url = (x = opts.delete(:carrier_tracking_number_url); x.nil? ? nil : HttpClient::Preconditions.assert_class('carrier_tracking_number_url', x, String))
19824
19865
  @flow_tracking_number_url = (x = opts.delete(:flow_tracking_number_url); x.nil? ? nil : HttpClient::Preconditions.assert_class('flow_tracking_number_url', x, String))
19825
19866
  @center_key = (x = opts.delete(:center_key); x.nil? ? nil : HttpClient::Preconditions.assert_class('center_key', x, String))
19867
+ @direction = (x = opts.delete(:direction); x.nil? ? nil : HttpClient::Preconditions.assert_class('direction', x, String))
19868
+ @package = (x = opts.delete(:package); x.nil? ? nil : HttpClient::Preconditions.assert_class('package', HttpClient::Helper.to_object(x), Hash))
19826
19869
  end
19827
19870
 
19828
19871
  def to_json
@@ -19852,7 +19895,9 @@ module Io
19852
19895
  :order => order,
19853
19896
  :carrier_tracking_number_url => carrier_tracking_number_url,
19854
19897
  :flow_tracking_number_url => flow_tracking_number_url,
19855
- :center_key => center_key
19898
+ :center_key => center_key,
19899
+ :direction => direction,
19900
+ :package => package
19856
19901
  }
19857
19902
  end
19858
19903
 
@@ -20518,7 +20563,7 @@ module Io
20518
20563
  @quantity = HttpClient::Preconditions.assert_class('quantity', opts.delete(:quantity), Integer)
20519
20564
  @center = (x = opts.delete(:center); x.nil? ? nil : HttpClient::Preconditions.assert_class('center', x, String))
20520
20565
  @price = (x = opts.delete(:price); x.nil? ? nil : (x = x; x.is_a?(::Io::Flow::V0::Models::Money) ? x : ::Io::Flow::V0::Models::Money.new(x)))
20521
- @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)))
20566
+ @discount = (x = opts.delete(:discount); x.nil? ? nil : (x = x; x.is_a?(::Io::Flow::V0::Models::LocalizedLineItemDiscount) ? x : ::Io::Flow::V0::Models::LocalizedLineItemDiscount.new(x)))
20522
20567
  @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 })
20523
20568
  @local = (x = opts.delete(:local); x.is_a?(::Io::Flow::V0::Models::Local) ? x : ::Io::Flow::V0::Models::Local.new(x))
20524
20569
  @shipment_estimate = (x = opts.delete(:shipment_estimate); x.nil? ? nil : (x = x; x.is_a?(::Io::Flow::V0::Models::DatetimeRange) ? x : ::Io::Flow::V0::Models::DatetimeRange.new(x)))
@@ -20548,6 +20593,42 @@ module Io
20548
20593
 
20549
20594
  end
20550
20595
 
20596
+ # Represents the requested, base, and localized amounts for a discount on a
20597
+ # given line item. It applies to the entire line regardless of quantity.
20598
+ class LocalizedLineItemDiscount
20599
+
20600
+ attr_reader :amount, :currency, :label, :base, :requested
20601
+
20602
+ def initialize(incoming={})
20603
+ opts = HttpClient::Helper.symbolize_keys(incoming)
20604
+ HttpClient::Preconditions.require_keys(opts, [:amount, :currency], 'LocalizedLineItemDiscount')
20605
+ @amount = HttpClient::Preconditions.assert_class('amount', opts.delete(:amount), Numeric)
20606
+ @currency = HttpClient::Preconditions.assert_class('currency', opts.delete(:currency), String)
20607
+ @label = (x = opts.delete(:label); x.nil? ? nil : HttpClient::Preconditions.assert_class('label', x, String))
20608
+ @base = (x = opts.delete(:base); x.nil? ? nil : (x = x; x.is_a?(::Io::Flow::V0::Models::Price) ? x : ::Io::Flow::V0::Models::Price.new(x)))
20609
+ @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)))
20610
+ end
20611
+
20612
+ def to_json
20613
+ JSON.dump(to_hash)
20614
+ end
20615
+
20616
+ def copy(incoming={})
20617
+ LocalizedLineItemDiscount.new(to_hash.merge(HttpClient::Helper.symbolize_keys(incoming)))
20618
+ end
20619
+
20620
+ def to_hash
20621
+ {
20622
+ :amount => amount,
20623
+ :currency => currency,
20624
+ :label => label,
20625
+ :base => base.nil? ? nil : base.to_hash,
20626
+ :requested => requested.nil? ? nil : requested.to_hash
20627
+ }
20628
+ end
20629
+
20630
+ end
20631
+
20551
20632
  class LocalizedTotal < LocalizedPrice
20552
20633
 
20553
20634
  attr_reader :currency, :amount, :label, :base
@@ -21768,7 +21849,7 @@ module Io
21768
21849
  # pricing and delivery options for destination and items/quantities specified
21769
21850
  class OrderForm
21770
21851
 
21771
- attr_reader :customer, :items, :delivered_duty, :number, :destination, :discount, :attributes
21852
+ attr_reader :customer, :items, :delivered_duty, :number, :destination, :discount, :attributes, :authorization_keys
21772
21853
 
21773
21854
  def initialize(incoming={})
21774
21855
  opts = HttpClient::Helper.symbolize_keys(incoming)
@@ -21780,6 +21861,7 @@ module Io
21780
21861
  @destination = (x = opts.delete(:destination); x.nil? ? nil : (x = x; x.is_a?(::Io::Flow::V0::Models::OrderAddress) ? x : ::Io::Flow::V0::Models::OrderAddress.new(x)))
21781
21862
  @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)))
21782
21863
  @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 })
21864
+ @authorization_keys = (x = opts.delete(:authorization_keys); x.nil? ? nil : HttpClient::Preconditions.assert_class('authorization_keys', x, Array).map { |v| HttpClient::Preconditions.assert_class('authorization_keys', v, String) })
21783
21865
  end
21784
21866
 
21785
21867
  def to_json
@@ -21798,7 +21880,8 @@ module Io
21798
21880
  :number => number,
21799
21881
  :destination => destination.nil? ? nil : destination.to_hash,
21800
21882
  :discount => discount.nil? ? nil : discount.to_hash,
21801
- :attributes => attributes.nil? ? nil : attributes
21883
+ :attributes => attributes.nil? ? nil : attributes,
21884
+ :authorization_keys => authorization_keys.nil? ? nil : authorization_keys
21802
21885
  }
21803
21886
  end
21804
21887
 
@@ -21901,6 +21984,39 @@ module Io
21901
21984
 
21902
21985
  end
21903
21986
 
21987
+ class OrderIdentifierDeletedV2 < Event
21988
+
21989
+ attr_reader :event_id, :timestamp, :organization, :id
21990
+
21991
+ def initialize(incoming={})
21992
+ super(:discriminator => Event::Types::ORDER_IDENTIFIER_DELETED_V2)
21993
+ opts = HttpClient::Helper.symbolize_keys(incoming)
21994
+ HttpClient::Preconditions.require_keys(opts, [:event_id, :timestamp, :organization, :id], 'OrderIdentifierDeletedV2')
21995
+ @event_id = HttpClient::Preconditions.assert_class('event_id', opts.delete(:event_id), String)
21996
+ @timestamp = HttpClient::Preconditions.assert_class('timestamp', HttpClient::Helper.to_date_time_iso8601(opts.delete(:timestamp)), DateTime)
21997
+ @organization = HttpClient::Preconditions.assert_class('organization', opts.delete(:organization), String)
21998
+ @id = HttpClient::Preconditions.assert_class('id', opts.delete(:id), String)
21999
+ end
22000
+
22001
+ def to_json
22002
+ JSON.dump(to_hash)
22003
+ end
22004
+
22005
+ def copy(incoming={})
22006
+ OrderIdentifierDeletedV2.new(subtype_to_hash.merge(HttpClient::Helper.symbolize_keys(incoming)))
22007
+ end
22008
+
22009
+ def subtype_to_hash
22010
+ {
22011
+ :event_id => event_id,
22012
+ :timestamp => timestamp,
22013
+ :organization => organization,
22014
+ :id => id
22015
+ }
22016
+ end
22017
+
22018
+ end
22019
+
21904
22020
  class OrderIdentifierForm
21905
22021
 
21906
22022
  attr_reader :order, :identifier, :number, :primary
@@ -21998,6 +22114,45 @@ module Io
21998
22114
 
21999
22115
  end
22000
22116
 
22117
+ class OrderIdentifierUpsertedV2 < Event
22118
+
22119
+ attr_reader :event_id, :timestamp, :organization, :id, :order_number, :identifier, :primary
22120
+
22121
+ def initialize(incoming={})
22122
+ super(:discriminator => Event::Types::ORDER_IDENTIFIER_UPSERTED_V2)
22123
+ opts = HttpClient::Helper.symbolize_keys(incoming)
22124
+ HttpClient::Preconditions.require_keys(opts, [:event_id, :timestamp, :organization, :id, :order_number, :identifier, :primary], 'OrderIdentifierUpsertedV2')
22125
+ @event_id = HttpClient::Preconditions.assert_class('event_id', opts.delete(:event_id), String)
22126
+ @timestamp = HttpClient::Preconditions.assert_class('timestamp', HttpClient::Helper.to_date_time_iso8601(opts.delete(:timestamp)), DateTime)
22127
+ @organization = HttpClient::Preconditions.assert_class('organization', opts.delete(:organization), String)
22128
+ @id = HttpClient::Preconditions.assert_class('id', opts.delete(:id), String)
22129
+ @order_number = HttpClient::Preconditions.assert_class('order_number', opts.delete(:order_number), String)
22130
+ @identifier = HttpClient::Preconditions.assert_class('identifier', opts.delete(:identifier), String)
22131
+ @primary = HttpClient::Preconditions.assert_boolean('primary', opts.delete(:primary))
22132
+ end
22133
+
22134
+ def to_json
22135
+ JSON.dump(to_hash)
22136
+ end
22137
+
22138
+ def copy(incoming={})
22139
+ OrderIdentifierUpsertedV2.new(subtype_to_hash.merge(HttpClient::Helper.symbolize_keys(incoming)))
22140
+ end
22141
+
22142
+ def subtype_to_hash
22143
+ {
22144
+ :event_id => event_id,
22145
+ :timestamp => timestamp,
22146
+ :organization => organization,
22147
+ :id => id,
22148
+ :order_number => order_number,
22149
+ :identifier => identifier,
22150
+ :primary => primary
22151
+ }
22152
+ end
22153
+
22154
+ end
22155
+
22001
22156
  class OrderIdentifierVersion
22002
22157
 
22003
22158
  attr_reader :id, :timestamp, :type, :order_identifier
@@ -22201,7 +22356,7 @@ module Io
22201
22356
  # pricing and delivery options for destination and items/quantities specified.
22202
22357
  class OrderPutForm
22203
22358
 
22204
- attr_reader :items, :customer, :delivered_duty, :selections, :destination, :discount, :attributes
22359
+ attr_reader :items, :customer, :delivered_duty, :selections, :destination, :discount, :attributes, :authorization_keys
22205
22360
 
22206
22361
  def initialize(incoming={})
22207
22362
  opts = HttpClient::Helper.symbolize_keys(incoming)
@@ -22213,6 +22368,7 @@ module Io
22213
22368
  @destination = (x = opts.delete(:destination); x.nil? ? nil : (x = x; x.is_a?(::Io::Flow::V0::Models::OrderAddress) ? x : ::Io::Flow::V0::Models::OrderAddress.new(x)))
22214
22369
  @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)))
22215
22370
  @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 })
22371
+ @authorization_keys = (x = opts.delete(:authorization_keys); x.nil? ? nil : HttpClient::Preconditions.assert_class('authorization_keys', x, Array).map { |v| HttpClient::Preconditions.assert_class('authorization_keys', v, String) })
22216
22372
  end
22217
22373
 
22218
22374
  def to_json
@@ -22231,7 +22387,8 @@ module Io
22231
22387
  :selections => selections.nil? ? nil : selections,
22232
22388
  :destination => destination.nil? ? nil : destination.to_hash,
22233
22389
  :discount => discount.nil? ? nil : discount.to_hash,
22234
- :attributes => attributes.nil? ? nil : attributes
22390
+ :attributes => attributes.nil? ? nil : attributes,
22391
+ :authorization_keys => authorization_keys.nil? ? nil : authorization_keys
22235
22392
  }
22236
22393
  end
22237
22394
 
@@ -25873,9 +26030,9 @@ module Io
25873
26030
  @id = HttpClient::Preconditions.assert_class('id', opts.delete(:id), String)
25874
26031
  @organization = HttpClient::Preconditions.assert_class('organization', opts.delete(:organization), String)
25875
26032
  @destination = HttpClient::Preconditions.assert_class('destination', HttpClient::Helper.to_object(opts.delete(:destination)), Hash)
25876
- @items = HttpClient::Preconditions.assert_class('items', HttpClient::Helper.to_object(opts.delete(:items)), Hash)
26033
+ @items = HttpClient::Preconditions.assert_class('items', opts.delete(:items), Array).map { |v| HttpClient::Preconditions.assert_class('items', HttpClient::Helper.to_object(v), Hash) }
25877
26034
  @key = HttpClient::Preconditions.assert_class('key', opts.delete(:key), String)
25878
- @labels = HttpClient::Preconditions.assert_class('labels', HttpClient::Helper.to_object(opts.delete(:labels)), Hash)
26035
+ @labels = HttpClient::Preconditions.assert_class('labels', opts.delete(:labels), Array).map { |v| HttpClient::Preconditions.assert_class('labels', HttpClient::Helper.to_object(v), Hash) }
25879
26036
  @service = HttpClient::Preconditions.assert_class('service', opts.delete(:service), String)
25880
26037
  @origin = HttpClient::Preconditions.assert_class('origin', HttpClient::Helper.to_object(opts.delete(:origin)), Hash)
25881
26038
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: flowcommerce
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.46
4
+ version: 0.2.47
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-10-29 00:00:00.000000000 Z
11
+ date: 2017-11-02 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: json