Class: Io::Flow::V0::Models::OrganizationOnboardingState
- Inherits:
-
Object
- Object
- Io::Flow::V0::Models::OrganizationOnboardingState
- Defined in:
- lib/flow_commerce/flow_api_v0_client.rb
Instance Attribute Summary collapse
-
#current_state ⇒ Object
readonly
Returns the value of attribute current_state.
-
#id ⇒ Object
readonly
Returns the value of attribute id.
-
#organization ⇒ Object
readonly
Returns the value of attribute organization.
-
#transitions ⇒ Object
readonly
Returns the value of attribute transitions.
Instance Method Summary collapse
- #copy(incoming = {}) ⇒ Object
-
#initialize(incoming = {}) ⇒ OrganizationOnboardingState
constructor
A new instance of OrganizationOnboardingState.
- #to_hash ⇒ Object
- #to_json ⇒ Object
Constructor Details
#initialize(incoming = {}) ⇒ OrganizationOnboardingState
Returns a new instance of OrganizationOnboardingState.
55046 55047 55048 55049 55050 55051 55052 55053 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 55046 def initialize(incoming={}) opts = HttpClient::Helper.symbolize_keys(incoming) HttpClient::Preconditions.require_keys(opts, [:id, :organization, :transitions, :current_state], 'OrganizationOnboardingState') @id = HttpClient::Preconditions.assert_class('id', opts.delete(:id), String) @organization = (x = opts.delete(:organization); x.is_a?(::Io::Flow::V0::Models::OrganizationReference) ? x : ::Io::Flow::V0::Models::OrganizationReference.new(x)) @transitions = HttpClient::Preconditions.assert_class('transitions', opts.delete(:transitions), Array).map { |v| (x = v; x.is_a?(::Io::Flow::V0::Models::OnboardingStateTransition) ? x : ::Io::Flow::V0::Models::OnboardingStateTransition.new(x)) } @current_state = (x = opts.delete(:current_state); x.is_a?(::Io::Flow::V0::Models::OnboardingState) ? x : ::Io::Flow::V0::Models::OnboardingState.from_json(x)) end |
Instance Attribute Details
#current_state ⇒ Object (readonly)
Returns the value of attribute current_state.
55044 55045 55046 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 55044 def current_state @current_state end |
#id ⇒ Object (readonly)
Returns the value of attribute id.
55044 55045 55046 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 55044 def id @id end |
#organization ⇒ Object (readonly)
Returns the value of attribute organization.
55044 55045 55046 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 55044 def organization @organization end |
#transitions ⇒ Object (readonly)
Returns the value of attribute transitions.
55044 55045 55046 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 55044 def transitions @transitions end |
Instance Method Details
#copy(incoming = {}) ⇒ Object
55059 55060 55061 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 55059 def copy(incoming={}) OrganizationOnboardingState.new(to_hash.merge(HttpClient::Helper.symbolize_keys(incoming))) end |
#to_hash ⇒ Object
55063 55064 55065 55066 55067 55068 55069 55070 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 55063 def to_hash { :id => id, :organization => organization.to_hash, :transitions => transitions.map { |o| o.to_hash }, :current_state => current_state.to_hash } end |
#to_json ⇒ Object
55055 55056 55057 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 55055 def to_json JSON.dump(to_hash) end |