flowcommerce 0.2.23 → 0.2.24

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: 9ba3abdf0ee7ed05bcb8bde4697d2ae58705e4b7
4
- data.tar.gz: 70e9d6313114f9aeb9200e47ad473b4bce4639b9
3
+ metadata.gz: 08d83df15c33ed9a359137595899ec72c5722dae
4
+ data.tar.gz: eae0b25b0788cc1d7431084f1e1e0ca4e22136c6
5
5
  SHA512:
6
- metadata.gz: 72908f7d0c1037638bfaa2f2d0de33cfa4316cc1b48d9abff64994c032272ca42e2a07017fb366cd6e1b108fe5b0caa6ffd9a430e34f85f022b04d595486e0d5
7
- data.tar.gz: 3e2ba0e3169b27ddcb22a1e8c652f5f9b76f766fb3422b9136049a65ae848c57c212953b9059e1589e15e2d6383c107bc8fc9924df272436c12d83ecf09840a2
6
+ metadata.gz: cf037cc969e5f8f7d5423018e4bb42119572d7baa7239390efe4d799206269bbe0cecaf55cf14fda8d957f6d34894f93dffec6e4eb29e8ee915798db75595e58
7
+ data.tar.gz: 0776b671ff61938522c699079d01c6ea77fc2b7aa6dda0b3df78702c42829f44b9d773bf5a107a55369f7f2e6ffa1a852ba3ba62c4e82fda85ca90a5c901986b
@@ -1,6 +1,6 @@
1
1
  # Generated by API Builder - https://www.apibuilder.io
2
- # Service version: 0.3.50
3
- # apibuilder:0.12.38 https://app.apibuilder.io/flow/api/0.3.57/ruby_client
2
+ # Service version: 0.3.60
3
+ # apibuilder:0.12.52 https://app.apibuilder.io/flow/api/0.3.60/ruby_client
4
4
 
5
5
  require 'cgi'
6
6
  require 'net/http'
@@ -25,8 +25,8 @@ module Io
25
25
 
26
26
  BASE_URL = 'https://api.flow.io' unless defined?(Constants::BASE_URL)
27
27
  NAMESPACE = 'io.flow.v0' unless defined?(Constants::NAMESPACE)
28
- USER_AGENT = 'apibuilder:0.12.38 https://app.apibuilder.io/flow/api/0.3.57/ruby_client' unless defined?(Constants::USER_AGENT)
29
- VERSION = '0.3.50' unless defined?(Constants::VERSION)
28
+ USER_AGENT = 'apibuilder:0.12.52 https://app.apibuilder.io/flow/api/0.3.60/ruby_client' unless defined?(Constants::USER_AGENT)
29
+ VERSION = '0.3.60' unless defined?(Constants::VERSION)
30
30
  VERSION_MAJOR = 0 unless defined?(VERSION_MAJOR)
31
31
 
32
32
  end
@@ -5093,6 +5093,8 @@ module Io
5093
5093
  LABEL_UPSERTED = 'label_upserted' unless defined?(LABEL_UPSERTED)
5094
5094
  NOTIFICATION_UPSERTED = 'notification_upserted' unless defined?(NOTIFICATION_UPSERTED)
5095
5095
  NOTIFICATION_DELETED = 'notification_deleted' unless defined?(NOTIFICATION_DELETED)
5096
+ LOCAL_ITEM_UPSERTED = 'local_item_upserted' unless defined?(LOCAL_ITEM_UPSERTED)
5097
+ LOCAL_ITEM_DELETED = 'local_item_deleted' unless defined?(LOCAL_ITEM_DELETED)
5096
5098
  LOCALIZED_ITEM_UPSERTED = 'localized_item_upserted' unless defined?(LOCALIZED_ITEM_UPSERTED)
5097
5099
  LOCALIZED_ITEM_UPSERTED_V2 = 'localized_item_upserted_v2' unless defined?(LOCALIZED_ITEM_UPSERTED_V2)
5098
5100
  LOCALIZED_ITEM_DELETED = 'localized_item_deleted' unless defined?(LOCALIZED_ITEM_DELETED)
@@ -5122,6 +5124,8 @@ module Io
5122
5124
  PAYMENT_DELETED = 'payment_deleted' unless defined?(PAYMENT_DELETED)
5123
5125
  REFUND_UPSERTED = 'refund_upserted' unless defined?(REFUND_UPSERTED)
5124
5126
  REFUND_UPSERTED_V2 = 'refund_upserted_v2' unless defined?(REFUND_UPSERTED_V2)
5127
+ ORGANIZATION_RATES_PUBLISHED = 'organization_rates_published' unless defined?(ORGANIZATION_RATES_PUBLISHED)
5128
+ ORGANIZATION_COUNTRIES_PUBLISHED = 'organization_countries_published' unless defined?(ORGANIZATION_COUNTRIES_PUBLISHED)
5125
5129
  RETURN_UPSERTED = 'return_upserted' unless defined?(RETURN_UPSERTED)
