flowcommerce 0.2.50 → 0.2.51

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: a36ae883d392c973f8e24f23eee4232dd03a8d2f
4
- data.tar.gz: 384772592d47073bccdd2a39fa2aeb1e235396da
3
+ metadata.gz: adafa74317f9ca0fd18641b0de9888f2c5f4eef0
4
+ data.tar.gz: 06c9c49cbff0140f259255d1f844f3e3c0f6128c
5
5
  SHA512:
6
- metadata.gz: b6d9084069b12c128f9df931eb3cb4a08f250d14a07adc7cc97fb43d35ed6d20c63161d3184cd3a8519b189c4290ae4440ecdbeb7692f4734d1d36caba65d024
7
- data.tar.gz: 60ffd6259d1388619ab5ff25aa6a7af2a10332288cb77fe63fd63d942231000c77c09bb4d6ac85b142b95036d9a135f8bf021eb18b0b9877fc5ab39ae9fe498c
6
+ metadata.gz: 4fd4f33cd8624990d41fa7f8d99ac4f6c0bae3b173670c83067f74fa5a4e2bb7e6dc0bdcfac4078a75753d33cbad4f37ae941b3b7b3a9b20573a8b5dadd83a3e
7
+ data.tar.gz: 84b754ab593e2a276f354e3fa735632b1886dac9c6b4802da21fdc91e16c3d3799c1cceb6b6dd7e23a63e750618fb0c8d0316864943563043957a21fec8e0576
@@ -1,6 +1,6 @@
1
1
  # Generated by API Builder - https://www.apibuilder.io
2
- # Service version: 0.4.11
3
- # apibuilder:0.12.87 https://app.apibuilder.io/flow/api/0.4.35/ruby_client
2
+ # Service version: 0.4.50
3
+ # apibuilder:0.13.0 https://app.apibuilder.io/flow/api/0.4.50/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.87 https://app.apibuilder.io/flow/api/0.4.35/ruby_client' unless defined?(Constants::USER_AGENT)
29
- VERSION = '0.4.11' unless defined?(Constants::VERSION)
28
+ USER_AGENT = 'apibuilder:0.13.0 https://app.apibuilder.io/flow/api/0.4.50/ruby_client' unless defined?(Constants::USER_AGENT)
29
+ VERSION = '0.4.50' unless defined?(Constants::VERSION)
30
30
  VERSION_MAJOR = 0 unless defined?(VERSION_MAJOR)
31
31
 
32
32
  end
@@ -116,6 +116,14 @@ module Io
116
116
  @payment_method_rules ||= ::Io::Flow::V0::Clients::PaymentMethodRules.new(self)
117
117
  end
118
118
 
119
+ def price_books
120
+ @price_books ||= ::Io::Flow::V0::Clients::PriceBooks.new(self)
121
+ end
122
+
123
+ def price_book_items
124
+ @price_book_items ||= ::Io::Flow::V0::Clients::PriceBookItems.new(self)
125
+ end
126
+
119
127
  def queries
120
128
  @queries ||= ::Io::Flow::V0::Clients::Queries.new(self)
121
129
  end
@@ -681,6 +689,21 @@ module Io
681
689
  ::Io::Flow::V0::Models::Experience.new(r)
682
690
  end
683
691
 
692
+ def get_currency_and_formats_by_experience_key(organization, experience_key)
693
+ HttpClient::Preconditions.assert_class('organization', organization, String)
694
+ HttpClient::Preconditions.assert_class('experience_key', experience_key, String)
695
+ r = @client.request("/#{CGI.escape(organization)}/experiences/#{CGI.escape(experience_key)}/currency/formats").get
696
+ ::Io::Flow::V0::Models::ExperienceCurrencyFormat.new(r)
697
+ end
698
+
699
+ def put_currency_and_formats_by_experience_key(organization, experience_key, experience_currency_format_form)
700
+ HttpClient::Preconditions.assert_class('organization', organization, String)
701
+ HttpClient::Preconditions.assert_class('experience_key', experience_key, String)
702
+ (x = experience_currency_format_form; x.is_a?(::Io::Flow::V0::Models::ExperienceCurrencyFormatForm) ? x : ::Io::Flow::V0::Models::ExperienceCurrencyFormatForm.new(x))
703
+ r = @client.request("/#{CGI.escape(organization)}/experiences/#{CGI.escape(experience_key)}/currency/formats").with_json(experience_currency_format_form.to_json).put
704
+ ::Io::Flow::V0::Models::ExperienceCurrencyFormat.new(r)
705
+ end
706
+
684
707
  def get_margins_by_experience_key(organization, experience_key, incoming={})
685
708
  HttpClient::Preconditions.assert_class('organization', organization, String)
686
709
  HttpClient::Preconditions.assert_class('experience_key', experience_key, String)
@@ -1218,33 +1241,39 @@ module Io
1218
1241
  :country => (x = opts.delete(:country); x.nil? ? nil : HttpClient::Preconditions.assert_class('country', x, String)),
1219
1242
  :ip => (x = opts.delete(:ip); x.nil? ? nil : HttpClient::Preconditions.assert_class('ip', x, String)),
1220
1243
  :currency => (x = opts.delete(:currency); x.nil? ? nil : HttpClient::Preconditions.assert_class('currency', x, String)),
1221
- :language => (x = opts.delete(:language); x.nil? ? nil : HttpClient::Preconditions.assert_class('language', x, String))
1244
+ :language => (x = opts.delete(:language); x.nil? ? nil : HttpClient::Preconditions.assert_class('language', x, String)),
1245
+ :expand => (x = opts.delete(:expand); x.nil? ? nil : HttpClient::Preconditions.assert_class('expand', x, Array).map { |v| HttpClient::Preconditions.assert_class('expand', v, String) })
1222
1246
  }.delete_if { |k, v| v.nil? }
1223
1247
  (x = order_estimate_form; x.is_a?(::Io::Flow::V0::Models::OrderEstimateForm) ? x : ::Io::Flow::V0::Models::OrderEstimateForm.new(x))
1224
1248
  r = @client.request("/#{CGI.escape(organization)}/order-estimates").with_query(query).with_json(order_estimate_form.to_json).post
1225
1249
  ::Io::Flow::V0::Models::OrderEstimate.new(r)
1226
1250
  end
1227
1251
 
1228
- def get_by_id(organization, id)
1252
+ def get_by_number(organization, number, incoming={})
1229
1253
  HttpClient::Preconditions.assert_class('organization', organization, String)
1230
- HttpClient::Preconditions.assert_class('id', id, String)
1231
- r = @client.request("/#{CGI.escape(organization)}/order-estimates/#{CGI.escape(id)}").get
1254
+ HttpClient::Preconditions.assert_class('number', number, String)
1255
+ opts = HttpClient::Helper.symbolize_keys(incoming)
1256
+ query = {
1257
+ :expand => (x = opts.delete(:expand); x.nil? ? nil : HttpClient::Preconditions.assert_class('expand', x, Array).map { |v| HttpClient::Preconditions.assert_class('expand', v, String) })
1258
+ }.delete_if { |k, v| v.nil? }
1259
+ r = @client.request("/#{CGI.escape(organization)}/order-estimates/#{CGI.escape(number)}").with_query(query).get
1232
1260
  ::Io::Flow::V0::Models::Experience.new(r)
1233
1261
  end
1234
1262
 
1235
- def put_by_id(organization, id, order_estimate_form, incoming={})
1263
+ def put_by_number(organization, number, order_estimate_form, incoming={})
1236
1264
  HttpClient::Preconditions.assert_class('organization', organization, String)
1237
- HttpClient::Preconditions.assert_class('id', id, String)
1265
+ HttpClient::Preconditions.assert_class('number', number, String)
1238
1266
  opts = HttpClient::Helper.symbolize_keys(incoming)
1239
1267
  query = {
1240
1268
  :experience => (x = opts.delete(:experience); x.nil? ? nil : HttpClient::Preconditions.assert_class('experience', x, String)),
1241
1269
  :country => (x = opts.delete(:country); x.nil? ? nil : HttpClient::Preconditions.assert_class('country', x, String)),
1242
1270
  :ip => (x = opts.delete(:ip); x.nil? ? nil : HttpClient::Preconditions.assert_class('ip', x, String)),
1243
1271
  :currency => (x = opts.delete(:currency); x.nil? ? nil : HttpClient::Preconditions.assert_class('currency', x, String)),
1244
- :language => (x = opts.delete(:language); x.nil? ? nil : HttpClient::Preconditions.assert_class('language', x, String))
1272
+ :language => (x = opts.delete(:language); x.nil? ? nil : HttpClient::Preconditions.assert_class('language', x, String)),
1273
+ :expand => (x = opts.delete(:expand); x.nil? ? nil : HttpClient::Preconditions.assert_class('expand', x, Array).map { |v| HttpClient::Preconditions.assert_class('expand', v, String) })
1245
1274
  }.delete_if { |k, v| v.nil? }
1246
1275
  (x = order_estimate_form; x.is_a?(::Io::Flow::V0::Models::OrderEstimateForm) ? x : ::Io::Flow::V0::Models::OrderEstimateForm.new(x))
1247
- r = @client.request("/#{CGI.escape(organization)}/order-estimates/#{CGI.escape(id)}").with_query(query).with_json(order_estimate_form.to_json).put
1276
+ r = @client.request("/#{CGI.escape(organization)}/order-estimates/#{CGI.escape(number)}").with_query(query).with_json(order_estimate_form.to_json).put
1248
1277
  ::Io::Flow::V0::Models::OrderEstimate.new(r)
1249
1278
  end
1250
1279
 
@@ -1501,6 +1530,121 @@ module Io
1501
1530
 
1502
1531
  end
1503
1532
 
