flowcommerce 0.0.49 → 0.0.50
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 +8 -37
- 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: 7e409708ae3fe9a929917c77eda957a0caa88142
|
4
|
+
data.tar.gz: c58de5b20eaca3b03d3ef0e828a513a35161ba5c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 697b7305dac57ef1f05ff271677eef1c481296f73c340a580daa346b6cb824804b95fc3f497b36dad28918b8a35dee2efd83eb7c2c93defe1c740869383786ea
|
7
|
+
data.tar.gz: fb6cd2b2ece2bafd5900cce5d67e778a7cdd00aa271b7defd9234284f714435ea13108cdb63e647e3f7506fdd33d88ec3006f797b8cc02b85772fbac43f3c523
|
@@ -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.44
|
3
|
+
# apidoc:0.11.37 http://www.apidoc.me/flow/api/0.1.44/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.44/ruby_client' unless defined?(Constants::USER_AGENT)
|
29
|
+
VERSION = '0.1.44' unless defined?(Constants::VERSION)
|
30
30
|
VERSION_MAJOR = 0 unless defined?(VERSION_MAJOR)
|
31
31
|
|
32
32
|
end
|
@@ -3968,7 +3968,6 @@ module Io
|
|
3968
3968
|
AMOUNT_MARGIN = 'amount_margin' unless defined?(AMOUNT_MARGIN)
|
3969
3969
|
AT_COST = 'at_cost' unless defined?(AT_COST)
|
3970
3970
|
FLAT_RATE = 'flat_rate' unless defined?(FLAT_RATE)
|
3971
|
-
FREE_SHIPPING = 'free_shipping' unless defined?(FREE_SHIPPING)
|
3972
3971
|
# Add a certain percentage of the actual base cost
|
3973
3972
|
PERCENT_MARGIN = 'percent_margin' unless defined?(PERCENT_MARGIN)
|
3974
3973
|
end
|
@@ -3989,7 +3988,6 @@ module Io
|
|
3989
3988
|
when Types::AMOUNT_MARGIN; AmountMargin.new(hash)
|
3990
3989
|
when Types::AT_COST; AtCost.new(hash)
|
3991
3990
|
when Types::FLAT_RATE; FlatRate.new(hash)
|
3992
|
-
when Types::FREE_SHIPPING; FreeShipping.new(hash)
|
3993
3991
|
when Types::PERCENT_MARGIN; PercentMargin.new(hash)
|
3994
3992
|
else TierRuleOutcomeUndefinedType.new(:name => union_type_name)
|
3995
3993
|
end
|
@@ -8692,33 +8690,6 @@ module Io
|
|
8692
8690
|
|
8693
8691
|
end
|
8694
8692
|
|
8695
|
-
# Rule outcome where shipping surfaced in quote is free
|
8696
|
-
class FreeShipping < TierRuleOutcome
|
8697
|
-
|
8698
|
-
attr_reader :ignore
|
8699
|
-
|
8700
|
-
def initialize(incoming={})
|
8701
|
-
super(:name => TierRuleOutcome::Types::FREE_SHIPPING)
|
8702
|
-
opts = HttpClient::Helper.symbolize_keys(incoming)
|
8703
|
-
@ignore = (x = opts.delete(:ignore); x.nil? ? nil : HttpClient::Preconditions.assert_class('ignore', x, String))
|
8704
|
-
end
|
8705
|
-
|
8706
|
-
def to_json
|
8707
|
-
JSON.dump(to_hash)
|
8708
|
-
end
|
8709
|
-
|
8710
|
-
def copy(incoming={})
|
8711
|
-
FreeShipping.new(subtype_to_hash.merge(HttpClient::Helper.symbolize_keys(incoming)))
|
8712
|
-
end
|
8713
|
-
|
8714
|
-
def subtype_to_hash
|
8715
|
-
{
|
8716
|
-
:ignore => ignore
|
8717
|
-
}
|
8718
|
-
end
|
8719
|
-
|
8720
|
-
end
|
8721
|
-
|
8722
8693
|
class FulfillmentExperienceReference
|
8723
8694
|
|
8724
8695
|
attr_reader :id, :currency
|
@@ -13309,20 +13280,20 @@ module Io
|
|
13309
13280
|
# shipper to transport a package from a given origin to destination
|
13310
13281
|
class ShippingLabel
|
13311
13282
|
|
13312
|
-
attr_reader :id, :carrier_tracking_number, :
|
13283
|
+
attr_reader :id, :carrier_tracking_number, :data, :destination, :flow_tracking_number, :origin, :service, :window, :commercial_invoice, :pdf, :png
|
13313
13284
|
|
13314
13285
|
def initialize(incoming={})
|
13315
13286
|
opts = HttpClient::Helper.symbolize_keys(incoming)
|
13316
|
-
HttpClient::Preconditions.require_keys(opts, [:id, :carrier_tracking_number, :
|
13287
|
+
HttpClient::Preconditions.require_keys(opts, [:id, :carrier_tracking_number, :data, :destination, :flow_tracking_number, :origin, :service, :window], 'ShippingLabel')
|
13317
13288
|
@id = HttpClient::Preconditions.assert_class('id', opts.delete(:id), String)
|
13318
13289
|
@carrier_tracking_number = HttpClient::Preconditions.assert_class('carrier_tracking_number', opts.delete(:carrier_tracking_number), String)
|
13319
|
-
@commercial_invoice = HttpClient::Preconditions.assert_class('commercial_invoice', opts.delete(:commercial_invoice), String)
|
13320
13290
|
@data = HttpClient::Preconditions.assert_class('data', opts.delete(:data), String)
|
13321
13291
|
@destination = (x = opts.delete(:destination); x.is_a?(::Io::Flow::V0::Models::ShippingAddress) ? x : ::Io::Flow::V0::Models::ShippingAddress.new(x))
|
13322
13292
|
@flow_tracking_number = HttpClient::Preconditions.assert_class('flow_tracking_number', opts.delete(:flow_tracking_number), String)
|
13323
13293
|
@origin = (x = opts.delete(:origin); x.is_a?(::Io::Flow::V0::Models::ShippingAddress) ? x : ::Io::Flow::V0::Models::ShippingAddress.new(x))
|
13324
13294
|
@service = (x = opts.delete(:service); x.is_a?(::Io::Flow::V0::Models::ServiceSummary) ? x : ::Io::Flow::V0::Models::ServiceSummary.new(x))
|
13325
13295
|
@window = (x = opts.delete(:window); x.is_a?(::Io::Flow::V0::Models::DatetimeRange) ? x : ::Io::Flow::V0::Models::DatetimeRange.new(x))
|
13296
|
+
@commercial_invoice = (x = opts.delete(:commercial_invoice); x.nil? ? nil : HttpClient::Preconditions.assert_class('commercial_invoice', x, String))
|
13326
13297
|
@pdf = (x = opts.delete(:pdf); x.nil? ? nil : HttpClient::Preconditions.assert_class('pdf', x, String))
|
13327
13298
|
@png = (x = opts.delete(:png); x.nil? ? nil : HttpClient::Preconditions.assert_class('png', x, String))
|
13328
13299
|
end
|
@@ -13339,13 +13310,13 @@ module Io
|
|
13339
13310
|
{
|
13340
13311
|
:id => id,
|
13341
13312
|
:carrier_tracking_number => carrier_tracking_number,
|
13342
|
-
:commercial_invoice => commercial_invoice,
|
13343
13313
|
:data => data,
|
13344
13314
|
:destination => destination.to_hash,
|
13345
13315
|
:flow_tracking_number => flow_tracking_number,
|
13346
13316
|
:origin => origin.to_hash,
|
13347
13317
|
:service => service.to_hash,
|
13348
13318
|
:window => window.to_hash,
|
13319
|
+
:commercial_invoice => commercial_invoice,
|
13349
13320
|
:pdf => pdf,
|
13350
13321
|
:png => png
|
13351
13322
|
}
|
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.50
|
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-09 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: json
|