5126
5130
  RETURN_DELETED = 'return_deleted' unless defined?(RETURN_DELETED)
5127
5131
  TARGETING_ITEM_UPSERTED = 'targeting_item_upserted' unless defined?(TARGETING_ITEM_UPSERTED)
@@ -5138,7 +5142,7 @@ module Io
5138
5142
  end
5139
5143
 
5140
5144
  def subtype_to_hash
5141
- 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, snapshot_upserted, snapshot_deleted, label_upserted, notification_upserted, notification_deleted, localized_item_upserted, localized_item_upserted_v2, localized_item_deleted, localized_item_deleted_v2, localized_item_snapshot, 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, return_upserted, return_deleted, targeting_item_upserted, targeting_item_deleted, tracking_label_event_upserted'
5145
+ 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, snapshot_upserted, snapshot_deleted, label_upserted, notification_upserted, notification_deleted, local_item_upserted, local_item_deleted, localized_item_upserted, localized_item_upserted_v2, localized_item_deleted, localized_item_deleted_v2, localized_item_snapshot, 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, organization_rates_published, organization_countries_published, return_upserted, return_deleted, targeting_item_upserted, targeting_item_deleted, tracking_label_event_upserted'
5142
5146
  end
5143
5147
 
5144
5148
  def to_hash
@@ -5197,6 +5201,8 @@ module Io
5197
5201
  when Types::LABEL_UPSERTED; LabelUpserted.new(hash)
5198
5202
  when Types::NOTIFICATION_UPSERTED; NotificationUpserted.new(hash)
5199
5203
  when Types::NOTIFICATION_DELETED; NotificationDeleted.new(hash)
5204
+ when Types::LOCAL_ITEM_UPSERTED; LocalItemUpserted.new(hash)
5205
+ when Types::LOCAL_ITEM_DELETED; LocalItemDeleted.new(hash)
5200
5206
  when Types::LOCALIZED_ITEM_UPSERTED; LocalizedItemUpserted.new(hash)
5201
5207
  when Types::LOCALIZED_ITEM_UPSERTED_V2; LocalizedItemUpsertedV2.new(hash)
5202
5208
  when Types::LOCALIZED_ITEM_DELETED; LocalizedItemDeleted.new(hash)
@@ -5223,6 +5229,8 @@ module Io
5223
5229
  when Types::PAYMENT_DELETED; PaymentDeleted.new(hash)
5224
5230
  when Types::REFUND_UPSERTED; RefundUpserted.new(hash)
5225
5231
  when Types::REFUND_UPSERTED_V2; RefundUpsertedV2.new(hash)
5232
+ when Types::ORGANIZATION_RATES_PUBLISHED; OrganizationRatesPublished.new(hash)
5233
+ when Types::ORGANIZATION_COUNTRIES_PUBLISHED; OrganizationCountriesPublished.new(hash)
5226
5234
  when Types::RETURN_UPSERTED; ReturnUpserted.new(hash)
5227
5235
  when Types::RETURN_DELETED; ReturnDeleted.new(hash)
5228
5236
  when Types::TARGETING_ITEM_UPSERTED; TargetingItemUpserted.new(hash)
@@ -6106,6 +6114,66 @@ module Io
6106
6114
 
6107
6115
  end
6108
6116
 
6117
+ class OnlineAuthorizationDetails
6118
+
6119
+ module Types
6120
+ PAYPAL_AUTHORIZATION_DETAILS = 'paypal_authorization_details' unless defined?(PAYPAL_AUTHORIZATION_DETAILS)
6121
+ end
6122
+
6123
+ attr_reader :discriminator
6124
+
6125
+ def initialize(incoming={})
6126
+ opts = HttpClient::Helper.symbolize_keys(incoming)
6127
+ HttpClient::Preconditions.require_keys(opts, [:discriminator], 'OnlineAuthorizationDetails')
6128
+ @discriminator = HttpClient::Preconditions.assert_class('discriminator', opts.delete(:discriminator), String)
6129
+ end
6130
+
6131
+ def subtype_to_hash
6132
+ raise 'Cannot serialize an instance of online_authorization_details directly - must use one of the specific types: paypal_authorization_details'
6133
+ end
6134
+
6135
+ def to_hash
6136
+ subtype_to_hash.merge(:discriminator => @discriminator)
6137
+ end
6138
+
6139
+ def OnlineAuthorizationDetails.from_json(hash)
6140
+ HttpClient::Preconditions.assert_class('hash', hash, Hash)
6141
+ discriminator = HttpClient::Helper.symbolize_keys(hash)[:discriminator].to_s.strip
6142
+ if discriminator.empty?
6143
+ raise "Union type[online_authorization_details] requires a field named 'discriminator'"
6144
+ end
6145
+ case discriminator
6146
+ when Types::PAYPAL_AUTHORIZATION_DETAILS; PaypalAuthorizationDetails.new(hash)
6147
+ else OnlineAuthorizationDetailsUndefinedType.new(:discriminator => discriminator)
6148
+ end
6149
+ end
6150
+
6151
+ end
6152
+
6153
+ class OnlineAuthorizationDetailsUndefinedType < OnlineAuthorizationDetails
6154
+
6155
+ attr_reader :name
6156
+
6157
+ def initialize(incoming={})
6158
+ super(:discriminator => 'undefined_type')
6159
+ opts = HttpClient::Helper.symbolize_keys(incoming)
6160
+ @name = HttpClient::Preconditions.assert_class('name', opts.delete(:discriminator), String)
6161
+ end
6162
+
6163
+ def subtype_to_hash
6164
+ raise 'Unable to serialize undefined type to json'
6165
+ end
6166
+
6167
+ def copy(incoming={})
6168
+ raise 'Operation not supported for undefined type'
6169
+ end
6170
+
6171
+ def to_hash
6172
+ raise 'Operation not supported for undefined type'
6173
+ end
6174
+
6175
+ end
6176
+
6109
6177
  # Represents data for a specific online payment method