1533
+ class PriceBooks
1534
+
1535
+ def initialize(client)
1536
+ @client = HttpClient::Preconditions.assert_class('client', client, ::Io::Flow::V0::Client)
1537
+ end
1538
+
1539
+ def get(organization, incoming={})
1540
+ HttpClient::Preconditions.assert_class('organization', organization, String)
1541
+ opts = HttpClient::Helper.symbolize_keys(incoming)
1542
+ query = {
1543
+ :id => (x = opts.delete(:id); x.nil? ? nil : HttpClient::Preconditions.assert_class('id', x, Array).map { |v| HttpClient::Preconditions.assert_class('id', v, String) }),
1544
+ :key => (x = opts.delete(:key); x.nil? ? nil : HttpClient::Preconditions.assert_class('key', x, Array).map { |v| HttpClient::Preconditions.assert_class('key', v, String) }),
1545
+ :limit => HttpClient::Preconditions.assert_class('limit', (x = opts.delete(:limit); x.nil? ? 25 : x), Integer),
1546
+ :offset => HttpClient::Preconditions.assert_class('offset', (x = opts.delete(:offset); x.nil? ? 0 : x), Integer),
1547
+ :sort => HttpClient::Preconditions.assert_class('sort', (x = opts.delete(:sort); x.nil? ? "-created_at" : x), String)
1548
+ }.delete_if { |k, v| v.nil? }
1549
+ r = @client.request("/#{CGI.escape(organization)}/price/books").with_query(query).get
1550
+ r.map { |x| ::Io::Flow::V0::Models::PriceBook.new(x) }
1551
+ end
1552
+
1553
+ # Create a price book.
1554
+ def post(organization, price_book_form)
1555
+ HttpClient::Preconditions.assert_class('organization', organization, String)
1556
+ (x = price_book_form; x.is_a?(::Io::Flow::V0::Models::PriceBookForm) ? x : ::Io::Flow::V0::Models::PriceBookForm.new(x))
1557
+ r = @client.request("/#{CGI.escape(organization)}/price/books").with_json(price_book_form.to_json).post
1558
+ ::Io::Flow::V0::Models::PriceBook.new(r)
1559
+ end
1560
+
1561
+ # Returns information about a specific price book.
1562
+ def get_by_key(organization, key)
1563
+ HttpClient::Preconditions.assert_class('organization', organization, String)
1564
+ HttpClient::Preconditions.assert_class('key', key, String)
1565
+ r = @client.request("/#{CGI.escape(organization)}/price/books/#{CGI.escape(key)}").get
1566
+ ::Io::Flow::V0::Models::PriceBook.new(r)
1567
+ end
1568
+
1569
+ # Create or update a price book.
1570
+ def put_by_key(organization, key, price_book_form)
1571
+ HttpClient::Preconditions.assert_class('organization', organization, String)
1572
+ HttpClient::Preconditions.assert_class('key', key, String)
1573
+ (x = price_book_form; x.is_a?(::Io::Flow::V0::Models::PriceBookForm) ? x : ::Io::Flow::V0::Models::PriceBookForm.new(x))
1574
+ r = @client.request("/#{CGI.escape(organization)}/price/books/#{CGI.escape(key)}").with_json(price_book_form.to_json).put
1575
+ ::Io::Flow::V0::Models::PriceBook.new(r)
1576
+ end
1577
+
1578
+ # Deletes the specified price book
1579
+ def delete_by_key(organization, key)
1580
+ HttpClient::Preconditions.assert_class('organization', organization, String)
1581
+ HttpClient::Preconditions.assert_class('key', key, String)
1582
+ r = @client.request("/#{CGI.escape(organization)}/price/books/#{CGI.escape(key)}").delete
1583
+ nil
1584
+ end
1585
+
1586
+ end
1587
+
1588
+ class PriceBookItems
1589
+
1590
+ def initialize(client)
1591
+ @client = HttpClient::Preconditions.assert_class('client', client, ::Io::Flow::V0::Client)
1592
+ end
1593
+
1594
+ def get(organization, key, incoming={})
1595
+ HttpClient::Preconditions.assert_class('organization', organization, String)
1596
+ HttpClient::Preconditions.assert_class('key', key, String)
1597
+ opts = HttpClient::Helper.symbolize_keys(incoming)
1598
+ query = {
1599
+ :id => (x = opts.delete(:id); x.nil? ? nil : HttpClient::Preconditions.assert_class('id', x, Array).map { |v| HttpClient::Preconditions.assert_class('id', v, String) }),
1600
+ :number => (x = opts.delete(:number); x.nil? ? nil : HttpClient::Preconditions.assert_class('number', x, Array).map { |v| HttpClient::Preconditions.assert_class('number', v, String) }),
1601
+ :limit => HttpClient::Preconditions.assert_class('limit', (x = opts.delete(:limit); x.nil? ? 25 : x), Integer),
1602
+ :offset => HttpClient::Preconditions.assert_class('offset', (x = opts.delete(:offset); x.nil? ? 0 : x), Integer),
1603
+ :sort => HttpClient::Preconditions.assert_class('sort', (x = opts.delete(:sort); x.nil? ? "-created_at" : x), String)
1604
+ }.delete_if { |k, v| v.nil? }
1605
+ r = @client.request("/#{CGI.escape(organization)}/price/books/#{CGI.escape(key)}/items").with_query(query).get
1606
+ r.map { |x| ::Io::Flow::V0::Models::PriceBookItem.new(x) }
1607
+ end
1608
+
1609
+ # Create a price book item.
1610
+ def post(organization, key, price_book_item_form)
1611
+ HttpClient::Preconditions.assert_class('organization', organization, String)
1612
+ HttpClient::Preconditions.assert_class('key', key, String)
1613
+ (x = price_book_item_form; x.is_a?(::Io::Flow::V0::Models::PriceBookItemForm) ? x : ::Io::Flow::V0::Models::PriceBookItemForm.new(x))
1614
+ r = @client.request("/#{CGI.escape(organization)}/price/books/#{CGI.escape(key)}/items").with_json(price_book_item_form.to_json).post
1615
+ ::Io::Flow::V0::Models::PriceBookItem.new(r)
1616
+ end
1617
+
1618
+ # Returns information about a specific price book item.
1619
+ def get_by_id(organization, key, id)
1620
+ HttpClient::Preconditions.assert_class('organization', organization, String)
1621
+ HttpClient::Preconditions.assert_class('key', key, String)
1622
+ HttpClient::Preconditions.assert_class('id', id, String)
1623
+ r = @client.request("/#{CGI.escape(organization)}/price/books/#{CGI.escape(key)}/items/#{CGI.escape(id)}").get
1624
+ ::Io::Flow::V0::Models::PriceBookItem.new(r)
1625
+ end
1626
+
1627
+ # Create or update a price book item.
1628
+ def put_by_id(organization, key, id, price_book_item_form)
1629
+ HttpClient::Preconditions.assert_class('organization', organization, String)
1630
+ HttpClient::Preconditions.assert_class('key', key, String)
1631
+ HttpClient::Preconditions.assert_class('id', id, String)
1632
+ (x = price_book_item_form; x.is_a?(::Io::Flow::V0::Models::PriceBookItemForm) ? x : ::Io::Flow::V0::Models::PriceBookItemForm.new(x))
1633
+ r = @client.request("/#{CGI.escape(organization)}/price/books/#{CGI.escape(key)}/items/#{CGI.escape(id)}").with_json(price_book_item_form.to_json).put
1634
+ ::Io::Flow::V0::Models::PriceBookItem.new(r)
1635
+ end
1636
+
1637
+ # Deletes the specified price book item
1638
+ def delete_by_id(organization, key, id)
1639
+ HttpClient::Preconditions.assert_class('organization', organization, String)
1640
+ HttpClient::Preconditions.assert_class('key', key, String)
1641
+ HttpClient::Preconditions.assert_class('id', id, String)
1642
+ r = @client.request("/#{CGI.escape(organization)}/price/books/#{CGI.escape(key)}/items/#{CGI.escape(id)}").delete
1643
+ nil
1644
+ end
1645
+
1646
+ end
1647
+
1504
1648
  class Queries
1505
1649
 
1506
1650
  def initialize(client)
@@ -2487,6 +2631,21 @@ module Io
2487
2631
  ::Io::Flow::V0::Models::Authorization.from_json(r)
2488
2632
  end
2489
2633
 
2634
+ # Copies an existing card authorization and authorizes funds using the saved
2635
+ # credit card information from the source authorization. Multiple requests
2636
+ # using the same key are idempotent.
2637
+ def put_by_key(organization, key, authorization_form, incoming={})
2638
+ HttpClient::Preconditions.assert_class('organization', organization, String)
2639
+ HttpClient::Preconditions.assert_class('key', key, String)
2640
+ opts = HttpClient::Helper.symbolize_keys(incoming)
2641
+ query = {
2642
+ :expand => (x = opts.delete(:expand); x.nil? ? nil : HttpClient::Preconditions.assert_class('expand', x, Array).map { |v| HttpClient::Preconditions.assert_class('expand', v, String) })
2643
+ }.delete_if { |k, v| v.nil? }
2644
+ (x = authorization_form; x.is_a?(::Io::Flow::V0::Models::AuthorizationForm) ? x : ::Io::Flow::V0::Models::AuthorizationForm.from_json(x))
2645
+ r = @client.request("/#{CGI.escape(organization)}/authorizations/#{CGI.escape(key)}").with_query(query).with_json(authorization_form.to_json).put
2646
+ ::Io::Flow::V0::Models::Authorization.from_json(r)
2647
+ end
2648
+
2490
2649
  # Deprecated. This end point no longer deletes an authorization and is
2491
2650
  # implemented by creating a reversal for the remaining balance on the auth.
2492
2651
  def delete_by_key(organization, key)
@@ -5514,6 +5673,8 @@ module Io
5514
5673
  AVAILABLE_PROMOTIONS_DELETED = 'available_promotions_deleted' unless defined?(AVAILABLE_PROMOTIONS_DELETED)
5515
5674
  ALLOCATION_DELETED = 'allocation_deleted' unless defined?(ALLOCATION_DELETED)
5516
5675
  ALLOCATION_UPSERTED = 'allocation_upserted' unless defined?(ALLOCATION_UPSERTED)
5676
+ CURRENCY_FORMAT_DELETED = 'currency_format_deleted' unless defined?(CURRENCY_FORMAT_DELETED)
5677
+ CURRENCY_FORMAT_UPSERTED = 'currency_format_upserted' unless defined?(CURRENCY_FORMAT_UPSERTED)
5517
5678
  EXPERIENCE_DELETED = 'experience_deleted' unless defined?(EXPERIENCE_DELETED)
5518
5679
  EXPERIENCE_UPSERTED = 'experience_upserted' unless defined?(EXPERIENCE_UPSERTED)
5519
5680
  ITEM_MARGIN_DELETED = 'item_margin_deleted' unless defined?(ITEM_MARGIN_DELETED)
@@ -5530,6 +5691,7 @@ module Io
5530
5691
  ORDER_IDENTIFIER_UPSERTED_V2 = 'order_identifier_upserted_v2' unless defined?(ORDER_IDENTIFIER_UPSERTED_V2)
5531
5692
  PRICING_DELETED = 'pricing_deleted' unless defined?(PRICING_DELETED)
5532
5693
  PRICING_UPSERTED = 'pricing_upserted' unless defined?(PRICING_UPSERTED)
5694
+ FRAUD_STATUS_CHANGED = 'fraud_status_changed' unless defined?(FRAUD_STATUS_CHANGED)
5533
5695
  TIER_UPSERTED = 'tier_upserted' unless defined?(TIER_UPSERTED)
5534
5696
  TIER_DELETED = 'tier_deleted' unless defined?(TIER_DELETED)
5535
5697
  DELIVERY_OPTION_UPSERTED = 'delivery_option_upserted' unless defined?(DELIVERY_OPTION_UPSERTED)
@@ -5580,6 +5742,10 @@ module Io
5580
5742
  REFUND_UPSERTED = 'refund_upserted' unless defined?(REFUND_UPSERTED)
5581
5743
  REFUND_UPSERTED_V2 = 'refund_upserted_v2' unless defined?(REFUND_UPSERTED_V2)
5582
5744
  REVERSAL_UPSERTED = 'reversal_upserted' unless defined?(REVERSAL_UPSERTED)
5745
+ PRICE_BOOK_UPSERTED = 'price_book_upserted' unless defined?(PRICE_BOOK_UPSERTED)
5746
+ PRICE_BOOK_DELETED = 'price_book_deleted' unless defined?(PRICE_BOOK_DELETED)
5747
+ PRICE_BOOK_ITEM_UPSERTED = 'price_book_item_upserted' unless defined?(PRICE_BOOK_ITEM_UPSERTED)
5748
+ PRICE_BOOK_ITEM_DELETED = 'price_book_item_deleted' unless defined?(PRICE_BOOK_ITEM_DELETED)
5583
5749
  ORGANIZATION_RATES_PUBLISHED = 'organization_rates_published' unless defined?(ORGANIZATION_RATES_PUBLISHED)
5584
5750
  ORGANIZATION_COUNTRIES_PUBLISHED = 'organization_countries_published' unless defined?(ORGANIZATION_COUNTRIES_PUBLISHED)
5585
5751
  ORGANIZATION_RATECARD_TRANSIT_WINDOWS_PUBLISHED = 'organization_ratecard_transit_windows_published' unless defined?(ORGANIZATION_RATECARD_TRANSIT_WINDOWS_PUBLISHED)
@@ -5599,7 +5765,7 @@ module Io
5599
5765
  end
5600
5766
 
5601
5767
  def subtype_to_hash
5602
- raise 'Cannot serialize an instance of event directly - must use one of the specific types: attribute_upserted, attribute_deleted, catalog_upserted, catalog_deleted, subcatalog_upserted, subcatalog_deleted, catalog_item_upserted, catalog_item_deleted, subcatalog_item_upserted, subcatalog_item_deleted, rate_deleted, rate_upserted, available_promotions_upserted, available_promotions_deleted, allocation_deleted, allocation_upserted, experience_deleted, experience_upserted, item_margin_deleted, item_margin_upserted, item_sales_margin_deleted, item_sales_margin_upserted, label_format_deleted, label_format_upserted, order_deleted, order_upserted, order_identifier_deleted, order_identifier_upserted, order_identifier_deleted_v2, order_identifier_upserted_v2, pricing_deleted, pricing_upserted, tier_upserted, tier_deleted, delivery_option_upserted, delivery_option_deleted, hs6_code_upserted, hs6_code_deleted, hs10_code_upserted, hs10_code_deleted, item_origin_upserted, item_origin_deleted, harmonized_item_upserted, harmonized_item_deleted, harmonized_landed_cost_upserted, fully_harmonized_item_upserted, rule_upserted, rule_deleted, snapshot_upserted, snapshot_deleted, label_upserted, notification_upserted, notification_deleted, manifested_label_upserted, manifested_label_deleted, local_item_upserted, local_item_deleted, membership_upserted, membership_deleted, organization_upserted, organization_deleted, authorization_upserted, authorization_deleted, authorization_deleted_v2, authorization_status_changed, card_authorization_upserted, card_authorization_upserted_v2, online_authorization_upserted, online_authorization_upserted_v2, capture_upserted, capture_upserted_v2, card_upserted, card_upserted_v2, card_deleted, payment_upserted, payment_deleted, refund_upserted, refund_upserted_v2, reversal_upserted, organization_rates_published, organization_countries_published, organization_ratecard_transit_windows_published, return_upserted, return_deleted, targeting_item_upserted, targeting_item_deleted, tracking_label_event_upserted'
5768
+ 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, currency_format_deleted, currency_format_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, fraud_status_changed, tier_upserted, tier_deleted, delivery_option_upserted, delivery_option_deleted, hs6_code_upserted, hs6_code_deleted, hs10_code_upserted, hs10_code_deleted, item_origin_upserted, item_origin_deleted, harmonized_item_upserted, harmonized_item_deleted, harmonized_landed_cost_upserted, fully_harmonized_item_upserted, rule_upserted, rule_deleted, snapshot_upserted, snapshot_deleted, label_upserted, notification_upserted, notification_deleted, manifested_label_upserted, manifested_label_deleted, local_item_upserted, local_item_deleted, membership_upserted, membership_deleted, organization_upserted, organization_deleted, authorization_upserted, authorization_deleted, authorization_deleted_v2, authorization_status_changed, card_authorization_upserted, card_authorization_upserted_v2, online_authorization_upserted, online_authorization_upserted_v2, capture_upserted, capture_upserted_v2, card_upserted, card_upserted_v2, card_deleted, payment_upserted, payment_deleted, refund_upserted, refund_upserted_v2, reversal_upserted, price_book_upserted, price_book_deleted, price_book_item_upserted, price_book_item_deleted, 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'
5603
5769
  end
