flowcommerce 0.0.4 → 0.0.8

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: f938d9bd95c750e4c013dd5098a10e5ea2d17061
4
- data.tar.gz: 04f5b4e9fc0e5bb9bbf0634566d31d670f2fe869
3
+ metadata.gz: 4254e88417e5c637a08132c28e0590473cb1705d
4
+ data.tar.gz: 89d32eca13e96d0738e05aa57f0c298aa18d3cd7
5
5
  SHA512:
6
- metadata.gz: 4482e0556efcbc235c069f85b9ef758cbf5ab90cd2b4be1b9276103aa33e949b5f59a7c7ac657780f0f37ce2cd7fe323452509c0a41e669232a57649d0a05cd9
7
- data.tar.gz: 5938bb36bd431d036f16b3fb987fe9ffee52e90a9d5565b15dfb9611631ef18388900d2fe8abb99f988d1220b732a1bc4fccb9285ce092b52ee7ed6624514778
6
+ metadata.gz: 45187247ba83791d213d229f15d41cba2c7fb3f4d2fc6ace91c28c7e9972bcf2b5230d3531fda9845f9e7ddc77d2dc2d9f768c7c9905948c585309ce79d373f6
7
+ data.tar.gz: 77c8d49ac34df85aa207f2bf3fcc3b90590e3e8908c0a25e7c7b0a5cec778a6ed2509e91ec523ab706295d28fbe002b905efd181208c15f1ed90313ef5d573ac
data/README.md CHANGED
@@ -4,7 +4,7 @@ Native ruby client to the Flow API (https://api.flow.io)
4
4
 
5
5
  ## Installation
6
6
 
7
- gem install 'flowcommerce'
7
+ gem install flowcommerce
8
8
 
9
9
 
10
10
  ## Usage
@@ -17,8 +17,8 @@ Native ruby client to the Flow API (https://api.flow.io)
17
17
 
18
18
  catalog = client.catalogs.get_catalog(org)
19
19
 
20
- items = client.view_items.get(org, "canada", :limit => 10, :offset => 0)
21
- puts "# items in view: %s" % items.size
20
+ items = client.subcatalog_items.get(org, "canada", :limit => 10, :offset => 0)
21
+ puts "# items in subcatalog: %s" % items.size
22
22
 
23
23
 
24
24
  ## Example
@@ -1,6 +1,6 @@
1
1
  # Generated by apidoc - http://www.apidoc.me
2
2
  # Service version: 0.0.11
3
- # apidoc:0.11.19 http://localhost:9000/flow/catalog/0.0.11/ruby_client
3
+ # apidoc:0.11.21 http://www.apidoc.me/flow/catalog/0.0.11/ruby_client
4
4
 
5
5
  require 'cgi'
6
6
  require 'net/http'
@@ -24,7 +24,7 @@ module Io
24
24
 
25
25
  BASE_URL = 'https://catalog.api.flow.io' unless defined?(Constants::BASE_URL)
26
26
  NAMESPACE = 'io.flow.catalog.v0' unless defined?(Constants::NAMESPACE)
27
- USER_AGENT = 'apidoc:0.11.19 http://localhost:9000/flow/catalog/0.0.11/ruby_client' unless defined?(Constants::USER_AGENT)
27
+ USER_AGENT = 'apidoc:0.11.21 http://www.apidoc.me/flow/catalog/0.0.11/ruby_client' unless defined?(Constants::USER_AGENT)
28
28
  VERSION = '0.0.11' unless defined?(Constants::VERSION)
29
29
  VERSION_MAJOR = 0 unless defined?(VERSION_MAJOR)
30
30
 
@@ -72,12 +72,12 @@ module Io
72
72
  @items ||= ::Io::Flow::Catalog::V0::Clients::Items.new(self)
73
73
  end
74
74
 
75
- def views
76
- @views ||= ::Io::Flow::Catalog::V0::Clients::Views.new(self)
75
+ def subcatalogs
76
+ @subcatalogs ||= ::Io::Flow::Catalog::V0::Clients::Subcatalogs.new(self)
77
77
  end
78
78
 
79
- def view_items
80
- @view_items ||= ::Io::Flow::Catalog::V0::Clients::ViewItems.new(self)
79
+ def subcatalog_items
80
+ @subcatalog_items ||= ::Io::Flow::Catalog::V0::Clients::SubcatalogItems.new(self)
81
81
  end
82
82
  end
83
83
 
@@ -183,7 +183,7 @@ module Io
183
183
 
184
184
  end
185
185
 
186
- class Views
186
+ class Subcatalogs
187
187
 
188
188
  def initialize(client)
189
189
  @client = HttpClient::Preconditions.assert_class('client', client, ::Io::Flow::Catalog::V0::Client)
@@ -199,11 +199,11 @@ module Io
199
199
  :offset => HttpClient::Preconditions.assert_class('offset', (x = opts.delete(:offset); x.nil? ? 0 : x), Integer),
200
200
  :sort => HttpClient::Preconditions.assert_class('sort', (x = opts.delete(:sort); x.nil? ? "journal_timestamp" : x), String)
201
201
  }.delete_if { |k, v| v.nil? }
202
- r = @client.request("/#{CGI.escape(organization)}/catalog/views/versions").with_query(query).get
203
- r.map { |x| ::Io::Flow::Catalog::V0::Models::ViewVersion.new(x) }
202
+ r = @client.request("/#{CGI.escape(organization)}/catalog/subcatalogs/versions").with_query(query).get
203
+ r.map { |x| ::Io::Flow::Catalog::V0::Models::SubcatalogVersion.new(x) }
204
204
  end
205
205
 
206
- # Search views. Always paginated.
206
+ # Search subcatalogs. Always paginated.
207
207
  def get(organization, incoming={})
208
208
  HttpClient::Preconditions.assert_class('organization', organization, String)
209
209
  opts = HttpClient::Helper.symbolize_keys(incoming)
@@ -213,72 +213,82 @@ module Io
213
213
  :offset => HttpClient::Preconditions.assert_class('offset', (x = opts.delete(:offset); x.nil? ? 0 : x), Integer),
214
214
  :sort => HttpClient::Preconditions.assert_class('sort', (x = opts.delete(:sort); x.nil? ? "-created_at" : x), String)
215
215
  }.delete_if { |k, v| v.nil? }