6110
6178
  class Payment
6111
6179
 
@@ -7928,7 +7996,7 @@ module Io
7928
7996
  end
7929
7997
 
7930
7998
  def EventType.ALL
7931
- @@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.snapshot_upserted, EventType.snapshot_deleted, EventType.label_upserted, EventType.notification_upserted, EventType.notification_deleted, EventType.localized_item_upserted, EventType.localized_item_upserted_v2, EventType.localized_item_deleted, EventType.localized_item_deleted_v2, EventType.localized_item_snapshot, 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.return_upserted, EventType.return_deleted, EventType.targeting_item_upserted, EventType.targeting_item_deleted, EventType.tracking_label_event_upserted]
7999
+ @@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.snapshot_upserted, EventType.snapshot_deleted, EventType.label_upserted, EventType.notification_upserted, EventType.notification_deleted, EventType.local_item_upserted, EventType.local_item_deleted, EventType.localized_item_upserted, EventType.localized_item_upserted_v2, EventType.localized_item_deleted, EventType.localized_item_deleted_v2, EventType.localized_item_snapshot, 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.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]
7932
8000
  end
7933
8001
 
7934
8002
  def EventType.attribute_upserted
@@ -8111,6 +8179,14 @@ module Io
8111
8179
  @@_notification_deleted ||= EventType.new('notification_deleted')
8112
8180
  end
8113
8181
 
8182
+ def EventType.local_item_upserted
8183
+ @@_local_item_upserted ||= EventType.new('local_item_upserted')
8184
+ end
8185
+
8186
+ def EventType.local_item_deleted
8187
+ @@_local_item_deleted ||= EventType.new('local_item_deleted')
8188
+ end
8189
+
8114
8190
  def EventType.localized_item_upserted
8115
8191
  @@_localized_item_upserted ||= EventType.new('localized_item_upserted')
8116
8192
  end
@@ -8215,6 +8291,14 @@ module Io
8215
8291
  @@_refund_upserted_v2 ||= EventType.new('refund_upserted_v2')
8216
8292
  end
8217
8293
 
8294
+ def EventType.organization_rates_published
8295
+ @@_organization_rates_published ||= EventType.new('organization_rates_published')
8296
+ end
8297
+
8298
+ def EventType.organization_countries_published
8299
+ @@_organization_countries_published ||= EventType.new('organization_countries_published')
8300
+ end
8301
+
8218
8302
  def EventType.return_upserted
8219
8303
  @@_return_upserted ||= EventType.new('return_upserted')
8220
8304
  end
@@ -10900,7 +10984,7 @@ module Io
10900
10984
  end
10901
10985
 
10902
10986
  def TrackingStatus.ALL
10903
- @@all ||= [TrackingStatus.label_created, TrackingStatus.pending, TrackingStatus.info_received, TrackingStatus.in_transit, TrackingStatus.out_for_delivery, TrackingStatus.attempt_fail, TrackingStatus.delivered, TrackingStatus.exception, TrackingStatus.expired]
10987
+ @@all ||= [TrackingStatus.label_created, TrackingStatus.pending, TrackingStatus.info_received, TrackingStatus.picked_up, TrackingStatus.in_transit, TrackingStatus.out_for_delivery, TrackingStatus.attempt_fail, TrackingStatus.delivered, TrackingStatus.exception, TrackingStatus.returned, TrackingStatus.expired]
10904
10988
  end
10905
10989
 
10906
10990
  def TrackingStatus.label_created
@@ -10915,6 +10999,10 @@ module Io
10915
10999
  @@_info_received ||= TrackingStatus.new('info_received')
10916
11000
  end
10917
11001
 
11002
+ def TrackingStatus.picked_up
11003
+ @@_picked_up ||= TrackingStatus.new('picked_up')
11004
+ end
11005
+
10918
11006
  def TrackingStatus.in_transit
10919
11007
  @@_in_transit ||= TrackingStatus.new('in_transit')
