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.



10062
10063
10064
10065
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 10062

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.



10060
10061
10062
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 10060

def value
  @value
end

Class Method Details

.ALLObject



10083
10084
10085
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 10083

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



10068
10069
10070
10071
10072
10073
10074
10075
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 10068

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.



10088
10089
10090
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 10088

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



10078
10079
10080
10081
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 10078

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



10092
10093
10094
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 10092

def subtype_to_hash
  value
end