216
- r = @client.request("/#{CGI.escape(organization)}/catalog/views").with_query(query).get
217
- r.map { |x| ::Io::Flow::Catalog::V0::Models::View.new(x) }
216
+ r = @client.request("/#{CGI.escape(organization)}/catalog/subcatalogs").with_query(query).get
217
+ r.map { |x| ::Io::Flow::Catalog::V0::Models::Subcatalog.new(x) }
218
218
  end
219
219
 
220
- # Returns information about a specific view.
220
+ # Returns information about a specific subcatalog.
221
221
  def get_by_id(organization, id)
222
222
  HttpClient::Preconditions.assert_class('organization', organization, String)
223
223
  HttpClient::Preconditions.assert_class('id', id, String)
224
- r = @client.request("/#{CGI.escape(organization)}/catalog/views/#{CGI.escape(id)}").get
225
- ::Io::Flow::Catalog::V0::Models::View.new(r)
224
+ r = @client.request("/#{CGI.escape(organization)}/catalog/subcatalogs/#{CGI.escape(id)}").get
225
+ ::Io::Flow::Catalog::V0::Models::Subcatalog.new(r)
226
226
  end
227
227
 
228
- # Add view
229
- def post(organization, view_form)
228
+ # Add subcatalog
229
+ def post(organization, subcatalog_form)
230
230
  HttpClient::Preconditions.assert_class('organization', organization, String)
231
- HttpClient::Preconditions.assert_class('view_form', view_form, ::Io::Flow::Catalog::V0::Models::ViewForm)
232
- r = @client.request("/#{CGI.escape(organization)}/catalog/views").with_json(view_form.to_json).post
233
- ::Io::Flow::Catalog::V0::Models::View.new(r)
231
+ HttpClient::Preconditions.assert_class('subcatalog_form', subcatalog_form, ::Io::Flow::Catalog::V0::Models::SubcatalogForm)
232
+ r = @client.request("/#{CGI.escape(organization)}/catalog/subcatalogs").with_json(subcatalog_form.to_json).post
233
+ ::Io::Flow::Catalog::V0::Models::Subcatalog.new(r)
234
234
  end
