flowcommerce 0.0.69 → 0.0.70

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: 14c36d47b91c27d5bbd5b21fccec6343f92bdb28
4
- data.tar.gz: 5a9a3fea67992879f74b6da2538d24fc332e3bbe
3
+ metadata.gz: 554e404bf9a85af7d6ace57fd20877c740c37acf
4
+ data.tar.gz: b687496080a72b2029ddca40c33de59284533ae8
5
5
  SHA512:
6
- metadata.gz: d17db944f5dd939af7e20ea963fd80b772475178a513da3434cb331d679dd32a874b72c8ba466d5db16284a95ddba11d07bfb6107a9d1db40f7bfcdb5fa1d93c
7
- data.tar.gz: 2cd98c257751529e8f330f3d2a6f5c3092854908f07dc11f3261517227f1a32ac1d1626d264ac3805695d01c468d9fd297dedf15c252c7bdddae110df52981e5
6
+ metadata.gz: 05b0289fa4060030ab4aecbeb2176e495625c474e6dd679b8136ec85083b7400ec336a3f7b1b00e3e5d11a83e273ac066d0330aecd5e4ba03c5796be69589022
7
+ data.tar.gz: 351ad7c5c845a6a7d88ebba70d8aee5c19cff63821f5ed1302ec419df4974bafe6a2693f7efd8a9d4d2a43f2eb4444d170926e2f04b96822be232330d5fdb308
@@ -1,6 +1,6 @@
1
1
  # Generated by apidoc - http://www.apidoc.me
2
2
  # Service version: 0.1.72
3
- # apidoc:0.11.37 http://www.apidoc.me/flow/api/0.1.72/ruby_client
3
+ # apidoc:0.11.37 http://www.apidoc.me/flow/api/0.1.75/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 = 'apidoc:0.11.37 http://www.apidoc.me/flow/api/0.1.72/ruby_client' unless defined?(Constants::USER_AGENT)
28
+ USER_AGENT = 'apidoc:0.11.37 http://www.apidoc.me/flow/api/0.1.75/ruby_client' unless defined?(Constants::USER_AGENT)
29
29
  VERSION = '0.1.72' unless defined?(Constants::VERSION)
30
30
  VERSION_MAJOR = 0 unless defined?(VERSION_MAJOR)
31
31
 
@@ -101,6 +101,14 @@ module Io
101
101
  @subcatalog_items ||= ::Io::Flow::V0::Clients::SubcatalogItems.new(self)
102
102
  end
103
103
 
104
+ def targetings
105
+ @targetings ||= ::Io::Flow::V0::Clients::Targetings.new(self)
106
+ end
107
+
108
+ def targeting_items
109
+ @targeting_items ||= ::Io::Flow::V0::Clients::TargetingItems.new(self)
110
+ end
111
+
104
112
  def item_functions
105
113
  @item_functions ||= ::Io::Flow::V0::Clients::ItemFunctions.new(self)
106
114
  end
@@ -213,6 +221,10 @@ module Io
213
221
  @shipping_labels ||= ::Io::Flow::V0::Clients::ShippingLabels.new(self)
214
222
  end
215
223
 
224
+ def shipping_notifications
225
+ @shipping_notifications ||= ::Io::Flow::V0::Clients::ShippingNotifications.new(self)
226
+ end
227
+
216
228
  def tiers
217
229
  @tiers ||= ::Io::Flow::V0::Clients::Tiers.new(self)
218
230
  end
@@ -1258,6 +1270,94 @@ module Io
1258
1270
 
1259
1271
  end
1260
1272
 
