flowcommerce 0.2.24 → 0.2.25
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/flow_commerce/flow_api_v0_client.rb +139 -6
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 86878e9228dab4f6d62a786348baf070da5b79b0
|
4
|
+
data.tar.gz: 218f41b7e813f6bf35728b0f3081c1521809af3b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0c829182294efc9da9aff094aeecd7d2392f48f62be3b703e6069b91f071e310020ead6ff8c74cd5ea8b6390182ca6c72d306894e7b6f4ba93e1499d4df410ac
|
7
|
+
data.tar.gz: 17e6035f048e76439e0ff4fb879ec2171c21dc93f3b27981ad41661b44131303ed8f8881b7dc11786106d507dfbc30f1ddade4e8433b4950e7938139e63bd640
|
@@ -1,6 +1,6 @@
|
|
1
1
|
# Generated by API Builder - https://www.apibuilder.io
|
2
|
-
# Service version: 0.3.
|
3
|
-
# apibuilder:0.12.52 https://app.apibuilder.io/flow/api/0.3.
|
2
|
+
# Service version: 0.3.64
|
3
|
+
# apibuilder:0.12.52 https://app.apibuilder.io/flow/api/0.3.64/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 = 'apibuilder:0.12.52 https://app.apibuilder.io/flow/api/0.3.
|
29
|
-
VERSION = '0.3.
|
28
|
+
USER_AGENT = 'apibuilder:0.12.52 https://app.apibuilder.io/flow/api/0.3.64/ruby_client' unless defined?(Constants::USER_AGENT)
|
29
|
+
VERSION = '0.3.64' unless defined?(Constants::VERSION)
|
30
30
|
VERSION_MAJOR = 0 unless defined?(VERSION_MAJOR)
|
31
31
|
|
32
32
|
end
|
@@ -1299,6 +1299,37 @@ module Io
|
|
1299
1299
|
r.map { |x| ::Io::Flow::V0::Models::Currency.new(x) }
|
1300
1300
|
end
|
1301
1301
|
|
1302
|
+
# Returns the region settings associated to a specific organization.
|
1303
|
+
def get_settings_and_regions_by_organization_id(organization_id)
|
1304
|
+
HttpClient::Preconditions.assert_class('organization_id', organization_id, String)
|
1305
|
+
r = @client.request("/organizations/#{CGI.escape(organization_id)}/settings/regions").get
|
1306
|
+
r.map { |x| ::Io::Flow::V0::Models::RegionSetting.new(x) }
|
1307
|
+
end
|
1308
|
+
|
1309
|
+
# Updates or creates a region setting for a specific organization
|
1310
|
+
def put_settings_and_regions_by_organization_id(organization_id, region_setting_form)
|
1311
|
+
HttpClient::Preconditions.assert_class('organization_id', organization_id, String)
|
1312
|
+
(x = region_setting_form; x.is_a?(::Io::Flow::V0::Models::RegionSettingForm) ? x : ::Io::Flow::V0::Models::RegionSettingForm.new(x))
|
1313
|
+
r = @client.request("/organizations/#{CGI.escape(organization_id)}/settings/regions").with_json(region_setting_form.to_json).put
|
1314
|
+
::Io::Flow::V0::Models::RegionSetting.new(r)
|
1315
|
+
end
|
1316
|
+
|
1317
|
+
# Removes the setting for this region for a specific organization
|
1318
|
+
def delete_settings_and_regions_by_organization_id_and_id(organization_id, id)
|
1319
|
+
HttpClient::Preconditions.assert_class('organization_id', organization_id, String)
|
1320
|
+
HttpClient::Preconditions.assert_class('id', id, String)
|
1321
|
+
r = @client.request("/organizations/#{CGI.escape(organization_id)}/settings/regions/#{CGI.escape(id)}").delete
|
1322
|
+
nil
|
1323
|
+
end
|
1324
|
+
|
1325
|
+
# Returns the list of enabled countries based on the region settings for a
|
1326
|
+
# specific organization
|
1327
|
+
def get_settings_and_regions_and_countries_and_available_by_organization_id(organization_id)
|
1328
|
+
HttpClient::Preconditions.assert_class('organization_id', organization_id, String)
|
1329
|
+
r = @client.request("/organizations/#{CGI.escape(organization_id)}/settings/regions/countries/available").get
|
1330
|
+
r.map { |x| ::Io::Flow::V0::Models::Country.new(x) }
|
1331
|
+
end
|
1332
|
+
|
1302
1333
|
# Provides visibility into recent changes of each object, including deletion
|
1303
1334
|
def get_versions(incoming={})
|
1304
1335
|
opts = HttpClient::Helper.symbolize_keys(incoming)
|
@@ -7259,6 +7290,48 @@ module Io
|
|
7259
7290
|
|
7260
7291
|
end
|
7261
7292
|
|
7293
|
+
class AvailabilityStatus
|
7294
|
+
|
7295
|
+
attr_reader :value
|
7296
|
+
|
7297
|
+
def initialize(value)
|
7298
|
+
@value = HttpClient::Preconditions.assert_class('value', value, String)
|
7299
|
+
end
|
7300
|
+
|
7301
|
+
# Returns the instance of AvailabilityStatus for this value, creating a new instance for an unknown value
|
7302
|
+
def AvailabilityStatus.apply(value)
|
7303
|
+
if value.instance_of?(AvailabilityStatus)
|
7304
|
+
value
|
7305
|
+
else
|
7306
|
+
HttpClient::Preconditions.assert_class_or_nil('value', value, String)
|
7307
|
+
value.nil? ? nil : (from_string(value) || AvailabilityStatus.new(value))
|
7308
|
+
end
|
7309
|
+
end
|
7310
|
+
|
7311
|
+
# Returns the instance of AvailabilityStatus for this value, or nil if not found
|
7312
|
+
def AvailabilityStatus.from_string(value)
|
7313
|
+
HttpClient::Preconditions.assert_class('value', value, String)
|
7314
|
+
AvailabilityStatus.ALL.find { |v| v.value == value }
|
7315
|
+
end
|
7316
|
+
|
7317
|
+
def AvailabilityStatus.ALL
|
7318
|
+
@@all ||= [AvailabilityStatus.enabled, AvailabilityStatus.disabled]
|
7319
|
+
end
|
7320
|
+
|
7321
|
+
def AvailabilityStatus.enabled
|
7322
|
+
@@_enabled ||= AvailabilityStatus.new('enabled')
|
7323
|
+
end
|
7324
|
+
|
7325
|
+
def AvailabilityStatus.disabled
|
7326
|
+
@@_disabled ||= AvailabilityStatus.new('disabled')
|
7327
|
+
end
|
7328
|
+
|
7329
|
+
def to_hash
|
7330
|
+
value
|
7331
|
+
end
|
7332
|
+
|
7333
|
+
end
|
7334
|
+
|
7262
7335
|
class AvsCode
|
7263
7336
|
|
7264
7337
|
attr_reader :value
|
@@ -24298,6 +24371,64 @@ module Io
|
|
24298
24371
|
|
24299
24372
|
end
|
24300
24373
|
|
24374
|
+
class RegionSetting
|
24375
|
+
|
24376
|
+
attr_reader :id, :region, :status
|
24377
|
+
|
24378
|
+
def initialize(incoming={})
|
24379
|
+
opts = HttpClient::Helper.symbolize_keys(incoming)
|
24380
|
+
HttpClient::Preconditions.require_keys(opts, [:id, :region, :status], 'RegionSetting')
|
24381
|
+
@id = HttpClient::Preconditions.assert_class('id', opts.delete(:id), String)
|
24382
|
+
@region = (x = opts.delete(:region); x.is_a?(::Io::Flow::V0::Models::Region) ? x : ::Io::Flow::V0::Models::Region.new(x))
|
24383
|
+
@status = (x = opts.delete(:status); x.is_a?(::Io::Flow::V0::Models::AvailabilityStatus) ? x : ::Io::Flow::V0::Models::AvailabilityStatus.apply(x))
|
24384
|
+
end
|
24385
|
+
|
24386
|
+
def to_json
|
24387
|
+
JSON.dump(to_hash)
|
24388
|
+
end
|
24389
|
+
|
24390
|
+
def copy(incoming={})
|
24391
|
+
RegionSetting.new(to_hash.merge(HttpClient::Helper.symbolize_keys(incoming)))
|
24392
|
+
end
|
24393
|
+
|
24394
|
+
def to_hash
|
24395
|
+
{
|
24396
|
+
:id => id,
|
24397
|
+
:region => region.to_hash,
|
24398
|
+
:status => status.value
|
24399
|
+
}
|
24400
|
+
end
|
24401
|
+
|
24402
|
+
end
|
24403
|
+
|
24404
|
+
class RegionSettingForm
|
24405
|
+
|
24406
|
+
attr_reader :region_id, :status
|
24407
|
+
|
24408
|
+
def initialize(incoming={})
|
24409
|
+
opts = HttpClient::Helper.symbolize_keys(incoming)
|
24410
|
+
HttpClient::Preconditions.require_keys(opts, [:region_id, :status], 'RegionSettingForm')
|
24411
|
+
@region_id = HttpClient::Preconditions.assert_class('region_id', opts.delete(:region_id), String)
|
24412
|
+
@status = (x = opts.delete(:status); x.is_a?(::Io::Flow::V0::Models::AvailabilityStatus) ? x : ::Io::Flow::V0::Models::AvailabilityStatus.apply(x))
|
24413
|
+
end
|
24414
|
+
|
24415
|
+
def to_json
|
24416
|
+
JSON.dump(to_hash)
|
24417
|
+
end
|
24418
|
+
|
24419
|
+
def copy(incoming={})
|
24420
|
+
RegionSettingForm.new(to_hash.merge(HttpClient::Helper.symbolize_keys(incoming)))
|
24421
|
+
end
|
24422
|
+
|
24423
|
+
def to_hash
|
24424
|
+
{
|
24425
|
+
:region_id => region_id,
|
24426
|
+
:status => status.value
|
24427
|
+
}
|
24428
|
+
end
|
24429
|
+
|
24430
|
+
end
|
24431
|
+
|
24301
24432
|
class Return
|
24302
24433
|
|
24303
24434
|
attr_reader :id, :key, :items, :labels
|
@@ -27076,15 +27207,16 @@ module Io
|
|
27076
27207
|
# tracking number
|
27077
27208
|
class Tracking
|
27078
27209
|
|
27079
|
-
attr_reader :id, :labels, :status, :attributes, :window, :order_number
|
27210
|
+
attr_reader :id, :labels, :status, :attributes, :url, :window, :order_number
|
27080
27211
|
|
27081
27212
|
def initialize(incoming={})
|
27082
27213
|
opts = HttpClient::Helper.symbolize_keys(incoming)
|
27083
|
-
HttpClient::Preconditions.require_keys(opts, [:id, :labels, :status, :attributes], 'Tracking')
|
27214
|
+
HttpClient::Preconditions.require_keys(opts, [:id, :labels, :status, :attributes, :url], 'Tracking')
|
27084
27215
|
@id = HttpClient::Preconditions.assert_class('id', opts.delete(:id), String)
|
27085
27216
|
@labels = HttpClient::Preconditions.assert_class('labels', opts.delete(:labels), Array).map { |v| (x = v; x.is_a?(::Io::Flow::V0::Models::TrackingLabel) ? x : ::Io::Flow::V0::Models::TrackingLabel.new(x)) }
|
27086
27217
|
@status = (x = opts.delete(:status); x.is_a?(::Io::Flow::V0::Models::TrackingStatus) ? x : ::Io::Flow::V0::Models::TrackingStatus.apply(x))
|
27087
27218
|
@attributes = HttpClient::Preconditions.assert_class('attributes', opts.delete(:attributes), Hash).inject({}) { |h, d| h[d[0]] = HttpClient::Preconditions.assert_class('attributes', d[1], String); h }
|
27219
|
+
@url = HttpClient::Preconditions.assert_class('url', opts.delete(:url), String)
|
27088
27220
|
@window = (x = opts.delete(:window); x.nil? ? nil : (x = x; x.is_a?(::Io::Flow::V0::Models::DatetimeRange) ? x : ::Io::Flow::V0::Models::DatetimeRange.new(x)))
|
27089
27221
|
@order_number = (x = opts.delete(:order_number); x.nil? ? nil : HttpClient::Preconditions.assert_class('order_number', x, String))
|
27090
27222
|
end
|
@@ -27103,6 +27235,7 @@ module Io
|
|
27103
27235
|
:labels => labels.map { |o| o.to_hash },
|
27104
27236
|
:status => status.value,
|
27105
27237
|
:attributes => attributes,
|
27238
|
+
:url => url,
|
27106
27239
|
:window => window.nil? ? nil : window.to_hash,
|
27107
27240
|
:order_number => order_number
|
27108
27241
|
}
|
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.2.
|
4
|
+
version: 0.2.25
|
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: 2017-08-
|
11
|
+
date: 2017-08-04 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: json
|