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 +4 -4
- data/README.md +3 -3
- data/lib/clients/flow_catalog_v0_client.rb +92 -82
- data/lib/clients/flow_common_v0_client.rb +2 -32
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4254e88417e5c637a08132c28e0590473cb1705d
|
4
|
+
data.tar.gz: 89d32eca13e96d0738e05aa57f0c298aa18d3cd7
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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
|
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.
|
21
|
-
puts "# items in
|
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.
|
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.
|
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
|
76
|
-
@
|
75
|
+
def subcatalogs
|
76
|
+
@subcatalogs ||= ::Io::Flow::Catalog::V0::Clients::Subcatalogs.new(self)
|
77
77
|
end
|
78
78
|
|
79
|
-
def
|
80
|
-
@
|
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
|
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/
|
203
|
-
r.map { |x| ::Io::Flow::Catalog::V0::Models::
|
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
|
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/
|
217
|
-
r.map { |x| ::Io::Flow::Catalog::V0::Models::
|
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
|
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/
|
225
|
-
::Io::Flow::Catalog::V0::Models::
|
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
|
229
|
-
def post(organization,
|
228
|
+
# Add subcatalog
|
229
|
+
def post(organization, subcatalog_form)
|
230
230
|
HttpClient::Preconditions.assert_class('organization', organization, String)
|
231
|
-
HttpClient::Preconditions.assert_class('
|
232
|
-
r = @client.request("/#{CGI.escape(organization)}/catalog/
|
233
|
-
::Io::Flow::Catalog::V0::Models::
|
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
|
237
|
-
def put_by_id(organization, id,
|
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('
|
241
|
-
r = @client.request("/#{CGI.escape(organization)}/catalog/
|
242
|
-
::Io::Flow::Catalog::V0::Models::
|
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
|
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/
|
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
|
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/
|
258
|
-
::Io::Flow::Catalog::V0::Models::
|
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
|
262
|
-
def put_settings_by_id(organization, id,
|
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('
|
266
|
-
r = @client.request("/#{CGI.escape(organization)}/catalog/
|
267
|
-
::Io::Flow::Catalog::V0::Models::
|
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
|
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,
|
289
|
+
def get_versions(organization, subcatalog, incoming={})
|
280
290
|
HttpClient::Preconditions.assert_class('organization', organization, String)
|
281
|
-
HttpClient::Preconditions.assert_class('
|
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/
|
291
|
-
r.map { |x| ::Io::Flow::Catalog::V0::Models::
|
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
|
295
|
-
def get(organization,
|
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('
|
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/
|
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
|
312
|
-
def get_by_id(organization,
|
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('
|
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/
|
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
|
321
|
-
def post(organization,
|
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('
|
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/
|
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
|
330
|
-
def put_by_id(organization,
|
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('
|
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/
|
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
|
340
|
-
def delete_by_id(organization,
|
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('
|
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/
|
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
|
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], '
|
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::
|
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
|
-
|
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
|
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], '
|
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::
|
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
|
-
|
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
|
788
|
-
class
|
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], '
|
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
|
-
|
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
|
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
|
-
|
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
|
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
|
-
|
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
|
874
|
+
class SubcatalogVersion
|
865
875
|
|
866
|
-
attr_reader :id, :timestamp, :type, :
|
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, :
|
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
|
-
@
|
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
|
-
|
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
|
-
:
|
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.
|
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.
|
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
|
+
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-
|
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.
|