flowcommerce 0.0.39 → 0.0.40

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: b42a23e6a60f9460139103e187c091b13a7aa914
4
- data.tar.gz: 076d23a9ae6b042d9ba4350a8d1d4d75bac0196b
3
+ metadata.gz: b6efea3848170714934150068abfc5507e330235
4
+ data.tar.gz: 6565e315421198c31238774b2e95d19333725cc9
5
5
  SHA512:
6
- metadata.gz: 33337cc3c9287092a01a4d33e48f13249691edf27eea1b2bbb9877bfdd8981a60e57c91c9ad79c1ba07371577e22e234517128dc39d867a6f5de27b7a4b76673
7
- data.tar.gz: 86bc7145a7bd327ea43aa509f7b8df9c89643563caa4be7b03368f6d7dad0eb9fcb439ff942f72503edcbac2593403835d53940afbacee57379c8cd793201171
6
+ metadata.gz: 7dc5960ddef4af6bf6b361a4f389422a1bffa8af88eaafb6d1d09295d09942f268919b88f905ce5d7810e9efd6de5f9975f2a0b732825b14ee472340c7e48d62
7
+ data.tar.gz: 8276419e8d656f79da82f08cf3ef4b8d1932e764cbc27ad72d9460d56debf37bdd739cc13e925a5b2ecad6af466ae39525945debba35619b982c97fb60009517
@@ -1,6 +1,6 @@
1
1
  # Generated by apidoc - http://www.apidoc.me
2
- # Service version: 0.1.12
3
- # apidoc:0.11.34 http://www.apidoc.me/flow/api/0.1.12/ruby_client
2
+ # Service version: 0.1.13
3
+ # apidoc:0.11.34 http://www.apidoc.me/flow/api/0.1.13/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.34 http://www.apidoc.me/flow/api/0.1.12/ruby_client' unless defined?(Constants::USER_AGENT)
29
- VERSION = '0.1.12' unless defined?(Constants::VERSION)
28
+ USER_AGENT = 'apidoc:0.11.34 http://www.apidoc.me/flow/api/0.1.13/ruby_client' unless defined?(Constants::USER_AGENT)
29
+ VERSION = '0.1.13' unless defined?(Constants::VERSION)
30
30
  VERSION_MAJOR = 0 unless defined?(VERSION_MAJOR)
31
31
 
32
32
  end
@@ -113,6 +113,10 @@ module Io
113
113
  @harmonization_settings ||= ::Io::Flow::V0::Clients::HarmonizationSettings.new(self)
114
114
  end
115
115
 
116
+ def harmonized_categories
117
+ @harmonized_categories ||= ::Io::Flow::V0::Clients::HarmonizedCategories.new(self)
118
+ end
119
+
116
120
  def harmonized_items
117
121
  @harmonized_items ||= ::Io::Flow::V0::Clients::HarmonizedItems.new(self)
118
122
  end
@@ -1375,6 +1379,27 @@ module Io
1375
1379
 
1376
1380
  end
1377
1381
 
1382
+ class HarmonizedCategories
1383
+
1384
+ def initialize(client)
1385
+ @client = HttpClient::Preconditions.assert_class('client', client, ::Io::Flow::V0::Client)
1386
+ end
1387
+
1388
+ def get(organization, incoming={})
1389
+ HttpClient::Preconditions.assert_class('organization', organization, String)
1390
+ opts = HttpClient::Helper.symbolize_keys(incoming)
1391
+ query = {
1392
+ :id => (x = opts.delete(:id); x.nil? ? nil : HttpClient::Preconditions.assert_class('id', x, Array).map { |v| HttpClient::Preconditions.assert_class('id', v, String) }),
1393
+ :parent_id => (x = opts.delete(:parent_id); x.nil? ? nil : HttpClient::Preconditions.assert_class('parent_id', x, String)),
1394
+ :limit => HttpClient::Preconditions.assert_class('limit', (x = opts.delete(:limit); x.nil? ? 25 : x), Integer),
1395
+ :offset => HttpClient::Preconditions.assert_class('offset', (x = opts.delete(:offset); x.nil? ? 0 : x), Integer)
1396
+ }.delete_if { |k, v| v.nil? }
1397
+ r = @client.request("/#{CGI.escape(organization)}/harmonization/categories").with_query(query).get
1398
+ r.map { |x| ::Io::Flow::V0::Models::HarmonizedCategory.new(x) }
1399
+ end
1400
+
1401
+ end
1402
+
1378
1403
  class HarmonizedItems
1379
1404
 
