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.



8290
8291
8292
8293
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 8290

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.



8288
8289
8290
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 8288

def value
  @value
end

Class Method Details

.ALLObject



8311
8312
8313
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 8311

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



8296
8297
8298
8299
8300
8301
8302
8303
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 8296

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.



8317
8318
8319
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 8317

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



8306
8307
8308
8309
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 8306

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



8321
8322
8323
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 8321

def subtype_to_hash
  value
end