10920
11008
  end
@@ -10935,6 +11023,10 @@ module Io
10935
11023
  @@_exception ||= TrackingStatus.new('exception')
10936
11024
  end
10937
11025
 
11026
+ def TrackingStatus.returned
11027
+ @@_returned ||= TrackingStatus.new('returned')
11028
+ end
11029
+
10938
11030
  def TrackingStatus.expired
10939
11031
  @@_expired ||= TrackingStatus.new('expired')
10940
11032
  end
@@ -13615,6 +13707,34 @@ module Io
13615
13707
 
13616
13708
  end
13617
13709
 
13710
+ class CatalogItemReference
13711
+
13712
+ attr_reader :id, :number
13713
+
13714
+ def initialize(incoming={})
13715
+ opts = HttpClient::Helper.symbolize_keys(incoming)
13716
+ HttpClient::Preconditions.require_keys(opts, [:id, :number], 'CatalogItemReference')
13717
+ @id = HttpClient::Preconditions.assert_class('id', opts.delete(:id), String)
13718
+ @number = HttpClient::Preconditions.assert_class('number', opts.delete(:number), String)
13719
+ end
13720
+
13721
+ def to_json
13722
+ JSON.dump(to_hash)
13723
+ end
13724
+
13725
+ def copy(incoming={})
13726
+ CatalogItemReference.new(to_hash.merge(HttpClient::Helper.symbolize_keys(incoming)))
13727
+ end
13728
+
13729
+ def to_hash
13730
+ {
13731
+ :id => id,
13732
+ :number => number
13733
+ }
13734
+ end
13735
+
13736
+ end
13737
+
13618
13738
  class CatalogItemSummary
13619
13739
 
13620
13740
  attr_reader :number, :name, :attributes
@@ -19026,6 +19146,137 @@ module Io
19026
19146
 
19027
19147
  end
19028
19148
 