5604
5770
 
5605
5771
  def to_hash
@@ -5629,6 +5795,8 @@ module Io
5629
5795
  when Types::AVAILABLE_PROMOTIONS_DELETED; AvailablePromotionsDeleted.new(hash)
5630
5796
  when Types::ALLOCATION_DELETED; AllocationDeleted.new(hash)
5631
5797
  when Types::ALLOCATION_UPSERTED; AllocationUpserted.new(hash)
5798
+ when Types::CURRENCY_FORMAT_DELETED; CurrencyFormatDeleted.new(hash)
5799
+ when Types::CURRENCY_FORMAT_UPSERTED; CurrencyFormatUpserted.new(hash)
5632
5800
  when Types::EXPERIENCE_DELETED; ExperienceDeleted.new(hash)
5633
5801
  when Types::EXPERIENCE_UPSERTED; ExperienceUpserted.new(hash)
5634
5802
  when Types::ITEM_MARGIN_DELETED; ItemMarginDeleted.new(hash)
@@ -5645,6 +5813,7 @@ module Io
5645
5813
  when Types::ORDER_IDENTIFIER_UPSERTED_V2; OrderIdentifierUpsertedV2.new(hash)
5646
5814
  when Types::PRICING_DELETED; PricingDeleted.new(hash)
5647
5815
  when Types::PRICING_UPSERTED; PricingUpserted.new(hash)
5816
+ when Types::FRAUD_STATUS_CHANGED; FraudStatusChanged.new(hash)
5648
5817
  when Types::TIER_UPSERTED; TierUpserted.new(hash)
5649
5818
  when Types::TIER_DELETED; TierDeleted.new(hash)
5650
5819
  when Types::DELIVERY_OPTION_UPSERTED; DeliveryOptionUpserted.new(hash)
@@ -5692,6 +5861,10 @@ module Io
5692
5861
  when Types::REFUND_UPSERTED; RefundUpserted.new(hash)
5693
5862
  when Types::REFUND_UPSERTED_V2; RefundUpsertedV2.new(hash)
5694
5863
  when Types::REVERSAL_UPSERTED; ReversalUpserted.new(hash)
5864
+ when Types::PRICE_BOOK_UPSERTED; PriceBookUpserted.new(hash)
5865
+ when Types::PRICE_BOOK_DELETED; PriceBookDeleted.new(hash)
5866
+ when Types::PRICE_BOOK_ITEM_UPSERTED; PriceBookItemUpserted.new(hash)
5867
+ when Types::PRICE_BOOK_ITEM_DELETED; PriceBookItemDeleted.new(hash)
5695
5868
  when Types::ORGANIZATION_RATES_PUBLISHED; OrganizationRatesPublished.new(hash)
5696
5869
  when Types::ORGANIZATION_COUNTRIES_PUBLISHED; OrganizationCountriesPublished.new(hash)
5697
5870
  when Types::ORGANIZATION_RATECARD_TRANSIT_WINDOWS_PUBLISHED; OrganizationRatecardTransitWindowsPublished.new(hash)
@@ -8317,6 +8490,92 @@ module Io
8317
8490
 
8318
8491
  end
8319
8492
 
8493
+ class CurrencyLabelFormatter
8494
+
8495
+ attr_reader :value
8496
+
8497
+ def initialize(value)
8498
+ @value = HttpClient::Preconditions.assert_class('value', value, String)
8499
+ end
8500
+
8501
+ # Returns the instance of CurrencyLabelFormatter for this value, creating a new instance for an unknown value
8502
+ def CurrencyLabelFormatter.apply(value)
8503
+ if value.instance_of?(CurrencyLabelFormatter)
8504
+ value
8505
+ else
8506
+ HttpClient::Preconditions.assert_class_or_nil('value', value, String)
8507
+ value.nil? ? nil : (from_string(value) || CurrencyLabelFormatter.new(value))
8508
+ end
8509
+ end
8510
+
8511
+ # Returns the instance of CurrencyLabelFormatter for this value, or nil if not found
8512
+ def CurrencyLabelFormatter.from_string(value)
8513
+ HttpClient::Preconditions.assert_class('value', value, String)
8514
+ CurrencyLabelFormatter.ALL.find { |v| v.value == value }
8515
+ end
8516
+
8517
+ def CurrencyLabelFormatter.ALL
8518
+ @@all ||= [CurrencyLabelFormatter.strip_trailing_zeros]
8519
+ end
8520
+
8521
+ # If a price ends in '.00' or ',00', we remove the cents and just display the
8522
+ # price as a whole number. e.g. 'A$100.00' becomes 'A$100'
8523
+ def CurrencyLabelFormatter.strip_trailing_zeros
8524
+ @@_strip_trailing_zeros ||= CurrencyLabelFormatter.new('strip_trailing_zeros')
8525
+ end
8526
+
8527
+ def to_hash
8528
+ value
8529
+ end
8530
+
8531
+ end
8532
+
8533
+ class CurrencySymbolFormat
8534
+
8535
+ attr_reader :value
8536
+
8537
+ def initialize(value)
8538
+ @value = HttpClient::Preconditions.assert_class('value', value, String)
8539
+ end
8540
+
8541
+ # Returns the instance of CurrencySymbolFormat for this value, creating a new instance for an unknown value
8542
+ def CurrencySymbolFormat.apply(value)
8543
+ if value.instance_of?(CurrencySymbolFormat)
8544
+ value
8545
+ else
8546
+ HttpClient::Preconditions.assert_class_or_nil('value', value, String)
8547
+ value.nil? ? nil : (from_string(value) || CurrencySymbolFormat.new(value))
8548
+ end
8549
+ end
8550
+
8551
+ # Returns the instance of CurrencySymbolFormat for this value, or nil if not found
8552
+ def CurrencySymbolFormat.from_string(value)
8553
+ HttpClient::Preconditions.assert_class('value', value, String)
8554
+ CurrencySymbolFormat.ALL.find { |v| v.value == value }
8555
+ end
8556
+
8557
+ def CurrencySymbolFormat.ALL
8558
+ @@all ||= [CurrencySymbolFormat.narrow, CurrencySymbolFormat.primary]
8559
+ end
8560
+
8561
+ # The narrow format refers to the Unicode Common Locale Data Repository (CLDR)
8562
+ # 'narrow' symbols (e.g. '$' for CAD and AUD)
8563
+ def CurrencySymbolFormat.narrow
8564
+ @@_narrow ||= CurrencySymbolFormat.new('narrow')
8565
+ end
8566
+
8567
+ # The primary format refers to the Unicode Common Locale Data Repository (CLDR)
8568
+ # 'primary' symbols (e.g. 'CA$' for CAD and 'A$' for AUD)
8569
+ def CurrencySymbolFormat.primary
8570
+ @@_primary ||= CurrencySymbolFormat.new('primary')
8571
+ end
8572
+
8573
+ def to_hash
8574
+ value
8575
+ end
8576
+
8577
+ end
8578
+
8320
8579
  class CvvCode
8321
8580
 
8322
8581
  attr_reader :value
@@ -8644,7 +8903,7 @@ module Io
8644
8903
  end
8645
8904
 
8646
8905
  def EventType.ALL
8647
- @@all ||= [EventType.attribute_upserted, EventType.attribute_deleted, EventType.catalog_upserted, EventType.catalog_deleted, EventType.subcatalog_upserted, EventType.subcatalog_deleted, EventType.catalog_item_upserted, EventType.catalog_item_deleted, EventType.subcatalog_item_upserted, EventType.subcatalog_item_deleted, EventType.rate_deleted, EventType.rate_upserted, EventType.available_promotions_upserted, EventType.available_promotions_deleted, EventType.allocation_deleted, EventType.allocation_upserted, EventType.experience_deleted, EventType.experience_upserted, EventType.item_margin_deleted, EventType.item_margin_upserted, EventType.item_sales_margin_deleted, EventType.item_sales_margin_upserted, EventType.label_format_deleted, EventType.label_format_upserted, EventType.order_deleted, EventType.order_upserted, EventType.order_identifier_deleted, EventType.order_identifier_upserted, EventType.order_identifier_deleted_v2, EventType.order_identifier_upserted_v2, EventType.pricing_deleted, EventType.pricing_upserted, EventType.tier_upserted, EventType.tier_deleted, EventType.delivery_option_upserted, EventType.delivery_option_deleted, EventType.hs6_code_upserted, EventType.hs6_code_deleted, EventType.hs10_code_upserted, EventType.hs10_code_deleted, EventType.item_origin_upserted, EventType.item_origin_deleted, EventType.harmonized_item_upserted, EventType.harmonized_item_deleted, EventType.harmonized_landed_cost_upserted, EventType.fully_harmonized_item_upserted, EventType.rule_upserted, EventType.rule_deleted, EventType.snapshot_upserted, EventType.snapshot_deleted, EventType.label_upserted, EventType.notification_upserted, EventType.notification_deleted, EventType.manifested_label_upserted, EventType.manifested_label_deleted, EventType.local_item_upserted, EventType.local_item_deleted, EventType.membership_upserted, EventType.membership_deleted, EventType.organization_upserted, EventType.organization_deleted, EventType.authorization_upserted, EventType.authorization_deleted, EventType.authorization_deleted_v2, EventType.authorization_status_changed, EventType.card_authorization_upserted, EventType.card_authorization_upserted_v2, EventType.online_authorization_upserted, EventType.online_authorization_upserted_v2, EventType.capture_upserted, EventType.capture_upserted_v2, EventType.card_upserted, EventType.card_upserted_v2, EventType.card_deleted, EventType.payment_upserted, EventType.payment_deleted, EventType.refund_upserted, EventType.refund_upserted_v2, EventType.reversal_upserted, EventType.organization_rates_published, EventType.organization_countries_published, EventType.organization_ratecard_transit_windows_published, EventType.return_upserted, EventType.return_deleted, EventType.targeting_item_upserted, EventType.targeting_item_deleted, EventType.tracking_label_event_upserted]
8906
+ @@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.currency_format_deleted, EventType.currency_format_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.fraud_status_changed, EventType.tier_upserted, EventType.tier_deleted, EventType.delivery_option_upserted, EventType.delivery_option_deleted, EventType.hs6_code_upserted, EventType.hs6_code_deleted, EventType.hs10_code_upserted, EventType.hs10_code_deleted, EventType.item_origin_upserted, EventType.item_origin_deleted, EventType.harmonized_item_upserted, EventType.harmonized_item_deleted, EventType.harmonized_landed_cost_upserted, EventType.fully_harmonized_item_upserted, EventType.rule_upserted, EventType.rule_deleted, EventType.snapshot_upserted, EventType.snapshot_deleted, EventType.label_upserted, EventType.notification_upserted, EventType.notification_deleted, EventType.manifested_label_upserted, EventType.manifested_label_deleted, EventType.local_item_upserted, EventType.local_item_deleted, EventType.membership_upserted, EventType.membership_deleted, EventType.organization_upserted, EventType.organization_deleted, EventType.authorization_upserted, EventType.authorization_deleted, EventType.authorization_deleted_v2, EventType.authorization_status_changed, EventType.card_authorization_upserted, EventType.card_authorization_upserted_v2, EventType.online_authorization_upserted, EventType.online_authorization_upserted_v2, EventType.capture_upserted, EventType.capture_upserted_v2, EventType.card_upserted, EventType.card_upserted_v2, EventType.card_deleted, EventType.payment_upserted, EventType.payment_deleted, EventType.refund_upserted, EventType.refund_upserted_v2, EventType.reversal_upserted, EventType.price_book_upserted, EventType.price_book_deleted, EventType.price_book_item_upserted, EventType.price_book_item_deleted, 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]
8648
8907
  end
8649
8908
 
8650
8909
  def EventType.attribute_upserted
@@ -8711,6 +8970,14 @@ module Io
8711
8970
  @@_allocation_upserted ||= EventType.new('allocation_upserted')
8712
8971
  end
8713
8972
 
8973
+ def EventType.currency_format_deleted
8974
+ @@_currency_format_deleted ||= EventType.new('currency_format_deleted')
8975
+ end
8976
+
8977
+ def EventType.currency_format_upserted
8978
+ @@_currency_format_upserted ||= EventType.new('currency_format_upserted')
8979
+ end
8980
+
8714
8981
  def EventType.experience_deleted
8715
8982
  @@_experience_deleted ||= EventType.new('experience_deleted')
8716
8983
  end
@@ -8775,6 +9042,10 @@ module Io
8775
9042
  @@_pricing_upserted ||= EventType.new('pricing_upserted')
8776
9043
  end
8777
9044
 
9045
+ def EventType.fraud_status_changed
9046
+ @@_fraud_status_changed ||= EventType.new('fraud_status_changed')
9047
+ end
9048
+
8778
9049
  def EventType.tier_upserted
8779
9050
  @@_tier_upserted ||= EventType.new('tier_upserted')
8780
9051
  end
@@ -8963,6 +9234,22 @@ module Io
8963
9234
  @@_reversal_upserted ||= EventType.new('reversal_upserted')
8964
9235
  end
8965
9236
 
