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.
24386 24387 24388 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 24386 def initialize(value) @value = HttpClient::Preconditions.assert_class('value', value, String) end |
Instance Attribute Details
#value ⇒ Object (readonly)
Returns the value of attribute value.
24384 24385 24386 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 24384 def value @value end |
Class Method Details
.ALL ⇒ Object
24406 24407 24408 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 24406 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
24391 24392 24393 24394 24395 24396 24397 24398 |
# 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 ⇒ Object
24410 24411 24412 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 24410 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
24401 24402 24403 24404 |
# 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 |
Instance Method Details
#to_hash ⇒ Object
24414 24415 24416 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 24414 def to_hash value end |