Class: STDDAPI::Objects::Customer

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(name) ⇒ Customer

Returns a new instance of Customer.



4
5
6
# File 'lib/objects.rb', line 4

def initialize(name)
  @name = name
end

Instance Attribute Details

#idObject

Returns the value of attribute id.



7
8
9
# File 'lib/objects.rb', line 7

def id
  @id
end

#nameObject

Returns the value of attribute name.



7
8
9
# File 'lib/objects.rb', line 7

def name
  @name
end

Instance Method Details

#to_jsonObject



11
12
13
# File 'lib/objects.rb', line 11

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

#to_sObject



8
9
10
# File 'lib/objects.rb', line 8

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