9237
+ def EventType.price_book_upserted
9238
+ @@_price_book_upserted ||= EventType.new('price_book_upserted')
9239
+ end
9240
+
9241
+ def EventType.price_book_deleted
9242
+ @@_price_book_deleted ||= EventType.new('price_book_deleted')
9243
+ end
9244
+
9245
+ def EventType.price_book_item_upserted
9246
+ @@_price_book_item_upserted ||= EventType.new('price_book_item_upserted')
9247
+ end
9248
+
9249
+ def EventType.price_book_item_deleted
9250
+ @@_price_book_item_deleted ||= EventType.new('price_book_item_deleted')
9251
+ end
9252
+
8966
9253
  def EventType.organization_rates_published
8967
9254
  @@_organization_rates_published ||= EventType.new('organization_rates_published')
8968
9255
  end
@@ -9579,7 +9866,7 @@ module Io
9579
9866
  end
9580
9867
 
9581
9868
  def IncludedLevyKey.ALL
9582
- @@all ||= [IncludedLevyKey.duty, IncludedLevyKey.vat, IncludedLevyKey.vat_and_duty]
9869
+ @@all ||= [IncludedLevyKey.duty, IncludedLevyKey.vat, IncludedLevyKey.vat_and_duty, IncludedLevyKey.none]
9583
9870
  end
9584
9871
 
9585
9872
  def IncludedLevyKey.duty
@@ -9594,6 +9881,10 @@ module Io
9594
9881
  @@_vat_and_duty ||= IncludedLevyKey.new('vat_and_duty')
9595
9882
  end
9596
9883
 
9884
+ def IncludedLevyKey.none
9885
+ @@_none ||= IncludedLevyKey.new('none')
9886
+ end
9887
+
9597
9888
  def to_hash
9598
9889
  value
9599
9890
  end
@@ -10733,6 +11024,52 @@ module Io
10733
11024
 
10734
11025
  end
10735
11026
 
11027
+ class PriceBookStatus
11028
+
11029
+ attr_reader :value
11030
+
11031
+ def initialize(value)
11032
+ @value = HttpClient::Preconditions.assert_class('value', value, String)
11033
+ end
11034
+
11035
+ # Returns the instance of PriceBookStatus for this value, creating a new instance for an unknown value
11036
+ def PriceBookStatus.apply(value)
11037
+ if value.instance_of?(PriceBookStatus)
11038
+ value
11039
+ else
11040
+ HttpClient::Preconditions.assert_class_or_nil('value', value, String)
11041
+ value.nil? ? nil : (from_string(value) || PriceBookStatus.new(value))
11042
+ end
11043
+ end
11044
+
11045
+ # Returns the instance of PriceBookStatus for this value, or nil if not found
11046
+ def PriceBookStatus.from_string(value)
11047
+ HttpClient::Preconditions.assert_class('value', value, String)
11048
+ PriceBookStatus.ALL.find { |v| v.value == value }
11049
+ end
11050
+
11051
+ def PriceBookStatus.ALL
11052
+ @@all ||= [PriceBookStatus.draft, PriceBookStatus.published, PriceBookStatus.archived]
11053
+ end
11054
+
11055
+ def PriceBookStatus.draft
11056
+ @@_draft ||= PriceBookStatus.new('draft')
11057
+ end
11058
+
11059
+ def PriceBookStatus.published
11060
+ @@_published ||= PriceBookStatus.new('published')
11061
+ end
11062
+
11063
+ def PriceBookStatus.archived
11064
+ @@_archived ||= PriceBookStatus.new('archived')
11065
+ end
11066
+
11067
+ def to_hash
11068
+ value
11069
+ end
11070
+
11071
+ end
11072
+
10736
11073
  class PriceDetailComponentKey
10737
11074
 
10738
11075
  attr_reader :value
@@ -13336,7 +13673,7 @@ module Io
13336
13673
  # existing one has expired.
13337
13674
  class AuthorizationCopyForm < AuthorizationForm
13338
13675
 
13339
- attr_reader :source_authorization_key, :amount, :currency, :key, :attributes
13676
+ attr_reader :source_authorization_key, :amount, :currency, :attributes
13340
13677
 
13341
13678
  def initialize(incoming={})
13342
13679
  super(:discriminator => AuthorizationForm::Types::AUTHORIZATION_COPY_FORM)
@@ -13345,7 +13682,6 @@ module Io
13345
13682
  @source_authorization_key = HttpClient::Preconditions.assert_class('source_authorization_key', opts.delete(:source_authorization_key), String)
13346
13683
  @amount = HttpClient::Preconditions.assert_class('amount', HttpClient::Helper.to_big_decimal(opts.delete(:amount)), BigDecimal)
13347
13684
  @currency = HttpClient::Preconditions.assert_class('currency', opts.delete(:currency), String)
13348
- @key = (x = opts.delete(:key); x.nil? ? nil : HttpClient::Preconditions.assert_class('key', x, String))
13349
13685
  @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 })
13350
13686
  end
13351
13687
 
@@ -13362,7 +13698,6 @@ module Io
13362
13698
  :source_authorization_key => source_authorization_key,
13363
13699
  :amount => amount,
13364
13700
  :currency => currency,
13365
- :key => key,
13366
13701
  :attributes => attributes.nil? ? nil : attributes
13367
13702
  }
13368
13703
  end
@@ -15679,16 +16014,15 @@ module Io
15679
16014
 
15680
16015
  end
15681
16016
 
15682
- # Defines one or more symbols representing this currency
15683
- class CurrencySymbols
16017
+ class CurrencyFormat
15684
16018
 
15685
- attr_reader :primary, :narrow
16019
+ attr_reader :symbol, :label_formatters
15686
16020
 
15687
16021
  def initialize(incoming={})
15688
16022
  opts = HttpClient::Helper.symbolize_keys(incoming)
15689
- HttpClient::Preconditions.require_keys(opts, [:primary], 'CurrencySymbols')
15690
- @primary = HttpClient::Preconditions.assert_class('primary', opts.delete(:primary), String)
15691
- @narrow = (x = opts.delete(:narrow); x.nil? ? nil : HttpClient::Preconditions.assert_class('narrow', x, String))
16023
+ HttpClient::Preconditions.require_keys(opts, [:symbol, :label_formatters], 'CurrencyFormat')
16024
+ @symbol = (x = opts.delete(:symbol); x.is_a?(::Io::Flow::V0::Models::CurrencySymbolFormat) ? x : ::Io::Flow::V0::Models::CurrencySymbolFormat.apply(x))
16025
+ @label_formatters = HttpClient::Preconditions.assert_class('label_formatters', opts.delete(:label_formatters), Array).map { |v| (x = v; x.is_a?(::Io::Flow::V0::Models::CurrencyLabelFormatter) ? x : ::Io::Flow::V0::Models::CurrencyLabelFormatter.apply(x)) }
15692
16026
  end
15693
16027
 
15694
16028
  def to_json
@@ -15696,35 +16030,30 @@ module Io
15696
16030
  end
15697
16031
 
15698
16032
  def copy(incoming={})
15699
- CurrencySymbols.new(to_hash.merge(HttpClient::Helper.symbolize_keys(incoming)))
16033
+ CurrencyFormat.new(to_hash.merge(HttpClient::Helper.symbolize_keys(incoming)))
15700
16034
  end
15701
16035
 
15702
16036
  def to_hash
15703
16037
  {
15704
- :primary => primary,
15705
- :narrow => narrow
16038
+ :symbol => symbol.value,
16039
+ :label_formatters => label_formatters.map { |o| o.value }
15706
16040
  }
15707
16041
  end
15708
16042
 
15709
16043
  end
15710
16044
 
15711
- # A customer represents the actual person purchasing from you. This information
15712
- # is needed primarily to support logistics (delivery to this person), fraud
15713
- # management (verification of who the person is), and reporting. We also
15714
- # recommend including your customer number whenever possible as doing so will
15715
- # allow Flow to link up transactions for this customer making customer service
15716
- # easier.
15717
- class Customer
16045
+ class CurrencyFormatDeleted < Event
15718
16046
 
15719
- attr_reader :name, :number, :phone, :email
16047
+ attr_reader :event_id, :timestamp, :organization, :id
15720
16048
 
15721
16049
  def initialize(incoming={})
16050
+ super(:discriminator => Event::Types::CURRENCY_FORMAT_DELETED)
15722
16051
  opts = HttpClient::Helper.symbolize_keys(incoming)
15723
- HttpClient::Preconditions.require_keys(opts, [:name], 'Customer')
15724
- @name = (x = opts.delete(:name); x.is_a?(::Io::Flow::V0::Models::Name) ? x : ::Io::Flow::V0::Models::Name.new(x))
15725
- @number = (x = opts.delete(:number); x.nil? ? nil : HttpClient::Preconditions.assert_class('number', x, String))
15726
- @phone = (x = opts.delete(:phone); x.nil? ? nil : HttpClient::Preconditions.assert_class('phone', x, String))
15727
- @email = (x = opts.delete(:email); x.nil? ? nil : HttpClient::Preconditions.assert_class('email', x, String))
16052
+ HttpClient::Preconditions.require_keys(opts, [:event_id, :timestamp, :organization, :id], 'CurrencyFormatDeleted')
16053
+ @event_id = HttpClient::Preconditions.assert_class('event_id', opts.delete(:event_id), String)
16054
+ @timestamp = HttpClient::Preconditions.assert_class('timestamp', HttpClient::Helper.to_date_time_iso8601(opts.delete(:timestamp)), DateTime)
16055
+ @organization = HttpClient::Preconditions.assert_class('organization', opts.delete(:organization), String)
16056
+ @id = HttpClient::Preconditions.assert_class('id', opts.delete(:id), String)
15728
16057
  end
15729
16058
 
15730
16059
  def to_json
@@ -15732,22 +16061,128 @@ module Io
15732
16061
  end
15733
16062
 
15734
16063
  def copy(incoming={})
15735
- Customer.new(to_hash.merge(HttpClient::Helper.symbolize_keys(incoming)))
16064
+ CurrencyFormatDeleted.new(subtype_to_hash.merge(HttpClient::Helper.symbolize_keys(incoming)))
15736
16065
  end
15737
16066
 
15738
- def to_hash
16067
+ def subtype_to_hash
15739
16068
  {
15740
- :name => name.to_hash,
15741
- :number => number,
15742
- :phone => phone,
15743
- :email => email
16069
+ :event_id => event_id,
16070
+ :timestamp => timestamp,
16071
+ :organization => organization,
16072
+ :id => id
15744
16073
  }
15745
16074
  end
15746
16075
 
15747
16076
  end
15748
16077
 