1273
+ class Targetings
1274
+
1275
+ def initialize(client)
1276
+ @client = HttpClient::Preconditions.assert_class('client', client, ::Io::Flow::V0::Client)
1277
+ end
1278
+
1279
+ def get(organization, incoming={})
1280
+ HttpClient::Preconditions.assert_class('organization', organization, String)
1281
+ opts = HttpClient::Helper.symbolize_keys(incoming)
1282
+ query = {
1283
+ :id => (x = opts.delete(:id); x.nil? ? nil : HttpClient::Preconditions.assert_class('id', x, Array).map { |v| HttpClient::Preconditions.assert_class('id', v, String) }),
1284
+ :key => (x = opts.delete(:key); x.nil? ? nil : HttpClient::Preconditions.assert_class('key', x, Array).map { |v| HttpClient::Preconditions.assert_class('key', v, String) }),
1285
+ :limit => HttpClient::Preconditions.assert_class('limit', (x = opts.delete(:limit); x.nil? ? 25 : x), Integer),
1286
+ :offset => HttpClient::Preconditions.assert_class('offset', (x = opts.delete(:offset); x.nil? ? 0 : x), Integer),
1287
+ :sort => HttpClient::Preconditions.assert_class('sort', (x = opts.delete(:sort); x.nil? ? "-created_at" : x), String)
1288
+ }.delete_if { |k, v| v.nil? }
1289
+ r = @client.request("/#{CGI.escape(organization)}/catalog/targetings").with_query(query).get
1290
+ r.map { |x| ::Io::Flow::V0::Models::Targeting.new(x) }
1291
+ end
1292
+
1293
+ def post(organization, targeting_form)
1294
+ HttpClient::Preconditions.assert_class('organization', organization, String)
1295
+ HttpClient::Preconditions.assert_class('targeting_form', targeting_form, ::Io::Flow::V0::Models::TargetingForm)
1296
+ r = @client.request("/#{CGI.escape(organization)}/catalog/targetings").with_json(targeting_form.to_json).post
1297
+ ::Io::Flow::V0::Models::Targeting.new(r)
1298
+ end
1299
+
1300
+ def get_by_key(organization, key)
1301
+ HttpClient::Preconditions.assert_class('organization', organization, String)
1302
+ HttpClient::Preconditions.assert_class('key', key, String)
1303
+ r = @client.request("/#{CGI.escape(organization)}/catalog/targetings/#{CGI.escape(key)}").get
1304
+ ::Io::Flow::V0::Models::Targeting.new(r)
1305
+ end
1306
+
1307
+ def put_by_key(organization, key, targeting_form)
1308
+ HttpClient::Preconditions.assert_class('organization', organization, String)
1309
+ HttpClient::Preconditions.assert_class('key', key, String)
1310
+ HttpClient::Preconditions.assert_class('targeting_form', targeting_form, ::Io::Flow::V0::Models::TargetingForm)
1311
+ r = @client.request("/#{CGI.escape(organization)}/catalog/targetings/#{CGI.escape(key)}").with_json(targeting_form.to_json).put
1312
+ ::Io::Flow::V0::Models::Targeting.new(r)
1313
+ end
1314
+
1315
+ def delete_by_key(organization, key)
1316
+ HttpClient::Preconditions.assert_class('organization', organization, String)
1317
+ HttpClient::Preconditions.assert_class('key', key, String)
1318
+ r = @client.request("/#{CGI.escape(organization)}/catalog/targetings/#{CGI.escape(key)}").delete
1319
+ nil
1320
+ end
1321
+
1322
+ def get_versions(organization, incoming={})
1323
+ HttpClient::Preconditions.assert_class('organization', organization, String)
1324
+ opts = HttpClient::Helper.symbolize_keys(incoming)
1325
+ query = {
1326
+ :id => (x = opts.delete(:id); x.nil? ? nil : HttpClient::Preconditions.assert_class('id', x, Array).map { |v| HttpClient::Preconditions.assert_class('id', v, String) }),
1327
+ :key => (x = opts.delete(:key); x.nil? ? nil : HttpClient::Preconditions.assert_class('key', x, Array).map { |v| HttpClient::Preconditions.assert_class('key', v, String) }),
1328
+ :limit => HttpClient::Preconditions.assert_class('limit', (x = opts.delete(:limit); x.nil? ? 25 : x), Integer),
1329
+ :offset => HttpClient::Preconditions.assert_class('offset', (x = opts.delete(:offset); x.nil? ? 0 : x), Integer),
1330
+ :sort => HttpClient::Preconditions.assert_class('sort', (x = opts.delete(:sort); x.nil? ? "journal_timestamp" : x), String)
1331
+ }.delete_if { |k, v| v.nil? }
1332
+ r = @client.request("/#{CGI.escape(organization)}/catalog/targetings/versions").with_query(query).get
1333
+ r.map { |x| ::Io::Flow::V0::Models::TargetingVersion.new(x) }
1334
+ end
1335
+
1336
+ end
1337
+
1338
+ class TargetingItems
1339
+
1340
+ def initialize(client)
1341
+ @client = HttpClient::Preconditions.assert_class('client', client, ::Io::Flow::V0::Client)
1342
+ end
1343
+
1344
+ def get(organization, incoming={})
1345
+ HttpClient::Preconditions.assert_class('organization', organization, String)
1346
+ opts = HttpClient::Helper.symbolize_keys(incoming)
1347
+ query = {
1348
+ :id => (x = opts.delete(:id); x.nil? ? nil : HttpClient::Preconditions.assert_class('id', x, Array).map { |v| HttpClient::Preconditions.assert_class('id', v, String) }),
1349
+ :key => (x = opts.delete(:key); x.nil? ? nil : HttpClient::Preconditions.assert_class('key', x, Array).map { |v| HttpClient::Preconditions.assert_class('key', v, String) }),
1350
+ :item_number => (x = opts.delete(:item_number); x.nil? ? nil : HttpClient::Preconditions.assert_class('item_number', x, Array).map { |v| HttpClient::Preconditions.assert_class('item_number', v, String) }),
1351
+ :limit => HttpClient::Preconditions.assert_class('limit', (x = opts.delete(:limit); x.nil? ? 25 : x), Integer),
1352
+ :offset => HttpClient::Preconditions.assert_class('offset', (x = opts.delete(:offset); x.nil? ? 0 : x), Integer),
1353
+ :sort => HttpClient::Preconditions.assert_class('sort', (x = opts.delete(:sort); x.nil? ? "-created_at" : x), String)
1354
+ }.delete_if { |k, v| v.nil? }
1355
+ r = @client.request("/#{CGI.escape(organization)}/catalog/targeting-items").with_query(query).get
1356
+ r.map { |x| ::Io::Flow::V0::Models::TargetingItem.new(x) }
1357
+ end
1358
+
1359
+ end
1360
+
1261
1361
  class ItemFunctions
1262
1362
 
1263
1363
  def initialize(client)
@@ -2473,6 +2573,74 @@ module Io
2473
2573
 
2474
2574
  end
2475
2575
 