1380
1405
  def initialize(client)
@@ -6623,7 +6648,7 @@ module Io
6623
6648
 
6624
6649
  class CardForm
6625
6650
 
6626
- attr_reader :number, :expiration_month, :expiration_year, :name, :address
6651
+ attr_reader :number, :expiration_month, :expiration_year, :name, :cvv, :address
6627
6652
 
6628
6653
  def initialize(incoming={})
6629
6654
  opts = HttpClient::Helper.symbolize_keys(incoming)
@@ -6632,6 +6657,7 @@ module Io
6632
6657
  @expiration_month = HttpClient::Preconditions.assert_class('expiration_month', opts.delete(:expiration_month), Integer)
6633
6658
  @expiration_year = HttpClient::Preconditions.assert_class('expiration_year', opts.delete(:expiration_year), Integer)
6634
6659
  @name = HttpClient::Preconditions.assert_class('name', opts.delete(:name), String)
6660
+ @cvv = (x = opts.delete(:cvv); x.nil? ? nil : HttpClient::Preconditions.assert_class('cvv', x, String))
6635
6661
  @address = (x = opts.delete(:address); x.nil? ? nil : (x = x; x.is_a?(::Io::Flow::V0::Models::Address) ? x : ::Io::Flow::V0::Models::Address.new(x)))
6636
6662
  end
6637
6663
 
@@ -6649,6 +6675,7 @@ module Io
6649
6675
  :expiration_month => expiration_month,
6650
6676
  :expiration_year => expiration_year,
6651
6677
  :name => name,
6678
+ :cvv => cvv,
6652
6679
  :address => address.nil? ? nil : address.to_hash
6653
6680
  }
6654
6681
  end
@@ -8713,6 +8740,63 @@ module Io
8713
8740
 
8714
8741
  end
8715
8742
 
8743
+ # Categories optimized for harmonization
8744
+ class HarmonizedCategory
8745
+
8746
+ attr_reader :id, :name, :parent
8747
+
8748
+ def initialize(incoming={})
8749
+ opts = HttpClient::Helper.symbolize_keys(incoming)
8750
+ HttpClient::Preconditions.require_keys(opts, [:id, :name], 'HarmonizedCategory')
8751
+ @id = HttpClient::Preconditions.assert_class('id', opts.delete(:id), String)
8752
+ @name = HttpClient::Preconditions.assert_class('name', opts.delete(:name), String)
8753
+ @parent = (x = opts.delete(:parent); x.nil? ? nil : (x = x; x.is_a?(::Io::Flow::V0::Models::HarmonizedCategoryReference) ? x : ::Io::Flow::V0::Models::HarmonizedCategoryReference.new(x)))
8754
+ end
8755
+
8756
+ def to_json
8757
+ JSON.dump(to_hash)
8758
+ end
8759
+
8760
+ def copy(incoming={})
8761
+ HarmonizedCategory.new(to_hash.merge(HttpClient::Helper.symbolize_keys(incoming)))
8762
+ end
8763
+
8764
+ def to_hash
8765
+ {
8766
+ :id => id,
8767
+ :name => name,
8768
+ :parent => parent.nil? ? nil : parent.to_hash
8769
+ }
8770
+ end
8771
+
8772
+ end
8773
+
8774
+ class HarmonizedCategoryReference
8775
+
8776
+ attr_reader :id
8777
+
8778
+ def initialize(incoming={})
8779
+ opts = HttpClient::Helper.symbolize_keys(incoming)
8780
+ HttpClient::Preconditions.require_keys(opts, [:id], 'HarmonizedCategoryReference')
8781
+ @id = HttpClient::Preconditions.assert_class('id', opts.delete(:id), String)
8782
+ end
8783
+
8784
+ def to_json
8785
+ JSON.dump(to_hash)
8786
+ end
8787
+
8788
+ def copy(incoming={})
8789
+ HarmonizedCategoryReference.new(to_hash.merge(HttpClient::Helper.symbolize_keys(incoming)))
8790
+ end
8791
+
8792
+ def to_hash
8793
+ {
8794
+ :id => id
8795
+ }
8796
+ end
8797
+
8798
+ end
8799
+
8716
8800
  # A harmonized item stores explicit information about this item for the purposes
8717
8801
  # of harmonization / classification. The harmonization process begins by
8718
8802
  # creating a harmonized item; this kicks off the internal processes. Once
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.39
4
+ version: 0.0.40
5
5
  platform: ruby
6
6
  authors:
7
7
  - Flow Commerce, Inc.