flowcommerce 0.2.58 → 0.2.59
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/flow_commerce/flow_api_v0_client.rb +443 -39
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: cab5eba811e139e0e913ac8a8abef82bd60877d4
|
4
|
+
data.tar.gz: c7c20e06acdd3eff216b043316d5a76b6dad773b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f6713b2dc2fba002126272596c56d5ae862970faf5ab00fdeaecf374eb8f7bdd6eeede9eb22b5be4bc6d32130e0827c8d29f1fbee54ac5ad7e97b5113884e529
|
7
|
+
data.tar.gz: 8d3c4169cd2a110833381e47d0b95b5fab9a8be53dc022139a2c36d20259fc1270cb8e0e49d9edb68ca033428095b5239628ec6e7cdad432d912f96d67b256c0
|
@@ -1,6 +1,6 @@
|
|
1
1
|
# Generated by API Builder - https://www.apibuilder.io
|
2
|
-
# Service version: 0.
|
3
|
-
# apibuilder 0.14.3 app.apibuilder.io/flow/api/0.5.
|
2
|
+
# Service version: 0.5.16
|
3
|
+
# apibuilder 0.14.3 app.apibuilder.io/flow/api/0.5.23/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.3 app.apibuilder.io/flow/api/0.5.
|
29
|
-
VERSION = '0.
|
28
|
+
USER_AGENT = 'apibuilder 0.14.3 app.apibuilder.io/flow/api/0.5.23/ruby_client' unless defined?(Constants::USER_AGENT)
|
29
|
+
VERSION = '0.5.16' unless defined?(Constants::VERSION)
|
30
30
|
VERSION_MAJOR = 0 unless defined?(VERSION_MAJOR)
|
31
31
|
|
32
32
|
end
|
@@ -774,6 +774,7 @@ module Io
|
|
774
774
|
HttpClient::Preconditions.assert_class('organization', organization, String)
|
775
775
|
opts = HttpClient::Helper.symbolize_keys(incoming)
|
776
776
|
query = {
|
777
|
+
:q => (x = opts.delete(:q); x.nil? ? nil : HttpClient::Preconditions.assert_class('q', x, String)),
|
777
778
|
:id => (x = opts.delete(:id); x.nil? ? nil : HttpClient::Preconditions.assert_class('id', x, Array).map { |v| HttpClient::Preconditions.assert_class('id', v, String) }),
|
778
779
|
:key => (x = opts.delete(:key); x.nil? ? nil : HttpClient::Preconditions.assert_class('key', x, Array).map { |v| HttpClient::Preconditions.assert_class('key', v, String) }),
|
779
780
|
:name => (x = opts.delete(:name); x.nil? ? nil : HttpClient::Preconditions.assert_class('name', x, String)),
|
@@ -7371,6 +7372,70 @@ module Io
|
|
7371
7372
|
|
7372
7373
|
end
|
7373
7374
|
|
7375
|
+
class PartnerCenterFee
|
7376
|
+
|
7377
|
+
module Types
|
7378
|
+
COMMERCIAL_INVOICE_FEE = 'commercial_invoice_fee' unless defined?(COMMERCIAL_INVOICE_FEE)
|
7379
|
+
INBOUND_CARTON_FEE = 'inbound_carton_fee' unless defined?(INBOUND_CARTON_FEE)
|
7380
|
+
OUTBOUND_CARTON_FEE = 'outbound_carton_fee' unless defined?(OUTBOUND_CARTON_FEE)
|
7381
|
+
end
|
7382
|
+
|
7383
|
+
attr_reader :discriminator
|
7384
|
+
|
7385
|
+
def initialize(incoming={})
|
7386
|
+
opts = HttpClient::Helper.symbolize_keys(incoming)
|
7387
|
+
HttpClient::Preconditions.require_keys(opts, [:discriminator], 'PartnerCenterFee')
|
7388
|
+
@discriminator = HttpClient::Preconditions.assert_class('discriminator', opts.delete(:discriminator), String)
|
7389
|
+
end
|
7390
|
+
|
7391
|
+
def subtype_to_hash
|
7392
|
+
raise 'Cannot serialize an instance of partner_center_fee directly - must use one of the specific types: commercial_invoice_fee, inbound_carton_fee, outbound_carton_fee'
|
7393
|
+
end
|
7394
|
+
|
7395
|
+
def to_hash
|
7396
|
+
subtype_to_hash.merge(:discriminator => @discriminator)
|
7397
|
+
end
|
7398
|
+
|
7399
|
+
def PartnerCenterFee.from_json(hash)
|
7400
|
+
HttpClient::Preconditions.assert_class('hash', hash, Hash)
|
7401
|
+
discriminator = HttpClient::Helper.symbolize_keys(hash)[:discriminator].to_s.strip
|
7402
|
+
if discriminator.empty?
|
7403
|
+
raise "Union type[partner_center_fee] requires a field named 'discriminator'"
|
7404
|
+
end
|
7405
|
+
case discriminator
|
7406
|
+
when Types::COMMERCIAL_INVOICE_FEE; CommercialInvoiceFee.new(hash)
|
7407
|
+
when Types::INBOUND_CARTON_FEE; InboundCartonFee.new(hash)
|
7408
|
+
when Types::OUTBOUND_CARTON_FEE; OutboundCartonFee.new(hash)
|
7409
|
+
else PartnerCenterFeeUndefinedType.new(:discriminator => discriminator)
|
7410
|
+
end
|
7411
|
+
end
|
7412
|
+
|
7413
|
+
end
|
7414
|
+
|
7415
|
+
class PartnerCenterFeeUndefinedType < PartnerCenterFee
|
7416
|
+
|
7417
|
+
attr_reader :name
|
7418
|
+
|
7419
|
+
def initialize(incoming={})
|
7420
|
+
super(:discriminator => 'undefined_type')
|
7421
|
+
opts = HttpClient::Helper.symbolize_keys(incoming)
|
7422
|
+
@name = HttpClient::Preconditions.assert_class('name', opts.delete(:discriminator), String)
|
7423
|
+
end
|
7424
|
+
|
7425
|
+
def subtype_to_hash
|
7426
|
+
raise 'Unable to serialize undefined type to json'
|
7427
|
+
end
|
7428
|
+
|
7429
|
+
def copy(incoming={})
|
7430
|
+
raise 'Operation not supported for undefined type'
|
7431
|
+
end
|
7432
|
+
|
7433
|
+
def to_hash
|
7434
|
+
raise 'Operation not supported for undefined type'
|
7435
|
+
end
|
7436
|
+
|
7437
|
+
end
|
7438
|
+
|
7374
7439
|
# Represents data for a specific online payment method
|
7375
7440
|
class Payment
|
7376
7441
|
|
@@ -9359,6 +9424,114 @@ module Io
|
|
9359
9424
|
|
9360
9425
|
end
|
9361
9426
|
|
9427
|
+
class DeliveryOptionCostDetailComponentKey
|
9428
|
+
|
9429
|
+
attr_reader :value
|
9430
|
+
|
9431
|
+
def initialize(value)
|
9432
|
+
@value = HttpClient::Preconditions.assert_class('value', value, String)
|
9433
|
+
end
|
9434
|
+
|
9435
|
+
# Returns the instance of DeliveryOptionCostDetailComponentKey for this value, creating a new instance for an unknown value
|
9436
|
+
def DeliveryOptionCostDetailComponentKey.apply(value)
|
9437
|
+
if value.instance_of?(DeliveryOptionCostDetailComponentKey)
|
9438
|
+
value
|
9439
|
+
else
|
9440
|
+
HttpClient::Preconditions.assert_class_or_nil('value', value, String)
|
9441
|
+
value.nil? ? nil : (from_string(value) || DeliveryOptionCostDetailComponentKey.new(value))
|
9442
|
+
end
|
9443
|
+
end
|
9444
|
+
|
9445
|
+
# Returns the instance of DeliveryOptionCostDetailComponentKey for this value, or nil if not found
|
9446
|
+
def DeliveryOptionCostDetailComponentKey.from_string(value)
|
9447
|
+
HttpClient::Preconditions.assert_class('value', value, String)
|
9448
|
+
DeliveryOptionCostDetailComponentKey.ALL.find { |v| v.value == value }
|
9449
|
+
end
|
9450
|
+
|
9451
|
+
def DeliveryOptionCostDetailComponentKey.ALL
|
9452
|
+
@@all ||= [DeliveryOptionCostDetailComponentKey.ratecard_base_cost, DeliveryOptionCostDetailComponentKey.ratecard_ddp_fee, DeliveryOptionCostDetailComponentKey.ratecard_fuel_surcharge, DeliveryOptionCostDetailComponentKey.ratecard_oversized_shipment_fee, DeliveryOptionCostDetailComponentKey.ratecard_rural_shipment_fee, DeliveryOptionCostDetailComponentKey.center_commercial_invoice_fee, DeliveryOptionCostDetailComponentKey.center_inbound_carton_fee, DeliveryOptionCostDetailComponentKey.center_outbound_carton_fee]
|
9453
|
+
end
|
9454
|
+
|
9455
|
+
def DeliveryOptionCostDetailComponentKey.ratecard_base_cost
|
9456
|
+
@@_ratecard_base_cost ||= DeliveryOptionCostDetailComponentKey.new('ratecard_base_cost')
|
9457
|
+
end
|
9458
|
+
|
9459
|
+
def DeliveryOptionCostDetailComponentKey.ratecard_ddp_fee
|
9460
|
+
@@_ratecard_ddp_fee ||= DeliveryOptionCostDetailComponentKey.new('ratecard_ddp_fee')
|
9461
|
+
end
|
9462
|
+
|
9463
|
+
def DeliveryOptionCostDetailComponentKey.ratecard_fuel_surcharge
|
9464
|
+
@@_ratecard_fuel_surcharge ||= DeliveryOptionCostDetailComponentKey.new('ratecard_fuel_surcharge')
|
9465
|
+
end
|
9466
|
+
|
9467
|
+
def DeliveryOptionCostDetailComponentKey.ratecard_oversized_shipment_fee
|
9468
|
+
@@_ratecard_oversized_shipment_fee ||= DeliveryOptionCostDetailComponentKey.new('ratecard_oversized_shipment_fee')
|
9469
|
+
end
|
9470
|
+
|
9471
|
+
def DeliveryOptionCostDetailComponentKey.ratecard_rural_shipment_fee
|
9472
|
+
@@_ratecard_rural_shipment_fee ||= DeliveryOptionCostDetailComponentKey.new('ratecard_rural_shipment_fee')
|
9473
|
+
end
|
9474
|
+
|
9475
|
+
def DeliveryOptionCostDetailComponentKey.center_commercial_invoice_fee
|
9476
|
+
@@_center_commercial_invoice_fee ||= DeliveryOptionCostDetailComponentKey.new('center_commercial_invoice_fee')
|
9477
|
+
end
|
9478
|
+
|
9479
|
+
def DeliveryOptionCostDetailComponentKey.center_inbound_carton_fee
|
9480
|
+
@@_center_inbound_carton_fee ||= DeliveryOptionCostDetailComponentKey.new('center_inbound_carton_fee')
|
9481
|
+
end
|
9482
|
+
|
9483
|
+
def DeliveryOptionCostDetailComponentKey.center_outbound_carton_fee
|
9484
|
+
@@_center_outbound_carton_fee ||= DeliveryOptionCostDetailComponentKey.new('center_outbound_carton_fee')
|
9485
|
+
end
|
9486
|
+
|
9487
|
+
def to_hash
|
9488
|
+
value
|
9489
|
+
end
|
9490
|
+
|
9491
|
+
end
|
9492
|
+
|
9493
|
+
class DeliveryOptionCostDetailSource
|
9494
|
+
|
9495
|
+
attr_reader :value
|
9496
|
+
|
9497
|
+
def initialize(value)
|
9498
|
+
@value = HttpClient::Preconditions.assert_class('value', value, String)
|
9499
|
+
end
|
9500
|
+
|
9501
|
+
# Returns the instance of DeliveryOptionCostDetailSource for this value, creating a new instance for an unknown value
|
9502
|
+
def DeliveryOptionCostDetailSource.apply(value)
|
9503
|
+
if value.instance_of?(DeliveryOptionCostDetailSource)
|
9504
|
+
value
|
9505
|
+
else
|
9506
|
+
HttpClient::Preconditions.assert_class_or_nil('value', value, String)
|
9507
|
+
value.nil? ? nil : (from_string(value) || DeliveryOptionCostDetailSource.new(value))
|
9508
|
+
end
|
9509
|
+
end
|
9510
|
+
|
9511
|
+
# Returns the instance of DeliveryOptionCostDetailSource for this value, or nil if not found
|
9512
|
+
def DeliveryOptionCostDetailSource.from_string(value)
|
9513
|
+
HttpClient::Preconditions.assert_class('value', value, String)
|
9514
|
+
DeliveryOptionCostDetailSource.ALL.find { |v| v.value == value }
|
9515
|
+
end
|
9516
|
+
|
9517
|
+
def DeliveryOptionCostDetailSource.ALL
|
9518
|
+
@@all ||= [DeliveryOptionCostDetailSource.center, DeliveryOptionCostDetailSource.ratecard]
|
9519
|
+
end
|
9520
|
+
|
9521
|
+
def DeliveryOptionCostDetailSource.center
|
9522
|
+
@@_center ||= DeliveryOptionCostDetailSource.new('center')
|
9523
|
+
end
|
9524
|
+
|
9525
|
+
def DeliveryOptionCostDetailSource.ratecard
|
9526
|
+
@@_ratecard ||= DeliveryOptionCostDetailSource.new('ratecard')
|
9527
|
+
end
|
9528
|
+
|
9529
|
+
def to_hash
|
9530
|
+
value
|
9531
|
+
end
|
9532
|
+
|
9533
|
+
end
|
9534
|
+
|
9362
9535
|
class DeliveryWindowComponentSource
|
9363
9536
|
|
9364
9537
|
attr_reader :value
|
@@ -11137,7 +11310,7 @@ module Io
|
|
11137
11310
|
end
|
11138
11311
|
|
11139
11312
|
def OrderErrorCode.ALL
|
11140
|
-
@@all ||= [OrderErrorCode.generic_error, OrderErrorCode.order_item_not_available, OrderErrorCode.order_identifier_error, OrderErrorCode.authorization_invalid, OrderErrorCode.domestic_shipping_unavailable, OrderErrorCode.value_threshold_exceeded, OrderErrorCode.invalid_currency, OrderErrorCode.invalid_country, OrderErrorCode.invalid_region, OrderErrorCode.invalid_language]
|
11313
|
+
@@all ||= [OrderErrorCode.generic_error, OrderErrorCode.order_item_not_available, OrderErrorCode.order_identifier_error, OrderErrorCode.authorization_invalid, OrderErrorCode.domestic_shipping_unavailable, OrderErrorCode.shipping_unavailable, OrderErrorCode.value_threshold_exceeded, OrderErrorCode.invalid_currency, OrderErrorCode.invalid_country, OrderErrorCode.invalid_region, OrderErrorCode.invalid_language]
|
11141
11314
|
end
|
11142
11315
|
|
11143
11316
|
def OrderErrorCode.generic_error
|
@@ -11164,13 +11337,18 @@ module Io
|
|
11164
11337
|
@@_authorization_invalid ||= OrderErrorCode.new('authorization_invalid')
|
11165
11338
|
end
|
11166
11339
|
|
11167
|
-
# Indicates that an order was created for a country
|
11168
|
-
#
|
11169
|
-
# an order for your domestic country
|
11340
|
+
# Indicates that an order was created for a country for one of your domicile
|
11341
|
+
# countries and you have asked Flow not to accept orders for this country.
|
11170
11342
|
def OrderErrorCode.domestic_shipping_unavailable
|
11171
11343
|
@@_domestic_shipping_unavailable ||= OrderErrorCode.new('domestic_shipping_unavailable')
|
11172
11344
|
end
|
11173
11345
|
|
11346
|
+
# Indicates that an order was created for a country to which you have asked Flow
|
11347
|
+
# not to ship.
|
11348
|
+
def OrderErrorCode.shipping_unavailable
|
11349
|
+
@@_shipping_unavailable ||= OrderErrorCode.new('shipping_unavailable')
|
11350
|
+
end
|
11351
|
+
|
11174
11352
|
# Indicates the order value exceeds the value threshold for destination and
|
11175
11353
|
# cannot be shipped. When specified, the order will also populate the threshold
|
11176
11354
|
# attribute.
|
@@ -15030,18 +15208,17 @@ module Io
|
|
15030
15208
|
|
15031
15209
|
class AuthorizationUpserted < Event
|
15032
15210
|
|
15033
|
-
attr_reader :event_id, :timestamp, :organization, :key, :order_number, :
|
15211
|
+
attr_reader :event_id, :timestamp, :organization, :key, :order_number, :amount, :currency, :customer, :attributes, :destination, :result, :ip, :created_at
|
15034
15212
|
|
15035
15213
|
def initialize(incoming={})
|
15036
15214
|
super(:discriminator => Event::Types::AUTHORIZATION_UPSERTED)
|
15037
15215
|
opts = HttpClient::Helper.symbolize_keys(incoming)
|
15038
|
-
HttpClient::Preconditions.require_keys(opts, [:event_id, :timestamp, :organization, :key, :
|
15216
|
+
HttpClient::Preconditions.require_keys(opts, [:event_id, :timestamp, :organization, :key, :amount, :currency, :customer, :attributes, :result, :created_at], 'AuthorizationUpserted')
|
15039
15217
|
@event_id = HttpClient::Preconditions.assert_class('event_id', opts.delete(:event_id), String)
|
15040
15218
|
@timestamp = HttpClient::Preconditions.assert_class('timestamp', HttpClient::Helper.to_date_time_iso8601(opts.delete(:timestamp)), DateTime)
|
15041
15219
|
@organization = HttpClient::Preconditions.assert_class('organization', opts.delete(:organization), String)
|
15042
15220
|
@key = HttpClient::Preconditions.assert_class('key', opts.delete(:key), String)
|
15043
15221
|
@order_number = (x = opts.delete(:order_number); x.nil? ? nil : HttpClient::Preconditions.assert_class('order_number', x, String))
|
15044
|
-
@card = (x = opts.delete(:card); x.is_a?(::Io::Flow::V0::Models::ExpandableCard) ? x : ::Io::Flow::V0::Models::ExpandableCard.from_json(x))
|
15045
15222
|
@amount = HttpClient::Preconditions.assert_class('amount', HttpClient::Helper.to_big_decimal(opts.delete(:amount)), BigDecimal)
|
15046
15223
|
@currency = HttpClient::Preconditions.assert_class('currency', opts.delete(:currency), String)
|
15047
15224
|
@customer = (x = opts.delete(:customer); x.is_a?(::Io::Flow::V0::Models::Customer) ? x : ::Io::Flow::V0::Models::Customer.new(x))
|
@@ -15067,7 +15244,6 @@ module Io
|
|
15067
15244
|
:organization => organization,
|
15068
15245
|
:key => key,
|
15069
15246
|
:order_number => order_number,
|
15070
|
-
:card => card.to_hash,
|
15071
15247
|
:amount => amount,
|
15072
15248
|
:currency => currency,
|
15073
15249
|
:customer => customer.to_hash,
|
@@ -16813,6 +16989,34 @@ module Io
|
|
16813
16989
|
|
16814
16990
|
end
|
16815
16991
|
|
16992
|
+
class CenterReference
|
16993
|
+
|
16994
|
+
attr_reader :organization_id, :center_key
|
16995
|
+
|
16996
|
+
def initialize(incoming={})
|
16997
|
+
opts = HttpClient::Helper.symbolize_keys(incoming)
|
16998
|
+
HttpClient::Preconditions.require_keys(opts, [:organization_id, :center_key], 'CenterReference')
|
16999
|
+
@organization_id = HttpClient::Preconditions.assert_class('organization_id', opts.delete(:organization_id), String)
|
17000
|
+
@center_key = HttpClient::Preconditions.assert_class('center_key', opts.delete(:center_key), String)
|
17001
|
+
end
|
17002
|
+
|
17003
|
+
def to_json
|
17004
|
+
JSON.dump(to_hash)
|
17005
|
+
end
|
17006
|
+
|
17007
|
+
def copy(incoming={})
|
17008
|
+
CenterReference.new(to_hash.merge(HttpClient::Helper.symbolize_keys(incoming)))
|
17009
|
+
end
|
17010
|
+
|
17011
|
+
def to_hash
|
17012
|
+
{
|
17013
|
+
:organization_id => organization_id,
|
17014
|
+
:center_key => center_key
|
17015
|
+
}
|
17016
|
+
end
|
17017
|
+
|
17018
|
+
end
|
17019
|
+
|
16816
17020
|
class CenterSummary
|
16817
17021
|
|
16818
17022
|
attr_reader :id, :key
|
@@ -17034,6 +17238,33 @@ module Io
|
|
17034
17238
|
|
17035
17239
|
end
|
17036
17240
|
|
17241
|
+
class CommercialInvoiceFee < PartnerCenterFee
|
17242
|
+
|
17243
|
+
attr_reader :amount
|
17244
|
+
|
17245
|
+
def initialize(incoming={})
|
17246
|
+
super(:discriminator => PartnerCenterFee::Types::COMMERCIAL_INVOICE_FEE)
|
17247
|
+
opts = HttpClient::Helper.symbolize_keys(incoming)
|
17248
|
+
HttpClient::Preconditions.require_keys(opts, [:amount], 'CommercialInvoiceFee')
|
17249
|
+
@amount = (x = opts.delete(:amount); x.is_a?(::Io::Flow::V0::Models::Money) ? x : ::Io::Flow::V0::Models::Money.new(x))
|
17250
|
+
end
|
17251
|
+
|
17252
|
+
def to_json
|
17253
|
+
JSON.dump(to_hash)
|
17254
|
+
end
|
17255
|
+
|
17256
|
+
def copy(incoming={})
|
17257
|
+
CommercialInvoiceFee.new(subtype_to_hash.merge(HttpClient::Helper.symbolize_keys(incoming)))
|
17258
|
+
end
|
17259
|
+
|
17260
|
+
def subtype_to_hash
|
17261
|
+
{
|
17262
|
+
:amount => amount.to_hash
|
17263
|
+
}
|
17264
|
+
end
|
17265
|
+
|
17266
|
+
end
|
17267
|
+
|
17037
17268
|
# Defines structured fields for a contact person. Typically used for specifying
|
17038
17269
|
# contact person for an account, shipment, or organization representative
|
17039
17270
|
class Contact
|
@@ -17644,13 +17875,14 @@ module Io
|
|
17644
17875
|
# range and cost
|
17645
17876
|
class DeliveryOption
|
17646
17877
|
|
17647
|
-
attr_reader :id, :cost, :delivered_duty, :price, :service, :tier, :window, :rule_outcome, :weight, :send_to
|
17878
|
+
attr_reader :id, :cost, :cost_details, :delivered_duty, :price, :service, :tier, :window, :rule_outcome, :weight, :send_to
|
17648
17879
|
|
17649
17880
|
def initialize(incoming={})
|
17650
17881
|
opts = HttpClient::Helper.symbolize_keys(incoming)
|
17651
17882
|
HttpClient::Preconditions.require_keys(opts, [:id, :cost, :delivered_duty, :price, :service, :tier, :window], 'DeliveryOption')
|
17652
17883
|
@id = HttpClient::Preconditions.assert_class('id', opts.delete(:id), String)
|
17653
17884
|
@cost = (x = opts.delete(:cost); x.is_a?(::Io::Flow::V0::Models::PriceWithBase) ? x : ::Io::Flow::V0::Models::PriceWithBase.new(x))
|
17885
|
+
@cost_details = (x = opts.delete(:cost_details); x.nil? ? nil : HttpClient::Preconditions.assert_class('cost_details', x, Array).map { |v| (x = v; x.is_a?(::Io::Flow::V0::Models::DeliveryOptionCostDetail) ? x : ::Io::Flow::V0::Models::DeliveryOptionCostDetail.new(x)) })
|
17654
17886
|
@delivered_duty = (x = opts.delete(:delivered_duty); x.is_a?(::Io::Flow::V0::Models::DeliveredDuty) ? x : ::Io::Flow::V0::Models::DeliveredDuty.apply(x))
|
17655
17887
|
@price = (x = opts.delete(:price); x.is_a?(::Io::Flow::V0::Models::PriceWithBase) ? x : ::Io::Flow::V0::Models::PriceWithBase.new(x))
|
17656
17888
|
@service = (x = opts.delete(:service); x.is_a?(::Io::Flow::V0::Models::ServiceSummary) ? x : ::Io::Flow::V0::Models::ServiceSummary.new(x))
|
@@ -17673,6 +17905,7 @@ module Io
|
|
17673
17905
|
{
|
17674
17906
|
:id => id,
|
17675
17907
|
:cost => cost.to_hash,
|
17908
|
+
:cost_details => cost_details.nil? ? nil : cost_details.map { |o| o.to_hash },
|
17676
17909
|
:delivered_duty => delivered_duty.value,
|
17677
17910
|
:price => price.to_hash,
|
17678
17911
|
:service => service.to_hash,
|
@@ -17686,6 +17919,76 @@ module Io
|
|
17686
17919
|
|
17687
17920
|
end
|
17688
17921
|
|
17922
|
+
class DeliveryOptionCostComponent
|
17923
|
+
|
17924
|
+
attr_reader :key, :currency, :amount, :label, :base
|
17925
|
+
|
17926
|
+
def initialize(incoming={})
|
17927
|
+
opts = HttpClient::Helper.symbolize_keys(incoming)
|
17928
|
+
HttpClient::Preconditions.require_keys(opts, [:key, :currency, :amount, :label], 'DeliveryOptionCostComponent')
|
17929
|
+
@key = (x = opts.delete(:key); x.is_a?(::Io::Flow::V0::Models::DeliveryOptionCostDetailComponentKey) ? x : ::Io::Flow::V0::Models::DeliveryOptionCostDetailComponentKey.apply(x))
|
17930
|
+
@currency = HttpClient::Preconditions.assert_class('currency', opts.delete(:currency), String)
|
17931
|
+
@amount = HttpClient::Preconditions.assert_class('amount', HttpClient::Helper.to_big_decimal(opts.delete(:amount)), BigDecimal)
|
17932
|
+
@label = HttpClient::Preconditions.assert_class('label', opts.delete(:label), String)
|
17933
|
+
@base = (x = opts.delete(:base); x.nil? ? nil : (x = x; x.is_a?(::Io::Flow::V0::Models::Price) ? x : ::Io::Flow::V0::Models::Price.new(x)))
|
17934
|
+
end
|
17935
|
+
|
17936
|
+
def to_json
|
17937
|
+
JSON.dump(to_hash)
|
17938
|
+
end
|
17939
|
+
|
17940
|
+
def copy(incoming={})
|
17941
|
+
DeliveryOptionCostComponent.new(to_hash.merge(HttpClient::Helper.symbolize_keys(incoming)))
|
17942
|
+
end
|
17943
|
+
|
17944
|
+
def to_hash
|
17945
|
+
{
|
17946
|
+
:key => key.value,
|
17947
|
+
:currency => currency,
|
17948
|
+
:amount => amount,
|
17949
|
+
:label => label,
|
17950
|
+
:base => base.nil? ? nil : base.to_hash
|
17951
|
+
}
|
17952
|
+
end
|
17953
|
+
|
17954
|
+
end
|
17955
|
+
|
17956
|
+
class DeliveryOptionCostDetail
|
17957
|
+
|
17958
|
+
attr_reader :source, :currency, :amount, :label, :base, :components
|
17959
|
+
|
17960
|
+
def initialize(incoming={})
|
17961
|
+
opts = HttpClient::Helper.symbolize_keys(incoming)
|
17962
|
+
HttpClient::Preconditions.require_keys(opts, [:source, :currency, :amount, :label, :components], 'DeliveryOptionCostDetail')
|
17963
|
+
@source = (x = opts.delete(:source); x.is_a?(::Io::Flow::V0::Models::DeliveryOptionCostDetailSource) ? x : ::Io::Flow::V0::Models::DeliveryOptionCostDetailSource.apply(x))
|
17964
|
+
@currency = HttpClient::Preconditions.assert_class('currency', opts.delete(:currency), String)
|
17965
|
+
@amount = HttpClient::Preconditions.assert_class('amount', HttpClient::Helper.to_big_decimal(opts.delete(:amount)), BigDecimal)
|
17966
|
+
@label = HttpClient::Preconditions.assert_class('label', opts.delete(:label), String)
|
17967
|
+
@base = (x = opts.delete(:base); x.nil? ? nil : (x = x; x.is_a?(::Io::Flow::V0::Models::Price) ? x : ::Io::Flow::V0::Models::Price.new(x)))
|
17968
|
+
@components = HttpClient::Preconditions.assert_class('components', opts.delete(:components), Array).map { |v| (x = v; x.is_a?(::Io::Flow::V0::Models::DeliveryOptionCostComponent) ? x : ::Io::Flow::V0::Models::DeliveryOptionCostComponent.new(x)) }
|
17969
|
+
end
|
17970
|
+
|
17971
|
+
def to_json
|
17972
|
+
JSON.dump(to_hash)
|
17973
|
+
end
|
17974
|
+
|
17975
|
+
def copy(incoming={})
|
17976
|
+
DeliveryOptionCostDetail.new(to_hash.merge(HttpClient::Helper.symbolize_keys(incoming)))
|
17977
|
+
end
|
17978
|
+
|
17979
|
+
def to_hash
|
17980
|
+
{
|
17981
|
+
:source => source.value,
|
17982
|
+
:currency => currency,
|
17983
|
+
:amount => amount,
|
17984
|
+
:label => label,
|
17985
|
+
:base => base.nil? ? nil : base.to_hash,
|
17986
|
+
:components => components.map { |o| o.to_hash }
|
17987
|
+
}
|
17988
|
+
end
|
17989
|
+
|
17990
|
+
end
|
17991
|
+
|
17689
17992
|
class DeliveryOptionDeleted < Event
|
17690
17993
|
|
17691
17994
|
attr_reader :event_id, :timestamp, :organization, :id
|
@@ -21309,6 +21612,33 @@ module Io
|
|
21309
21612
|
|
21310
21613
|
end
|
21311
21614
|
|
21615
|
+
class InboundCartonFee < PartnerCenterFee
|
21616
|
+
|
21617
|
+
attr_reader :amount
|
21618
|
+
|
21619
|
+
def initialize(incoming={})
|
21620
|
+
super(:discriminator => PartnerCenterFee::Types::INBOUND_CARTON_FEE)
|
21621
|
+
opts = HttpClient::Helper.symbolize_keys(incoming)
|
21622
|
+
HttpClient::Preconditions.require_keys(opts, [:amount], 'InboundCartonFee')
|
21623
|
+
@amount = (x = opts.delete(:amount); x.is_a?(::Io::Flow::V0::Models::Money) ? x : ::Io::Flow::V0::Models::Money.new(x))
|
21624
|
+
end
|
21625
|
+
|
21626
|
+
def to_json
|
21627
|
+
JSON.dump(to_hash)
|
21628
|
+
end
|
21629
|
+
|
21630
|
+
def copy(incoming={})
|
21631
|
+
InboundCartonFee.new(subtype_to_hash.merge(HttpClient::Helper.symbolize_keys(incoming)))
|
21632
|
+
end
|
21633
|
+
|
21634
|
+
def subtype_to_hash
|
21635
|
+
{
|
21636
|
+
:amount => amount.to_hash
|
21637
|
+
}
|
21638
|
+
end
|
21639
|
+
|
21640
|
+
end
|
21641
|
+
|
21312
21642
|
class IncludedLevies
|
21313
21643
|
|
21314
21644
|
attr_reader :key, :label
|
@@ -24844,13 +25174,14 @@ module Io
|
|
24844
25174
|
|
24845
25175
|
end
|
24846
25176
|
|
24847
|
-
# An order represents all of the information about a particular line
|
24848
|
-
# including pricing, currency rates, delivery options, etc. All
|
24849
|
-
# an order is guaranteed by Flow - if an order is submitted
|
24850
|
-
# expiration. The intended use case is to create an order as a
|
24851
|
-
# checkout, then to submit that order as part of the user
|
24852
|
-
# order. Note that Flow will automatically mark an order
|
24853
|
-
# payment authorization
|
25177
|
+
# An order represents all of the information about a particular set of line
|
25178
|
+
# items, including pricing, currency rates, delivery options, etc. All
|
25179
|
+
# information in an order is guaranteed by Flow - if an order is submitted
|
25180
|
+
# before its expiration. The intended use case is to create an order as a
|
25181
|
+
# consumer enters checkout, then to submit that order as part of the user
|
25182
|
+
# submitting their order. Note that Flow will automatically mark an order
|
25183
|
+
# submitted if we see payment authorization(s) covering the full balance of an
|
25184
|
+
# order.
|
24854
25185
|
class Order < ExpandableOrder
|
24855
25186
|
|
24856
25187
|
attr_reader :id, :number, :experience, :customer, :delivered_duty, :destination, :expires_at, :items, :deliveries, :selections, :prices, :total, :attributes, :submitted_at, :lines, :identifiers, :promotions, :payments, :balance, :rules
|
@@ -26778,6 +27109,33 @@ module Io
|
|
26778
27109
|
|
26779
27110
|
end
|
26780
27111
|
|
27112
|
+
class OutboundCartonFee < PartnerCenterFee
|
27113
|
+
|
27114
|
+
attr_reader :amount
|
27115
|
+
|
27116
|
+
def initialize(incoming={})
|
27117
|
+
super(:discriminator => PartnerCenterFee::Types::OUTBOUND_CARTON_FEE)
|
27118
|
+
opts = HttpClient::Helper.symbolize_keys(incoming)
|
27119
|
+
HttpClient::Preconditions.require_keys(opts, [:amount], 'OutboundCartonFee')
|
27120
|
+
@amount = (x = opts.delete(:amount); x.is_a?(::Io::Flow::V0::Models::Money) ? x : ::Io::Flow::V0::Models::Money.new(x))
|
27121
|
+
end
|
27122
|
+
|
27123
|
+
def to_json
|
27124
|
+
JSON.dump(to_hash)
|
27125
|
+
end
|
27126
|
+
|
27127
|
+
def copy(incoming={})
|
27128
|
+
OutboundCartonFee.new(subtype_to_hash.merge(HttpClient::Helper.symbolize_keys(incoming)))
|
27129
|
+
end
|
27130
|
+
|
27131
|
+
def subtype_to_hash
|
27132
|
+
{
|
27133
|
+
:amount => amount.to_hash
|
27134
|
+
}
|
27135
|
+
end
|
27136
|
+
|
27137
|
+
end
|
27138
|
+
|
26781
27139
|
# Describes the outgoing feed constructed by Flow
|
26782
27140
|
class OutgoingFeed
|
26783
27141
|
|
@@ -26867,15 +27225,18 @@ module Io
|
|
26867
27225
|
|
26868
27226
|
end
|
26869
27227
|
|
27228
|
+
# Represents information about a partner (e.g. external 3PL) running the
|
27229
|
+
# fulfillment center
|
26870
27230
|
class PartnerCenter
|
26871
27231
|
|
26872
|
-
attr_reader :partner_reference, :number
|
27232
|
+
attr_reader :partner_reference, :number, :fees
|
26873
27233
|
|
26874
27234
|
def initialize(incoming={})
|
26875
27235
|
opts = HttpClient::Helper.symbolize_keys(incoming)
|
26876
27236
|
HttpClient::Preconditions.require_keys(opts, [:partner_reference], 'PartnerCenter')
|
26877
27237
|
@partner_reference = (x = opts.delete(:partner_reference); x.is_a?(::Io::Flow::V0::Models::PartnerReference) ? x : ::Io::Flow::V0::Models::PartnerReference.new(x))
|
26878
27238
|
@number = (x = opts.delete(:number); x.nil? ? nil : HttpClient::Preconditions.assert_class('number', x, String))
|
27239
|
+
@fees = (x = opts.delete(:fees); x.nil? ? nil : HttpClient::Preconditions.assert_class('fees', x, Array).map { |v| (x = v; x.is_a?(::Io::Flow::V0::Models::PartnerCenterFee) ? x : ::Io::Flow::V0::Models::PartnerCenterFee.from_json(x)) })
|
26879
27240
|
end
|
26880
27241
|
|
26881
27242
|
def to_json
|
@@ -26889,7 +27250,8 @@ module Io
|
|
26889
27250
|
def to_hash
|
26890
27251
|
{
|
26891
27252
|
:partner_reference => partner_reference.to_hash,
|
26892
|
-
:number => number
|
27253
|
+
:number => number,
|
27254
|
+
:fees => fees.nil? ? nil : fees.map { |o| o.to_hash }
|
26893
27255
|
}
|
26894
27256
|
end
|
26895
27257
|
|
@@ -26897,13 +27259,14 @@ module Io
|
|
26897
27259
|
|
26898
27260
|
class PartnerCenterForm
|
26899
27261
|
|
26900
|
-
attr_reader :partner_id, :number
|
27262
|
+
attr_reader :partner_id, :number, :fees
|
26901
27263
|
|
26902
27264
|
def initialize(incoming={})
|
26903
27265
|
opts = HttpClient::Helper.symbolize_keys(incoming)
|
26904
27266
|
HttpClient::Preconditions.require_keys(opts, [:partner_id], 'PartnerCenterForm')
|
26905
27267
|
@partner_id = HttpClient::Preconditions.assert_class('partner_id', opts.delete(:partner_id), String)
|
26906
27268
|
@number = (x = opts.delete(:number); x.nil? ? nil : HttpClient::Preconditions.assert_class('number', x, String))
|
27269
|
+
@fees = (x = opts.delete(:fees); x.nil? ? nil : HttpClient::Preconditions.assert_class('fees', x, Array).map { |v| (x = v; x.is_a?(::Io::Flow::V0::Models::PartnerCenterFee) ? x : ::Io::Flow::V0::Models::PartnerCenterFee.from_json(x)) })
|
26907
27270
|
end
|
26908
27271
|
|
26909
27272
|
def to_json
|
@@ -26917,7 +27280,8 @@ module Io
|
|
26917
27280
|
def to_hash
|
26918
27281
|
{
|
26919
27282
|
:partner_id => partner_id,
|
26920
|
-
:number => number
|
27283
|
+
:number => number,
|
27284
|
+
:fees => fees.nil? ? nil : fees.map { |o| o.to_hash }
|
26921
27285
|
}
|
26922
27286
|
end
|
26923
27287
|
|
@@ -29723,13 +30087,14 @@ module Io
|
|
29723
30087
|
|
29724
30088
|
class ReservationForm
|
29725
30089
|
|
29726
|
-
attr_reader :order_number, :items
|
30090
|
+
attr_reader :order_number, :items, :duration
|
29727
30091
|
|
29728
30092
|
def initialize(incoming={})
|
29729
30093
|
opts = HttpClient::Helper.symbolize_keys(incoming)
|
29730
30094
|
HttpClient::Preconditions.require_keys(opts, [:items], 'ReservationForm')
|
29731
30095
|
@order_number = (x = opts.delete(:order_number); x.nil? ? nil : HttpClient::Preconditions.assert_class('order_number', x, String))
|
29732
30096
|
@items = HttpClient::Preconditions.assert_class('items', opts.delete(:items), Array).map { |v| (x = v; x.is_a?(::Io::Flow::V0::Models::ReservationItemForm) ? x : ::Io::Flow::V0::Models::ReservationItemForm.new(x)) }
|
30097
|
+
@duration = (x = opts.delete(:duration); x.nil? ? nil : (x = x; x.is_a?(::Io::Flow::V0::Models::Duration) ? x : ::Io::Flow::V0::Models::Duration.new(x)))
|
29733
30098
|
end
|
29734
30099
|
|
29735
30100
|
def to_json
|
@@ -29743,7 +30108,8 @@ module Io
|
|
29743
30108
|
def to_hash
|
29744
30109
|
{
|
29745
30110
|
:order_number => order_number,
|
29746
|
-
:items => items.map { |o| o.to_hash }
|
30111
|
+
:items => items.map { |o| o.to_hash },
|
30112
|
+
:duration => duration.nil? ? nil : duration.to_hash
|
29747
30113
|
}
|
29748
30114
|
end
|
29749
30115
|
|
@@ -29751,13 +30117,14 @@ module Io
|
|
29751
30117
|
|
29752
30118
|
class ReservationItem
|
29753
30119
|
|
29754
|
-
attr_reader :item, :quantity
|
30120
|
+
attr_reader :item, :quantity, :serials
|
29755
30121
|
|
29756
30122
|
def initialize(incoming={})
|
29757
30123
|
opts = HttpClient::Helper.symbolize_keys(incoming)
|
29758
30124
|
HttpClient::Preconditions.require_keys(opts, [:item, :quantity], 'ReservationItem')
|
29759
30125
|
@item = (x = opts.delete(:item); x.is_a?(::Io::Flow::V0::Models::ReservationItemReference) ? x : ::Io::Flow::V0::Models::ReservationItemReference.new(x))
|
29760
30126
|
@quantity = HttpClient::Preconditions.assert_class('quantity', opts.delete(:quantity), Integer)
|
30127
|
+
@serials = (x = opts.delete(:serials); x.nil? ? nil : HttpClient::Preconditions.assert_class('serials', x, Array).map { |v| (x = v; x.is_a?(::Io::Flow::V0::Models::ReservationSerialReference) ? x : ::Io::Flow::V0::Models::ReservationSerialReference.new(x)) })
|
29761
30128
|
end
|
29762
30129
|
|
29763
30130
|
def to_json
|
@@ -29771,7 +30138,8 @@ module Io
|
|
29771
30138
|
def to_hash
|
29772
30139
|
{
|
29773
30140
|
:item => item.to_hash,
|
29774
|
-
:quantity => quantity
|
30141
|
+
:quantity => quantity,
|
30142
|
+
:serials => serials.nil? ? nil : serials.map { |o| o.to_hash }
|
29775
30143
|
}
|
29776
30144
|
end
|
29777
30145
|
|
@@ -29779,13 +30147,14 @@ module Io
|
|
29779
30147
|
|
29780
30148
|
class ReservationItemForm
|
29781
30149
|
|
29782
|
-
attr_reader :item_number, :quantity
|
30150
|
+
attr_reader :item_number, :quantity, :serial_numbers
|
29783
30151
|
|
29784
30152
|
def initialize(incoming={})
|
29785
30153
|
opts = HttpClient::Helper.symbolize_keys(incoming)
|
29786
|
-
HttpClient::Preconditions.require_keys(opts, [:item_number
|
30154
|
+
HttpClient::Preconditions.require_keys(opts, [:item_number], 'ReservationItemForm')
|
29787
30155
|
@item_number = HttpClient::Preconditions.assert_class('item_number', opts.delete(:item_number), String)
|
29788
|
-
@quantity = HttpClient::Preconditions.assert_class('quantity',
|
30156
|
+
@quantity = (x = opts.delete(:quantity); x.nil? ? nil : HttpClient::Preconditions.assert_class('quantity', x, Integer))
|
30157
|
+
@serial_numbers = (x = opts.delete(:serial_numbers); x.nil? ? nil : HttpClient::Preconditions.assert_class('serial_numbers', x, Array).map { |v| HttpClient::Preconditions.assert_class('serial_numbers', v, String) })
|
29789
30158
|
end
|
29790
30159
|
|
29791
30160
|
def to_json
|
@@ -29799,7 +30168,8 @@ module Io
|
|
29799
30168
|
def to_hash
|
29800
30169
|
{
|
29801
30170
|
:item_number => item_number,
|
29802
|
-
:quantity => quantity
|
30171
|
+
:quantity => quantity,
|
30172
|
+
:serial_numbers => serial_numbers.nil? ? nil : serial_numbers
|
29803
30173
|
}
|
29804
30174
|
end
|
29805
30175
|
|
@@ -29857,6 +30227,36 @@ module Io
|
|
29857
30227
|
|
29858
30228
|
end
|
29859
30229
|
|
30230
|
+
class ReservationSerialReference
|
30231
|
+
|
30232
|
+
attr_reader :number, :item_price, :center
|
30233
|
+
|
30234
|
+
def initialize(incoming={})
|
30235
|
+
opts = HttpClient::Helper.symbolize_keys(incoming)
|
30236
|
+
HttpClient::Preconditions.require_keys(opts, [:number, :item_price, :center], 'ReservationSerialReference')
|
30237
|
+
@number = HttpClient::Preconditions.assert_class('number', opts.delete(:number), String)
|
30238
|
+
@item_price = (x = opts.delete(:item_price); x.is_a?(::Io::Flow::V0::Models::Price) ? x : ::Io::Flow::V0::Models::Price.new(x))
|
30239
|
+
@center = (x = opts.delete(:center); x.is_a?(::Io::Flow::V0::Models::CenterReference) ? x : ::Io::Flow::V0::Models::CenterReference.new(x))
|
30240
|
+
end
|
30241
|
+
|
30242
|
+
def to_json
|
30243
|
+
JSON.dump(to_hash)
|
30244
|
+
end
|
30245
|
+
|
30246
|
+
def copy(incoming={})
|
30247
|
+
ReservationSerialReference.new(to_hash.merge(HttpClient::Helper.symbolize_keys(incoming)))
|
30248
|
+
end
|
30249
|
+
|
30250
|
+
def to_hash
|
30251
|
+
{
|
30252
|
+
:number => number,
|
30253
|
+
:item_price => item_price.to_hash,
|
30254
|
+
:center => center.to_hash
|
30255
|
+
}
|
30256
|
+
end
|
30257
|
+
|
30258
|
+
end
|
30259
|
+
|
29860
30260
|
class Return
|
29861
30261
|
|
29862
30262
|
attr_reader :id, :key, :items, :labels
|
@@ -30650,17 +31050,17 @@ module Io
|
|
30650
31050
|
# A unique identifier assigned to an individual item.
|
30651
31051
|
class Serial
|
30652
31052
|
|
30653
|
-
attr_reader :id, :number, :item_number, :item_price, :status, :
|
31053
|
+
attr_reader :id, :number, :item_number, :item_price, :status, :center, :attributes
|
30654
31054
|
|
30655
31055
|
def initialize(incoming={})
|
30656
31056
|
opts = HttpClient::Helper.symbolize_keys(incoming)
|
30657
|
-
HttpClient::Preconditions.require_keys(opts, [:id, :number, :item_number, :item_price, :status, :
|
31057
|
+
HttpClient::Preconditions.require_keys(opts, [:id, :number, :item_number, :item_price, :status, :center], 'Serial')
|
30658
31058
|
@id = HttpClient::Preconditions.assert_class('id', opts.delete(:id), String)
|
30659
31059
|
@number = HttpClient::Preconditions.assert_class('number', opts.delete(:number), String)
|
30660
31060
|
@item_number = HttpClient::Preconditions.assert_class('item_number', opts.delete(:item_number), String)
|
30661
31061
|
@item_price = (x = opts.delete(:item_price); x.is_a?(::Io::Flow::V0::Models::Price) ? x : ::Io::Flow::V0::Models::Price.new(x))
|
30662
31062
|
@status = (x = opts.delete(:status); x.is_a?(::Io::Flow::V0::Models::SerialStatus) ? x : ::Io::Flow::V0::Models::SerialStatus.apply(x))
|
30663
|
-
@
|
31063
|
+
@center = (x = opts.delete(:center); x.is_a?(::Io::Flow::V0::Models::CenterReference) ? x : ::Io::Flow::V0::Models::CenterReference.new(x))
|
30664
31064
|
@attributes = HttpClient::Preconditions.assert_class('attributes', (x = opts.delete(:attributes); x.nil? ? {} : x), Hash).inject({}) { |h, d| h[d[0]] = HttpClient::Preconditions.assert_class('attributes', d[1], String); h }
|
30665
31065
|
end
|
30666
31066
|
|
@@ -30679,7 +31079,7 @@ module Io
|
|
30679
31079
|
:item_number => item_number,
|
30680
31080
|
:item_price => item_price.to_hash,
|
30681
31081
|
:status => status.value,
|
30682
|
-
:
|
31082
|
+
:center => center.to_hash,
|
30683
31083
|
:attributes => attributes
|
30684
31084
|
}
|
30685
31085
|
end
|
@@ -31217,7 +31617,7 @@ module Io
|
|
31217
31617
|
|
31218
31618
|
class ShippingAddress
|
31219
31619
|
|
31220
|
-
attr_reader :contact, :location, :center_key
|
31620
|
+
attr_reader :contact, :location, :center_key, :center_reference
|
31221
31621
|
|
31222
31622
|
def initialize(incoming={})
|
31223
31623
|
opts = HttpClient::Helper.symbolize_keys(incoming)
|
@@ -31225,6 +31625,7 @@ module Io
|
|
31225
31625
|
@contact = (x = opts.delete(:contact); x.is_a?(::Io::Flow::V0::Models::Contact) ? x : ::Io::Flow::V0::Models::Contact.new(x))
|
31226
31626
|
@location = (x = opts.delete(:location); x.is_a?(::Io::Flow::V0::Models::Address) ? x : ::Io::Flow::V0::Models::Address.new(x))
|
31227
31627
|
@center_key = (x = opts.delete(:center_key); x.nil? ? nil : HttpClient::Preconditions.assert_class('center_key', x, String))
|
31628
|
+
@center_reference = (x = opts.delete(:center_reference); x.nil? ? nil : (x = x; x.is_a?(::Io::Flow::V0::Models::CenterReference) ? x : ::Io::Flow::V0::Models::CenterReference.new(x)))
|
31228
31629
|
end
|
31229
31630
|
|
31230
31631
|
def to_json
|
@@ -31239,7 +31640,8 @@ module Io
|
|
31239
31640
|
{
|
31240
31641
|
:contact => contact.to_hash,
|
31241
31642
|
:location => location.to_hash,
|
31242
|
-
:center_key => center_key
|
31643
|
+
:center_key => center_key,
|
31644
|
+
:center_reference => center_reference.nil? ? nil : center_reference.to_hash
|
31243
31645
|
}
|
31244
31646
|
end
|
31245
31647
|
|
@@ -31344,7 +31746,7 @@ module Io
|
|
31344
31746
|
|
31345
31747
|
class ShippingLabelForm
|
31346
31748
|
|
31347
|
-
attr_reader :destination, :origin, :package, :attributes, :delivered_duty, :order_number, :service, :shipment_recipient
|
31749
|
+
attr_reader :destination, :origin, :package, :attributes, :delivered_duty, :direction, :order_number, :service, :shipment_recipient
|
31348
31750
|
|
31349
31751
|
def initialize(incoming={})
|
31350
31752
|
opts = HttpClient::Helper.symbolize_keys(incoming)
|
@@ -31354,6 +31756,7 @@ module Io
|
|
31354
31756
|
@package = (x = opts.delete(:package); x.is_a?(::Io::Flow::V0::Models::ShippingLabelPackage) ? x : ::Io::Flow::V0::Models::ShippingLabelPackage.new(x))
|
31355
31757
|
@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 })
|
31356
31758
|
@delivered_duty = (x = opts.delete(:delivered_duty); x.nil? ? nil : (x = x; x.is_a?(::Io::Flow::V0::Models::DeliveredDuty) ? x : ::Io::Flow::V0::Models::DeliveredDuty.apply(x)))
|
31759
|
+
@direction = (x = opts.delete(:direction); x.nil? ? nil : (x = x; x.is_a?(::Io::Flow::V0::Models::Direction) ? x : ::Io::Flow::V0::Models::Direction.apply(x)))
|
31357
31760
|
@order_number = (x = opts.delete(:order_number); x.nil? ? nil : HttpClient::Preconditions.assert_class('order_number', x, String))
|
31358
31761
|
@service = (x = opts.delete(:service); x.nil? ? nil : HttpClient::Preconditions.assert_class('service', x, String))
|
31359
31762
|
@shipment_recipient = (x = opts.delete(:shipment_recipient); x.nil? ? nil : (x = x; x.is_a?(::Io::Flow::V0::Models::ShipmentRecipient) ? x : ::Io::Flow::V0::Models::ShipmentRecipient.apply(x)))
|
@@ -31374,6 +31777,7 @@ module Io
|
|
31374
31777
|
:package => package.to_hash,
|
31375
31778
|
:attributes => attributes.nil? ? nil : attributes,
|
31376
31779
|
:delivered_duty => delivered_duty.nil? ? nil : delivered_duty.value,
|
31780
|
+
:direction => direction.nil? ? nil : direction.value,
|
31377
31781
|
:order_number => order_number,
|
31378
31782
|
:service => service,
|
31379
31783
|
:shipment_recipient => shipment_recipient.nil? ? nil : shipment_recipient.value
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: flowcommerce
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.59
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Flow Commerce, Inc.
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-04-
|
11
|
+
date: 2018-04-24 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: json
|