2576
+ class ShippingNotifications
2577
+
2578
+ def initialize(client)
2579
+ @client = HttpClient::Preconditions.assert_class('client', client, ::Io::Flow::V0::Client)
2580
+ end
2581
+
2582
+ def get(organization, incoming={})
2583
+ HttpClient::Preconditions.assert_class('organization', organization, String)
2584
+ opts = HttpClient::Helper.symbolize_keys(incoming)
2585
+ query = {
2586
+ :id => (x = opts.delete(:id); x.nil? ? nil : HttpClient::Preconditions.assert_class('id', x, Array).map { |v| HttpClient::Preconditions.assert_class('id', v, String) }),
2587
+ :carrier_tracking_number => (x = opts.delete(:carrier_tracking_number); x.nil? ? nil : HttpClient::Preconditions.assert_class('carrier_tracking_number', x, Array).map { |v| HttpClient::Preconditions.assert_class('carrier_tracking_number', v, String) }),
2588
+ :flow_tracking_number => (x = opts.delete(:flow_tracking_number); x.nil? ? nil : HttpClient::Preconditions.assert_class('flow_tracking_number', x, Array).map { |v| HttpClient::Preconditions.assert_class('flow_tracking_number', v, String) }),
2589
+ :order_number => (x = opts.delete(:order_number); x.nil? ? nil : HttpClient::Preconditions.assert_class('order_number', x, Array).map { |v| HttpClient::Preconditions.assert_class('order_number', v, String) }),
2590
+ :service => (x = opts.delete(:service); x.nil? ? nil : HttpClient::Preconditions.assert_class('service', x, Array).map { |v| HttpClient::Preconditions.assert_class('service', v, String) }),
2591
+ :limit => HttpClient::Preconditions.assert_class('limit', (x = opts.delete(:limit); x.nil? ? 25 : x), Integer),
2592
+ :offset => HttpClient::Preconditions.assert_class('offset', (x = opts.delete(:offset); x.nil? ? 0 : x), Integer),
2593
+ :sort => HttpClient::Preconditions.assert_class('sort', (x = opts.delete(:sort); x.nil? ? "-created_at" : x), String)
2594
+ }.delete_if { |k, v| v.nil? }
2595
+ r = @client.request("/#{CGI.escape(organization)}/shipping-notifications").with_query(query).get
2596
+ r.map { |x| ::Io::Flow::V0::Models::ShippingNotification.new(x) }
2597
+ end
2598
+
2599
+ def post(organization, shipping_notification_form)
2600
+ HttpClient::Preconditions.assert_class('organization', organization, String)
2601
+ HttpClient::Preconditions.assert_class('shipping_notification_form', shipping_notification_form, ::Io::Flow::V0::Models::ShippingNotificationForm)
2602
+ r = @client.request("/#{CGI.escape(organization)}/shipping-notifications").with_json(shipping_notification_form.to_json).post
2603
+ ::Io::Flow::V0::Models::ShippingNotification.new(r)
2604
+ end
2605
+
2606
+ def get_by_id(organization, id)
2607
+ HttpClient::Preconditions.assert_class('organization', organization, String)
2608
+ HttpClient::Preconditions.assert_class('id', id, String)
2609
+ r = @client.request("/#{CGI.escape(organization)}/shipping-notifications/#{CGI.escape(id)}").get
2610
+ ::Io::Flow::V0::Models::ShippingNotification.new(r)
2611
+ end
2612
+
2613
+ def put_by_id(organization, id, shipping_notification_form)
2614
+ HttpClient::Preconditions.assert_class('organization', organization, String)
2615
+ HttpClient::Preconditions.assert_class('id', id, String)
2616
+ HttpClient::Preconditions.assert_class('shipping_notification_form', shipping_notification_form, ::Io::Flow::V0::Models::ShippingNotificationForm)
2617
+ r = @client.request("/#{CGI.escape(organization)}/shipping-notifications/#{CGI.escape(id)}").with_json(shipping_notification_form.to_json).put
2618
+ ::Io::Flow::V0::Models::ShippingNotification.new(r)
2619
+ end
2620
+
2621
+ def delete_by_id(organization, id)
2622
+ HttpClient::Preconditions.assert_class('organization', organization, String)
2623
+ HttpClient::Preconditions.assert_class('id', id, String)
2624
+ r = @client.request("/#{CGI.escape(organization)}/shipping-notifications/#{CGI.escape(id)}").delete
2625
+ nil
2626
+ end
2627
+
2628
+ def get_versions(organization, incoming={})
2629
+ HttpClient::Preconditions.assert_class('organization', organization, String)
2630
+ opts = HttpClient::Helper.symbolize_keys(incoming)
2631
+ query = {
2632
+ :id => (x = opts.delete(:id); x.nil? ? nil : HttpClient::Preconditions.assert_class('id', x, Array).map { |v| HttpClient::Preconditions.assert_class('id', v, String) }),
2633
+ :notification => (x = opts.delete(:notification); x.nil? ? nil : HttpClient::Preconditions.assert_class('notification', x, Array).map { |v| HttpClient::Preconditions.assert_class('notification', v, String) }),
2634
+ :limit => HttpClient::Preconditions.assert_class('limit', (x = opts.delete(:limit); x.nil? ? 25 : x), Integer),
2635
+ :offset => HttpClient::Preconditions.assert_class('offset', (x = opts.delete(:offset); x.nil? ? 0 : x), Integer),
2636
+ :sort => HttpClient::Preconditions.assert_class('sort', (x = opts.delete(:sort); x.nil? ? "journal_timestamp" : x), String)
2637
+ }.delete_if { |k, v| v.nil? }
2638
+ r = @client.request("/#{CGI.escape(organization)}/shipping-notifications/versions").with_query(query).get
2639
+ r.map { |x| ::Io::Flow::V0::Models::ShippingNotificationVersion.new(x) }
2640
+ end
2641
+
2642
+ end
2643
+
2476
2644
  class Tiers
2477
2645
 
2478
2646
  def initialize(client)
@@ -3796,6 +3964,8 @@ module Io
3796
3964
  HS10_CODE_UPSERTED = 'hs10_code_upserted' unless defined?(HS10_CODE_UPSERTED)
3797
3965
  HS10_CODE_DELETED = 'hs10_code_deleted' unless defined?(HS10_CODE_DELETED)
3798
3966
  LABEL_UPSERTED = 'label_upserted' unless defined?(LABEL_UPSERTED)
3967
+ NOTIFICATION_UPSERTED = 'notification_upserted' unless defined?(NOTIFICATION_UPSERTED)
3968
+ NOTIFICATION_DELETED = 'notification_deleted' unless defined?(NOTIFICATION_DELETED)
3799
3969
  LOCALIZED_ITEM_UPSERTED = 'localized_item_upserted' unless defined?(LOCALIZED_ITEM_UPSERTED)
3800
3970
  LOCALIZED_ITEM_DELETED = 'localized_item_deleted' unless defined?(LOCALIZED_ITEM_DELETED)
3801
3971
  LOCALIZED_ITEM_SNAPSHOT = 'localized_item_snapshot' unless defined?(LOCALIZED_ITEM_SNAPSHOT)
@@ -3855,6 +4025,8 @@ module Io
3855
4025
  when Types::HS10_CODE_UPSERTED; Hs10CodeUpserted.new(hash)
3856
4026
  when Types::HS10_CODE_DELETED; Hs10CodeDeleted.new(hash)
3857
4027
  when Types::LABEL_UPSERTED; LabelUpserted.new(hash)
4028
+ when Types::NOTIFICATION_UPSERTED; NotificationUpserted.new(hash)
4029
+ when Types::NOTIFICATION_DELETED; NotificationDeleted.new(hash)
3858
4030
  when Types::LOCALIZED_ITEM_UPSERTED; LocalizedItemUpserted.new(hash)
3859
4031
  when Types::LOCALIZED_ITEM_DELETED; LocalizedItemDeleted.new(hash)
3860
4032
  when Types::LOCALIZED_ITEM_SNAPSHOT; LocalizedItemSnapshot.new(hash)
@@ -4284,7 +4456,7 @@ module Io
4284
4456
 
4285
4457
  module Types
4286
4458
  ORDER_ITEM_NOT_AVAILABLE_ERROR = 'order_item_not_available_error' unless defined?(ORDER_ITEM_NOT_AVAILABLE_ERROR)
4287
- VALIDATION_ERROR = 'validation_error' unless defined?(VALIDATION_ERROR)
4459
+ GENERIC_ERROR = 'generic_error' unless defined?(GENERIC_ERROR)
4288
4460
  end
4289
4461
 
4290
4462
  def initialize(incoming={})
@@ -4301,7 +4473,7 @@ module Io
4301
4473
  HttpClient::Preconditions.assert_class('hash', hash, Hash)
4302
4474
  case HttpClient::Helper.symbolize_keys(hash)[:code]
4303
4475
  when Types::ORDER_ITEM_NOT_AVAILABLE_ERROR; OrderItemNotAvailableError.new(hash)
4304
- when Types::VALIDATION_ERROR; ValidationError.new(hash)
4476
+ when Types::GENERIC_ERROR; GenericError.new(hash)
4305
4477
  else OrderErrorUndefinedType.new(:name => union_type_name)
4306
4478
  end
4307
4479
  end
@@ -5008,7 +5180,7 @@ module Io
5008
5180
  end
5009
5181
 
5010
5182
  def EventType.ALL
