flowcommerce 0.0.32 → 0.0.33
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/flow_commerce/flow_api_v0_client.rb +67 -821
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 0f591f5d199c703ad24544f1329ea4b836a43252
|
4
|
+
data.tar.gz: 1027250eec5a737da472d126bd0658eec7873cfd
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5e72133c87aadf550cc6b76f574da55926ddff1f41ab71ad800f5cf0b258b71a2079985d753d1f760822d2e6e643d63c8b4947a087eaa8a74f2da6410c89a7f7
|
7
|
+
data.tar.gz: 91c72dbd01f657f122cb59f9f401f9b89a78c8b08bd54c2eefc307f176708d091b31ad1e63dc2daba77cfb7b3731f17d3308c97e3330a73a5425e17d4fbe49bd
|
@@ -1,6 +1,6 @@
|
|
1
1
|
# Generated by apidoc - http://www.apidoc.me
|
2
|
-
# Service version: 0.0.
|
3
|
-
# apidoc:0.11.33 http://www.apidoc.me/flow/api/0.0.
|
2
|
+
# Service version: 0.0.98
|
3
|
+
# apidoc:0.11.33 http://www.apidoc.me/flow/api/0.0.98/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 = 'apidoc:0.11.33 http://www.apidoc.me/flow/api/0.0.
|
29
|
-
VERSION = '0.0.
|
28
|
+
USER_AGENT = 'apidoc:0.11.33 http://www.apidoc.me/flow/api/0.0.98/ruby_client' unless defined?(Constants::USER_AGENT)
|
29
|
+
VERSION = '0.0.98' unless defined?(Constants::VERSION)
|
30
30
|
VERSION_MAJOR = 0 unless defined?(VERSION_MAJOR)
|
31
31
|
|
32
32
|
end
|
@@ -193,22 +193,6 @@ module Io
|
|
193
193
|
@quotes ||= ::Io::Flow::V0::Clients::Quotes.new(self)
|
194
194
|
end
|
195
195
|
|
196
|
-
def ratecards
|
197
|
-
@ratecards ||= ::Io::Flow::V0::Clients::Ratecards.new(self)
|
198
|
-
end
|
199
|
-
|
200
|
-
def ratecard_estimates
|
201
|
-
@ratecard_estimates ||= ::Io::Flow::V0::Clients::RatecardEstimates.new(self)
|
202
|
-
end
|
203
|
-
|
204
|
-
def ratecard_lanes
|
205
|
-
@ratecard_lanes ||= ::Io::Flow::V0::Clients::RatecardLanes.new(self)
|
206
|
-
end
|
207
|
-
|
208
|
-
def ratecard_rates
|
209
|
-
@ratecard_rates ||= ::Io::Flow::V0::Clients::RatecardRates.new(self)
|
210
|
-
end
|
211
|
-
|
212
196
|
def services
|
213
197
|
@services ||= ::Io::Flow::V0::Clients::Services.new(self)
|
214
198
|
end
|
@@ -2350,229 +2334,6 @@ module Io
|
|
2350
2334
|
|
2351
2335
|
end
|
2352
2336
|
|
2353
|
-
class Ratecards
|
2354
|
-
|
2355
|
-
def initialize(client)
|
2356
|
-
@client = HttpClient::Preconditions.assert_class('client', client, ::Io::Flow::V0::Client)
|
2357
|
-
end
|
2358
|
-
|
2359
|
-
def get(organization, incoming={})
|
2360
|
-
HttpClient::Preconditions.assert_class('organization', organization, String)
|
2361
|
-
opts = HttpClient::Helper.symbolize_keys(incoming)
|
2362
|
-
query = {
|
2363
|
-
:id => (x = opts.delete(:id); x.nil? ? nil : HttpClient::Preconditions.assert_class('id', x, Array).map { |v| HttpClient::Preconditions.assert_class('id', v, String) }),
|
2364
|
-
:number => (x = opts.delete(:number); x.nil? ? nil : HttpClient::Preconditions.assert_class('number', x, String)),
|
2365
|
-
:service => (x = opts.delete(:service); x.nil? ? nil : HttpClient::Preconditions.assert_class('service', x, String)),
|
2366
|
-
:limit => HttpClient::Preconditions.assert_class('limit', (x = opts.delete(:limit); x.nil? ? 25 : x), Integer),
|
2367
|
-
:offset => HttpClient::Preconditions.assert_class('offset', (x = opts.delete(:offset); x.nil? ? 0 : x), Integer),
|
2368
|
-
:sort => HttpClient::Preconditions.assert_class('sort', (x = opts.delete(:sort); x.nil? ? "-created_at" : x), String)
|
2369
|
-
}.delete_if { |k, v| v.nil? }
|
2370
|
-
r = @client.request("/#{CGI.escape(organization)}/ratecards").with_query(query).get
|
2371
|
-
r.map { |x| ::Io::Flow::V0::Models::Ratecard.new(x) }
|
2372
|
-
end
|
2373
|
-
|
2374
|
-
def post(organization, ratecard_form)
|
2375
|
-
HttpClient::Preconditions.assert_class('organization', organization, String)
|
2376
|
-
HttpClient::Preconditions.assert_class('ratecard_form', ratecard_form, ::Io::Flow::V0::Models::RatecardForm)
|
2377
|
-
r = @client.request("/#{CGI.escape(organization)}/ratecards").with_json(ratecard_form.to_json).post
|
2378
|
-
::Io::Flow::V0::Models::Ratecard.new(r)
|
2379
|
-
end
|
2380
|
-
|
2381
|
-
def get_by_id(organization, id)
|
2382
|
-
HttpClient::Preconditions.assert_class('organization', organization, String)
|
2383
|
-
HttpClient::Preconditions.assert_class('id', id, String)
|
2384
|
-
r = @client.request("/#{CGI.escape(organization)}/ratecards/#{CGI.escape(id)}").get
|
2385
|
-
::Io::Flow::V0::Models::Ratecard.new(r)
|
2386
|
-
end
|
2387
|
-
|
2388
|
-
def put_publish_by_id(organization, id, hash)
|
2389
|
-
HttpClient::Preconditions.assert_class('organization', organization, String)
|
2390
|
-
HttpClient::Preconditions.assert_class('id', id, String)
|
2391
|
-
HttpClient::Preconditions.assert_class('hash', hash, Hash)
|
2392
|
-
r = @client.request("/#{CGI.escape(organization)}/ratecards/#{CGI.escape(id)}/publish").with_json(hash.to_json).put
|
2393
|
-
::Io::Flow::V0::Models::Ratecard.new(r)
|
2394
|
-
end
|
2395
|
-
|
2396
|
-
def get_versions(organization, incoming={})
|
2397
|
-
HttpClient::Preconditions.assert_class('organization', organization, String)
|
2398
|
-
opts = HttpClient::Helper.symbolize_keys(incoming)
|
2399
|
-
query = {
|
2400
|
-
:id => (x = opts.delete(:id); x.nil? ? nil : HttpClient::Preconditions.assert_class('id', x, Array).map { |v| HttpClient::Preconditions.assert_class('id', v, String) }),
|
2401
|
-
:limit => HttpClient::Preconditions.assert_class('limit', (x = opts.delete(:limit); x.nil? ? 25 : x), Integer),
|
2402
|
-
:offset => HttpClient::Preconditions.assert_class('offset', (x = opts.delete(:offset); x.nil? ? 0 : x), Integer),
|
2403
|
-
:sort => HttpClient::Preconditions.assert_class('sort', (x = opts.delete(:sort); x.nil? ? "journal_timestamp" : x), String)
|
2404
|
-
}.delete_if { |k, v| v.nil? }
|
2405
|
-
r = @client.request("/#{CGI.escape(organization)}/ratecards/versions").with_query(query).get
|
2406
|
-
r.map { |x| ::Io::Flow::V0::Models::RatecardVersion.new(x) }
|
2407
|
-
end
|
2408
|
-
|
2409
|
-
end
|
2410
|
-
|
2411
|
-
class RatecardEstimates
|
2412
|
-
|
2413
|
-
def initialize(client)
|
2414
|
-
@client = HttpClient::Preconditions.assert_class('client', client, ::Io::Flow::V0::Client)
|
2415
|
-
end
|
2416
|
-
|
2417
|
-
# Endpoint to get shipment cost estimates based on applicable rate cards. An
|
2418
|
-
# origin and destination address must be provided. Final amounts are based on
|
2419
|
-
# either gravitational weight or dimensional weight. When estimating based off
|
2420
|
-
# gravitational weight, the weight field must be set. When estimating based
|
2421
|
-
# off dimensional weight, then length/width/depth must be set. For either one,
|
2422
|
-
# the appropriate unit of measurement must be given.
|
2423
|
-
def get(organization, incoming={})
|
2424
|
-
HttpClient::Preconditions.assert_class('organization', organization, String)
|
2425
|
-
opts = HttpClient::Helper.symbolize_keys(incoming)
|
2426
|
-
query = {
|
2427
|
-
:origin => (x = opts.delete(:origin); x.nil? ? nil : HttpClient::Preconditions.assert_class('origin', x, String)),
|
2428
|
-
:destination => (x = opts.delete(:destination); x.nil? ? nil : HttpClient::Preconditions.assert_class('destination', x, String)),
|
2429
|
-
:weight_unit => (x = opts.delete(:weight_unit); x.nil? ? nil : (x = x; x.is_a?(::Io::Flow::V0::Models::UnitOfMeasurement) ? x : ::Io::Flow::V0::Models::UnitOfMeasurement.apply(x)).value),
|
2430
|
-
:distance_unit => (x = opts.delete(:distance_unit); x.nil? ? nil : (x = x; x.is_a?(::Io::Flow::V0::Models::UnitOfMeasurement) ? x : ::Io::Flow::V0::Models::UnitOfMeasurement.apply(x)).value),
|
2431
|
-
:service => (x = opts.delete(:service); x.nil? ? nil : HttpClient::Preconditions.assert_class('service', x, String)),
|
2432
|
-
:weight => (x = opts.delete(:weight); x.nil? ? nil : HttpClient::Preconditions.assert_class('weight', x, Numeric)),
|
2433
|
-
:length => (x = opts.delete(:length); x.nil? ? nil : HttpClient::Preconditions.assert_class('length', x, Numeric)),
|
2434
|
-
:width => (x = opts.delete(:width); x.nil? ? nil : HttpClient::Preconditions.assert_class('width', x, Numeric)),
|
2435
|
-
:depth => (x = opts.delete(:depth); x.nil? ? nil : HttpClient::Preconditions.assert_class('depth', x, Numeric)),
|
2436
|
-
:limit => HttpClient::Preconditions.assert_class('limit', (x = opts.delete(:limit); x.nil? ? 25 : x), Integer),
|
2437
|
-
:offset => HttpClient::Preconditions.assert_class('offset', (x = opts.delete(:offset); x.nil? ? 0 : x), Integer),
|
2438
|
-
:sort => HttpClient::Preconditions.assert_class('sort', (x = opts.delete(:sort); x.nil? ? "-created_at" : x), String)
|
2439
|
-
}.delete_if { |k, v| v.nil? }
|
2440
|
-
r = @client.request("/#{CGI.escape(organization)}/ratecard_estimates").with_query(query).get
|
2441
|
-
r.map { |x| ::Io::Flow::V0::Models::RatecardEstimate.new(x) }
|
2442
|
-
end
|
2443
|
-
|
2444
|
-
end
|
2445
|
-
|
2446
|
-
class RatecardLanes
|
2447
|
-
|
2448
|
-
def initialize(client)
|
2449
|
-
@client = HttpClient::Preconditions.assert_class('client', client, ::Io::Flow::V0::Client)
|
2450
|
-
end
|
2451
|
-
|
2452
|
-
def get(organization, ratecard_id, incoming={})
|
2453
|
-
HttpClient::Preconditions.assert_class('organization', organization, String)
|
2454
|
-
HttpClient::Preconditions.assert_class('ratecard_id', ratecard_id, String)
|
2455
|
-
opts = HttpClient::Helper.symbolize_keys(incoming)
|
2456
|
-
query = {
|
2457
|
-
:id => (x = opts.delete(:id); x.nil? ? nil : HttpClient::Preconditions.assert_class('id', x, Array).map { |v| HttpClient::Preconditions.assert_class('id', v, String) }),
|
2458
|
-
:origin => (x = opts.delete(:origin); x.nil? ? nil : HttpClient::Preconditions.assert_class('origin', x, String)),
|
2459
|
-
:destination => (x = opts.delete(:destination); x.nil? ? nil : HttpClient::Preconditions.assert_class('destination', x, String)),
|
2460
|
-
:limit => HttpClient::Preconditions.assert_class('limit', (x = opts.delete(:limit); x.nil? ? 25 : x), Integer),
|
2461
|
-
:offset => HttpClient::Preconditions.assert_class('offset', (x = opts.delete(:offset); x.nil? ? 0 : x), Integer),
|
2462
|
-
:sort => HttpClient::Preconditions.assert_class('sort', (x = opts.delete(:sort); x.nil? ? "-created_at" : x), String)
|
2463
|
-
}.delete_if { |k, v| v.nil? }
|
2464
|
-
r = @client.request("/#{CGI.escape(organization)}/ratecards/#{CGI.escape(ratecard_id)}/lanes").with_query(query).get
|
2465
|
-
r.map { |x| ::Io::Flow::V0::Models::RatecardLane.new(x) }
|
2466
|
-
end
|
2467
|
-
|
2468
|
-
def post(organization, ratecard_id, ratecard_lane_form)
|
2469
|
-
HttpClient::Preconditions.assert_class('organization', organization, String)
|
2470
|
-
HttpClient::Preconditions.assert_class('ratecard_id', ratecard_id, String)
|
2471
|
-
HttpClient::Preconditions.assert_class('ratecard_lane_form', ratecard_lane_form, ::Io::Flow::V0::Models::RatecardLaneForm)
|
2472
|
-
r = @client.request("/#{CGI.escape(organization)}/ratecards/#{CGI.escape(ratecard_id)}/lanes").with_json(ratecard_lane_form.to_json).post
|
2473
|
-
::Io::Flow::V0::Models::RatecardLane.new(r)
|
2474
|
-
end
|
2475
|
-
|
2476
|
-
def get_by_id(organization, ratecard_id, id)
|
2477
|
-
HttpClient::Preconditions.assert_class('organization', organization, String)
|
2478
|
-
HttpClient::Preconditions.assert_class('ratecard_id', ratecard_id, String)
|
2479
|
-
HttpClient::Preconditions.assert_class('id', id, String)
|
2480
|
-
r = @client.request("/#{CGI.escape(organization)}/ratecards/#{CGI.escape(ratecard_id)}/lanes/#{CGI.escape(id)}").get
|
2481
|
-
::Io::Flow::V0::Models::RatecardLane.new(r)
|
2482
|
-
end
|
2483
|
-
|
2484
|
-
def put_by_id(organization, ratecard_id, id, ratecard_lane_form)
|
2485
|
-
HttpClient::Preconditions.assert_class('organization', organization, String)
|
2486
|
-
HttpClient::Preconditions.assert_class('ratecard_id', ratecard_id, String)
|
2487
|
-
HttpClient::Preconditions.assert_class('id', id, String)
|
2488
|
-
HttpClient::Preconditions.assert_class('ratecard_lane_form', ratecard_lane_form, ::Io::Flow::V0::Models::RatecardLaneForm)
|
2489
|
-
r = @client.request("/#{CGI.escape(organization)}/ratecards/#{CGI.escape(ratecard_id)}/lanes/#{CGI.escape(id)}").with_json(ratecard_lane_form.to_json).put
|
2490
|
-
::Io::Flow::V0::Models::RatecardLane.new(r)
|
2491
|
-
end
|
2492
|
-
|
2493
|
-
def get_versions(organization, ratecard_id, incoming={})
|
2494
|
-
HttpClient::Preconditions.assert_class('organization', organization, String)
|
2495
|
-
HttpClient::Preconditions.assert_class('ratecard_id', ratecard_id, String)
|
2496
|
-
opts = HttpClient::Helper.symbolize_keys(incoming)
|
2497
|
-
query = {
|
2498
|
-
:id => (x = opts.delete(:id); x.nil? ? nil : HttpClient::Preconditions.assert_class('id', x, Array).map { |v| HttpClient::Preconditions.assert_class('id', v, String) }),
|
2499
|
-
:limit => HttpClient::Preconditions.assert_class('limit', (x = opts.delete(:limit); x.nil? ? 25 : x), Integer),
|
2500
|
-
:offset => HttpClient::Preconditions.assert_class('offset', (x = opts.delete(:offset); x.nil? ? 0 : x), Integer),
|
2501
|
-
:sort => HttpClient::Preconditions.assert_class('sort', (x = opts.delete(:sort); x.nil? ? "journal_timestamp" : x), String)
|
2502
|
-
}.delete_if { |k, v| v.nil? }
|
2503
|
-
r = @client.request("/#{CGI.escape(organization)}/ratecards/#{CGI.escape(ratecard_id)}/lanes/versions").with_query(query).get
|
2504
|
-
r.map { |x| ::Io::Flow::V0::Models::RatecardLaneVersion.new(x) }
|
2505
|
-
end
|
2506
|
-
|
2507
|
-
end
|
2508
|
-
|
2509
|
-
class RatecardRates
|
2510
|
-
|
2511
|
-
def initialize(client)
|
2512
|
-
@client = HttpClient::Preconditions.assert_class('client', client, ::Io::Flow::V0::Client)
|
2513
|
-
end
|
2514
|
-
|
2515
|
-
def get(organization, ratecard_id, lane_id, incoming={})
|
2516
|
-
HttpClient::Preconditions.assert_class('organization', organization, String)
|
2517
|
-
HttpClient::Preconditions.assert_class('ratecard_id', ratecard_id, String)
|
2518
|
-
HttpClient::Preconditions.assert_class('lane_id', lane_id, String)
|
2519
|
-
opts = HttpClient::Helper.symbolize_keys(incoming)
|
2520
|
-
query = {
|
2521
|
-
:id => (x = opts.delete(:id); x.nil? ? nil : HttpClient::Preconditions.assert_class('id', x, Array).map { |v| HttpClient::Preconditions.assert_class('id', v, String) }),
|
2522
|
-
:weight => (x = opts.delete(:weight); x.nil? ? nil : HttpClient::Preconditions.assert_class('weight', x, Array).map { |v| HttpClient::Preconditions.assert_class('weight', v, Numeric) }),
|
2523
|
-
:limit => HttpClient::Preconditions.assert_class('limit', (x = opts.delete(:limit); x.nil? ? 25 : x), Integer),
|
2524
|
-
:offset => HttpClient::Preconditions.assert_class('offset', (x = opts.delete(:offset); x.nil? ? 0 : x), Integer),
|
2525
|
-
:sort => HttpClient::Preconditions.assert_class('sort', (x = opts.delete(:sort); x.nil? ? "-created_at" : x), String)
|
2526
|
-
}.delete_if { |k, v| v.nil? }
|
2527
|
-
r = @client.request("/#{CGI.escape(organization)}/ratecards/#{CGI.escape(ratecard_id)}/lanes/#{CGI.escape(lane_id)}/rates").with_query(query).get
|
2528
|
-
r.map { |x| ::Io::Flow::V0::Models::RatecardRate.new(x) }
|
2529
|
-
end
|
2530
|
-
|
2531
|
-
def post(organization, ratecard_id, lane_id, ratecard_rate_form)
|
2532
|
-
HttpClient::Preconditions.assert_class('organization', organization, String)
|
2533
|
-
HttpClient::Preconditions.assert_class('ratecard_id', ratecard_id, String)
|
2534
|
-
HttpClient::Preconditions.assert_class('lane_id', lane_id, String)
|
2535
|
-
HttpClient::Preconditions.assert_class('ratecard_rate_form', ratecard_rate_form, ::Io::Flow::V0::Models::RatecardRateForm)
|
2536
|
-
r = @client.request("/#{CGI.escape(organization)}/ratecards/#{CGI.escape(ratecard_id)}/lanes/#{CGI.escape(lane_id)}/rates").with_json(ratecard_rate_form.to_json).post
|
2537
|
-
::Io::Flow::V0::Models::RatecardRate.new(r)
|
2538
|
-
end
|
2539
|
-
|
2540
|
-
def get_by_id(organization, ratecard_id, lane_id, id)
|
2541
|
-
HttpClient::Preconditions.assert_class('organization', organization, String)
|
2542
|
-
HttpClient::Preconditions.assert_class('ratecard_id', ratecard_id, String)
|
2543
|
-
HttpClient::Preconditions.assert_class('lane_id', lane_id, String)
|
2544
|
-
HttpClient::Preconditions.assert_class('id', id, String)
|
2545
|
-
r = @client.request("/#{CGI.escape(organization)}/ratecards/#{CGI.escape(ratecard_id)}/lanes/#{CGI.escape(lane_id)}/rates/#{CGI.escape(id)}").get
|
2546
|
-
::Io::Flow::V0::Models::RatecardRate.new(r)
|
2547
|
-
end
|
2548
|
-
|
2549
|
-
def put_by_id(organization, ratecard_id, lane_id, id, ratecard_lane_form)
|
2550
|
-
HttpClient::Preconditions.assert_class('organization', organization, String)
|
2551
|
-
HttpClient::Preconditions.assert_class('ratecard_id', ratecard_id, String)
|
2552
|
-
HttpClient::Preconditions.assert_class('lane_id', lane_id, String)
|
2553
|
-
HttpClient::Preconditions.assert_class('id', id, String)
|
2554
|
-
HttpClient::Preconditions.assert_class('ratecard_lane_form', ratecard_lane_form, ::Io::Flow::V0::Models::RatecardLaneForm)
|
2555
|
-
r = @client.request("/#{CGI.escape(organization)}/ratecards/#{CGI.escape(ratecard_id)}/lanes/#{CGI.escape(lane_id)}/rates/#{CGI.escape(id)}").with_json(ratecard_lane_form.to_json).put
|
2556
|
-
::Io::Flow::V0::Models::RatecardRate.new(r)
|
2557
|
-
end
|
2558
|
-
|
2559
|
-
def get_versions(organization, ratecard_id, lane_id, incoming={})
|
2560
|
-
HttpClient::Preconditions.assert_class('organization', organization, String)
|
2561
|
-
HttpClient::Preconditions.assert_class('ratecard_id', ratecard_id, String)
|
2562
|
-
HttpClient::Preconditions.assert_class('lane_id', lane_id, String)
|
2563
|
-
opts = HttpClient::Helper.symbolize_keys(incoming)
|
2564
|
-
query = {
|
2565
|
-
:id => (x = opts.delete(:id); x.nil? ? nil : HttpClient::Preconditions.assert_class('id', x, Array).map { |v| HttpClient::Preconditions.assert_class('id', v, String) }),
|
2566
|
-
:limit => HttpClient::Preconditions.assert_class('limit', (x = opts.delete(:limit); x.nil? ? 25 : x), Integer),
|
2567
|
-
:offset => HttpClient::Preconditions.assert_class('offset', (x = opts.delete(:offset); x.nil? ? 0 : x), Integer),
|
2568
|
-
:sort => HttpClient::Preconditions.assert_class('sort', (x = opts.delete(:sort); x.nil? ? "journal_timestamp" : x), String)
|
2569
|
-
}.delete_if { |k, v| v.nil? }
|
2570
|
-
r = @client.request("/#{CGI.escape(organization)}/ratecards/#{CGI.escape(ratecard_id)}/lanes/#{CGI.escape(lane_id)}/rates/versions").with_query(query).get
|
2571
|
-
r.map { |x| ::Io::Flow::V0::Models::RatecardRateVersion.new(x) }
|
2572
|
-
end
|
2573
|
-
|
2574
|
-
end
|
2575
|
-
|
2576
2337
|
class Services
|
2577
2338
|
|
2578
2339
|
def initialize(client)
|
@@ -4258,60 +4019,6 @@ module Io
|
|
4258
4019
|
|
4259
4020
|
end
|
4260
4021
|
|
4261
|
-
class RatecardFee
|
4262
|
-
|
4263
|
-
module Types
|
4264
|
-
DDP = 'ddp' unless defined?(DDP)
|
4265
|
-
FUEL_SURCHARGE = 'fuel_surcharge' unless defined?(FUEL_SURCHARGE)
|
4266
|
-
OVERSIZED_SHIPMENT = 'oversized_shipment' unless defined?(OVERSIZED_SHIPMENT)
|
4267
|
-
end
|
4268
|
-
|
4269
|
-
def initialize(incoming={})
|
4270
|
-
opts = HttpClient::Helper.symbolize_keys(incoming)
|
4271
|
-
HttpClient::Preconditions.require_keys(opts, [:name], 'RatecardFee')
|
4272
|
-
@name = HttpClient::Preconditions.assert_class('name', opts.delete(:name), String)
|
4273
|
-
end
|
4274
|
-
|
4275
|
-
def to_hash
|
4276
|
-
subtype_to_hash.merge(:discriminator => @name)
|
4277
|
-
end
|
4278
|
-
|
4279
|
-
def RatecardFee.from_json(hash)
|
4280
|
-
HttpClient::Preconditions.assert_class('hash', hash, Hash)
|
4281
|
-
case HttpClient::Helper.symbolize_keys(hash)[:discriminator]
|
4282
|
-
when Types::DDP; Ddp.new(hash)
|
4283
|
-
when Types::FUEL_SURCHARGE; FuelSurcharge.new(hash)
|
4284
|
-
when Types::OVERSIZED_SHIPMENT; OversizedShipment.new(hash)
|
4285
|
-
else RatecardFeeUndefinedType.new(:name => union_type_name)
|
4286
|
-
end
|
4287
|
-
end
|
4288
|
-
|
4289
|
-
end
|
4290
|
-
|
4291
|
-
class RatecardFeeUndefinedType < RatecardFee
|
4292
|
-
|
4293
|
-
attr_reader :name
|
4294
|
-
|
4295
|
-
def initialize(incoming={})
|
4296
|
-
super(:name => 'undefined_type')
|
4297
|
-
opts = HttpClient::Helper.symbolize_keys(incoming)
|
4298
|
-
@name = HttpClient::Preconditions.assert_class('name', opts.delete(:name), String)
|
4299
|
-
end
|
4300
|
-
|
4301
|
-
def subtype_to_hash
|
4302
|
-
raise 'Unable to serialize undefined type to json'
|
4303
|
-
end
|
4304
|
-
|
4305
|
-
def copy(incoming={})
|
4306
|
-
raise 'Operation not supported for undefined type'
|
4307
|
-
end
|
4308
|
-
|
4309
|
-
def to_hash
|
4310
|
-
raise 'Operation not supported for undefined type'
|
4311
|
-
end
|
4312
|
-
|
4313
|
-
end
|
4314
|
-
|
4315
4022
|
# Possible outcome types from a tier rule
|
4316
4023
|
class TierRuleOutcome
|
4317
4024
|
|
@@ -4990,7 +4697,7 @@ module Io
|
|
4990
4697
|
end
|
4991
4698
|
|
4992
4699
|
def LocalizedPriceKey.ALL
|
4993
|
-
@@all ||= [LocalizedPriceKey.price, LocalizedPriceKey.subtotal, LocalizedPriceKey.vat, LocalizedPriceKey.duty, LocalizedPriceKey.shipping, LocalizedPriceKey.total]
|
4700
|
+
@@all ||= [LocalizedPriceKey.price, LocalizedPriceKey.subtotal, LocalizedPriceKey.vat, LocalizedPriceKey.duty, LocalizedPriceKey.discount, LocalizedPriceKey.shipping, LocalizedPriceKey.total]
|
4994
4701
|
end
|
4995
4702
|
|
4996
4703
|
# The calculated price, taking into account pricing settings. For example, if
|
@@ -5013,6 +4720,10 @@ module Io
|
|
5013
4720
|
@@_duty ||= LocalizedPriceKey.new('duty')
|
5014
4721
|
end
|
5015
4722
|
|
4723
|
+
def LocalizedPriceKey.discount
|
4724
|
+
@@_discount ||= LocalizedPriceKey.new('discount')
|
4725
|
+
end
|
4726
|
+
|
5016
4727
|
def LocalizedPriceKey.shipping
|
5017
4728
|
@@_shipping ||= LocalizedPriceKey.new('shipping')
|
5018
4729
|
end
|
@@ -7777,33 +7488,6 @@ module Io
|
|
7777
7488
|
|
7778
7489
|
end
|
7779
7490
|
|
7780
|
-
class Ddp < RatecardFee
|
7781
|
-
|
7782
|
-
attr_reader :amount
|
7783
|
-
|
7784
|
-
def initialize(incoming={})
|
7785
|
-
super(:name => RatecardFee::Types::DDP)
|
7786
|
-
opts = HttpClient::Helper.symbolize_keys(incoming)
|
7787
|
-
HttpClient::Preconditions.require_keys(opts, [:amount], 'Ddp')
|
7788
|
-
@amount = HttpClient::Preconditions.assert_class('amount', opts.delete(:amount), Numeric)
|
7789
|
-
end
|
7790
|
-
|
7791
|
-
def to_json
|
7792
|
-
JSON.dump(to_hash)
|
7793
|
-
end
|
7794
|
-
|
7795
|
-
def copy(incoming={})
|
7796
|
-
Ddp.new(subtype_to_hash.merge(HttpClient::Helper.symbolize_keys(incoming)))
|
7797
|
-
end
|
7798
|
-
|
7799
|
-
def subtype_to_hash
|
7800
|
-
{
|
7801
|
-
:amount => amount
|
7802
|
-
}
|
7803
|
-
end
|
7804
|
-
|
7805
|
-
end
|
7806
|
-
|
7807
7491
|
# Represents a collection of items, the available delivery option tier for that
|
7808
7492
|
# collection of items, and metadata about those options
|
7809
7493
|
class Delivery
|
@@ -7882,7 +7566,7 @@ module Io
|
|
7882
7566
|
@delivered_duty = (x = opts.delete(:delivered_duty); x.is_a?(::Io::Flow::V0::Models::DeliveredDuty) ? x : ::Io::Flow::V0::Models::DeliveredDuty.apply(x))
|
7883
7567
|
@price = (x = opts.delete(:price); x.is_a?(::Io::Flow::V0::Models::Price) ? x : ::Io::Flow::V0::Models::Price.new(x))
|
7884
7568
|
@service = (x = opts.delete(:service); x.is_a?(::Io::Flow::V0::Models::ServiceSummary) ? x : ::Io::Flow::V0::Models::ServiceSummary.new(x))
|
7885
|
-
@tier = (x = opts.delete(:tier); x.is_a?(::Io::Flow::V0::Models::
|
7569
|
+
@tier = (x = opts.delete(:tier); x.is_a?(::Io::Flow::V0::Models::TierSummary) ? x : ::Io::Flow::V0::Models::TierSummary.new(x))
|
7886
7570
|
@window = (x = opts.delete(:window); x.is_a?(::Io::Flow::V0::Models::DatetimeRange) ? x : ::Io::Flow::V0::Models::DatetimeRange.new(x))
|
7887
7571
|
end
|
7888
7572
|
|
@@ -8850,33 +8534,6 @@ module Io
|
|
8850
8534
|
|
8851
8535
|
end
|
8852
8536
|
|
8853
|
-
class FuelSurcharge < RatecardFee
|
8854
|
-
|
8855
|
-
attr_reader :amount
|
8856
|
-
|
8857
|
-
def initialize(incoming={})
|
8858
|
-
super(:name => RatecardFee::Types::FUEL_SURCHARGE)
|
8859
|
-
opts = HttpClient::Helper.symbolize_keys(incoming)
|
8860
|
-
HttpClient::Preconditions.require_keys(opts, [:amount], 'FuelSurcharge')
|
8861
|
-
@amount = HttpClient::Preconditions.assert_class('amount', opts.delete(:amount), Numeric)
|
8862
|
-
end
|
8863
|
-
|
8864
|
-
def to_json
|
8865
|
-
JSON.dump(to_hash)
|
8866
|
-
end
|
8867
|
-
|
8868
|
-
def copy(incoming={})
|
8869
|
-
FuelSurcharge.new(subtype_to_hash.merge(HttpClient::Helper.symbolize_keys(incoming)))
|
8870
|
-
end
|
8871
|
-
|
8872
|
-
def subtype_to_hash
|
8873
|
-
{
|
8874
|
-
:amount => amount
|
8875
|
-
}
|
8876
|
-
end
|
8877
|
-
|
8878
|
-
end
|
8879
|
-
|
8880
8537
|
class FulfillmentExperienceReference
|
8881
8538
|
|
8882
8539
|
attr_reader :id, :currency
|
@@ -11016,10 +10673,12 @@ module Io
|
|
11016
10673
|
|
11017
10674
|
end
|
11018
10675
|
|
11019
|
-
#
|
10676
|
+
# Line items represent the items a consumer is purchasing, including additional
|
10677
|
+
# information to complete the transaction. Note that you may pass in as many
|
10678
|
+
# line items as you like - including repeating item numbers across line items.
|
11020
10679
|
class LineItem
|
11021
10680
|
|
11022
|
-
attr_reader :number, :quantity, :center
|
10681
|
+
attr_reader :number, :quantity, :center, :discount
|
11023
10682
|
|
11024
10683
|
def initialize(incoming={})
|
11025
10684
|
opts = HttpClient::Helper.symbolize_keys(incoming)
|
@@ -11027,6 +10686,7 @@ module Io
|
|
11027
10686
|
@number = HttpClient::Preconditions.assert_class('number', opts.delete(:number), String)
|
11028
10687
|
@quantity = HttpClient::Preconditions.assert_class('quantity', opts.delete(:quantity), Integer)
|
11029
10688
|
@center = (x = opts.delete(:center); x.nil? ? nil : HttpClient::Preconditions.assert_class('center', x, String))
|
10689
|
+
@discount = (x = opts.delete(:discount); x.nil? ? nil : (x = x; x.is_a?(::Io::Flow::V0::Models::Money) ? x : ::Io::Flow::V0::Models::Money.new(x)))
|
11030
10690
|
end
|
11031
10691
|
|
11032
10692
|
def to_json
|
@@ -11041,7 +10701,8 @@ module Io
|
|
11041
10701
|
{
|
11042
10702
|
:number => number,
|
11043
10703
|
:quantity => quantity,
|
11044
|
-
:center => center
|
10704
|
+
:center => center,
|
10705
|
+
:discount => discount.nil? ? nil : discount.to_hash
|
11045
10706
|
}
|
11046
10707
|
end
|
11047
10708
|
|
@@ -11286,14 +10947,16 @@ module Io
|
|
11286
10947
|
|
11287
10948
|
end
|
11288
10949
|
|
11289
|
-
|
10950
|
+
# Money represents an amount in a given currency
|
10951
|
+
class Money
|
11290
10952
|
|
11291
|
-
attr_reader :
|
10953
|
+
attr_reader :amount, :currency
|
11292
10954
|
|
11293
10955
|
def initialize(incoming={})
|
11294
10956
|
opts = HttpClient::Helper.symbolize_keys(incoming)
|
11295
|
-
|
11296
|
-
@
|
10957
|
+
HttpClient::Preconditions.require_keys(opts, [:amount, :currency], 'Money')
|
10958
|
+
@amount = HttpClient::Preconditions.assert_class('amount', opts.delete(:amount), Numeric)
|
10959
|
+
@currency = HttpClient::Preconditions.assert_class('currency', opts.delete(:currency), String)
|
11297
10960
|
end
|
11298
10961
|
|
11299
10962
|
def to_json
|
@@ -11301,19 +10964,19 @@ module Io
|
|
11301
10964
|
end
|
11302
10965
|
|
11303
10966
|
def copy(incoming={})
|
11304
|
-
|
10967
|
+
Money.new(to_hash.merge(HttpClient::Helper.symbolize_keys(incoming)))
|
11305
10968
|
end
|
11306
10969
|
|
11307
10970
|
def to_hash
|
11308
10971
|
{
|
11309
|
-
:
|
11310
|
-
:
|
10972
|
+
:amount => amount,
|
10973
|
+
:currency => currency
|
11311
10974
|
}
|
11312
10975
|
end
|
11313
10976
|
|
11314
10977
|
end
|
11315
10978
|
|
11316
|
-
class
|
10979
|
+
class Name
|
11317
10980
|
|
11318
10981
|
attr_reader :first, :last
|
11319
10982
|
|
@@ -11328,7 +10991,7 @@ module Io
|
|
11328
10991
|
end
|
11329
10992
|
|
11330
10993
|
def copy(incoming={})
|
11331
|
-
|
10994
|
+
Name.new(to_hash.merge(HttpClient::Helper.symbolize_keys(incoming)))
|
11332
10995
|
end
|
11333
10996
|
|
11334
10997
|
def to_hash
|
@@ -11340,8 +11003,35 @@ module Io
|
|
11340
11003
|
|
11341
11004
|
end
|
11342
11005
|
|
11343
|
-
|
11344
|
-
|
11006
|
+
class NameForm
|
11007
|
+
|
11008
|
+
attr_reader :first, :last
|
11009
|
+
|
11010
|
+
def initialize(incoming={})
|
11011
|
+
opts = HttpClient::Helper.symbolize_keys(incoming)
|
11012
|
+
@first = (x = opts.delete(:first); x.nil? ? nil : HttpClient::Preconditions.assert_class('first', x, String))
|
11013
|
+
@last = (x = opts.delete(:last); x.nil? ? nil : HttpClient::Preconditions.assert_class('last', x, String))
|
11014
|
+
end
|
11015
|
+
|
11016
|
+
def to_json
|
11017
|
+
JSON.dump(to_hash)
|
11018
|
+
end
|
11019
|
+
|
11020
|
+
def copy(incoming={})
|
11021
|
+
NameForm.new(to_hash.merge(HttpClient::Helper.symbolize_keys(incoming)))
|
11022
|
+
end
|
11023
|
+
|
11024
|
+
def to_hash
|
11025
|
+
{
|
11026
|
+
:first => first,
|
11027
|
+
:last => last
|
11028
|
+
}
|
11029
|
+
end
|
11030
|
+
|
11031
|
+
end
|
11032
|
+
|
11033
|
+
# Flags to indicate whether a feature is enabled/disabled on a particular model
|
11034
|
+
# (e.g. show/do not show attribute as a column in harmonization table view of
|
11345
11035
|
# items)
|
11346
11036
|
class Options
|
11347
11037
|
|
@@ -11455,7 +11145,7 @@ module Io
|
|
11455
11145
|
# pricing and delivery options for destination and items/quantities specified
|
11456
11146
|
class OrderForm
|
11457
11147
|
|
11458
|
-
attr_reader :number, :customer, :destination, :items
|
11148
|
+
attr_reader :number, :customer, :destination, :items, :discount
|
11459
11149
|
|
11460
11150
|
def initialize(incoming={})
|
11461
11151
|
opts = HttpClient::Helper.symbolize_keys(incoming)
|
@@ -11464,6 +11154,7 @@ module Io
|
|
11464
11154
|
@customer = (x = opts.delete(:customer); x.is_a?(::Io::Flow::V0::Models::Customer) ? x : ::Io::Flow::V0::Models::Customer.new(x))
|
11465
11155
|
@destination = (x = opts.delete(:destination); x.is_a?(::Io::Flow::V0::Models::Address) ? x : ::Io::Flow::V0::Models::Address.new(x))
|
11466
11156
|
@items = HttpClient::Preconditions.assert_class('items', opts.delete(:items), Array).map { |v| (x = v; x.is_a?(::Io::Flow::V0::Models::LineItem) ? x : ::Io::Flow::V0::Models::LineItem.new(x)) }
|
11157
|
+
@discount = (x = opts.delete(:discount); x.nil? ? nil : (x = x; x.is_a?(::Io::Flow::V0::Models::Money) ? x : ::Io::Flow::V0::Models::Money.new(x)))
|
11467
11158
|
end
|
11468
11159
|
|
11469
11160
|
def to_json
|
@@ -11479,7 +11170,8 @@ module Io
|
|
11479
11170
|
:number => number,
|
11480
11171
|
:customer => customer.to_hash,
|
11481
11172
|
:destination => destination.to_hash,
|
11482
|
-
:items => items.map { |o| o.to_hash }
|
11173
|
+
:items => items.map { |o| o.to_hash },
|
11174
|
+
:discount => discount.nil? ? nil : discount.to_hash
|
11483
11175
|
}
|
11484
11176
|
end
|
11485
11177
|
|
@@ -11489,7 +11181,7 @@ module Io
|
|
11489
11181
|
# pricing and delivery options for destination and items/quantities specified.
|
11490
11182
|
class OrderPutForm
|
11491
11183
|
|
11492
|
-
attr_reader :customer, :destination, :items, :selections
|
11184
|
+
attr_reader :customer, :destination, :items, :selections, :discount
|
11493
11185
|
|
11494
11186
|
def initialize(incoming={})
|
11495
11187
|
opts = HttpClient::Helper.symbolize_keys(incoming)
|
@@ -11498,6 +11190,7 @@ module Io
|
|
11498
11190
|
@destination = (x = opts.delete(:destination); x.is_a?(::Io::Flow::V0::Models::Address) ? x : ::Io::Flow::V0::Models::Address.new(x))
|
11499
11191
|
@items = HttpClient::Preconditions.assert_class('items', opts.delete(:items), Array).map { |v| (x = v; x.is_a?(::Io::Flow::V0::Models::LineItem) ? x : ::Io::Flow::V0::Models::LineItem.new(x)) }
|
11500
11192
|
@selections = (x = opts.delete(:selections); x.nil? ? nil : HttpClient::Preconditions.assert_class('selections', x, Array).map { |v| HttpClient::Preconditions.assert_class('selections', v, String) })
|
11193
|
+
@discount = (x = opts.delete(:discount); x.nil? ? nil : (x = x; x.is_a?(::Io::Flow::V0::Models::Money) ? x : ::Io::Flow::V0::Models::Money.new(x)))
|
11501
11194
|
end
|
11502
11195
|
|
11503
11196
|
def to_json
|
@@ -11513,7 +11206,8 @@ module Io
|
|
11513
11206
|
:customer => customer.to_hash,
|
11514
11207
|
:destination => destination.to_hash,
|
11515
11208
|
:items => items.map { |o| o.to_hash },
|
11516
|
-
:selections => selections.nil? ? nil : selections
|
11209
|
+
:selections => selections.nil? ? nil : selections,
|
11210
|
+
:discount => discount.nil? ? nil : discount.to_hash
|
11517
11211
|
}
|
11518
11212
|
end
|
11519
11213
|
|
@@ -11956,39 +11650,6 @@ module Io
|
|
11956
11650
|
|
11957
11651
|
end
|
11958
11652
|
|
11959
|
-
class OversizedShipment < RatecardFee
|
11960
|
-
|
11961
|
-
attr_reader :weight_threshold, :weight_unit, :margin, :amount
|
11962
|
-
|
11963
|
-
def initialize(incoming={})
|
11964
|
-
super(:name => RatecardFee::Types::OVERSIZED_SHIPMENT)
|
11965
|
-
opts = HttpClient::Helper.symbolize_keys(incoming)
|
11966
|
-
HttpClient::Preconditions.require_keys(opts, [:weight_threshold, :weight_unit], 'OversizedShipment')
|
11967
|
-
@weight_threshold = HttpClient::Preconditions.assert_class('weight_threshold', opts.delete(:weight_threshold), Numeric)
|
11968
|
-
@weight_unit = (x = opts.delete(:weight_unit); x.is_a?(::Io::Flow::V0::Models::UnitOfMeasurement) ? x : ::Io::Flow::V0::Models::UnitOfMeasurement.apply(x))
|
11969
|
-
@margin = (x = opts.delete(:margin); x.nil? ? nil : HttpClient::Preconditions.assert_class('margin', x, Numeric))
|
11970
|
-
@amount = (x = opts.delete(:amount); x.nil? ? nil : HttpClient::Preconditions.assert_class('amount', x, Numeric))
|
11971
|
-
end
|
11972
|
-
|
11973
|
-
def to_json
|
11974
|
-
JSON.dump(to_hash)
|
11975
|
-
end
|
11976
|
-
|
11977
|
-
def copy(incoming={})
|
11978
|
-
OversizedShipment.new(subtype_to_hash.merge(HttpClient::Helper.symbolize_keys(incoming)))
|
11979
|
-
end
|
11980
|
-
|
11981
|
-
def subtype_to_hash
|
11982
|
-
{
|
11983
|
-
:weight_threshold => weight_threshold,
|
11984
|
-
:weight_unit => weight_unit.value,
|
11985
|
-
:margin => margin,
|
11986
|
-
:amount => amount
|
11987
|
-
}
|
11988
|
-
end
|
11989
|
-
|
11990
|
-
end
|
11991
|
-
|
11992
11653
|
# Represents packaging available to ship items
|
11993
11654
|
class Packaging
|
11994
11655
|
|
@@ -12664,393 +12325,6 @@ module Io
|
|
12664
12325
|
|
12665
12326
|
end
|
12666
12327
|
|
12667
|
-
# Snapshot of all lanes and rows across all service levels of an organization
|
12668
|
-
class Ratecard
|
12669
|
-
|
12670
|
-
attr_reader :id, :number, :effective_at, :origination_zones, :service, :published_at
|
12671
|
-
|
12672
|
-
def initialize(incoming={})
|
12673
|
-
opts = HttpClient::Helper.symbolize_keys(incoming)
|
12674
|
-
HttpClient::Preconditions.require_keys(opts, [:id, :number, :effective_at, :origination_zones, :service], 'Ratecard')
|
12675
|
-
@id = HttpClient::Preconditions.assert_class('id', opts.delete(:id), String)
|
12676
|
-
@number = HttpClient::Preconditions.assert_class('number', opts.delete(:number), String)
|
12677
|
-
@effective_at = HttpClient::Preconditions.assert_class('effective_at', HttpClient::Helper.to_date_time_iso8601(opts.delete(:effective_at)), DateTime)
|
12678
|
-
@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)) }
|
12679
|
-
@service = (x = opts.delete(:service); x.is_a?(::Io::Flow::V0::Models::RatecardServiceReference) ? x : ::Io::Flow::V0::Models::RatecardServiceReference.new(x))
|
12680
|
-
@published_at = (x = opts.delete(:published_at); x.nil? ? nil : HttpClient::Preconditions.assert_class('published_at', HttpClient::Helper.to_date_time_iso8601(x), DateTime))
|
12681
|
-
end
|
12682
|
-
|
12683
|
-
def to_json
|
12684
|
-
JSON.dump(to_hash)
|
12685
|
-
end
|
12686
|
-
|
12687
|
-
def copy(incoming={})
|
12688
|
-
Ratecard.new(to_hash.merge(HttpClient::Helper.symbolize_keys(incoming)))
|
12689
|
-
end
|
12690
|
-
|
12691
|
-
def to_hash
|
12692
|
-
{
|
12693
|
-
:id => id,
|
12694
|
-
:number => number,
|
12695
|
-
:effective_at => effective_at,
|
12696
|
-
:origination_zones => origination_zones.map { |o| o.to_hash },
|
12697
|
-
:service => service.to_hash,
|
12698
|
-
:published_at => published_at
|
12699
|
-
}
|
12700
|
-
end
|
12701
|
-
|
12702
|
-
end
|
12703
|
-
|
12704
|
-
# Represents a summary of a cost estimate based on rate card data for an
|
12705
|
-
# origin/destination and weight, either gravitational or dimensional
|
12706
|
-
class RatecardEstimate
|
12707
|
-
|
12708
|
-
attr_reader :service, :shipment_window, :currency, :amount, :fees, :total
|
12709
|
-
|
12710
|
-
def initialize(incoming={})
|
12711
|
-
opts = HttpClient::Helper.symbolize_keys(incoming)
|
12712
|
-
HttpClient::Preconditions.require_keys(opts, [:service, :shipment_window, :currency, :amount, :fees, :total], 'RatecardEstimate')
|
12713
|
-
@service = (x = opts.delete(:service); x.is_a?(::Io::Flow::V0::Models::RatecardServiceReference) ? x : ::Io::Flow::V0::Models::RatecardServiceReference.new(x))
|
12714
|
-
@shipment_window = (x = opts.delete(:shipment_window); x.is_a?(::Io::Flow::V0::Models::ShipmentWindow) ? x : ::Io::Flow::V0::Models::ShipmentWindow.new(x))
|
12715
|
-
@currency = HttpClient::Preconditions.assert_class('currency', opts.delete(:currency), String)
|
12716
|
-
@amount = HttpClient::Preconditions.assert_class('amount', opts.delete(:amount), Numeric)
|
12717
|
-
@fees = HttpClient::Preconditions.assert_class('fees', opts.delete(:fees), Array).map { |v| (x = v; x.is_a?(::Io::Flow::V0::Models::RatecardFee) ? x : ::Io::Flow::V0::Models::RatecardFee.from_json(x)) }
|
12718
|
-
@total = HttpClient::Preconditions.assert_class('total', opts.delete(:total), Numeric)
|
12719
|
-
end
|
12720
|
-
|
12721
|
-
def to_json
|
12722
|
-
JSON.dump(to_hash)
|
12723
|
-
end
|
12724
|
-
|
12725
|
-
def copy(incoming={})
|
12726
|
-
RatecardEstimate.new(to_hash.merge(HttpClient::Helper.symbolize_keys(incoming)))
|
12727
|
-
end
|
12728
|
-
|
12729
|
-
def to_hash
|
12730
|
-
{
|
12731
|
-
:service => service.to_hash,
|
12732
|
-
:shipment_window => shipment_window.to_hash,
|
12733
|
-
:currency => currency,
|
12734
|
-
:amount => amount,
|
12735
|
-
:fees => fees.map { |o| o.to_hash },
|
12736
|
-
:total => total
|
12737
|
-
}
|
12738
|
-
end
|
12739
|
-
|
12740
|
-
end
|
12741
|
-
|
12742
|
-
class RatecardForm
|
12743
|
-
|
12744
|
-
attr_reader :effective_at, :number, :origination_zones, :service
|
12745
|
-
|
12746
|
-
def initialize(incoming={})
|
12747
|
-
opts = HttpClient::Helper.symbolize_keys(incoming)
|
12748
|
-
HttpClient::Preconditions.require_keys(opts, [:effective_at, :number, :origination_zones, :service], 'RatecardForm')
|
12749
|
-
@effective_at = HttpClient::Preconditions.assert_class('effective_at', HttpClient::Helper.to_date_time_iso8601(opts.delete(:effective_at)), DateTime)
|
12750
|
-
@number = HttpClient::Preconditions.assert_class('number', opts.delete(:number), String)
|
12751
|
-
@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)) }
|
12752
|
-
@service = HttpClient::Preconditions.assert_class('service', opts.delete(:service), String)
|
12753
|
-
end
|
12754
|
-
|
12755
|
-
def to_json
|
12756
|
-
JSON.dump(to_hash)
|
12757
|
-
end
|
12758
|
-
|
12759
|
-
def copy(incoming={})
|
12760
|
-
RatecardForm.new(to_hash.merge(HttpClient::Helper.symbolize_keys(incoming)))
|
12761
|
-
end
|
12762
|
-
|
12763
|
-
def to_hash
|
12764
|
-
{
|
12765
|
-
:effective_at => effective_at,
|
12766
|
-
:number => number,
|
12767
|
-
:origination_zones => origination_zones.map { |o| o.to_hash },
|
12768
|
-
:service => service
|
12769
|
-
}
|
12770
|
-
end
|
12771
|
-
|
12772
|
-
end
|
12773
|
-
|
12774
|
-
# Describe list of rates applicable for a lane on the ratecard - defined by
|
12775
|
-
# origin and destination zone
|
12776
|
-
class RatecardLane
|
12777
|
-
|
12778
|
-
attr_reader :id, :currency, :delivered_duty, :shipment_window, :destination, :dim_factor, :fees, :origin, :service, :rates, :rounding, :weight_unit, :distance_unit
|
12779
|
-
|
12780
|
-
def initialize(incoming={})
|
12781
|
-
opts = HttpClient::Helper.symbolize_keys(incoming)
|
12782
|
-
HttpClient::Preconditions.require_keys(opts, [:id, :currency, :delivered_duty, :shipment_window, :destination, :dim_factor, :fees, :origin, :service, :rates, :rounding, :weight_unit, :distance_unit], 'RatecardLane')
|
12783
|
-
@id = HttpClient::Preconditions.assert_class('id', opts.delete(:id), String)
|
12784
|
-
@currency = HttpClient::Preconditions.assert_class('currency', opts.delete(:currency), String)
|
12785
|
-
@delivered_duty = (x = opts.delete(:delivered_duty); x.is_a?(::Io::Flow::V0::Models::DeliveredDuty) ? x : ::Io::Flow::V0::Models::DeliveredDuty.apply(x))
|
12786
|
-
@shipment_window = (x = opts.delete(:shipment_window); x.is_a?(::Io::Flow::V0::Models::ShipmentWindow) ? x : ::Io::Flow::V0::Models::ShipmentWindow.new(x))
|
12787
|
-
@destination = (x = opts.delete(:destination); x.is_a?(::Io::Flow::V0::Models::Zone) ? x : ::Io::Flow::V0::Models::Zone.new(x))
|
12788
|
-
@dim_factor = HttpClient::Preconditions.assert_class('dim_factor', opts.delete(:dim_factor), Numeric)
|
12789
|
-
@fees = HttpClient::Preconditions.assert_class('fees', opts.delete(:fees), Array).map { |v| (x = v; x.is_a?(::Io::Flow::V0::Models::RatecardFee) ? x : ::Io::Flow::V0::Models::RatecardFee.from_json(x)) }
|
12790
|
-
@origin = (x = opts.delete(:origin); x.is_a?(::Io::Flow::V0::Models::Zone) ? x : ::Io::Flow::V0::Models::Zone.new(x))
|
12791
|
-
@service = (x = opts.delete(:service); x.is_a?(::Io::Flow::V0::Models::RatecardServiceReference) ? x : ::Io::Flow::V0::Models::RatecardServiceReference.new(x))
|
12792
|
-
@rates = HttpClient::Preconditions.assert_class('rates', opts.delete(:rates), Array).map { |v| (x = v; x.is_a?(::Io::Flow::V0::Models::RatecardRate) ? x : ::Io::Flow::V0::Models::RatecardRate.new(x)) }
|
12793
|
-
@rounding = (x = opts.delete(:rounding); x.is_a?(::Io::Flow::V0::Models::Rounding) ? x : ::Io::Flow::V0::Models::Rounding.new(x))
|
12794
|
-
@weight_unit = (x = opts.delete(:weight_unit); x.is_a?(::Io::Flow::V0::Models::UnitOfMeasurement) ? x : ::Io::Flow::V0::Models::UnitOfMeasurement.apply(x))
|
12795
|
-
@distance_unit = (x = opts.delete(:distance_unit); x.is_a?(::Io::Flow::V0::Models::UnitOfMeasurement) ? x : ::Io::Flow::V0::Models::UnitOfMeasurement.apply(x))
|
12796
|
-
end
|
12797
|
-
|
12798
|
-
def to_json
|
12799
|
-
JSON.dump(to_hash)
|
12800
|
-
end
|
12801
|
-
|
12802
|
-
def copy(incoming={})
|
12803
|
-
RatecardLane.new(to_hash.merge(HttpClient::Helper.symbolize_keys(incoming)))
|
12804
|
-
end
|
12805
|
-
|
12806
|
-
def to_hash
|
12807
|
-
{
|
12808
|
-
:id => id,
|
12809
|
-
:currency => currency,
|
12810
|
-
:delivered_duty => delivered_duty.value,
|
12811
|
-
:shipment_window => shipment_window.to_hash,
|
12812
|
-
:destination => destination.to_hash,
|
12813
|
-
:dim_factor => dim_factor,
|
12814
|
-
:fees => fees.map { |o| o.to_hash },
|
12815
|
-
:origin => origin.to_hash,
|
12816
|
-
:service => service.to_hash,
|
12817
|
-
:rates => rates.map { |o| o.to_hash },
|
12818
|
-
:rounding => rounding.to_hash,
|
12819
|
-
:weight_unit => weight_unit.value,
|
12820
|
-
:distance_unit => distance_unit.value
|
12821
|
-
}
|
12822
|
-
end
|
12823
|
-
|
12824
|
-
end
|
12825
|
-
|
12826
|
-
class RatecardLaneForm
|
12827
|
-
|
12828
|
-
attr_reader :currency, :destination, :shipment_window, :delivered_duty, :dim_factor, :fees, :origin, :rounding, :rates, :weight_unit, :distance_unit
|
12829
|
-
|
12830
|
-
def initialize(incoming={})
|
12831
|
-
opts = HttpClient::Helper.symbolize_keys(incoming)
|
12832
|
-
HttpClient::Preconditions.require_keys(opts, [:currency, :destination, :shipment_window, :delivered_duty, :dim_factor, :fees, :origin, :rounding, :rates, :weight_unit, :distance_unit], 'RatecardLaneForm')
|
12833
|
-
@currency = HttpClient::Preconditions.assert_class('currency', opts.delete(:currency), String)
|
12834
|
-
@destination = (x = opts.delete(:destination); x.is_a?(::Io::Flow::V0::Models::Zone) ? x : ::Io::Flow::V0::Models::Zone.new(x))
|
12835
|
-
@shipment_window = (x = opts.delete(:shipment_window); x.is_a?(::Io::Flow::V0::Models::ShipmentWindow) ? x : ::Io::Flow::V0::Models::ShipmentWindow.new(x))
|
12836
|
-
@delivered_duty = (x = opts.delete(:delivered_duty); x.is_a?(::Io::Flow::V0::Models::DeliveredDuty) ? x : ::Io::Flow::V0::Models::DeliveredDuty.apply(x))
|
12837
|
-
@dim_factor = HttpClient::Preconditions.assert_class('dim_factor', opts.delete(:dim_factor), Numeric)
|
12838
|
-
@fees = HttpClient::Preconditions.assert_class('fees', opts.delete(:fees), Array).map { |v| (x = v; x.is_a?(::Io::Flow::V0::Models::RatecardFee) ? x : ::Io::Flow::V0::Models::RatecardFee.from_json(x)) }
|
12839
|
-
@origin = (x = opts.delete(:origin); x.is_a?(::Io::Flow::V0::Models::Zone) ? x : ::Io::Flow::V0::Models::Zone.new(x))
|
12840
|
-
@rounding = (x = opts.delete(:rounding); x.is_a?(::Io::Flow::V0::Models::Rounding) ? x : ::Io::Flow::V0::Models::Rounding.new(x))
|
12841
|
-
@rates = HttpClient::Preconditions.assert_class('rates', opts.delete(:rates), Array).map { |v| (x = v; x.is_a?(::Io::Flow::V0::Models::RatecardRateForm) ? x : ::Io::Flow::V0::Models::RatecardRateForm.new(x)) }
|
12842
|
-
@weight_unit = (x = opts.delete(:weight_unit); x.is_a?(::Io::Flow::V0::Models::UnitOfMeasurement) ? x : ::Io::Flow::V0::Models::UnitOfMeasurement.apply(x))
|
12843
|
-
@distance_unit = (x = opts.delete(:distance_unit); x.is_a?(::Io::Flow::V0::Models::UnitOfMeasurement) ? x : ::Io::Flow::V0::Models::UnitOfMeasurement.apply(x))
|
12844
|
-
end
|
12845
|
-
|
12846
|
-
def to_json
|
12847
|
-
JSON.dump(to_hash)
|
12848
|
-
end
|
12849
|
-
|
12850
|
-
def copy(incoming={})
|
12851
|
-
RatecardLaneForm.new(to_hash.merge(HttpClient::Helper.symbolize_keys(incoming)))
|
12852
|
-
end
|
12853
|
-
|
12854
|
-
def to_hash
|
12855
|
-
{
|
12856
|
-
:currency => currency,
|
12857
|
-
:destination => destination.to_hash,
|
12858
|
-
:shipment_window => shipment_window.to_hash,
|
12859
|
-
:delivered_duty => delivered_duty.value,
|
12860
|
-
:dim_factor => dim_factor,
|
12861
|
-
:fees => fees.map { |o| o.to_hash },
|
12862
|
-
:origin => origin.to_hash,
|
12863
|
-
:rounding => rounding.to_hash,
|
12864
|
-
:rates => rates.map { |o| o.to_hash },
|
12865
|
-
:weight_unit => weight_unit.value,
|
12866
|
-
:distance_unit => distance_unit.value
|
12867
|
-
}
|
12868
|
-
end
|
12869
|
-
|
12870
|
-
end
|
12871
|
-
|
12872
|
-
class RatecardLaneVersion
|
12873
|
-
|
12874
|
-
attr_reader :id, :timestamp, :type, :ratecard_lane
|
12875
|
-
|
12876
|
-
def initialize(incoming={})
|
12877
|
-
opts = HttpClient::Helper.symbolize_keys(incoming)
|
12878
|
-
HttpClient::Preconditions.require_keys(opts, [:id, :timestamp, :type, :ratecard_lane], 'RatecardLaneVersion')
|
12879
|
-
@id = HttpClient::Preconditions.assert_class('id', opts.delete(:id), String)
|
12880
|
-
@timestamp = HttpClient::Preconditions.assert_class('timestamp', HttpClient::Helper.to_date_time_iso8601(opts.delete(:timestamp)), DateTime)
|
12881
|
-
@type = (x = opts.delete(:type); x.is_a?(::Io::Flow::V0::Models::ChangeType) ? x : ::Io::Flow::V0::Models::ChangeType.apply(x))
|
12882
|
-
@ratecard_lane = (x = opts.delete(:ratecard_lane); x.is_a?(::Io::Flow::V0::Models::RatecardLane) ? x : ::Io::Flow::V0::Models::RatecardLane.new(x))
|
12883
|
-
end
|
12884
|
-
|
12885
|
-
def to_json
|
12886
|
-
JSON.dump(to_hash)
|
12887
|
-
end
|
12888
|
-
|
12889
|
-
def copy(incoming={})
|
12890
|
-
RatecardLaneVersion.new(to_hash.merge(HttpClient::Helper.symbolize_keys(incoming)))
|
12891
|
-
end
|
12892
|
-
|
12893
|
-
def to_hash
|
12894
|
-
{
|
12895
|
-
:id => id,
|
12896
|
-
:timestamp => timestamp,
|
12897
|
-
:type => type.value,
|
12898
|
-
:ratecard_lane => ratecard_lane.to_hash
|
12899
|
-
}
|
12900
|
-
end
|
12901
|
-
|
12902
|
-
end
|
12903
|
-
|
12904
|
-
# Specific line item in a ratecard lane with information on a weight threshold
|
12905
|
-
# and corresponding amount to charge
|
12906
|
-
class RatecardRate
|
12907
|
-
|
12908
|
-
attr_reader :id, :amount, :weight
|
12909
|
-
|
12910
|
-
def initialize(incoming={})
|
12911
|
-
opts = HttpClient::Helper.symbolize_keys(incoming)
|
12912
|
-
HttpClient::Preconditions.require_keys(opts, [:id, :amount, :weight], 'RatecardRate')
|
12913
|
-
@id = HttpClient::Preconditions.assert_class('id', opts.delete(:id), String)
|
12914
|
-
@amount = HttpClient::Preconditions.assert_class('amount', opts.delete(:amount), Numeric)
|
12915
|
-
@weight = HttpClient::Preconditions.assert_class('weight', opts.delete(:weight), Numeric)
|
12916
|
-
end
|
12917
|
-
|
12918
|
-
def to_json
|
12919
|
-
JSON.dump(to_hash)
|
12920
|
-
end
|
12921
|
-
|
12922
|
-
def copy(incoming={})
|
12923
|
-
RatecardRate.new(to_hash.merge(HttpClient::Helper.symbolize_keys(incoming)))
|
12924
|
-
end
|
12925
|
-
|
12926
|
-
def to_hash
|
12927
|
-
{
|
12928
|
-
:id => id,
|
12929
|
-
:amount => amount,
|
12930
|
-
:weight => weight
|
12931
|
-
}
|
12932
|
-
end
|
12933
|
-
|
12934
|
-
end
|
12935
|
-
|
12936
|
-
class RatecardRateForm
|
12937
|
-
|
12938
|
-
attr_reader :amount, :weight
|
12939
|
-
|
12940
|
-
def initialize(incoming={})
|
12941
|
-
opts = HttpClient::Helper.symbolize_keys(incoming)
|
12942
|
-
HttpClient::Preconditions.require_keys(opts, [:amount, :weight], 'RatecardRateForm')
|
12943
|
-
@amount = HttpClient::Preconditions.assert_class('amount', opts.delete(:amount), Numeric)
|
12944
|
-
@weight = HttpClient::Preconditions.assert_class('weight', opts.delete(:weight), Numeric)
|
12945
|
-
end
|
12946
|
-
|
12947
|
-
def to_json
|
12948
|
-
JSON.dump(to_hash)
|
12949
|
-
end
|
12950
|
-
|
12951
|
-
def copy(incoming={})
|
12952
|
-
RatecardRateForm.new(to_hash.merge(HttpClient::Helper.symbolize_keys(incoming)))
|
12953
|
-
end
|
12954
|
-
|
12955
|
-
def to_hash
|
12956
|
-
{
|
12957
|
-
:amount => amount,
|
12958
|
-
:weight => weight
|
12959
|
-
}
|
12960
|
-
end
|
12961
|
-
|
12962
|
-
end
|
12963
|
-
|
12964
|
-
class RatecardRateVersion
|
12965
|
-
|
12966
|
-
attr_reader :id, :timestamp, :type, :ratecard_rate
|
12967
|
-
|
12968
|
-
def initialize(incoming={})
|
12969
|
-
opts = HttpClient::Helper.symbolize_keys(incoming)
|
12970
|
-
HttpClient::Preconditions.require_keys(opts, [:id, :timestamp, :type, :ratecard_rate], 'RatecardRateVersion')
|
12971
|
-
@id = HttpClient::Preconditions.assert_class('id', opts.delete(:id), String)
|
12972
|
-
@timestamp = HttpClient::Preconditions.assert_class('timestamp', HttpClient::Helper.to_date_time_iso8601(opts.delete(:timestamp)), DateTime)
|
12973
|
-
@type = (x = opts.delete(:type); x.is_a?(::Io::Flow::V0::Models::ChangeType) ? x : ::Io::Flow::V0::Models::ChangeType.apply(x))
|
12974
|
-
@ratecard_rate = (x = opts.delete(:ratecard_rate); x.is_a?(::Io::Flow::V0::Models::RatecardRate) ? x : ::Io::Flow::V0::Models::RatecardRate.new(x))
|
12975
|
-
end
|
12976
|
-
|
12977
|
-
def to_json
|
12978
|
-
JSON.dump(to_hash)
|
12979
|
-
end
|
12980
|
-
|
12981
|
-
def copy(incoming={})
|
12982
|
-
RatecardRateVersion.new(to_hash.merge(HttpClient::Helper.symbolize_keys(incoming)))
|
12983
|
-
end
|
12984
|
-
|
12985
|
-
def to_hash
|
12986
|
-
{
|
12987
|
-
:id => id,
|
12988
|
-
:timestamp => timestamp,
|
12989
|
-
:type => type.value,
|
12990
|
-
:ratecard_rate => ratecard_rate.to_hash
|
12991
|
-
}
|
12992
|
-
end
|
12993
|
-
|
12994
|
-
end
|
12995
|
-
|
12996
|
-
class RatecardServiceReference
|
12997
|
-
|
12998
|
-
attr_reader :id
|
12999
|
-
|
13000
|
-
def initialize(incoming={})
|
13001
|
-
opts = HttpClient::Helper.symbolize_keys(incoming)
|
13002
|
-
HttpClient::Preconditions.require_keys(opts, [:id], 'RatecardServiceReference')
|
13003
|
-
@id = HttpClient::Preconditions.assert_class('id', opts.delete(:id), String)
|
13004
|
-
end
|
13005
|
-
|
13006
|
-
def to_json
|
13007
|
-
JSON.dump(to_hash)
|
13008
|
-
end
|
13009
|
-
|
13010
|
-
def copy(incoming={})
|
13011
|
-
RatecardServiceReference.new(to_hash.merge(HttpClient::Helper.symbolize_keys(incoming)))
|
13012
|
-
end
|
13013
|
-
|
13014
|
-
def to_hash
|
13015
|
-
{
|
13016
|
-
:id => id
|
13017
|
-
}
|
13018
|
-
end
|
13019
|
-
|
13020
|
-
end
|
13021
|
-
|
13022
|
-
class RatecardVersion
|
13023
|
-
|
13024
|
-
attr_reader :id, :timestamp, :type, :ratecard
|
13025
|
-
|
13026
|
-
def initialize(incoming={})
|
13027
|
-
opts = HttpClient::Helper.symbolize_keys(incoming)
|
13028
|
-
HttpClient::Preconditions.require_keys(opts, [:id, :timestamp, :type, :ratecard], 'RatecardVersion')
|
13029
|
-
@id = HttpClient::Preconditions.assert_class('id', opts.delete(:id), String)
|
13030
|
-
@timestamp = HttpClient::Preconditions.assert_class('timestamp', HttpClient::Helper.to_date_time_iso8601(opts.delete(:timestamp)), DateTime)
|
13031
|
-
@type = (x = opts.delete(:type); x.is_a?(::Io::Flow::V0::Models::ChangeType) ? x : ::Io::Flow::V0::Models::ChangeType.apply(x))
|
13032
|
-
@ratecard = (x = opts.delete(:ratecard); x.is_a?(::Io::Flow::V0::Models::Ratecard) ? x : ::Io::Flow::V0::Models::Ratecard.new(x))
|
13033
|
-
end
|
13034
|
-
|
13035
|
-
def to_json
|
13036
|
-
JSON.dump(to_hash)
|
13037
|
-
end
|
13038
|
-
|
13039
|
-
def copy(incoming={})
|
13040
|
-
RatecardVersion.new(to_hash.merge(HttpClient::Helper.symbolize_keys(incoming)))
|
13041
|
-
end
|
13042
|
-
|
13043
|
-
def to_hash
|
13044
|
-
{
|
13045
|
-
:id => id,
|
13046
|
-
:timestamp => timestamp,
|
13047
|
-
:type => type.value,
|
13048
|
-
:ratecard => ratecard.to_hash
|
13049
|
-
}
|
13050
|
-
end
|
13051
|
-
|
13052
|
-
end
|
13053
|
-
|
13054
12328
|
# Refunds are used to issue refunds against a prior capture.
|
13055
12329
|
class Refund
|
13056
12330
|
|
@@ -13758,34 +13032,6 @@ module Io
|
|
13758
13032
|
|
13759
13033
|
end
|
13760
13034
|
|
13761
|
-
class ShipmentWindow
|
13762
|
-
|
13763
|
-
attr_reader :from, :to
|
13764
|
-
|
13765
|
-
def initialize(incoming={})
|
13766
|
-
opts = HttpClient::Helper.symbolize_keys(incoming)
|
13767
|
-
HttpClient::Preconditions.require_keys(opts, [:from, :to], 'ShipmentWindow')
|
13768
|
-
@from = HttpClient::Preconditions.assert_class('from', opts.delete(:from), Integer)
|
13769
|
-
@to = HttpClient::Preconditions.assert_class('to', opts.delete(:to), Integer)
|
13770
|
-
end
|
13771
|
-
|
13772
|
-
def to_json
|
13773
|
-
JSON.dump(to_hash)
|
13774
|
-
end
|
13775
|
-
|
13776
|
-
def copy(incoming={})
|
13777
|
-
ShipmentWindow.new(to_hash.merge(HttpClient::Helper.symbolize_keys(incoming)))
|
13778
|
-
end
|
13779
|
-
|
13780
|
-
def to_hash
|
13781
|
-
{
|
13782
|
-
:from => from,
|
13783
|
-
:to => to
|
13784
|
-
}
|
13785
|
-
end
|
13786
|
-
|
13787
|
-
end
|
13788
|
-
|
13789
13035
|
class ShippingAddress
|
13790
13036
|
|
13791
13037
|
attr_reader :contact, :location
|
@@ -14833,7 +14079,7 @@ module Io
|
|
14833
14079
|
@experience = (x = opts.delete(:experience); x.is_a?(::Io::Flow::V0::Models::FulfillmentExperienceReference) ? x : ::Io::Flow::V0::Models::FulfillmentExperienceReference.new(x))
|
14834
14080
|
@integration = (x = opts.delete(:integration); x.is_a?(::Io::Flow::V0::Models::ShipmentIntegrationType) ? x : ::Io::Flow::V0::Models::ShipmentIntegrationType.apply(x))
|
14835
14081
|
@name = HttpClient::Preconditions.assert_class('name', opts.delete(:name), String)
|
14836
|
-
@services = HttpClient::Preconditions.assert_class('services', opts.delete(:services), Array).map { |v| (
|
14082
|
+
@services = HttpClient::Preconditions.assert_class('services', opts.delete(:services), Array).map { |v| HttpClient::Preconditions.assert_class('services', v, String) }
|
14837
14083
|
@strategy = (x = opts.delete(:strategy); x.is_a?(::Io::Flow::V0::Models::TierStrategy) ? x : ::Io::Flow::V0::Models::TierStrategy.apply(x))
|
14838
14084
|
@visibility = (x = opts.delete(:visibility); x.is_a?(::Io::Flow::V0::Models::Visibility) ? x : ::Io::Flow::V0::Models::Visibility.apply(x))
|
14839
14085
|
end
|
@@ -14852,7 +14098,7 @@ module Io
|
|
14852
14098
|
:experience => experience.to_hash,
|
14853
14099
|
:integration => integration.value,
|
14854
14100
|
:name => name,
|
14855
|
-
:services => services
|
14101
|
+
:services => services,
|
14856
14102
|
:strategy => strategy.value,
|
14857
14103
|
:visibility => visibility.value
|
14858
14104
|
}
|