flowcommerce 0.0.78 → 0.0.79
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 +84 -6
- 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: f6aaeea90b70453f2998aff89f3f2d4972ca4b3a
|
4
|
+
data.tar.gz: 3577fc97d08a0912e2f539393aa8c825104659cb
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 42c9e1ff253b3527b6bc787f3102bc77ebcf958878e0496dd2458182feba236deabdfdb840246bd85d32e287d67411b0544b69545a75007145ed9f5fc8344329
|
7
|
+
data.tar.gz: d9e445756c4c181bba7c5d1cc314bba085a1d21b80c826e743b23d32c6878926ed64b57ef4c2325ee4b166ad5f939d81a06541b2b7ef7757f5cb587faa3d933a
|
@@ -1,6 +1,6 @@
|
|
1
1
|
# Generated by apidoc - http://www.apidoc.me
|
2
2
|
# Service version: 0.1.77
|
3
|
-
# apidoc:0.11.38 http://www.apidoc.me/flow/api/0.1.
|
3
|
+
# apidoc:0.11.38 http://www.apidoc.me/flow/api/0.1.84/ruby_client
|
4
4
|
|
5
5
|
require 'cgi'
|
6
6
|
require 'net/http'
|
@@ -25,7 +25,7 @@ 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.38 http://www.apidoc.me/flow/api/0.1.
|
28
|
+
USER_AGENT = 'apidoc:0.11.38 http://www.apidoc.me/flow/api/0.1.84/ruby_client' unless defined?(Constants::USER_AGENT)
|
29
29
|
VERSION = '0.1.77' unless defined?(Constants::VERSION)
|
30
30
|
VERSION_MAJOR = 0 unless defined?(VERSION_MAJOR)
|
31
31
|
|
@@ -5817,6 +5817,52 @@ module Io
|
|
5817
5817
|
|
5818
5818
|
end
|
5819
5819
|
|
5820
|
+
class LocalizedPriceNoteKey
|
5821
|
+
|
5822
|
+
attr_reader :value
|
5823
|
+
|
5824
|
+
def initialize(value)
|
5825
|
+
@value = HttpClient::Preconditions.assert_class('value', value, String)
|
5826
|
+
end
|
5827
|
+
|
5828
|
+
# Returns the instance of LocalizedPriceNoteKey for this value, creating a new instance for an unknown value
|
5829
|
+
def LocalizedPriceNoteKey.apply(value)
|
5830
|
+
if value.instance_of?(LocalizedPriceNoteKey)
|
5831
|
+
value
|
5832
|
+
else
|
5833
|
+
HttpClient::Preconditions.assert_class_or_nil('value', value, String)
|
5834
|
+
value.nil? ? nil : (from_string(value) || LocalizedPriceNoteKey.new(value))
|
5835
|
+
end
|
5836
|
+
end
|
5837
|
+
|
5838
|
+
# Returns the instance of LocalizedPriceNoteKey for this value, or nil if not found
|
5839
|
+
def LocalizedPriceNoteKey.from_string(value)
|
5840
|
+
HttpClient::Preconditions.assert_class('value', value, String)
|
5841
|
+
LocalizedPriceNoteKey.ALL.find { |v| v.value == value }
|
5842
|
+
end
|
5843
|
+
|
5844
|
+
def LocalizedPriceNoteKey.ALL
|
5845
|
+
@@all ||= [LocalizedPriceNoteKey.duty_included, LocalizedPriceNoteKey.vat_included, LocalizedPriceNoteKey.vat_and_duty_included]
|
5846
|
+
end
|
5847
|
+
|
5848
|
+
def LocalizedPriceNoteKey.duty_included
|
5849
|
+
@@_duty_included ||= LocalizedPriceNoteKey.new('duty_included')
|
5850
|
+
end
|
5851
|
+
|
5852
|
+
def LocalizedPriceNoteKey.vat_included
|
5853
|
+
@@_vat_included ||= LocalizedPriceNoteKey.new('vat_included')
|
5854
|
+
end
|
5855
|
+
|
5856
|
+
def LocalizedPriceNoteKey.vat_and_duty_included
|
5857
|
+
@@_vat_and_duty_included ||= LocalizedPriceNoteKey.new('vat_and_duty_included')
|
5858
|
+
end
|
5859
|
+
|
5860
|
+
def to_hash
|
5861
|
+
value
|
5862
|
+
end
|
5863
|
+
|
5864
|
+
end
|
5865
|
+
|
5820
5866
|
class MarginType
|
5821
5867
|
|
5822
5868
|
attr_reader :value
|
@@ -13040,7 +13086,7 @@ module Io
|
|
13040
13086
|
|
13041
13087
|
class LocalizedPrice
|
13042
13088
|
|
13043
|
-
attr_reader :key, :currency, :amount, :label, :base
|
13089
|
+
attr_reader :key, :currency, :amount, :label, :base, :note
|
13044
13090
|
|
13045
13091
|
def initialize(incoming={})
|
13046
13092
|
opts = HttpClient::Helper.symbolize_keys(incoming)
|
@@ -13050,6 +13096,7 @@ module Io
|
|
13050
13096
|
@amount = HttpClient::Preconditions.assert_class('amount', opts.delete(:amount), Numeric)
|
13051
13097
|
@label = HttpClient::Preconditions.assert_class('label', opts.delete(:label), String)
|
13052
13098
|
@base = (x = opts.delete(:base); x.is_a?(::Io::Flow::V0::Models::Price) ? x : ::Io::Flow::V0::Models::Price.new(x))
|
13099
|
+
@note = (x = opts.delete(:note); x.nil? ? nil : (x = x; x.is_a?(::Io::Flow::V0::Models::LocalizedPriceNote) ? x : ::Io::Flow::V0::Models::LocalizedPriceNote.new(x)))
|
13053
13100
|
end
|
13054
13101
|
|
13055
13102
|
def to_json
|
@@ -13066,7 +13113,36 @@ module Io
|
|
13066
13113
|
:currency => currency,
|
13067
13114
|
:amount => amount,
|
13068
13115
|
:label => label,
|
13069
|
-
:base => base.to_hash
|
13116
|
+
:base => base.to_hash,
|
13117
|
+
:note => note.nil? ? nil : note.to_hash
|
13118
|
+
}
|
13119
|
+
end
|
13120
|
+
|
13121
|
+
end
|
13122
|
+
|
13123
|
+
class LocalizedPriceNote
|
13124
|
+
|
13125
|
+
attr_reader :key, :label
|
13126
|
+
|
13127
|
+
def initialize(incoming={})
|
13128
|
+
opts = HttpClient::Helper.symbolize_keys(incoming)
|
13129
|
+
HttpClient::Preconditions.require_keys(opts, [:key, :label], 'LocalizedPriceNote')
|
13130
|
+
@key = (x = opts.delete(:key); x.is_a?(::Io::Flow::V0::Models::LocalizedPriceNoteKey) ? x : ::Io::Flow::V0::Models::LocalizedPriceNoteKey.apply(x))
|
13131
|
+
@label = HttpClient::Preconditions.assert_class('label', opts.delete(:label), String)
|
13132
|
+
end
|
13133
|
+
|
13134
|
+
def to_json
|
13135
|
+
JSON.dump(to_hash)
|
13136
|
+
end
|
13137
|
+
|
13138
|
+
def copy(incoming={})
|
13139
|
+
LocalizedPriceNote.new(to_hash.merge(HttpClient::Helper.symbolize_keys(incoming)))
|
13140
|
+
end
|
13141
|
+
|
13142
|
+
def to_hash
|
13143
|
+
{
|
13144
|
+
:key => key.value,
|
13145
|
+
:label => label
|
13070
13146
|
}
|
13071
13147
|
end
|
13072
13148
|
|
@@ -15893,14 +15969,15 @@ module Io
|
|
15893
15969
|
# shipper to transport a package from a given origin to destination
|
15894
15970
|
class ShippingLabel
|
15895
15971
|
|
15896
|
-
attr_reader :id, :attributes, :carrier_tracking_number, :zpl, :destination, :flow_tracking_number, :origin, :service, :window, :commercial_invoice, :pdf, :png, :order
|
15972
|
+
attr_reader :id, :attributes, :carrier_tracking_number, :cost, :zpl, :destination, :flow_tracking_number, :origin, :service, :window, :commercial_invoice, :pdf, :png, :order
|
15897
15973
|
|
15898
15974
|
def initialize(incoming={})
|
15899
15975
|
opts = HttpClient::Helper.symbolize_keys(incoming)
|
15900
|
-
HttpClient::Preconditions.require_keys(opts, [:id, :carrier_tracking_number, :zpl, :destination, :flow_tracking_number, :origin, :service, :window], 'ShippingLabel')
|
15976
|
+
HttpClient::Preconditions.require_keys(opts, [:id, :carrier_tracking_number, :cost, :zpl, :destination, :flow_tracking_number, :origin, :service, :window], 'ShippingLabel')
|
15901
15977
|
@id = HttpClient::Preconditions.assert_class('id', opts.delete(:id), String)
|
15902
15978
|
@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 }
|
15903
15979
|
@carrier_tracking_number = HttpClient::Preconditions.assert_class('carrier_tracking_number', opts.delete(:carrier_tracking_number), String)
|
15980
|
+
@cost = (x = opts.delete(:cost); x.is_a?(::Io::Flow::V0::Models::Price) ? x : ::Io::Flow::V0::Models::Price.new(x))
|
15904
15981
|
@zpl = HttpClient::Preconditions.assert_class('zpl', opts.delete(:zpl), String)
|
15905
15982
|
@destination = (x = opts.delete(:destination); x.is_a?(::Io::Flow::V0::Models::ShippingAddress) ? x : ::Io::Flow::V0::Models::ShippingAddress.new(x))
|
15906
15983
|
@flow_tracking_number = HttpClient::Preconditions.assert_class('flow_tracking_number', opts.delete(:flow_tracking_number), String)
|
@@ -15926,6 +16003,7 @@ module Io
|
|
15926
16003
|
:id => id,
|
15927
16004
|
:attributes => attributes,
|
15928
16005
|
:carrier_tracking_number => carrier_tracking_number,
|
16006
|
+
:cost => cost.to_hash,
|
15929
16007
|
:zpl => zpl,
|
15930
16008
|
:destination => destination.to_hash,
|
15931
16009
|
:flow_tracking_number => flow_tracking_number,
|
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.79
|
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-10-
|
11
|
+
date: 2016-10-08 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: json
|