flowcommerce 0.0.76 → 0.0.77

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 6982bd47aead0a1638333d0a3b262419062c6395
4
- data.tar.gz: c94f1a7609abce9f2aecff9e6a8168f952b92930
3
+ metadata.gz: b76be0dc4c9ca328974c06dcaa6fb13e0f748e41
4
+ data.tar.gz: 6c116ed6b4767c6a17dea5fefc3fed3a2948aab5
5
5
  SHA512:
6
- metadata.gz: 7758a777dd57a559e7ba82b0f16a364db4f3637b95574186c769c5dd3c919f26983ffb66019f46645551b071b0a181559218400e1b6c6c970c0720e93f93e3a2
7
- data.tar.gz: f4a2a023886fdc8f3935680bdf3c8dadf4d27b031cd245128a998e77440c500c3197c35d2e2294dba97f8f8f0c705dc5f13cc5a9cf8024b79b9eb81efd61724a
6
+ metadata.gz: 4b2f8b114b7eb2f6c45fc9d7f821defbb379ccf11cca7a4087eef3325c85d24c6e7b1720f5a954f6a81e8b25f4629f82945e500baee0c9f97334358a82abf705
7
+ data.tar.gz: 95d25c8615906fe90300786c93d95f3dbb3df3af80897bcf239496eda7deb59268275b88b784efb12670abd1eb40a663cadc936343773ee59cbd993b540d649e
@@ -329,6 +329,10 @@ module Io
329
329
  @token_validations ||= ::Io::Flow::V0::Clients::TokenValidations.new(self)
330
330
  end
331
331
 
332
+ def uploads
333
+ @uploads ||= ::Io::Flow::V0::Clients::Uploads.new(self)
334
+ end
335
+
332
336
  def users
333
337
  @users ||= ::Io::Flow::V0::Clients::Users.new(self)
334
338
  end
@@ -3693,6 +3697,22 @@ module Io
3693
3697
 
3694
3698
  end
3695
3699
 
3700
+ class Uploads
3701
+
3702
+ def initialize(client)
3703
+ @client = HttpClient::Preconditions.assert_class('client', client, ::Io::Flow::V0::Client)
3704
+ end
3705
+
3706
+ def post_by_name(organization, name, hash)
3707
+ HttpClient::Preconditions.assert_class('organization', organization, String)
3708
+ HttpClient::Preconditions.assert_class('name', name, String)
3709
+ HttpClient::Preconditions.assert_class('hash', hash, Hash)
3710
+ r = @client.request("/#{CGI.escape(organization)}/uploads/#{CGI.escape(name)}").with_json(hash.to_json).post
3711
+ ::Io::Flow::V0::Models::Upload.new(r)
3712
+ end
3713
+
3714
+ end
3715
+
3696
3716
  class Users
3697
3717
 
3698
3718
  def initialize(client)
@@ -8532,6 +8552,32 @@ module Io
8532
8552
 
8533
8553
  end
8534
8554
 
8555
+ class CatalogReference
8556
+
8557
+ attr_reader :id
8558
+
8559
+ def initialize(incoming={})
8560
+ opts = HttpClient::Helper.symbolize_keys(incoming)
8561
+ HttpClient::Preconditions.require_keys(opts, [:id], 'CatalogReference')
8562
+ @id = HttpClient::Preconditions.assert_class('id', opts.delete(:id), String)
8563
+ end
8564
+
8565
+ def to_json
8566
+ JSON.dump(to_hash)
8567
+ end
8568
+
8569
+ def copy(incoming={})
8570
+ CatalogReference.new(to_hash.merge(HttpClient::Helper.symbolize_keys(incoming)))
8571
+ end
8572
+
8573
+ def to_hash
8574
+ {
8575
+ :id => id
8576
+ }
8577
+ end
8578
+
8579
+ end
8580
+
8535
8581
  # Statistics covering product catalog item information, including total catalog
8536
8582
  # item count, number of distinct categories, etc.
8537
8583
  class CatalogStatistics
@@ -16638,14 +16684,15 @@ module Io
16638
16684
 
16639
16685
  class Targeting
16640
16686
 
16641
- attr_reader :id, :key, :queries, :subcatalog
16687
+ attr_reader :id, :key, :queries, :catalog, :subcatalog
16642
16688
 
16643
16689
  def initialize(incoming={})
16644
16690
  opts = HttpClient::Helper.symbolize_keys(incoming)
16645
- HttpClient::Preconditions.require_keys(opts, [:id, :key, :queries], 'Targeting')
16691
+ HttpClient::Preconditions.require_keys(opts, [:id, :key, :queries, :catalog], 'Targeting')
16646
16692
  @id = HttpClient::Preconditions.assert_class('id', opts.delete(:id), String)
16647
16693
  @key = HttpClient::Preconditions.assert_class('key', opts.delete(:key), String)
16648
16694
  @queries = HttpClient::Preconditions.assert_class('queries', opts.delete(:queries), Array).map { |v| (x = v; x.is_a?(::Io::Flow::V0::Models::TargetingQuery) ? x : ::Io::Flow::V0::Models::TargetingQuery.new(x)) }
16695
+ @catalog = (x = opts.delete(:catalog); x.is_a?(::Io::Flow::V0::Models::CatalogReference) ? x : ::Io::Flow::V0::Models::CatalogReference.new(x))
16649
16696
  @subcatalog = (x = opts.delete(:subcatalog); x.nil? ? nil : (x = x; x.is_a?(::Io::Flow::V0::Models::SubcatalogReference) ? x : ::Io::Flow::V0::Models::SubcatalogReference.new(x)))
