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.
10160 10161 10162 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 10160 def initialize(value) @value = HttpClient::Preconditions.assert_class('value', value, String) end |
Instance Attribute Details
#value ⇒ Object (readonly)
Returns the value of attribute value.
10158 10159 10160 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 10158 def value @value end |
Class Method Details
.ALL ⇒ Object
10180 10181 10182 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 10180 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
10165 10166 10167 10168 10169 10170 10171 10172 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 10165 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
10184 10185 10186 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 10184 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
10175 10176 10177 10178 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 10175 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
10188 10189 10190 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 10188 def to_hash value end |