Class: Io::Flow::V0::Models::ExperiencePaymentMethodTag

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) ⇒ ExperiencePaymentMethodTag



15144
15145
15146
15147
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 15144

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

Instance Attribute Details

#valueObject (readonly)

Returns the value of attribute value.



15142
15143
15144
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 15142

def value
  @value
end

Class Method Details

.ALLObject



15165
15166
15167
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 15165

def ExperiencePaymentMethodTag.ALL
  @@all ||= [ExperiencePaymentMethodTag.display]
end

.apply(value) ⇒ Object

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



15150
15151
15152
15153
15154
15155
15156
15157
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 15150

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

.displayObject

A displayed payment method will be highlighted during the checkout process for an experience.



15171
15172
15173
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 15171

def ExperiencePaymentMethodTag.display
  @@_display ||= ExperiencePaymentMethodTag.new('display')
end

.from_string(value) ⇒ Object

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



15160
15161
15162
15163
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 15160

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

Instance Method Details

#subtype_to_hashObject



15175
15176
15177
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 15175

def subtype_to_hash
  value
end