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

Returns a new instance of ExperiencePaymentMethodTag.



14229
14230
14231
14232
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 14229

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.



14227
14228
14229
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 14227

def value
  @value
end

Class Method Details

.ALLObject



14250
14251
14252
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 14250

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



14235
14236
14237
14238
14239
14240
14241
14242
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 14235

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.



14256
14257
14258
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 14256

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



14245
14246
14247
14248
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 14245

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



14260
14261
14262
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 14260

def subtype_to_hash
  value
end