5011
- @@all ||= [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.targeting_item_upserted, EventType.targeting_item_deleted, EventType.flow_currency_setting_deleted, EventType.flow_currency_setting_upserted, EventType.rate_deleted, EventType.rate_upserted, EventType.spot_rate_deleted, EventType.spot_rate_upserted, EventType.organization_currency_setting_deleted, EventType.organization_currency_setting_upserted, EventType.contracted_rate_upserted, EventType.experience_deleted, EventType.experience_upserted, EventType.item_margin_deleted, EventType.item_margin_upserted, EventType.order_deleted, EventType.order_upserted, EventType.order_booking_deleted, EventType.order_booking_upserted, EventType.hs6_code_upserted, EventType.hs6_code_deleted, EventType.hs10_code_upserted, EventType.hs10_code_deleted, EventType.label_upserted, EventType.localized_item_upserted, EventType.localized_item_deleted, EventType.localized_item_snapshot, EventType.organization_upserted, EventType.organization_deleted, EventType.authorization_upserted, EventType.authorization_deleted, EventType.capture_upserted, EventType.card_upserted, EventType.card_deleted, EventType.refund_upserted, EventType.tracking_label_event_upserted]
5183
+ @@all ||= [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.targeting_item_upserted, EventType.targeting_item_deleted, EventType.flow_currency_setting_deleted, EventType.flow_currency_setting_upserted, EventType.rate_deleted, EventType.rate_upserted, EventType.spot_rate_deleted, EventType.spot_rate_upserted, EventType.organization_currency_setting_deleted, EventType.organization_currency_setting_upserted, EventType.contracted_rate_upserted, EventType.experience_deleted, EventType.experience_upserted, EventType.item_margin_deleted, EventType.item_margin_upserted, EventType.order_deleted, EventType.order_upserted, EventType.order_booking_deleted, EventType.order_booking_upserted, EventType.hs6_code_upserted, EventType.hs6_code_deleted, EventType.hs10_code_upserted, EventType.hs10_code_deleted, EventType.label_upserted, EventType.notification_upserted, EventType.notification_deleted, EventType.localized_item_upserted, EventType.localized_item_deleted, EventType.localized_item_snapshot, EventType.organization_upserted, EventType.organization_deleted, EventType.authorization_upserted, EventType.authorization_deleted, EventType.capture_upserted, EventType.card_upserted, EventType.card_deleted, EventType.refund_upserted, EventType.tracking_label_event_upserted]
5012
5184
  end
5013
5185
 
5014
5186
  def EventType.catalog_upserted
@@ -5139,6 +5311,14 @@ module Io
5139
5311
  @@_label_upserted ||= EventType.new('label_upserted')
5140
5312
  end
5141
5313
 
5314
+ def EventType.notification_upserted
5315
+ @@_notification_upserted ||= EventType.new('notification_upserted')
5316
+ end
5317
+
5318
+ def EventType.notification_deleted
5319
+ @@_notification_deleted ||= EventType.new('notification_deleted')
5320
+ end
5321
+
5142
5322
  def EventType.localized_item_upserted
5143
5323
  @@_localized_item_upserted ||= EventType.new('localized_item_upserted')
5144
5324
  end
@@ -9908,6 +10088,35 @@ module Io
9908
10088
 
9909
10089
  end
9910
10090
 
10091
+ # An error of some type has occured. The most common error will be validation on
10092
+ # input. See messages for details.
10093
+ class GenericError < OrderError
10094
+
10095
+ attr_reader :messages
10096
+
10097
+ def initialize(incoming={})
10098
+ super(:name => OrderError::Types::GENERIC_ERROR)
10099
+ opts = HttpClient::Helper.symbolize_keys(incoming)
10100
+ HttpClient::Preconditions.require_keys(opts, [:messages], 'GenericError')
10101
+ @messages = HttpClient::Preconditions.assert_class('messages', opts.delete(:messages), Array).map { |v| HttpClient::Preconditions.assert_class('messages', v, String) }
10102
+ end
10103
+
10104
+ def to_json
10105
+ JSON.dump(to_hash)
10106
+ end
10107
+
10108
+ def copy(incoming={})
10109
+ GenericError.new(subtype_to_hash.merge(HttpClient::Helper.symbolize_keys(incoming)))
10110
+ end
10111
+
10112
+ def subtype_to_hash
10113
+ {
10114
+ :messages => messages
10115
+ }
10116
+ end
10117
+
10118
+ end
10119
+
9911
10120
  class HarmonizationDocument < Document
9912
10121
 
9913
10122
  attr_reader :code, :categories, :origin
@@ -12614,6 +12823,104 @@ module Io
12614
12823
 
12615
12824
  end
12616
12825
 
