flowcommerce 0.0.30 → 0.0.31
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 +68 -62
- 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: c9fee65071005e9616f48ab00e72b83078584dad
|
4
|
+
data.tar.gz: ce534f064b056fa8de98f84b9b529bb0930d3996
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b5128c3d6a961060e218fe23ce21bce1023ea5ea7a36d8889053ad804d4693dce1399542d22ab3dbf079e1f6919f97a3285a4e6643c3549686b7b1cff9f5feb6
|
7
|
+
data.tar.gz: 4b34999896d7d9e2ec39883c319922c2ea367ae6a7ebd95e75a9c31fe98726a48d1a41e0e6776230c7e826245c7fb0a1fd6ab34eee4675de963cb20d384be4e3
|
@@ -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.94
|
3
|
+
# apidoc:0.11.33 http://www.apidoc.me/flow/api/0.0.94/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.94/ruby_client' unless defined?(Constants::USER_AGENT)
|
29
|
+
VERSION = '0.0.94' unless defined?(Constants::VERSION)
|
30
30
|
VERSION_MAJOR = 0 unless defined?(VERSION_MAJOR)
|
31
31
|
|
32
32
|
end
|
@@ -1355,9 +1355,7 @@ module Io
|
|
1355
1355
|
query = {
|
1356
1356
|
:number => HttpClient::Preconditions.assert_class('number', opts.delete(:number), String),
|
1357
1357
|
:address => (x = opts.delete(:address); x.nil? ? nil : HttpClient::Preconditions.assert_class('address', x, String)),
|
1358
|
-
:ip => (x = opts.delete(:ip); x.nil? ? nil : HttpClient::Preconditions.assert_class('ip', x, String))
|
1359
|
-
:latitude => (x = opts.delete(:latitude); x.nil? ? nil : HttpClient::Preconditions.assert_class('latitude', x, String)),
|
1360
|
-
:longitude => (x = opts.delete(:longitude); x.nil? ? nil : HttpClient::Preconditions.assert_class('longitude', x, String))
|
1358
|
+
:ip => (x = opts.delete(:ip); x.nil? ? nil : HttpClient::Preconditions.assert_class('ip', x, String))
|
1361
1359
|
}.delete_if { |k, v| v.nil? }
|
1362
1360
|
r = @client.request("/#{CGI.escape(organization)}/harmonization/duties/#{CGI.escape(origin)}").with_query(query).get
|
1363
1361
|
::Io::Flow::V0::Models::Duty.new(r)
|
@@ -1621,9 +1619,7 @@ module Io
|
|
1621
1619
|
opts = HttpClient::Helper.symbolize_keys(incoming)
|
1622
1620
|
query = {
|
1623
1621
|
:address => (x = opts.delete(:address); x.nil? ? nil : HttpClient::Preconditions.assert_class('address', x, String)),
|
1624
|
-
:ip => (x = opts.delete(:ip); x.nil? ? nil : HttpClient::Preconditions.assert_class('ip', x, String))
|
1625
|
-
:latitude => (x = opts.delete(:latitude); x.nil? ? nil : HttpClient::Preconditions.assert_class('latitude', x, String)),
|
1626
|
-
:longitude => (x = opts.delete(:longitude); x.nil? ? nil : HttpClient::Preconditions.assert_class('longitude', x, String))
|
1622
|
+
:ip => (x = opts.delete(:ip); x.nil? ? nil : HttpClient::Preconditions.assert_class('ip', x, String))
|
1627
1623
|
}.delete_if { |k, v| v.nil? }
|
1628
1624
|
r = @client.request("/#{CGI.escape(organization)}/harmonization/taxes").with_query(query).get
|
1629
1625
|
::Io::Flow::V0::Models::Tax.new(r)
|
@@ -7185,12 +7181,12 @@ module Io
|
|
7185
7181
|
|
7186
7182
|
class CatalogItemUpserted < Event
|
7187
7183
|
|
7188
|
-
attr_reader :event_id, :timestamp, :organization, :number, :catalog, :locale, :name, :currency, :price, :categories, :attributes, :
|
7184
|
+
attr_reader :event_id, :timestamp, :organization, :number, :catalog, :locale, :name, :currency, :price, :categories, :description, :attributes, :dimensions, :images
|
7189
7185
|
|
7190
7186
|
def initialize(incoming={})
|
7191
7187
|
super(:name => Event::Types::CATALOG_ITEM_UPSERTED)
|
7192
7188
|
opts = HttpClient::Helper.symbolize_keys(incoming)
|
7193
|
-
HttpClient::Preconditions.require_keys(opts, [:event_id, :timestamp, :organization, :number, :catalog, :locale, :name, :currency, :price, :categories, :attributes], 'CatalogItemUpserted')
|
7189
|
+
HttpClient::Preconditions.require_keys(opts, [:event_id, :timestamp, :organization, :number, :catalog, :locale, :name, :currency, :price, :categories, :attributes, :dimensions, :images], 'CatalogItemUpserted')
|
7194
7190
|
@event_id = HttpClient::Preconditions.assert_class('event_id', opts.delete(:event_id), String)
|
7195
7191
|
@timestamp = HttpClient::Preconditions.assert_class('timestamp', HttpClient::Helper.to_date_time_iso8601(opts.delete(:timestamp)), DateTime)
|
7196
7192
|
@organization = HttpClient::Preconditions.assert_class('organization', opts.delete(:organization), String)
|
@@ -7201,8 +7197,10 @@ module Io
|
|
7201
7197
|
@currency = HttpClient::Preconditions.assert_class('currency', opts.delete(:currency), String)
|
7202
7198
|
@price = HttpClient::Preconditions.assert_class('price', opts.delete(:price), Numeric)
|
7203
7199
|
@categories = HttpClient::Preconditions.assert_class('categories', opts.delete(:categories), Array).map { |v| HttpClient::Preconditions.assert_class('categories', v, String) }
|
7204
|
-
@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 }
|
7205
7200
|
@description = (x = opts.delete(:description); x.nil? ? nil : HttpClient::Preconditions.assert_class('description', x, String))
|
7201
|
+
@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 }
|
7202
|
+
@dimensions = HttpClient::Preconditions.assert_class('dimensions', HttpClient::Helper.to_object(opts.delete(:dimensions)), Hash)
|
7203
|
+
@images = HttpClient::Preconditions.assert_class('images', HttpClient::Helper.to_object(opts.delete(:images)), Hash)
|
7206
7204
|
end
|
7207
7205
|
|
7208
7206
|
def to_json
|
@@ -7225,8 +7223,10 @@ module Io
|
|
7225
7223
|
:currency => currency,
|
7226
7224
|
:price => price,
|
7227
7225
|
:categories => categories,
|
7226
|
+
:description => description,
|
7228
7227
|
:attributes => attributes,
|
7229
|
-
:
|
7228
|
+
:dimensions => dimensions,
|
7229
|
+
:images => images
|
7230
7230
|
}
|
7231
7231
|
end
|
7232
7232
|
|
@@ -7814,7 +7814,7 @@ module Io
|
|
7814
7814
|
opts = HttpClient::Helper.symbolize_keys(incoming)
|
7815
7815
|
HttpClient::Preconditions.require_keys(opts, [:id, :items, :options], 'Delivery')
|
7816
7816
|
@id = HttpClient::Preconditions.assert_class('id', opts.delete(:id), String)
|
7817
|
-
@items = HttpClient::Preconditions.assert_class('items', opts.delete(:items), Array).map { |v| (x = v; x.is_a?(::Io::Flow::V0::Models::
|
7817
|
+
@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)) }
|
7818
7818
|
@options = HttpClient::Preconditions.assert_class('options', opts.delete(:options), Array).map { |v| (x = v; x.is_a?(::Io::Flow::V0::Models::DeliveryOption) ? x : ::Io::Flow::V0::Models::DeliveryOption.new(x)) }
|
7819
7819
|
end
|
7820
7820
|
|
@@ -7846,7 +7846,7 @@ module Io
|
|
7846
7846
|
opts = HttpClient::Helper.symbolize_keys(incoming)
|
7847
7847
|
HttpClient::Preconditions.require_keys(opts, [:quote, :items, :destination], 'DeliveryForm')
|
7848
7848
|
@quote = HttpClient::Preconditions.assert_class('quote', opts.delete(:quote), String)
|
7849
|
-
@items = HttpClient::Preconditions.assert_class('items', opts.delete(:items), Array).map { |v| (x = v; x.is_a?(::Io::Flow::V0::Models::
|
7849
|
+
@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)) }
|
7850
7850
|
@destination = (x = opts.delete(:destination); x.is_a?(::Io::Flow::V0::Models::ShippingAddress) ? x : ::Io::Flow::V0::Models::ShippingAddress.new(x))
|
7851
7851
|
end
|
7852
7852
|
|
@@ -7918,7 +7918,7 @@ module Io
|
|
7918
7918
|
opts = HttpClient::Helper.symbolize_keys(incoming)
|
7919
7919
|
HttpClient::Preconditions.require_keys(opts, [:delivery, :items, :destination], 'DeliveryOptionForm')
|
7920
7920
|
@delivery = HttpClient::Preconditions.assert_class('delivery', opts.delete(:delivery), String)
|
7921
|
-
@items = HttpClient::Preconditions.assert_class('items', opts.delete(:items), Array).map { |v| (x = v; x.is_a?(::Io::Flow::V0::Models::
|
7921
|
+
@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)) }
|
7922
7922
|
@destination = (x = opts.delete(:destination); x.is_a?(::Io::Flow::V0::Models::ShippingAddress) ? x : ::Io::Flow::V0::Models::ShippingAddress.new(x))
|
7923
7923
|
end
|
7924
7924
|
|
@@ -8044,7 +8044,7 @@ module Io
|
|
8044
8044
|
opts = HttpClient::Helper.symbolize_keys(incoming)
|
8045
8045
|
HttpClient::Preconditions.require_keys(opts, [:id, :items], 'DeliverySummary')
|
8046
8046
|
@id = HttpClient::Preconditions.assert_class('id', opts.delete(:id), String)
|
8047
|
-
@items = HttpClient::Preconditions.assert_class('items', opts.delete(:items), Array).map { |v| (x = v; x.is_a?(::Io::Flow::V0::Models::
|
8047
|
+
@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)) }
|
8048
8048
|
end
|
8049
8049
|
|
8050
8050
|
def to_json
|
@@ -8585,23 +8585,25 @@ module Io
|
|
8585
8585
|
|
8586
8586
|
class ExperienceUpserted < Event
|
8587
8587
|
|
8588
|
-
attr_reader :event_id, :timestamp, :organization, :key, :name, :subcatalog_id, :region_id, :country, :currency, :language, :measurement_system
|
8588
|
+
attr_reader :event_id, :timestamp, :organization, :key, :name, :delivered_duty, :subcatalog_id, :region_id, :country, :currency, :language, :measurement_system, :position
|
8589
8589
|
|
8590
8590
|
def initialize(incoming={})
|
8591
8591
|
super(:name => Event::Types::EXPERIENCE_UPSERTED)
|
8592
8592
|
opts = HttpClient::Helper.symbolize_keys(incoming)
|
8593
|
-
HttpClient::Preconditions.require_keys(opts, [:event_id, :timestamp, :organization, :key, :name, :subcatalog_id, :region_id, :country, :currency, :language, :measurement_system], 'ExperienceUpserted')
|
8593
|
+
HttpClient::Preconditions.require_keys(opts, [:event_id, :timestamp, :organization, :key, :name, :delivered_duty, :subcatalog_id, :region_id, :country, :currency, :language, :measurement_system, :position], 'ExperienceUpserted')
|
8594
8594
|
@event_id = HttpClient::Preconditions.assert_class('event_id', opts.delete(:event_id), String)
|
8595
8595
|
@timestamp = HttpClient::Preconditions.assert_class('timestamp', HttpClient::Helper.to_date_time_iso8601(opts.delete(:timestamp)), DateTime)
|
8596
8596
|
@organization = HttpClient::Preconditions.assert_class('organization', opts.delete(:organization), String)
|
8597
8597
|
@key = HttpClient::Preconditions.assert_class('key', opts.delete(:key), String)
|
8598
8598
|
@name = HttpClient::Preconditions.assert_class('name', opts.delete(:name), String)
|
8599
|
+
@delivered_duty = HttpClient::Preconditions.assert_class('delivered_duty', opts.delete(:delivered_duty), String)
|
8599
8600
|
@subcatalog_id = HttpClient::Preconditions.assert_class('subcatalog_id', opts.delete(:subcatalog_id), String)
|
8600
8601
|
@region_id = HttpClient::Preconditions.assert_class('region_id', opts.delete(:region_id), String)
|
8601
8602
|
@country = HttpClient::Preconditions.assert_class('country', opts.delete(:country), String)
|
8602
8603
|
@currency = HttpClient::Preconditions.assert_class('currency', opts.delete(:currency), String)
|
8603
8604
|
@language = HttpClient::Preconditions.assert_class('language', opts.delete(:language), String)
|
8604
8605
|
@measurement_system = HttpClient::Preconditions.assert_class('measurement_system', opts.delete(:measurement_system), String)
|
8606
|
+
@position = HttpClient::Preconditions.assert_class('position', opts.delete(:position), Integer)
|
8605
8607
|
end
|
8606
8608
|
|
8607
8609
|
def to_json
|
@@ -8619,12 +8621,14 @@ module Io
|
|
8619
8621
|
:organization => organization,
|
8620
8622
|
:key => key,
|
8621
8623
|
:name => name,
|
8624
|
+
:delivered_duty => delivered_duty,
|
8622
8625
|
:subcatalog_id => subcatalog_id,
|
8623
8626
|
:region_id => region_id,
|
8624
8627
|
:country => country,
|
8625
8628
|
:currency => currency,
|
8626
8629
|
:language => language,
|
8627
|
-
:measurement_system => measurement_system
|
8630
|
+
:measurement_system => measurement_system,
|
8631
|
+
:position => position
|
8628
8632
|
}
|
8629
8633
|
end
|
8630
8634
|
|
@@ -9769,12 +9773,12 @@ module Io
|
|
9769
9773
|
|
9770
9774
|
class InventoryCenterReference
|
9771
9775
|
|
9772
|
-
attr_reader :
|
9776
|
+
attr_reader :key
|
9773
9777
|
|
9774
9778
|
def initialize(incoming={})
|
9775
9779
|
opts = HttpClient::Helper.symbolize_keys(incoming)
|
9776
|
-
HttpClient::Preconditions.require_keys(opts, [:
|
9777
|
-
@
|
9780
|
+
HttpClient::Preconditions.require_keys(opts, [:key], 'InventoryCenterReference')
|
9781
|
+
@key = HttpClient::Preconditions.assert_class('key', opts.delete(:key), String)
|
9778
9782
|
end
|
9779
9783
|
|
9780
9784
|
def to_json
|
@@ -9787,7 +9791,7 @@ module Io
|
|
9787
9791
|
|
9788
9792
|
def to_hash
|
9789
9793
|
{
|
9790
|
-
:
|
9794
|
+
:key => key
|
9791
9795
|
}
|
9792
9796
|
end
|
9793
9797
|
|
@@ -10585,10 +10589,10 @@ module Io
|
|
10585
10589
|
|
10586
10590
|
def initialize(incoming={})
|
10587
10591
|
opts = HttpClient::Helper.symbolize_keys(incoming)
|
10588
|
-
HttpClient::Preconditions.require_keys(opts, [:name, :margin], 'ItemMarginForm')
|
10592
|
+
HttpClient::Preconditions.require_keys(opts, [:name, :margin, :q], 'ItemMarginForm')
|
10589
10593
|
@name = HttpClient::Preconditions.assert_class('name', opts.delete(:name), String)
|
10590
10594
|
@margin = (x = opts.delete(:margin); x.is_a?(::Io::Flow::V0::Models::Margin) ? x : ::Io::Flow::V0::Models::Margin.new(x))
|
10591
|
-
@q =
|
10595
|
+
@q = HttpClient::Preconditions.assert_class('q', opts.delete(:q), String)
|
10592
10596
|
@position = (x = opts.delete(:position); x.nil? ? nil : HttpClient::Preconditions.assert_class('position', x, Integer))
|
10593
10597
|
end
|
10594
10598
|
|
@@ -10673,35 +10677,6 @@ module Io
|
|
10673
10677
|
|
10674
10678
|
end
|
10675
10679
|
|
10676
|
-
# Summary of product line item
|
10677
|
-
class ItemSummary
|
10678
|
-
|
10679
|
-
attr_reader :number, :quantity
|
10680
|
-
|
10681
|
-
def initialize(incoming={})
|
10682
|
-
opts = HttpClient::Helper.symbolize_keys(incoming)
|
10683
|
-
HttpClient::Preconditions.require_keys(opts, [:number, :quantity], 'ItemSummary')
|
10684
|
-
@number = HttpClient::Preconditions.assert_class('number', opts.delete(:number), String)
|
10685
|
-
@quantity = HttpClient::Preconditions.assert_class('quantity', opts.delete(:quantity), Integer)
|
10686
|
-
end
|
10687
|
-
|
10688
|
-
def to_json
|
10689
|
-
JSON.dump(to_hash)
|
10690
|
-
end
|
10691
|
-
|
10692
|
-
def copy(incoming={})
|
10693
|
-
ItemSummary.new(to_hash.merge(HttpClient::Helper.symbolize_keys(incoming)))
|
10694
|
-
end
|
10695
|
-
|
10696
|
-
def to_hash
|
10697
|
-
{
|
10698
|
-
:number => number,
|
10699
|
-
:quantity => quantity
|
10700
|
-
}
|
10701
|
-
end
|
10702
|
-
|
10703
|
-
end
|
10704
|
-
|
10705
10680
|
class ItemVersion
|
10706
10681
|
|
10707
10682
|
attr_reader :id, :timestamp, :type, :item
|
@@ -11041,6 +11016,37 @@ module Io
|
|
11041
11016
|
|
11042
11017
|
end
|
11043
11018
|
|
11019
|
+
# Summary of product line item
|
11020
|
+
class LineItem
|
11021
|
+
|
11022
|
+
attr_reader :number, :quantity, :center
|
11023
|
+
|
11024
|
+
def initialize(incoming={})
|
11025
|
+
opts = HttpClient::Helper.symbolize_keys(incoming)
|
11026
|
+
HttpClient::Preconditions.require_keys(opts, [:number, :quantity], 'LineItem')
|
11027
|
+
@number = HttpClient::Preconditions.assert_class('number', opts.delete(:number), String)
|
11028
|
+
@quantity = HttpClient::Preconditions.assert_class('quantity', opts.delete(:quantity), Integer)
|
11029
|
+
@center = (x = opts.delete(:center); x.nil? ? nil : HttpClient::Preconditions.assert_class('center', x, String))
|
11030
|
+
end
|
11031
|
+
|
11032
|
+
def to_json
|
11033
|
+
JSON.dump(to_hash)
|
11034
|
+
end
|
11035
|
+
|
11036
|
+
def copy(incoming={})
|
11037
|
+
LineItem.new(to_hash.merge(HttpClient::Helper.symbolize_keys(incoming)))
|
11038
|
+
end
|
11039
|
+
|
11040
|
+
def to_hash
|
11041
|
+
{
|
11042
|
+
:number => number,
|
11043
|
+
:quantity => quantity,
|
11044
|
+
:center => center
|
11045
|
+
}
|
11046
|
+
end
|
11047
|
+
|
11048
|
+
end
|
11049
|
+
|
11044
11050
|
class Local
|
11045
11051
|
|
11046
11052
|
attr_reader :prices
|
@@ -11457,7 +11463,7 @@ module Io
|
|
11457
11463
|
@number = HttpClient::Preconditions.assert_class('number', opts.delete(:number), String)
|
11458
11464
|
@customer = (x = opts.delete(:customer); x.is_a?(::Io::Flow::V0::Models::Customer) ? x : ::Io::Flow::V0::Models::Customer.new(x))
|
11459
11465
|
@destination = (x = opts.delete(:destination); x.is_a?(::Io::Flow::V0::Models::Address) ? x : ::Io::Flow::V0::Models::Address.new(x))
|
11460
|
-
@items = HttpClient::Preconditions.assert_class('items', opts.delete(:items), Array).map { |v| (x = v; x.is_a?(::Io::Flow::V0::Models::
|
11466
|
+
@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)) }
|
11461
11467
|
end
|
11462
11468
|
|
11463
11469
|
def to_json
|
@@ -11490,7 +11496,7 @@ module Io
|
|
11490
11496
|
HttpClient::Preconditions.require_keys(opts, [:customer, :destination, :items], 'OrderPutForm')
|
11491
11497
|
@customer = (x = opts.delete(:customer); x.is_a?(::Io::Flow::V0::Models::Customer) ? x : ::Io::Flow::V0::Models::Customer.new(x))
|
11492
11498
|
@destination = (x = opts.delete(:destination); x.is_a?(::Io::Flow::V0::Models::Address) ? x : ::Io::Flow::V0::Models::Address.new(x))
|
11493
|
-
@items = HttpClient::Preconditions.assert_class('items', opts.delete(:items), Array).map { |v| (x = v; x.is_a?(::Io::Flow::V0::Models::
|
11499
|
+
@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)) }
|
11494
11500
|
@selections = (x = opts.delete(:selections); x.nil? ? nil : HttpClient::Preconditions.assert_class('selections', x, Array).map { |v| HttpClient::Preconditions.assert_class('selections', v, String) })
|
11495
11501
|
end
|
11496
11502
|
|
@@ -12406,7 +12412,7 @@ module Io
|
|
12406
12412
|
HttpClient::Preconditions.require_keys(opts, [:destination, :experience, :items], 'QuoteForm')
|
12407
12413
|
@destination = (x = opts.delete(:destination); x.is_a?(::Io::Flow::V0::Models::ShippingAddress) ? x : ::Io::Flow::V0::Models::ShippingAddress.new(x))
|
12408
12414
|
@experience = HttpClient::Preconditions.assert_class('experience', opts.delete(:experience), String)
|
12409
|
-
@items = HttpClient::Preconditions.assert_class('items', opts.delete(:items), Array).map { |v| (x = v; x.is_a?(::Io::Flow::V0::Models::
|
12415
|
+
@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)) }
|
12410
12416
|
end
|
12411
12417
|
|
12412
12418
|
def to_json
|
@@ -13436,7 +13442,7 @@ module Io
|
|
13436
13442
|
@id = HttpClient::Preconditions.assert_class('id', opts.delete(:id), String)
|
13437
13443
|
@commercial_invoice = HttpClient::Preconditions.assert_class('commercial_invoice', opts.delete(:commercial_invoice), String)
|
13438
13444
|
@destination = (x = opts.delete(:destination); x.is_a?(::Io::Flow::V0::Models::ShippingAddress) ? x : ::Io::Flow::V0::Models::ShippingAddress.new(x))
|
13439
|
-
@items = HttpClient::Preconditions.assert_class('items', opts.delete(:items), Array).map { |v| (x = v; x.is_a?(::Io::Flow::V0::Models::
|
13445
|
+
@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)) }
|
13440
13446
|
@shipment_labels = HttpClient::Preconditions.assert_class('shipment_labels', opts.delete(:shipment_labels), Array).map { |v| (x = v; x.is_a?(::Io::Flow::V0::Models::ShipmentLabel) ? x : ::Io::Flow::V0::Models::ShipmentLabel.new(x)) }
|
13441
13447
|
@tracking_number = HttpClient::Preconditions.assert_class('tracking_number', opts.delete(:tracking_number), String)
|
13442
13448
|
end
|
@@ -13472,7 +13478,7 @@ module Io
|
|
13472
13478
|
opts = HttpClient::Helper.symbolize_keys(incoming)
|
13473
13479
|
HttpClient::Preconditions.require_keys(opts, [:destination, :items], 'ShipmentForm')
|
13474
13480
|
@destination = (x = opts.delete(:destination); x.is_a?(::Io::Flow::V0::Models::ShippingAddress) ? x : ::Io::Flow::V0::Models::ShippingAddress.new(x))
|
13475
|
-
@items = HttpClient::Preconditions.assert_class('items', opts.delete(:items), Array).map { |v| (x = v; x.is_a?(::Io::Flow::V0::Models::
|
13481
|
+
@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)) }
|
13476
13482
|
@shipment_labels = (x = opts.delete(:shipment_labels); x.nil? ? nil : HttpClient::Preconditions.assert_class('shipment_labels', x, Array).map { |v| (x = v; x.is_a?(::Io::Flow::V0::Models::ShipmentLabelForm) ? x : ::Io::Flow::V0::Models::ShipmentLabelForm.new(x)) })
|
13477
13483
|
end
|
13478
13484
|
|
@@ -13696,7 +13702,7 @@ module Io
|
|
13696
13702
|
@id = HttpClient::Preconditions.assert_class('id', opts.delete(:id), String)
|
13697
13703
|
@commercial_invoice = HttpClient::Preconditions.assert_class('commercial_invoice', opts.delete(:commercial_invoice), String)
|
13698
13704
|
@destination = (x = opts.delete(:destination); x.is_a?(::Io::Flow::V0::Models::ShippingAddress) ? x : ::Io::Flow::V0::Models::ShippingAddress.new(x))
|
13699
|
-
@items = HttpClient::Preconditions.assert_class('items', opts.delete(:items), Array).map { |v| (x = v; x.is_a?(::Io::Flow::V0::Models::
|
13705
|
+
@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)) }
|
13700
13706
|
@tracking_number = HttpClient::Preconditions.assert_class('tracking_number', opts.delete(:tracking_number), String)
|
13701
13707
|
end
|
13702
13708
|
|
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.31
|
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-17 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: json
|