Class: Io::Flow::V0::Models::RatecardOwner
- Inherits:
-
Object
- Object
- Io::Flow::V0::Models::RatecardOwner
- 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 RatecardOwner for this value, creating a new instance for an unknown value.
- .flow ⇒ Object
-
.from_string(value) ⇒ Object
Returns the instance of RatecardOwner for this value, or nil if not found.
- .organization ⇒ Object
Instance Method Summary collapse
-
#initialize(value) ⇒ RatecardOwner
constructor
A new instance of RatecardOwner.
- #to_hash ⇒ Object
Constructor Details
#initialize(value) ⇒ RatecardOwner
Returns a new instance of RatecardOwner.
19682 19683 19684 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 19682 def initialize(value) @value = HttpClient::Preconditions.assert_class('value', value, String) end |
Instance Attribute Details
#value ⇒ Object (readonly)
Returns the value of attribute value.
19680 19681 19682 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 19680 def value @value end |
Class Method Details
.ALL ⇒ Object
19702 19703 19704 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 19702 def RatecardOwner.ALL @@all ||= [RatecardOwner.flow, RatecardOwner.organization] end |
.apply(value) ⇒ Object
Returns the instance of RatecardOwner for this value, creating a new instance for an unknown value
19687 19688 19689 19690 19691 19692 19693 19694 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 19687 def RatecardOwner.apply(value) if value.instance_of?(RatecardOwner) value else HttpClient::Preconditions.assert_class_or_nil('value', value, String) value.nil? ? nil : (from_string(value) || RatecardOwner.new(value)) end end |
.flow ⇒ Object
19706 19707 19708 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 19706 def RatecardOwner.flow @@_flow ||= RatecardOwner.new('flow') end |
.from_string(value) ⇒ Object
Returns the instance of RatecardOwner for this value, or nil if not found
19697 19698 19699 19700 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 19697 def RatecardOwner.from_string(value) HttpClient::Preconditions.assert_class('value', value, String) RatecardOwner.ALL.find { |v| v.value == value } end |
.organization ⇒ Object
19710 19711 19712 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 19710 def RatecardOwner.organization @@_organization ||= RatecardOwner.new('organization') end |
Instance Method Details
#to_hash ⇒ Object
19714 19715 19716 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 19714 def to_hash value end |