15749
- # Represents the card verification results
15750
- class Cvv
16078
+ class CurrencyFormatUpserted < Event
16079
+
16080
+ attr_reader :event_id, :timestamp, :organization, :id, :experience_key, :symbol, :label_formatters
16081
+
16082
+ def initialize(incoming={})
16083
+ super(:discriminator => Event::Types::CURRENCY_FORMAT_UPSERTED)
16084
+ opts = HttpClient::Helper.symbolize_keys(incoming)
16085
+ HttpClient::Preconditions.require_keys(opts, [:event_id, :timestamp, :organization, :id, :experience_key, :symbol, :label_formatters], 'CurrencyFormatUpserted')
16086
+ @event_id = HttpClient::Preconditions.assert_class('event_id', opts.delete(:event_id), String)
16087
+ @timestamp = HttpClient::Preconditions.assert_class('timestamp', HttpClient::Helper.to_date_time_iso8601(opts.delete(:timestamp)), DateTime)
16088
+ @organization = HttpClient::Preconditions.assert_class('organization', opts.delete(:organization), String)
16089
+ @id = HttpClient::Preconditions.assert_class('id', opts.delete(:id), String)
16090
+ @experience_key = HttpClient::Preconditions.assert_class('experience_key', opts.delete(:experience_key), String)
16091
+ @symbol = (x = opts.delete(:symbol); x.is_a?(::Io::Flow::V0::Models::CurrencySymbolFormat) ? x : ::Io::Flow::V0::Models::CurrencySymbolFormat.apply(x))
16092
+ @label_formatters = HttpClient::Preconditions.assert_class('label_formatters', opts.delete(:label_formatters), Array).map { |v| (x = v; x.is_a?(::Io::Flow::V0::Models::CurrencyLabelFormatter) ? x : ::Io::Flow::V0::Models::CurrencyLabelFormatter.apply(x)) }
16093
+ end
16094
+
16095
+ def to_json
16096
+ JSON.dump(to_hash)
16097
+ end
16098
+
16099
+ def copy(incoming={})
16100
+ CurrencyFormatUpserted.new(subtype_to_hash.merge(HttpClient::Helper.symbolize_keys(incoming)))
16101
+ end
16102
+
16103
+ def subtype_to_hash
16104
+ {
16105
+ :event_id => event_id,
16106
+ :timestamp => timestamp,
16107
+ :organization => organization,
16108
+ :id => id,
16109
+ :experience_key => experience_key,
16110
+ :symbol => symbol.value,
16111
+ :label_formatters => label_formatters.map { |o| o.value }
16112
+ }
16113
+ end
16114
+
16115
+ end
16116
+
16117
+ # Defines one or more symbols representing this currency
16118
+ class CurrencySymbols
16119
+
16120
+ attr_reader :primary, :narrow
16121
+
16122
+ def initialize(incoming={})
16123
+ opts = HttpClient::Helper.symbolize_keys(incoming)
16124
+ HttpClient::Preconditions.require_keys(opts, [:primary], 'CurrencySymbols')
16125
+ @primary = HttpClient::Preconditions.assert_class('primary', opts.delete(:primary), String)
16126
+ @narrow = (x = opts.delete(:narrow); x.nil? ? nil : HttpClient::Preconditions.assert_class('narrow', x, String))
16127
+ end
16128
+
16129
+ def to_json
16130
+ JSON.dump(to_hash)
16131
+ end
16132
+
16133
+ def copy(incoming={})
16134
+ CurrencySymbols.new(to_hash.merge(HttpClient::Helper.symbolize_keys(incoming)))
16135
+ end
16136
+
16137
+ def to_hash
16138
+ {
16139
+ :primary => primary,
16140
+ :narrow => narrow
16141
+ }
16142
+ end
16143
+
16144
+ end
16145
+
16146
+ # A customer represents the actual person purchasing from you. This information
16147
+ # is needed primarily to support logistics (delivery to this person), fraud
16148
+ # management (verification of who the person is), and reporting. We also
16149
+ # recommend including your customer number whenever possible as doing so will
16150
+ # allow Flow to link up transactions for this customer making customer service
16151
+ # easier.
16152
+ class Customer
16153
+
16154
+ attr_reader :name, :number, :phone, :email
16155
+
16156
+ def initialize(incoming={})
16157
+ opts = HttpClient::Helper.symbolize_keys(incoming)
16158
+ HttpClient::Preconditions.require_keys(opts, [:name], 'Customer')
16159
+ @name = (x = opts.delete(:name); x.is_a?(::Io::Flow::V0::Models::Name) ? x : ::Io::Flow::V0::Models::Name.new(x))
16160
+ @number = (x = opts.delete(:number); x.nil? ? nil : HttpClient::Preconditions.assert_class('number', x, String))
16161
+ @phone = (x = opts.delete(:phone); x.nil? ? nil : HttpClient::Preconditions.assert_class('phone', x, String))
16162
+ @email = (x = opts.delete(:email); x.nil? ? nil : HttpClient::Preconditions.assert_class('email', x, String))
16163
+ end
16164
+
16165
+ def to_json
16166
+ JSON.dump(to_hash)
16167
+ end
16168
+
16169
+ def copy(incoming={})
16170
+ Customer.new(to_hash.merge(HttpClient::Helper.symbolize_keys(incoming)))
16171
+ end
16172
+
16173
+ def to_hash
16174
+ {
16175
+ :name => name.to_hash,
16176
+ :number => number,
16177
+ :phone => phone,
16178
+ :email => email
16179
+ }
16180
+ end
16181
+
16182
+ end
16183
+
16184
+ # Represents the card verification results
16185
+ class Cvv
15751
16186
 
15752
16187
  attr_reader :code, :description
15753
16188
 
@@ -16654,6 +17089,62 @@ module Io
16654
17089
 
16655
17090
  end
16656
17091
 
17092
+ class ExperienceCurrencyFormat
17093
+
17094
+ attr_reader :symbol, :label_formatters
17095
+
17096
+ def initialize(incoming={})
17097
+ opts = HttpClient::Helper.symbolize_keys(incoming)
17098
+ HttpClient::Preconditions.require_keys(opts, [:symbol, :label_formatters], 'ExperienceCurrencyFormat')
17099
+ @symbol = (x = opts.delete(:symbol); x.is_a?(::Io::Flow::V0::Models::CurrencySymbolFormat) ? x : ::Io::Flow::V0::Models::CurrencySymbolFormat.apply(x))
17100
+ @label_formatters = HttpClient::Preconditions.assert_class('label_formatters', opts.delete(:label_formatters), Array).map { |v| (x = v; x.is_a?(::Io::Flow::V0::Models::CurrencyLabelFormatter) ? x : ::Io::Flow::V0::Models::CurrencyLabelFormatter.apply(x)) }
17101
+ end
17102
+
17103
+ def to_json
17104
+ JSON.dump(to_hash)
17105
+ end
17106
+
17107
+ def copy(incoming={})
17108
+ ExperienceCurrencyFormat.new(to_hash.merge(HttpClient::Helper.symbolize_keys(incoming)))
17109
+ end
17110
+
17111
+ def to_hash
17112
+ {
17113
+ :symbol => symbol.value,
17114
+ :label_formatters => label_formatters.map { |o| o.value }
17115
+ }
17116
+ end
17117
+
17118
+ end
17119
+
17120
+ class ExperienceCurrencyFormatForm
17121
+
17122
+ attr_reader :symbol, :label_formatters
17123
+
17124
+ def initialize(incoming={})
17125
+ opts = HttpClient::Helper.symbolize_keys(incoming)
17126
+ HttpClient::Preconditions.require_keys(opts, [:symbol, :label_formatters], 'ExperienceCurrencyFormatForm')
17127
+ @symbol = (x = opts.delete(:symbol); x.is_a?(::Io::Flow::V0::Models::CurrencySymbolFormat) ? x : ::Io::Flow::V0::Models::CurrencySymbolFormat.apply(x))
17128
+ @label_formatters = HttpClient::Preconditions.assert_class('label_formatters', opts.delete(:label_formatters), Array).map { |v| (x = v; x.is_a?(::Io::Flow::V0::Models::CurrencyLabelFormatter) ? x : ::Io::Flow::V0::Models::CurrencyLabelFormatter.apply(x)) }
17129
+ end
17130
+
17131
+ def to_json
17132
+ JSON.dump(to_hash)
17133
+ end
17134
+
17135
+ def copy(incoming={})
17136
+ ExperienceCurrencyFormatForm.new(to_hash.merge(HttpClient::Helper.symbolize_keys(incoming)))
17137
+ end
17138
+
17139
+ def to_hash
17140
+ {
17141
+ :symbol => symbol.value,
17142
+ :label_formatters => label_formatters.map { |o| o.value }
17143
+ }
17144
+ end
17145
+
17146
+ end
17147
+
16657
17148
  # Defines a set of defaults for a given organization and region
16658
17149
  class ExperienceDefaults
16659
17150
 
@@ -17347,6 +17838,43 @@ module Io
17347
17838
 
17348
17839
  end
17349
17840
 
17841
+ class FraudStatusChanged < Event
17842
+
17843
+ attr_reader :event_id, :timestamp, :id, :organization, :order, :status
17844
+
17845
+ def initialize(incoming={})
17846
+ super(:discriminator => Event::Types::FRAUD_STATUS_CHANGED)
17847
+ opts = HttpClient::Helper.symbolize_keys(incoming)
17848
+ HttpClient::Preconditions.require_keys(opts, [:event_id, :timestamp, :id, :organization, :order, :status], 'FraudStatusChanged')
17849
+ @event_id = HttpClient::Preconditions.assert_class('event_id', opts.delete(:event_id), String)
17850
+ @timestamp = HttpClient::Preconditions.assert_class('timestamp', HttpClient::Helper.to_date_time_iso8601(opts.delete(:timestamp)), DateTime)
17851
+ @id = HttpClient::Preconditions.assert_class('id', opts.delete(:id), String)
17852
+ @organization = HttpClient::Preconditions.assert_class('organization', opts.delete(:organization), String)
17853
+ @order = (x = opts.delete(:order); x.is_a?(::Io::Flow::V0::Models::OrderReference) ? x : ::Io::Flow::V0::Models::OrderReference.new(x))
17854
+ @status = (x = opts.delete(:status); x.is_a?(::Io::Flow::V0::Models::FraudStatus) ? x : ::Io::Flow::V0::Models::FraudStatus.apply(x))
17855
+ end
17856
+
17857
+ def to_json
17858
+ JSON.dump(to_hash)
17859
+ end
17860
+
17861
+ def copy(incoming={})
17862
+ FraudStatusChanged.new(subtype_to_hash.merge(HttpClient::Helper.symbolize_keys(incoming)))
17863
+ end
17864
+
17865
+ def subtype_to_hash
17866
+ {
17867
+ :event_id => event_id,
17868
+ :timestamp => timestamp,
17869
+ :id => id,
17870
+ :organization => organization,
17871
+ :order => order.to_hash,
17872
+ :status => status.value
17873
+ }
17874
+ end
17875
+
17876
+ end
17877
+
17350
17878
  class FreeShipping < Promotion
17351
17879
 
17352
17880
  attr_reader :trigger, :max
@@ -18216,13 +18744,14 @@ module Io
18216
18744
 
18217
18745
  class HarmonizedItemReference
18218
18746
 
18219
- attr_reader :id, :number
18747
+ attr_reader :id, :number, :description
18220
18748
 
18221
18749
  def initialize(incoming={})
18222
18750
  opts = HttpClient::Helper.symbolize_keys(incoming)
18223
18751
  HttpClient::Preconditions.require_keys(opts, [:id, :number], 'HarmonizedItemReference')
18224
18752
  @id = HttpClient::Preconditions.assert_class('id', opts.delete(:id), String)
18225
18753
  @number = HttpClient::Preconditions.assert_class('number', opts.delete(:number), String)
18754
+ @description = (x = opts.delete(:description); x.nil? ? nil : HttpClient::Preconditions.assert_class('description', x, String))
18226
18755
  end
18227
18756
 
18228
18757
  def to_json
@@ -18236,7 +18765,8 @@ module Io
18236
18765
  def to_hash
18237
18766
  {
18238
18767
  :id => id,
18239
- :number => number
18768
+ :number => number,
18769
+ :description => description
18240
18770
  }
18241
18771
  end
18242
18772
 
@@ -23790,7 +24320,7 @@ module Io
23790
24320
  # during this session (e.g. order).
23791
24321
  class OrganizationSession < Session
23792
24322
 
23793
- attr_reader :id, :organization, :visitor, :visit, :environment, :attributes, :ip, :local, :geo, :experience
24323
+ attr_reader :id, :organization, :visitor, :visit, :environment, :attributes, :ip, :local, :geo, :experience, :format
23794
24324
 
23795
24325
  def initialize(incoming={})
23796
24326
  super(:discriminator => Session::Types::ORGANIZATION_SESSION)
@@ -23806,6 +24336,7 @@ module Io
23806
24336
  @local = (x = opts.delete(:local); x.nil? ? nil : (x = x; x.is_a?(::Io::Flow::V0::Models::LocalSession) ? x : ::Io::Flow::V0::Models::LocalSession.new(x)))
23807
24337
  @geo = (x = opts.delete(:geo); x.nil? ? nil : (x = x; x.is_a?(::Io::Flow::V0::Models::SessionGeo) ? x : ::Io::Flow::V0::Models::SessionGeo.new(x)))
23808
24338
  @experience = (x = opts.delete(:experience); x.nil? ? nil : (x = x; x.is_a?(::Io::Flow::V0::Models::ExperienceGeo) ? x : ::Io::Flow::V0::Models::ExperienceGeo.new(x)))
24339
+ @format = (x = opts.delete(:format); x.nil? ? nil : (x = x; x.is_a?(::Io::Flow::V0::Models::SessionFormat) ? x : ::Io::Flow::V0::Models::SessionFormat.new(x)))
23809
24340
  end
23810
24341
 
23811
24342
  def to_json
@@ -23827,7 +24358,8 @@ module Io
23827
24358
  :ip => ip,
23828
24359
  :local => local.nil? ? nil : local.to_hash,
23829
24360
  :geo => geo.nil? ? nil : geo.to_hash,
23830
- :experience => experience.nil? ? nil : experience.to_hash
24361
+ :experience => experience.nil? ? nil : experience.to_hash,
24362
+ :format => format.nil? ? nil : format.to_hash
23831
24363
  }
23832
24364
  end
23833
24365
 
@@ -25034,15 +25566,21 @@ module Io
25034
25566
 
25035
25567
  end
25036
25568
 
25037
- class PriceCheck
25569
+ # Represents a list of target prices in a specific currency that can override
25570
+ # any subset of item prices within an experience.
25571
+ class PriceBook
25038
25572
 
25039
- attr_reader :display, :final
25573
+ attr_reader :id, :key, :currency, :name, :includes, :status
25040
25574
 
25041
25575
  def initialize(incoming={})
25042
25576
  opts = HttpClient::Helper.symbolize_keys(incoming)
25043
- HttpClient::Preconditions.require_keys(opts, [:display, :final], 'PriceCheck')
25044
- @display = (x = opts.delete(:display); x.is_a?(::Io::Flow::V0::Models::LocalPriceDetails) ? x : ::Io::Flow::V0::Models::LocalPriceDetails.new(x))
25045
- @final = (x = opts.delete(:final); x.is_a?(::Io::Flow::V0::Models::LocalPriceDetails) ? x : ::Io::Flow::V0::Models::LocalPriceDetails.new(x))
25577
+ HttpClient::Preconditions.require_keys(opts, [:id, :key, :currency, :name, :includes, :status], 'PriceBook')
25578
+ @id = HttpClient::Preconditions.assert_class('id', opts.delete(:id), String)
25579
+ @key = HttpClient::Preconditions.assert_class('key', opts.delete(:key), String)
25580
+ @currency = HttpClient::Preconditions.assert_class('currency', opts.delete(:currency), String)
25581
+ @name = HttpClient::Preconditions.assert_class('name', opts.delete(:name), String)
25582
+ @includes = (x = opts.delete(:includes); x.is_a?(::Io::Flow::V0::Models::IncludedLevies) ? x : ::Io::Flow::V0::Models::IncludedLevies.new(x))
25583
+ @status = (x = opts.delete(:status); x.is_a?(::Io::Flow::V0::Models::PriceBookStatus) ? x : ::Io::Flow::V0::Models::PriceBookStatus.apply(x))
25046
25584
  end