235
235
 
236
- # Update view with the specified id, creating if it does not exist.
237
- def put_by_id(organization, id, view_form)
236
+ # Update subcatalog with the specified id, creating if it does not exist.
237
+ def put_by_id(organization, id, subcatalog_form)
238
238
  HttpClient::Preconditions.assert_class('organization', organization, String)
239
239
  HttpClient::Preconditions.assert_class('id', id, String)
240
- HttpClient::Preconditions.assert_class('view_form', view_form, ::Io::Flow::Catalog::V0::Models::ViewForm)
241
- r = @client.request("/#{CGI.escape(organization)}/catalog/views/#{CGI.escape(id)}").with_json(view_form.to_json).put
242
- ::Io::Flow::Catalog::V0::Models::View.new(r)
240
+ HttpClient::Preconditions.assert_class('subcatalog_form', subcatalog_form, ::Io::Flow::Catalog::V0::Models::SubcatalogForm)
241
+ r = @client.request("/#{CGI.escape(organization)}/catalog/subcatalogs/#{CGI.escape(id)}").with_json(subcatalog_form.to_json).put
242
+ ::Io::Flow::Catalog::V0::Models::Subcatalog.new(r)
243
243
  end
244
244
 
245
- # Delete the view with this id
245
+ # Delete the subcatalog with this id
246
246
  def delete_by_id(organization, id)
247
247
  HttpClient::Preconditions.assert_class('organization', organization, String)
248
248
  HttpClient::Preconditions.assert_class('id', id, String)
249
- r = @client.request("/#{CGI.escape(organization)}/catalog/views/#{CGI.escape(id)}").delete
249
+ r = @client.request("/#{CGI.escape(organization)}/catalog/subcatalogs/#{CGI.escape(id)}").delete
250
250
  nil
251
251
  end
252
252
 
253
- # Returns information about a specific view's settings.
253
+ # Returns information about a specific subcatalog's settings.
254
254
  def get_settings_by_id(organization, id)
255
255
  HttpClient::Preconditions.assert_class('organization', organization, String)
256
256
  HttpClient::Preconditions.assert_class('id', id, String)
257
- r = @client.request("/#{CGI.escape(organization)}/catalog/views/#{CGI.escape(id)}/settings").get
258
- ::Io::Flow::Catalog::V0::Models::ViewSettings.new(r)
257
+ r = @client.request("/#{CGI.escape(organization)}/catalog/subcatalogs/#{CGI.escape(id)}/settings").get
258
+ ::Io::Flow::Catalog::V0::Models::SubcatalogSettings.new(r)
259
259
  end
260
260
 
261
- # Update view settings for the specified view.
262
- def put_settings_by_id(organization, id, view_settings_form)
261
+ # Update subcatalog settings for the specified subcatalog.
262
+ def put_settings_by_id(organization, id, subcatalog_settings_form)
263
263
  HttpClient::Preconditions.assert_class('organization', organization, String)
264
264
  HttpClient::Preconditions.assert_class('id', id, String)
265
- HttpClient::Preconditions.assert_class('view_settings_form', view_settings_form, ::Io::Flow::Catalog::V0::Models::ViewSettingsForm)
266
- r = @client.request("/#{CGI.escape(organization)}/catalog/views/#{CGI.escape(id)}/settings").with_json(view_settings_form.to_json).put
267
- ::Io::Flow::Catalog::V0::Models::ViewSettings.new(r)
265
+ HttpClient::Preconditions.assert_class('subcatalog_settings_form', subcatalog_settings_form, ::Io::Flow::Catalog::V0::Models::SubcatalogSettingsForm)
266
+ r = @client.request("/#{CGI.escape(organization)}/catalog/subcatalogs/#{CGI.escape(id)}/settings").with_json(subcatalog_settings_form.to_json).put
267
+ ::Io::Flow::Catalog::V0::Models::SubcatalogSettings.new(r)
268
+ end
269
+
270
+ # Sync subcatalog
271
+ def post_events_by_id_and_event(organization, id, event, hash)
272
+ HttpClient::Preconditions.assert_class('organization', organization, String)
273
+ HttpClient::Preconditions.assert_class('id', id, String)
274
+ HttpClient::Preconditions.assert_class('event', event, String)
275
+ HttpClient::Preconditions.assert_class('hash', hash, Hash)
276
+ r = @client.request("/#{CGI.escape(organization)}/catalog/subcatalogs/#{CGI.escape(id)}/events/#{CGI.escape(event)}").with_json(hash.to_json).post
277
+ nil
268
278
  end
