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.



9044
9045
9046
9047
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 9044

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

Instance Attribute Details

#valueObject (readonly)

Returns the value of attribute value.



9042
9043
9044
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 9042

def value
  @value
end

Class Method Details

.ALLObject



9065
9066
9067
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 9065

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



9050
9051
9052
9053
9054
9055
9056
9057
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 9050

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.



9070
9071
9072
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 9070

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



9060
9061
9062
9063
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 9060

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



9074
9075
9076
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 9074

def subtype_to_hash
  value
end