Class: Sellsy::Client
- Inherits:
-
Object
- Object
- Sellsy::Client
- Defined in:
- lib/sellsy/clients.rb
Instance Attribute Summary collapse
-
#id ⇒ Object
Returns the value of attribute id.
-
#name ⇒ Object
Returns the value of attribute name.
Instance Method Summary collapse
Instance Attribute Details
#id ⇒ Object
Returns the value of attribute id.
5 6 7 |
# File 'lib/sellsy/clients.rb', line 5 def id @id end |
#name ⇒ Object
Returns the value of attribute name.
6 7 8 |
# File 'lib/sellsy/clients.rb', line 6 def name @name end |
Instance Method Details
#create ⇒ Object
8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 |
# File 'lib/sellsy/clients.rb', line 8 def create command = { 'method' => 'Client.create', 'params' => { 'third' => { 'name' => @name } } } response = MultiJson.load(Sellsy::Api.request command) @id = response['response']['client_id'] return response['status'] == 'success' end |
#update ⇒ Object
25 26 27 |
# File 'lib/sellsy/clients.rb', line 25 def update end |