269
279
 
270
280
  end
271
281
 
272
- class ViewItems
282
+ class SubcatalogItems
273
283
 
274
284
  def initialize(client)
275
285
  @client = HttpClient::Preconditions.assert_class('client', client, ::Io::Flow::Catalog::V0::Client)
276
286
  end
277
287
 
278
288
  # Provides visibility into recent changes of each object, including deletion
279
- def get_versions(organization, view, incoming={})
289
+ def get_versions(organization, subcatalog, incoming={})
280
290
  HttpClient::Preconditions.assert_class('organization', organization, String)
281
- HttpClient::Preconditions.assert_class('view', view, String)
291
+ HttpClient::Preconditions.assert_class('subcatalog', subcatalog, String)
282
292
  opts = HttpClient::Helper.symbolize_keys(incoming)
283
293
  query = {
284
294
  :id => (x = opts.delete(:id); x.nil? ? nil : HttpClient::Preconditions.assert_class('id', x, Array).map { |v| HttpClient::Preconditions.assert_class('id', v, String) }),
@@ -287,14 +297,14 @@ module Io
287
297
  :offset => HttpClient::Preconditions.assert_class('offset', (x = opts.delete(:offset); x.nil? ? 0 : x), Integer),
288
298
  :sort => HttpClient::Preconditions.assert_class('sort', (x = opts.delete(:sort); x.nil? ? "journal_timestamp" : x), String)
289
299
  }.delete_if { |k, v| v.nil? }
290
- r = @client.request("/#{CGI.escape(organization)}/catalog/views/#{CGI.escape(view)}/items/versions").with_query(query).get
291
- r.map { |x| ::Io::Flow::Catalog::V0::Models::ViewVersion.new(x) }
300
+ r = @client.request("/#{CGI.escape(organization)}/catalog/subcatalogs/#{CGI.escape(subcatalog)}/items/versions").with_query(query).get
301
+ r.map { |x| ::Io::Flow::Catalog::V0::Models::SubcatalogVersion.new(x) }
292
302
  end
293
303
 
294
- # Search view items. Always paginated.
295
- def get(organization, view, incoming={})
304
+ # Search subcatalog items. Always paginated.
305
+ def get(organization, subcatalog, incoming={})
296
306
  HttpClient::Preconditions.assert_class('organization', organization, String)
297
- HttpClient::Preconditions.assert_class('view', view, String)
307
+ HttpClient::Preconditions.assert_class('subcatalog', subcatalog, String)
298
308
  opts = HttpClient::Helper.symbolize_keys(incoming)
299
309
  query = {
300
310
  :id => (x = opts.delete(:id); x.nil? ? nil : HttpClient::Preconditions.assert_class('id', x, Array).map { |v| HttpClient::Preconditions.assert_class('id', v, String) }),
@@ -304,44 +314,44 @@ module Io
304
314
  :offset => HttpClient::Preconditions.assert_class('offset', (x = opts.delete(:offset); x.nil? ? 0 : x), Integer),
305
315
  :sort => HttpClient::Preconditions.assert_class('sort', (x = opts.delete(:sort); x.nil? ? "lower(name)" : x), String)
306
316
  }.delete_if { |k, v| v.nil? }
307
- r = @client.request("/#{CGI.escape(organization)}/catalog/views/#{CGI.escape(view)}/items").with_query(query).get
317
+ r = @client.request("/#{CGI.escape(organization)}/catalog/subcatalogs/#{CGI.escape(subcatalog)}/items").with_query(query).get
308
318
  r.map { |x| ::Io::Flow::Catalog::V0::Models::Item.new(x) }
309
319
  end
310
320
 
