Class: STDDAPI::Objects::Project

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(customer_id, name) ⇒ Project

Returns a new instance of Project.



17
18
19
20
# File 'lib/objects.rb', line 17

def initialize(customer_id,name)
  @name = name
  @customer_id = customer_id
end

Instance Attribute Details

#customer_idObject

Returns the value of attribute customer_id.



21
22
23
# File 'lib/objects.rb', line 21

def customer_id
  @customer_id
end

#idObject

Returns the value of attribute id.



21
22
23
# File 'lib/objects.rb', line 21

def id
  @id
end

#nameObject

Returns the value of attribute name.



21
22
23
# File 'lib/objects.rb', line 21

def name
  @name
end

Instance Method Details

#to_jsonObject



25
26
27
# File 'lib/objects.rb', line 25

def to_json
  {'name' => @name,'customer_id' => customer_id}.to_json
end

#to_sObject



22
23
24
# File 'lib/objects.rb', line 22

def to_s
  "name: #{@name}, customer_id: #{@customer_id}, id: #{@id}"
end