flowcommerce 0.0.17 → 0.0.18

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 7b2e380bd9da08a891fe2d30c574c5c0d6a2a32c
4
- data.tar.gz: 67e842f2ef216917cedf6a66194954eed0dddad4
3
+ metadata.gz: 135ff9ec6e849f931ad6642421dd82912e77c818
4
+ data.tar.gz: 39424ef69e0f91b38d0b722d4f5e2b3024edcc2f
5
5
  SHA512:
6
- metadata.gz: 303afc460da1ba5bf71378b7aec219163969e4be7c6769b76209b49b6c361837f43d5e3346b7a6c4be08d34551273d99c6ff2faa38fc301729f84caccc8354e9
7
- data.tar.gz: 2e312c35847fae585661cc8b210ae1953391a69128beb34ffb7c18fc6aaffbaf767543e23804bdb1125cb349f5894c6fadd588c7d1cc4ed18f40fb2661a61701
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.57
3
- # apidoc:0.11.32 http://www.apidoc.me/flow/api/0.0.57/ruby_client
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.57/ruby_client' unless defined?(Constants::USER_AGENT)
29
- VERSION = '0.0.57' unless defined?(Constants::VERSION)
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
- # Compose items and prices. Always paginated.
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 = HttpClient::Preconditions.assert_class('dimensions', opts.delete(:dimensions), Array).map { |v| (x = v; x.is_a?(::Io::Flow::V0::Models::Dimension) ? x : ::Io::Flow::V0::Models::Dimension.new(x)) }
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.map { |o| o.to_hash },
10330
+ :dimensions => dimensions.to_hash,
10313
10331
  :name => name,
10314
10332
  :number => number
10315
10333
  }
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: flowcommerce
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.17
4
+ version: 0.0.18
5
5
  platform: ruby
6
6
  authors:
7
7
  - Flow Commerce, Inc.