311
- # Returns information about specific view items.
312
- def get_by_id(organization, view, id)
321
+ # Returns information about specific subcatalog items.
322
+ def get_by_id(organization, subcatalog, id)
313
323
  HttpClient::Preconditions.assert_class('organization', organization, String)
314
- HttpClient::Preconditions.assert_class('view', view, String)
324
+ HttpClient::Preconditions.assert_class('subcatalog', subcatalog, String)
315
325
  HttpClient::Preconditions.assert_class('id', id, String)
316
- r = @client.request("/#{CGI.escape(organization)}/catalog/views/#{CGI.escape(view)}/items/#{CGI.escape(id)}").get
326
+ r = @client.request("/#{CGI.escape(organization)}/catalog/subcatalogs/#{CGI.escape(subcatalog)}/items/#{CGI.escape(id)}").get
317
327
  ::Io::Flow::Catalog::V0::Models::Item.new(r)
318
328
  end
319
329
 
320
- # Add view item
321
- def post(organization, view, item_form)
330
+ # Add subcatalog item
331
+ def post(organization, subcatalog, item_form)
322
332
  HttpClient::Preconditions.assert_class('organization', organization, String)
323
- HttpClient::Preconditions.assert_class('view', view, String)
333
+ HttpClient::Preconditions.assert_class('subcatalog', subcatalog, String)
324
334
  HttpClient::Preconditions.assert_class('item_form', item_form, ::Io::Flow::Catalog::V0::Models::ItemForm)
325
- r = @client.request("/#{CGI.escape(organization)}/catalog/views/#{CGI.escape(view)}/items").with_json(item_form.to_json).post
335
+ r = @client.request("/#{CGI.escape(organization)}/catalog/subcatalogs/#{CGI.escape(subcatalog)}/items").with_json(item_form.to_json).post
326
336
  ::Io::Flow::Catalog::V0::Models::Item.new(r)
327
337
  end
328
338
 
329
- # Update view item with the specified id, creating if it does not exist.
330
- def put_by_id(organization, view, id, item_form)
339
+ # Update subcatalog item with the specified id, creating if it does not exist.
340
+ def put_by_id(organization, subcatalog, id, item_form)
331
341
  HttpClient::Preconditions.assert_class('organization', organization, String)
332
- HttpClient::Preconditions.assert_class('view', view, String)
342
+ HttpClient::Preconditions.assert_class('subcatalog', subcatalog, String)
333
343
  HttpClient::Preconditions.assert_class('id', id, String)
334
344
  HttpClient::Preconditions.assert_class('item_form', item_form, ::Io::Flow::Catalog::V0::Models::ItemForm)
335
- r = @client.request("/#{CGI.escape(organization)}/catalog/views/#{CGI.escape(view)}/items/#{CGI.escape(id)}").with_json(item_form.to_json).put
345
+ r = @client.request("/#{CGI.escape(organization)}/catalog/subcatalogs/#{CGI.escape(subcatalog)}/items/#{CGI.escape(id)}").with_json(item_form.to_json).put
336
346
  ::Io::Flow::Catalog::V0::Models::Item.new(r)
337
347
  end
338
348
 
339
- # Delete the view item with this id
340
- def delete_by_id(organization, view, id)
349
+ # Delete the subcatalog item with this id
350
+ def delete_by_id(organization, subcatalog, id)
341
351
  HttpClient::Preconditions.assert_class('organization', organization, String)
342
- HttpClient::Preconditions.assert_class('view', view, String)
352
+ HttpClient::Preconditions.assert_class('subcatalog', subcatalog, String)
343
353
  HttpClient::Preconditions.assert_class('id', id, String)
344
- r = @client.request("/#{CGI.escape(organization)}/catalog/views/#{CGI.escape(view)}/items/#{CGI.escape(id)}").delete
354
+ r = @client.request("/#{CGI.escape(organization)}/catalog/subcatalogs/#{CGI.escape(subcatalog)}/items/#{CGI.escape(id)}").delete
345
355
  nil
346
356
  end
347
357
 
@@ -712,19 +722,19 @@ module Io
712
722
 
713
723
  end
714
724
 
715
- class View
725
+ class Subcatalog
716
726
 
717
727
  attr_reader :id, :catalog, :key, :countries, :currency, :settings, :query
