flowcommerce 0.1.18 → 0.1.19
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/README.md +8 -0
- data/lib/flow_commerce/flow_api_v0_client.rb +265 -19
- 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: 877260b01961a7094c950e02cdca2909139abd7c
|
4
|
+
data.tar.gz: acd7305fc771d64b5152e954bf79148c57d3c006
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 26e3745ccb255d0036ea904cb6710be8c1d7f1694689e0c0f9202f89bc7aac438e3974eebaae42e1634d9f425078344d5f6cc90c1275fa66f890ad74478e9d24
|
7
|
+
data.tar.gz: b65738a6a3aa62e3e5d7ae00b8c8288cc5d255a3b157e52140d594d20f753383cfeb558de4f735dbe8ee3453f504daed379d5e285fcc6f7b8e140aaa2b91f92c
|
data/README.md
CHANGED
@@ -39,10 +39,18 @@ Complete API documentation is available at https://docs.flow.io
|
|
39
39
|
|
40
40
|
## Debugging / Issues
|
41
41
|
|
42
|
+
### IPv6
|
43
|
+
|
44
|
+
Please disable IPv6. We are currently working on IPv6 compatibility for the APIs.
|
45
|
+
|
46
|
+
#### Mac OS
|
47
|
+
|
42
48
|
If you are seeing very slow (multi-second response times), it might be this: [Net::HTTP extremely slow responses for HTTPS requests](http://stackoverflow.com/questions/29945204/nethttp-extremely-slow-responses-for-https-requests)
|
43
49
|
|
44
50
|
The solution is to run
|
45
51
|
|
46
52
|
```networksetup -setv6off Wi-Fi```
|
47
53
|
|
54
|
+
#### Ububtu
|
48
55
|
|
56
|
+
[https://support.purevpn.com/how-to-disable-ipv6-linuxubuntu](https://support.purevpn.com/how-to-disable-ipv6-linuxubuntu)
|
@@ -1,6 +1,6 @@
|
|
1
1
|
# Generated by apidoc - http://www.apidoc.me
|
2
2
|
# Service version: 0.2.65
|
3
|
-
# apidoc:0.11.72 http://www.apidoc.me/flow/api/0.2.
|
3
|
+
# apidoc:0.11.72 http://www.apidoc.me/flow/api/0.2.74/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.72 http://www.apidoc.me/flow/api/0.2.
|
28
|
+
USER_AGENT = 'apidoc:0.11.72 http://www.apidoc.me/flow/api/0.2.74/ruby_client' unless defined?(Constants::USER_AGENT)
|
29
29
|
VERSION = '0.2.65' unless defined?(Constants::VERSION)
|
30
30
|
VERSION_MAJOR = 0 unless defined?(VERSION_MAJOR)
|
31
31
|
|
@@ -1467,13 +1467,12 @@ module Io
|
|
1467
1467
|
query = {
|
1468
1468
|
:id => (x = opts.delete(:id); x.nil? ? nil : HttpClient::Preconditions.assert_class('id', x, Array).map { |v| HttpClient::Preconditions.assert_class('id', v, String) }),
|
1469
1469
|
:number => (x = opts.delete(:number); x.nil? ? nil : HttpClient::Preconditions.assert_class('number', x, Array).map { |v| HttpClient::Preconditions.assert_class('number', v, String) }),
|
1470
|
-
:status => (x = opts.delete(:status); x.nil? ? nil : HttpClient::Preconditions.assert_class('status', x, Array).map { |v| (x = v; x.is_a?(::Io::Flow::V0::Models::SubcatalogItemStatus) ? x : ::Io::Flow::V0::Models::SubcatalogItemStatus.apply(x)).value }),
|
1471
1470
|
:limit => HttpClient::Preconditions.assert_class('limit', (x = opts.delete(:limit); x.nil? ? 25 : x), Integer),
|
1472
1471
|
:offset => HttpClient::Preconditions.assert_class('offset', (x = opts.delete(:offset); x.nil? ? 0 : x), Integer),
|
1473
1472
|
:sort => HttpClient::Preconditions.assert_class('sort', (x = opts.delete(:sort); x.nil? ? "journal_timestamp" : x), String)
|
1474
1473
|
}.delete_if { |k, v| v.nil? }
|
1475
1474
|
r = @client.request("/#{CGI.escape(organization)}/catalog/subcatalogs/#{CGI.escape(subcatalog_id)}/items/versions").with_query(query).get
|
1476
|
-
r.map { |x| ::Io::Flow::V0::Models::
|
1475
|
+
r.map { |x| ::Io::Flow::V0::Models::SubcatalogItemVersion.new(x) }
|
1477
1476
|
end
|
1478
1477
|
|
1479
1478
|
end
|
@@ -5076,6 +5075,72 @@ module Io
|
|
5076
5075
|
|
5077
5076
|
end
|
5078
5077
|
|
5078
|
+
class TierRuleOutcomeForm
|
5079
|
+
|
5080
|
+
module Types
|
5081
|
+
AMOUNT_MARGIN_FORM = 'amount_margin_form' unless defined?(AMOUNT_MARGIN_FORM)
|
5082
|
+
FLAT_RATE_FORM = 'flat_rate_form' unless defined?(FLAT_RATE_FORM)
|
5083
|
+
AT_COST = 'at_cost' unless defined?(AT_COST)
|
5084
|
+
PERCENT_MARGIN = 'percent_margin' unless defined?(PERCENT_MARGIN)
|
5085
|
+
end
|
5086
|
+
|
5087
|
+
attr_reader :discriminator
|
5088
|
+
|
5089
|
+
def initialize(incoming={})
|
5090
|
+
opts = HttpClient::Helper.symbolize_keys(incoming)
|
5091
|
+
HttpClient::Preconditions.require_keys(opts, [:discriminator], 'TierRuleOutcomeForm')
|
5092
|
+
@discriminator = HttpClient::Preconditions.assert_class('discriminator', opts.delete(:discriminator), String)
|
5093
|
+
end
|
5094
|
+
|
5095
|
+
def subtype_to_hash
|
5096
|
+
raise 'Cannot serialize an instance of tier_rule_outcome_form directly - must use one of the specific types: amount_margin_form, flat_rate_form, at_cost, percent_margin'
|
5097
|
+
end
|
5098
|
+
|
5099
|
+
def to_hash
|
5100
|
+
subtype_to_hash.merge(:discriminator => @discriminator)
|
5101
|
+
end
|
5102
|
+
|
5103
|
+
def TierRuleOutcomeForm.from_json(hash)
|
5104
|
+
HttpClient::Preconditions.assert_class('hash', hash, Hash)
|
5105
|
+
discriminator = HttpClient::Helper.symbolize_keys(hash)[:discriminator].to_s.strip
|
5106
|
+
if discriminator.empty?
|
5107
|
+
raise "Union type[tier_rule_outcome_form] requires a field named 'discriminator'"
|
5108
|
+
end
|
5109
|
+
case discriminator
|
5110
|
+
when Types::AMOUNT_MARGIN_FORM; AmountMarginForm.new(hash)
|
5111
|
+
when Types::FLAT_RATE_FORM; FlatRateForm.new(hash)
|
5112
|
+
when Types::AT_COST; AtCost.new(hash)
|
5113
|
+
when Types::PERCENT_MARGIN; PercentMargin.new(hash)
|
5114
|
+
else TierRuleOutcomeFormUndefinedType.new(:discriminator => discriminator)
|
5115
|
+
end
|
5116
|
+
end
|
5117
|
+
|
5118
|
+
end
|
5119
|
+
|
5120
|
+
class TierRuleOutcomeFormUndefinedType < TierRuleOutcomeForm
|
5121
|
+
|
5122
|
+
attr_reader :name
|
5123
|
+
|
5124
|
+
def initialize(incoming={})
|
5125
|
+
super(:discriminator => 'undefined_type')
|
5126
|
+
opts = HttpClient::Helper.symbolize_keys(incoming)
|
5127
|
+
@name = HttpClient::Preconditions.assert_class('name', opts.delete(:discriminator), String)
|
5128
|
+
end
|
5129
|
+
|
5130
|
+
def subtype_to_hash
|
5131
|
+
raise 'Unable to serialize undefined type to json'
|
5132
|
+
end
|
5133
|
+
|
5134
|
+
def copy(incoming={})
|
5135
|
+
raise 'Operation not supported for undefined type'
|
5136
|
+
end
|
5137
|
+
|
5138
|
+
def to_hash
|
5139
|
+
raise 'Operation not supported for undefined type'
|
5140
|
+
end
|
5141
|
+
|
5142
|
+
end
|
5143
|
+
|
5079
5144
|
class Token
|
5080
5145
|
|
5081
5146
|
module Types
|
@@ -5308,6 +5373,91 @@ module Io
|
|
5308
5373
|
|
5309
5374
|
end
|
5310
5375
|
|
5376
|
+
class AttributeDataType
|
5377
|
+
|
5378
|
+
attr_reader :value
|
5379
|
+
|
5380
|
+
def initialize(value)
|
5381
|
+
@value = HttpClient::Preconditions.assert_class('value', value, String)
|
5382
|
+
end
|
5383
|
+
|
5384
|
+
# Returns the instance of AttributeDataType for this value, creating a new instance for an unknown value
|
5385
|
+
def AttributeDataType.apply(value)
|
5386
|
+
if value.instance_of?(AttributeDataType)
|
5387
|
+
value
|
5388
|
+
else
|
5389
|
+
HttpClient::Preconditions.assert_class_or_nil('value', value, String)
|
5390
|
+
value.nil? ? nil : (from_string(value) || AttributeDataType.new(value))
|
5391
|
+
end
|
5392
|
+
end
|
5393
|
+
|
5394
|
+
# Returns the instance of AttributeDataType for this value, or nil if not found
|
5395
|
+
def AttributeDataType.from_string(value)
|
5396
|
+
HttpClient::Preconditions.assert_class('value', value, String)
|
5397
|
+
AttributeDataType.ALL.find { |v| v.value == value }
|
5398
|
+
end
|
5399
|
+
|
5400
|
+
def AttributeDataType.ALL
|
5401
|
+
@@all ||= [AttributeDataType.decimal, AttributeDataType.string]
|
5402
|
+
end
|
5403
|
+
|
5404
|
+
# Decimal datatype without size or precision restrictions. Commonly used for
|
5405
|
+
# currency values.
|
5406
|
+
def AttributeDataType.decimal
|
5407
|
+
@@_decimal ||= AttributeDataType.new('decimal')
|
5408
|
+
end
|
5409
|
+
|
5410
|
+
# Unvalidated string of characters.
|
5411
|
+
def AttributeDataType.string
|
5412
|
+
@@_string ||= AttributeDataType.new('string')
|
5413
|
+
end
|
5414
|
+
|
5415
|
+
def to_hash
|
5416
|
+
value
|
5417
|
+
end
|
5418
|
+
|
5419
|
+
end
|
5420
|
+
|
5421
|
+
class AttributeIntent
|
5422
|
+
|
5423
|
+
attr_reader :value
|
5424
|
+
|
5425
|
+
def initialize(value)
|
5426
|
+
@value = HttpClient::Preconditions.assert_class('value', value, String)
|
5427
|
+
end
|
5428
|
+
|
5429
|
+
# Returns the instance of AttributeIntent for this value, creating a new instance for an unknown value
|
5430
|
+
def AttributeIntent.apply(value)
|
5431
|
+
if value.instance_of?(AttributeIntent)
|
5432
|
+
value
|
5433
|
+
else
|
5434
|
+
HttpClient::Preconditions.assert_class_or_nil('value', value, String)
|
5435
|
+
value.nil? ? nil : (from_string(value) || AttributeIntent.new(value))
|
5436
|
+
end
|
5437
|
+
end
|
5438
|
+
|
5439
|
+
# Returns the instance of AttributeIntent for this value, or nil if not found
|
5440
|
+
def AttributeIntent.from_string(value)
|
5441
|
+
HttpClient::Preconditions.assert_class('value', value, String)
|
5442
|
+
AttributeIntent.ALL.find { |v| v.value == value }
|
5443
|
+
end
|
5444
|
+
|
5445
|
+
def AttributeIntent.ALL
|
5446
|
+
@@all ||= [AttributeIntent.price]
|
5447
|
+
end
|
5448
|
+
|
5449
|
+
# Attributes with this data type are inferred to be prices in the organization's
|
5450
|
+
# base currency and will be localized based on each Experience's pricing policy.
|
5451
|
+
def AttributeIntent.price
|
5452
|
+
@@_price ||= AttributeIntent.new('price')
|
5453
|
+
end
|
5454
|
+
|
5455
|
+
def to_hash
|
5456
|
+
value
|
5457
|
+
end
|
5458
|
+
|
5459
|
+
end
|
5460
|
+
|
5311
5461
|
class AuthorizationDeclineCode
|
5312
5462
|
|
5313
5463
|
attr_reader :value
|
@@ -8921,13 +9071,13 @@ module Io
|
|
8921
9071
|
# margin price
|
8922
9072
|
class AmountMargin < TierRuleOutcome
|
8923
9073
|
|
8924
|
-
attr_reader :
|
9074
|
+
attr_reader :margin
|
8925
9075
|
|
8926
9076
|
def initialize(incoming={})
|
8927
9077
|
super(:discriminator => TierRuleOutcome::Types::AMOUNT_MARGIN)
|
8928
9078
|
opts = HttpClient::Helper.symbolize_keys(incoming)
|
8929
|
-
HttpClient::Preconditions.require_keys(opts, [:
|
8930
|
-
@
|
9079
|
+
HttpClient::Preconditions.require_keys(opts, [:margin], 'AmountMargin')
|
9080
|
+
@margin = (x = opts.delete(:margin); x.is_a?(::Io::Flow::V0::Models::Price) ? x : ::Io::Flow::V0::Models::Price.new(x))
|
8931
9081
|
end
|
8932
9082
|
|
8933
9083
|
def to_json
|
@@ -8940,7 +9090,34 @@ module Io
|
|
8940
9090
|
|
8941
9091
|
def subtype_to_hash
|
8942
9092
|
{
|
8943
|
-
:
|
9093
|
+
:margin => margin.to_hash
|
9094
|
+
}
|
9095
|
+
end
|
9096
|
+
|
9097
|
+
end
|
9098
|
+
|
9099
|
+
class AmountMarginForm < TierRuleOutcomeForm
|
9100
|
+
|
9101
|
+
attr_reader :margin
|
9102
|
+
|
9103
|
+
def initialize(incoming={})
|
9104
|
+
super(:discriminator => TierRuleOutcomeForm::Types::AMOUNT_MARGIN_FORM)
|
9105
|
+
opts = HttpClient::Helper.symbolize_keys(incoming)
|
9106
|
+
HttpClient::Preconditions.require_keys(opts, [:margin], 'AmountMarginForm')
|
9107
|
+
@margin = (x = opts.delete(:margin); x.is_a?(::Io::Flow::V0::Models::Money) ? x : ::Io::Flow::V0::Models::Money.new(x))
|
9108
|
+
end
|
9109
|
+
|
9110
|
+
def to_json
|
9111
|
+
JSON.dump(to_hash)
|
9112
|
+
end
|
9113
|
+
|
9114
|
+
def copy(incoming={})
|
9115
|
+
AmountMarginForm.new(subtype_to_hash.merge(HttpClient::Helper.symbolize_keys(incoming)))
|
9116
|
+
end
|
9117
|
+
|
9118
|
+
def subtype_to_hash
|
9119
|
+
{
|
9120
|
+
:margin => margin.to_hash
|
8944
9121
|
}
|
8945
9122
|
end
|
8946
9123
|
|
@@ -8978,7 +9155,7 @@ module Io
|
|
8978
9155
|
# then be displayed throughout the Flow console.
|
8979
9156
|
class Attribute
|
8980
9157
|
|
8981
|
-
attr_reader :id, :key, :options, :label
|
9158
|
+
attr_reader :id, :key, :options, :label, :intent, :type
|
8982
9159
|
|
8983
9160
|
def initialize(incoming={})
|
8984
9161
|
opts = HttpClient::Helper.symbolize_keys(incoming)
|
@@ -8987,6 +9164,8 @@ module Io
|
|
8987
9164
|
@key = HttpClient::Preconditions.assert_class('key', opts.delete(:key), String)
|
8988
9165
|
@options = (x = opts.delete(:options); x.is_a?(::Io::Flow::V0::Models::Options) ? x : ::Io::Flow::V0::Models::Options.new(x))
|
8989
9166
|
@label = (x = opts.delete(:label); x.nil? ? nil : HttpClient::Preconditions.assert_class('label', x, String))
|
9167
|
+
@intent = (x = opts.delete(:intent); x.nil? ? nil : (x = x; x.is_a?(::Io::Flow::V0::Models::AttributeIntent) ? x : ::Io::Flow::V0::Models::AttributeIntent.apply(x)))
|
9168
|
+
@type = (x = opts.delete(:type); x.nil? ? nil : (x = x; x.is_a?(::Io::Flow::V0::Models::AttributeDataType) ? x : ::Io::Flow::V0::Models::AttributeDataType.apply(x)))
|
8990
9169
|
end
|
8991
9170
|
|
8992
9171
|
def to_json
|
@@ -9002,7 +9181,9 @@ module Io
|
|
9002
9181
|
:id => id,
|
9003
9182
|
:key => key,
|
9004
9183
|
:options => options.to_hash,
|
9005
|
-
:label => label
|
9184
|
+
:label => label,
|
9185
|
+
:intent => intent.nil? ? nil : intent.value,
|
9186
|
+
:type => type.nil? ? nil : type.value
|
9006
9187
|
}
|
9007
9188
|
end
|
9008
9189
|
|
@@ -9010,7 +9191,7 @@ module Io
|
|
9010
9191
|
|
9011
9192
|
class AttributeForm
|
9012
9193
|
|
9013
|
-
attr_reader :key, :options, :label
|
9194
|
+
attr_reader :key, :options, :label, :intent, :type
|
9014
9195
|
|
9015
9196
|
def initialize(incoming={})
|
9016
9197
|
opts = HttpClient::Helper.symbolize_keys(incoming)
|
@@ -9018,6 +9199,8 @@ module Io
|
|
9018
9199
|
@key = HttpClient::Preconditions.assert_class('key', opts.delete(:key), String)
|
9019
9200
|
@options = (x = opts.delete(:options); x.is_a?(::Io::Flow::V0::Models::Options) ? x : ::Io::Flow::V0::Models::Options.new(x))
|
9020
9201
|
@label = (x = opts.delete(:label); x.nil? ? nil : HttpClient::Preconditions.assert_class('label', x, String))
|
9202
|
+
@intent = (x = opts.delete(:intent); x.nil? ? nil : (x = x; x.is_a?(::Io::Flow::V0::Models::AttributeIntent) ? x : ::Io::Flow::V0::Models::AttributeIntent.apply(x)))
|
9203
|
+
@type = (x = opts.delete(:type); x.nil? ? nil : (x = x; x.is_a?(::Io::Flow::V0::Models::AttributeDataType) ? x : ::Io::Flow::V0::Models::AttributeDataType.apply(x)))
|
9021
9204
|
end
|
9022
9205
|
|
9023
9206
|
def to_json
|
@@ -9032,7 +9215,9 @@ module Io
|
|
9032
9215
|
{
|
9033
9216
|
:key => key,
|
9034
9217
|
:options => options.to_hash,
|
9035
|
-
:label => label
|
9218
|
+
:label => label,
|
9219
|
+
:intent => intent.nil? ? nil : intent.value,
|
9220
|
+
:type => type.nil? ? nil : type.value
|
9036
9221
|
}
|
9037
9222
|
end
|
9038
9223
|
|
@@ -11972,6 +12157,33 @@ module Io
|
|
11972
12157
|
|
11973
12158
|
end
|
11974
12159
|
|
12160
|
+
class FlatRateForm < TierRuleOutcomeForm
|
12161
|
+
|
12162
|
+
attr_reader :price
|
12163
|
+
|
12164
|
+
def initialize(incoming={})
|
12165
|
+
super(:discriminator => TierRuleOutcomeForm::Types::FLAT_RATE_FORM)
|
12166
|
+
opts = HttpClient::Helper.symbolize_keys(incoming)
|
12167
|
+
HttpClient::Preconditions.require_keys(opts, [:price], 'FlatRateForm')
|
12168
|
+
@price = (x = opts.delete(:price); x.is_a?(::Io::Flow::V0::Models::Money) ? x : ::Io::Flow::V0::Models::Money.new(x))
|
12169
|
+
end
|
12170
|
+
|
12171
|
+
def to_json
|
12172
|
+
JSON.dump(to_hash)
|
12173
|
+
end
|
12174
|
+
|
12175
|
+
def copy(incoming={})
|
12176
|
+
FlatRateForm.new(subtype_to_hash.merge(HttpClient::Helper.symbolize_keys(incoming)))
|
12177
|
+
end
|
12178
|
+
|
12179
|
+
def subtype_to_hash
|
12180
|
+
{
|
12181
|
+
:price => price.to_hash
|
12182
|
+
}
|
12183
|
+
end
|
12184
|
+
|
12185
|
+
end
|
12186
|
+
|
11975
12187
|
class FlowItemIndexMetadata
|
11976
12188
|
|
11977
12189
|
attr_reader :status
|
@@ -14775,7 +14987,7 @@ module Io
|
|
14775
14987
|
|
14776
14988
|
class Local
|
14777
14989
|
|
14778
|
-
attr_reader :experience, :prices, :rates, :spot_rates, :status
|
14990
|
+
attr_reader :experience, :prices, :rates, :spot_rates, :status, :attributes
|
14779
14991
|
|
14780
14992
|
def initialize(incoming={})
|
14781
14993
|
opts = HttpClient::Helper.symbolize_keys(incoming)
|
@@ -14785,6 +14997,7 @@ module Io
|
|
14785
14997
|
@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)) }
|
14786
14998
|
@spot_rates = HttpClient::Preconditions.assert_class('spot_rates', opts.delete(:spot_rates), Array).map { |v| HttpClient::Preconditions.assert_class('spot_rates', HttpClient::Helper.to_object(v), Hash) }
|
14787
14999
|
@status = (x = (x = opts.delete(:status); x.nil? ? "included" : x); x.is_a?(::Io::Flow::V0::Models::SubcatalogItemStatus) ? x : ::Io::Flow::V0::Models::SubcatalogItemStatus.apply(x))
|
15000
|
+
@attributes = (x = opts.delete(:attributes); x.nil? ? nil : HttpClient::Preconditions.assert_class('attributes', HttpClient::Helper.to_object(x), Hash))
|
14788
15001
|
end
|
14789
15002
|
|
14790
15003
|
def to_json
|
@@ -14801,7 +15014,8 @@ module Io
|
|
14801
15014
|
:prices => prices.map { |o| o.to_hash },
|
14802
15015
|
:rates => rates.map { |o| o.to_hash },
|
14803
15016
|
:spot_rates => spot_rates,
|
14804
|
-
:status => status.value
|
15017
|
+
:status => status.value,
|
15018
|
+
:attributes => attributes
|
14805
15019
|
}
|
14806
15020
|
end
|
14807
15021
|
|
@@ -16178,16 +16392,16 @@ module Io
|
|
16178
16392
|
|
16179
16393
|
class OrderIdentifierUpserted < Event
|
16180
16394
|
|
16181
|
-
attr_reader :event_id, :timestamp, :
|
16395
|
+
attr_reader :event_id, :timestamp, :id, :organization, :number, :order_number
|
16182
16396
|
|
16183
16397
|
def initialize(incoming={})
|
16184
16398
|
super(:discriminator => Event::Types::ORDER_IDENTIFIER_UPSERTED)
|
16185
16399
|
opts = HttpClient::Helper.symbolize_keys(incoming)
|
16186
|
-
HttpClient::Preconditions.require_keys(opts, [:event_id, :timestamp, :
|
16400
|
+
HttpClient::Preconditions.require_keys(opts, [:event_id, :timestamp, :id, :organization, :number, :order_number], 'OrderIdentifierUpserted')
|
16187
16401
|
@event_id = HttpClient::Preconditions.assert_class('event_id', opts.delete(:event_id), String)
|
16188
16402
|
@timestamp = HttpClient::Preconditions.assert_class('timestamp', HttpClient::Helper.to_date_time_iso8601(opts.delete(:timestamp)), DateTime)
|
16189
|
-
@organization = HttpClient::Preconditions.assert_class('organization', opts.delete(:organization), String)
|
16190
16403
|
@id = HttpClient::Preconditions.assert_class('id', opts.delete(:id), String)
|
16404
|
+
@organization = HttpClient::Preconditions.assert_class('organization', opts.delete(:organization), String)
|
16191
16405
|
@number = HttpClient::Preconditions.assert_class('number', opts.delete(:number), String)
|
16192
16406
|
@order_number = HttpClient::Preconditions.assert_class('order_number', opts.delete(:order_number), String)
|
16193
16407
|
end
|
@@ -16204,8 +16418,8 @@ module Io
|
|
16204
16418
|
{
|
16205
16419
|
:event_id => event_id,
|
16206
16420
|
:timestamp => timestamp,
|
16207
|
-
:organization => organization,
|
16208
16421
|
:id => id,
|
16422
|
+
:organization => organization,
|
16209
16423
|
:number => number,
|
16210
16424
|
:order_number => order_number
|
16211
16425
|
}
|
@@ -19742,6 +19956,38 @@ module Io
|
|
19742
19956
|
|
19743
19957
|
end
|
19744
19958
|
|
19959
|
+
class SubcatalogItemVersion
|
19960
|
+
|
19961
|
+
attr_reader :id, :timestamp, :type, :subcatalog_item
|
19962
|
+
|
19963
|
+
def initialize(incoming={})
|
19964
|
+
opts = HttpClient::Helper.symbolize_keys(incoming)
|
19965
|
+
HttpClient::Preconditions.require_keys(opts, [:id, :timestamp, :type, :subcatalog_item], 'SubcatalogItemVersion')
|
19966
|
+
@id = HttpClient::Preconditions.assert_class('id', opts.delete(:id), String)
|
19967
|
+
@timestamp = HttpClient::Preconditions.assert_class('timestamp', HttpClient::Helper.to_date_time_iso8601(opts.delete(:timestamp)), DateTime)
|
19968
|
+
@type = (x = opts.delete(:type); x.is_a?(::Io::Flow::V0::Models::ChangeType) ? x : ::Io::Flow::V0::Models::ChangeType.apply(x))
|
19969
|
+
@subcatalog_item = (x = opts.delete(:subcatalog_item); x.is_a?(::Io::Flow::V0::Models::SubcatalogItem) ? x : ::Io::Flow::V0::Models::SubcatalogItem.new(x))
|
19970
|
+
end
|
19971
|
+
|
19972
|
+
def to_json
|
19973
|
+
JSON.dump(to_hash)
|
19974
|
+
end
|
19975
|
+
|
19976
|
+
def copy(incoming={})
|
19977
|
+
SubcatalogItemVersion.new(to_hash.merge(HttpClient::Helper.symbolize_keys(incoming)))
|
19978
|
+
end
|
19979
|
+
|
19980
|
+
def to_hash
|
19981
|
+
{
|
19982
|
+
:id => id,
|
19983
|
+
:timestamp => timestamp,
|
19984
|
+
:type => type.value,
|
19985
|
+
:subcatalog_item => subcatalog_item.to_hash
|
19986
|
+
}
|
19987
|
+
end
|
19988
|
+
|
19989
|
+
end
|
19990
|
+
|
19745
19991
|
class SubcatalogReference < ExpandableSubcatalog
|
19746
19992
|
|
19747
19993
|
attr_reader :id
|
@@ -20536,7 +20782,7 @@ module Io
|
|
20536
20782
|
HttpClient::Preconditions.require_keys(opts, [:query, :outcome], 'TierRuleForm')
|
20537
20783
|
@position = (x = opts.delete(:position); x.nil? ? nil : HttpClient::Preconditions.assert_class('position', x, Integer))
|
20538
20784
|
@query = HttpClient::Preconditions.assert_class('query', opts.delete(:query), String)
|
20539
|
-
@outcome = (x = opts.delete(:outcome); x.is_a?(::Io::Flow::V0::Models::
|
20785
|
+
@outcome = (x = opts.delete(:outcome); x.is_a?(::Io::Flow::V0::Models::TierRuleOutcomeForm) ? x : ::Io::Flow::V0::Models::TierRuleOutcomeForm.from_json(x))
|
20540
20786
|
end
|
20541
20787
|
|
20542
20788
|
def to_json
|
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.1.
|
4
|
+
version: 0.1.19
|
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-
|
11
|
+
date: 2017-03-04 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: json
|