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.



8899
8900
8901
8902
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 8899

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.



8897
8898
8899
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 8897

def value
  @value
end

Class Method Details

.ALLObject



8920
8921
8922
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 8920

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



8905
8906
8907
8908
8909
8910
8911
8912
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 8905

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.



8925
8926
8927
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 8925

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



8915
8916
8917
8918
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 8915

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



8929
8930
8931
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 8929

def subtype_to_hash
  value
end