718
728
 
719
729
  def initialize(incoming={})
720
730
  opts = HttpClient::Helper.symbolize_keys(incoming)
721
- HttpClient::Preconditions.require_keys(opts, [:id, :catalog, :key, :countries, :currency, :settings], 'View')
731
+ HttpClient::Preconditions.require_keys(opts, [:id, :catalog, :key, :countries, :currency, :settings], 'Subcatalog')
722
732
  @id = HttpClient::Preconditions.assert_class('id', opts.delete(:id), String)
723
733
  @catalog = (x = opts.delete(:catalog); x.is_a?(::Io::Flow::Catalog::V0::Models::Catalog) ? x : ::Io::Flow::Catalog::V0::Models::Catalog.new(x))
724
734
  @key = HttpClient::Preconditions.assert_class('key', opts.delete(:key), String)
725
735
  @countries = HttpClient::Preconditions.assert_class('countries', opts.delete(:countries), Array).map { |v| HttpClient::Preconditions.assert_class('countries', v, String) }
726
736
  @currency = HttpClient::Preconditions.assert_class('currency', opts.delete(:currency), String)
727
- @settings = (x = opts.delete(:settings); x.is_a?(::Io::Flow::Catalog::V0::Models::ViewSettings) ? x : ::Io::Flow::Catalog::V0::Models::ViewSettings.new(x))
737
+ @settings = (x = opts.delete(:settings); x.is_a?(::Io::Flow::Catalog::V0::Models::SubcatalogSettings) ? x : ::Io::Flow::Catalog::V0::Models::SubcatalogSettings.new(x))
728
738
  @query = (x = opts.delete(:query); x.nil? ? nil : HttpClient::Preconditions.assert_class('query', x, String))
729
739
  end
730
740
 
@@ -733,7 +743,7 @@ module Io
733
743
  end
734
744
 
735
745
  def copy(incoming={})
736
- View.new(to_hash.merge(HttpClient::Helper.symbolize_keys(incoming)))
746
+ Subcatalog.new(to_hash.merge(HttpClient::Helper.symbolize_keys(incoming)))
737
747
  end
738
748
 
739
749
  def to_hash
@@ -750,18 +760,18 @@ module Io
750
760
 
751
761
  end
752
762
 
753
- class ViewForm
763
+ class SubcatalogForm
754
764
 
755
765
  attr_reader :countries, :key, :currency, :query, :settings
756
766
 
757
767
  def initialize(incoming={})
758
768
  opts = HttpClient::Helper.symbolize_keys(incoming)
759
- HttpClient::Preconditions.require_keys(opts, [:countries], 'ViewForm')
769
+ HttpClient::Preconditions.require_keys(opts, [:countries], 'SubcatalogForm')
760
770
  @countries = HttpClient::Preconditions.assert_class('countries', opts.delete(:countries), Array).map { |v| HttpClient::Preconditions.assert_class('countries', v, String) }
761
771
  @key = (x = opts.delete(:key); x.nil? ? nil : HttpClient::Preconditions.assert_class('key', x, String))
762
772
  @currency = (x = opts.delete(:currency); x.nil? ? nil : HttpClient::Preconditions.assert_class('currency', x, String))
763
773
  @query = (x = opts.delete(:query); x.nil? ? nil : HttpClient::Preconditions.assert_class('query', x, String))
764
- @settings = (x = opts.delete(:settings); x.nil? ? nil : (x = x; x.is_a?(::Io::Flow::Catalog::V0::Models::ViewSettingsForm) ? x : ::Io::Flow::Catalog::V0::Models::ViewSettingsForm.new(x)))
774
+ @settings = (x = opts.delete(:settings); x.nil? ? nil : (x = x; x.is_a?(::Io::Flow::Catalog::V0::Models::SubcatalogSettingsForm) ? x : ::Io::Flow::Catalog::V0::Models::SubcatalogSettingsForm.new(x)))
765
775
  end
766
776
 
767
777
  def to_json
@@ -769,7 +779,7 @@ module Io
769
779
  end
770
780
 
771
781
  def copy(incoming={})