19149
+ # The Local Item represents all of the data for a given item that is localized
19150
+ # to a given experinece.
19151
+ class LocalItem
19152
+
19153
+ attr_reader :id, :experience, :item, :pricing, :status
19154
+
19155
+ def initialize(incoming={})
19156
+ opts = HttpClient::Helper.symbolize_keys(incoming)
19157
+ HttpClient::Preconditions.require_keys(opts, [:id, :experience, :item, :pricing, :status], 'LocalItem')
19158
+ @id = HttpClient::Preconditions.assert_class('id', opts.delete(:id), String)
19159
+ @experience = (x = opts.delete(:experience); x.is_a?(::Io::Flow::V0::Models::ExperienceSummary) ? x : ::Io::Flow::V0::Models::ExperienceSummary.new(x))
19160
+ @item = (x = opts.delete(:item); x.is_a?(::Io::Flow::V0::Models::CatalogItemReference) ? x : ::Io::Flow::V0::Models::CatalogItemReference.new(x))
19161
+ @pricing = (x = opts.delete(:pricing); x.is_a?(::Io::Flow::V0::Models::LocalItemPricing) ? x : ::Io::Flow::V0::Models::LocalItemPricing.new(x))
19162
+ @status = (x = opts.delete(:status); x.is_a?(::Io::Flow::V0::Models::SubcatalogItemStatus) ? x : ::Io::Flow::V0::Models::SubcatalogItemStatus.apply(x))
19163
+ end
19164
+
19165
+ def to_json
19166
+ JSON.dump(to_hash)
19167
+ end
19168
+
19169
+ def copy(incoming={})
19170
+ LocalItem.new(to_hash.merge(HttpClient::Helper.symbolize_keys(incoming)))
19171
+ end
19172
+
19173
+ def to_hash
19174
+ {
19175
+ :id => id,
19176
+ :experience => experience.to_hash,
19177
+ :item => item.to_hash,
19178
+ :pricing => pricing.to_hash,
19179
+ :status => status.value
19180
+ }
19181
+ end
19182
+
19183
+ end
19184
+
19185
+ class LocalItemDeleted < Event
19186
+
19187
+ attr_reader :event_id, :timestamp, :organization, :local_item
19188
+
19189
+ def initialize(incoming={})
19190
+ super(:discriminator => Event::Types::LOCAL_ITEM_DELETED)
19191
+ opts = HttpClient::Helper.symbolize_keys(incoming)
19192
+ HttpClient::Preconditions.require_keys(opts, [:event_id, :timestamp, :organization, :local_item], 'LocalItemDeleted')
19193
+ @event_id = HttpClient::Preconditions.assert_class('event_id', opts.delete(:event_id), String)
19194
+ @timestamp = HttpClient::Preconditions.assert_class('timestamp', HttpClient::Helper.to_date_time_iso8601(opts.delete(:timestamp)), DateTime)
19195
+ @organization = HttpClient::Preconditions.assert_class('organization', opts.delete(:organization), String)
19196
+ @local_item = (x = opts.delete(:local_item); x.is_a?(::Io::Flow::V0::Models::LocalItem) ? x : ::Io::Flow::V0::Models::LocalItem.new(x))
19197
+ end
19198
+
19199
+ def to_json
19200
+ JSON.dump(to_hash)
19201
+ end
19202
+
19203
+ def copy(incoming={})
19204
+ LocalItemDeleted.new(subtype_to_hash.merge(HttpClient::Helper.symbolize_keys(incoming)))
19205
+ end
19206
+
19207
+ def subtype_to_hash
19208
+ {
19209
+ :event_id => event_id,
19210
+ :timestamp => timestamp,
19211
+ :organization => organization,
19212
+ :local_item => local_item.to_hash
19213
+ }
19214
+ end
19215
+
19216
+ end
19217
+
19218
+ # Localized item pricing information
19219
+ class LocalItemPricing
19220
+
19221
+ attr_reader :price, :attributes
19222
+
19223
+ def initialize(incoming={})
19224
+ opts = HttpClient::Helper.symbolize_keys(incoming)
19225
+ HttpClient::Preconditions.require_keys(opts, [:price, :attributes], 'LocalItemPricing')
19226
+ @price = (x = opts.delete(:price); x.is_a?(::Io::Flow::V0::Models::LocalizedItemPrice) ? x : ::Io::Flow::V0::Models::LocalizedItemPrice.new(x))
19227
+ @attributes = HttpClient::Preconditions.assert_class('attributes', opts.delete(:attributes), Hash).inject({}) { |h, d| h[d[0]] = (x = d[1]; x.is_a?(::Io::Flow::V0::Models::PriceWithBase) ? x : ::Io::Flow::V0::Models::PriceWithBase.new(x)); h }
19228
+ end
19229
+
19230
+ def to_json
19231
+ JSON.dump(to_hash)
19232
+ end
19233
+
19234
+ def copy(incoming={})
19235
+ LocalItemPricing.new(to_hash.merge(HttpClient::Helper.symbolize_keys(incoming)))
19236
+ end
19237
+
19238
+ def to_hash
19239
+ {
19240
+ :price => price.to_hash,
19241
+ :attributes => attributes.inject({}) { |hash, o| hash[o[0]] = o[1].nil? ? nil : o[1].to_hash; hash }
19242
+ }
19243
+ end
19244
+
19245
+ end
19246
+
19247
+ class LocalItemUpserted < Event
19248
+
19249
+ attr_reader :event_id, :timestamp, :organization, :local_item
19250
+
19251
+ def initialize(incoming={})
19252
+ super(:discriminator => Event::Types::LOCAL_ITEM_UPSERTED)
19253
+ opts = HttpClient::Helper.symbolize_keys(incoming)
19254
+ HttpClient::Preconditions.require_keys(opts, [:event_id, :timestamp, :organization, :local_item], 'LocalItemUpserted')
19255
+ @event_id = HttpClient::Preconditions.assert_class('event_id', opts.delete(:event_id), String)
19256
+ @timestamp = HttpClient::Preconditions.assert_class('timestamp', HttpClient::Helper.to_date_time_iso8601(opts.delete(:timestamp)), DateTime)
19257
+ @organization = HttpClient::Preconditions.assert_class('organization', opts.delete(:organization), String)
19258
+ @local_item = (x = opts.delete(:local_item); x.is_a?(::Io::Flow::V0::Models::LocalItem) ? x : ::Io::Flow::V0::Models::LocalItem.new(x))
19259
+ end
19260
+
19261
+ def to_json
19262
+ JSON.dump(to_hash)
19263
+ end
19264
+
19265
+ def copy(incoming={})
19266
+ LocalItemUpserted.new(subtype_to_hash.merge(HttpClient::Helper.symbolize_keys(incoming)))
19267
+ end
19268
+
19269
+ def subtype_to_hash
19270
+ {
19271
+ :event_id => event_id,
19272
+ :timestamp => timestamp,
19273
+ :organization => organization,
19274
+ :local_item => local_item.to_hash
19275
+ }
19276
+ end
19277
+
19278
+ end
19279
+
19029
19280
  class LocalPriceDetails
19030
19281
 
19031
19282
  attr_reader :base, :local, :discount, :local_before_discount
@@ -19193,35 +19444,6 @@ module Io
19193
19444
 
19194
19445
  end
19195
19446
 
19196
- # Represents a specific localized price
19197
- class LocalizedCachePrice
19198
-
19199
- attr_reader :key, :price
19200
-
19201
- def initialize(incoming={})
19202
- opts = HttpClient::Helper.symbolize_keys(incoming)
19203
- HttpClient::Preconditions.require_keys(opts, [:key, :price], 'LocalizedCachePrice')
19204
- @key = HttpClient::Preconditions.assert_class('key', opts.delete(:key), String)
19205
- @price = (x = opts.delete(:price); x.is_a?(::Io::Flow::V0::Models::PriceWithBase) ? x : ::Io::Flow::V0::Models::PriceWithBase.new(x))
19206
- end
19207
-
19208
- def to_json
19209
- JSON.dump(to_hash)
19210
- end
19211
-
19212
- def copy(incoming={})
19213
- LocalizedCachePrice.new(to_hash.merge(HttpClient::Helper.symbolize_keys(incoming)))
19214
- end
19215
-
19216
- def to_hash
19217
- {
19218
- :key => key,
19219
- :price => price.to_hash
19220
- }
19221
- end
19222
-
19223
- end
19224
-
19225
19447
  class LocalizedItemDeleted < Event