12826
+ class NotificationDeleted < Event
12827
+
12828
+ attr_reader :event_id, :timestamp, :organization, :notification_id, :carrier_tracking_number, :flow_tracking_number, :destination, :origin, :carrier, :service, :order, :package
12829
+
12830
+ def initialize(incoming={})
12831
+ super(:name => Event::Types::NOTIFICATION_DELETED)
12832
+ opts = HttpClient::Helper.symbolize_keys(incoming)
12833
+ HttpClient::Preconditions.require_keys(opts, [:event_id, :timestamp, :organization, :notification_id, :carrier_tracking_number, :flow_tracking_number, :destination, :origin, :carrier, :service, :order, :package], 'NotificationDeleted')
12834
+ @event_id = HttpClient::Preconditions.assert_class('event_id', opts.delete(:event_id), String)
12835
+ @timestamp = HttpClient::Preconditions.assert_class('timestamp', HttpClient::Helper.to_date_time_iso8601(opts.delete(:timestamp)), DateTime)
12836
+ @organization = HttpClient::Preconditions.assert_class('organization', opts.delete(:organization), String)
12837
+ @notification_id = HttpClient::Preconditions.assert_class('notification_id', opts.delete(:notification_id), String)
12838
+ @carrier_tracking_number = HttpClient::Preconditions.assert_class('carrier_tracking_number', opts.delete(:carrier_tracking_number), String)
12839
+ @flow_tracking_number = HttpClient::Preconditions.assert_class('flow_tracking_number', opts.delete(:flow_tracking_number), String)
12840
+ @destination = HttpClient::Preconditions.assert_class('destination', HttpClient::Helper.to_object(opts.delete(:destination)), Hash)
12841
+ @origin = HttpClient::Preconditions.assert_class('origin', HttpClient::Helper.to_object(opts.delete(:origin)), Hash)
12842
+ @carrier = HttpClient::Preconditions.assert_class('carrier', opts.delete(:carrier), String)
12843
+ @service = HttpClient::Preconditions.assert_class('service', opts.delete(:service), String)
12844
+ @order = HttpClient::Preconditions.assert_class('order', opts.delete(:order), String)
12845
+ @package = HttpClient::Preconditions.assert_class('package', HttpClient::Helper.to_object(opts.delete(:package)), Hash)
12846
+ end
12847
+
12848
+ def to_json
12849
+ JSON.dump(to_hash)
12850
+ end
12851
+
12852
+ def copy(incoming={})
12853
+ NotificationDeleted.new(subtype_to_hash.merge(HttpClient::Helper.symbolize_keys(incoming)))
12854
+ end
12855
+
12856
+ def subtype_to_hash
12857
+ {
12858
+ :event_id => event_id,
12859
+ :timestamp => timestamp,
12860
+ :organization => organization,
12861
+ :notification_id => notification_id,
12862
+ :carrier_tracking_number => carrier_tracking_number,
12863
+ :flow_tracking_number => flow_tracking_number,
12864
+ :destination => destination,
12865
+ :origin => origin,
12866
+ :carrier => carrier,
12867
+ :service => service,
12868
+ :order => order,
12869
+ :package => package
12870
+ }
12871
+ end
12872
+
12873
+ end
12874
+
12875
+ class NotificationUpserted < Event
12876
+
12877
+ attr_reader :event_id, :timestamp, :organization, :notification_id, :carrier_tracking_number, :flow_tracking_number, :destination, :origin, :carrier, :service, :order, :package
12878
+
12879
+ def initialize(incoming={})
12880
+ super(:name => Event::Types::NOTIFICATION_UPSERTED)
12881
+ opts = HttpClient::Helper.symbolize_keys(incoming)
12882
+ HttpClient::Preconditions.require_keys(opts, [:event_id, :timestamp, :organization, :notification_id, :carrier_tracking_number, :flow_tracking_number, :destination, :origin, :carrier, :service, :order, :package], 'NotificationUpserted')
12883
+ @event_id = HttpClient::Preconditions.assert_class('event_id', opts.delete(:event_id), String)
12884
+ @timestamp = HttpClient::Preconditions.assert_class('timestamp', HttpClient::Helper.to_date_time_iso8601(opts.delete(:timestamp)), DateTime)
12885
+ @organization = HttpClient::Preconditions.assert_class('organization', opts.delete(:organization), String)
12886
+ @notification_id = HttpClient::Preconditions.assert_class('notification_id', opts.delete(:notification_id), String)
12887
+ @carrier_tracking_number = HttpClient::Preconditions.assert_class('carrier_tracking_number', opts.delete(:carrier_tracking_number), String)
12888
+ @flow_tracking_number = HttpClient::Preconditions.assert_class('flow_tracking_number', opts.delete(:flow_tracking_number), String)
12889
+ @destination = HttpClient::Preconditions.assert_class('destination', HttpClient::Helper.to_object(opts.delete(:destination)), Hash)
12890
+ @origin = HttpClient::Preconditions.assert_class('origin', HttpClient::Helper.to_object(opts.delete(:origin)), Hash)
12891
+ @carrier = HttpClient::Preconditions.assert_class('carrier', opts.delete(:carrier), String)
12892
+ @service = HttpClient::Preconditions.assert_class('service', opts.delete(:service), String)
12893
+ @order = HttpClient::Preconditions.assert_class('order', opts.delete(:order), String)
12894
+ @package = HttpClient::Preconditions.assert_class('package', HttpClient::Helper.to_object(opts.delete(:package)), Hash)
12895
+ end
12896
+
12897
+ def to_json
12898
+ JSON.dump(to_hash)
12899
+ end
12900
+
12901
+ def copy(incoming={})
12902
+ NotificationUpserted.new(subtype_to_hash.merge(HttpClient::Helper.symbolize_keys(incoming)))
12903
+ end
12904
+
12905
+ def subtype_to_hash
12906
+ {
12907
+ :event_id => event_id,
12908
+ :timestamp => timestamp,
12909
+ :organization => organization,
12910
+ :notification_id => notification_id,
12911
+ :carrier_tracking_number => carrier_tracking_number,
12912
+ :flow_tracking_number => flow_tracking_number,
12913
+ :destination => destination,
12914
+ :origin => origin,
12915
+ :carrier => carrier,
12916
+ :service => service,
12917
+ :order => order,
12918
+ :package => package
12919
+ }
12920
+ end
12921
+
12922
+ end
12923
+
12617
12924
  # Flags to indicate whether a feature is enabled/disabled on a particular model
12618
12925
  # (e.g. show/do not show attribute as a column in harmonization table view of
12619
12926
  # items)
@@ -15081,16 +15388,27 @@ module Io
15081
15388
 
15082
15389
  end
15083
15390
 
15084
- # Exports product level data for import into solidus
15085
- class SolidusProductExportType < ExportType
15391
+ # Represents information about a client-facilitated shipment where the shipping
15392
+ # label and fulfillment was not handled by Flow. For merchant-of-record and
15393
+ # tracking purposes, clients doing their own shipping will need to notify Flow
15394
+ # of shipped packages.
15395
+ class ShippingNotification
15086
15396
 
15087
- attr_reader :numbers, :sort
15397
+ attr_reader :id, :attributes, :carrier_tracking_number, :destination, :flow_tracking_number, :origin, :package, :service, :window, :order
15088
15398
 
15089
15399
  def initialize(incoming={})
15090
- super(:name => ExportType::Types::SOLIDUS_PRODUCT_EXPORT_TYPE)
15091
15400
  opts = HttpClient::Helper.symbolize_keys(incoming)
15092
- @numbers = (x = opts.delete(:numbers); x.nil? ? nil : HttpClient::Preconditions.assert_class('numbers', x, Array).map { |v| HttpClient::Preconditions.assert_class('numbers', v, String) })
15093
- @sort = (x = opts.delete(:sort); x.nil? ? nil : HttpClient::Preconditions.assert_class('sort', x, String))
15401
+ HttpClient::Preconditions.require_keys(opts, [:id, :carrier_tracking_number, :destination, :flow_tracking_number, :origin, :package, :service, :window], 'ShippingNotification')
15402
+ @id = HttpClient::Preconditions.assert_class('id', opts.delete(:id), String)
15403
+ @attributes = HttpClient::Preconditions.assert_class('attributes', (x = opts.delete(:attributes); x.nil? ? {} : x), Hash).inject({}) { |h, d| h[d[0]] = HttpClient::Preconditions.assert_class('attributes', d[1], String); h }
15404
+ @carrier_tracking_number = HttpClient::Preconditions.assert_class('carrier_tracking_number', opts.delete(:carrier_tracking_number), String)
15405
+ @destination = (x = opts.delete(:destination); x.is_a?(::Io::Flow::V0::Models::ShippingAddress) ? x : ::Io::Flow::V0::Models::ShippingAddress.new(x))
15406
+ @flow_tracking_number = HttpClient::Preconditions.assert_class('flow_tracking_number', opts.delete(:flow_tracking_number), String)
15407
+ @origin = (x = opts.delete(:origin); x.is_a?(::Io::Flow::V0::Models::ShippingAddress) ? x : ::Io::Flow::V0::Models::ShippingAddress.new(x))
15408
+ @package = (x = opts.delete(:package); x.is_a?(::Io::Flow::V0::Models::ShippingLabelPackage) ? x : ::Io::Flow::V0::Models::ShippingLabelPackage.new(x))
15409
+ @service = (x = opts.delete(:service); x.is_a?(::Io::Flow::V0::Models::ServiceSummary) ? x : ::Io::Flow::V0::Models::ServiceSummary.new(x))
15410
+ @window = (x = opts.delete(:window); x.is_a?(::Io::Flow::V0::Models::DatetimeRange) ? x : ::Io::Flow::V0::Models::DatetimeRange.new(x))
15411
+ @order = (x = opts.delete(:order); x.nil? ? nil : (x = x; x.is_a?(::Io::Flow::V0::Models::LabelOrderSummary) ? x : ::Io::Flow::V0::Models::LabelOrderSummary.new(x)))
15094
15412
  end
