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.
13320 13321 13322 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 13320 def initialize(value) @value = HttpClient::Preconditions.assert_class('value', value, String) end |
Instance Attribute Details
#value ⇒ Object (readonly)
Returns the value of attribute value.
13318 13319 13320 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 13318 def value @value end |
Class Method Details
.ALL ⇒ Object
13340 13341 13342 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 13340 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
13325 13326 13327 13328 13329 13330 13331 13332 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 13325 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
13344 13345 13346 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 13344 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
13335 13336 13337 13338 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 13335 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
13348 13349 13350 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 13348 def to_hash value end |