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.



51422
51423
51424
51425
51426
51427
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 51422

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.



51420
51421
51422
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 51420

def description
  @description
end

#organization_idObject (readonly)

Returns the value of attribute organization_id.



51420
51421
51422
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 51420

def organization_id
  @organization_id
end

Instance Method Details

#copy(incoming = {}) ⇒ Object



51433
51434
51435
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 51433

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

#to_hashObject



51437
51438
51439
51440
51441
51442
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 51437

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

#to_jsonObject



51429
51430
51431
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 51429

def to_json
  JSON.dump(to_hash)
end