15095
15413
 
15096
15414
  def to_json
@@ -15098,19 +15416,130 @@ module Io
15098
15416
  end
15099
15417
 
15100
15418
  def copy(incoming={})
15101
- SolidusProductExportType.new(subtype_to_hash.merge(HttpClient::Helper.symbolize_keys(incoming)))
15419
+ ShippingNotification.new(to_hash.merge(HttpClient::Helper.symbolize_keys(incoming)))
15102
15420
  end
15103
15421
 
15104
- def subtype_to_hash
15422
+ def to_hash
15105
15423
  {
15106
- :numbers => numbers.nil? ? nil : numbers,
15107
- :sort => sort
15108
- }
15109
- end
15110
-
15111
- end
15112
-
15113
- # Exports variant level data for import into solidus
15424
+ :id => id,
15425
+ :attributes => attributes,
15426
+ :carrier_tracking_number => carrier_tracking_number,
15427
+ :destination => destination.to_hash,
15428
+ :flow_tracking_number => flow_tracking_number,
15429
+ :origin => origin.to_hash,
15430
+ :package => package.to_hash,
15431
+ :service => service.to_hash,
15432
+ :window => window.to_hash,
15433
+ :order => order.nil? ? nil : order.to_hash
15434
+ }
15435
+ end
15436
+
15437
+ end
15438
+
15439
+ # Form for information about a client-facilitated shipment where the shipping
15440
+ # label and fulfillment was not handled by Flow. For merchant-of-record and
15441
+ # tracking purposes, clients doing their own shipping will need to notify Flow
15442
+ # of shipped packages.
15443
+ class ShippingNotificationForm
15444
+
15445
+ attr_reader :attributes, :carrier_tracking_number, :destination, :order_number, :origin, :package, :service
15446
+
15447
+ def initialize(incoming={})
15448
+ opts = HttpClient::Helper.symbolize_keys(incoming)
15449
+ HttpClient::Preconditions.require_keys(opts, [:carrier_tracking_number, :destination, :order_number, :origin, :package, :service], 'ShippingNotificationForm')
15450
+ @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 })
15451
+ @carrier_tracking_number = HttpClient::Preconditions.assert_class('carrier_tracking_number', opts.delete(:carrier_tracking_number), String)
15452
+ @destination = (x = opts.delete(:destination); x.is_a?(::Io::Flow::V0::Models::ShippingAddress) ? x : ::Io::Flow::V0::Models::ShippingAddress.new(x))
15453
+ @order_number = HttpClient::Preconditions.assert_class('order_number', opts.delete(:order_number), String)
15454
+ @origin = (x = opts.delete(:origin); x.is_a?(::Io::Flow::V0::Models::ShippingAddress) ? x : ::Io::Flow::V0::Models::ShippingAddress.new(x))
15455
+ @package = (x = opts.delete(:package); x.is_a?(::Io::Flow::V0::Models::ShippingLabelPackage) ? x : ::Io::Flow::V0::Models::ShippingLabelPackage.new(x))
15456
+ @service = HttpClient::Preconditions.assert_class('service', opts.delete(:service), String)
15457
+ end
15458
+
15459
+ def to_json
15460
+ JSON.dump(to_hash)
15461
+ end
15462
+
15463
+ def copy(incoming={})
15464
+ ShippingNotificationForm.new(to_hash.merge(HttpClient::Helper.symbolize_keys(incoming)))
15465
+ end
15466
+
15467
+ def to_hash
15468
+ {
15469
+ :attributes => attributes.nil? ? nil : attributes,
15470
+ :carrier_tracking_number => carrier_tracking_number,
15471
+ :destination => destination.to_hash,
15472
+ :order_number => order_number,
15473
+ :origin => origin.to_hash,
15474
+ :package => package.to_hash,
15475
+ :service => service
15476
+ }
15477
+ end
15478
+
15479
+ end
15480
+
15481
+ class ShippingNotificationVersion
15482
+
15483
+ attr_reader :id, :timestamp, :type, :shipping_notification
15484
+
15485
+ def initialize(incoming={})
15486
+ opts = HttpClient::Helper.symbolize_keys(incoming)
15487
+ HttpClient::Preconditions.require_keys(opts, [:id, :timestamp, :type, :shipping_notification], 'ShippingNotificationVersion')
15488
+ @id = HttpClient::Preconditions.assert_class('id', opts.delete(:id), String)
15489
+ @timestamp = HttpClient::Preconditions.assert_class('timestamp', HttpClient::Helper.to_date_time_iso8601(opts.delete(:timestamp)), DateTime)
15490
+ @type = (x = opts.delete(:type); x.is_a?(::Io::Flow::V0::Models::ChangeType) ? x : ::Io::Flow::V0::Models::ChangeType.apply(x))
15491
+ @shipping_notification = (x = opts.delete(:shipping_notification); x.is_a?(::Io::Flow::V0::Models::ShippingNotification) ? x : ::Io::Flow::V0::Models::ShippingNotification.new(x))
15492
+ end
15493
+
15494
+ def to_json
15495
+ JSON.dump(to_hash)
15496
+ end
15497
+
15498
+ def copy(incoming={})
15499
+ ShippingNotificationVersion.new(to_hash.merge(HttpClient::Helper.symbolize_keys(incoming)))
15500
+ end
15501
+
15502
+ def to_hash
15503
+ {
15504
+ :id => id,
15505
+ :timestamp => timestamp,
15506
+ :type => type.value,
15507
+ :shipping_notification => shipping_notification.to_hash
15508
+ }
15509
+ end
15510
+
15511
+ end
15512
+
15513
+ # Exports product level data for import into solidus
15514
+ class SolidusProductExportType < ExportType
15515
+
15516
+ attr_reader :numbers, :sort
15517
+
15518
+ def initialize(incoming={})
15519
+ super(:name => ExportType::Types::SOLIDUS_PRODUCT_EXPORT_TYPE)
15520
+ opts = HttpClient::Helper.symbolize_keys(incoming)
15521
+ @numbers = (x = opts.delete(:numbers); x.nil? ? nil : HttpClient::Preconditions.assert_class('numbers', x, Array).map { |v| HttpClient::Preconditions.assert_class('numbers', v, String) })
15522
+ @sort = (x = opts.delete(:sort); x.nil? ? nil : HttpClient::Preconditions.assert_class('sort', x, String))
15523
+ end
15524
+
15525
+ def to_json
15526
+ JSON.dump(to_hash)
15527
+ end
15528
+
15529
+ def copy(incoming={})
15530
+ SolidusProductExportType.new(subtype_to_hash.merge(HttpClient::Helper.symbolize_keys(incoming)))
15531
+ end
15532
+
15533
+ def subtype_to_hash
15534
+ {
15535
+ :numbers => numbers.nil? ? nil : numbers,
15536
+ :sort => sort
15537
+ }
15538
+ end
15539
+
15540
+ end
15541
+
15542
+ # Exports variant level data for import into solidus
15114
15543
  class SolidusVariantExportType < ExportType
