flowcommerce 0.2.78 → 0.2.79
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/lib/flow_commerce/flow_api_v0_client.rb +616 -205
- metadata +3 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: fcdecf45f008c493b629807d3a1fcc1d2c34cee5b07ad56bb96daa7dfca866b4
|
4
|
+
data.tar.gz: 52ded6ba70753c3bf75a662a0cbd973aaf53d1c318ecf533df46481c7ee3dd1a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8f17f6fd58972e87fcff0fbc9a0383580be2c3281b2859ef1d2a51f9d4eff6486cfd884f3df5453a1c25d6bc09cee24cd830f7142857a444358c50b744818748
|
7
|
+
data.tar.gz: c2ae70244b5fdce759b531fcef03615c0c2d8c6f89534bbe11684679c6e994473f6428394f176ce04222ed52257f45d9f82a03ac7d141a57fe15002c152af6bd
|
@@ -1,6 +1,6 @@
|
|
1
1
|
# Generated by API Builder - https://www.apibuilder.io
|
2
|
-
# Service version: 0.8.
|
3
|
-
# apibuilder 0.14.
|
2
|
+
# Service version: 0.8.74
|
3
|
+
# apibuilder 0.14.93 app.apibuilder.io/flow/api/latest/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.14.
|
29
|
-
VERSION = '0.8.
|
28
|
+
USER_AGENT = 'apibuilder 0.14.93 app.apibuilder.io/flow/api/latest/ruby_client' unless defined?(Constants::USER_AGENT)
|
29
|
+
VERSION = '0.8.74' unless defined?(Constants::VERSION)
|
30
30
|
VERSION_MAJOR = 0 unless defined?(VERSION_MAJOR)
|
31
31
|
|
32
32
|
end
|
@@ -108,6 +108,14 @@ module Io
|
|
108
108
|
@experience_logistics_settings ||= ::Io::Flow::V0::Clients::ExperienceLogisticsSettings.new(self)
|
109
109
|
end
|
110
110
|
|
111
|
+
def experience_price_conversions
|
112
|
+
@experience_price_conversions ||= ::Io::Flow::V0::Clients::ExperiencePriceConversions.new(self)
|
113
|
+
end
|
114
|
+
|
115
|
+
def experience_price_facet_conversions
|
116
|
+
@experience_price_facet_conversions ||= ::Io::Flow::V0::Clients::ExperiencePriceFacetConversions.new(self)
|
117
|
+
end
|
118
|
+
|
111
119
|
def items
|
112
120
|
@items ||= ::Io::Flow::V0::Clients::Items.new(self)
|
113
121
|
end
|
@@ -428,6 +436,10 @@ module Io
|
|
428
436
|
@consumer_invoice_documents ||= ::Io::Flow::V0::Clients::ConsumerInvoiceDocuments.new(self)
|
429
437
|
end
|
430
438
|
|
439
|
+
def country_pickers
|
440
|
+
@country_pickers ||= ::Io::Flow::V0::Clients::CountryPickers.new(self)
|
441
|
+
end
|
442
|
+
|
431
443
|
def credit_memos
|
432
444
|
@credit_memos ||= ::Io::Flow::V0::Clients::CreditMemos.new(self)
|
433
445
|
end
|
@@ -512,6 +524,10 @@ module Io
|
|
512
524
|
@invitations ||= ::Io::Flow::V0::Clients::Invitations.new(self)
|
513
525
|
end
|
514
526
|
|
527
|
+
def price_rules
|
528
|
+
@price_rules ||= ::Io::Flow::V0::Clients::PriceRules.new(self)
|
529
|
+
end
|
530
|
+
|
515
531
|
def item_query_suggestions
|
516
532
|
@item_query_suggestions ||= ::Io::Flow::V0::Clients::ItemQuerySuggestions.new(self)
|
517
533
|
end
|
@@ -1415,6 +1431,55 @@ module Io
|
|
1415
1431
|
|
1416
1432
|
end
|
1417
1433
|
|
1434
|
+
class ExperiencePriceConversions
|
1435
|
+
|
1436
|
+
def initialize(client)
|
1437
|
+
@client = HttpClient::Preconditions.assert_class('client', client, ::Io::Flow::V0::Client)
|
1438
|
+
end
|
1439
|
+
|
1440
|
+
# Converts one or more prices from one currency to another
|
1441
|
+
def get(organization, experience_key, incoming={})
|
1442
|
+
HttpClient::Preconditions.assert_class('organization', organization, String)
|
1443
|
+
HttpClient::Preconditions.assert_class('experience_key', experience_key, String)
|
1444
|
+
opts = HttpClient::Helper.symbolize_keys(incoming)
|
1445
|
+
query = {
|
1446
|
+
:base => (x = opts.delete(:base); x.nil? ? nil : HttpClient::Preconditions.assert_class('base', x, String)),
|
1447
|
+
:local => (x = opts.delete(:local); x.nil? ? nil : HttpClient::Preconditions.assert_class('local', x, String)),
|
1448
|
+
:amount => (x = opts.delete(:amount); x.nil? ? nil : HttpClient::Preconditions.assert_class('amount', x, Array).map { |v| HttpClient::Preconditions.assert_class('amount', v, String) })
|
1449
|
+
}.delete_if { |k, v| v.nil? }
|
1450
|
+
r = @client.request("/#{CGI.escape(organization)}/experiences/#{CGI.escape(experience_key)}/conversions/price").with_query(query).get
|
1451
|
+
::Io::Flow::V0::Models::ExperiencePriceConversionResponse.new(r)
|
1452
|
+
end
|
1453
|
+
|
1454
|
+
end
|
1455
|
+
|
1456
|
+
class ExperiencePriceFacetConversions
|
1457
|
+
|
1458
|
+
def initialize(client)
|
1459
|
+
@client = HttpClient::Preconditions.assert_class('client', client, ::Io::Flow::V0::Client)
|
1460
|
+
end
|
1461
|
+
|
1462
|
+
# Converts one or more price values into local currency, rounding for display
|
1463
|
+
# in price facets. A common use case is to say show a price filter to
|
1464
|
+
# consumers (e.g. 10-20 USD) and want to display that in local currency (15-30
|
1465
|
+
# CAD). To do so, send the values '10' and '20' to this API which will return
|
1466
|
+
# the rounded local currency facet values
|
1467
|
+
def get(organization, experience_key, incoming={})
|
1468
|
+
HttpClient::Preconditions.assert_class('organization', organization, String)
|
1469
|
+
HttpClient::Preconditions.assert_class('experience_key', experience_key, String)
|
1470
|
+
opts = HttpClient::Helper.symbolize_keys(incoming)
|
1471
|
+
query = {
|
1472
|
+
:base => (x = opts.delete(:base); x.nil? ? nil : HttpClient::Preconditions.assert_class('base', x, String)),
|
1473
|
+
:local => (x = opts.delete(:local); x.nil? ? nil : HttpClient::Preconditions.assert_class('local', x, String)),
|
1474
|
+
:min => (x = opts.delete(:min); x.nil? ? nil : HttpClient::Preconditions.assert_class('min', x, Array).map { |v| HttpClient::Preconditions.assert_class('min', v, String) }),
|
1475
|
+
:max => (x = opts.delete(:max); x.nil? ? nil : HttpClient::Preconditions.assert_class('max', x, Array).map { |v| HttpClient::Preconditions.assert_class('max', v, String) })
|
1476
|
+
}.delete_if { |k, v| v.nil? }
|
1477
|
+
r = @client.request("/#{CGI.escape(organization)}/experiences/#{CGI.escape(experience_key)}/conversions/price/facet").with_query(query).get
|
1478
|
+
::Io::Flow::V0::Models::ExperiencePriceFacetConversionResponse.new(r)
|
1479
|
+
end
|
1480
|
+
|
1481
|
+
end
|
1482
|
+
|
1418
1483
|
class Items
|
1419
1484
|
|
1420
1485
|
def initialize(client)
|
@@ -1707,16 +1772,6 @@ module Io
|
|
1707
1772
|
::Io::Flow::V0::Models::Order.new(r)
|
1708
1773
|
end
|
1709
1774
|
|
1710
|
-
# Creates an installment plan for this order, automatically associating to
|
1711
|
-
# this order.
|
1712
|
-
def post_installment_and_plan_and_authorizations_by_number(organization, number, installment_plan_payment_form)
|
1713
|
-
HttpClient::Preconditions.assert_class('organization', organization, String)
|
1714
|
-
HttpClient::Preconditions.assert_class('number', number, String)
|
1715
|
-
(x = installment_plan_payment_form; x.is_a?(::Io::Flow::V0::Models::InstallmentPlanPaymentForm) ? x : ::Io::Flow::V0::Models::InstallmentPlanPaymentForm.new(x))
|
1716
|
-
r = @client.request("/#{CGI.escape(organization)}/orders/#{CGI.escape(number)}/installment/plan/authorizations").with_json(installment_plan_payment_form.to_json).post
|
1717
|
-
::Io::Flow::V0::Models::Order.new(r)
|
1718
|
-
end
|
1719
|
-
|
1720
1775
|
def put_inventory_and_reservations_by_number(organization, number)
|
1721
1776
|
HttpClient::Preconditions.assert_class('organization', organization, String)
|
1722
1777
|
HttpClient::Preconditions.assert_class('number', number, String)
|
@@ -2020,7 +2075,7 @@ module Io
|
|
2020
2075
|
: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) }),
|
2021
2076
|
:limit => HttpClient::Preconditions.assert_class('limit', (x = opts.delete(:limit); x.nil? ? 25 : x), Integer),
|
2022
2077
|
:offset => HttpClient::Preconditions.assert_class('offset', (x = opts.delete(:offset); x.nil? ? 0 : x), Integer),
|
2023
|
-
:sort => HttpClient::Preconditions.assert_class('sort', (x = opts.delete(:sort); x.nil? ? "
|
2078
|
+
:sort => HttpClient::Preconditions.assert_class('sort', (x = opts.delete(:sort); x.nil? ? "name" : x), String)
|
2024
2079
|
}.delete_if { |k, v| v.nil? }
|
2025
2080
|
r = @client.request("/#{CGI.escape(organization)}/order-identifiers").with_query(query).get
|
2026
2081
|
r.map { |x| ::Io::Flow::V0::Models::OrderIdentifier.new(x) }
|
@@ -3083,6 +3138,16 @@ module Io
|
|
3083
3138
|
nil
|
3084
3139
|
end
|
3085
3140
|
|
3141
|
+
# Accepts the data from the underlying processor to, for example, record the
|
3142
|
+
# 3DSecure results
|
3143
|
+
def post_details_by_key(organization, key, value)
|
3144
|
+
HttpClient::Preconditions.assert_class('organization', organization, String)
|
3145
|
+
HttpClient::Preconditions.assert_class('key', key, String)
|
3146
|
+
HttpClient::Preconditions.assert_class('value', value, BasicObject)
|
3147
|
+
r = @client.request("/#{CGI.escape(organization)}/authorizations/#{CGI.escape(key)}/details").with_body(value).post
|
3148
|
+
::Io::Flow::V0::Models::Authorization.from_json(r)
|
3149
|
+
end
|
3150
|
+
|
3086
3151
|
end
|
3087
3152
|
|
3088
3153
|
class Captures
|
@@ -3148,7 +3213,7 @@ module Io
|
|
3148
3213
|
:identifier => (x = opts.delete(:identifier); x.nil? ? nil : HttpClient::Preconditions.assert_class('identifier', x, String)),
|
3149
3214
|
:limit => HttpClient::Preconditions.assert_class('limit', (x = opts.delete(:limit); x.nil? ? 25 : x), Integer),
|
3150
3215
|
:offset => HttpClient::Preconditions.assert_class('offset', (x = opts.delete(:offset); x.nil? ? 0 : x), Integer),
|
3151
|
-
:sort => HttpClient::Preconditions.assert_class('sort', (x = opts.delete(:sort); x.nil? ? "
|
3216
|
+
:sort => HttpClient::Preconditions.assert_class('sort', (x = opts.delete(:sort); x.nil? ? "name" : x), String)
|
3152
3217
|
}.delete_if { |k, v| v.nil? }
|
3153
3218
|
r = @client.request("/#{CGI.escape(organization)}/captures/#{CGI.escape(key)}/identifiers").with_query(query).get
|
3154
3219
|
r.map { |x| ::Io::Flow::V0::Models::CaptureIdentifier.new(x) }
|
@@ -3482,7 +3547,7 @@ module Io
|
|
3482
3547
|
:identifier => (x = opts.delete(:identifier); x.nil? ? nil : HttpClient::Preconditions.assert_class('identifier', x, String)),
|
3483
3548
|
:limit => HttpClient::Preconditions.assert_class('limit', (x = opts.delete(:limit); x.nil? ? 25 : x), Integer),
|
3484
3549
|
:offset => HttpClient::Preconditions.assert_class('offset', (x = opts.delete(:offset); x.nil? ? 0 : x), Integer),
|
3485
|
-
:sort => HttpClient::Preconditions.assert_class('sort', (x = opts.delete(:sort); x.nil? ? "
|
3550
|
+
:sort => HttpClient::Preconditions.assert_class('sort', (x = opts.delete(:sort); x.nil? ? "name" : x), String)
|
3486
3551
|
}.delete_if { |k, v| v.nil? }
|
3487
3552
|
r = @client.request("/#{CGI.escape(organization)}/refunds/#{CGI.escape(key)}/identifiers").with_query(query).get
|
3488
3553
|
r.map { |x| ::Io::Flow::V0::Models::RefundIdentifier.new(x) }
|
@@ -5523,6 +5588,27 @@ module Io
|
|
5523
5588
|
|
5524
5589
|
end
|
5525
5590
|
|
5591
|
+
class CountryPickers
|
5592
|
+
|
5593
|
+
def initialize(client)
|
5594
|
+
@client = HttpClient::Preconditions.assert_class('client', client, ::Io::Flow::V0::Client)
|
5595
|
+
end
|
5596
|
+
|
5597
|
+
def get(organization_id)
|
5598
|
+
HttpClient::Preconditions.assert_class('organization_id', organization_id, String)
|
5599
|
+
r = @client.request("/organizations/#{CGI.escape(organization_id)}/country/picker").get
|
5600
|
+
::Io::Flow::V0::Models::CountryPicker.new(r)
|
5601
|
+
end
|
5602
|
+
|
5603
|
+
def put(organization_id, country_picker_form)
|
5604
|
+
HttpClient::Preconditions.assert_class('organization_id', organization_id, String)
|
5605
|
+
(x = country_picker_form; x.is_a?(::Io::Flow::V0::Models::CountryPickerForm) ? x : ::Io::Flow::V0::Models::CountryPickerForm.new(x))
|
5606
|
+
r = @client.request("/organizations/#{CGI.escape(organization_id)}/country/picker").with_json(country_picker_form.to_json).put
|
5607
|
+
::Io::Flow::V0::Models::CountryPicker.new(r)
|
5608
|
+
end
|
5609
|
+
|
5610
|
+
end
|
5611
|
+
|
5526
5612
|
class CreditMemos
|
5527
5613
|
|
5528
5614
|
def initialize(client)
|
@@ -5795,6 +5881,13 @@ module Io
|
|
5795
5881
|
::Io::Flow::V0::Models::EcommercePlatform.new(r)
|
5796
5882
|
end
|
5797
5883
|
|
5884
|
+
def put(organization_id, ecommerce_platform_form)
|
5885
|
+
HttpClient::Preconditions.assert_class('organization_id', organization_id, String)
|
5886
|
+
(x = ecommerce_platform_form; x.is_a?(::Io::Flow::V0::Models::EcommercePlatformForm) ? x : ::Io::Flow::V0::Models::EcommercePlatformForm.new(x))
|
5887
|
+
r = @client.request("/organizations/#{CGI.escape(organization_id)}/ecommerce/platform").with_json(ecommerce_platform_form.to_json).put
|
5888
|
+
::Io::Flow::V0::Models::EcommercePlatform.new(r)
|
5889
|
+
end
|
5890
|
+
|
5798
5891
|
end
|
5799
5892
|
|
5800
5893
|
class EmailVerifications
|
@@ -6313,6 +6406,21 @@ module Io
|
|
6313
6406
|
|
6314
6407
|
end
|
6315
6408
|
|
6409
|
+
class PriceRules
|
6410
|
+
|
6411
|
+
def initialize(client)
|
6412
|
+
@client = HttpClient::Preconditions.assert_class('client', client, ::Io::Flow::V0::Client)
|
6413
|
+
end
|
6414
|
+
|
6415
|
+
def get(organization, code)
|
6416
|
+
HttpClient::Preconditions.assert_class('organization', organization, String)
|
6417
|
+
HttpClient::Preconditions.assert_class('code', code, String)
|
6418
|
+
r = @client.request("/#{CGI.escape(organization)}/shopify/price/rules/discount/#{CGI.escape(code)}").get
|
6419
|
+
::Io::Flow::Shopify::External::V0::Models::PriceRule.new(r)
|
6420
|
+
end
|
6421
|
+
|
6422
|
+
end
|
6423
|
+
|
6316
6424
|
class ItemQuerySuggestions
|
6317
6425
|
|
6318
6426
|
def initialize(client)
|
@@ -9472,11 +9580,12 @@ module Io
|
|
9472
9580
|
FLOW_ADDON_ROLE = 'flow_addon_role' unless defined?(FLOW_ADDON_ROLE)
|
9473
9581
|
end
|
9474
9582
|
|
9475
|
-
attr_reader :
|
9583
|
+
attr_reader :discriminator
|
9476
9584
|
|
9477
9585
|
def initialize(incoming={})
|
9478
9586
|
opts = HttpClient::Helper.symbolize_keys(incoming)
|
9479
|
-
|
9587
|
+
HttpClient::Preconditions.require_keys(opts, [:discriminator], 'FlowRole')
|
9588
|
+
@discriminator = HttpClient::Preconditions.assert_class('discriminator', opts.delete(:discriminator), String)
|
9480
9589
|
end
|
9481
9590
|
|
9482
9591
|
def subtype_to_hash
|
@@ -9484,18 +9593,20 @@ module Io
|
|
9484
9593
|
end
|
9485
9594
|
|
9486
9595
|
def to_hash
|
9487
|
-
|
9596
|
+
subtype_to_hash.merge(:discriminator => @discriminator)
|
9488
9597
|
end
|
9489
9598
|
|
9490
9599
|
def FlowRole.from_json(hash)
|
9491
9600
|
HttpClient::Preconditions.assert_class('hash', hash, Hash)
|
9492
|
-
hash.
|
9493
|
-
|
9494
|
-
|
9495
|
-
|
9496
|
-
|
9497
|
-
|
9498
|
-
|
9601
|
+
discriminator = HttpClient::Helper.symbolize_keys(hash)[:discriminator].to_s.strip
|
9602
|
+
if discriminator.empty?
|
9603
|
+
raise "Union type[flow_role] requires a field named 'discriminator'"
|
9604
|
+
end
|
9605
|
+
case discriminator
|
9606
|
+
when Types::FLOW_USER_ROLE; FlowUserRole.new(hash)
|
9607
|
+
when Types::FLOW_ADDON_ROLE; FlowAddonRole.new(hash)
|
9608
|
+
else FlowRoleUndefinedType.new(:discriminator => discriminator)
|
9609
|
+
end
|
9499
9610
|
end
|
9500
9611
|
|
9501
9612
|
end
|
@@ -9505,9 +9616,9 @@ module Io
|
|
9505
9616
|
attr_reader :name
|
9506
9617
|
|
9507
9618
|
def initialize(incoming={})
|
9508
|
-
super(:
|
9619
|
+
super(:discriminator => 'undefined_type')
|
9509
9620
|
opts = HttpClient::Helper.symbolize_keys(incoming)
|
9510
|
-
@name = HttpClient::Preconditions.assert_class('name', opts.delete(:
|
9621
|
+
@name = HttpClient::Preconditions.assert_class('name', opts.delete(:discriminator), String)
|
9511
9622
|
end
|
9512
9623
|
|
9513
9624
|
def subtype_to_hash
|
@@ -13222,6 +13333,52 @@ module Io
|
|
13222
13333
|
|
13223
13334
|
end
|
13224
13335
|
|
13336
|
+
class CountryPickerSource
|
13337
|
+
|
13338
|
+
attr_reader :value
|
13339
|
+
|
13340
|
+
def initialize(value)
|
13341
|
+
@value = HttpClient::Preconditions.assert_class('value', value, String)
|
13342
|
+
end
|
13343
|
+
|
13344
|
+
# Returns the instance of CountryPickerSource for this value, creating a new instance for an unknown value
|
13345
|
+
def CountryPickerSource.apply(value)
|
13346
|
+
if value.instance_of?(CountryPickerSource)
|
13347
|
+
value
|
13348
|
+
else
|
13349
|
+
HttpClient::Preconditions.assert_class_or_nil('value', value, String)
|
13350
|
+
value.nil? ? nil : (from_string(value) || CountryPickerSource.new(value))
|
13351
|
+
end
|
13352
|
+
end
|
13353
|
+
|
13354
|
+
# Returns the instance of CountryPickerSource for this value, or nil if not found
|
13355
|
+
def CountryPickerSource.from_string(value)
|
13356
|
+
HttpClient::Preconditions.assert_class('value', value, String)
|
13357
|
+
CountryPickerSource.ALL.find { |v| v.value == value }
|
13358
|
+
end
|
13359
|
+
|
13360
|
+
def CountryPickerSource.ALL
|
13361
|
+
@@all ||= [CountryPickerSource.experience, CountryPickerSource.destination]
|
13362
|
+
end
|
13363
|
+
|
13364
|
+
# Indicates we should build the list of countries based on each active
|
13365
|
+
# experience country
|
13366
|
+
def CountryPickerSource.experience
|
13367
|
+
@@_experience ||= CountryPickerSource.new('experience')
|
13368
|
+
end
|
13369
|
+
|
13370
|
+
# Indicates we should build the list of countries based on all countries to
|
13371
|
+
# which you have a rate card (ie. all valid destination countries)
|
13372
|
+
def CountryPickerSource.destination
|
13373
|
+
@@_destination ||= CountryPickerSource.new('destination')
|
13374
|
+
end
|
13375
|
+
|
13376
|
+
def to_hash
|
13377
|
+
value
|
13378
|
+
end
|
13379
|
+
|
13380
|
+
end
|
13381
|
+
|
13225
13382
|
class CreditPaymentErrorCode
|
13226
13383
|
|
13227
13384
|
attr_reader :value
|
@@ -15063,7 +15220,7 @@ module Io
|
|
15063
15220
|
attr_reader :value
|
15064
15221
|
|
15065
15222
|
def initialize(value)
|
15066
|
-
super(:name => FlowRole::Types::FLOW_ADDON_ROLE, :
|
15223
|
+
super(:name => FlowRole::Types::FLOW_ADDON_ROLE, :discriminator => 'flow_addon_role')
|
15067
15224
|
@value = HttpClient::Preconditions.assert_class('value', value, String)
|
15068
15225
|
end
|
15069
15226
|
|
@@ -15147,7 +15304,7 @@ module Io
|
|
15147
15304
|
attr_reader :value
|
15148
15305
|
|
15149
15306
|
def initialize(value)
|
15150
|
-
super(:name => FlowRole::Types::FLOW_USER_ROLE, :
|
15307
|
+
super(:name => FlowRole::Types::FLOW_USER_ROLE, :discriminator => 'flow_user_role')
|
15151
15308
|
@value = HttpClient::Preconditions.assert_class('value', value, String)
|
15152
15309
|
end
|
15153
15310
|
|
@@ -16015,56 +16172,6 @@ module Io
|
|
16015
16172
|
|
16016
16173
|
end
|
16017
16174
|
|
16018
|
-
class InstallmentPlanPaymentErrorCode
|
16019
|
-
|
16020
|
-
attr_reader :value
|
16021
|
-
|
16022
|
-
def initialize(value)
|
16023
|
-
@value = HttpClient::Preconditions.assert_class('value', value, String)
|
16024
|
-
end
|
16025
|
-
|
16026
|
-
# Returns the instance of InstallmentPlanPaymentErrorCode for this value, creating a new instance for an unknown value
|
16027
|
-
def InstallmentPlanPaymentErrorCode.apply(value)
|
16028
|
-
if value.instance_of?(InstallmentPlanPaymentErrorCode)
|
16029
|
-
value
|
16030
|
-
else
|
16031
|
-
HttpClient::Preconditions.assert_class_or_nil('value', value, String)
|
16032
|
-
value.nil? ? nil : (from_string(value) || InstallmentPlanPaymentErrorCode.new(value))
|
16033
|
-
end
|
16034
|
-
end
|
16035
|
-
|
16036
|
-
# Returns the instance of InstallmentPlanPaymentErrorCode for this value, or nil if not found
|
16037
|
-
def InstallmentPlanPaymentErrorCode.from_string(value)
|
16038
|
-
HttpClient::Preconditions.assert_class('value', value, String)
|
16039
|
-
InstallmentPlanPaymentErrorCode.ALL.find { |v| v.value == value }
|
16040
|
-
end
|
16041
|
-
|
16042
|
-
def InstallmentPlanPaymentErrorCode.ALL
|
16043
|
-
@@all ||= [InstallmentPlanPaymentErrorCode.invalid_authorization, InstallmentPlanPaymentErrorCode.invalid_authorization_amount, InstallmentPlanPaymentErrorCode.invalid_installment_plan]
|
16044
|
-
end
|
16045
|
-
|
16046
|
-
# Indicates the specified authorization key does not exist
|
16047
|
-
def InstallmentPlanPaymentErrorCode.invalid_authorization
|
16048
|
-
@@_invalid_authorization ||= InstallmentPlanPaymentErrorCode.new('invalid_authorization')
|
16049
|
-
end
|
16050
|
-
|
16051
|
-
# Indicates the specified authorization amount does not match the first
|
16052
|
-
# installment in the plan
|
16053
|
-
def InstallmentPlanPaymentErrorCode.invalid_authorization_amount
|
16054
|
-
@@_invalid_authorization_amount ||= InstallmentPlanPaymentErrorCode.new('invalid_authorization_amount')
|
16055
|
-
end
|
16056
|
-
|
16057
|
-
# Indicates the specified installment plan does not exist
|
16058
|
-
def InstallmentPlanPaymentErrorCode.invalid_installment_plan
|
16059
|
-
@@_invalid_installment_plan ||= InstallmentPlanPaymentErrorCode.new('invalid_installment_plan')
|
16060
|
-
end
|
16061
|
-
|
16062
|
-
def to_hash
|
16063
|
-
value
|
16064
|
-
end
|
16065
|
-
|
16066
|
-
end
|
16067
|
-
|
16068
16175
|
class InventoryStatus
|
16069
16176
|
|
16070
16177
|
attr_reader :value
|
@@ -17040,7 +17147,8 @@ module Io
|
|
17040
17147
|
# An installment plan payment represents that the user has elected an
|
17041
17148
|
# installment plan to pay for this order. For the purposes of the order, the
|
17042
17149
|
# balance will reflect fully paid for the total value of the installment plan,
|
17043
|
-
# even though individual installments may be created in the future.
|
17150
|
+
# even though individual installments may be created in the future. Note this
|
17151
|
+
# feature was deprecated in early 2020.
|
17044
17152
|
def OrderPaymentType.installment_plan
|
17045
17153
|
@@_installment_plan ||= OrderPaymentType.new('installment_plan')
|
17046
17154
|
end
|
@@ -17345,6 +17453,50 @@ module Io
|
|
17345
17453
|
|
17346
17454
|
end
|
17347
17455
|
|
17456
|
+
class OrderStorage
|
17457
|
+
|
17458
|
+
attr_reader :value
|
17459
|
+
|
17460
|
+
def initialize(value)
|
17461
|
+
@value = HttpClient::Preconditions.assert_class('value', value, String)
|
17462
|
+
end
|
17463
|
+
|
17464
|
+
# Returns the instance of OrderStorage for this value, creating a new instance for an unknown value
|
17465
|
+
def OrderStorage.apply(value)
|
17466
|
+
if value.instance_of?(OrderStorage)
|
17467
|
+
value
|
17468
|
+
else
|
17469
|
+
HttpClient::Preconditions.assert_class_or_nil('value', value, String)
|
17470
|
+
value.nil? ? nil : (from_string(value) || OrderStorage.new(value))
|
17471
|
+
end
|
17472
|
+
end
|
17473
|
+
|
17474
|
+
# Returns the instance of OrderStorage for this value, or nil if not found
|
17475
|
+
def OrderStorage.from_string(value)
|
17476
|
+
HttpClient::Preconditions.assert_class('value', value, String)
|
17477
|
+
OrderStorage.ALL.find { |v| v.value == value }
|
17478
|
+
end
|
17479
|
+
|
17480
|
+
def OrderStorage.ALL
|
17481
|
+
@@all ||= [OrderStorage.do_not_persist, OrderStorage.persist]
|
17482
|
+
end
|
17483
|
+
|
17484
|
+
# Indicates to not persist the order.
|
17485
|
+
def OrderStorage.do_not_persist
|
17486
|
+
@@_do_not_persist ||= OrderStorage.new('do_not_persist')
|
17487
|
+
end
|
17488
|
+
|
17489
|
+
# Indicates to persist the order.
|
17490
|
+
def OrderStorage.persist
|
17491
|
+
@@_persist ||= OrderStorage.new('persist')
|
17492
|
+
end
|
17493
|
+
|
17494
|
+
def to_hash
|
17495
|
+
value
|
17496
|
+
end
|
17497
|
+
|
17498
|
+
end
|
17499
|
+
|
17348
17500
|
class OrganizationPaymentMethodTag < PaymentMethodTag
|
17349
17501
|
|
17350
17502
|
attr_reader :value
|
@@ -18004,6 +18156,48 @@ module Io
|
|
18004
18156
|
|
18005
18157
|
end
|
18006
18158
|
|
18159
|
+
class PriceFacetBoundary
|
18160
|
+
|
18161
|
+
attr_reader :value
|
18162
|
+
|
18163
|
+
def initialize(value)
|
18164
|
+
@value = HttpClient::Preconditions.assert_class('value', value, String)
|
18165
|
+
end
|
18166
|
+
|
18167
|
+
# Returns the instance of PriceFacetBoundary for this value, creating a new instance for an unknown value
|
18168
|
+
def PriceFacetBoundary.apply(value)
|
18169
|
+
if value.instance_of?(PriceFacetBoundary)
|
18170
|
+
value
|
18171
|
+
else
|
18172
|
+
HttpClient::Preconditions.assert_class_or_nil('value', value, String)
|
18173
|
+
value.nil? ? nil : (from_string(value) || PriceFacetBoundary.new(value))
|
18174
|
+
end
|
18175
|
+
end
|
18176
|
+
|
18177
|
+
# Returns the instance of PriceFacetBoundary for this value, or nil if not found
|
18178
|
+
def PriceFacetBoundary.from_string(value)
|
18179
|
+
HttpClient::Preconditions.assert_class('value', value, String)
|
18180
|
+
PriceFacetBoundary.ALL.find { |v| v.value == value }
|
18181
|
+
end
|
18182
|
+
|
18183
|
+
def PriceFacetBoundary.ALL
|
18184
|
+
@@all ||= [PriceFacetBoundary.min, PriceFacetBoundary.max]
|
18185
|
+
end
|
18186
|
+
|
18187
|
+
def PriceFacetBoundary.min
|
18188
|
+
@@_min ||= PriceFacetBoundary.new('min')
|
18189
|
+
end
|
18190
|
+
|
18191
|
+
def PriceFacetBoundary.max
|
18192
|
+
@@_max ||= PriceFacetBoundary.new('max')
|
18193
|
+
end
|
18194
|
+
|
18195
|
+
def to_hash
|
18196
|
+
value
|
18197
|
+
end
|
18198
|
+
|
18199
|
+
end
|
18200
|
+
|
18007
18201
|
class PricingLevySetting
|
18008
18202
|
|
18009
18203
|
attr_reader :value
|
@@ -22956,13 +23150,14 @@ module Io
|
|
22956
23150
|
|
22957
23151
|
class CaptureIdentifier
|
22958
23152
|
|
22959
|
-
attr_reader :id, :capture, :identifier, :primary
|
23153
|
+
attr_reader :id, :capture, :name, :identifier, :primary
|
22960
23154
|
|
22961
23155
|
def initialize(incoming={})
|
22962
23156
|
opts = HttpClient::Helper.symbolize_keys(incoming)
|
22963
|
-
HttpClient::Preconditions.require_keys(opts, [:id, :capture, :identifier, :primary], 'CaptureIdentifier')
|
23157
|
+
HttpClient::Preconditions.require_keys(opts, [:id, :capture, :name, :identifier, :primary], 'CaptureIdentifier')
|
22964
23158
|
@id = HttpClient::Preconditions.assert_class('id', opts.delete(:id), String)
|
22965
23159
|
@capture = (x = opts.delete(:capture); x.is_a?(::Io::Flow::V0::Models::CaptureReference) ? x : ::Io::Flow::V0::Models::CaptureReference.new(x))
|
23160
|
+
@name = HttpClient::Preconditions.assert_class('name', opts.delete(:name), String)
|
22966
23161
|
@identifier = HttpClient::Preconditions.assert_class('identifier', opts.delete(:identifier), String)
|
22967
23162
|
@primary = HttpClient::Preconditions.assert_boolean('primary', opts.delete(:primary))
|
22968
23163
|
end
|
@@ -22979,6 +23174,7 @@ module Io
|
|
22979
23174
|
{
|
22980
23175
|
:id => id,
|
22981
23176
|
:capture => capture.to_hash,
|
23177
|
+
:name => name,
|
22982
23178
|
:identifier => identifier,
|
22983
23179
|
:primary => primary
|
22984
23180
|
}
|
@@ -25972,6 +26168,60 @@ module Io
|
|
25972
26168
|
|
25973
26169
|
end
|
25974
26170
|
|
26171
|
+
# The Country Picker manages the configuration of your country picker.
|
26172
|
+
class CountryPicker
|
26173
|
+
|
26174
|
+
attr_reader :id, :source
|
26175
|
+
|
26176
|
+
def initialize(incoming={})
|
26177
|
+
opts = HttpClient::Helper.symbolize_keys(incoming)
|
26178
|
+
HttpClient::Preconditions.require_keys(opts, [:id, :source], 'CountryPicker')
|
26179
|
+
@id = HttpClient::Preconditions.assert_class('id', opts.delete(:id), String)
|
26180
|
+
@source = (x = opts.delete(:source); x.is_a?(::Io::Flow::V0::Models::CountryPickerSource) ? x : ::Io::Flow::V0::Models::CountryPickerSource.apply(x))
|
26181
|
+
end
|
26182
|
+
|
26183
|
+
def to_json
|
26184
|
+
JSON.dump(to_hash)
|
26185
|
+
end
|
26186
|
+
|
26187
|
+
def copy(incoming={})
|
26188
|
+
CountryPicker.new(to_hash.merge(HttpClient::Helper.symbolize_keys(incoming)))
|
26189
|
+
end
|
26190
|
+
|
26191
|
+
def to_hash
|
26192
|
+
{
|
26193
|
+
:id => id,
|
26194
|
+
:source => source.value
|
26195
|
+
}
|
26196
|
+
end
|
26197
|
+
|
26198
|
+
end
|
26199
|
+
|
26200
|
+
class CountryPickerForm
|
26201
|
+
|
26202
|
+
attr_reader :source
|
26203
|
+
|
26204
|
+
def initialize(incoming={})
|
26205
|
+
opts = HttpClient::Helper.symbolize_keys(incoming)
|
26206
|
+
@source = (x = (x = opts.delete(:source); x.nil? ? "experience" : x); x.is_a?(::Io::Flow::V0::Models::CountryPickerSource) ? x : ::Io::Flow::V0::Models::CountryPickerSource.apply(x))
|
26207
|
+
end
|
26208
|
+
|
26209
|
+
def to_json
|
26210
|
+
JSON.dump(to_hash)
|
26211
|
+
end
|
26212
|
+
|
26213
|
+
def copy(incoming={})
|
26214
|
+
CountryPickerForm.new(to_hash.merge(HttpClient::Helper.symbolize_keys(incoming)))
|
26215
|
+
end
|
26216
|
+
|
26217
|
+
def to_hash
|
26218
|
+
{
|
26219
|
+
:source => source.value
|
26220
|
+
}
|
26221
|
+
end
|
26222
|
+
|
26223
|
+
end
|
26224
|
+
|
25975
26225
|
class CountryShippingPricing
|
25976
26226
|
|
25977
26227
|
attr_reader :pricing, :countries
|
@@ -28458,6 +28708,34 @@ module Io
|
|
28458
28708
|
|
28459
28709
|
end
|
28460
28710
|
|
28711
|
+
class EcommercePlatformForm
|
28712
|
+
|
28713
|
+
attr_reader :type, :version
|
28714
|
+
|
28715
|
+
def initialize(incoming={})
|
28716
|
+
opts = HttpClient::Helper.symbolize_keys(incoming)
|
28717
|
+
HttpClient::Preconditions.require_keys(opts, [:type], 'EcommercePlatformForm')
|
28718
|
+
@type = (x = opts.delete(:type); x.is_a?(::Io::Flow::V0::Models::EcommercePlatformType) ? x : ::Io::Flow::V0::Models::EcommercePlatformType.apply(x))
|
28719
|
+
@version = (x = opts.delete(:version); x.nil? ? nil : HttpClient::Preconditions.assert_class('version', x, String))
|
28720
|
+
end
|
28721
|
+
|
28722
|
+
def to_json
|
28723
|
+
JSON.dump(to_hash)
|
28724
|
+
end
|
28725
|
+
|
28726
|
+
def copy(incoming={})
|
28727
|
+
EcommercePlatformForm.new(to_hash.merge(HttpClient::Helper.symbolize_keys(incoming)))
|
28728
|
+
end
|
28729
|
+
|
28730
|
+
def to_hash
|
28731
|
+
{
|
28732
|
+
:type => type.value,
|
28733
|
+
:version => version
|
28734
|
+
}
|
28735
|
+
end
|
28736
|
+
|
28737
|
+
end
|
28738
|
+
|
28461
28739
|
class EcommercePlatformUpserted < Event
|
28462
28740
|
|
28463
28741
|
attr_reader :event_id, :timestamp, :organization, :ecommerce_platform
|
@@ -29844,6 +30122,180 @@ module Io
|
|
29844
30122
|
|
29845
30123
|
end
|
29846
30124
|
|
30125
|
+
class ExperiencePriceConversion
|
30126
|
+
|
30127
|
+
attr_reader :request, :price
|
30128
|
+
|
30129
|
+
def initialize(incoming={})
|
30130
|
+
opts = HttpClient::Helper.symbolize_keys(incoming)
|
30131
|
+
HttpClient::Preconditions.require_keys(opts, [:request, :price], 'ExperiencePriceConversion')
|
30132
|
+
@request = (x = opts.delete(:request); x.is_a?(::Io::Flow::V0::Models::ExperiencePriceConversionRequest) ? x : ::Io::Flow::V0::Models::ExperiencePriceConversionRequest.new(x))
|
30133
|
+
@price = (x = opts.delete(:price); x.is_a?(::Io::Flow::V0::Models::PriceWithBase) ? x : ::Io::Flow::V0::Models::PriceWithBase.new(x))
|
30134
|
+
end
|
30135
|
+
|
30136
|
+
def to_json
|
30137
|
+
JSON.dump(to_hash)
|
30138
|
+
end
|
30139
|
+
|
30140
|
+
def copy(incoming={})
|
30141
|
+
ExperiencePriceConversion.new(to_hash.merge(HttpClient::Helper.symbolize_keys(incoming)))
|
30142
|
+
end
|
30143
|
+
|
30144
|
+
def to_hash
|
30145
|
+
{
|
30146
|
+
:request => request.to_hash,
|
30147
|
+
:price => price.to_hash
|
30148
|
+
}
|
30149
|
+
end
|
30150
|
+
|
30151
|
+
end
|
30152
|
+
|
30153
|
+
class ExperiencePriceConversionRequest
|
30154
|
+
|
30155
|
+
attr_reader :value, :base, :local
|
30156
|
+
|
30157
|
+
def initialize(incoming={})
|
30158
|
+
opts = HttpClient::Helper.symbolize_keys(incoming)
|
30159
|
+
HttpClient::Preconditions.require_keys(opts, [:value, :base, :local], 'ExperiencePriceConversionRequest')
|
30160
|
+
@value = HttpClient::Preconditions.assert_class('value', HttpClient::Helper.to_big_decimal(opts.delete(:value)), BigDecimal)
|
30161
|
+
@base = HttpClient::Preconditions.assert_class('base', opts.delete(:base), String)
|
30162
|
+
@local = HttpClient::Preconditions.assert_class('local', opts.delete(:local), String)
|
30163
|
+
end
|
30164
|
+
|
30165
|
+
def to_json
|
30166
|
+
JSON.dump(to_hash)
|
30167
|
+
end
|
30168
|
+
|
30169
|
+
def copy(incoming={})
|
30170
|
+
ExperiencePriceConversionRequest.new(to_hash.merge(HttpClient::Helper.symbolize_keys(incoming)))
|
30171
|
+
end
|
30172
|
+
|
30173
|
+
def to_hash
|
30174
|
+
{
|
30175
|
+
:value => value.to_f.to_s,
|
30176
|
+
:base => base,
|
30177
|
+
:local => local
|
30178
|
+
}
|
30179
|
+
end
|
30180
|
+
|
30181
|
+
end
|
30182
|
+
|
30183
|
+
# Conversion of a price from the organization's base currency into a local
|
30184
|
+
# currency, using display rules suitable for price facets in search.
|
30185
|
+
class ExperiencePriceConversionResponse
|
30186
|
+
|
30187
|
+
attr_reader :prices
|
30188
|
+
|
30189
|
+
def initialize(incoming={})
|
30190
|
+
opts = HttpClient::Helper.symbolize_keys(incoming)
|
30191
|
+
HttpClient::Preconditions.require_keys(opts, [:prices], 'ExperiencePriceConversionResponse')
|
30192
|
+
@prices = HttpClient::Preconditions.assert_class('prices', opts.delete(:prices), Array).map { |v| (x = v; x.is_a?(::Io::Flow::V0::Models::ExperiencePriceConversion) ? x : ::Io::Flow::V0::Models::ExperiencePriceConversion.new(x)) }
|
30193
|
+
end
|
30194
|
+
|
30195
|
+
def to_json
|
30196
|
+
JSON.dump(to_hash)
|
30197
|
+
end
|
30198
|
+
|
30199
|
+
def copy(incoming={})
|
30200
|
+
ExperiencePriceConversionResponse.new(to_hash.merge(HttpClient::Helper.symbolize_keys(incoming)))
|
30201
|
+
end
|
30202
|
+
|
30203
|
+
def to_hash
|
30204
|
+
{
|
30205
|
+
:prices => prices.map { |o| o.to_hash }
|
30206
|
+
}
|
30207
|
+
end
|
30208
|
+
|
30209
|
+
end
|
30210
|
+
|
30211
|
+
class ExperiencePriceFacetConversion
|
30212
|
+
|
30213
|
+
attr_reader :request, :price
|
30214
|
+
|
30215
|
+
def initialize(incoming={})
|
30216
|
+
opts = HttpClient::Helper.symbolize_keys(incoming)
|
30217
|
+
HttpClient::Preconditions.require_keys(opts, [:request, :price], 'ExperiencePriceFacetConversion')
|
30218
|
+
@request = (x = opts.delete(:request); x.is_a?(::Io::Flow::V0::Models::ExperiencePriceFacetConversionRequest) ? x : ::Io::Flow::V0::Models::ExperiencePriceFacetConversionRequest.new(x))
|
30219
|
+
@price = (x = opts.delete(:price); x.is_a?(::Io::Flow::V0::Models::PriceWithBase) ? x : ::Io::Flow::V0::Models::PriceWithBase.new(x))
|
30220
|
+
end
|
30221
|
+
|
30222
|
+
def to_json
|
30223
|
+
JSON.dump(to_hash)
|
30224
|
+
end
|
30225
|
+
|
30226
|
+
def copy(incoming={})
|
30227
|
+
ExperiencePriceFacetConversion.new(to_hash.merge(HttpClient::Helper.symbolize_keys(incoming)))
|
30228
|
+
end
|
30229
|
+
|
30230
|
+
def to_hash
|
30231
|
+
{
|
30232
|
+
:request => request.to_hash,
|
30233
|
+
:price => price.to_hash
|
30234
|
+
}
|
30235
|
+
end
|
30236
|
+
|
30237
|
+
end
|
30238
|
+
|
30239
|
+
class ExperiencePriceFacetConversionRequest
|
30240
|
+
|
30241
|
+
attr_reader :boundary, :value, :base, :local
|
30242
|
+
|
30243
|
+
def initialize(incoming={})
|
30244
|
+
opts = HttpClient::Helper.symbolize_keys(incoming)
|
30245
|
+
HttpClient::Preconditions.require_keys(opts, [:boundary, :value, :base, :local], 'ExperiencePriceFacetConversionRequest')
|
30246
|
+
@boundary = (x = opts.delete(:boundary); x.is_a?(::Io::Flow::V0::Models::PriceFacetBoundary) ? x : ::Io::Flow::V0::Models::PriceFacetBoundary.apply(x))
|
30247
|
+
@value = HttpClient::Preconditions.assert_class('value', HttpClient::Helper.to_big_decimal(opts.delete(:value)), BigDecimal)
|
30248
|
+
@base = HttpClient::Preconditions.assert_class('base', opts.delete(:base), String)
|
30249
|
+
@local = HttpClient::Preconditions.assert_class('local', opts.delete(:local), String)
|
30250
|
+
end
|
30251
|
+
|
30252
|
+
def to_json
|
30253
|
+
JSON.dump(to_hash)
|
30254
|
+
end
|
30255
|
+
|
30256
|
+
def copy(incoming={})
|
30257
|
+
ExperiencePriceFacetConversionRequest.new(to_hash.merge(HttpClient::Helper.symbolize_keys(incoming)))
|
30258
|
+
end
|
30259
|
+
|
30260
|
+
def to_hash
|
30261
|
+
{
|
30262
|
+
:boundary => boundary.value,
|
30263
|
+
:value => value.to_f.to_s,
|
30264
|
+
:base => base,
|
30265
|
+
:local => local
|
30266
|
+
}
|
30267
|
+
end
|
30268
|
+
|
30269
|
+
end
|
30270
|
+
|
30271
|
+
# Conversion of a price from the organization's base currency into a local
|
30272
|
+
# currency, using display rules suitable for price facets in search.
|
30273
|
+
class ExperiencePriceFacetConversionResponse
|
30274
|
+
|
30275
|
+
attr_reader :facets
|
30276
|
+
|
30277
|
+
def initialize(incoming={})
|
30278
|
+
opts = HttpClient::Helper.symbolize_keys(incoming)
|
30279
|
+
HttpClient::Preconditions.require_keys(opts, [:facets], 'ExperiencePriceFacetConversionResponse')
|
30280
|
+
@facets = HttpClient::Preconditions.assert_class('facets', opts.delete(:facets), Array).map { |v| (x = v; x.is_a?(::Io::Flow::V0::Models::ExperiencePriceFacetConversion) ? x : ::Io::Flow::V0::Models::ExperiencePriceFacetConversion.new(x)) }
|
30281
|
+
end
|
30282
|
+
|
30283
|
+
def to_json
|
30284
|
+
JSON.dump(to_hash)
|
30285
|
+
end
|
30286
|
+
|
30287
|
+
def copy(incoming={})
|
30288
|
+
ExperiencePriceFacetConversionResponse.new(to_hash.merge(HttpClient::Helper.symbolize_keys(incoming)))
|
30289
|
+
end
|
30290
|
+
|
30291
|
+
def to_hash
|
30292
|
+
{
|
30293
|
+
:facets => facets.map { |o| o.to_hash }
|
30294
|
+
}
|
30295
|
+
end
|
30296
|
+
|
30297
|
+
end
|
30298
|
+
|
29847
30299
|
class ExperienceReference < ExpandableExperience
|
29848
30300
|
|
29849
30301
|
attr_reader :key
|
@@ -32367,11 +32819,13 @@ module Io
|
|
32367
32819
|
|
32368
32820
|
class IdentifierForm
|
32369
32821
|
|
32370
|
-
attr_reader :primary
|
32822
|
+
attr_reader :primary, :name
|
32371
32823
|
|
32372
32824
|
def initialize(incoming={})
|
32373
32825
|
opts = HttpClient::Helper.symbolize_keys(incoming)
|
32826
|
+
HttpClient::Preconditions.require_keys(opts, [:name], 'IdentifierForm')
|
32374
32827
|
@primary = (x = opts.delete(:primary); x.nil? ? nil : HttpClient::Preconditions.assert_boolean('primary', x))
|
32828
|
+
@name = HttpClient::Preconditions.assert_class('name', opts.delete(:name), String)
|
32375
32829
|
end
|
32376
32830
|
|
32377
32831
|
def to_json
|
@@ -32384,7 +32838,8 @@ module Io
|
|
32384
32838
|
|
32385
32839
|
def to_hash
|
32386
32840
|
{
|
32387
|
-
:primary => primary
|
32841
|
+
:primary => primary,
|
32842
|
+
:name => name
|
32388
32843
|
}
|
32389
32844
|
end
|
32390
32845
|
|
@@ -32947,96 +33402,6 @@ module Io
|
|
32947
33402
|
|
32948
33403
|
end
|
32949
33404
|
|
32950
|
-
class InstallmentPlanPaymentError
|
32951
|
-
|
32952
|
-
attr_reader :code, :messages, :codes
|
32953
|
-
|
32954
|
-
def initialize(incoming={})
|
32955
|
-
opts = HttpClient::Helper.symbolize_keys(incoming)
|
32956
|
-
HttpClient::Preconditions.require_keys(opts, [:code, :messages, :codes], 'InstallmentPlanPaymentError')
|
32957
|
-
@code = (x = opts.delete(:code); x.is_a?(::Io::Flow::V0::Models::InstallmentPlanPaymentErrorCode) ? x : ::Io::Flow::V0::Models::InstallmentPlanPaymentErrorCode.apply(x))
|
32958
|
-
@messages = HttpClient::Preconditions.assert_class('messages', opts.delete(:messages), Array).map { |v| HttpClient::Preconditions.assert_class('messages', v, String) }
|
32959
|
-
@codes = HttpClient::Preconditions.assert_class('codes', opts.delete(:codes), Array).map { |v| (x = v; x.is_a?(::Io::Flow::V0::Models::InstallmentPlanPaymentErrorCode) ? x : ::Io::Flow::V0::Models::InstallmentPlanPaymentErrorCode.apply(x)) }
|
32960
|
-
end
|
32961
|
-
|
32962
|
-
def to_json
|
32963
|
-
JSON.dump(to_hash)
|
32964
|
-
end
|
32965
|
-
|
32966
|
-
def copy(incoming={})
|
32967
|
-
InstallmentPlanPaymentError.new(to_hash.merge(HttpClient::Helper.symbolize_keys(incoming)))
|
32968
|
-
end
|
32969
|
-
|
32970
|
-
def to_hash
|
32971
|
-
{
|
32972
|
-
:code => code.value,
|
32973
|
-
:messages => messages,
|
32974
|
-
:codes => codes.map { |o| o.value }
|
32975
|
-
}
|
32976
|
-
end
|
32977
|
-
|
32978
|
-
end
|
32979
|
-
|
32980
|
-
# The installment payment form is used to create an installment plan for an
|
32981
|
-
# order, associating the plan immediately with this order.
|
32982
|
-
class InstallmentPlanPaymentForm
|
32983
|
-
|
32984
|
-
attr_reader :installment_program_id, :authorization_key
|
32985
|
-
|
32986
|
-
def initialize(incoming={})
|
32987
|
-
opts = HttpClient::Helper.symbolize_keys(incoming)
|
32988
|
-
HttpClient::Preconditions.require_keys(opts, [:installment_program_id, :authorization_key], 'InstallmentPlanPaymentForm')
|
32989
|
-
@installment_program_id = HttpClient::Preconditions.assert_class('installment_program_id', opts.delete(:installment_program_id), String)
|
32990
|
-
@authorization_key = HttpClient::Preconditions.assert_class('authorization_key', opts.delete(:authorization_key), String)
|
32991
|
-
end
|
32992
|
-
|
32993
|
-
def to_json
|
32994
|
-
JSON.dump(to_hash)
|
32995
|
-
end
|
32996
|
-
|
32997
|
-
def copy(incoming={})
|
32998
|
-
InstallmentPlanPaymentForm.new(to_hash.merge(HttpClient::Helper.symbolize_keys(incoming)))
|
32999
|
-
end
|
33000
|
-
|
33001
|
-
def to_hash
|
33002
|
-
{
|
33003
|
-
:installment_program_id => installment_program_id,
|
33004
|
-
:authorization_key => authorization_key
|
33005
|
-
}
|
33006
|
-
end
|
33007
|
-
|
33008
|
-
end
|
33009
|
-
|
33010
|
-
class InstallmentProgramSummary
|
33011
|
-
|
33012
|
-
attr_reader :id, :name, :initial
|
33013
|
-
|
33014
|
-
def initialize(incoming={})
|
33015
|
-
opts = HttpClient::Helper.symbolize_keys(incoming)
|
33016
|
-
HttpClient::Preconditions.require_keys(opts, [:id, :name, :initial], 'InstallmentProgramSummary')
|
33017
|
-
@id = HttpClient::Preconditions.assert_class('id', opts.delete(:id), String)
|
33018
|
-
@name = HttpClient::Preconditions.assert_class('name', opts.delete(:name), String)
|
33019
|
-
@initial = (x = opts.delete(:initial); x.is_a?(::Io::Flow::V0::Models::Price) ? x : ::Io::Flow::V0::Models::Price.new(x))
|
33020
|
-
end
|
33021
|
-
|
33022
|
-
def to_json
|
33023
|
-
JSON.dump(to_hash)
|
33024
|
-
end
|
33025
|
-
|
33026
|
-
def copy(incoming={})
|
33027
|
-
InstallmentProgramSummary.new(to_hash.merge(HttpClient::Helper.symbolize_keys(incoming)))
|
33028
|
-
end
|
33029
|
-
|
33030
|
-
def to_hash
|
33031
|
-
{
|
33032
|
-
:id => id,
|
33033
|
-
:name => name,
|
33034
|
-
:initial => initial.to_hash
|
33035
|
-
}
|
33036
|
-
end
|
33037
|
-
|
33038
|
-
end
|
33039
|
-
|
33040
33405
|
# Enables backorders, setting an optional number of units that we allow for
|
33041
33406
|
# backorder. For example, a backorder w/ quantity 10 will enable selling until
|
33042
33407
|
# the actual inventory quantity is -10.
|
@@ -36436,7 +36801,7 @@ module Io
|
|
36436
36801
|
# you can capture up to the amount of the authorization
|
36437
36802
|
class MerchantOfRecordAuthorizationForm < AuthorizationForm
|
36438
36803
|
|
36439
|
-
attr_reader :token, :order_number, :amount, :currency, :key, :cvv, :attributes, :ip, :options, :redirect_urls, :
|
36804
|
+
attr_reader :token, :order_number, :amount, :currency, :key, :cvv, :attributes, :ip, :options, :redirect_urls, :browser_info
|
36440
36805
|
|
36441
36806
|
def initialize(incoming={})
|
36442
36807
|
super(:discriminator => AuthorizationForm::Types::MERCHANT_OF_RECORD_AUTHORIZATION_FORM)
|
@@ -36452,7 +36817,6 @@ module Io
|
|
36452
36817
|
@ip = (x = opts.delete(:ip); x.nil? ? nil : HttpClient::Preconditions.assert_class('ip', x, String))
|
36453
36818
|
@options = (x = opts.delete(:options); x.nil? ? nil : HttpClient::Preconditions.assert_class('options', x, Array).map { |v| (x = v; x.is_a?(::Io::Flow::V0::Models::AuthorizationOption) ? x : ::Io::Flow::V0::Models::AuthorizationOption.apply(x)) })
|
36454
36819
|
@redirect_urls = (x = opts.delete(:redirect_urls); x.nil? ? nil : (x = x; x.is_a?(::Io::Flow::V0::Models::PostPaymentRedirectUrls) ? x : ::Io::Flow::V0::Models::PostPaymentRedirectUrls.new(x)))
|
36455
|
-
@installment_program_id = (x = opts.delete(:installment_program_id); x.nil? ? nil : HttpClient::Preconditions.assert_class('installment_program_id', x, String))
|
36456
36820
|
@browser_info = (x = opts.delete(:browser_info); x.nil? ? nil : (x = x; x.is_a?(::Io::Flow::V0::Models::BrowserInfo) ? x : ::Io::Flow::V0::Models::BrowserInfo.new(x)))
|
36457
36821
|
end
|
36458
36822
|
|
@@ -36476,7 +36840,6 @@ module Io
|
|
36476
36840
|
:ip => ip,
|
36477
36841
|
:options => options.nil? ? nil : options.map { |o| o.value },
|
36478
36842
|
:redirect_urls => redirect_urls.nil? ? nil : redirect_urls.to_hash,
|
36479
|
-
:installment_program_id => installment_program_id,
|
36480
36843
|
:browser_info => browser_info.nil? ? nil : browser_info.to_hash
|
36481
36844
|
}
|
36482
36845
|
end
|
@@ -37748,7 +38111,7 @@ module Io
|
|
37748
38111
|
# pricing and delivery options for destination and items/quantities specified
|
37749
38112
|
class OrderForm
|
37750
38113
|
|
37751
|
-
attr_reader :customer, :items, :delivered_duty, :number, :destination, :discount, :discounts, :attributes, :authorization_keys
|
38114
|
+
attr_reader :customer, :items, :delivered_duty, :number, :destination, :discount, :discounts, :attributes, :authorization_keys, :options
|
37752
38115
|
|
37753
38116
|
def initialize(incoming={})
|
37754
38117
|
opts = HttpClient::Helper.symbolize_keys(incoming)
|
@@ -37762,6 +38125,7 @@ module Io
|
|
37762
38125
|
@discounts = (x = opts.delete(:discounts); x.nil? ? nil : (x = x; x.is_a?(::Io::Flow::V0::Models::DiscountsForm) ? x : ::Io::Flow::V0::Models::DiscountsForm.new(x)))
|
37763
38126
|
@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 })
|
37764
38127
|
@authorization_keys = (x = opts.delete(:authorization_keys); x.nil? ? nil : HttpClient::Preconditions.assert_class('authorization_keys', x, Array).map { |v| HttpClient::Preconditions.assert_class('authorization_keys', v, String) })
|
38128
|
+
@options = (x = opts.delete(:options); x.nil? ? nil : (x = x; x.is_a?(::Io::Flow::V0::Models::OrderOptions) ? x : ::Io::Flow::V0::Models::OrderOptions.new(x)))
|
37765
38129
|
end
|
37766
38130
|
|
37767
38131
|
def to_json
|
@@ -37782,7 +38146,8 @@ module Io
|
|
37782
38146
|
:discount => discount.nil? ? nil : discount.to_hash,
|
37783
38147
|
:discounts => discounts.nil? ? nil : discounts.to_hash,
|
37784
38148
|
:attributes => attributes.nil? ? nil : attributes,
|
37785
|
-
:authorization_keys => authorization_keys.nil? ? nil : authorization_keys
|
38149
|
+
:authorization_keys => authorization_keys.nil? ? nil : authorization_keys,
|
38150
|
+
:options => options.nil? ? nil : options.to_hash
|
37786
38151
|
}
|
37787
38152
|
end
|
37788
38153
|
|
@@ -37856,13 +38221,14 @@ module Io
|
|
37856
38221
|
# to ship the orders.
|
37857
38222
|
class OrderIdentifier
|
37858
38223
|
|
37859
|
-
attr_reader :id, :order, :identifier, :primary, :number
|
38224
|
+
attr_reader :id, :order, :name, :identifier, :primary, :number
|
37860
38225
|
|
37861
38226
|
def initialize(incoming={})
|
37862
38227
|
opts = HttpClient::Helper.symbolize_keys(incoming)
|
37863
38228
|
HttpClient::Preconditions.require_keys(opts, [:id, :order, :identifier, :primary], 'OrderIdentifier')
|
37864
38229
|
@id = HttpClient::Preconditions.assert_class('id', opts.delete(:id), String)
|
37865
38230
|
@order = (x = opts.delete(:order); x.is_a?(::Io::Flow::V0::Models::OrderReference) ? x : ::Io::Flow::V0::Models::OrderReference.new(x))
|
38231
|
+
@name = HttpClient::Preconditions.assert_class('name', (x = opts.delete(:name); x.nil? ? "external" : x), String)
|
37866
38232
|
@identifier = HttpClient::Preconditions.assert_class('identifier', opts.delete(:identifier), String)
|
37867
38233
|
@primary = HttpClient::Preconditions.assert_boolean('primary', opts.delete(:primary))
|
37868
38234
|
@number = (x = opts.delete(:number); x.nil? ? nil : HttpClient::Preconditions.assert_class('number', x, String))
|
@@ -37880,6 +38246,7 @@ module Io
|
|
37880
38246
|
{
|
37881
38247
|
:id => id,
|
37882
38248
|
:order => order.to_hash,
|
38249
|
+
:name => name,
|
37883
38250
|
:identifier => identifier,
|
37884
38251
|
:primary => primary,
|
37885
38252
|
:number => number
|
@@ -37954,12 +38321,13 @@ module Io
|
|
37954
38321
|
|
37955
38322
|
class OrderIdentifierForm
|
37956
38323
|
|
37957
|
-
attr_reader :order, :identifier, :number, :primary
|
38324
|
+
attr_reader :order, :name, :identifier, :number, :primary
|
37958
38325
|
|
37959
38326
|
def initialize(incoming={})
|
37960
38327
|
opts = HttpClient::Helper.symbolize_keys(incoming)
|
37961
38328
|
HttpClient::Preconditions.require_keys(opts, [:order], 'OrderIdentifierForm')
|
37962
38329
|
@order = HttpClient::Preconditions.assert_class('order', opts.delete(:order), String)
|
38330
|
+
@name = (x = opts.delete(:name); x.nil? ? nil : HttpClient::Preconditions.assert_class('name', x, String))
|
37963
38331
|
@identifier = (x = opts.delete(:identifier); x.nil? ? nil : HttpClient::Preconditions.assert_class('identifier', x, String))
|
37964
38332
|
@number = (x = opts.delete(:number); x.nil? ? nil : HttpClient::Preconditions.assert_class('number', x, String))
|
37965
38333
|
@primary = (x = opts.delete(:primary); x.nil? ? nil : HttpClient::Preconditions.assert_boolean('primary', x))
|
@@ -37976,6 +38344,7 @@ module Io
|
|
37976
38344
|
def to_hash
|
37977
38345
|
{
|
37978
38346
|
:order => order,
|
38347
|
+
:name => name,
|
37979
38348
|
:identifier => identifier,
|
37980
38349
|
:number => number,
|
37981
38350
|
:primary => primary
|
@@ -37986,12 +38355,13 @@ module Io
|
|
37986
38355
|
|
37987
38356
|
class OrderIdentifierPutForm
|
37988
38357
|
|
37989
|
-
attr_reader :order, :primary
|
38358
|
+
attr_reader :order, :name, :primary
|
37990
38359
|
|
37991
38360
|
def initialize(incoming={})
|
37992
38361
|
opts = HttpClient::Helper.symbolize_keys(incoming)
|
37993
38362
|
HttpClient::Preconditions.require_keys(opts, [:order], 'OrderIdentifierPutForm')
|
37994
38363
|
@order = HttpClient::Preconditions.assert_class('order', opts.delete(:order), String)
|
38364
|
+
@name = (x = opts.delete(:name); x.nil? ? nil : HttpClient::Preconditions.assert_class('name', x, String))
|
37995
38365
|
@primary = (x = opts.delete(:primary); x.nil? ? nil : HttpClient::Preconditions.assert_boolean('primary', x))
|
37996
38366
|
end
|
37997
38367
|
|
@@ -38006,6 +38376,7 @@ module Io
|
|
38006
38376
|
def to_hash
|
38007
38377
|
{
|
38008
38378
|
:order => order,
|
38379
|
+
:name => name,
|
38009
38380
|
:primary => primary
|
38010
38381
|
}
|
38011
38382
|
end
|
@@ -38327,6 +38698,32 @@ module Io
|
|
38327
38698
|
|
38328
38699
|
end
|
38329
38700
|
|
38701
|
+
# Optional behaviors to enable for this order
|
38702
|
+
class OrderOptions
|
38703
|
+
|
38704
|
+
attr_reader :storage
|
38705
|
+
|
38706
|
+
def initialize(incoming={})
|
38707
|
+
opts = HttpClient::Helper.symbolize_keys(incoming)
|
38708
|
+
@storage = (x = (x = opts.delete(:storage); x.nil? ? "persist" : x); x.is_a?(::Io::Flow::V0::Models::OrderStorage) ? x : ::Io::Flow::V0::Models::OrderStorage.apply(x))
|
38709
|
+
end
|
38710
|
+
|
38711
|
+
def to_json
|
38712
|
+
JSON.dump(to_hash)
|
38713
|
+
end
|
38714
|
+
|
38715
|
+
def copy(incoming={})
|
38716
|
+
OrderOptions.new(to_hash.merge(HttpClient::Helper.symbolize_keys(incoming)))
|
38717
|
+
end
|
38718
|
+
|
38719
|
+
def to_hash
|
38720
|
+
{
|
38721
|
+
:storage => storage.value
|
38722
|
+
}
|
38723
|
+
end
|
38724
|
+
|
38725
|
+
end
|
38726
|
+
|
38330
38727
|
# An Order Payment represents an individual payment applied to an order. The
|
38331
38728
|
# type of the payment can be used to further lookup transaction level detail
|
38332
38729
|
class OrderPayment
|
@@ -38488,7 +38885,7 @@ module Io
|
|
38488
38885
|
# Represents a top-level order price detail, e.g. 'Subtotal' or 'VAT'.
|
38489
38886
|
class OrderPriceDetail
|
38490
38887
|
|
38491
|
-
attr_reader :key, :currency, :amount, :label, :base, :components, :name, :rate, :accuracy
|
38888
|
+
attr_reader :key, :currency, :amount, :label, :base, :components, :name, :rate, :accuracy, :rate_label
|
38492
38889
|
|
38493
38890
|
def initialize(incoming={})
|
38494
38891
|
opts = HttpClient::Helper.symbolize_keys(incoming)
|
@@ -38502,6 +38899,7 @@ module Io
|
|
38502
38899
|
@name = (x = opts.delete(:name); x.nil? ? nil : HttpClient::Preconditions.assert_class('name', x, String))
|
38503
38900
|
@rate = (x = opts.delete(:rate); x.nil? ? nil : HttpClient::Preconditions.assert_class('rate', HttpClient::Helper.to_big_decimal(x), BigDecimal))
|
38504
38901
|
@accuracy = (x = (x = opts.delete(:accuracy); x.nil? ? "calculated" : x); x.is_a?(::Io::Flow::V0::Models::PriceAccuracy) ? x : ::Io::Flow::V0::Models::PriceAccuracy.apply(x))
|
38902
|
+
@rate_label = (x = opts.delete(:rate_label); x.nil? ? nil : HttpClient::Preconditions.assert_class('rate_label', x, String))
|
38505
38903
|
end
|
38506
38904
|
|
38507
38905
|
def to_json
|
@@ -38522,7 +38920,8 @@ module Io
|
|
38522
38920
|
:components => components.map { |o| o.to_hash },
|
38523
38921
|
:name => name,
|
38524
38922
|
:rate => rate.to_f.to_s,
|
38525
|
-
:accuracy => accuracy.value
|
38923
|
+
:accuracy => accuracy.value,
|
38924
|
+
:rate_label => rate_label
|
38526
38925
|
}
|
38527
38926
|
end
|
38528
38927
|
|
@@ -38596,7 +38995,7 @@ module Io
|
|
38596
38995
|
# pricing and delivery options for destination and items/quantities specified.
|
38597
38996
|
class OrderPutForm
|
38598
38997
|
|
38599
|
-
attr_reader :items, :customer, :delivered_duty, :selections, :destination, :discount, :discounts, :attributes, :authorization_keys
|
38998
|
+
attr_reader :items, :customer, :delivered_duty, :selections, :destination, :discount, :discounts, :attributes, :authorization_keys, :options
|
38600
38999
|
|
38601
39000
|
def initialize(incoming={})
|
38602
39001
|
opts = HttpClient::Helper.symbolize_keys(incoming)
|
@@ -38610,6 +39009,7 @@ module Io
|
|
38610
39009
|
@discounts = (x = opts.delete(:discounts); x.nil? ? nil : (x = x; x.is_a?(::Io::Flow::V0::Models::DiscountsForm) ? x : ::Io::Flow::V0::Models::DiscountsForm.new(x)))
|
38611
39010
|
@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 })
|
38612
39011
|
@authorization_keys = (x = opts.delete(:authorization_keys); x.nil? ? nil : HttpClient::Preconditions.assert_class('authorization_keys', x, Array).map { |v| HttpClient::Preconditions.assert_class('authorization_keys', v, String) })
|
39012
|
+
@options = (x = opts.delete(:options); x.nil? ? nil : (x = x; x.is_a?(::Io::Flow::V0::Models::OrderOptions) ? x : ::Io::Flow::V0::Models::OrderOptions.new(x)))
|
38613
39013
|
end
|
38614
39014
|
|
38615
39015
|
def to_json
|
@@ -38630,7 +39030,8 @@ module Io
|
|
38630
39030
|
:discount => discount.nil? ? nil : discount.to_hash,
|
38631
39031
|
:discounts => discounts.nil? ? nil : discounts.to_hash,
|
38632
39032
|
:attributes => attributes.nil? ? nil : attributes,
|
38633
|
-
:authorization_keys => authorization_keys.nil? ? nil : authorization_keys
|
39033
|
+
:authorization_keys => authorization_keys.nil? ? nil : authorization_keys,
|
39034
|
+
:options => options.nil? ? nil : options.to_hash
|
38634
39035
|
}
|
38635
39036
|
end
|
38636
39037
|
|
@@ -38876,12 +39277,13 @@ module Io
|
|
38876
39277
|
# checkout.
|
38877
39278
|
class OrderSubmissionIdentifierForm
|
38878
39279
|
|
38879
|
-
attr_reader :identifier, :primary
|
39280
|
+
attr_reader :identifier, :name, :primary
|
38880
39281
|
|
38881
39282
|
def initialize(incoming={})
|
38882
39283
|
opts = HttpClient::Helper.symbolize_keys(incoming)
|
38883
39284
|
HttpClient::Preconditions.require_keys(opts, [:identifier], 'OrderSubmissionIdentifierForm')
|
38884
39285
|
@identifier = HttpClient::Preconditions.assert_class('identifier', opts.delete(:identifier), String)
|
39286
|
+
@name = (x = opts.delete(:name); x.nil? ? nil : HttpClient::Preconditions.assert_class('name', x, String))
|
38885
39287
|
@primary = (x = opts.delete(:primary); x.nil? ? nil : HttpClient::Preconditions.assert_boolean('primary', x))
|
38886
39288
|
end
|
38887
39289
|
|
@@ -38896,6 +39298,7 @@ module Io
|
|
38896
39298
|
def to_hash
|
38897
39299
|
{
|
38898
39300
|
:identifier => identifier,
|
39301
|
+
:name => name,
|
38899
39302
|
:primary => primary
|
38900
39303
|
}
|
38901
39304
|
end
|
@@ -38906,7 +39309,7 @@ module Io
|
|
38906
39309
|
# flattened to keys.
|
38907
39310
|
class OrderSummary
|
38908
39311
|
|
38909
|
-
attr_reader :number, :subtotal, :shipping, :tax, :duty, :insurance, :discount, :surcharges, :adjustment, :total, :lines
|
39312
|
+
attr_reader :number, :subtotal, :shipping, :tax, :duty, :insurance, :discount, :surcharges, :adjustment, :total, :lines, :identifiers
|
38910
39313
|
|
38911
39314
|
def initialize(incoming={})
|
38912
39315
|
opts = HttpClient::Helper.symbolize_keys(incoming)
|
@@ -38922,6 +39325,7 @@ module Io
|
|
38922
39325
|
@adjustment = (x = opts.delete(:adjustment); x.nil? ? nil : (x = x; x.is_a?(::Io::Flow::V0::Models::OrderSummaryPriceDetail) ? x : ::Io::Flow::V0::Models::OrderSummaryPriceDetail.new(x)))
|
38923
39326
|
@total = (x = opts.delete(:total); x.is_a?(::Io::Flow::V0::Models::OrderSummaryPriceDetail) ? x : ::Io::Flow::V0::Models::OrderSummaryPriceDetail.new(x))
|
38924
39327
|
@lines = HttpClient::Preconditions.assert_class('lines', opts.delete(:lines), Array).map { |v| (x = v; x.is_a?(::Io::Flow::V0::Models::OrderSummaryLineItem) ? x : ::Io::Flow::V0::Models::OrderSummaryLineItem.new(x)) }
|
39328
|
+
@identifiers = (x = opts.delete(:identifiers); x.nil? ? nil : HttpClient::Preconditions.assert_class('identifiers', x, Hash).inject({}) { |h, d| h[d[0]] = HttpClient::Preconditions.assert_class('identifiers', d[1], String); h })
|
38925
39329
|
end
|
38926
39330
|
|
38927
39331
|
def to_json
|
@@ -38944,7 +39348,8 @@ module Io
|
|
38944
39348
|
:surcharges => surcharges.nil? ? nil : surcharges.to_hash,
|
38945
39349
|
:adjustment => adjustment.nil? ? nil : adjustment.to_hash,
|
38946
39350
|
:total => total.to_hash,
|
38947
|
-
:lines => lines.map { |o| o.to_hash }
|
39351
|
+
:lines => lines.map { |o| o.to_hash },
|
39352
|
+
:identifiers => identifiers.nil? ? nil : identifiers
|
38948
39353
|
}
|
38949
39354
|
end
|
38950
39355
|
|
@@ -39022,12 +39427,13 @@ module Io
|
|
39022
39427
|
|
39023
39428
|
class OrderSummaryLevy
|
39024
39429
|
|
39025
|
-
attr_reader :rate, :value
|
39430
|
+
attr_reader :rate, :rate_label, :value
|
39026
39431
|
|
39027
39432
|
def initialize(incoming={})
|
39028
39433
|
opts = HttpClient::Helper.symbolize_keys(incoming)
|
39029
39434
|
HttpClient::Preconditions.require_keys(opts, [:rate, :value], 'OrderSummaryLevy')
|
39030
39435
|
@rate = HttpClient::Preconditions.assert_class('rate', HttpClient::Helper.to_big_decimal(opts.delete(:rate)), BigDecimal)
|
39436
|
+
@rate_label = (x = opts.delete(:rate_label); x.nil? ? nil : HttpClient::Preconditions.assert_class('rate_label', x, String))
|
39031
39437
|
@value = (x = opts.delete(:value); x.is_a?(::Io::Flow::V0::Models::Price) ? x : ::Io::Flow::V0::Models::Price.new(x))
|
39032
39438
|
end
|
39033
39439
|
|
@@ -39042,6 +39448,7 @@ module Io
|
|
39042
39448
|
def to_hash
|
39043
39449
|
{
|
39044
39450
|
:rate => rate.to_f.to_s,
|
39451
|
+
:rate_label => rate_label,
|
39045
39452
|
:value => value.to_hash
|
39046
39453
|
}
|
39047
39454
|
end
|
@@ -39090,7 +39497,7 @@ module Io
|
|
39090
39497
|
# components and accuracy which are not needed for summary views
|
39091
39498
|
class OrderSummaryPriceDetail
|
39092
39499
|
|
39093
|
-
attr_reader :price, :name, :rate
|
39500
|
+
attr_reader :price, :name, :rate, :rate_label
|
39094
39501
|
|
39095
39502
|
def initialize(incoming={})
|
39096
39503
|
opts = HttpClient::Helper.symbolize_keys(incoming)
|
@@ -39098,6 +39505,7 @@ module Io
|
|
39098
39505
|
@price = (x = opts.delete(:price); x.is_a?(::Io::Flow::V0::Models::Price) ? x : ::Io::Flow::V0::Models::Price.new(x))
|
39099
39506
|
@name = (x = opts.delete(:name); x.nil? ? nil : HttpClient::Preconditions.assert_class('name', x, String))
|
39100
39507
|
@rate = (x = opts.delete(:rate); x.nil? ? nil : HttpClient::Preconditions.assert_class('rate', HttpClient::Helper.to_big_decimal(x), BigDecimal))
|
39508
|
+
@rate_label = (x = opts.delete(:rate_label); x.nil? ? nil : HttpClient::Preconditions.assert_class('rate_label', x, String))
|
39101
39509
|
end
|
39102
39510
|
|
39103
39511
|
def to_json
|
@@ -39112,7 +39520,8 @@ module Io
|
|
39112
39520
|
{
|
39113
39521
|
:price => price.to_hash,
|
39114
39522
|
:name => name,
|
39115
|
-
:rate => rate.to_f.to_s
|
39523
|
+
:rate => rate.to_f.to_s,
|
39524
|
+
:rate_label => rate_label
|
39116
39525
|
}
|
39117
39526
|
end
|
39118
39527
|
|
@@ -40861,13 +41270,13 @@ module Io
|
|
40861
41270
|
|
40862
41271
|
def initialize(incoming={})
|
40863
41272
|
opts = HttpClient::Helper.symbolize_keys(incoming)
|
40864
|
-
HttpClient::Preconditions.require_keys(opts, [:tags, :payment_method, :display_position
|
41273
|
+
HttpClient::Preconditions.require_keys(opts, [:tags, :payment_method, :display_position], 'PaymentMethodRule')
|
40865
41274
|
@tags = HttpClient::Preconditions.assert_class('tags', opts.delete(:tags), Array).map { |v| (x = v; x.is_a?(::Io::Flow::V0::Models::PaymentMethodTag) ? x : ::Io::Flow::V0::Models::PaymentMethodTag.from_json(x)) }
|
40866
41275
|
@payment_method = (x = opts.delete(:payment_method); x.is_a?(::Io::Flow::V0::Models::PaymentMethod) ? x : ::Io::Flow::V0::Models::PaymentMethod.new(x))
|
40867
41276
|
@display_position = HttpClient::Preconditions.assert_class('display_position', opts.delete(:display_position), Integer)
|
40868
41277
|
@content = (x = opts.delete(:content); x.nil? ? nil : HttpClient::Preconditions.assert_class('content', x, Array).map { |v| (x = v; x.is_a?(::Io::Flow::V0::Models::PaymentMethodRuleContent) ? x : ::Io::Flow::V0::Models::PaymentMethodRuleContent.new(x)) })
|
40869
41278
|
@issuers = (x = opts.delete(:issuers); x.nil? ? nil : HttpClient::Preconditions.assert_class('issuers', x, Array).map { |v| (x = v; x.is_a?(::Io::Flow::V0::Models::PaymentMethodIssuer) ? x : ::Io::Flow::V0::Models::PaymentMethodIssuer.new(x)) })
|
40870
|
-
@programs = HttpClient::Preconditions.assert_class('programs',
|
41279
|
+
@programs = (x = opts.delete(:programs); x.nil? ? nil : HttpClient::Preconditions.assert_class('programs', x, Array).map { |v| HttpClient::Preconditions.assert_class('programs', HttpClient::Helper.to_object(v), Hash) })
|
40871
41280
|
@q = (x = opts.delete(:q); x.nil? ? nil : (x = x; x.is_a?(::Io::Flow::V0::Models::Query) ? x : ::Io::Flow::V0::Models::Query.new(x)))
|
40872
41281
|
end
|
40873
41282
|
|
@@ -40886,7 +41295,7 @@ module Io
|
|
40886
41295
|
:display_position => display_position,
|
40887
41296
|
:content => content.nil? ? nil : content.map { |o| o.to_hash },
|
40888
41297
|
:issuers => issuers.nil? ? nil : issuers.map { |o| o.to_hash },
|
40889
|
-
:programs => programs.
|
41298
|
+
:programs => programs.nil? ? nil : programs,
|
40890
41299
|
:q => q.nil? ? nil : q.to_hash
|
40891
41300
|
}
|
40892
41301
|
end
|
@@ -43314,19 +43723,19 @@ module Io
|
|
43314
43723
|
# Snapshot of all lanes and rows across all service levels of an organization
|
43315
43724
|
class Ratecard
|
43316
43725
|
|
43317
|
-
attr_reader :id, :direction, :effective_at, :origination_zones, :service, :
|
43726
|
+
attr_reader :id, :number, :direction, :effective_at, :origination_zones, :service, :published_at, :ratecard_owner
|
43318
43727
|
|
43319
43728
|
def initialize(incoming={})
|
43320
43729
|
opts = HttpClient::Helper.symbolize_keys(incoming)
|
43321
|
-
HttpClient::Preconditions.require_keys(opts, [:id, :direction, :effective_at, :origination_zones, :service], 'Ratecard')
|
43730
|
+
HttpClient::Preconditions.require_keys(opts, [:id, :number, :direction, :effective_at, :origination_zones, :service, :ratecard_owner], 'Ratecard')
|
43322
43731
|
@id = HttpClient::Preconditions.assert_class('id', opts.delete(:id), String)
|
43732
|
+
@number = HttpClient::Preconditions.assert_class('number', opts.delete(:number), String)
|
43323
43733
|
@direction = (x = opts.delete(:direction); x.is_a?(::Io::Flow::V0::Models::Direction) ? x : ::Io::Flow::V0::Models::Direction.apply(x))
|
43324
43734
|
@effective_at = HttpClient::Preconditions.assert_class('effective_at', HttpClient::Helper.to_date_time_iso8601(opts.delete(:effective_at)), DateTime)
|
43325
43735
|
@origination_zones = HttpClient::Preconditions.assert_class('origination_zones', opts.delete(:origination_zones), Array).map { |v| (x = v; x.is_a?(::Io::Flow::V0::Models::Zone) ? x : ::Io::Flow::V0::Models::Zone.new(x)) }
|
43326
43736
|
@service = (x = opts.delete(:service); x.is_a?(::Io::Flow::V0::Models::RatecardServiceSummary) ? x : ::Io::Flow::V0::Models::RatecardServiceSummary.new(x))
|
43327
|
-
@number = (x = opts.delete(:number); x.nil? ? nil : HttpClient::Preconditions.assert_class('number', x, String))
|
43328
43737
|
@published_at = (x = opts.delete(:published_at); x.nil? ? nil : HttpClient::Preconditions.assert_class('published_at', HttpClient::Helper.to_date_time_iso8601(x), DateTime))
|
43329
|
-
@ratecard_owner = (x = opts.delete(:ratecard_owner); x.
|
43738
|
+
@ratecard_owner = (x = opts.delete(:ratecard_owner); x.is_a?(::Io::Flow::V0::Models::RatecardOwner) ? x : ::Io::Flow::V0::Models::RatecardOwner.apply(x))
|
43330
43739
|
end
|
43331
43740
|
|
43332
43741
|
def to_json
|
@@ -43340,13 +43749,13 @@ module Io
|
|
43340
43749
|
def to_hash
|
43341
43750
|
{
|
43342
43751
|
:id => id,
|
43752
|
+
:number => number,
|
43343
43753
|
:direction => direction.value,
|
43344
43754
|
:effective_at => effective_at,
|
43345
43755
|
:origination_zones => origination_zones.map { |o| o.to_hash },
|
43346
43756
|
:service => service.to_hash,
|
43347
|
-
:number => number,
|
43348
43757
|
:published_at => published_at,
|
43349
|
-
:ratecard_owner => ratecard_owner.
|
43758
|
+
:ratecard_owner => ratecard_owner.value
|
43350
43759
|
}
|
43351
43760
|
end
|
43352
43761
|
|
@@ -44533,13 +44942,14 @@ module Io
|
|
44533
44942
|
|
44534
44943
|
class RefundIdentifier
|
44535
44944
|
|
44536
|
-
attr_reader :id, :refund, :identifier, :primary
|
44945
|
+
attr_reader :id, :refund, :name, :identifier, :primary
|
44537
44946
|
|
44538
44947
|
def initialize(incoming={})
|
44539
44948
|
opts = HttpClient::Helper.symbolize_keys(incoming)
|
44540
|
-
HttpClient::Preconditions.require_keys(opts, [:id, :refund, :identifier, :primary], 'RefundIdentifier')
|
44949
|
+
HttpClient::Preconditions.require_keys(opts, [:id, :refund, :name, :identifier, :primary], 'RefundIdentifier')
|
44541
44950
|
@id = HttpClient::Preconditions.assert_class('id', opts.delete(:id), String)
|
44542
44951
|
@refund = (x = opts.delete(:refund); x.is_a?(::Io::Flow::V0::Models::RefundReference) ? x : ::Io::Flow::V0::Models::RefundReference.new(x))
|
44952
|
+
@name = HttpClient::Preconditions.assert_class('name', opts.delete(:name), String)
|
44543
44953
|
@identifier = HttpClient::Preconditions.assert_class('identifier', opts.delete(:identifier), String)
|
44544
44954
|
@primary = HttpClient::Preconditions.assert_boolean('primary', opts.delete(:primary))
|
44545
44955
|
end
|
@@ -44556,6 +44966,7 @@ module Io
|
|
44556
44966
|
{
|
44557
44967
|
:id => id,
|
44558
44968
|
:refund => refund.to_hash,
|
44969
|
+
:name => name,
|
44559
44970
|
:identifier => identifier,
|
44560
44971
|
:primary => primary
|
44561
44972
|
}
|