19226
19448
 
19227
19449
  attr_reader :event_id, :timestamp, :organization, :number, :catalog
@@ -19565,35 +19787,6 @@ module Io
19565
19787
 
19566
19788
  end
19567
19789
 
19568
- # Pricing information of a localized item
19569
- class LocalizedPricing
19570
-
19571
- attr_reader :prices, :includes
19572
-
19573
- def initialize(incoming={})
19574
- opts = HttpClient::Helper.symbolize_keys(incoming)
19575
- HttpClient::Preconditions.require_keys(opts, [:prices], 'LocalizedPricing')
19576
- @prices = HttpClient::Preconditions.assert_class('prices', opts.delete(:prices), Array).map { |v| (x = v; x.is_a?(::Io::Flow::V0::Models::LocalizedCachePrice) ? x : ::Io::Flow::V0::Models::LocalizedCachePrice.new(x)) }
19577
- @includes = (x = opts.delete(:includes); x.nil? ? nil : HttpClient::Preconditions.assert_class('includes', x, String))
19578
- end
19579
-
19580
- def to_json
19581
- JSON.dump(to_hash)
19582
- end
19583
-
19584
- def copy(incoming={})
19585
- LocalizedPricing.new(to_hash.merge(HttpClient::Helper.symbolize_keys(incoming)))
19586
- end
19587
-
19588
- def to_hash
19589
- {
19590
- :prices => prices.map { |o| o.to_hash },
19591
- :includes => includes
19592
- }
19593
- end
19594
-
19595
- end
19596
-
19597
19790
  class LocalizedTotal < LocalizedPrice
19598
19791
 
19599
19792
  attr_reader :currency, :amount, :label, :base
@@ -20237,7 +20430,7 @@ module Io
20237
20430
 
20238
20431
  class OnlineAuthorization < Authorization
20239
20432
 
20240
- attr_reader :id, :key, :payment, :amount, :currency, :customer, :attributes, :destination, :order, :ip, :result, :created_at
20433
+ attr_reader :id, :key, :method, :details, :payment, :amount, :currency, :customer, :attributes, :destination, :order, :ip, :result, :created_at
20241
20434
 
20242
20435
  def initialize(incoming={})
20243
20436
  super(:discriminator => Authorization::Types::ONLINE_AUTHORIZATION)
@@ -20245,6 +20438,8 @@ module Io
20245
20438
  HttpClient::Preconditions.require_keys(opts, [:id, :key, :amount, :currency, :customer, :attributes, :result, :created_at], 'OnlineAuthorization')
20246
20439
  @id = HttpClient::Preconditions.assert_class('id', opts.delete(:id), String)
20247
20440
  @key = HttpClient::Preconditions.assert_class('key', opts.delete(:key), String)
20441
+ @method = (x = opts.delete(:method); x.nil? ? nil : (x = x; x.is_a?(::Io::Flow::V0::Models::PaymentMethod) ? x : ::Io::Flow::V0::Models::PaymentMethod.new(x)))
20442
+ @details = (x = opts.delete(:details); x.nil? ? nil : (x = x; x.is_a?(::Io::Flow::V0::Models::OnlineAuthorizationDetails) ? x : ::Io::Flow::V0::Models::OnlineAuthorizationDetails.from_json(x)))
20248
20443
  @payment = (x = opts.delete(:payment); x.nil? ? nil : HttpClient::Preconditions.assert_class('payment', HttpClient::Helper.to_object(x), Hash))
20249
20444
  @amount = HttpClient::Preconditions.assert_class('amount', HttpClient::Helper.to_big_decimal(opts.delete(:amount)), BigDecimal)
20250
20445
  @currency = HttpClient::Preconditions.assert_class('currency', opts.delete(:currency), String)
