Class: STDDAPI::Customer

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(name) ⇒ Customer

Returns a new instance of Customer.



94
95
96
# File 'lib/stdd_api.rb', line 94

def initialize(name)
  @name = name
end

Instance Attribute Details

#idObject

Returns the value of attribute id.



97
98
99
# File 'lib/stdd_api.rb', line 97

def id
  @id
end

#nameObject

Returns the value of attribute name.



97
98
99
# File 'lib/stdd_api.rb', line 97

def name
  @name
end

Instance Method Details

#to_jsonObject



101
102
103
# File 'lib/stdd_api.rb', line 101

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

#to_sObject



98
99
100
# File 'lib/stdd_api.rb', line 98

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