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.



13640
13641
13642
13643
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 13640

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.



13638
13639
13640
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 13638

def value
  @value
end

Class Method Details

.ALLObject



13661
13662
13663
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 13661

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



13646
13647
13648
13649
13650
13651
13652
13653
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 13646

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.



13666
13667
13668
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 13666

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



13656
13657
13658
13659
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 13656

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



13670
13671
13672
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 13670

def subtype_to_hash
  value
end