Class: Io::Flow::V0::Models::OnboardingOrganizationReference

Inherits:
Object
  • Object
show all
Defined in:
lib/flow_commerce/flow_api_v0_client.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(incoming = {}) ⇒ OnboardingOrganizationReference

Returns a new instance of OnboardingOrganizationReference.



50871
50872
50873
50874
50875
50876
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 50871

def initialize(incoming={})
  opts = HttpClient::Helper.symbolize_keys(incoming)
  HttpClient::Preconditions.require_keys(opts, [:id, :status], 'OnboardingOrganizationReference')
  @id = HttpClient::Preconditions.assert_class('id', opts.delete(:id), String)
  @status = (x = opts.delete(:status); x.is_a?(::Io::Flow::V0::Models::OrganizationStatus) ? x : ::Io::Flow::V0::Models::OrganizationStatus.apply(x))
end

Instance Attribute Details

#idObject (readonly)

Returns the value of attribute id.



50869
50870
50871
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 50869

def id
  @id
end

#statusObject (readonly)

Returns the value of attribute status.



50869
50870
50871
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 50869

def status
  @status
end

Instance Method Details

#copy(incoming = {}) ⇒ Object



50882
50883
50884
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 50882

def copy(incoming={})
  OnboardingOrganizationReference.new(to_hash.merge(HttpClient::Helper.symbolize_keys(incoming)))
end

#to_hashObject



50886
50887
50888
50889
50890
50891
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 50886

def to_hash
  {
    :id => id,
    :status => status.value
  }
end

#to_jsonObject



50878
50879
50880
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 50878

def to_json
  JSON.dump(to_hash)
end