flowcommerce 0.0.48 → 0.0.49
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 +4 -4
- data/lib/flow_commerce/flow_api_v0_client.rb +67 -14
- 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: 99dc60b7d32fbf5edc2fcc66563f0f5ffb80d78b
|
4
|
+
data.tar.gz: 334d8af5445b2e12fa5fd24f3ea38d6de37c1170
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c07538854204407c6e709a21044d5a2c6340fbf0fe897b1424c014c8fcfc4c626ee69c1b4e8ea2d5e80ae41f1e4c641a6cf0658907181bd442f961689e946420
|
7
|
+
data.tar.gz: d44bd28de7efb37fd33e455dad93bf2bc985c8ddfc4605eeabfcf237d1c5085f0b6bfaf8f5e993e3f11ccdef3e21c1afe58f644b4cdad80411c6b0773c7a2fb1
|
@@ -1,6 +1,6 @@
|
|
1
1
|
# Generated by apidoc - http://www.apidoc.me
|
2
2
|
# Service version: 0.1.32
|
3
|
-
# apidoc:0.11.
|
3
|
+
# apidoc:0.11.37 http://www.apidoc.me/flow/api/0.1.42/ruby_client
|
4
4
|
|
5
5
|
require 'cgi'
|
6
6
|
require 'net/http'
|
@@ -25,7 +25,7 @@ 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.
|
28
|
+
USER_AGENT = 'apidoc:0.11.37 http://www.apidoc.me/flow/api/0.1.42/ruby_client' unless defined?(Constants::USER_AGENT)
|
29
29
|
VERSION = '0.1.32' unless defined?(Constants::VERSION)
|
30
30
|
VERSION_MAJOR = 0 unless defined?(VERSION_MAJOR)
|
31
31
|
|
@@ -2890,8 +2890,6 @@ module Io
|
|
2890
2890
|
opts = HttpClient::Helper.symbolize_keys(incoming)
|
2891
2891
|
query = {
|
2892
2892
|
:q => (x = opts.delete(:q); x.nil? ? nil : HttpClient::Preconditions.assert_class('q', x, String)),
|
2893
|
-
:experience => (x = opts.delete(:experience); x.nil? ? nil : HttpClient::Preconditions.assert_class('experience', x, String)),
|
2894
|
-
:attributes => (x = opts.delete(:attributes); x.nil? ? nil : HttpClient::Preconditions.assert_class('attributes', x, Array).map { |v| HttpClient::Preconditions.assert_class('attributes', v, String) }),
|
2895
2893
|
:limit => HttpClient::Preconditions.assert_class('limit', (x = opts.delete(:limit); x.nil? ? 25 : x), Integer),
|
2896
2894
|
:offset => HttpClient::Preconditions.assert_class('offset', (x = opts.delete(:offset); x.nil? ? 0 : x), Integer),
|
2897
2895
|
:sort => HttpClient::Preconditions.assert_class('sort', (x = opts.delete(:sort); x.nil? ? "name" : x), String)
|
@@ -2906,7 +2904,6 @@ module Io
|
|
2906
2904
|
opts = HttpClient::Helper.symbolize_keys(incoming)
|
2907
2905
|
query = {
|
2908
2906
|
:q => (x = opts.delete(:q); x.nil? ? nil : HttpClient::Preconditions.assert_class('q', x, String)),
|
2909
|
-
:destination => (x = opts.delete(:destination); x.nil? ? nil : HttpClient::Preconditions.assert_class('destination', x, String)),
|
2910
2907
|
:limit => HttpClient::Preconditions.assert_class('limit', (x = opts.delete(:limit); x.nil? ? 25 : x), Integer),
|
2911
2908
|
:offset => HttpClient::Preconditions.assert_class('offset', (x = opts.delete(:offset); x.nil? ? 0 : x), Integer),
|
2912
2909
|
:sort => HttpClient::Preconditions.assert_class('sort', (x = opts.delete(:sort); x.nil? ? "-created_at" : x), String)
|
@@ -4305,6 +4302,50 @@ module Io
|
|
4305
4302
|
|
4306
4303
|
end
|
4307
4304
|
|
4305
|
+
class CaptureDeclineCode
|
4306
|
+
|
4307
|
+
attr_reader :value
|
4308
|
+
|
4309
|
+
def initialize(value)
|
4310
|
+
@value = HttpClient::Preconditions.assert_class('value', value, String)
|
4311
|
+
end
|
4312
|
+
|
4313
|
+
# Returns the instance of CaptureDeclineCode for this value, creating a new instance for an unknown value
|
4314
|
+
def CaptureDeclineCode.apply(value)
|
4315
|
+
if value.instance_of?(CaptureDeclineCode)
|
4316
|
+
value
|
4317
|
+
else
|
4318
|
+
HttpClient::Preconditions.assert_class_or_nil('value', value, String)
|
4319
|
+
value.nil? ? nil : (from_string(value) || CaptureDeclineCode.new(value))
|
4320
|
+
end
|
4321
|
+
end
|
4322
|
+
|
4323
|
+
# Returns the instance of CaptureDeclineCode for this value, or nil if not found
|
4324
|
+
def CaptureDeclineCode.from_string(value)
|
4325
|
+
HttpClient::Preconditions.assert_class('value', value, String)
|
4326
|
+
CaptureDeclineCode.ALL.find { |v| v.value == value }
|
4327
|
+
end
|
4328
|
+
|
4329
|
+
def CaptureDeclineCode.ALL
|
4330
|
+
@@all ||= [CaptureDeclineCode.expired, CaptureDeclineCode.unknown]
|
4331
|
+
end
|
4332
|
+
|
4333
|
+
# Payment authorization has expired
|
4334
|
+
def CaptureDeclineCode.expired
|
4335
|
+
@@_expired ||= CaptureDeclineCode.new('expired')
|
4336
|
+
end
|
4337
|
+
|
4338
|
+
# Failed due to another reason (details not known)
|
4339
|
+
def CaptureDeclineCode.unknown
|
4340
|
+
@@_unknown ||= CaptureDeclineCode.new('unknown')
|
4341
|
+
end
|
4342
|
+
|
4343
|
+
def to_hash
|
4344
|
+
value
|
4345
|
+
end
|
4346
|
+
|
4347
|
+
end
|
4348
|
+
|
4308
4349
|
class CardType
|
4309
4350
|
|
4310
4351
|
attr_reader :value
|
@@ -10442,15 +10483,17 @@ module Io
|
|
10442
10483
|
|
10443
10484
|
class ItemMarginDeleted < Event
|
10444
10485
|
|
10445
|
-
attr_reader :event_id, :timestamp, :item_margin_id
|
10486
|
+
attr_reader :event_id, :timestamp, :item_margin_id, :organization_id, :experience_key
|
10446
10487
|
|
10447
10488
|
def initialize(incoming={})
|
10448
10489
|
super(:name => Event::Types::ITEM_MARGIN_DELETED)
|
10449
10490
|
opts = HttpClient::Helper.symbolize_keys(incoming)
|
10450
|
-
HttpClient::Preconditions.require_keys(opts, [:event_id, :timestamp, :item_margin_id], 'ItemMarginDeleted')
|
10491
|
+
HttpClient::Preconditions.require_keys(opts, [:event_id, :timestamp, :item_margin_id, :organization_id, :experience_key], 'ItemMarginDeleted')
|
10451
10492
|
@event_id = HttpClient::Preconditions.assert_class('event_id', opts.delete(:event_id), String)
|
10452
10493
|
@timestamp = HttpClient::Preconditions.assert_class('timestamp', HttpClient::Helper.to_date_time_iso8601(opts.delete(:timestamp)), DateTime)
|
10453
10494
|
@item_margin_id = HttpClient::Preconditions.assert_class('item_margin_id', opts.delete(:item_margin_id), String)
|
10495
|
+
@organization_id = HttpClient::Preconditions.assert_class('organization_id', opts.delete(:organization_id), String)
|
10496
|
+
@experience_key = HttpClient::Preconditions.assert_class('experience_key', opts.delete(:experience_key), String)
|
10454
10497
|
end
|
10455
10498
|
|
10456
10499
|
def to_json
|
@@ -10465,7 +10508,9 @@ module Io
|
|
10465
10508
|
{
|
10466
10509
|
:event_id => event_id,
|
10467
10510
|
:timestamp => timestamp,
|
10468
|
-
:item_margin_id => item_margin_id
|
10511
|
+
:item_margin_id => item_margin_id,
|
10512
|
+
:organization_id => organization_id,
|
10513
|
+
:experience_key => experience_key
|
10469
10514
|
}
|
10470
10515
|
end
|
10471
10516
|
|
@@ -11022,12 +11067,15 @@ module Io
|
|
11022
11067
|
|
11023
11068
|
class Local
|
11024
11069
|
|
11025
|
-
attr_reader :prices
|
11070
|
+
attr_reader :experience, :prices, :rates, :spot_rates
|
11026
11071
|
|
11027
11072
|
def initialize(incoming={})
|
11028
11073
|
opts = HttpClient::Helper.symbolize_keys(incoming)
|
11029
|
-
HttpClient::Preconditions.require_keys(opts, [:prices], 'Local')
|
11074
|
+
HttpClient::Preconditions.require_keys(opts, [:experience, :prices, :rates, :spot_rates], 'Local')
|
11075
|
+
@experience = (x = opts.delete(:experience); x.is_a?(::Io::Flow::V0::Models::ExperienceSummary) ? x : ::Io::Flow::V0::Models::ExperienceSummary.new(x))
|
11030
11076
|
@prices = HttpClient::Preconditions.assert_class('prices', opts.delete(:prices), Array).map { |v| (x = v; x.is_a?(::Io::Flow::V0::Models::LocalizedPrice) ? x : ::Io::Flow::V0::Models::LocalizedPrice.new(x)) }
|
11077
|
+
@rates = HttpClient::Preconditions.assert_class('rates', opts.delete(:rates), Array).map { |v| (x = v; x.is_a?(::Io::Flow::V0::Models::Rate) ? x : ::Io::Flow::V0::Models::Rate.new(x)) }
|
11078
|
+
@spot_rates = HttpClient::Preconditions.assert_class('spot_rates', opts.delete(:spot_rates), Array).map { |v| (x = v; x.is_a?(::Io::Flow::V0::Models::SpotRate) ? x : ::Io::Flow::V0::Models::SpotRate.new(x)) }
|
11031
11079
|
end
|
11032
11080
|
|
11033
11081
|
def to_json
|
@@ -11040,7 +11088,10 @@ module Io
|
|
11040
11088
|
|
11041
11089
|
def to_hash
|
11042
11090
|
{
|
11043
|
-
:
|
11091
|
+
:experience => experience.to_hash,
|
11092
|
+
:prices => prices.map { |o| o.to_hash },
|
11093
|
+
:rates => rates.map { |o| o.to_hash },
|
11094
|
+
:spot_rates => spot_rates.map { |o| o.to_hash }
|
11044
11095
|
}
|
11045
11096
|
end
|
11046
11097
|
|
@@ -11175,15 +11226,16 @@ module Io
|
|
11175
11226
|
|
11176
11227
|
class LocalizedPrice
|
11177
11228
|
|
11178
|
-
attr_reader :key, :currency, :amount, :label
|
11229
|
+
attr_reader :key, :currency, :amount, :label, :base
|
11179
11230
|
|
11180
11231
|
def initialize(incoming={})
|
11181
11232
|
opts = HttpClient::Helper.symbolize_keys(incoming)
|
11182
|
-
HttpClient::Preconditions.require_keys(opts, [:key, :currency, :amount, :label], 'LocalizedPrice')
|
11233
|
+
HttpClient::Preconditions.require_keys(opts, [:key, :currency, :amount, :label, :base], 'LocalizedPrice')
|
11183
11234
|
@key = (x = opts.delete(:key); x.is_a?(::Io::Flow::V0::Models::LocalizedPriceKey) ? x : ::Io::Flow::V0::Models::LocalizedPriceKey.apply(x))
|
11184
11235
|
@currency = HttpClient::Preconditions.assert_class('currency', opts.delete(:currency), String)
|
11185
11236
|
@amount = HttpClient::Preconditions.assert_class('amount', opts.delete(:amount), Numeric)
|
11186
11237
|
@label = HttpClient::Preconditions.assert_class('label', opts.delete(:label), String)
|
11238
|
+
@base = (x = opts.delete(:base); x.is_a?(::Io::Flow::V0::Models::Price) ? x : ::Io::Flow::V0::Models::Price.new(x))
|
11187
11239
|
end
|
11188
11240
|
|
11189
11241
|
def to_json
|
@@ -11199,7 +11251,8 @@ module Io
|
|
11199
11251
|
:key => key.value,
|
11200
11252
|
:currency => currency,
|
11201
11253
|
:amount => amount,
|
11202
|
-
:label => label
|
11254
|
+
:label => label,
|
11255
|
+
:base => base.to_hash
|
11203
11256
|
}
|
11204
11257
|
end
|
11205
11258
|
|
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.49
|
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-09-
|
11
|
+
date: 2016-09-08 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: json
|