25047
25585
 
25048
25586
  def to_json
@@ -25050,31 +25588,34 @@ module Io
25050
25588
  end
25051
25589
 
25052
25590
  def copy(incoming={})
25053
- PriceCheck.new(to_hash.merge(HttpClient::Helper.symbolize_keys(incoming)))
25591
+ PriceBook.new(to_hash.merge(HttpClient::Helper.symbolize_keys(incoming)))
25054
25592
  end
25055
25593
 
25056
25594
  def to_hash
25057
25595
  {
25058
- :display => display.to_hash,
25059
- :final => final.to_hash
25596
+ :id => id,
25597
+ :key => key,
25598
+ :currency => currency,
25599
+ :name => name,
25600
+ :includes => includes.to_hash,
25601
+ :status => status.value
25060
25602
  }
25061
25603
  end
25062
25604
 
25063
25605
  end
25064
25606
 
25065
- # Represents a top-level price detail, e.g. 'Subtotal' or 'VAT'.
25066
- class PriceDetail
25607
+ class PriceBookDeleted < Event
25067
25608
 
25068
- attr_reader :key, :components, :amount, :label, :name
25609
+ attr_reader :event_id, :timestamp, :organization, :id
25069
25610
 
25070
25611
  def initialize(incoming={})
25612
+ super(:discriminator => Event::Types::PRICE_BOOK_DELETED)
25071
25613
  opts = HttpClient::Helper.symbolize_keys(incoming)
25072
- HttpClient::Preconditions.require_keys(opts, [:key, :components, :amount, :label], 'PriceDetail')
25073
- @key = (x = opts.delete(:key); x.is_a?(::Io::Flow::V0::Models::PriceDetailKey) ? x : ::Io::Flow::V0::Models::PriceDetailKey.apply(x))
25074
- @components = HttpClient::Preconditions.assert_class('components', opts.delete(:components), Array).map { |v| (x = v; x.is_a?(::Io::Flow::V0::Models::PriceDetailComponent) ? x : ::Io::Flow::V0::Models::PriceDetailComponent.new(x)) }
25075
- @amount = HttpClient::Preconditions.assert_class('amount', HttpClient::Helper.to_big_decimal(opts.delete(:amount)), BigDecimal)
25076
- @label = HttpClient::Preconditions.assert_class('label', opts.delete(:label), String)
25077
- @name = (x = opts.delete(:name); x.nil? ? nil : HttpClient::Preconditions.assert_class('name', x, String))
25614
+ HttpClient::Preconditions.require_keys(opts, [:event_id, :timestamp, :organization, :id], 'PriceBookDeleted')
25615
+ @event_id = HttpClient::Preconditions.assert_class('event_id', opts.delete(:event_id), String)
25616
+ @timestamp = HttpClient::Preconditions.assert_class('timestamp', HttpClient::Helper.to_date_time_iso8601(opts.delete(:timestamp)), DateTime)
25617
+ @organization = HttpClient::Preconditions.assert_class('organization', opts.delete(:organization), String)
25618
+ @id = HttpClient::Preconditions.assert_class('id', opts.delete(:id), String)
25078
25619
  end
25079
25620
 
25080
25621
  def to_json
@@ -25082,32 +25623,34 @@ module Io
25082
25623
  end
25083
25624
 
25084
25625
  def copy(incoming={})
25085
- PriceDetail.new(to_hash.merge(HttpClient::Helper.symbolize_keys(incoming)))
25626
+ PriceBookDeleted.new(subtype_to_hash.merge(HttpClient::Helper.symbolize_keys(incoming)))
25086
25627
  end
25087
25628
 
25088
- def to_hash
25629
+ def subtype_to_hash
25089
25630
  {
25090
- :key => key.value,
25091
- :components => components.map { |o| o.to_hash },
25092
- :amount => amount,
25093
- :label => label,
25094
- :name => name
25631
+ :event_id => event_id,
25632
+ :timestamp => timestamp,
25633
+ :organization => organization,
25634
+ :id => id
25095
25635
  }
25096
25636
  end
25097
25637
 
25098
25638
  end
25099
25639
 
25100
- class PriceDetailComponent
25640
+ # Represents a price book for a specific currency that can override any subset
25641
+ # of item prices within an experience.
25642
+ class PriceBookForm
25101
25643
 
25102
- attr_reader :key, :amount, :label, :name
25644
+ attr_reader :currency, :name, :key, :includes, :status
25103
25645
 
25104
25646
  def initialize(incoming={})
25105
25647
  opts = HttpClient::Helper.symbolize_keys(incoming)
25106
- HttpClient::Preconditions.require_keys(opts, [:key, :amount, :label], 'PriceDetailComponent')
25107
- @key = (x = opts.delete(:key); x.is_a?(::Io::Flow::V0::Models::PriceDetailComponentKey) ? x : ::Io::Flow::V0::Models::PriceDetailComponentKey.apply(x))
25108
- @amount = HttpClient::Preconditions.assert_class('amount', HttpClient::Helper.to_big_decimal(opts.delete(:amount)), BigDecimal)
25109
- @label = HttpClient::Preconditions.assert_class('label', opts.delete(:label), String)
25110
- @name = (x = opts.delete(:name); x.nil? ? nil : HttpClient::Preconditions.assert_class('name', x, String))
25648
+ HttpClient::Preconditions.require_keys(opts, [:currency, :name, :includes], 'PriceBookForm')
25649
+ @currency = HttpClient::Preconditions.assert_class('currency', opts.delete(:currency), String)
25650
+ @name = HttpClient::Preconditions.assert_class('name', opts.delete(:name), String)
25651
+ @key = (x = opts.delete(:key); x.nil? ? nil : HttpClient::Preconditions.assert_class('key', x, String))
25652
+ @includes = (x = opts.delete(:includes); x.is_a?(::Io::Flow::V0::Models::IncludedLevies) ? x : ::Io::Flow::V0::Models::IncludedLevies.new(x))
25653
+ @status = (x = (x = opts.delete(:status); x.nil? ? "draft" : x); x.is_a?(::Io::Flow::V0::Models::PriceBookStatus) ? x : ::Io::Flow::V0::Models::PriceBookStatus.apply(x))
25111
25654
  end
25112
25655
 
25113
25656
  def to_json
@@ -25115,37 +25658,34 @@ module Io
25115
25658
  end
25116
25659
 
25117
25660
  def copy(incoming={})
25118
- PriceDetailComponent.new(to_hash.merge(HttpClient::Helper.symbolize_keys(incoming)))
25661
+ PriceBookForm.new(to_hash.merge(HttpClient::Helper.symbolize_keys(incoming)))
25119
25662
  end
25120
25663
 
25121
25664
  def to_hash
25122
25665
  {
25123
- :key => key.value,
25124
- :amount => amount,
25125
- :label => label,
25126
- :name => name
25666
+ :currency => currency,
25667
+ :name => name,
25668
+ :key => key,
25669
+ :includes => includes.to_hash,
25670
+ :status => status.value
25127
25671
  }
25128
25672
  end
25129
25673
 
25130
25674
  end
25131
25675
 
25132
- # Detailed information for the pricing of a given item within an experience.
25133
- class PriceDetails
25676
+ # Represents the price of a single item within a price book.
25677
+ class PriceBookItem
25134
25678
 
25135
- attr_reader :currency, :item_price, :margins, :vat, :duty, :rounding, :price, :total, :adjustment
25679
+ attr_reader :id, :price_book, :price, :item_number, :schedule
25136
25680
 
25137
25681
  def initialize(incoming={})
25138
25682
  opts = HttpClient::Helper.symbolize_keys(incoming)
25139
- HttpClient::Preconditions.require_keys(opts, [:currency, :item_price, :margins, :vat, :duty, :rounding, :price, :total], 'PriceDetails')
25140
- @currency = HttpClient::Preconditions.assert_class('currency', opts.delete(:currency), String)
25141
- @item_price = (x = opts.delete(:item_price); x.is_a?(::Io::Flow::V0::Models::PriceDetail) ? x : ::Io::Flow::V0::Models::PriceDetail.new(x))
25142
- @margins = (x = opts.delete(:margins); x.is_a?(::Io::Flow::V0::Models::PriceDetail) ? x : ::Io::Flow::V0::Models::PriceDetail.new(x))
25143
- @vat = (x = opts.delete(:vat); x.is_a?(::Io::Flow::V0::Models::PriceDetail) ? x : ::Io::Flow::V0::Models::PriceDetail.new(x))
25144
- @duty = (x = opts.delete(:duty); x.is_a?(::Io::Flow::V0::Models::PriceDetail) ? x : ::Io::Flow::V0::Models::PriceDetail.new(x))
25145
- @rounding = (x = opts.delete(:rounding); x.is_a?(::Io::Flow::V0::Models::PriceDetail) ? x : ::Io::Flow::V0::Models::PriceDetail.new(x))
25683
+ HttpClient::Preconditions.require_keys(opts, [:id, :price_book, :price, :item_number, :schedule], 'PriceBookItem')
25684
+ @id = HttpClient::Preconditions.assert_class('id', opts.delete(:id), String)
25685
+ @price_book = (x = opts.delete(:price_book); x.is_a?(::Io::Flow::V0::Models::PriceBookReference) ? x : ::Io::Flow::V0::Models::PriceBookReference.new(x))
25146
25686
  @price = (x = opts.delete(:price); x.is_a?(::Io::Flow::V0::Models::Price) ? x : ::Io::Flow::V0::Models::Price.new(x))
25147
- @total = (x = opts.delete(:total); x.is_a?(::Io::Flow::V0::Models::Price) ? x : ::Io::Flow::V0::Models::Price.new(x))
25148
- @adjustment = (x = opts.delete(:adjustment); x.nil? ? nil : (x = x; x.is_a?(::Io::Flow::V0::Models::PriceDetail) ? x : ::Io::Flow::V0::Models::PriceDetail.new(x)))
25687
+ @item_number = HttpClient::Preconditions.assert_class('item_number', opts.delete(:item_number), String)
25688
+ @schedule = (x = opts.delete(:schedule); x.is_a?(::Io::Flow::V0::Models::PriceBookItemSchedule) ? x : ::Io::Flow::V0::Models::PriceBookItemSchedule.new(x))
25149
25689
  end
25150
25690
 
25151
25691
  def to_json
@@ -25153,13 +25693,331 @@ module Io
25153
25693
  end
25154
25694
 
25155
25695
  def copy(incoming={})
25156
- PriceDetails.new(to_hash.merge(HttpClient::Helper.symbolize_keys(incoming)))
25696
+ PriceBookItem.new(to_hash.merge(HttpClient::Helper.symbolize_keys(incoming)))
25157
25697
  end
25158
25698
 
25159
25699
  def to_hash
