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.



8447
8448
8449
8450
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 8447

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

Instance Attribute Details

#valueObject (readonly)

Returns the value of attribute value.



8445
8446
8447
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 8445

def value
  @value
end

Class Method Details

.ALLObject



8468
8469
8470
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 8468

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



8453
8454
8455
8456
8457
8458
8459
8460
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 8453

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.



8474
8475
8476
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 8474

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



8463
8464
8465
8466
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 8463

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



8478
8479
8480
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 8478

def subtype_to_hash
  value
end