772
- ViewForm.new(to_hash.merge(HttpClient::Helper.symbolize_keys(incoming)))
782
+ SubcatalogForm.new(to_hash.merge(HttpClient::Helper.symbolize_keys(incoming)))
773
783
  end
774
784
 
775
785
  def to_hash
@@ -784,14 +794,14 @@ module Io
784
794
 
785
795
  end
786
796
 
787
- # Placeholder for view_item resource.
788
- class ViewItem
797
+ # Placeholder for subcatalog_item resource.
798
+ class SubcatalogItem
789
799
 
790
800
  attr_reader :id
791
801
 
792
802
  def initialize(incoming={})
793
803
  opts = HttpClient::Helper.symbolize_keys(incoming)
794
- HttpClient::Preconditions.require_keys(opts, [:id], 'ViewItem')
804
+ HttpClient::Preconditions.require_keys(opts, [:id], 'SubcatalogItem')
795
805
  @id = HttpClient::Preconditions.assert_class('id', opts.delete(:id), String)
796
806
  end
797
807
 
@@ -800,7 +810,7 @@ module Io
800
810
  end
801
811
 
802
812
  def copy(incoming={})
803
- ViewItem.new(to_hash.merge(HttpClient::Helper.symbolize_keys(incoming)))
813
+ SubcatalogItem.new(to_hash.merge(HttpClient::Helper.symbolize_keys(incoming)))
804
814
  end
805
815
 
806
816
  def to_hash
@@ -811,7 +821,7 @@ module Io
811
821
 
812
822
  end
813
823
 
814
- class ViewSettings
824
+ class SubcatalogSettings
815
825
 
816
826
  attr_reader :update_policy
817
827
 
@@ -825,7 +835,7 @@ module Io
825
835
  end
826
836
 
827
837
  def copy(incoming={})
828
- ViewSettings.new(to_hash.merge(HttpClient::Helper.symbolize_keys(incoming)))
838
+ SubcatalogSettings.new(to_hash.merge(HttpClient::Helper.symbolize_keys(incoming)))
829
839
  end
830
840
 
831
841
  def to_hash
@@ -836,7 +846,7 @@ module Io
836
846
 
837
847
  end
838
848
 
839
- class ViewSettingsForm
849
+ class SubcatalogSettingsForm
840
850
 
841
851
  attr_reader :update_policy
842
852
 
@@ -850,7 +860,7 @@ module Io
850
860
  end
851
861
 
852
862
  def copy(incoming={})
853
- ViewSettingsForm.new(to_hash.merge(HttpClient::Helper.symbolize_keys(incoming)))
863
+ SubcatalogSettingsForm.new(to_hash.merge(HttpClient::Helper.symbolize_keys(incoming)))
854
864
  end
855
865
 
856
866
  def to_hash
@@ -861,17 +871,17 @@ module Io
861
871
 
862
872
  end
863
873
 
864
- class ViewVersion
874
+ class SubcatalogVersion
865
875
 
866
- attr_reader :id, :timestamp, :type, :view
876
+ attr_reader :id, :timestamp, :type, :subcatalog
867
877
 
868
878
  def initialize(incoming={})
869
879
  opts = HttpClient::Helper.symbolize_keys(incoming)
870
- HttpClient::Preconditions.require_keys(opts, [:id, :timestamp, :type, :view], 'ViewVersion')
880
+ HttpClient::Preconditions.require_keys(opts, [:id, :timestamp, :type, :subcatalog], 'SubcatalogVersion')
871
881
  @id = HttpClient::Preconditions.assert_class('id', opts.delete(:id), String)
872
882
  @timestamp = HttpClient::Preconditions.assert_class('timestamp', HttpClient::Helper.to_date_time_iso8601(opts.delete(:timestamp)), DateTime)
873
883
  @type = (x = opts.delete(:type); x.is_a?(::Io::Flow::Common::V0::Models::ChangeType) ? x : ::Io::Flow::Common::V0::Models::ChangeType.apply(x))
874
- @view = (x = opts.delete(:view); x.is_a?(::Io::Flow::Catalog::V0::Models::View) ? x : ::Io::Flow::Catalog::V0::Models::View.new(x))
884
+ @subcatalog = (x = opts.delete(:subcatalog); x.is_a?(::Io::Flow::Catalog::V0::Models::Subcatalog) ? x : ::Io::Flow::Catalog::V0::Models::Subcatalog.new(x))
875
885
  end