25160
25700
  {
25161
- :currency => currency,
25162
- :item_price => item_price.to_hash,
25701
+ :id => id,
25702
+ :price_book => price_book.to_hash,
25703
+ :price => price.to_hash,
25704
+ :item_number => item_number,
25705
+ :schedule => schedule.to_hash
25706
+ }
25707
+ end
25708
+
25709
+ end
25710
+
25711
+ class PriceBookItemDeleted < Event
25712
+
25713
+ attr_reader :event_id, :timestamp, :organization, :id
25714
+
25715
+ def initialize(incoming={})
25716
+ super(:discriminator => Event::Types::PRICE_BOOK_ITEM_DELETED)
25717
+ opts = HttpClient::Helper.symbolize_keys(incoming)
25718
+ HttpClient::Preconditions.require_keys(opts, [:event_id, :timestamp, :organization, :id], 'PriceBookItemDeleted')
25719
+ @event_id = HttpClient::Preconditions.assert_class('event_id', opts.delete(:event_id), String)
25720
+ @timestamp = HttpClient::Preconditions.assert_class('timestamp', HttpClient::Helper.to_date_time_iso8601(opts.delete(:timestamp)), DateTime)
25721
+ @organization = HttpClient::Preconditions.assert_class('organization', opts.delete(:organization), String)
25722
+ @id = HttpClient::Preconditions.assert_class('id', opts.delete(:id), String)
25723
+ end
25724
+
25725
+ def to_json
25726
+ JSON.dump(to_hash)
25727
+ end
25728
+
25729
+ def copy(incoming={})
25730
+ PriceBookItemDeleted.new(subtype_to_hash.merge(HttpClient::Helper.symbolize_keys(incoming)))
25731
+ end
25732
+
25733
+ def subtype_to_hash
25734
+ {
25735
+ :event_id => event_id,
25736
+ :timestamp => timestamp,
25737
+ :organization => organization,
25738
+ :id => id
25739
+ }
25740
+ end
25741
+
25742
+ end
25743
+
25744
+ # Represents the form to create an item in a pricebook.
25745
+ class PriceBookItemForm
25746
+
25747
+ attr_reader :price_book_key, :price, :item_number, :schedule
25748
+
25749
+ def initialize(incoming={})
25750
+ opts = HttpClient::Helper.symbolize_keys(incoming)
25751
+ HttpClient::Preconditions.require_keys(opts, [:price_book_key, :price, :item_number, :schedule], 'PriceBookItemForm')
25752
+ @price_book_key = HttpClient::Preconditions.assert_class('price_book_key', opts.delete(:price_book_key), String)
25753
+ @price = (x = opts.delete(:price); x.is_a?(::Io::Flow::V0::Models::Money) ? x : ::Io::Flow::V0::Models::Money.new(x))
25754
+ @item_number = HttpClient::Preconditions.assert_class('item_number', opts.delete(:item_number), String)
25755
+ @schedule = (x = opts.delete(:schedule); x.is_a?(::Io::Flow::V0::Models::PriceBookItemSchedule) ? x : ::Io::Flow::V0::Models::PriceBookItemSchedule.new(x))
25756
+ end
25757
+
25758
+ def to_json
25759
+ JSON.dump(to_hash)
25760
+ end
25761
+
25762
+ def copy(incoming={})
25763
+ PriceBookItemForm.new(to_hash.merge(HttpClient::Helper.symbolize_keys(incoming)))
25764
+ end
25765
+
25766
+ def to_hash
25767
+ {
25768
+ :price_book_key => price_book_key,
25769
+ :price => price.to_hash,
25770
+ :item_number => item_number,
25771
+ :schedule => schedule.to_hash
25772
+ }
25773
+ end
25774
+
25775
+ end
25776
+
25777
+ # Represents schedule applied to a price book item
25778
+ class PriceBookItemSchedule
25779
+
25780
+ attr_reader :starts_at
25781
+
25782
+ def initialize(incoming={})
25783
+ opts = HttpClient::Helper.symbolize_keys(incoming)
25784
+ @starts_at = (x = opts.delete(:starts_at); x.nil? ? nil : HttpClient::Preconditions.assert_class('starts_at', HttpClient::Helper.to_date_time_iso8601(x), DateTime))
25785
+ end
25786
+
25787
+ def to_json
25788
+ JSON.dump(to_hash)
25789
+ end
25790
+
25791
+ def copy(incoming={})
25792
+ PriceBookItemSchedule.new(to_hash.merge(HttpClient::Helper.symbolize_keys(incoming)))
25793
+ end
25794
+
25795
+ def to_hash
25796
+ {
25797
+ :starts_at => starts_at
25798
+ }
25799
+ end
25800
+
25801
+ end
25802
+
25803
+ class PriceBookItemUpserted < Event
25804
+
25805
+ attr_reader :event_id, :timestamp, :organization, :price_book_item
25806
+
25807
+ def initialize(incoming={})
25808
+ super(:discriminator => Event::Types::PRICE_BOOK_ITEM_UPSERTED)
25809
+ opts = HttpClient::Helper.symbolize_keys(incoming)
25810
+ HttpClient::Preconditions.require_keys(opts, [:event_id, :timestamp, :organization, :price_book_item], 'PriceBookItemUpserted')
25811
+ @event_id = HttpClient::Preconditions.assert_class('event_id', opts.delete(:event_id), String)
25812
+ @timestamp = HttpClient::Preconditions.assert_class('timestamp', HttpClient::Helper.to_date_time_iso8601(opts.delete(:timestamp)), DateTime)
25813
+ @organization = HttpClient::Preconditions.assert_class('organization', opts.delete(:organization), String)
25814
+ @price_book_item = (x = opts.delete(:price_book_item); x.is_a?(::Io::Flow::V0::Models::PriceBookItem) ? x : ::Io::Flow::V0::Models::PriceBookItem.new(x))
25815
+ end
25816
+
25817
+ def to_json
25818
+ JSON.dump(to_hash)
25819
+ end
25820
+
25821
+ def copy(incoming={})
25822
+ PriceBookItemUpserted.new(subtype_to_hash.merge(HttpClient::Helper.symbolize_keys(incoming)))
25823
+ end
25824
+
25825
+ def subtype_to_hash
25826
+ {
25827
+ :event_id => event_id,
25828
+ :timestamp => timestamp,
25829
+ :organization => organization,
25830
+ :price_book_item => price_book_item.to_hash
25831
+ }
25832
+ end
25833
+
25834
+ end
25835
+
25836
+ class PriceBookReference
25837
+
25838
+ attr_reader :id
25839
+
25840
+ def initialize(incoming={})
25841
+ opts = HttpClient::Helper.symbolize_keys(incoming)
25842
+ HttpClient::Preconditions.require_keys(opts, [:id], 'PriceBookReference')
25843
+ @id = HttpClient::Preconditions.assert_class('id', opts.delete(:id), String)
25844
+ end
25845
+
25846
+ def to_json
25847
+ JSON.dump(to_hash)
25848
+ end
25849
+
25850
+ def copy(incoming={})
25851
+ PriceBookReference.new(to_hash.merge(HttpClient::Helper.symbolize_keys(incoming)))
25852
+ end
25853
+
25854
+ def to_hash
25855
+ {
25856
+ :id => id
25857
+ }
25858
+ end
25859
+
25860
+ end
25861
+
25862
+ class PriceBookUpserted < Event
25863
+
25864
+ attr_reader :event_id, :timestamp, :organization, :price_book
25865
+
25866
+ def initialize(incoming={})
25867
+ super(:discriminator => Event::Types::PRICE_BOOK_UPSERTED)
25868
+ opts = HttpClient::Helper.symbolize_keys(incoming)
25869
+ HttpClient::Preconditions.require_keys(opts, [:event_id, :timestamp, :organization, :price_book], 'PriceBookUpserted')
25870
+ @event_id = HttpClient::Preconditions.assert_class('event_id', opts.delete(:event_id), String)
25871
+ @timestamp = HttpClient::Preconditions.assert_class('timestamp', HttpClient::Helper.to_date_time_iso8601(opts.delete(:timestamp)), DateTime)
25872
+ @organization = HttpClient::Preconditions.assert_class('organization', opts.delete(:organization), String)
25873
+ @price_book = (x = opts.delete(:price_book); x.is_a?(::Io::Flow::V0::Models::PriceBook) ? x : ::Io::Flow::V0::Models::PriceBook.new(x))
25874
+ end
25875
+
25876
+ def to_json
25877
+ JSON.dump(to_hash)
25878
+ end
25879
+
25880
+ def copy(incoming={})
25881
+ PriceBookUpserted.new(subtype_to_hash.merge(HttpClient::Helper.symbolize_keys(incoming)))
25882
+ end
25883
+
25884
+ def subtype_to_hash
25885
+ {
25886
+ :event_id => event_id,
25887
+ :timestamp => timestamp,
25888
+ :organization => organization,
25889
+ :price_book => price_book.to_hash
25890
+ }
25891
+ end
25892
+
25893
+ end
25894
+
25895
+ class PriceCheck
25896
+
25897
+ attr_reader :display, :final
25898
+
25899
+ def initialize(incoming={})
25900
+ opts = HttpClient::Helper.symbolize_keys(incoming)
25901
+ HttpClient::Preconditions.require_keys(opts, [:display, :final], 'PriceCheck')
25902
+ @display = (x = opts.delete(:display); x.is_a?(::Io::Flow::V0::Models::LocalPriceDetails) ? x : ::Io::Flow::V0::Models::LocalPriceDetails.new(x))
25903
+ @final = (x = opts.delete(:final); x.is_a?(::Io::Flow::V0::Models::LocalPriceDetails) ? x : ::Io::Flow::V0::Models::LocalPriceDetails.new(x))
25904
+ end
25905
+
25906
+ def to_json
25907
+ JSON.dump(to_hash)
25908
+ end
25909
+
25910
+ def copy(incoming={})
25911
+ PriceCheck.new(to_hash.merge(HttpClient::Helper.symbolize_keys(incoming)))
25912
+ end
25913
+
25914
+ def to_hash
25915
+ {
25916
+ :display => display.to_hash,
25917
+ :final => final.to_hash
25918
+ }
25919
+ end
25920
+
25921
+ end
25922
+
25923
+ # Represents a top-level price detail, e.g. 'Subtotal' or 'VAT'.
25924
+ class PriceDetail
25925
+
25926
+ attr_reader :key, :components, :amount, :label, :name
25927
+
25928
+ def initialize(incoming={})
25929
+ opts = HttpClient::Helper.symbolize_keys(incoming)
25930
+ HttpClient::Preconditions.require_keys(opts, [:key, :components, :amount, :label], 'PriceDetail')
25931
+ @key = (x = opts.delete(:key); x.is_a?(::Io::Flow::V0::Models::PriceDetailKey) ? x : ::Io::Flow::V0::Models::PriceDetailKey.apply(x))
25932
+ @components = HttpClient::Preconditions.assert_class('components', opts.delete(:components), Array).map { |v| (x = v; x.is_a?(::Io::Flow::V0::Models::PriceDetailComponent) ? x : ::Io::Flow::V0::Models::PriceDetailComponent.new(x)) }
25933
+ @amount = HttpClient::Preconditions.assert_class('amount', HttpClient::Helper.to_big_decimal(opts.delete(:amount)), BigDecimal)
25934
+ @label = HttpClient::Preconditions.assert_class('label', opts.delete(:label), String)
25935
+ @name = (x = opts.delete(:name); x.nil? ? nil : HttpClient::Preconditions.assert_class('name', x, String))
25936
+ end
25937
+
25938
+ def to_json
25939
+ JSON.dump(to_hash)
25940
+ end
25941
+
25942
+ def copy(incoming={})
25943
+ PriceDetail.new(to_hash.merge(HttpClient::Helper.symbolize_keys(incoming)))
25944
+ end
25945
+
25946
+ def to_hash
25947
+ {
25948
+ :key => key.value,
25949
+ :components => components.map { |o| o.to_hash },
25950
+ :amount => amount,
25951
+ :label => label,
25952
+ :name => name
25953
+ }
25954
+ end
25955
+
25956
+ end
25957
+
25958
+ class PriceDetailComponent
25959
+
25960
+ attr_reader :key, :amount, :label, :name
25961
+
25962
+ def initialize(incoming={})
25963
+ opts = HttpClient::Helper.symbolize_keys(incoming)
25964
+ HttpClient::Preconditions.require_keys(opts, [:key, :amount, :label], 'PriceDetailComponent')
25965
+ @key = (x = opts.delete(:key); x.is_a?(::Io::Flow::V0::Models::PriceDetailComponentKey) ? x : ::Io::Flow::V0::Models::PriceDetailComponentKey.apply(x))
25966
+ @amount = HttpClient::Preconditions.assert_class('amount', HttpClient::Helper.to_big_decimal(opts.delete(:amount)), BigDecimal)
25967
+ @label = HttpClient::Preconditions.assert_class('label', opts.delete(:label), String)
25968
+ @name = (x = opts.delete(:name); x.nil? ? nil : HttpClient::Preconditions.assert_class('name', x, String))
25969
+ end
25970
+
25971
+ def to_json
25972
+ JSON.dump(to_hash)
25973
+ end
25974
+
25975
+ def copy(incoming={})
25976
+ PriceDetailComponent.new(to_hash.merge(HttpClient::Helper.symbolize_keys(incoming)))
25977
+ end
25978
+
25979
+ def to_hash
25980
+ {
25981
+ :key => key.value,
25982
+ :amount => amount,
25983
+ :label => label,
25984
+ :name => name
25985
+ }
25986
+ end
25987
+
25988
+ end
25989
+
25990
+ # Detailed information for the pricing of a given item within an experience.
25991
+ class PriceDetails
25992
+
25993
+ attr_reader :currency, :item_price, :margins, :vat, :duty, :rounding, :price, :total, :adjustment
25994
+
25995
+ def initialize(incoming={})
25996
+ opts = HttpClient::Helper.symbolize_keys(incoming)
25997
+ HttpClient::Preconditions.require_keys(opts, [:currency, :item_price, :margins, :vat, :duty, :rounding, :price, :total], 'PriceDetails')
25998
+ @currency = HttpClient::Preconditions.assert_class('currency', opts.delete(:currency), String)
25999
+ @item_price = (x = opts.delete(:item_price); x.is_a?(::Io::Flow::V0::Models::PriceDetail) ? x : ::Io::Flow::V0::Models::PriceDetail.new(x))
26000
+ @margins = (x = opts.delete(:margins); x.is_a?(::Io::Flow::V0::Models::PriceDetail) ? x : ::Io::Flow::V0::Models::PriceDetail.new(x))
26001
+ @vat = (x = opts.delete(:vat); x.is_a?(::Io::Flow::V0::Models::PriceDetail) ? x : ::Io::Flow::V0::Models::PriceDetail.new(x))
26002
+ @duty = (x = opts.delete(:duty); x.is_a?(::Io::Flow::V0::Models::PriceDetail) ? x : ::Io::Flow::V0::Models::PriceDetail.new(x))
26003
+ @rounding = (x = opts.delete(:rounding); x.is_a?(::Io::Flow::V0::Models::PriceDetail) ? x : ::Io::Flow::V0::Models::PriceDetail.new(x))
26004
+ @price = (x = opts.delete(:price); x.is_a?(::Io::Flow::V0::Models::Price) ? x : ::Io::Flow::V0::Models::Price.new(x))
26005
+ @total = (x = opts.delete(:total); x.is_a?(::Io::Flow::V0::Models::Price) ? x : ::Io::Flow::V0::Models::Price.new(x))
26006
+ @adjustment = (x = opts.delete(:adjustment); x.nil? ? nil : (x = x; x.is_a?(::Io::Flow::V0::Models::PriceDetail) ? x : ::Io::Flow::V0::Models::PriceDetail.new(x)))
26007
+ end
26008
+
26009
+ def to_json
26010
+ JSON.dump(to_hash)
26011
+ end
26012
+
26013
+ def copy(incoming={})
26014
+ PriceDetails.new(to_hash.merge(HttpClient::Helper.symbolize_keys(incoming)))
26015
+ end
26016
+
26017
+ def to_hash
26018
+ {
26019
+ :currency => currency,
26020
+ :item_price => item_price.to_hash,
25163
26021
  :margins => margins.to_hash,
25164
26022
  :vat => vat.to_hash,
25165
26023
  :duty => duty.to_hash,
@@ -27394,6 +28252,34 @@ module Io
27394
28252
 
27395
28253
  end
27396
28254
 
28255
+ class SessionCurrencyFormat
28256
+
28257
+ attr_reader :symbol, :label_formatters
28258
+
28259
+ def initialize(incoming={})
28260
+ opts = HttpClient::Helper.symbolize_keys(incoming)
28261
+ HttpClient::Preconditions.require_keys(opts, [:symbol, :label_formatters], 'SessionCurrencyFormat')
28262
+ @symbol = (x = opts.delete(:symbol); x.is_a?(::Io::Flow::V0::Models::CurrencySymbolFormat) ? x : ::Io::Flow::V0::Models::CurrencySymbolFormat.apply(x))
28263
+ @label_formatters = HttpClient::Preconditions.assert_class('label_formatters', opts.delete(:label_formatters), Array).map { |v| (x = v; x.is_a?(::Io::Flow::V0::Models::CurrencyLabelFormatter) ? x : ::Io::Flow::V0::Models::CurrencyLabelFormatter.apply(x)) }
28264
+ end
28265
+
28266
+ def to_json
28267
+ JSON.dump(to_hash)
28268
+ end
28269
+
28270
+ def copy(incoming={})
28271
+ SessionCurrencyFormat.new(to_hash.merge(HttpClient::Helper.symbolize_keys(incoming)))
28272
+ end
28273
+
28274
+ def to_hash
28275
+ {
28276
+ :symbol => symbol.value,
28277
+ :label_formatters => label_formatters.map { |o| o.value }
28278
+ }
28279
+ end
28280
+
28281
+ end
28282
+
27397
28283
  # Configures session expiration time. We default to 30 minutes to follow Google
27398
28284
  # Analytics
27399
28285
  class SessionExpirationConfig
@@ -27460,6 +28346,32 @@ module Io
27460
28346
 
27461
28347
  end
27462
28348
 
28349
+ class SessionFormat
28350
+
28351
+ attr_reader :currency
28352
+
28353
+ def initialize(incoming={})
28354
+ opts = HttpClient::Helper.symbolize_keys(incoming)
28355
+ HttpClient::Preconditions.require_keys(opts, [:currency], 'SessionFormat')
28356
+ @currency = (x = opts.delete(:currency); x.is_a?(::Io::Flow::V0::Models::SessionCurrencyFormat) ? x : ::Io::Flow::V0::Models::SessionCurrencyFormat.new(x))
28357
+ end
28358
+
28359
+ def to_json
28360
+ JSON.dump(to_hash)
28361
+ end
28362
+
28363
+ def copy(incoming={})
28364
+ SessionFormat.new(to_hash.merge(HttpClient::Helper.symbolize_keys(incoming)))
28365
+ end
28366
+
28367
+ def to_hash
28368
+ {
28369
+ :currency => currency.to_hash
28370
+ }
28371
+ end
28372
+
28373
+ end
28374
+
27463
28375
  # The geolocated information for this session
27464
28376
  class SessionGeo
27465
28377
 
@@ -27620,7 +28532,7 @@ module Io
27620
28532
  # shipper to transport a package from a given origin to destination
27621
28533
  class ShippingLabel
27622
28534
 
27623
- attr_reader :id, :direction, :attributes, :carrier_tracking_number, :carrier_tracking_number_url, :cost, :destination, :flow_tracking_number, :flow_tracking_number_url, :origin, :service, :window, :commercial_invoice, :zpl, :pdf, :png, :order, :package
28535
+ attr_reader :id, :direction, :attributes, :carrier_tracking_number, :carrier_tracking_number_url, :cost, :destination, :flow_tracking_number, :flow_tracking_number_url, :origin, :service, :window, :label, :invoice, :order, :package, :commercial_invoice, :zpl, :pdf, :png
27624
28536
 
27625
28537
  def initialize(incoming={})
27626
28538
  opts = HttpClient::Helper.symbolize_keys(incoming)
@@ -27637,12 +28549,14 @@ module Io
27637
28549
  @origin = (x = opts.delete(:origin); x.is_a?(::Io::Flow::V0::Models::ShippingAddress) ? x : ::Io::Flow::V0::Models::ShippingAddress.new(x))
27638
28550
  @service = (x = opts.delete(:service); x.is_a?(::Io::Flow::V0::Models::ServiceSummary) ? x : ::Io::Flow::V0::Models::ServiceSummary.new(x))
27639
28551
  @window = (x = opts.delete(:window); x.is_a?(::Io::Flow::V0::Models::DatetimeRange) ? x : ::Io::Flow::V0::Models::DatetimeRange.new(x))
28552
+ @label = (x = opts.delete(:label); x.nil? ? nil : (x = x; x.is_a?(::Io::Flow::V0::Models::ShippingLabelDocument) ? x : ::Io::Flow::V0::Models::ShippingLabelDocument.new(x)))
28553
+ @invoice = (x = opts.delete(:invoice); x.nil? ? nil : (x = x; x.is_a?(::Io::Flow::V0::Models::ShippingLabelDocument) ? x : ::Io::Flow::V0::Models::ShippingLabelDocument.new(x)))
28554
+ @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)))
28555
+ @package = (x = opts.delete(:package); x.nil? ? nil : (x = x; x.is_a?(::Io::Flow::V0::Models::ShippingLabelPackage) ? x : ::Io::Flow::V0::Models::ShippingLabelPackage.new(x)))
27640
28556
  @commercial_invoice = (x = opts.delete(:commercial_invoice); x.nil? ? nil : HttpClient::Preconditions.assert_class('commercial_invoice', x, String))
