Class: SevenApi::Resources::Contacts
- Inherits:
-
SevenApi::Resource
- Object
- SevenApi::Resource
- SevenApi::Resources::Contacts
- Defined in:
- lib/seven_api/resources/contacts.rb
Constant Summary
Constants inherited from SevenApi::Resource
Instance Attribute Summary
Attributes inherited from SevenApi::Resource
#api_key, #builder, #conn, #endpoint, #http_methods, #request_methods, #sent_with
Instance Method Summary collapse
-
#all(params = {}) ⇒ Hash
Retrieve contacts associated with the API key read more: docs.seven.io/en/rest-api/endpoints/contacts#query-contact-list.
-
#create(params) ⇒ Hash
Create a contact read more: docs.seven.io/en/rest-api/endpoints/contacts#create-contact.
-
#delete(id) ⇒ Hash
Delete a contact with given ID read more: docs.seven.io/en/rest-api/endpoints/contacts#delete-contact.
-
#one(id) ⇒ Hash
Retrieve a contact associated with the API key read more: docs.seven.io/en/rest-api/endpoints/contacts#retrieve-contact.
-
#update(contact) ⇒ Hash
Update a contact read more: docs.seven.io/en/rest-api/endpoints/contacts#update-contact.
Methods inherited from SevenApi::Resource
get_endpoint, get_http_methods, #initialize
Constructor Details
This class inherits a constructor from SevenApi::Resource
Instance Method Details
#all(params = {}) ⇒ Hash
Retrieve contacts associated with the API key read more: docs.seven.io/en/rest-api/endpoints/contacts#query-contact-list
21 22 23 |
# File 'lib/seven_api/resources/contacts.rb', line 21 def all(params = {}) request(params) end |
#create(params) ⇒ Hash
Create a contact read more: docs.seven.io/en/rest-api/endpoints/contacts#create-contact
45 46 47 |
# File 'lib/seven_api/resources/contacts.rb', line 45 def create(params) request( params) end |
#delete(id) ⇒ Hash
Delete a contact with given ID read more: docs.seven.io/en/rest-api/endpoints/contacts#delete-contact
37 38 39 |
# File 'lib/seven_api/resources/contacts.rb', line 37 def delete(id) request({}, {}, "/#{id}") end |
#one(id) ⇒ Hash
Retrieve a contact associated with the API key read more: docs.seven.io/en/rest-api/endpoints/contacts#retrieve-contact
29 30 31 |
# File 'lib/seven_api/resources/contacts.rb', line 29 def one(id) request({}, {}, "/#{id}") end |
#update(contact) ⇒ Hash
Update a contact read more: docs.seven.io/en/rest-api/endpoints/contacts#update-contact
53 54 55 |
# File 'lib/seven_api/resources/contacts.rb', line 53 def update(contact) request(contact, {}, "/#{contact['id']}") end |