flowcommerce 0.0.17 → 0.0.18
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 +25 -7
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 135ff9ec6e849f931ad6642421dd82912e77c818
|
4
|
+
data.tar.gz: 39424ef69e0f91b38d0b722d4f5e2b3024edcc2f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: fad1970b24a77541957f6097cb5cad24e24e1b835e76ea5a0bd61a08761b0014859f3c3953ae10cc364d0a986f544e68dca80ce7b12f7db4d53f9ba0b638c6ec
|
7
|
+
data.tar.gz: 4e44ec94764a21a991cae4210941e095564d862539a0fe6419060a44728f6720bcf4cda4f65c509f94df2e0bbefaedd77f899ddab04511490be1c33de7e97fb7
|
@@ -1,6 +1,6 @@
|
|
1
1
|
# Generated by apidoc - http://www.apidoc.me
|
2
|
-
# Service version: 0.0.
|
3
|
-
# apidoc:0.11.32 http://www.apidoc.me/flow/api/0.0.
|
2
|
+
# Service version: 0.0.58
|
3
|
+
# apidoc:0.11.32 http://www.apidoc.me/flow/api/0.0.58/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.32 http://www.apidoc.me/flow/api/0.0.
|
29
|
-
VERSION = '0.0.
|
28
|
+
USER_AGENT = 'apidoc:0.11.32 http://www.apidoc.me/flow/api/0.0.58/ruby_client' unless defined?(Constants::USER_AGENT)
|
29
|
+
VERSION = '0.0.58' unless defined?(Constants::VERSION)
|
30
30
|
VERSION_MAJOR = 0 unless defined?(VERSION_MAJOR)
|
31
31
|
|
32
32
|
end
|
@@ -433,7 +433,8 @@ module Io
|
|
433
433
|
::Io::Flow::V0::Models::Experience.new(r)
|
434
434
|
end
|
435
435
|
|
436
|
-
#
|
436
|
+
# Returns information about 1 or more items, localized based on the query
|
437
|
+
# parameters
|
437
438
|
def get_items(organization, incoming={})
|
438
439
|
HttpClient::Preconditions.assert_class('organization', organization, String)
|
439
440
|
opts = HttpClient::Helper.symbolize_keys(incoming)
|
@@ -453,6 +454,23 @@ module Io
|
|
453
454
|
r.map { |x| ::Io::Flow::V0::Models::Item.new(x) }
|
454
455
|
end
|
455
456
|
|
457
|
+
# Returns information about this item localized based on the query parameters
|
458
|
+
def get_items_by_number(organization, number, incoming={})
|
459
|
+
HttpClient::Preconditions.assert_class('organization', organization, String)
|
460
|
+
HttpClient::Preconditions.assert_class('number', number, String)
|
461
|
+
opts = HttpClient::Helper.symbolize_keys(incoming)
|
462
|
+
query = {
|
463
|
+
:experience => (x = opts.delete(:experience); x.nil? ? nil : HttpClient::Preconditions.assert_class('experience', x, String)),
|
464
|
+
:destination => (x = opts.delete(:destination); x.nil? ? nil : HttpClient::Preconditions.assert_class('destination', x, String)),
|
465
|
+
:from_country => (x = opts.delete(:from_country); x.nil? ? nil : HttpClient::Preconditions.assert_class('from_country', x, String)),
|
466
|
+
:ip => (x = opts.delete(:ip); x.nil? ? nil : HttpClient::Preconditions.assert_class('ip', x, String)),
|
467
|
+
:currency => (x = opts.delete(:currency); x.nil? ? nil : HttpClient::Preconditions.assert_class('currency', x, String)),
|
468
|
+
:language => (x = opts.delete(:language); x.nil? ? nil : HttpClient::Preconditions.assert_class('language', x, String))
|
469
|
+
}.delete_if { |k, v| v.nil? }
|
470
|
+
r = @client.request("/#{CGI.escape(organization)}/experiences/items/#{CGI.escape(number)}").with_query(query).get
|
471
|
+
::Io::Flow::V0::Models::Item.new(r)
|
472
|
+
end
|
473
|
+
|
456
474
|
# Provides visibility into recent changes of each object, including deletion
|
457
475
|
def get_versions(organization, incoming={})
|
458
476
|
HttpClient::Preconditions.assert_class('organization', organization, String)
|
@@ -10294,7 +10312,7 @@ module Io
|
|
10294
10312
|
def initialize(incoming={})
|
10295
10313
|
opts = HttpClient::Helper.symbolize_keys(incoming)
|
10296
10314
|
HttpClient::Preconditions.require_keys(opts, [:dimensions], 'Packaging')
|
10297
|
-
@dimensions =
|
10315
|
+
@dimensions = (x = opts.delete(:dimensions); x.is_a?(::Io::Flow::V0::Models::Dimensions) ? x : ::Io::Flow::V0::Models::Dimensions.new(x))
|
10298
10316
|
@name = (x = opts.delete(:name); x.nil? ? nil : HttpClient::Preconditions.assert_class('name', x, String))
|
10299
10317
|
@number = (x = opts.delete(:number); x.nil? ? nil : HttpClient::Preconditions.assert_class('number', x, String))
|
10300
10318
|
end
|
@@ -10309,7 +10327,7 @@ module Io
|
|
10309
10327
|
|
10310
10328
|
def to_hash
|
10311
10329
|
{
|
10312
|
-
:dimensions => dimensions.
|
10330
|
+
:dimensions => dimensions.to_hash,
|
10313
10331
|
:name => name,
|
10314
10332
|
:number => number
|
10315
10333
|
}
|