Class: Io::Flow::V0::Models::OrganizationPaymentMethodTag

Inherits:
PaymentMethodTag show all
Defined in:
lib/flow_commerce/flow_api_v0_client.rb

Instance Attribute Summary collapse

Attributes inherited from PaymentMethodTag

#discriminator

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from PaymentMethodTag

from_json, #to_hash

Constructor Details

#initialize(value) ⇒ OrganizationPaymentMethodTag

Returns a new instance of OrganizationPaymentMethodTag.



18265
18266
18267
18268
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 18265

def initialize(value)
  super(:name => PaymentMethodTag::Types::ORGANIZATION_PAYMENT_METHOD_TAG, :discriminator => 'organization_payment_method_tag')
  @value = HttpClient::Preconditions.assert_class('value', value, String)
end

Instance Attribute Details

#valueObject (readonly)

Returns the value of attribute value.



18263
18264
18265
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 18263

def value
  @value
end

Class Method Details

.ALLObject



18286
18287
18288
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 18286

def OrganizationPaymentMethodTag.ALL
  @@all ||= [OrganizationPaymentMethodTag.deny]
end

.apply(value) ⇒ Object

Returns the instance of OrganizationPaymentMethodTag for this value, creating a new instance for an unknown value



18271
18272
18273
18274
18275
18276
18277
18278
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 18271

def OrganizationPaymentMethodTag.apply(value)
  if value.instance_of?(OrganizationPaymentMethodTag)
    value
  else
    HttpClient::Preconditions.assert_class_or_nil('value', value, String)
    value.nil? ? nil : (from_string(value) || OrganizationPaymentMethodTag.new(value))
  end
end

.denyObject

A denied payment method cannot be used for an organization in any experience.



18291
18292
18293
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 18291

def OrganizationPaymentMethodTag.deny
  @@_deny ||= OrganizationPaymentMethodTag.new('deny')
end

.from_string(value) ⇒ Object

Returns the instance of OrganizationPaymentMethodTag for this value, or nil if not found



18281
18282
18283
18284
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 18281

def OrganizationPaymentMethodTag.from_string(value)
  HttpClient::Preconditions.assert_class('value', value, String)
  OrganizationPaymentMethodTag.ALL.find { |v| v.value == value }
end

Instance Method Details

#subtype_to_hashObject



18295
18296
18297
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 18295

def subtype_to_hash
  value
end