Class: Io::Flow::V0::Models::PaymentMethodRuleContentKey
- Inherits:
-
Object
- Object
- Io::Flow::V0::Models::PaymentMethodRuleContentKey
- Defined in:
- lib/flow_commerce/flow_api_v0_client.rb
Instance Attribute Summary collapse
-
#value ⇒ Object
readonly
Returns the value of attribute value.
Class Method Summary collapse
- .ALL ⇒ Object
-
.apply(value) ⇒ Object
Returns the instance of PaymentMethodRuleContentKey for this value, creating a new instance for an unknown value.
- .description ⇒ Object
-
.from_string(value) ⇒ Object
Returns the instance of PaymentMethodRuleContentKey for this value, or nil if not found.
Instance Method Summary collapse
-
#initialize(value) ⇒ PaymentMethodRuleContentKey
constructor
A new instance of PaymentMethodRuleContentKey.
- #to_hash ⇒ Object
Constructor Details
#initialize(value) ⇒ PaymentMethodRuleContentKey
Returns a new instance of PaymentMethodRuleContentKey.
10232 10233 10234 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 10232 def initialize(value) @value = HttpClient::Preconditions.assert_class('value', value, String) end |
Instance Attribute Details
#value ⇒ Object (readonly)
Returns the value of attribute value.
10230 10231 10232 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 10230 def value @value end |
Class Method Details
.ALL ⇒ Object
10252 10253 10254 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 10252 def PaymentMethodRuleContentKey.ALL @@all ||= [PaymentMethodRuleContentKey.description] end |
.apply(value) ⇒ Object
Returns the instance of PaymentMethodRuleContentKey for this value, creating a new instance for an unknown value
10237 10238 10239 10240 10241 10242 10243 10244 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 10237 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 ⇒ Object
10256 10257 10258 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 10256 def PaymentMethodRuleContentKey.description @@_description ||= PaymentMethodRuleContentKey.new('description') end |
.from_string(value) ⇒ Object
Returns the instance of PaymentMethodRuleContentKey for this value, or nil if not found
10247 10248 10249 10250 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 10247 def PaymentMethodRuleContentKey.from_string(value) HttpClient::Preconditions.assert_class('value', value, String) PaymentMethodRuleContentKey.ALL.find { |v| v.value == value } end |
Instance Method Details
#to_hash ⇒ Object
10260 10261 10262 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 10260 def to_hash value end |