Class: Io::Flow::V0::Models::OrganizationTokenFormV2

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 = {}) ⇒ OrganizationTokenFormV2

Returns a new instance of OrganizationTokenFormV2.



55563
55564
55565
55566
55567
55568
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 55563

def initialize(incoming={})
  opts = HttpClient::Helper.symbolize_keys(incoming)
  HttpClient::Preconditions.require_keys(opts, [:organization_id], 'OrganizationTokenFormV2')
  @organization_id = HttpClient::Preconditions.assert_class('organization_id', opts.delete(:organization_id), String)
  @description = (x = opts.delete(:description); x.nil? ? nil : HttpClient::Preconditions.assert_class('description', x, String))
end

Instance Attribute Details

#descriptionObject (readonly)

Returns the value of attribute description.



55561
55562
55563
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 55561

def description
  @description
end

#organization_idObject (readonly)

Returns the value of attribute organization_id.



55561
55562
55563
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 55561

def organization_id
  @organization_id
end

Instance Method Details

#copy(incoming = {}) ⇒ Object



55574
55575
55576
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 55574

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

#to_hashObject



55578
55579
55580
55581
55582
55583
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 55578

def to_hash
  {
    :organization_id => organization_id,
    :description => description
  }
end

#to_jsonObject



55570
55571
55572
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 55570

def to_json
  JSON.dump(to_hash)
end