class Io::Flow::V0::Models::PaymentMethodRuleContentKey

Attributes

value[R]

Public Class Methods

ALL() click to toggle source
# File lib/flow_commerce/flow_api_v0_client.rb, line 24406
def PaymentMethodRuleContentKey.ALL
  @@all ||= [PaymentMethodRuleContentKey.description]
end
apply(value) click to toggle source

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

# File lib/flow_commerce/flow_api_v0_client.rb, line 24391
def PaymentMethodRuleContentKey.apply(value)
  if value.instance_of?(PaymentMethodRuleContentKey)
    value
  else
    HttpClient::Preconditions.assert_class_or_nil('value', value, String)
    value.nil? ? nil : (from_string(value) || PaymentMethodRuleContentKey.new(value))
  end
end
description() click to toggle source
# File lib/flow_commerce/flow_api_v0_client.rb, line 24410
def PaymentMethodRuleContentKey.description
  @@_description ||= PaymentMethodRuleContentKey.new('description')
end
from_string(value) click to toggle source

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

# File lib/flow_commerce/flow_api_v0_client.rb, line 24401
def PaymentMethodRuleContentKey.from_string(value)
  HttpClient::Preconditions.assert_class('value', value, String)
  PaymentMethodRuleContentKey.ALL.find { |v| v.value == value }
end
new(value) click to toggle source
# File lib/flow_commerce/flow_api_v0_client.rb, line 24386
def initialize(value)
  @value = HttpClient::Preconditions.assert_class('value', value, String)
end

Public Instance Methods

to_hash() click to toggle source
# File lib/flow_commerce/flow_api_v0_client.rb, line 24414
def to_hash
  value
end