flowcommerce 0.2.45 → 0.2.46
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 +7 -0
- data/lib/flow_commerce/flow_api_v0_client.rb +44 -28
- metadata +9 -13
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: 04085ab6022e18b11ce059b51378cbc918d60a1d
|
4
|
+
data.tar.gz: 4059fdb96e8cda440cc9711251686bf68f1ea247
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 9b9cfc17a140fba2a205c3f9119caec8373fc9a0c80aa95899ebf53a2a6f47cddb3e9089656909564ebe93323c993135c4816f983cb74703682b8343078ce7ca
|
7
|
+
data.tar.gz: 77aad10616b0cf90970dc7e2c0ae26d5fe10a5e543221d01ec7cfa42f50ad557966ea48fa75801a298de880cc1fa207de84eeb24fe180a876c687bede80d5a94
|
@@ -1,6 +1,6 @@
|
|
1
1
|
# Generated by API Builder - https://www.apibuilder.io
|
2
2
|
# Service version: 0.4.11
|
3
|
-
# apibuilder:0.12.87 https://app.apibuilder.io/flow/api/0.4.
|
3
|
+
# apibuilder:0.12.87 https://app.apibuilder.io/flow/api/0.4.14/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 = 'apibuilder:0.12.87 https://app.apibuilder.io/flow/api/0.4.
|
28
|
+
USER_AGENT = 'apibuilder:0.12.87 https://app.apibuilder.io/flow/api/0.4.14/ruby_client' unless defined?(Constants::USER_AGENT)
|
29
29
|
VERSION = '0.4.11' unless defined?(Constants::VERSION)
|
30
30
|
VERSION_MAJOR = 0 unless defined?(VERSION_MAJOR)
|
31
31
|
|
@@ -1128,14 +1128,14 @@ module Io
|
|
1128
1128
|
end
|
1129
1129
|
|
1130
1130
|
# Returns information about a specific order using an identifier number
|
1131
|
-
def
|
1131
|
+
def get_identifier_by_identifier(organization, identifier, incoming={})
|
1132
1132
|
HttpClient::Preconditions.assert_class('organization', organization, String)
|
1133
|
-
HttpClient::Preconditions.assert_class('
|
1133
|
+
HttpClient::Preconditions.assert_class('identifier', identifier, String)
|
1134
1134
|
opts = HttpClient::Helper.symbolize_keys(incoming)
|
1135
1135
|
query = {
|
1136
1136
|
:expand => (x = opts.delete(:expand); x.nil? ? nil : HttpClient::Preconditions.assert_class('expand', x, Array).map { |v| HttpClient::Preconditions.assert_class('expand', v, String) })
|
1137
1137
|
}.delete_if { |k, v| v.nil? }
|
1138
|
-
r = @client.request("/#{CGI.escape(organization)}/orders/identifier/#{CGI.escape(
|
1138
|
+
r = @client.request("/#{CGI.escape(organization)}/orders/identifier/#{CGI.escape(identifier)}").with_query(query).get
|
1139
1139
|
::Io::Flow::V0::Models::Order.new(r)
|
1140
1140
|
end
|
1141
1141
|
|
@@ -1225,7 +1225,7 @@ module Io
|
|
1225
1225
|
opts = HttpClient::Helper.symbolize_keys(incoming)
|
1226
1226
|
query = {
|
1227
1227
|
:id => (x = opts.delete(:id); x.nil? ? nil : HttpClient::Preconditions.assert_class('id', x, Array).map { |v| HttpClient::Preconditions.assert_class('id', v, String) }),
|
1228
|
-
:
|
1228
|
+
:identifier => (x = opts.delete(:identifier); x.nil? ? nil : HttpClient::Preconditions.assert_class('identifier', x, Array).map { |v| HttpClient::Preconditions.assert_class('identifier', v, String) }),
|
1229
1229
|
:order_number => (x = opts.delete(:order_number); x.nil? ? nil : HttpClient::Preconditions.assert_class('order_number', x, Array).map { |v| HttpClient::Preconditions.assert_class('order_number', v, String) }),
|
1230
1230
|
:limit => HttpClient::Preconditions.assert_class('limit', (x = opts.delete(:limit); x.nil? ? 25 : x), Integer),
|
1231
1231
|
:offset => HttpClient::Preconditions.assert_class('offset', (x = opts.delete(:offset); x.nil? ? 0 : x), Integer),
|
@@ -1242,25 +1242,25 @@ module Io
|
|
1242
1242
|
::Io::Flow::V0::Models::OrderIdentifier.new(r)
|
1243
1243
|
end
|
1244
1244
|
|
1245
|
-
def
|
1245
|
+
def get_by_identifier(organization, identifier)
|
1246
1246
|
HttpClient::Preconditions.assert_class('organization', organization, String)
|
1247
|
-
HttpClient::Preconditions.assert_class('
|
1248
|
-
r = @client.request("/#{CGI.escape(organization)}/order-identifiers/#{CGI.escape(
|
1247
|
+
HttpClient::Preconditions.assert_class('identifier', identifier, String)
|
1248
|
+
r = @client.request("/#{CGI.escape(organization)}/order-identifiers/#{CGI.escape(identifier)}").get
|
1249
1249
|
::Io::Flow::V0::Models::OrderIdentifier.new(r)
|
1250
1250
|
end
|
1251
1251
|
|
1252
|
-
def
|
1252
|
+
def put_by_identifier(organization, identifier, order_identifier_put_form)
|
1253
1253
|
HttpClient::Preconditions.assert_class('organization', organization, String)
|
1254
|
-
HttpClient::Preconditions.assert_class('
|
1254
|
+
HttpClient::Preconditions.assert_class('identifier', identifier, String)
|
1255
1255
|
(x = order_identifier_put_form; x.is_a?(::Io::Flow::V0::Models::OrderIdentifierPutForm) ? x : ::Io::Flow::V0::Models::OrderIdentifierPutForm.new(x))
|
1256
|
-
r = @client.request("/#{CGI.escape(organization)}/order-identifiers/#{CGI.escape(
|
1256
|
+
r = @client.request("/#{CGI.escape(organization)}/order-identifiers/#{CGI.escape(identifier)}").with_json(order_identifier_put_form.to_json).put
|
1257
1257
|
::Io::Flow::V0::Models::OrderIdentifier.new(r)
|
1258
1258
|
end
|
1259
1259
|
|
1260
|
-
def
|
1260
|
+
def delete_by_identifier(organization, identifier)
|
1261
1261
|
HttpClient::Preconditions.assert_class('organization', organization, String)
|
1262
|
-
HttpClient::Preconditions.assert_class('
|
1263
|
-
r = @client.request("/#{CGI.escape(organization)}/order-identifiers/#{CGI.escape(
|
1262
|
+
HttpClient::Preconditions.assert_class('identifier', identifier, String)
|
1263
|
+
r = @client.request("/#{CGI.escape(organization)}/order-identifiers/#{CGI.escape(identifier)}").delete
|
1264
1264
|
nil
|
1265
1265
|
end
|
1266
1266
|
|
@@ -1269,8 +1269,6 @@ module Io
|
|
1269
1269
|
opts = HttpClient::Helper.symbolize_keys(incoming)
|
1270
1270
|
query = {
|
1271
1271
|
:id => (x = opts.delete(:id); x.nil? ? nil : HttpClient::Preconditions.assert_class('id', x, Array).map { |v| HttpClient::Preconditions.assert_class('id', v, String) }),
|
1272
|
-
:number => (x = opts.delete(:number); x.nil? ? nil : HttpClient::Preconditions.assert_class('number', x, Array).map { |v| HttpClient::Preconditions.assert_class('number', v, String) }),
|
1273
|
-
:order_number => (x = opts.delete(:order_number); x.nil? ? nil : HttpClient::Preconditions.assert_class('order_number', x, Array).map { |v| HttpClient::Preconditions.assert_class('order_number', v, String) }),
|
1274
1272
|
:limit => HttpClient::Preconditions.assert_class('limit', (x = opts.delete(:limit); x.nil? ? 25 : x), Integer),
|
1275
1273
|
:offset => HttpClient::Preconditions.assert_class('offset', (x = opts.delete(:offset); x.nil? ? 0 : x), Integer),
|
1276
1274
|
:sort => HttpClient::Preconditions.assert_class('sort', (x = opts.delete(:sort); x.nil? ? "journal_timestamp" : x), String)
|
@@ -9795,7 +9793,7 @@ module Io
|
|
9795
9793
|
end
|
9796
9794
|
|
9797
9795
|
def OrderPriceDetailComponentKey.ALL
|
9798
|
-
@@all ||= [OrderPriceDetailComponentKey.adjustment, OrderPriceDetailComponentKey.vat_deminimis, OrderPriceDetailComponentKey.duty_deminimis, OrderPriceDetailComponentKey.duties_item_price, OrderPriceDetailComponentKey.duties_freight, OrderPriceDetailComponentKey.duties_insurance, OrderPriceDetailComponentKey.vat_item_price, OrderPriceDetailComponentKey.vat_freight, OrderPriceDetailComponentKey.vat_insurance, OrderPriceDetailComponentKey.vat_duties_item_price, OrderPriceDetailComponentKey.vat_duties_freight, OrderPriceDetailComponentKey.vat_duties_insurance, OrderPriceDetailComponentKey.item_price, OrderPriceDetailComponentKey.rounding, OrderPriceDetailComponentKey.insurance, OrderPriceDetailComponentKey.shipping, OrderPriceDetailComponentKey.order_discount, OrderPriceDetailComponentKey.subtotal_percent_sales_margin, OrderPriceDetailComponentKey.subtotal_vat_percent_sales_margin, OrderPriceDetailComponentKey.subtotal_duty_percent_sales_margin, OrderPriceDetailComponentKey.vat_subsidy, OrderPriceDetailComponentKey.duty_subsidy]
|
9796
|
+
@@all ||= [OrderPriceDetailComponentKey.adjustment, OrderPriceDetailComponentKey.vat_deminimis, OrderPriceDetailComponentKey.duty_deminimis, OrderPriceDetailComponentKey.duties_item_price, OrderPriceDetailComponentKey.duties_freight, OrderPriceDetailComponentKey.duties_insurance, OrderPriceDetailComponentKey.vat_item_price, OrderPriceDetailComponentKey.vat_freight, OrderPriceDetailComponentKey.vat_insurance, OrderPriceDetailComponentKey.vat_duties_item_price, OrderPriceDetailComponentKey.vat_duties_freight, OrderPriceDetailComponentKey.vat_duties_insurance, OrderPriceDetailComponentKey.item_price, OrderPriceDetailComponentKey.item_discount, OrderPriceDetailComponentKey.rounding, OrderPriceDetailComponentKey.insurance, OrderPriceDetailComponentKey.shipping, OrderPriceDetailComponentKey.order_discount, OrderPriceDetailComponentKey.subtotal_percent_sales_margin, OrderPriceDetailComponentKey.subtotal_vat_percent_sales_margin, OrderPriceDetailComponentKey.subtotal_duty_percent_sales_margin, OrderPriceDetailComponentKey.vat_subsidy, OrderPriceDetailComponentKey.duty_subsidy]
|
9799
9797
|
end
|
9800
9798
|
|
9801
9799
|
# A general purpose adjustment applied to the order.
|
@@ -9867,6 +9865,11 @@ module Io
|
|
9867
9865
|
@@_item_price ||= OrderPriceDetailComponentKey.new('item_price')
|
9868
9866
|
end
|
9869
9867
|
|
9868
|
+
# The sum of all discounts applied to the order's items.
|
9869
|
+
def OrderPriceDetailComponentKey.item_discount
|
9870
|
+
@@_item_discount ||= OrderPriceDetailComponentKey.new('item_discount')
|
9871
|
+
end
|
9872
|
+
|
9870
9873
|
# The sum of any rounding applied to the order's items.
|
9871
9874
|
def OrderPriceDetailComponentKey.rounding
|
9872
9875
|
@@_rounding ||= OrderPriceDetailComponentKey.new('rounding')
|
@@ -21829,17 +21832,22 @@ module Io
|
|
21829
21832
|
|
21830
21833
|
end
|
21831
21834
|
|
21832
|
-
# Represents alternate
|
21835
|
+
# Represents alternate identifiers that can be used to lookup an order. Common
|
21836
|
+
# use cases are to support attaching a primary identifier (e.g. a nice order
|
21837
|
+
# number) post order submission or attaching IDs that are used by the warehouse
|
21838
|
+
# to ship the orders.
|
21833
21839
|
class OrderIdentifier
|
21834
21840
|
|
21835
|
-
attr_reader :id, :order, :number
|
21841
|
+
attr_reader :id, :order, :identifier, :primary, :number
|
21836
21842
|
|
21837
21843
|
def initialize(incoming={})
|
21838
21844
|
opts = HttpClient::Helper.symbolize_keys(incoming)
|
21839
|
-
HttpClient::Preconditions.require_keys(opts, [:id, :order, :
|
21845
|
+
HttpClient::Preconditions.require_keys(opts, [:id, :order, :identifier, :primary], 'OrderIdentifier')
|
21840
21846
|
@id = HttpClient::Preconditions.assert_class('id', opts.delete(:id), String)
|
21841
21847
|
@order = (x = opts.delete(:order); x.is_a?(::Io::Flow::V0::Models::OrderReference) ? x : ::Io::Flow::V0::Models::OrderReference.new(x))
|
21842
|
-
@
|
21848
|
+
@identifier = HttpClient::Preconditions.assert_class('identifier', opts.delete(:identifier), String)
|
21849
|
+
@primary = HttpClient::Preconditions.assert_boolean('primary', opts.delete(:primary))
|
21850
|
+
@number = (x = opts.delete(:number); x.nil? ? nil : HttpClient::Preconditions.assert_class('number', x, String))
|
21843
21851
|
end
|
21844
21852
|
|
21845
21853
|
def to_json
|
@@ -21854,6 +21862,8 @@ module Io
|
|
21854
21862
|
{
|
21855
21863
|
:id => id,
|
21856
21864
|
:order => order.to_hash,
|
21865
|
+
:identifier => identifier,
|
21866
|
+
:primary => primary,
|
21857
21867
|
:number => number
|
21858
21868
|
}
|
21859
21869
|
end
|
@@ -21893,13 +21903,15 @@ module Io
|
|
21893
21903
|
|
21894
21904
|
class OrderIdentifierForm
|
21895
21905
|
|
21896
|
-
attr_reader :order, :number
|
21906
|
+
attr_reader :order, :identifier, :number, :primary
|
21897
21907
|
|
21898
21908
|
def initialize(incoming={})
|
21899
21909
|
opts = HttpClient::Helper.symbolize_keys(incoming)
|
21900
|
-
HttpClient::Preconditions.require_keys(opts, [:order
|
21910
|
+
HttpClient::Preconditions.require_keys(opts, [:order], 'OrderIdentifierForm')
|
21901
21911
|
@order = HttpClient::Preconditions.assert_class('order', opts.delete(:order), String)
|
21902
|
-
@
|
21912
|
+
@identifier = (x = opts.delete(:identifier); x.nil? ? nil : HttpClient::Preconditions.assert_class('identifier', x, String))
|
21913
|
+
@number = (x = opts.delete(:number); x.nil? ? nil : HttpClient::Preconditions.assert_class('number', x, String))
|
21914
|
+
@primary = (x = opts.delete(:primary); x.nil? ? nil : HttpClient::Preconditions.assert_boolean('primary', x))
|
21903
21915
|
end
|
21904
21916
|
|
21905
21917
|
def to_json
|
@@ -21913,7 +21925,9 @@ module Io
|
|
21913
21925
|
def to_hash
|
21914
21926
|
{
|
21915
21927
|
:order => order,
|
21916
|
-
:
|
21928
|
+
:identifier => identifier,
|
21929
|
+
:number => number,
|
21930
|
+
:primary => primary
|
21917
21931
|
}
|
21918
21932
|
end
|
21919
21933
|
|
@@ -21921,12 +21935,13 @@ module Io
|
|
21921
21935
|
|
21922
21936
|
class OrderIdentifierPutForm
|
21923
21937
|
|
21924
|
-
attr_reader :order
|
21938
|
+
attr_reader :order, :primary
|
21925
21939
|
|
21926
21940
|
def initialize(incoming={})
|
21927
21941
|
opts = HttpClient::Helper.symbolize_keys(incoming)
|
21928
21942
|
HttpClient::Preconditions.require_keys(opts, [:order], 'OrderIdentifierPutForm')
|
21929
21943
|
@order = HttpClient::Preconditions.assert_class('order', opts.delete(:order), String)
|
21944
|
+
@primary = (x = opts.delete(:primary); x.nil? ? nil : HttpClient::Preconditions.assert_boolean('primary', x))
|
21930
21945
|
end
|
21931
21946
|
|
21932
21947
|
def to_json
|
@@ -21939,7 +21954,8 @@ module Io
|
|
21939
21954
|
|
21940
21955
|
def to_hash
|
21941
21956
|
{
|
21942
|
-
:order => order
|
21957
|
+
:order => order,
|
21958
|
+
:primary => primary
|
21943
21959
|
}
|
21944
21960
|
end
|
21945
21961
|
|
metadata
CHANGED
@@ -1,30 +1,27 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: flowcommerce
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
5
|
-
prerelease:
|
4
|
+
version: 0.2.46
|
6
5
|
platform: ruby
|
7
6
|
authors:
|
8
7
|
- Flow Commerce, Inc.
|
9
8
|
autorequire:
|
10
9
|
bindir: bin
|
11
10
|
cert_chain: []
|
12
|
-
date: 2017-10-
|
11
|
+
date: 2017-10-29 00:00:00.000000000 Z
|
13
12
|
dependencies:
|
14
13
|
- !ruby/object:Gem::Dependency
|
15
14
|
name: json
|
16
15
|
requirement: !ruby/object:Gem::Requirement
|
17
|
-
none: false
|
18
16
|
requirements:
|
19
|
-
- -
|
17
|
+
- - '>='
|
20
18
|
- !ruby/object:Gem::Version
|
21
19
|
version: '0'
|
22
20
|
type: :runtime
|
23
21
|
prerelease: false
|
24
22
|
version_requirements: !ruby/object:Gem::Requirement
|
25
|
-
none: false
|
26
23
|
requirements:
|
27
|
-
- -
|
24
|
+
- - '>='
|
28
25
|
- !ruby/object:Gem::Version
|
29
26
|
version: '0'
|
30
27
|
description: Native ruby client for the Flow REST API. Detailed information at https://app.apibuilder.io/flow/api
|
@@ -41,26 +38,25 @@ files:
|
|
41
38
|
homepage: https://github.com/flowcommerce/ruby-sdk
|
42
39
|
licenses:
|
43
40
|
- MIT
|
41
|
+
metadata: {}
|
44
42
|
post_install_message:
|
45
43
|
rdoc_options: []
|
46
44
|
require_paths:
|
47
45
|
- lib
|
48
46
|
required_ruby_version: !ruby/object:Gem::Requirement
|
49
|
-
none: false
|
50
47
|
requirements:
|
51
|
-
- -
|
48
|
+
- - '>='
|
52
49
|
- !ruby/object:Gem::Version
|
53
50
|
version: '0'
|
54
51
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
55
|
-
none: false
|
56
52
|
requirements:
|
57
|
-
- -
|
53
|
+
- - '>='
|
58
54
|
- !ruby/object:Gem::Version
|
59
55
|
version: '0'
|
60
56
|
requirements: []
|
61
57
|
rubyforge_project:
|
62
|
-
rubygems_version:
|
58
|
+
rubygems_version: 2.0.14.1
|
63
59
|
signing_key:
|
64
|
-
specification_version:
|
60
|
+
specification_version: 4
|
65
61
|
summary: Native ruby client for the Flow REST API.
|
66
62
|
test_files: []
|