16650
16697
  end
16651
16698
 
@@ -16662,6 +16709,7 @@ module Io
16662
16709
  :id => id,
16663
16710
  :key => key,
16664
16711
  :queries => queries.map { |o| o.to_hash },
16712
+ :catalog => catalog.to_hash,
16665
16713
  :subcatalog => subcatalog.nil? ? nil : subcatalog.to_hash
16666
16714
  }
16667
16715
  end
@@ -16707,7 +16755,7 @@ module Io
16707
16755
  opts = HttpClient::Helper.symbolize_keys(incoming)
16708
16756
  HttpClient::Preconditions.require_keys(opts, [:id, :targeting, :item_number, :query], 'TargetingItem')
16709
16757
  @id = HttpClient::Preconditions.assert_class('id', opts.delete(:id), String)
16710
- @targeting = (x = opts.delete(:targeting); x.is_a?(::Io::Flow::V0::Models::TargetingReference) ? x : ::Io::Flow::V0::Models::TargetingReference.new(x))
16758
+ @targeting = (x = opts.delete(:targeting); x.is_a?(::Io::Flow::V0::Models::TargetingSummary) ? x : ::Io::Flow::V0::Models::TargetingSummary.new(x))
16711
16759
  @item_number = HttpClient::Preconditions.assert_class('item_number', opts.delete(:item_number), String)
16712
16760
  @query = (x = opts.delete(:query); x.is_a?(::Io::Flow::V0::Models::TargetingQuery) ? x : ::Io::Flow::V0::Models::TargetingQuery.new(x))
16713
16761
  end
@@ -16871,15 +16919,16 @@ module Io
16871
16919
 
16872
16920
  end
16873
16921
 
16874
- class TargetingReference
16922
+ class TargetingSummary
16875
16923
 
16876
- attr_reader :id, :key, :subcatalog
16924
+ attr_reader :id, :key, :catalog, :subcatalog
16877
16925
 
16878
16926
  def initialize(incoming={})
16879
16927
  opts = HttpClient::Helper.symbolize_keys(incoming)
16880
- HttpClient::Preconditions.require_keys(opts, [:id, :key], 'TargetingReference')
16928
+ HttpClient::Preconditions.require_keys(opts, [:id, :key, :catalog], 'TargetingSummary')
16881
16929
  @id = HttpClient::Preconditions.assert_class('id', opts.delete(:id), String)
16882
16930
  @key = HttpClient::Preconditions.assert_class('key', opts.delete(:key), String)
16931
+ @catalog = (x = opts.delete(:catalog); x.is_a?(::Io::Flow::V0::Models::CatalogReference) ? x : ::Io::Flow::V0::Models::CatalogReference.new(x))
16883
16932
  @subcatalog = (x = opts.delete(:subcatalog); x.nil? ? nil : (x = x; x.is_a?(::Io::Flow::V0::Models::SubcatalogReference) ? x : ::Io::Flow::V0::Models::SubcatalogReference.new(x)))
16884
16933
  end
16885
16934
 
@@ -16888,13 +16937,14 @@ module Io
16888
16937
  end
16889
16938
 
16890
16939
  def copy(incoming={})
16891
- TargetingReference.new(to_hash.merge(HttpClient::Helper.symbolize_keys(incoming)))
16940
+ TargetingSummary.new(to_hash.merge(HttpClient::Helper.symbolize_keys(incoming)))
16892
16941
  end
16893
16942
 
16894
16943
  def to_hash
16895
16944
  {
16896
16945
  :id => id,
16897
16946
  :key => key,
16947
+ :catalog => catalog.to_hash,
16898
16948
  :subcatalog => subcatalog.nil? ? nil : subcatalog.to_hash
16899
16949
  }
16900
16950
  end
@@ -18036,6 +18086,40 @@ module Io
18036
18086
 
18037
18087
  end
18038
18088
 
18089
+ # Provides the ability to upload a file to a URL (an expiring s3 url, usually
18090
+ # valid for 1 week)
18091
+ class Upload
18092
+
18093
+ attr_reader :id, :name, :url, :expiration
18094
+
18095
+ def initialize(incoming={})
18096
+ opts = HttpClient::Helper.symbolize_keys(incoming)
18097
+ HttpClient::Preconditions.require_keys(opts, [:id, :name, :url, :expiration], 'Upload')
18098
+ @id = HttpClient::Preconditions.assert_class('id', opts.delete(:id), String)
18099
+ @name = HttpClient::Preconditions.assert_class('name', opts.delete(:name), String)
18100
+ @url = HttpClient::Preconditions.assert_class('url', opts.delete(:url), String)
18101
+ @expiration = HttpClient::Preconditions.assert_class('expiration', HttpClient::Helper.to_date_time_iso8601(opts.delete(:expiration)), DateTime)
18102
+ end
18103
+
18104
+ def to_json
18105
+ JSON.dump(to_hash)
18106
+ end
18107
+
18108
+ def copy(incoming={})
18109
+ Upload.new(to_hash.merge(HttpClient::Helper.symbolize_keys(incoming)))
18110
+ end
18111
+
18112
+ def to_hash
18113
+ {
18114
+ :id => id,
18115
+ :name => name,
18116
+ :url => url,
18117
+ :expiration => expiration
18118
+ }
18119
+ end
18120
+
18121
+ end
18122
+
18039
18123
  # Represents a single user in the system
18040
18124
  class User < ExpandableUser
18041
18125
 
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.76
4
+ version: 0.0.77
5
5
  platform: ruby
6
6
  authors:
7
7
  - Flow Commerce, Inc.