flowcommerce 0.2.16 → 0.2.17
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 +318 -8
- 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: 7926709f3cc6036d7bb49c094300f2cd5fdfc18f
|
4
|
+
data.tar.gz: df79fe5daf67689d90466051f73c65d8034eb57e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2cbb1f577040666e3cdf91dfdf718b52adfc8e75c0bd27353722316f3e3e153b8f0bff1ba2cb40abd93a9aa28a76a8e68bca1c6b8eaeb707ef33d7f5f2e9825a
|
7
|
+
data.tar.gz: 7e4d5d99550c9e4db1a329ed3e2612909ed3d73cfc85345287f7be987c30eeb043085fa3634dcd2984a7306c7d4058518fa902fb6d52446c6967b45d67a6ea0e
|
@@ -1,6 +1,6 @@
|
|
1
1
|
# Generated by apidoc - http://www.apidoc.me
|
2
2
|
# Service version: 0.3.28
|
3
|
-
# apidoc:0.11.
|
3
|
+
# apidoc:0.11.84 http://www.apidoc.me/flow/api/0.3.30/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.84 http://www.apidoc.me/flow/api/0.3.30/ruby_client' unless defined?(Constants::USER_AGENT)
|
29
29
|
VERSION = '0.3.28' unless defined?(Constants::VERSION)
|
30
30
|
VERSION_MAJOR = 0 unless defined?(VERSION_MAJOR)
|
31
31
|
|
@@ -288,6 +288,10 @@ module Io
|
|
288
288
|
@locales ||= ::Io::Flow::V0::Clients::Locales.new(self)
|
289
289
|
end
|
290
290
|
|
291
|
+
def payment_methods
|
292
|
+
@payment_methods ||= ::Io::Flow::V0::Clients::PaymentMethods.new(self)
|
293
|
+
end
|
294
|
+
|
291
295
|
def provinces
|
292
296
|
@provinces ||= ::Io::Flow::V0::Clients::Provinces.new(self)
|
293
297
|
end
|
@@ -324,6 +328,10 @@ module Io
|
|
324
328
|
@invitations ||= ::Io::Flow::V0::Clients::Invitations.new(self)
|
325
329
|
end
|
326
330
|
|
331
|
+
def links
|
332
|
+
@links ||= ::Io::Flow::V0::Clients::Links.new(self)
|
333
|
+
end
|
334
|
+
|
327
335
|
def memberships
|
328
336
|
@memberships ||= ::Io::Flow::V0::Clients::Memberships.new(self)
|
329
337
|
end
|
@@ -624,6 +632,43 @@ module Io
|
|
624
632
|
r.map { |x| ::Io::Flow::V0::Models::ItemMarginVersion.new(x) }
|
625
633
|
end
|
626
634
|
|
635
|
+
def get_payment_method_rules_by_experience_key(organization, experience_key, incoming={})
|
636
|
+
HttpClient::Preconditions.assert_class('organization', organization, String)
|
637
|
+
HttpClient::Preconditions.assert_class('experience_key', experience_key, String)
|
638
|
+
opts = HttpClient::Helper.symbolize_keys(incoming)
|
639
|
+
query = {
|
640
|
+
:payment_method_type => (x = opts.delete(:payment_method_type); x.nil? ? nil : HttpClient::Preconditions.assert_class('payment_method_type', x, Array).map { |v| (x = v; x.is_a?(::Io::Flow::V0::Models::PaymentMethodType) ? x : ::Io::Flow::V0::Models::PaymentMethodType.apply(x)).value }),
|
641
|
+
:tags => (x = opts.delete(:tags); x.nil? ? nil : HttpClient::Preconditions.assert_class('tags', x, Array).map { |v| HttpClient::Preconditions.assert_class('tags', v, String) }),
|
642
|
+
:limit => HttpClient::Preconditions.assert_class('limit', (x = opts.delete(:limit); x.nil? ? 25 : x), Integer),
|
643
|
+
:offset => HttpClient::Preconditions.assert_class('offset', (x = opts.delete(:offset); x.nil? ? 0 : x), Integer),
|
644
|
+
:sort => HttpClient::Preconditions.assert_class('sort', (x = opts.delete(:sort); x.nil? ? "display_position" : x), String)
|
645
|
+
}.delete_if { |k, v| v.nil? }
|
646
|
+
r = @client.request("/#{CGI.escape(organization)}/experiences/#{CGI.escape(experience_key)}/payment-method-rules").with_query(query).get
|
647
|
+
r.map { |x| ::Io::Flow::V0::Models::PaymentMethodRule.new(x) }
|
648
|
+
end
|
649
|
+
|
650
|
+
# Change the ordering or payment tags for an experience. Every post must
|
651
|
+
# include one entry for each payment method offered by Flow.
|
652
|
+
def put_payment_method_rules_by_experience_key(organization, experience_key, experience_payment_method_rule_forms)
|
653
|
+
HttpClient::Preconditions.assert_class('organization', organization, String)
|
654
|
+
HttpClient::Preconditions.assert_class('experience_key', experience_key, String)
|
655
|
+
HttpClient::Preconditions.assert_collection_of_class('experience_payment_method_rule_forms', experience_payment_method_rule_forms, ::Io::Flow::V0::Models::ExperiencePaymentMethodRuleForm)
|
656
|
+
r = @client.request("/#{CGI.escape(organization)}/experiences/#{CGI.escape(experience_key)}/payment-method-rules").with_json(experience_payment_method_rule_forms.map { |o| o.to_hash }.to_json).put
|
657
|
+
r.map { |x| ::Io::Flow::V0::Models::PaymentMethodRule.new(x) }
|
658
|
+
end
|
659
|
+
|
660
|
+
def get_payment_method_types_by_experience_key(organization, experience_key, incoming={})
|
661
|
+
HttpClient::Preconditions.assert_class('organization', organization, String)
|
662
|
+
HttpClient::Preconditions.assert_class('experience_key', experience_key, String)
|
663
|
+
opts = HttpClient::Helper.symbolize_keys(incoming)
|
664
|
+
query = {
|
665
|
+
:limit => HttpClient::Preconditions.assert_class('limit', (x = opts.delete(:limit); x.nil? ? 25 : x), Integer),
|
666
|
+
:offset => HttpClient::Preconditions.assert_class('offset', (x = opts.delete(:offset); x.nil? ? 0 : x), Integer)
|
667
|
+
}.delete_if { |k, v| v.nil? }
|
668
|
+
r = @client.request("/#{CGI.escape(organization)}/experiences/#{CGI.escape(experience_key)}/payment-method-types").with_query(query).get
|
669
|
+
r.map { |x| ::Io::Flow::V0::Models::PaymentMethodType.new(x) }
|
670
|
+
end
|
671
|
+
|
627
672
|
# Returns information about a specific experience.
|
628
673
|
def get_by_key(organization, key)
|
629
674
|
HttpClient::Preconditions.assert_class('organization', organization, String)
|
@@ -3516,6 +3561,24 @@ module Io
|
|
3516
3561
|
|
3517
3562
|
end
|
3518
3563
|
|
3564
|
+
class PaymentMethods
|
3565
|
+
|
3566
|
+
def initialize(client)
|
3567
|
+
@client = HttpClient::Preconditions.assert_class('client', client, ::Io::Flow::V0::Client)
|
3568
|
+
end
|
3569
|
+
|
3570
|
+
# Returns a list of payment methods supported by Flow.
|
3571
|
+
def get(incoming={})
|
3572
|
+
opts = HttpClient::Helper.symbolize_keys(incoming)
|
3573
|
+
query = {
|
3574
|
+
:q => (x = opts.delete(:q); x.nil? ? nil : HttpClient::Preconditions.assert_class('q', x, String))
|
3575
|
+
}.delete_if { |k, v| v.nil? }
|
3576
|
+
r = @client.request("/reference/payment-methods").with_query(query).get
|
3577
|
+
r.map { |x| ::Io::Flow::V0::Models::PaymentMethod.new(x) }
|
3578
|
+
end
|
3579
|
+
|
3580
|
+
end
|
3581
|
+
|
3519
3582
|
class Provinces
|
3520
3583
|
|
3521
3584
|
def initialize(client)
|
@@ -3883,6 +3946,22 @@ module Io
|
|
3883
3946
|
|
3884
3947
|
end
|
3885
3948
|
|
3949
|
+
class Links
|
3950
|
+
|
3951
|
+
def initialize(client)
|
3952
|
+
@client = HttpClient::Preconditions.assert_class('client', client, ::Io::Flow::V0::Client)
|
3953
|
+
end
|
3954
|
+
|
3955
|
+
def get(carrier, organization, order_number)
|
3956
|
+
HttpClient::Preconditions.assert_class('carrier', carrier, String)
|
3957
|
+
HttpClient::Preconditions.assert_class('organization', organization, String)
|
3958
|
+
HttpClient::Preconditions.assert_class('order_number', order_number, String)
|
3959
|
+
r = @client.request("/carrier/#{CGI.escape(carrier)}/data/#{CGI.escape(organization)}/#{CGI.escape(order_number)}").get
|
3960
|
+
r
|
3961
|
+
end
|
3962
|
+
|
3963
|
+
end
|
3964
|
+
|
3886
3965
|
class Memberships
|
3887
3966
|
|
3888
3967
|
def initialize(client)
|
@@ -5877,6 +5956,68 @@ module Io
|
|
5877
5956
|
|
5878
5957
|
end
|
5879
5958
|
|
5959
|
+
class PaymentMethodTag
|
5960
|
+
|
5961
|
+
module Types
|
5962
|
+
ORGANIZATION_PAYMENT_METHOD_TAG = 'organization_payment_method_tag' unless defined?(ORGANIZATION_PAYMENT_METHOD_TAG)
|
5963
|
+
EXPERIENCE_PAYMENT_METHOD_TAG = 'experience_payment_method_tag' unless defined?(EXPERIENCE_PAYMENT_METHOD_TAG)
|
5964
|
+
end
|
5965
|
+
|
5966
|
+
attr_reader :discriminator
|
5967
|
+
|
5968
|
+
def initialize(incoming={})
|
5969
|
+
opts = HttpClient::Helper.symbolize_keys(incoming)
|
5970
|
+
HttpClient::Preconditions.require_keys(opts, [:discriminator], 'PaymentMethodTag')
|
5971
|
+
@discriminator = HttpClient::Preconditions.assert_class('discriminator', opts.delete(:discriminator), String)
|
5972
|
+
end
|
5973
|
+
|
5974
|
+
def subtype_to_hash
|
5975
|
+
raise 'Cannot serialize an instance of payment_method_tag directly - must use one of the specific types: organization_payment_method_tag, experience_payment_method_tag'
|
5976
|
+
end
|
5977
|
+
|
5978
|
+
def to_hash
|
5979
|
+
subtype_to_hash.merge(:discriminator => @discriminator)
|
5980
|
+
end
|
5981
|
+
|
5982
|
+
def PaymentMethodTag.from_json(hash)
|
5983
|
+
HttpClient::Preconditions.assert_class('hash', hash, Hash)
|
5984
|
+
discriminator = HttpClient::Helper.symbolize_keys(hash)[:discriminator].to_s.strip
|
5985
|
+
if discriminator.empty?
|
5986
|
+
raise "Union type[payment_method_tag] requires a field named 'discriminator'"
|
5987
|
+
end
|
5988
|
+
case discriminator
|
5989
|
+
when Types::ORGANIZATION_PAYMENT_METHOD_TAG; OrganizationPaymentMethodTag.new(hash)
|
5990
|
+
when Types::EXPERIENCE_PAYMENT_METHOD_TAG; ExperiencePaymentMethodTag.new(hash)
|
5991
|
+
else PaymentMethodTagUndefinedType.new(:discriminator => discriminator)
|
5992
|
+
end
|
5993
|
+
end
|
5994
|
+
|
5995
|
+
end
|
5996
|
+
|
5997
|
+
class PaymentMethodTagUndefinedType < PaymentMethodTag
|
5998
|
+
|
5999
|
+
attr_reader :name
|
6000
|
+
|
6001
|
+
def initialize(incoming={})
|
6002
|
+
super(:discriminator => 'undefined_type')
|
6003
|
+
opts = HttpClient::Helper.symbolize_keys(incoming)
|
6004
|
+
@name = HttpClient::Preconditions.assert_class('name', opts.delete(:discriminator), String)
|
6005
|
+
end
|
6006
|
+
|
6007
|
+
def subtype_to_hash
|
6008
|
+
raise 'Unable to serialize undefined type to json'
|
6009
|
+
end
|
6010
|
+
|
6011
|
+
def copy(incoming={})
|
6012
|
+
raise 'Operation not supported for undefined type'
|
6013
|
+
end
|
6014
|
+
|
6015
|
+
def to_hash
|
6016
|
+
raise 'Operation not supported for undefined type'
|
6017
|
+
end
|
6018
|
+
|
6019
|
+
end
|
6020
|
+
|
5880
6021
|
class Promotion
|
5881
6022
|
|
5882
6023
|
module Types
|
@@ -7759,6 +7900,47 @@ module Io
|
|
7759
7900
|
|
7760
7901
|
end
|
7761
7902
|
|
7903
|
+
class ExperiencePaymentMethodTag < PaymentMethodTag
|
7904
|
+
|
7905
|
+
attr_reader :value
|
7906
|
+
|
7907
|
+
def initialize(value)
|
7908
|
+
super(:name => PaymentMethodTag::Types::EXPERIENCE_PAYMENT_METHOD_TAG)
|
7909
|
+
@value = HttpClient::Preconditions.assert_class('value', value, String)
|
7910
|
+
end
|
7911
|
+
|
7912
|
+
# Returns the instance of ExperiencePaymentMethodTag for this value, creating a new instance for an unknown value
|
7913
|
+
def ExperiencePaymentMethodTag.apply(value)
|
7914
|
+
if value.instance_of?(ExperiencePaymentMethodTag)
|
7915
|
+
value
|
7916
|
+
else
|
7917
|
+
HttpClient::Preconditions.assert_class_or_nil('value', value, String)
|
7918
|
+
value.nil? ? nil : (from_string(value) || ExperiencePaymentMethodTag.new(value))
|
7919
|
+
end
|
7920
|
+
end
|
7921
|
+
|
7922
|
+
# Returns the instance of ExperiencePaymentMethodTag for this value, or nil if not found
|
7923
|
+
def ExperiencePaymentMethodTag.from_string(value)
|
7924
|
+
HttpClient::Preconditions.assert_class('value', value, String)
|
7925
|
+
ExperiencePaymentMethodTag.ALL.find { |v| v.value == value }
|
7926
|
+
end
|
7927
|
+
|
7928
|
+
def ExperiencePaymentMethodTag.ALL
|
7929
|
+
@@all ||= [ExperiencePaymentMethodTag.display]
|
7930
|
+
end
|
7931
|
+
|
7932
|
+
# A displayed payment method will be highlighted during the checkout process for
|
7933
|
+
# an experience.
|
7934
|
+
def ExperiencePaymentMethodTag.display
|
7935
|
+
@@_display ||= ExperiencePaymentMethodTag.new('display')
|
7936
|
+
end
|
7937
|
+
|
7938
|
+
def subtype_to_hash
|
7939
|
+
value
|
7940
|
+
end
|
7941
|
+
|
7942
|
+
end
|
7943
|
+
|
7762
7944
|
class ExportStatus
|
7763
7945
|
|
7764
7946
|
attr_reader :value
|
@@ -8710,6 +8892,46 @@ module Io
|
|
8710
8892
|
|
8711
8893
|
end
|
8712
8894
|
|
8895
|
+
class OrganizationPaymentMethodTag < PaymentMethodTag
|
8896
|
+
|
8897
|
+
attr_reader :value
|
8898
|
+
|
8899
|
+
def initialize(value)
|
8900
|
+
super(:name => PaymentMethodTag::Types::ORGANIZATION_PAYMENT_METHOD_TAG)
|
8901
|
+
@value = HttpClient::Preconditions.assert_class('value', value, String)
|
8902
|
+
end
|
8903
|
+
|
8904
|
+
# Returns the instance of OrganizationPaymentMethodTag for this value, creating a new instance for an unknown value
|
8905
|
+
def OrganizationPaymentMethodTag.apply(value)
|
8906
|
+
if value.instance_of?(OrganizationPaymentMethodTag)
|
8907
|
+
value
|
8908
|
+
else
|
8909
|
+
HttpClient::Preconditions.assert_class_or_nil('value', value, String)
|
8910
|
+
value.nil? ? nil : (from_string(value) || OrganizationPaymentMethodTag.new(value))
|
8911
|
+
end
|
8912
|
+
end
|
8913
|
+
|
8914
|
+
# Returns the instance of OrganizationPaymentMethodTag for this value, or nil if not found
|
8915
|
+
def OrganizationPaymentMethodTag.from_string(value)
|
8916
|
+
HttpClient::Preconditions.assert_class('value', value, String)
|
8917
|
+
OrganizationPaymentMethodTag.ALL.find { |v| v.value == value }
|
8918
|
+
end
|
8919
|
+
|
8920
|
+
def OrganizationPaymentMethodTag.ALL
|
8921
|
+
@@all ||= [OrganizationPaymentMethodTag.deny]
|
8922
|
+
end
|
8923
|
+
|
8924
|
+
# A denied payment method cannot be used for an organization in any experience.
|
8925
|
+
def OrganizationPaymentMethodTag.deny
|
8926
|
+
@@_deny ||= OrganizationPaymentMethodTag.new('deny')
|
8927
|
+
end
|
8928
|
+
|
8929
|
+
def subtype_to_hash
|
8930
|
+
value
|
8931
|
+
end
|
8932
|
+
|
8933
|
+
end
|
8934
|
+
|
8713
8935
|
class OutgoingFeedFormat
|
8714
8936
|
|
8715
8937
|
attr_reader :value
|
@@ -12903,14 +13125,15 @@ module Io
|
|
12903
13125
|
|
12904
13126
|
end
|
12905
13127
|
|
12906
|
-
class
|
13128
|
+
class CenterSummary
|
12907
13129
|
|
12908
|
-
attr_reader :id
|
13130
|
+
attr_reader :id, :key
|
12909
13131
|
|
12910
13132
|
def initialize(incoming={})
|
12911
13133
|
opts = HttpClient::Helper.symbolize_keys(incoming)
|
12912
|
-
HttpClient::Preconditions.require_keys(opts, [:id], '
|
13134
|
+
HttpClient::Preconditions.require_keys(opts, [:id, :key], 'CenterSummary')
|
12913
13135
|
@id = HttpClient::Preconditions.assert_class('id', opts.delete(:id), String)
|
13136
|
+
@key = HttpClient::Preconditions.assert_class('key', opts.delete(:key), String)
|
12914
13137
|
end
|
12915
13138
|
|
12916
13139
|
def to_json
|
@@ -12918,12 +13141,13 @@ module Io
|
|
12918
13141
|
end
|
12919
13142
|
|
12920
13143
|
def copy(incoming={})
|
12921
|
-
|
13144
|
+
CenterSummary.new(to_hash.merge(HttpClient::Helper.symbolize_keys(incoming)))
|
12922
13145
|
end
|
12923
13146
|
|
12924
13147
|
def to_hash
|
12925
13148
|
{
|
12926
|
-
:id => id
|
13149
|
+
:id => id,
|
13150
|
+
:key => key
|
12927
13151
|
}
|
12928
13152
|
end
|
12929
13153
|
|
@@ -13289,12 +13513,13 @@ module Io
|
|
13289
13513
|
# collection of items, and metadata about those options
|
13290
13514
|
class Delivery
|
13291
13515
|
|
13292
|
-
attr_reader :id, :items, :options
|
13516
|
+
attr_reader :id, :center, :items, :options
|
13293
13517
|
|
13294
13518
|
def initialize(incoming={})
|
13295
13519
|
opts = HttpClient::Helper.symbolize_keys(incoming)
|
13296
13520
|
HttpClient::Preconditions.require_keys(opts, [:id, :items, :options], 'Delivery')
|
13297
13521
|
@id = HttpClient::Preconditions.assert_class('id', opts.delete(:id), String)
|
13522
|
+
@center = (x = opts.delete(:center); x.nil? ? nil : (x = x; x.is_a?(::Io::Flow::V0::Models::CenterSummary) ? x : ::Io::Flow::V0::Models::CenterSummary.new(x)))
|
13298
13523
|
@items = HttpClient::Preconditions.assert_class('items', opts.delete(:items), Array).map { |v| (x = v; x.is_a?(::Io::Flow::V0::Models::LineItemForm) ? x : ::Io::Flow::V0::Models::LineItemForm.new(x)) }
|
13299
13524
|
@options = HttpClient::Preconditions.assert_class('options', opts.delete(:options), Array).map { |v| (x = v; x.is_a?(::Io::Flow::V0::Models::DeliveryOption) ? x : ::Io::Flow::V0::Models::DeliveryOption.new(x)) }
|
13300
13525
|
end
|
@@ -13310,6 +13535,7 @@ module Io
|
|
13310
13535
|
def to_hash
|
13311
13536
|
{
|
13312
13537
|
:id => id,
|
13538
|
+
:center => center.nil? ? nil : center.to_hash,
|
13313
13539
|
:items => items.map { |o| o.to_hash },
|
13314
13540
|
:options => options.map { |o| o.to_hash }
|
13315
13541
|
}
|
@@ -14176,6 +14402,34 @@ module Io
|
|
14176
14402
|
|
14177
14403
|
end
|
14178
14404
|
|
14405
|
+
class ExperiencePaymentMethodRuleForm
|
14406
|
+
|
14407
|
+
attr_reader :payment_method_id, :tags
|
14408
|
+
|
14409
|
+
def initialize(incoming={})
|
14410
|
+
opts = HttpClient::Helper.symbolize_keys(incoming)
|
14411
|
+
HttpClient::Preconditions.require_keys(opts, [:payment_method_id, :tags], 'ExperiencePaymentMethodRuleForm')
|
14412
|
+
@payment_method_id = HttpClient::Preconditions.assert_class('payment_method_id', opts.delete(:payment_method_id), String)
|
14413
|
+
@tags = HttpClient::Preconditions.assert_class('tags', opts.delete(:tags), Array).map { |v| (x = v; x.is_a?(::Io::Flow::V0::Models::ExperiencePaymentMethodTag) ? x : ::Io::Flow::V0::Models::ExperiencePaymentMethodTag.apply(x)) }
|
14414
|
+
end
|
14415
|
+
|
14416
|
+
def to_json
|
14417
|
+
JSON.dump(to_hash)
|
14418
|
+
end
|
14419
|
+
|
14420
|
+
def copy(incoming={})
|
14421
|
+
ExperiencePaymentMethodRuleForm.new(to_hash.merge(HttpClient::Helper.symbolize_keys(incoming)))
|
14422
|
+
end
|
14423
|
+
|
14424
|
+
def to_hash
|
14425
|
+
{
|
14426
|
+
:payment_method_id => payment_method_id,
|
14427
|
+
:tags => tags.map { |o| o.value }
|
14428
|
+
}
|
14429
|
+
end
|
14430
|
+
|
14431
|
+
end
|
14432
|
+
|
14179
14433
|
class ExperienceReference < ExpandableExperience
|
14180
14434
|
|
14181
14435
|
attr_reader :key
|
@@ -17691,6 +17945,32 @@ module Io
|
|
17691
17945
|
|
17692
17946
|
end
|
17693
17947
|
|
17948
|
+
class Link
|
17949
|
+
|
17950
|
+
attr_reader :url
|
17951
|
+
|
17952
|
+
def initialize(incoming={})
|
17953
|
+
opts = HttpClient::Helper.symbolize_keys(incoming)
|
17954
|
+
HttpClient::Preconditions.require_keys(opts, [:url], 'Link')
|
17955
|
+
@url = HttpClient::Preconditions.assert_class('url', opts.delete(:url), String)
|
17956
|
+
end
|
17957
|
+
|
17958
|
+
def to_json
|
17959
|
+
JSON.dump(to_hash)
|
17960
|
+
end
|
17961
|
+
|
17962
|
+
def copy(incoming={})
|
17963
|
+
Link.new(to_hash.merge(HttpClient::Helper.symbolize_keys(incoming)))
|
17964
|
+
end
|
17965
|
+
|
17966
|
+
def to_hash
|
17967
|
+
{
|
17968
|
+
:url => url
|
17969
|
+
}
|
17970
|
+
end
|
17971
|
+
|
17972
|
+
end
|
17973
|
+
|
17694
17974
|
class Local
|
17695
17975
|
|
17696
17976
|
attr_reader :experience, :prices, :rates, :spot_rates, :status, :attributes
|
@@ -20699,6 +20979,36 @@ module Io
|
|
20699
20979
|
|
20700
20980
|
end
|
20701
20981
|
|
20982
|
+
class PaymentMethodRule
|
20983
|
+
|
20984
|
+
attr_reader :tags, :payment_method, :display_position
|
20985
|
+
|
20986
|
+
def initialize(incoming={})
|
20987
|
+
opts = HttpClient::Helper.symbolize_keys(incoming)
|
20988
|
+
HttpClient::Preconditions.require_keys(opts, [:tags, :payment_method, :display_position], 'PaymentMethodRule')
|
20989
|
+
@tags = HttpClient::Preconditions.assert_class('tags', opts.delete(:tags), Array).map { |v| (x = v; x.is_a?(::Io::Flow::V0::Models::PaymentMethodTag) ? x : ::Io::Flow::V0::Models::PaymentMethodTag.from_json(x)) }
|
20990
|
+
@payment_method = (x = opts.delete(:payment_method); x.is_a?(::Io::Flow::V0::Models::PaymentMethod) ? x : ::Io::Flow::V0::Models::PaymentMethod.new(x))
|
20991
|
+
@display_position = HttpClient::Preconditions.assert_class('display_position', opts.delete(:display_position), Integer)
|
20992
|
+
end
|
20993
|
+
|
20994
|
+
def to_json
|
20995
|
+
JSON.dump(to_hash)
|
20996
|
+
end
|
20997
|
+
|
20998
|
+
def copy(incoming={})
|
20999
|
+
PaymentMethodRule.new(to_hash.merge(HttpClient::Helper.symbolize_keys(incoming)))
|
21000
|
+
end
|
21001
|
+
|
21002
|
+
def to_hash
|
21003
|
+
{
|
21004
|
+
:tags => tags.map { |o| o.to_hash },
|
21005
|
+
:payment_method => payment_method.to_hash,
|
21006
|
+
:display_position => display_position
|
21007
|
+
}
|
21008
|
+
end
|
21009
|
+
|
21010
|
+
end
|
21011
|
+
|
20702
21012
|
# Represents on line payment
|
20703
21013
|
class PaymentPaypal < ExpandablePayment
|
20704
21014
|
|
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.17
|
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-05-
|
11
|
+
date: 2017-05-25 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.6.
|
72
|
+
rubygems_version: 2.6.8
|
73
73
|
signing_key:
|
74
74
|
specification_version: 4
|
75
75
|
summary: Native ruby client for the Flow REST API.
|