15115
15544
 
15116
15545
  attr_reader :numbers, :sort
@@ -15813,6 +16242,101 @@ module Io
15813
16242
 
15814
16243
  end
15815
16244
 
16245
+ class Targeting
16246
+
16247
+ attr_reader :id, :key, :queries, :subcatalog
16248
+
16249
+ def initialize(incoming={})
16250
+ opts = HttpClient::Helper.symbolize_keys(incoming)
16251
+ HttpClient::Preconditions.require_keys(opts, [:id, :key, :queries], 'Targeting')
16252
+ @id = HttpClient::Preconditions.assert_class('id', opts.delete(:id), String)
16253
+ @key = HttpClient::Preconditions.assert_class('key', opts.delete(:key), String)
16254
+ @queries = HttpClient::Preconditions.assert_class('queries', opts.delete(:queries), Array).map { |v| (x = v; x.is_a?(::Io::Flow::V0::Models::TargetingQuery) ? x : ::Io::Flow::V0::Models::TargetingQuery.new(x)) }
16255
+ @subcatalog = (x = opts.delete(:subcatalog); x.nil? ? nil : (x = x; x.is_a?(::Io::Flow::V0::Models::SubcatalogReference) ? x : ::Io::Flow::V0::Models::SubcatalogReference.new(x)))
16256
+ end
16257
+
16258
+ def to_json
16259
+ JSON.dump(to_hash)
16260
+ end
16261
+
16262
+ def copy(incoming={})
16263
+ Targeting.new(to_hash.merge(HttpClient::Helper.symbolize_keys(incoming)))
16264
+ end
16265
+
16266
+ def to_hash
16267
+ {
16268
+ :id => id,
16269
+ :key => key,
16270
+ :queries => queries.map { |o| o.to_hash },
16271
+ :subcatalog => subcatalog.nil? ? nil : subcatalog.to_hash
16272
+ }
16273
+ end
16274
+
16275
+ end
16276
+
16277
+ class TargetingForm
16278
+
16279
+ attr_reader :key, :queries, :subcatalog_id
16280
+
16281
+ def initialize(incoming={})
16282
+ opts = HttpClient::Helper.symbolize_keys(incoming)
16283
+ HttpClient::Preconditions.require_keys(opts, [:key, :queries], 'TargetingForm')
16284
+ @key = HttpClient::Preconditions.assert_class('key', opts.delete(:key), String)
16285
+ @queries = HttpClient::Preconditions.assert_class('queries', opts.delete(:queries), Array).map { |v| (x = v; x.is_a?(::Io::Flow::V0::Models::TargetingQueryForm) ? x : ::Io::Flow::V0::Models::TargetingQueryForm.new(x)) }
16286
+ @subcatalog_id = (x = opts.delete(:subcatalog_id); x.nil? ? nil : HttpClient::Preconditions.assert_class('subcatalog_id', x, String))
16287
+ end
16288
+
16289
+ def to_json
16290
+ JSON.dump(to_hash)
16291
+ end
16292
+
16293
+ def copy(incoming={})
16294
+ TargetingForm.new(to_hash.merge(HttpClient::Helper.symbolize_keys(incoming)))
16295
+ end
16296
+
16297
+ def to_hash
16298
+ {
16299
+ :key => key,
16300
+ :queries => queries.map { |o| o.to_hash },
16301
+ :subcatalog_id => subcatalog_id
16302
+ }
16303
+ end
16304
+
16305
+ end
16306
+
16307
+ # Represents catalog items where a targeteing query is applicable
16308
+ class TargetingItem
16309
+
16310
+ attr_reader :id, :targeting, :item_number, :query
16311
+
16312
+ def initialize(incoming={})
16313
+ opts = HttpClient::Helper.symbolize_keys(incoming)
16314
+ HttpClient::Preconditions.require_keys(opts, [:id, :targeting, :item_number, :query], 'TargetingItem')
16315
+ @id = HttpClient::Preconditions.assert_class('id', opts.delete(:id), String)
16316
+ @targeting = (x = opts.delete(:targeting); x.is_a?(::Io::Flow::V0::Models::TargetingReference) ? x : ::Io::Flow::V0::Models::TargetingReference.new(x))
16317
+ @item_number = HttpClient::Preconditions.assert_class('item_number', opts.delete(:item_number), String)
16318
+ @query = (x = opts.delete(:query); x.is_a?(::Io::Flow::V0::Models::TargetingQuery) ? x : ::Io::Flow::V0::Models::TargetingQuery.new(x))
16319
+ end
16320
+
16321
+ def to_json
16322
+ JSON.dump(to_hash)
16323
+ end
16324
+
16325
+ def copy(incoming={})
16326
+ TargetingItem.new(to_hash.merge(HttpClient::Helper.symbolize_keys(incoming)))
16327
+ end
16328
+
16329
+ def to_hash
16330
+ {
16331
+ :id => id,
16332
+ :targeting => targeting.to_hash,
16333
+ :item_number => item_number,
16334
+ :query => query.to_hash
16335
+ }
16336
+ end
16337
+
16338
+ end
16339
+
15816
16340
  class TargetingItemDeleted < Event
15817
16341
 
15818
16342
  attr_reader :event_id, :timestamp, :organization, :catalog, :number, :key
@@ -15887,6 +16411,126 @@ module Io
15887
16411
 
15888
16412
  end
15889
16413
 