@@ -20269,6 +20464,8 @@ module Io
20269
20464
  {
20270
20465
  :id => id,
20271
20466
  :key => key,
20467
+ :method => method.nil? ? nil : method.to_hash,
20468
+ :details => details.nil? ? nil : details.to_hash,
20272
20469
  :payment => payment,
20273
20470
  :amount => amount,
20274
20471
  :currency => currency,
@@ -21303,6 +21500,69 @@ module Io
21303
21500
 
21304
21501
  end
21305
21502
 
21503
+ class OrganizationCountriesData
21504
+
21505
+ attr_reader :available
21506
+
21507
+ def initialize(incoming={})
21508
+ opts = HttpClient::Helper.symbolize_keys(incoming)
21509
+ HttpClient::Preconditions.require_keys(opts, [:available], 'OrganizationCountriesData')
21510
+ @available = HttpClient::Preconditions.assert_class('available', opts.delete(:available), Array).map { |v| HttpClient::Preconditions.assert_class('available', v, String) }
21511
+ end
21512
+
21513
+ def to_json
21514
+ JSON.dump(to_hash)
21515
+ end
21516
+
21517
+ def copy(incoming={})
21518
+ OrganizationCountriesData.new(to_hash.merge(HttpClient::Helper.symbolize_keys(incoming)))
21519
+ end
21520
+
21521
+ def to_hash
21522
+ {
21523
+ :available => available
21524
+ }
21525
+ end
21526
+
21527
+ end
21528
+
21529
+ # Represents the list of countries that are currently marked available for an
21530
+ # organization. This is a bulk event - meaning any time an organization enables
21531
+ # or disables a specific region, we publish the new list of all of the countries
21532
+ # that the organization is making available to its consumers.
21533
+ class OrganizationCountriesPublished < Event
21534
+
21535
+ attr_reader :event_id, :timestamp, :organization, :data
21536
+
21537
+ def initialize(incoming={})
21538
+ super(:discriminator => Event::Types::ORGANIZATION_COUNTRIES_PUBLISHED)
21539
+ opts = HttpClient::Helper.symbolize_keys(incoming)
21540
+ HttpClient::Preconditions.require_keys(opts, [:event_id, :timestamp, :organization, :data], 'OrganizationCountriesPublished')
21541
+ @event_id = HttpClient::Preconditions.assert_class('event_id', opts.delete(:event_id), String)
21542
+ @timestamp = HttpClient::Preconditions.assert_class('timestamp', HttpClient::Helper.to_date_time_iso8601(opts.delete(:timestamp)), DateTime)
21543
+ @organization = HttpClient::Preconditions.assert_class('organization', opts.delete(:organization), String)
21544
+ @data = (x = opts.delete(:data); x.is_a?(::Io::Flow::V0::Models::OrganizationCountriesData) ? x : ::Io::Flow::V0::Models::OrganizationCountriesData.new(x))
21545
+ end
21546
+
21547
+ def to_json
21548
+ JSON.dump(to_hash)
21549
+ end
21550
+
21551
+ def copy(incoming={})
21552
+ OrganizationCountriesPublished.new(subtype_to_hash.merge(HttpClient::Helper.symbolize_keys(incoming)))
21553
+ end
21554
+
21555
+ def subtype_to_hash
21556
+ {
21557
+ :event_id => event_id,
21558
+ :timestamp => timestamp,
21559
+ :organization => organization,
21560
+ :data => data.to_hash
21561
+ }
21562
+ end
21563
+
21564
+ end
21565
+
21306
21566
  # Represents organization-specific currency conversion adjustments.
21307
21567
  class OrganizationCurrencySetting
21308
21568
 
@@ -21492,6 +21752,71 @@ module Io
21492
21752
 
21493
21753
  end
21494
21754
 
21755
+ class OrganizationRatesData
21756
+
21757
+ attr_reader :rates
21758
+
21759
+ def initialize(incoming={})
21760
+ opts = HttpClient::Helper.symbolize_keys(incoming)
21761
+ HttpClient::Preconditions.require_keys(opts, [:rates], 'OrganizationRatesData')
21762
+ @rates = HttpClient::Preconditions.assert_class('rates', opts.delete(:rates), Array).map { |v| (x = v; x.is_a?(::Io::Flow::V0::Models::Rate) ? x : ::Io::Flow::V0::Models::Rate.new(x)) }
21763
+ end
21764
+
21765
+ def to_json
21766
+ JSON.dump(to_hash)
21767
+ end
21768
+
21769
+ def copy(incoming={})
21770
+ OrganizationRatesData.new(to_hash.merge(HttpClient::Helper.symbolize_keys(incoming)))
21771
+ end
21772
+
21773
+ def to_hash
21774
+ {
21775
+ :rates => rates.map { |o| o.to_hash }
21776
+ }
21777
+ end
21778
+
21779
+ end
21780
+
21781
+ # Represents the full list of exchange rates in effect for an organization. This
21782
+ # is a bulk event - meaning any time an individual rate changes, we publish the
21783
+ # new complete list of exchange rates. Note this event is published a few
21784
+ # minutes after a rate is published, allowing us to aggregate multiple changes
21785
+ # in a short period of time to reduce the number of organization_rates_published
21786
+ # we publish.
21787
+ class OrganizationRatesPublished < Event
21788
+
21789
+ attr_reader :event_id, :timestamp, :organization, :data
21790
+
21791
+ def initialize(incoming={})
21792
+ super(:discriminator => Event::Types::ORGANIZATION_RATES_PUBLISHED)
21793
+ opts = HttpClient::Helper.symbolize_keys(incoming)
21794
+ HttpClient::Preconditions.require_keys(opts, [:event_id, :timestamp, :organization, :data], 'OrganizationRatesPublished')
21795
+ @event_id = HttpClient::Preconditions.assert_class('event_id', opts.delete(:event_id), String)
21796
+ @timestamp = HttpClient::Preconditions.assert_class('timestamp', HttpClient::Helper.to_date_time_iso8601(opts.delete(:timestamp)), DateTime)
21797
+ @organization = HttpClient::Preconditions.assert_class('organization', opts.delete(:organization), String)
21798
+ @data = (x = opts.delete(:data); x.is_a?(::Io::Flow::V0::Models::OrganizationRatesData) ? x : ::Io::Flow::V0::Models::OrganizationRatesData.new(x))
21799
+ end
21800
+
21801
+ def to_json
21802
+ JSON.dump(to_hash)
21803
+ end
21804
+
21805
+ def copy(incoming={})
21806
+ OrganizationRatesPublished.new(subtype_to_hash.merge(HttpClient::Helper.symbolize_keys(incoming)))
21807
+ end
21808
+
21809
+ def subtype_to_hash
21810
+ {
21811
+ :event_id => event_id,
21812
+ :timestamp => timestamp,
21813
+ :organization => organization,
21814
+ :data => data.to_hash
21815
+ }
21816
+ end
21817
+
21818
+ end
21819
+
21495
21820
  class OrganizationReference < ExpandableOrganization
21496
21821
 
21497
21822
  attr_reader :id
@@ -22463,6 +22788,34 @@ module Io
22463
22788
 
22464
22789
  end
22465
22790
 
22791
+ # Represents on line payment
22792
+ class PaypalAuthorizationDetails < OnlineAuthorizationDetails
22793
+
22794
+ attr_reader :payment_id
22795
+
22796
+ def initialize(incoming={})
22797
+ super(:discriminator => OnlineAuthorizationDetails::Types::PAYPAL_AUTHORIZATION_DETAILS)
22798
+ opts = HttpClient::Helper.symbolize_keys(incoming)
22799
+ HttpClient::Preconditions.require_keys(opts, [:payment_id], 'PaypalAuthorizationDetails')
22800
+ @payment_id = HttpClient::Preconditions.assert_class('payment_id', opts.delete(:payment_id), String)
22801
+ end
22802
+
22803
+ def to_json
22804
+ JSON.dump(to_hash)
22805
+ end
22806
+
22807
+ def copy(incoming={})
22808
+ PaypalAuthorizationDetails.new(subtype_to_hash.merge(HttpClient::Helper.symbolize_keys(incoming)))
22809
+ end
22810
+
22811
+ def subtype_to_hash
22812
+ {
22813
+ :payment_id => payment_id
22814
+ }
22815
+ end
22816
+
22817
+ end
22818
+
22466
22819
  # Executes the Paypal payment
22467
22820
  class PaypalAuthorizationForm < AuthorizationForm
22468
22821
 
@@ -23624,6 +23977,36 @@ module Io
23624
23977
 
23625
23978
  end
23626
23979
 
23980
+ class RefundError
23981
+
23982
+ attr_reader :code, :messages, :decline_code
23983
+
23984
+ def initialize(incoming={})
23985
+ opts = HttpClient::Helper.symbolize_keys(incoming)
23986
+ HttpClient::Preconditions.require_keys(opts, [:messages, :decline_code], 'RefundError')
23987
+ @code = (x = (x = opts.delete(:code); x.nil? ? "generic_error" : x); x.is_a?(::Io::Flow::V0::Models::GenericErrorCode) ? x : ::Io::Flow::V0::Models::GenericErrorCode.apply(x))
23988
+ @messages = HttpClient::Preconditions.assert_class('messages', opts.delete(:messages), Array).map { |v| HttpClient::Preconditions.assert_class('messages', v, String) }
23989
+ @decline_code = (x = opts.delete(:decline_code); x.is_a?(::Io::Flow::V0::Models::RefundDeclineCode) ? x : ::Io::Flow::V0::Models::RefundDeclineCode.apply(x))
23990
+ end
23991
+
23992
+ def to_json
23993
+ JSON.dump(to_hash)
23994
+ end
23995
+
23996
+ def copy(incoming={})
23997
+ RefundError.new(to_hash.merge(HttpClient::Helper.symbolize_keys(incoming)))
23998
+ end
23999
+
24000
+ def to_hash
24001
+ {
24002
+ :code => code.value,
24003
+ :messages => messages,
24004
+ :decline_code => decline_code.value
24005
+ }
24006
+ end
24007
+
24008
+ end
24009
+
23627
24010
  # Refund actually transfers funds. You can refund as many times as you'd like up
23628
24011
  # until the total amount of captured funds has been refunded. Note when creating
23629
24012
  # a refund you can specify either an order authorization id, a capture id, or an
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.23
4
+ version: 0.2.24
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-07-24 00:00:00.000000000 Z
11
+ date: 2017-08-02 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: json