class Io::Flow::V0::Models::OrganizationOnboardingState
Attributes
current_state[R]
id[R]
organization[R]
transitions[R]
Public Class Methods
new(incoming={})
click to toggle source
# 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
Public Instance Methods
copy(incoming={})
click to toggle source
# 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()
click to toggle source
# 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()
click to toggle source
# File lib/flow_commerce/flow_api_v0_client.rb, line 55055 def to_json JSON.dump(to_hash) end