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.
17964 17965 17966 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 17964 def initialize(value) @value = HttpClient::Preconditions.assert_class('value', value, String) end |
Instance Attribute Details
#value ⇒ Object (readonly)
Returns the value of attribute value.
17962 17963 17964 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 17962 def value @value end |
Class Method Details
.ALL ⇒ Object
17984 17985 17986 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 17984 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
17969 17970 17971 17972 17973 17974 17975 17976 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 17969 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
17988 17989 17990 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 17988 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
17979 17980 17981 17982 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 17979 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
17992 17993 17994 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 17992 def to_hash value end |