16414
+ class TargetingQuery
16415
+
16416
+ attr_reader :id, :q, :outcome_id
16417
+
16418
+ def initialize(incoming={})
16419
+ opts = HttpClient::Helper.symbolize_keys(incoming)
16420
+ HttpClient::Preconditions.require_keys(opts, [:id, :q, :outcome_id], 'TargetingQuery')
16421
+ @id = HttpClient::Preconditions.assert_class('id', opts.delete(:id), String)
16422
+ @q = HttpClient::Preconditions.assert_class('q', opts.delete(:q), String)
16423
+ @outcome_id = HttpClient::Preconditions.assert_class('outcome_id', opts.delete(:outcome_id), String)
16424
+ end
16425
+
16426
+ def to_json
16427
+ JSON.dump(to_hash)
16428
+ end
16429
+
16430
+ def copy(incoming={})
16431
+ TargetingQuery.new(to_hash.merge(HttpClient::Helper.symbolize_keys(incoming)))
16432
+ end
16433
+
16434
+ def to_hash
16435
+ {
16436
+ :id => id,
16437
+ :q => q,
16438
+ :outcome_id => outcome_id
16439
+ }
16440
+ end
16441
+
16442
+ end
16443
+
16444
+ class TargetingQueryForm
16445
+
16446
+ attr_reader :q, :outcome_id
16447
+
16448
+ def initialize(incoming={})
16449
+ opts = HttpClient::Helper.symbolize_keys(incoming)
16450
+ HttpClient::Preconditions.require_keys(opts, [:q, :outcome_id], 'TargetingQueryForm')
16451
+ @q = HttpClient::Preconditions.assert_class('q', opts.delete(:q), String)
16452
+ @outcome_id = HttpClient::Preconditions.assert_class('outcome_id', opts.delete(:outcome_id), String)
16453
+ end
16454
+
16455
+ def to_json
16456
+ JSON.dump(to_hash)
16457
+ end
16458
+
16459
+ def copy(incoming={})
16460
+ TargetingQueryForm.new(to_hash.merge(HttpClient::Helper.symbolize_keys(incoming)))
16461
+ end
16462
+
16463
+ def to_hash
16464
+ {
16465
+ :q => q,
16466
+ :outcome_id => outcome_id
16467
+ }
16468
+ end
16469
+
16470
+ end
16471
+
16472
+ class TargetingReference
16473
+
16474
+ attr_reader :id, :key, :subcatalog
16475
+
16476
+ def initialize(incoming={})
16477
+ opts = HttpClient::Helper.symbolize_keys(incoming)
16478
+ HttpClient::Preconditions.require_keys(opts, [:id, :key], 'TargetingReference')
16479
+ @id = HttpClient::Preconditions.assert_class('id', opts.delete(:id), String)
16480
+ @key = HttpClient::Preconditions.assert_class('key', opts.delete(:key), String)
16481
+ @subcatalog = (x = opts.delete(:subcatalog); x.nil? ? nil : (x = x; x.is_a?(::Io::Flow::V0::Models::SubcatalogReference) ? x : ::Io::Flow::V0::Models::SubcatalogReference.new(x)))
16482
+ end
16483
+
16484
+ def to_json
16485
+ JSON.dump(to_hash)
16486
+ end
16487
+
16488
+ def copy(incoming={})
16489
+ TargetingReference.new(to_hash.merge(HttpClient::Helper.symbolize_keys(incoming)))
16490
+ end
16491
+
16492
+ def to_hash
16493
+ {
16494
+ :id => id,
16495
+ :key => key,
16496
+ :subcatalog => subcatalog.nil? ? nil : subcatalog.to_hash
16497
+ }
16498
+ end
16499
+
16500
+ end
16501
+
16502
+ class TargetingVersion
16503
+
16504
+ attr_reader :id, :timestamp, :type, :targeting
16505
+
16506
+ def initialize(incoming={})
16507
+ opts = HttpClient::Helper.symbolize_keys(incoming)
16508
+ HttpClient::Preconditions.require_keys(opts, [:id, :timestamp, :type, :targeting], 'TargetingVersion')
16509
+ @id = HttpClient::Preconditions.assert_class('id', opts.delete(:id), String)
16510
+ @timestamp = HttpClient::Preconditions.assert_class('timestamp', HttpClient::Helper.to_date_time_iso8601(opts.delete(:timestamp)), DateTime)
16511
+ @type = (x = opts.delete(:type); x.is_a?(::Io::Flow::V0::Models::ChangeType) ? x : ::Io::Flow::V0::Models::ChangeType.apply(x))
16512
+ @targeting = (x = opts.delete(:targeting); x.is_a?(::Io::Flow::V0::Models::Targeting) ? x : ::Io::Flow::V0::Models::Targeting.new(x))
16513
+ end
16514
+
16515
+ def to_json
16516
+ JSON.dump(to_hash)
16517
+ end
16518
+
16519
+ def copy(incoming={})
16520
+ TargetingVersion.new(to_hash.merge(HttpClient::Helper.symbolize_keys(incoming)))
16521
+ end
16522
+
16523
+ def to_hash
16524
+ {
16525
+ :id => id,
16526
+ :timestamp => timestamp,
16527
+ :type => type.value,
16528
+ :targeting => targeting.to_hash
16529
+ }
16530
+ end
16531
+
16532
+ end
16533
+
15890
16534
  # Represents a simple model of taxes that apply to a given item / destination.
15891
16535
  class Tax
15892
16536
 
@@ -17137,35 +17781,6 @@ module Io
17137
17781
 
17138
17782
  end
17139
17783
 
17140
- # A validation error of some type has occured. See messages for a detailed
17141
- # description of the specific error or errors
17142
- class ValidationError < OrderError
17143
-
17144
- attr_reader :messages
17145
-
17146
- def initialize(incoming={})
17147
- super(:name => OrderError::Types::VALIDATION_ERROR)
17148
- opts = HttpClient::Helper.symbolize_keys(incoming)
17149
- HttpClient::Preconditions.require_keys(opts, [:messages], 'ValidationError')
17150
- @messages = HttpClient::Preconditions.assert_class('messages', opts.delete(:messages), Array).map { |v| HttpClient::Preconditions.assert_class('messages', v, String) }
17151
- end
17152
-
17153
- def to_json
17154
- JSON.dump(to_hash)
17155
- end
17156
-
17157
- def copy(incoming={})
17158
- ValidationError.new(subtype_to_hash.merge(HttpClient::Helper.symbolize_keys(incoming)))
17159
- end
17160
-
17161
- def subtype_to_hash
17162
- {
17163
- :messages => messages
17164
- }
17165
- end
17166
-
17167
- end
17168
-
17169
17784
  class Webhook
17170
17785
 
17171
17786
  attr_reader :id, :url, :events
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: flowcommerce
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.69
4
+ version: 0.0.70
5
5
  platform: ruby
6
6
  authors:
7
7
  - Flow Commerce, Inc.