flowcommerce 0.0.27 → 0.0.28
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 +8 -449
- 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: ec118fa840c6ee08c449b5aef349888e492fbf21
|
4
|
+
data.tar.gz: 188b1220a0a6bd81865e15546d21a10cbbf91a2f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2aed66c59452502291f81d2e656d305343ce136883b8409a936e22bd47088946691ce828dbcbbfdbc8229f2144a216586c320b228b0739ca318e495fc79d1490
|
7
|
+
data.tar.gz: 6b0c9b436886dbaf9e577ae7c948523b9b882aa68c8b57c67d79dcadbd4e9a722bcefce95fbd085968b7b23fa027565d5343e7bffbebba0ef252cbf65900c423
|
@@ -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.85
|
3
|
+
# apidoc:0.11.33 http://www.apidoc.me/flow/api/0.0.85/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.85/ruby_client' unless defined?(Constants::USER_AGENT)
|
29
|
+
VERSION = '0.0.85' unless defined?(Constants::VERSION)
|
30
30
|
VERSION_MAJOR = 0 unless defined?(VERSION_MAJOR)
|
31
31
|
|
32
32
|
end
|
@@ -161,10 +161,6 @@ module Io
|
|
161
161
|
@carriers ||= ::Io::Flow::V0::Clients::Carriers.new(self)
|
162
162
|
end
|
163
163
|
|
164
|
-
def carrier_accounts
|
165
|
-
@carrier_accounts ||= ::Io::Flow::V0::Clients::CarrierAccounts.new(self)
|
166
|
-
end
|
167
|
-
|
168
164
|
def centers
|
169
165
|
@centers ||= ::Io::Flow::V0::Clients::Centers.new(self)
|
170
166
|
end
|
@@ -193,10 +189,6 @@ module Io
|
|
193
189
|
@label_events ||= ::Io::Flow::V0::Clients::LabelEvents.new(self)
|
194
190
|
end
|
195
191
|
|
196
|
-
def lanes
|
197
|
-
@lanes ||= ::Io::Flow::V0::Clients::Lanes.new(self)
|
198
|
-
end
|
199
|
-
|
200
192
|
def quotes
|
201
193
|
@quotes ||= ::Io::Flow::V0::Clients::Quotes.new(self)
|
202
194
|
end
|
@@ -1986,71 +1978,6 @@ module Io
|
|
1986
1978
|
|
1987
1979
|
end
|
1988
1980
|
|
1989
|
-
class CarrierAccounts
|
1990
|
-
|
1991
|
-
def initialize(client)
|
1992
|
-
@client = HttpClient::Preconditions.assert_class('client', client, ::Io::Flow::V0::Client)
|
1993
|
-
end
|
1994
|
-
|
1995
|
-
def get(organization, incoming={})
|
1996
|
-
HttpClient::Preconditions.assert_class('organization', organization, String)
|
1997
|
-
opts = HttpClient::Helper.symbolize_keys(incoming)
|
1998
|
-
query = {
|
1999
|
-
:id => (x = opts.delete(:id); x.nil? ? nil : HttpClient::Preconditions.assert_class('id', x, Array).map { |v| HttpClient::Preconditions.assert_class('id', v, String) }),
|
2000
|
-
:name => (x = opts.delete(:name); x.nil? ? nil : HttpClient::Preconditions.assert_class('name', x, String)),
|
2001
|
-
:limit => HttpClient::Preconditions.assert_class('limit', (x = opts.delete(:limit); x.nil? ? 25 : x), Integer),
|
2002
|
-
:offset => HttpClient::Preconditions.assert_class('offset', (x = opts.delete(:offset); x.nil? ? 0 : x), Integer),
|
2003
|
-
:sort => HttpClient::Preconditions.assert_class('sort', (x = opts.delete(:sort); x.nil? ? "name" : x), String)
|
2004
|
-
}.delete_if { |k, v| v.nil? }
|
2005
|
-
r = @client.request("/#{CGI.escape(organization)}/carrier_accounts").with_query(query).get
|
2006
|
-
r.map { |x| ::Io::Flow::V0::Models::CarrierAccount.new(x) }
|
2007
|
-
end
|
2008
|
-
|
2009
|
-
def post(organization, carrier_account_form)
|
2010
|
-
HttpClient::Preconditions.assert_class('organization', organization, String)
|
2011
|
-
HttpClient::Preconditions.assert_class('carrier_account_form', carrier_account_form, ::Io::Flow::V0::Models::CarrierAccountForm)
|
2012
|
-
r = @client.request("/#{CGI.escape(organization)}/carrier_accounts").with_json(carrier_account_form.to_json).post
|
2013
|
-
::Io::Flow::V0::Models::CarrierAccount.new(r)
|
2014
|
-
end
|
2015
|
-
|
2016
|
-
def get_by_id(organization, id)
|
2017
|
-
HttpClient::Preconditions.assert_class('organization', organization, String)
|
2018
|
-
HttpClient::Preconditions.assert_class('id', id, String)
|
2019
|
-
r = @client.request("/#{CGI.escape(organization)}/carrier_accounts/#{CGI.escape(id)}").get
|
2020
|
-
::Io::Flow::V0::Models::CarrierAccount.new(r)
|
2021
|
-
end
|
2022
|
-
|
2023
|
-
def put_by_id(organization, id, carrier_account_form)
|
2024
|
-
HttpClient::Preconditions.assert_class('organization', organization, String)
|
2025
|
-
HttpClient::Preconditions.assert_class('id', id, String)
|
2026
|
-
HttpClient::Preconditions.assert_class('carrier_account_form', carrier_account_form, ::Io::Flow::V0::Models::CarrierAccountForm)
|
2027
|
-
r = @client.request("/#{CGI.escape(organization)}/carrier_accounts/#{CGI.escape(id)}").with_json(carrier_account_form.to_json).put
|
2028
|
-
::Io::Flow::V0::Models::CarrierAccount.new(r)
|
2029
|
-
end
|
2030
|
-
|
2031
|
-
def delete_by_id(organization, id)
|
2032
|
-
HttpClient::Preconditions.assert_class('organization', organization, String)
|
2033
|
-
HttpClient::Preconditions.assert_class('id', id, String)
|
2034
|
-
r = @client.request("/#{CGI.escape(organization)}/carrier_accounts/#{CGI.escape(id)}").delete
|
2035
|
-
nil
|
2036
|
-
end
|
2037
|
-
|
2038
|
-
def get_versions(organization, incoming={})
|
2039
|
-
HttpClient::Preconditions.assert_class('organization', organization, String)
|
2040
|
-
opts = HttpClient::Helper.symbolize_keys(incoming)
|
2041
|
-
query = {
|
2042
|
-
:id => (x = opts.delete(:id); x.nil? ? nil : HttpClient::Preconditions.assert_class('id', x, Array).map { |v| HttpClient::Preconditions.assert_class('id', v, String) }),
|
2043
|
-
:carrier_account => (x = opts.delete(:carrier_account); x.nil? ? nil : HttpClient::Preconditions.assert_class('carrier_account', x, Array).map { |v| HttpClient::Preconditions.assert_class('carrier_account', v, String) }),
|
2044
|
-
:limit => HttpClient::Preconditions.assert_class('limit', (x = opts.delete(:limit); x.nil? ? 25 : x), Integer),
|
2045
|
-
:offset => HttpClient::Preconditions.assert_class('offset', (x = opts.delete(:offset); x.nil? ? 0 : x), Integer),
|
2046
|
-
:sort => HttpClient::Preconditions.assert_class('sort', (x = opts.delete(:sort); x.nil? ? "journal_timestamp" : x), String)
|
2047
|
-
}.delete_if { |k, v| v.nil? }
|
2048
|
-
r = @client.request("/#{CGI.escape(organization)}/carrier_accounts/versions").with_query(query).get
|
2049
|
-
r.map { |x| ::Io::Flow::V0::Models::CarrierAccountVersion.new(x) }
|
2050
|
-
end
|
2051
|
-
|
2052
|
-
end
|
2053
|
-
|
2054
1981
|
class Centers
|
2055
1982
|
|
2056
1983
|
def initialize(client)
|
@@ -2375,66 +2302,6 @@ module Io
|
|
2375
2302
|
|
2376
2303
|
end
|
2377
2304
|
|
2378
|
-
class Lanes
|
2379
|
-
|
2380
|
-
def initialize(client)
|
2381
|
-
@client = HttpClient::Preconditions.assert_class('client', client, ::Io::Flow::V0::Client)
|
2382
|
-
end
|
2383
|
-
|
2384
|
-
def get(incoming={})
|
2385
|
-
opts = HttpClient::Helper.symbolize_keys(incoming)
|
2386
|
-
query = {
|
2387
|
-
:id => (x = opts.delete(:id); x.nil? ? nil : HttpClient::Preconditions.assert_class('id', x, Array).map { |v| HttpClient::Preconditions.assert_class('id', v, String) }),
|
2388
|
-
:origin => (x = opts.delete(:origin); x.nil? ? nil : HttpClient::Preconditions.assert_class('origin', x, Array).map { |v| HttpClient::Preconditions.assert_class('origin', v, String) }),
|
2389
|
-
:destination => (x = opts.delete(:destination); x.nil? ? nil : HttpClient::Preconditions.assert_class('destination', x, Array).map { |v| HttpClient::Preconditions.assert_class('destination', v, String) }),
|
2390
|
-
:limit => HttpClient::Preconditions.assert_class('limit', (x = opts.delete(:limit); x.nil? ? 25 : x), Integer),
|
2391
|
-
:offset => HttpClient::Preconditions.assert_class('offset', (x = opts.delete(:offset); x.nil? ? 0 : x), Integer),
|
2392
|
-
:sort => HttpClient::Preconditions.assert_class('sort', (x = opts.delete(:sort); x.nil? ? "-created_at" : x), String)
|
2393
|
-
}.delete_if { |k, v| v.nil? }
|
2394
|
-
r = @client.request("/lanes").with_query(query).get
|
2395
|
-
r.map { |x| ::Io::Flow::V0::Models::Lane.new(x) }
|
2396
|
-
end
|
2397
|
-
|
2398
|
-
def post(lane_form)
|
2399
|
-
HttpClient::Preconditions.assert_class('lane_form', lane_form, ::Io::Flow::V0::Models::LaneForm)
|
2400
|
-
r = @client.request("/lanes").with_json(lane_form.to_json).post
|
2401
|
-
::Io::Flow::V0::Models::Lane.new(r)
|
2402
|
-
end
|
2403
|
-
|
2404
|
-
def get_by_id(id)
|
2405
|
-
HttpClient::Preconditions.assert_class('id', id, String)
|
2406
|
-
r = @client.request("/lanes/#{CGI.escape(id)}").get
|
2407
|
-
::Io::Flow::V0::Models::Lane.new(r)
|
2408
|
-
end
|
2409
|
-
|
2410
|
-
def put_by_id(id, lane_form)
|
2411
|
-
HttpClient::Preconditions.assert_class('id', id, String)
|
2412
|
-
HttpClient::Preconditions.assert_class('lane_form', lane_form, ::Io::Flow::V0::Models::LaneForm)
|
2413
|
-
r = @client.request("/lanes/#{CGI.escape(id)}").with_json(lane_form.to_json).put
|
2414
|
-
::Io::Flow::V0::Models::Lane.new(r)
|
2415
|
-
end
|
2416
|
-
|
2417
|
-
def delete_by_id(id)
|
2418
|
-
HttpClient::Preconditions.assert_class('id', id, String)
|
2419
|
-
r = @client.request("/lanes/#{CGI.escape(id)}").delete
|
2420
|
-
nil
|
2421
|
-
end
|
2422
|
-
|
2423
|
-
def get_versions(incoming={})
|
2424
|
-
opts = HttpClient::Helper.symbolize_keys(incoming)
|
2425
|
-
query = {
|
2426
|
-
:id => (x = opts.delete(:id); x.nil? ? nil : HttpClient::Preconditions.assert_class('id', x, Array).map { |v| HttpClient::Preconditions.assert_class('id', v, String) }),
|
2427
|
-
:lane => (x = opts.delete(:lane); x.nil? ? nil : HttpClient::Preconditions.assert_class('lane', x, Array).map { |v| HttpClient::Preconditions.assert_class('lane', v, String) }),
|
2428
|
-
:limit => HttpClient::Preconditions.assert_class('limit', (x = opts.delete(:limit); x.nil? ? 25 : x), Integer),
|
2429
|
-
:offset => HttpClient::Preconditions.assert_class('offset', (x = opts.delete(:offset); x.nil? ? 0 : x), Integer),
|
2430
|
-
:sort => HttpClient::Preconditions.assert_class('sort', (x = opts.delete(:sort); x.nil? ? "journal_timestamp" : x), String)
|
2431
|
-
}.delete_if { |k, v| v.nil? }
|
2432
|
-
r = @client.request("/lanes/versions").with_query(query).get
|
2433
|
-
r.map { |x| ::Io::Flow::V0::Models::LaneVersion.new(x) }
|
2434
|
-
end
|
2435
|
-
|
2436
|
-
end
|
2437
|
-
|
2438
2305
|
class Quotes
|
2439
2306
|
|
2440
2307
|
def initialize(client)
|
@@ -6701,155 +6568,6 @@ module Io
|
|
6701
6568
|
|
6702
6569
|
end
|
6703
6570
|
|
6704
|
-
# carrier_account an organization has with a carrier. A carrier can have
|
6705
|
-
# multiple carrier_accounts with a single carrier. This represents the
|
6706
|
-
# many-to-many relationship between organizations and carriers.
|
6707
|
-
class CarrierAccount
|
6708
|
-
|
6709
|
-
attr_reader :id, :carrier, :name
|
6710
|
-
|
6711
|
-
def initialize(incoming={})
|
6712
|
-
opts = HttpClient::Helper.symbolize_keys(incoming)
|
6713
|
-
HttpClient::Preconditions.require_keys(opts, [:id, :carrier, :name], 'CarrierAccount')
|
6714
|
-
@id = HttpClient::Preconditions.assert_class('id', opts.delete(:id), String)
|
6715
|
-
@carrier = (x = opts.delete(:carrier); x.is_a?(::Io::Flow::V0::Models::Carrier) ? x : ::Io::Flow::V0::Models::Carrier.new(x))
|
6716
|
-
@name = HttpClient::Preconditions.assert_class('name', opts.delete(:name), String)
|
6717
|
-
end
|
6718
|
-
|
6719
|
-
def to_json
|
6720
|
-
JSON.dump(to_hash)
|
6721
|
-
end
|
6722
|
-
|
6723
|
-
def copy(incoming={})
|
6724
|
-
CarrierAccount.new(to_hash.merge(HttpClient::Helper.symbolize_keys(incoming)))
|
6725
|
-
end
|
6726
|
-
|
6727
|
-
def to_hash
|
6728
|
-
{
|
6729
|
-
:id => id,
|
6730
|
-
:carrier => carrier.to_hash,
|
6731
|
-
:name => name
|
6732
|
-
}
|
6733
|
-
end
|
6734
|
-
|
6735
|
-
end
|
6736
|
-
|
6737
|
-
class CarrierAccountForm
|
6738
|
-
|
6739
|
-
attr_reader :carrier, :name
|
6740
|
-
|
6741
|
-
def initialize(incoming={})
|
6742
|
-
opts = HttpClient::Helper.symbolize_keys(incoming)
|
6743
|
-
HttpClient::Preconditions.require_keys(opts, [:carrier], 'CarrierAccountForm')
|
6744
|
-
@carrier = HttpClient::Preconditions.assert_class('carrier', opts.delete(:carrier), String)
|
6745
|
-
@name = (x = opts.delete(:name); x.nil? ? nil : HttpClient::Preconditions.assert_class('name', x, String))
|
6746
|
-
end
|
6747
|
-
|
6748
|
-
def to_json
|
6749
|
-
JSON.dump(to_hash)
|
6750
|
-
end
|
6751
|
-
|
6752
|
-
def copy(incoming={})
|
6753
|
-
CarrierAccountForm.new(to_hash.merge(HttpClient::Helper.symbolize_keys(incoming)))
|
6754
|
-
end
|
6755
|
-
|
6756
|
-
def to_hash
|
6757
|
-
{
|
6758
|
-
:carrier => carrier,
|
6759
|
-
:name => name
|
6760
|
-
}
|
6761
|
-
end
|
6762
|
-
|
6763
|
-
end
|
6764
|
-
|
6765
|
-
class CarrierAccountReference
|
6766
|
-
|
6767
|
-
attr_reader :id
|
6768
|
-
|
6769
|
-
def initialize(incoming={})
|
6770
|
-
opts = HttpClient::Helper.symbolize_keys(incoming)
|
6771
|
-
HttpClient::Preconditions.require_keys(opts, [:id], 'CarrierAccountReference')
|
6772
|
-
@id = HttpClient::Preconditions.assert_class('id', opts.delete(:id), String)
|
6773
|
-
end
|
6774
|
-
|
6775
|
-
def to_json
|
6776
|
-
JSON.dump(to_hash)
|
6777
|
-
end
|
6778
|
-
|
6779
|
-
def copy(incoming={})
|
6780
|
-
CarrierAccountReference.new(to_hash.merge(HttpClient::Helper.symbolize_keys(incoming)))
|
6781
|
-
end
|
6782
|
-
|
6783
|
-
def to_hash
|
6784
|
-
{
|
6785
|
-
:id => id
|
6786
|
-
}
|
6787
|
-
end
|
6788
|
-
|
6789
|
-
end
|
6790
|
-
|
6791
|
-
class CarrierAccountSummary
|
6792
|
-
|
6793
|
-
attr_reader :id, :carrier, :name
|
6794
|
-
|
6795
|
-
def initialize(incoming={})
|
6796
|
-
opts = HttpClient::Helper.symbolize_keys(incoming)
|
6797
|
-
HttpClient::Preconditions.require_keys(opts, [:id, :carrier, :name], 'CarrierAccountSummary')
|
6798
|
-
@id = HttpClient::Preconditions.assert_class('id', opts.delete(:id), String)
|
6799
|
-
@carrier = (x = opts.delete(:carrier); x.is_a?(::Io::Flow::V0::Models::CarrierReference) ? x : ::Io::Flow::V0::Models::CarrierReference.new(x))
|
6800
|
-
@name = HttpClient::Preconditions.assert_class('name', opts.delete(:name), String)
|
6801
|
-
end
|
6802
|
-
|
6803
|
-
def to_json
|
6804
|
-
JSON.dump(to_hash)
|
6805
|
-
end
|
6806
|
-
|
6807
|
-
def copy(incoming={})
|
6808
|
-
CarrierAccountSummary.new(to_hash.merge(HttpClient::Helper.symbolize_keys(incoming)))
|
6809
|
-
end
|
6810
|
-
|
6811
|
-
def to_hash
|
6812
|
-
{
|
6813
|
-
:id => id,
|
6814
|
-
:carrier => carrier.to_hash,
|
6815
|
-
:name => name
|
6816
|
-
}
|
6817
|
-
end
|
6818
|
-
|
6819
|
-
end
|
6820
|
-
|
6821
|
-
class CarrierAccountVersion
|
6822
|
-
|
6823
|
-
attr_reader :id, :timestamp, :type, :carrier_account
|
6824
|
-
|
6825
|
-
def initialize(incoming={})
|
6826
|
-
opts = HttpClient::Helper.symbolize_keys(incoming)
|
6827
|
-
HttpClient::Preconditions.require_keys(opts, [:id, :timestamp, :type, :carrier_account], 'CarrierAccountVersion')
|
6828
|
-
@id = HttpClient::Preconditions.assert_class('id', opts.delete(:id), String)
|
6829
|
-
@timestamp = HttpClient::Preconditions.assert_class('timestamp', HttpClient::Helper.to_date_time_iso8601(opts.delete(:timestamp)), DateTime)
|
6830
|
-
@type = (x = opts.delete(:type); x.is_a?(::Io::Flow::V0::Models::ChangeType) ? x : ::Io::Flow::V0::Models::ChangeType.apply(x))
|
6831
|
-
@carrier_account = (x = opts.delete(:carrier_account); x.is_a?(::Io::Flow::V0::Models::CarrierAccountSummary) ? x : ::Io::Flow::V0::Models::CarrierAccountSummary.new(x))
|
6832
|
-
end
|
6833
|
-
|
6834
|
-
def to_json
|
6835
|
-
JSON.dump(to_hash)
|
6836
|
-
end
|
6837
|
-
|
6838
|
-
def copy(incoming={})
|
6839
|
-
CarrierAccountVersion.new(to_hash.merge(HttpClient::Helper.symbolize_keys(incoming)))
|
6840
|
-
end
|
6841
|
-
|
6842
|
-
def to_hash
|
6843
|
-
{
|
6844
|
-
:id => id,
|
6845
|
-
:timestamp => timestamp,
|
6846
|
-
:type => type.value,
|
6847
|
-
:carrier_account => carrier_account.to_hash
|
6848
|
-
}
|
6849
|
-
end
|
6850
|
-
|
6851
|
-
end
|
6852
|
-
|
6853
6571
|
# Partner that actually take a shipment between places (ex: FedEx, DHL, SF
|
6854
6572
|
# Express)
|
6855
6573
|
class CarrierForm
|
@@ -10457,140 +10175,6 @@ module Io
|
|
10457
10175
|
|
10458
10176
|
end
|
10459
10177
|
|
10460
|
-
# Available origin/destination mapping and available metadata for lanes of a
|
10461
|
-
# carrier Service. e.g. UPS Ground only US-US, UPS Intl only US-Intl, etc
|
10462
|
-
class Lane
|
10463
|
-
|
10464
|
-
attr_reader :id, :service, :origin, :destination, :window
|
10465
|
-
|
10466
|
-
def initialize(incoming={})
|
10467
|
-
opts = HttpClient::Helper.symbolize_keys(incoming)
|
10468
|
-
HttpClient::Preconditions.require_keys(opts, [:id, :service, :origin, :destination, :window], 'Lane')
|
10469
|
-
@id = HttpClient::Preconditions.assert_class('id', opts.delete(:id), String)
|
10470
|
-
@service = (x = opts.delete(:service); x.is_a?(::Io::Flow::V0::Models::Service) ? x : ::Io::Flow::V0::Models::Service.new(x))
|
10471
|
-
@origin = HttpClient::Preconditions.assert_class('origin', opts.delete(:origin), String)
|
10472
|
-
@destination = HttpClient::Preconditions.assert_class('destination', opts.delete(:destination), String)
|
10473
|
-
@window = (x = opts.delete(:window); x.is_a?(::Io::Flow::V0::Models::EstimatedWindow) ? x : ::Io::Flow::V0::Models::EstimatedWindow.new(x))
|
10474
|
-
end
|
10475
|
-
|
10476
|
-
def to_json
|
10477
|
-
JSON.dump(to_hash)
|
10478
|
-
end
|
10479
|
-
|
10480
|
-
def copy(incoming={})
|
10481
|
-
Lane.new(to_hash.merge(HttpClient::Helper.symbolize_keys(incoming)))
|
10482
|
-
end
|
10483
|
-
|
10484
|
-
def to_hash
|
10485
|
-
{
|
10486
|
-
:id => id,
|
10487
|
-
:service => service.to_hash,
|
10488
|
-
:origin => origin,
|
10489
|
-
:destination => destination,
|
10490
|
-
:window => window.to_hash
|
10491
|
-
}
|
10492
|
-
end
|
10493
|
-
|
10494
|
-
end
|
10495
|
-
|
10496
|
-
class LaneForm
|
10497
|
-
|
10498
|
-
attr_reader :service, :origin_country, :destination_country, :window
|
10499
|
-
|
10500
|
-
def initialize(incoming={})
|
10501
|
-
opts = HttpClient::Helper.symbolize_keys(incoming)
|
10502
|
-
HttpClient::Preconditions.require_keys(opts, [:service, :origin_country, :destination_country, :window], 'LaneForm')
|
10503
|
-
@service = HttpClient::Preconditions.assert_class('service', opts.delete(:service), String)
|
10504
|
-
@origin_country = HttpClient::Preconditions.assert_class('origin_country', opts.delete(:origin_country), String)
|
10505
|
-
@destination_country = HttpClient::Preconditions.assert_class('destination_country', opts.delete(:destination_country), String)
|
10506
|
-
@window = (x = opts.delete(:window); x.is_a?(::Io::Flow::V0::Models::EstimatedWindow) ? x : ::Io::Flow::V0::Models::EstimatedWindow.new(x))
|
10507
|
-
end
|
10508
|
-
|
10509
|
-
def to_json
|
10510
|
-
JSON.dump(to_hash)
|
10511
|
-
end
|
10512
|
-
|
10513
|
-
def copy(incoming={})
|
10514
|
-
LaneForm.new(to_hash.merge(HttpClient::Helper.symbolize_keys(incoming)))
|
10515
|
-
end
|
10516
|
-
|
10517
|
-
def to_hash
|
10518
|
-
{
|
10519
|
-
:service => service,
|
10520
|
-
:origin_country => origin_country,
|
10521
|
-
:destination_country => destination_country,
|
10522
|
-
:window => window.to_hash
|
10523
|
-
}
|
10524
|
-
end
|
10525
|
-
|
10526
|
-
end
|
10527
|
-
|
10528
|
-
class LaneSummary
|
10529
|
-
|
10530
|
-
attr_reader :id, :service, :origin, :destination, :window
|
10531
|
-
|
10532
|
-
def initialize(incoming={})
|
10533
|
-
opts = HttpClient::Helper.symbolize_keys(incoming)
|
10534
|
-
HttpClient::Preconditions.require_keys(opts, [:id, :service, :origin, :destination, :window], 'LaneSummary')
|
10535
|
-
@id = HttpClient::Preconditions.assert_class('id', opts.delete(:id), String)
|
10536
|
-
@service = (x = opts.delete(:service); x.is_a?(::Io::Flow::V0::Models::ServiceReference) ? x : ::Io::Flow::V0::Models::ServiceReference.new(x))
|
10537
|
-
@origin = HttpClient::Preconditions.assert_class('origin', opts.delete(:origin), String)
|
10538
|
-
@destination = HttpClient::Preconditions.assert_class('destination', opts.delete(:destination), String)
|
10539
|
-
@window = (x = opts.delete(:window); x.is_a?(::Io::Flow::V0::Models::EstimatedWindow) ? x : ::Io::Flow::V0::Models::EstimatedWindow.new(x))
|
10540
|
-
end
|
10541
|
-
|
10542
|
-
def to_json
|
10543
|
-
JSON.dump(to_hash)
|
10544
|
-
end
|
10545
|
-
|
10546
|
-
def copy(incoming={})
|
10547
|
-
LaneSummary.new(to_hash.merge(HttpClient::Helper.symbolize_keys(incoming)))
|
10548
|
-
end
|
10549
|
-
|
10550
|
-
def to_hash
|
10551
|
-
{
|
10552
|
-
:id => id,
|
10553
|
-
:service => service.to_hash,
|
10554
|
-
:origin => origin,
|
10555
|
-
:destination => destination,
|
10556
|
-
:window => window.to_hash
|
10557
|
-
}
|
10558
|
-
end
|
10559
|
-
|
10560
|
-
end
|
10561
|
-
|
10562
|
-
class LaneVersion
|
10563
|
-
|
10564
|
-
attr_reader :id, :timestamp, :type, :lane
|
10565
|
-
|
10566
|
-
def initialize(incoming={})
|
10567
|
-
opts = HttpClient::Helper.symbolize_keys(incoming)
|
10568
|
-
HttpClient::Preconditions.require_keys(opts, [:id, :timestamp, :type, :lane], 'LaneVersion')
|
10569
|
-
@id = HttpClient::Preconditions.assert_class('id', opts.delete(:id), String)
|
10570
|
-
@timestamp = HttpClient::Preconditions.assert_class('timestamp', HttpClient::Helper.to_date_time_iso8601(opts.delete(:timestamp)), DateTime)
|
10571
|
-
@type = (x = opts.delete(:type); x.is_a?(::Io::Flow::V0::Models::ChangeType) ? x : ::Io::Flow::V0::Models::ChangeType.apply(x))
|
10572
|
-
@lane = (x = opts.delete(:lane); x.is_a?(::Io::Flow::V0::Models::LaneSummary) ? x : ::Io::Flow::V0::Models::LaneSummary.new(x))
|
10573
|
-
end
|
10574
|
-
|
10575
|
-
def to_json
|
10576
|
-
JSON.dump(to_hash)
|
10577
|
-
end
|
10578
|
-
|
10579
|
-
def copy(incoming={})
|
10580
|
-
LaneVersion.new(to_hash.merge(HttpClient::Helper.symbolize_keys(incoming)))
|
10581
|
-
end
|
10582
|
-
|
10583
|
-
def to_hash
|
10584
|
-
{
|
10585
|
-
:id => id,
|
10586
|
-
:timestamp => timestamp,
|
10587
|
-
:type => type.value,
|
10588
|
-
:lane => lane.to_hash
|
10589
|
-
}
|
10590
|
-
end
|
10591
|
-
|
10592
|
-
end
|
10593
|
-
|
10594
10178
|
# ISO 639 2-character language code. See https://api.flow.io/reference/languages
|
10595
10179
|
class Language
|
10596
10180
|
|
@@ -11062,7 +10646,7 @@ module Io
|
|
11062
10646
|
# pricing and delivery options for destination and items/quantities specified.
|
11063
10647
|
class OrderPutForm
|
11064
10648
|
|
11065
|
-
attr_reader :customer, :destination, :items
|
10649
|
+
attr_reader :customer, :destination, :items, :selections
|
11066
10650
|
|
11067
10651
|
def initialize(incoming={})
|
11068
10652
|
opts = HttpClient::Helper.symbolize_keys(incoming)
|
@@ -11070,6 +10654,7 @@ module Io
|
|
11070
10654
|
@customer = (x = opts.delete(:customer); x.is_a?(::Io::Flow::V0::Models::Customer) ? x : ::Io::Flow::V0::Models::Customer.new(x))
|
11071
10655
|
@destination = (x = opts.delete(:destination); x.is_a?(::Io::Flow::V0::Models::Address) ? x : ::Io::Flow::V0::Models::Address.new(x))
|
11072
10656
|
@items = HttpClient::Preconditions.assert_class('items', opts.delete(:items), Array).map { |v| (x = v; x.is_a?(::Io::Flow::V0::Models::ItemSummary) ? x : ::Io::Flow::V0::Models::ItemSummary.new(x)) }
|
10657
|
+
@selections = (x = opts.delete(:selections); x.nil? ? nil : HttpClient::Preconditions.assert_class('selections', x, Array).map { |v| HttpClient::Preconditions.assert_class('selections', v, String) })
|
11073
10658
|
end
|
11074
10659
|
|
11075
10660
|
def to_json
|
@@ -11084,7 +10669,8 @@ module Io
|
|
11084
10669
|
{
|
11085
10670
|
:customer => customer.to_hash,
|
11086
10671
|
:destination => destination.to_hash,
|
11087
|
-
:items => items.map { |o| o.to_hash }
|
10672
|
+
:items => items.map { |o| o.to_hash },
|
10673
|
+
:selections => selections.nil? ? nil : selections
|
11088
10674
|
}
|
11089
10675
|
end
|
11090
10676
|
|
@@ -11116,33 +10702,6 @@ module Io
|
|
11116
10702
|
|
11117
10703
|
end
|
11118
10704
|
|
11119
|
-
# Updates the selections on an order.
|
11120
|
-
class OrderSelectionsForm
|
11121
|
-
|
11122
|
-
attr_reader :selections
|
11123
|
-
|
11124
|
-
def initialize(incoming={})
|
11125
|
-
opts = HttpClient::Helper.symbolize_keys(incoming)
|
11126
|
-
HttpClient::Preconditions.require_keys(opts, [:selections], 'OrderSelectionsForm')
|
11127
|
-
@selections = HttpClient::Preconditions.assert_class('selections', opts.delete(:selections), Array).map { |v| HttpClient::Preconditions.assert_class('selections', v, String) }
|
11128
|
-
end
|
11129
|
-
|
11130
|
-
def to_json
|
11131
|
-
JSON.dump(to_hash)
|
11132
|
-
end
|
11133
|
-
|
11134
|
-
def copy(incoming={})
|
11135
|
-
OrderSelectionsForm.new(to_hash.merge(HttpClient::Helper.symbolize_keys(incoming)))
|
11136
|
-
end
|
11137
|
-
|
11138
|
-
def to_hash
|
11139
|
-
{
|
11140
|
-
:selections => selections
|
11141
|
-
}
|
11142
|
-
end
|
11143
|
-
|
11144
|
-
end
|
11145
|
-
|
11146
10705
|
class OrderVersion
|
11147
10706
|
|
11148
10707
|
attr_reader :id, :timestamp, :type, :order
|
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.0.
|
4
|
+
version: 0.0.28
|
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: 2016-08-
|
11
|
+
date: 2016-08-14 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: json
|