876
886
 
877
887
  def to_json
@@ -879,7 +889,7 @@ module Io
879
889
  end
880
890
 
881
891
  def copy(incoming={})
882
- ViewVersion.new(to_hash.merge(HttpClient::Helper.symbolize_keys(incoming)))
892
+ SubcatalogVersion.new(to_hash.merge(HttpClient::Helper.symbolize_keys(incoming)))
883
893
  end
884
894
 
885
895
  def to_hash
@@ -887,7 +897,7 @@ module Io
887
897
  :id => id,
888
898
  :timestamp => timestamp,
889
899
  :type => type.value,
890
- :view => view.to_hash
900
+ :subcatalog => subcatalog.to_hash
891
901
  }
892
902
  end
893
903
 
@@ -1,6 +1,6 @@
1
1
  # Generated by apidoc - http://www.apidoc.me
2
2
  # Service version: 0.0.11
3
- # apidoc:0.11.19 http://localhost:9000/flow/common/0.0.11/ruby_client
3
+ # apidoc:0.11.21 http://www.apidoc.me/flow/common/0.0.11/ruby_client
4
4
 
5
5
  require 'cgi'
6
6
  require 'net/http'
@@ -23,7 +23,7 @@ module Io
23
23
  module Constants
24
24
 
25
25
  NAMESPACE = 'io.flow.common.v0' unless defined?(Constants::NAMESPACE)
26
- USER_AGENT = 'apidoc:0.11.19 http://localhost:9000/flow/common/0.0.11/ruby_client' unless defined?(Constants::USER_AGENT)
26
+ USER_AGENT = 'apidoc:0.11.21 http://www.apidoc.me/flow/common/0.0.11/ruby_client' unless defined?(Constants::USER_AGENT)
27
27
  VERSION = '0.0.11' unless defined?(Constants::VERSION)
28
28
  VERSION_MAJOR = 0 unless defined?(VERSION_MAJOR)
29
29
 
@@ -597,36 +597,6 @@ module Io
597
597
 
598
598
  end
599
599
 
600
- class ChangeHeader
601
-
602
- attr_reader :id, :timestamp, :type
603
-
604
- def initialize(incoming={})
605
- opts = HttpClient::Helper.symbolize_keys(incoming)
606
- HttpClient::Preconditions.require_keys(opts, [:id, :timestamp, :type], 'ChangeHeader')
607
- @id = HttpClient::Preconditions.assert_class('id', opts.delete(:id), String)
608
- @timestamp = HttpClient::Preconditions.assert_class('timestamp', HttpClient::Helper.to_date_time_iso8601(opts.delete(:timestamp)), DateTime)
609
- @type = (x = opts.delete(:type); x.is_a?(::Io::Flow::Common::V0::Models::ChangeType) ? x : ::Io::Flow::Common::V0::Models::ChangeType.apply(x))
610
- end
611
-
612
- def to_json
613
- JSON.dump(to_hash)
614
- end
615
-
616
- def copy(incoming={})
617
- ChangeHeader.new(to_hash.merge(HttpClient::Helper.symbolize_keys(incoming)))
618
- end
619
-
620
- def to_hash
621
- {
622
- :id => id,
623
- :timestamp => timestamp,
624
- :type => type.value
625
- }
626
- end
627
-
628
- end
629
-
630
600
  # Defines structured fields for a contact person. Typically used for specifying
631
601
  # contact person for an account, shipment, or organization representative
632
602
  class Contact
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: flowcommerce
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.4
4
+ version: 0.0.8
5
5
  platform: ruby
6
6
  authors:
7
7
  - Flow Commerce, Inc.
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-03-19 00:00:00.000000000 Z
11
+ date: 2016-03-29 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: json
@@ -69,7 +69,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
69
69
  version: '0'
70
70
  requirements: []
71
71
  rubyforge_project:
72
- rubygems_version: 2.0.14
72
+ rubygems_version: 2.0.14.1
73
73
  signing_key:
74
74
  specification_version: 4
75
75
  summary: Native ruby client for the Flow REST API.