flowcommerce 0.0.66 → 0.0.68
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 +194 -56
- 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: 42ccb98c59c58414e13d86bb69900c224d9df4e2
|
4
|
+
data.tar.gz: ed339f6ac6ab00ff0184435d9686909330eaefd3
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f2e935a88c413119127bb4489400474cc9917b458661570c9f1f0a3887226ad6cb5ccddbe34905bf61a636cb9fb54170937c4f0e151e1e0fe835e8eecbef1c67
|
7
|
+
data.tar.gz: cd9865c1858837f9fb2444ddc93435e5fa3c53728376c0c2d103fd8005cc18bf5ecc3e2e8e14c5ac07c2c4b28f17df02538ca5d8d88222784c7863734410e7af
|
@@ -1,6 +1,6 @@
|
|
1
1
|
# Generated by apidoc - http://www.apidoc.me
|
2
|
-
# Service version: 0.1.
|
3
|
-
# apidoc:0.11.37 http://www.apidoc.me/flow/api/0.1.
|
2
|
+
# Service version: 0.1.72
|
3
|
+
# apidoc:0.11.37 http://www.apidoc.me/flow/api/0.1.71/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.37 http://www.apidoc.me/flow/api/0.1.
|
29
|
-
VERSION = '0.1.
|
28
|
+
USER_AGENT = 'apidoc:0.11.37 http://www.apidoc.me/flow/api/0.1.71/ruby_client' unless defined?(Constants::USER_AGENT)
|
29
|
+
VERSION = '0.1.72' unless defined?(Constants::VERSION)
|
30
30
|
VERSION_MAJOR = 0 unless defined?(VERSION_MAJOR)
|
31
31
|
|
32
32
|
end
|
@@ -85,6 +85,10 @@ module Io
|
|
85
85
|
@order_estimates ||= ::Io::Flow::V0::Clients::OrderEstimates.new(self)
|
86
86
|
end
|
87
87
|
|
88
|
+
def queries
|
89
|
+
@queries ||= ::Io::Flow::V0::Clients::Queries.new(self)
|
90
|
+
end
|
91
|
+
|
88
92
|
def subcatalogs
|
89
93
|
@subcatalogs ||= ::Io::Flow::V0::Clients::Subcatalogs.new(self)
|
90
94
|
end
|
@@ -823,6 +827,21 @@ module Io
|
|
823
827
|
|
824
828
|
end
|
825
829
|
|
830
|
+
class Queries
|
831
|
+
|
832
|
+
def initialize(client)
|
833
|
+
@client = HttpClient::Preconditions.assert_class('client', client, ::Io::Flow::V0::Client)
|
834
|
+
end
|
835
|
+
|
836
|
+
def post_validations(organization, values)
|
837
|
+
HttpClient::Preconditions.assert_class('organization', organization, String)
|
838
|
+
HttpClient::Preconditions.assert_collection_of_class('strings', strings, ::Io::Flow::V0::Models::String)
|
839
|
+
r = @client.request("/#{CGI.escape(organization)}/query/validations").with_json(strings.to_json).post
|
840
|
+
::Io::Flow::V0::Models::QueryValidation.new(r)
|
841
|
+
end
|
842
|
+
|
843
|
+
end
|
844
|
+
|
826
845
|
class Subcatalogs
|
827
846
|
|
828
847
|
def initialize(client)
|
@@ -2573,14 +2592,14 @@ module Io
|
|
2573
2592
|
:offset => HttpClient::Preconditions.assert_class('offset', (x = opts.delete(:offset); x.nil? ? 0 : x), Integer),
|
2574
2593
|
:sort => HttpClient::Preconditions.assert_class('sort', (x = opts.delete(:sort); x.nil? ? "-created_at" : x), String)
|
2575
2594
|
}.delete_if { |k, v| v.nil? }
|
2576
|
-
r = @client.request("
|
2595
|
+
r = @client.request("/#{CGI.escape(organization)}/trackings").with_query(query).get
|
2577
2596
|
r.map { |x| ::Io::Flow::V0::Models::Tracking.new(x) }
|
2578
2597
|
end
|
2579
2598
|
|
2580
2599
|
def post_trackings_by_organization(organization, tracking_form)
|
2581
2600
|
HttpClient::Preconditions.assert_class('organization', organization, String)
|
2582
2601
|
HttpClient::Preconditions.assert_class('tracking_form', tracking_form, ::Io::Flow::V0::Models::TrackingForm)
|
2583
|
-
r = @client.request("
|
2602
|
+
r = @client.request("/#{CGI.escape(organization)}/trackings").with_json(tracking_form.to_json).post
|
2584
2603
|
::Io::Flow::V0::Models::Tracking.new(r)
|
2585
2604
|
end
|
2586
2605
|
|
@@ -2594,7 +2613,7 @@ module Io
|
|
2594
2613
|
:offset => HttpClient::Preconditions.assert_class('offset', (x = opts.delete(:offset); x.nil? ? 0 : x), Integer),
|
2595
2614
|
:sort => HttpClient::Preconditions.assert_class('sort', (x = opts.delete(:sort); x.nil? ? "journal_timestamp" : x), String)
|
2596
2615
|
}.delete_if { |k, v| v.nil? }
|
2597
|
-
r = @client.request("
|
2616
|
+
r = @client.request("/#{CGI.escape(organization)}/trackings/versions").with_query(query).get
|
2598
2617
|
r.map { |x| ::Io::Flow::V0::Models::TrackingVersion.new(x) }
|
2599
2618
|
end
|
2600
2619
|
|
@@ -2602,7 +2621,7 @@ module Io
|
|
2602
2621
|
# under it, and event(s) under those label(s)
|
2603
2622
|
def get_trackings_by_id(id)
|
2604
2623
|
HttpClient::Preconditions.assert_class('id', id, String)
|
2605
|
-
r = @client.request("/trackings
|
2624
|
+
r = @client.request("/trackings/#{CGI.escape(id)}").get
|
2606
2625
|
::Io::Flow::V0::Models::Tracking.new(r)
|
2607
2626
|
end
|
2608
2627
|
|
@@ -4250,6 +4269,58 @@ module Io
|
|
4250
4269
|
|
4251
4270
|
end
|
4252
4271
|
|
4272
|
+
class OrderError
|
4273
|
+
|
4274
|
+
module Types
|
4275
|
+
ORDER_ITEM_NOT_AVAILABLE_ERROR = 'order_item_not_available_error' unless defined?(ORDER_ITEM_NOT_AVAILABLE_ERROR)
|
4276
|
+
VALIDATION_ERROR = 'validation_error' unless defined?(VALIDATION_ERROR)
|
4277
|
+
end
|
4278
|
+
|
4279
|
+
def initialize(incoming={})
|
4280
|
+
opts = HttpClient::Helper.symbolize_keys(incoming)
|
4281
|
+
HttpClient::Preconditions.require_keys(opts, [:name], 'OrderError')
|
4282
|
+
@name = HttpClient::Preconditions.assert_class('name', opts.delete(:name), String)
|
4283
|
+
end
|
4284
|
+
|
4285
|
+
def to_hash
|
4286
|
+
subtype_to_hash.merge(:code => @name)
|
4287
|
+
end
|
4288
|
+
|
4289
|
+
def OrderError.from_json(hash)
|
4290
|
+
HttpClient::Preconditions.assert_class('hash', hash, Hash)
|
4291
|
+
case HttpClient::Helper.symbolize_keys(hash)[:code]
|
4292
|
+
when Types::ORDER_ITEM_NOT_AVAILABLE_ERROR; OrderItemNotAvailableError.new(hash)
|
4293
|
+
when Types::VALIDATION_ERROR; ValidationError.new(hash)
|
4294
|
+
else OrderErrorUndefinedType.new(:name => union_type_name)
|
4295
|
+
end
|
4296
|
+
end
|
4297
|
+
|
4298
|
+
end
|
4299
|
+
|
4300
|
+
class OrderErrorUndefinedType < OrderError
|
4301
|
+
|
4302
|
+
attr_reader :name
|
4303
|
+
|
4304
|
+
def initialize(incoming={})
|
4305
|
+
super(:name => 'undefined_type')
|
4306
|
+
opts = HttpClient::Helper.symbolize_keys(incoming)
|
4307
|
+
@name = HttpClient::Preconditions.assert_class('name', opts.delete(:name), String)
|
4308
|
+
end
|
4309
|
+
|
4310
|
+
def subtype_to_hash
|
4311
|
+
raise 'Unable to serialize undefined type to json'
|
4312
|
+
end
|
4313
|
+
|
4314
|
+
def copy(incoming={})
|
4315
|
+
raise 'Operation not supported for undefined type'
|
4316
|
+
end
|
4317
|
+
|
4318
|
+
def to_hash
|
4319
|
+
raise 'Operation not supported for undefined type'
|
4320
|
+
end
|
4321
|
+
|
4322
|
+
end
|
4323
|
+
|
4253
4324
|
# Possible outcome types from a tier rule
|
4254
4325
|
class TierRuleOutcome
|
4255
4326
|
|
@@ -7566,21 +7637,22 @@ module Io
|
|
7566
7637
|
|
7567
7638
|
class CardUpserted < Event
|
7568
7639
|
|
7569
|
-
attr_reader :event_id, :timestamp, :organization, :token, :type, :expiration, :last4, :name, :address
|
7640
|
+
attr_reader :event_id, :timestamp, :organization, :token, :type, :expiration, :iin, :last4, :name, :address
|
7570
7641
|
|
7571
7642
|
def initialize(incoming={})
|
7572
7643
|
super(:name => Event::Types::CARD_UPSERTED)
|
7573
7644
|
opts = HttpClient::Helper.symbolize_keys(incoming)
|
7574
|
-
HttpClient::Preconditions.require_keys(opts, [:event_id, :timestamp, :organization, :token, :type, :expiration, :
|
7645
|
+
HttpClient::Preconditions.require_keys(opts, [:event_id, :timestamp, :organization, :token, :type, :expiration, :iin, :last4, :name], 'CardUpserted')
|
7575
7646
|
@event_id = HttpClient::Preconditions.assert_class('event_id', opts.delete(:event_id), String)
|
7576
7647
|
@timestamp = HttpClient::Preconditions.assert_class('timestamp', HttpClient::Helper.to_date_time_iso8601(opts.delete(:timestamp)), DateTime)
|
7577
7648
|
@organization = HttpClient::Preconditions.assert_class('organization', opts.delete(:organization), String)
|
7578
7649
|
@token = HttpClient::Preconditions.assert_class('token', opts.delete(:token), String)
|
7579
7650
|
@type = HttpClient::Preconditions.assert_class('type', opts.delete(:type), String)
|
7580
7651
|
@expiration = HttpClient::Preconditions.assert_class('expiration', HttpClient::Helper.to_object(opts.delete(:expiration)), Hash)
|
7652
|
+
@iin = HttpClient::Preconditions.assert_class('iin', opts.delete(:iin), String)
|
7581
7653
|
@last4 = HttpClient::Preconditions.assert_class('last4', opts.delete(:last4), String)
|
7582
7654
|
@name = HttpClient::Preconditions.assert_class('name', opts.delete(:name), String)
|
7583
|
-
@address = HttpClient::Preconditions.assert_class('address', HttpClient::Helper.to_object(
|
7655
|
+
@address = (x = opts.delete(:address); x.nil? ? nil : HttpClient::Preconditions.assert_class('address', HttpClient::Helper.to_object(x), Hash))
|
7584
7656
|
end
|
7585
7657
|
|
7586
7658
|
def to_json
|
@@ -7599,6 +7671,7 @@ module Io
|
|
7599
7671
|
:token => token,
|
7600
7672
|
:type => type,
|
7601
7673
|
:expiration => expiration,
|
7674
|
+
:iin => iin,
|
7602
7675
|
:last4 => last4,
|
7603
7676
|
:name => name,
|
7604
7677
|
:address => address
|
@@ -9170,36 +9243,6 @@ module Io
|
|
9170
9243
|
|
9171
9244
|
end
|
9172
9245
|
|
9173
|
-
# Represents an error of some sort (e.g. invalid input). Each error will contain
|
9174
|
-
# a code and a specific message describing the failure.
|
9175
|
-
class Error
|
9176
|
-
|
9177
|
-
attr_reader :code, :message
|
9178
|
-
|
9179
|
-
def initialize(incoming={})
|
9180
|
-
opts = HttpClient::Helper.symbolize_keys(incoming)
|
9181
|
-
HttpClient::Preconditions.require_keys(opts, [:code, :message], 'Error')
|
9182
|
-
@code = HttpClient::Preconditions.assert_class('code', opts.delete(:code), String)
|
9183
|
-
@message = HttpClient::Preconditions.assert_class('message', opts.delete(:message), String)
|
9184
|
-
end
|
9185
|
-
|
9186
|
-
def to_json
|
9187
|
-
JSON.dump(to_hash)
|
9188
|
-
end
|
9189
|
-
|
9190
|
-
def copy(incoming={})
|
9191
|
-
Error.new(to_hash.merge(HttpClient::Helper.symbolize_keys(incoming)))
|
9192
|
-
end
|
9193
|
-
|
9194
|
-
def to_hash
|
9195
|
-
{
|
9196
|
-
:code => code,
|
9197
|
-
:message => message
|
9198
|
-
}
|
9199
|
-
end
|
9200
|
-
|
9201
|
-
end
|
9202
|
-
|
9203
9246
|
# Range of time given a from and to number and the unit. For example: 1-4 hours
|
9204
9247
|
# or 4-7 days
|
9205
9248
|
class EstimatedWindow
|
@@ -12870,6 +12913,39 @@ module Io
|
|
12870
12913
|
|
12871
12914
|
end
|
12872
12915
|
|
12916
|
+
# When creating an order, if a particular item is not available in the country /
|
12917
|
+
# destination (either because it was restricted or excluded from that country),
|
12918
|
+
# we return this error to highlight the specific item numbers which are not
|
12919
|
+
# available.
|
12920
|
+
class OrderItemNotAvailableError < OrderError
|
12921
|
+
|
12922
|
+
attr_reader :messages, :numbers
|
12923
|
+
|
12924
|
+
def initialize(incoming={})
|
12925
|
+
super(:name => OrderError::Types::ORDER_ITEM_NOT_AVAILABLE_ERROR)
|
12926
|
+
opts = HttpClient::Helper.symbolize_keys(incoming)
|
12927
|
+
HttpClient::Preconditions.require_keys(opts, [:messages, :numbers], 'OrderItemNotAvailableError')
|
12928
|
+
@messages = HttpClient::Preconditions.assert_class('messages', opts.delete(:messages), Array).map { |v| HttpClient::Preconditions.assert_class('messages', v, String) }
|
12929
|
+
@numbers = HttpClient::Preconditions.assert_class('numbers', opts.delete(:numbers), Array).map { |v| HttpClient::Preconditions.assert_class('numbers', v, String) }
|
12930
|
+
end
|
12931
|
+
|
12932
|
+
def to_json
|
12933
|
+
JSON.dump(to_hash)
|
12934
|
+
end
|
12935
|
+
|
12936
|
+
def copy(incoming={})
|
12937
|
+
OrderItemNotAvailableError.new(subtype_to_hash.merge(HttpClient::Helper.symbolize_keys(incoming)))
|
12938
|
+
end
|
12939
|
+
|
12940
|
+
def subtype_to_hash
|
12941
|
+
{
|
12942
|
+
:messages => messages,
|
12943
|
+
:numbers => numbers
|
12944
|
+
}
|
12945
|
+
end
|
12946
|
+
|
12947
|
+
end
|
12948
|
+
|
12873
12949
|
# Represents a top-level order price detail, e.g. 'Subtotal' or 'VAT'.
|
12874
12950
|
class OrderPriceDetail
|
12875
12951
|
|
@@ -14020,6 +14096,35 @@ module Io
|
|
14020
14096
|
|
14021
14097
|
end
|
14022
14098
|
|
14099
|
+
# Indicates valid and invalid queries
|
14100
|
+
class QueryValidation
|
14101
|
+
|
14102
|
+
attr_reader :valid, :invalid
|
14103
|
+
|
14104
|
+
def initialize(incoming={})
|
14105
|
+
opts = HttpClient::Helper.symbolize_keys(incoming)
|
14106
|
+
HttpClient::Preconditions.require_keys(opts, [:valid, :invalid], 'QueryValidation')
|
14107
|
+
@valid = HttpClient::Preconditions.assert_class('valid', opts.delete(:valid), Array).map { |v| HttpClient::Preconditions.assert_class('valid', v, String) }
|
14108
|
+
@invalid = HttpClient::Preconditions.assert_class('invalid', opts.delete(:invalid), Array).map { |v| HttpClient::Preconditions.assert_class('invalid', v, String) }
|
14109
|
+
end
|
14110
|
+
|
14111
|
+
def to_json
|
14112
|
+
JSON.dump(to_hash)
|
14113
|
+
end
|
14114
|
+
|
14115
|
+
def copy(incoming={})
|
14116
|
+
QueryValidation.new(to_hash.merge(HttpClient::Helper.symbolize_keys(incoming)))
|
14117
|
+
end
|
14118
|
+
|
14119
|
+
def to_hash
|
14120
|
+
{
|
14121
|
+
:valid => valid,
|
14122
|
+
:invalid => invalid
|
14123
|
+
}
|
14124
|
+
end
|
14125
|
+
|
14126
|
+
end
|
14127
|
+
|
14023
14128
|
# Represents a collection of deliveries and available options for fulfillment of
|
14024
14129
|
# that delivery
|
14025
14130
|
class Quote
|
@@ -14814,9 +14919,9 @@ module Io
|
|
14814
14919
|
|
14815
14920
|
def initialize(incoming={})
|
14816
14921
|
opts = HttpClient::Helper.symbolize_keys(incoming)
|
14817
|
-
HttpClient::Preconditions.require_keys(opts, [:id, :
|
14922
|
+
HttpClient::Preconditions.require_keys(opts, [:id, :carrier_tracking_number, :zpl, :destination, :flow_tracking_number, :origin, :service, :window], 'ShippingLabel')
|
14818
14923
|
@id = HttpClient::Preconditions.assert_class('id', opts.delete(:id), String)
|
14819
|
-
@attributes = HttpClient::Preconditions.assert_class('attributes', opts.delete(:attributes), Hash).inject({}) { |h, d| h[d[0]] = HttpClient::Preconditions.assert_class('attributes', d[1], String); h }
|
14924
|
+
@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 }
|
14820
14925
|
@carrier_tracking_number = HttpClient::Preconditions.assert_class('carrier_tracking_number', opts.delete(:carrier_tracking_number), String)
|
14821
14926
|
@zpl = HttpClient::Preconditions.assert_class('zpl', opts.delete(:zpl), String)
|
14822
14927
|
@destination = (x = opts.delete(:destination); x.is_a?(::Io::Flow::V0::Models::ShippingAddress) ? x : ::Io::Flow::V0::Models::ShippingAddress.new(x))
|
@@ -14860,17 +14965,17 @@ module Io
|
|
14860
14965
|
|
14861
14966
|
class ShippingLabelForm
|
14862
14967
|
|
14863
|
-
attr_reader :attributes, :delivered_duty, :service, :destination, :origin, :
|
14968
|
+
attr_reader :attributes, :delivered_duty, :service, :destination, :origin, :package, :order_number
|
14864
14969
|
|
14865
14970
|
def initialize(incoming={})
|
14866
14971
|
opts = HttpClient::Helper.symbolize_keys(incoming)
|
14867
|
-
HttpClient::Preconditions.require_keys(opts, [:delivered_duty, :service, :destination, :origin, :
|
14868
|
-
@attributes =
|
14972
|
+
HttpClient::Preconditions.require_keys(opts, [:delivered_duty, :service, :destination, :origin, :package], 'ShippingLabelForm')
|
14973
|
+
@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 })
|
14869
14974
|
@delivered_duty = (x = opts.delete(:delivered_duty); x.is_a?(::Io::Flow::V0::Models::DeliveredDuty) ? x : ::Io::Flow::V0::Models::DeliveredDuty.apply(x))
|
14870
14975
|
@service = HttpClient::Preconditions.assert_class('service', opts.delete(:service), String)
|
14871
14976
|
@destination = (x = opts.delete(:destination); x.is_a?(::Io::Flow::V0::Models::ShippingAddress) ? x : ::Io::Flow::V0::Models::ShippingAddress.new(x))
|
14872
14977
|
@origin = (x = opts.delete(:origin); x.is_a?(::Io::Flow::V0::Models::ShippingAddress) ? x : ::Io::Flow::V0::Models::ShippingAddress.new(x))
|
14873
|
-
@
|
14978
|
+
@package = (x = opts.delete(:package); x.is_a?(::Io::Flow::V0::Models::ShippingLabelPackage) ? x : ::Io::Flow::V0::Models::ShippingLabelPackage.new(x))
|
14874
14979
|
@order_number = (x = opts.delete(:order_number); x.nil? ? nil : HttpClient::Preconditions.assert_class('order_number', x, String))
|
14875
14980
|
end
|
14876
14981
|
|
@@ -14884,12 +14989,12 @@ module Io
|
|
14884
14989
|
|
14885
14990
|
def to_hash
|
14886
14991
|
{
|
14887
|
-
:attributes => attributes,
|
14992
|
+
:attributes => attributes.nil? ? nil : attributes,
|
14888
14993
|
:delivered_duty => delivered_duty.value,
|
14889
14994
|
:service => service,
|
14890
14995
|
:destination => destination.to_hash,
|
14891
14996
|
:origin => origin.to_hash,
|
14892
|
-
:
|
14997
|
+
:package => package.to_hash,
|
14893
14998
|
:order_number => order_number
|
14894
14999
|
}
|
14895
15000
|
end
|
@@ -16281,15 +16386,16 @@ module Io
|
|
16281
16386
|
# tracking number
|
16282
16387
|
class Tracking
|
16283
16388
|
|
16284
|
-
attr_reader :id, :labels, :status, :
|
16389
|
+
attr_reader :id, :labels, :status, :attributes, :window, :order_number
|
16285
16390
|
|
16286
16391
|
def initialize(incoming={})
|
16287
16392
|
opts = HttpClient::Helper.symbolize_keys(incoming)
|
16288
|
-
HttpClient::Preconditions.require_keys(opts, [:id, :labels, :status, :
|
16393
|
+
HttpClient::Preconditions.require_keys(opts, [:id, :labels, :status, :attributes], 'Tracking')
|
16289
16394
|
@id = HttpClient::Preconditions.assert_class('id', opts.delete(:id), String)
|
16290
16395
|
@labels = HttpClient::Preconditions.assert_class('labels', opts.delete(:labels), Array).map { |v| (x = v; x.is_a?(::Io::Flow::V0::Models::TrackingLabel) ? x : ::Io::Flow::V0::Models::TrackingLabel.new(x)) }
|
16291
16396
|
@status = (x = opts.delete(:status); x.is_a?(::Io::Flow::V0::Models::TrackingStatus) ? x : ::Io::Flow::V0::Models::TrackingStatus.apply(x))
|
16292
|
-
@
|
16397
|
+
@attributes = HttpClient::Preconditions.assert_class('attributes', opts.delete(:attributes), Hash).inject({}) { |h, d| h[d[0]] = HttpClient::Preconditions.assert_class('attributes', d[1], String); h }
|
16398
|
+
@window = (x = opts.delete(:window); x.nil? ? nil : (x = x; x.is_a?(::Io::Flow::V0::Models::DatetimeRange) ? x : ::Io::Flow::V0::Models::DatetimeRange.new(x)))
|
16293
16399
|
@order_number = (x = opts.delete(:order_number); x.nil? ? nil : HttpClient::Preconditions.assert_class('order_number', x, String))
|
16294
16400
|
end
|
16295
16401
|
|
@@ -16306,7 +16412,8 @@ module Io
|
|
16306
16412
|
:id => id,
|
16307
16413
|
:labels => labels.map { |o| o.to_hash },
|
16308
16414
|
:status => status.value,
|
16309
|
-
:
|
16415
|
+
:attributes => attributes,
|
16416
|
+
:window => window.nil? ? nil : window.to_hash,
|
16310
16417
|
:order_number => order_number
|
16311
16418
|
}
|
16312
16419
|
end
|
@@ -16449,13 +16556,14 @@ module Io
|
|
16449
16556
|
# tracking number
|
16450
16557
|
class TrackingForm
|
16451
16558
|
|
16452
|
-
attr_reader :status, :order_number, :
|
16559
|
+
attr_reader :status, :order_number, :attributes, :window
|
16453
16560
|
|
16454
16561
|
def initialize(incoming={})
|
16455
16562
|
opts = HttpClient::Helper.symbolize_keys(incoming)
|
16456
16563
|
@status = (x = opts.delete(:status); x.nil? ? nil : (x = x; x.is_a?(::Io::Flow::V0::Models::TrackingStatus) ? x : ::Io::Flow::V0::Models::TrackingStatus.apply(x)))
|
16457
16564
|
@order_number = (x = opts.delete(:order_number); x.nil? ? nil : HttpClient::Preconditions.assert_class('order_number', x, String))
|
16458
|
-
@
|
16565
|
+
@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 })
|
16566
|
+
@window = (x = opts.delete(:window); x.nil? ? nil : (x = x; x.is_a?(::Io::Flow::V0::Models::DatetimeRange) ? x : ::Io::Flow::V0::Models::DatetimeRange.new(x)))
|
16459
16567
|
end
|
16460
16568
|
|
16461
16569
|
def to_json
|
@@ -16470,7 +16578,8 @@ module Io
|
|
16470
16578
|
{
|
16471
16579
|
:status => status.nil? ? nil : status.value,
|
16472
16580
|
:order_number => order_number,
|
16473
|
-
:
|
16581
|
+
:attributes => attributes.nil? ? nil : attributes,
|
16582
|
+
:window => window.nil? ? nil : window.to_hash
|
16474
16583
|
}
|
16475
16584
|
end
|
16476
16585
|
|
@@ -16907,6 +17016,35 @@ module Io
|
|
16907
17016
|
|
16908
17017
|
end
|
16909
17018
|
|
17019
|
+
# A validation error of some type has occured. See messages for a detailed
|
17020
|
+
# description of the specific error or errors
|
17021
|
+
class ValidationError < OrderError
|
17022
|
+
|
17023
|
+
attr_reader :messages
|
17024
|
+
|
17025
|
+
def initialize(incoming={})
|
17026
|
+
super(:name => OrderError::Types::VALIDATION_ERROR)
|
17027
|
+
opts = HttpClient::Helper.symbolize_keys(incoming)
|
17028
|
+
HttpClient::Preconditions.require_keys(opts, [:messages], 'ValidationError')
|
17029
|
+
@messages = HttpClient::Preconditions.assert_class('messages', opts.delete(:messages), Array).map { |v| HttpClient::Preconditions.assert_class('messages', v, String) }
|
17030
|
+
end
|
17031
|
+
|
17032
|
+
def to_json
|
17033
|
+
JSON.dump(to_hash)
|
17034
|
+
end
|
17035
|
+
|
17036
|
+
def copy(incoming={})
|
17037
|
+
ValidationError.new(subtype_to_hash.merge(HttpClient::Helper.symbolize_keys(incoming)))
|
17038
|
+
end
|
17039
|
+
|
17040
|
+
def subtype_to_hash
|
17041
|
+
{
|
17042
|
+
:messages => messages
|
17043
|
+
}
|
17044
|
+
end
|
17045
|
+
|
17046
|
+
end
|
17047
|
+
|
16910
17048
|
# Defines the payload of a request to validate a token, with primary goal of
|
16911
17049
|
# preventing the token from being included in an HTTP GET.
|
16912
17050
|
class ValidationForm
|
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.68
|
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-09-
|
11
|
+
date: 2016-09-27 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: json
|