27641
28557
  @zpl = (x = opts.delete(:zpl); x.nil? ? nil : HttpClient::Preconditions.assert_class('zpl', x, String))
27642
28558
  @pdf = (x = opts.delete(:pdf); x.nil? ? nil : HttpClient::Preconditions.assert_class('pdf', x, String))
27643
28559
  @png = (x = opts.delete(:png); x.nil? ? nil : HttpClient::Preconditions.assert_class('png', x, String))
27644
- @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)))
27645
- @package = (x = opts.delete(:package); x.nil? ? nil : (x = x; x.is_a?(::Io::Flow::V0::Models::ShippingLabelPackage) ? x : ::Io::Flow::V0::Models::ShippingLabelPackage.new(x)))
27646
28560
  end
27647
28561
 
27648
28562
  def to_json
@@ -27667,12 +28581,45 @@ module Io
27667
28581
  :origin => origin.to_hash,
27668
28582
  :service => service.to_hash,
27669
28583
  :window => window.to_hash,
28584
+ :label => label.nil? ? nil : label.to_hash,
28585
+ :invoice => invoice.nil? ? nil : invoice.to_hash,
28586
+ :order => order.nil? ? nil : order.to_hash,
28587
+ :package => package.nil? ? nil : package.to_hash,
27670
28588
  :commercial_invoice => commercial_invoice,
27671
28589
  :zpl => zpl,
27672
28590
  :pdf => pdf,
27673
- :png => png,
27674
- :order => order.nil? ? nil : order.to_hash,
27675
- :package => package.nil? ? nil : package.to_hash
28591
+ :png => png
28592
+ }
28593
+ end
28594
+
28595
+ end
28596
+
28597
+ # Output data or downloadable links for shipping label documents such as labels
28598
+ # or commercial invoices
28599
+ class ShippingLabelDocument
28600
+
28601
+ attr_reader :zpl, :pdf, :png
28602
+
28603
+ def initialize(incoming={})
28604
+ opts = HttpClient::Helper.symbolize_keys(incoming)
28605
+ @zpl = (x = opts.delete(:zpl); x.nil? ? nil : HttpClient::Preconditions.assert_class('zpl', x, String))
28606
+ @pdf = (x = opts.delete(:pdf); x.nil? ? nil : HttpClient::Preconditions.assert_class('pdf', x, String))
28607
+ @png = (x = opts.delete(:png); x.nil? ? nil : HttpClient::Preconditions.assert_class('png', x, String))
28608
+ end
28609
+
28610
+ def to_json
28611
+ JSON.dump(to_hash)
28612
+ end
28613
+
28614
+ def copy(incoming={})
28615
+ ShippingLabelDocument.new(to_hash.merge(HttpClient::Helper.symbolize_keys(incoming)))
28616
+ end
28617
+
28618
+ def to_hash
28619
+ {
28620
+ :zpl => zpl,
28621
+ :pdf => pdf,
28622
+ :png => png
27676
28623
  }
27677
28624
  end
27678
28625
 
@@ -27721,13 +28668,14 @@ module Io
27721
28668
  # Describes a package to be shipped, including dimensions and items included
27722
28669
  class ShippingLabelPackage
27723
28670
 
27724
- attr_reader :dimensions, :items
28671
+ attr_reader :dimensions, :items, :reference_number
27725
28672
 
27726
28673
  def initialize(incoming={})
27727
28674
  opts = HttpClient::Helper.symbolize_keys(incoming)
27728
28675
  HttpClient::Preconditions.require_keys(opts, [:dimensions, :items], 'ShippingLabelPackage')
27729
28676
  @dimensions = (x = opts.delete(:dimensions); x.is_a?(::Io::Flow::V0::Models::Dimension) ? x : ::Io::Flow::V0::Models::Dimension.new(x))
27730
28677
  @items = HttpClient::Preconditions.assert_class('items', opts.delete(:items), Array).map { |v| (x = v; x.is_a?(::Io::Flow::V0::Models::LineItemForm) ? x : ::Io::Flow::V0::Models::LineItemForm.new(x)) }
28678
+ @reference_number = (x = opts.delete(:reference_number); x.nil? ? nil : HttpClient::Preconditions.assert_class('reference_number', x, String))
27731
28679
  end
27732
28680
 
27733
28681
  def to_json
@@ -27741,7 +28689,8 @@ module Io
27741
28689
  def to_hash
27742
28690
  {
27743
28691
  :dimensions => dimensions.to_hash,
27744
- :items => items.map { |o| o.to_hash }
28692
+ :items => items.map { |o| o.to_hash },
28693
+ :reference_number => reference_number
27745
28694
  }
27746
28695
  end
27747
28696
 
@@ -30318,11 +31267,11 @@ module Io
30318
31267
 
30319
31268
  def initialize(incoming={})
30320
31269
  opts = HttpClient::Helper.symbolize_keys(incoming)
30321
- HttpClient::Preconditions.require_keys(opts, [:id, :key, :number, :cvv, :limit, :type, :expiration, :iin, :last4, :name], 'VirtualCard')
31270
+ HttpClient::Preconditions.require_keys(opts, [:id, :key, :limit, :type, :expiration, :iin, :last4, :name], 'VirtualCard')
30322
31271
  @id = HttpClient::Preconditions.assert_class('id', opts.delete(:id), String)
30323
31272
  @key = HttpClient::Preconditions.assert_class('key', opts.delete(:key), String)
30324
- @number = HttpClient::Preconditions.assert_class('number', opts.delete(:number), String)
30325
- @cvv = HttpClient::Preconditions.assert_class('cvv', opts.delete(:cvv), String)
31273
+ @number = (x = opts.delete(:number); x.nil? ? nil : HttpClient::Preconditions.assert_class('number', x, String))
31274
+ @cvv = (x = opts.delete(:cvv); x.nil? ? nil : HttpClient::Preconditions.assert_class('cvv', x, String))
30326
31275
  @limit = (x = opts.delete(:limit); x.is_a?(::Io::Flow::V0::Models::Price) ? x : ::Io::Flow::V0::Models::Price.new(x))
30327
31276
  @type = (x = opts.delete(:type); x.is_a?(::Io::Flow::V0::Models::CardType) ? x : ::Io::Flow::V0::Models::CardType.apply(x))
30328
31277
  @expiration = (x = opts.delete(:expiration); x.is_a?(::Io::Flow::V0::Models::Expiration) ? x : ::Io::Flow::V0::Models::Expiration.new(x))