Class: PlentyClient::Account::Contact::Type
- Inherits:
-
Object
- Object
- PlentyClient::Account::Contact::Type
- Defined in:
- lib/plenty_client/account/contact/type.rb
Constant Summary collapse
- LIST_A_CONTACT_TYPES =
'/accounts/contacts/types'
- FIND_A_CONTACT_TYPE =
'/accounts/contacts/types/{typeId}'
- CREATE_A_CONTACT_TYPE =
'/accounts/contacts/types'
- UPDATE_A_CONTACT_TYPE =
'/accounts/contacts/types/{typeId}'
- DELETE_A_CONTACT_TYPE =
'/accounts/contacts/types/{typeId}'
Class Method Summary collapse
- .create(body = {}) ⇒ Object
- .destroy(type, body = {}) ⇒ Object
- .find(type, headers = {}, &block) ⇒ Object
- .list(headers = {}, &block) ⇒ Object
- .update(type, body = {}) ⇒ Object
Methods included from Request
Methods included from Endpoint
Class Method Details
.create(body = {}) ⇒ Object
25 26 27 |
# File 'lib/plenty_client/account/contact/type.rb', line 25 def create(body = {}) post(CREATE_A_CONTACT_TYPE, body) end |
.destroy(type, body = {}) ⇒ Object
33 34 35 |
# File 'lib/plenty_client/account/contact/type.rb', line 33 def destroy(type, body = {}) delete(build_endpoint(DELETE_A_CONTACT_TYPE, type: type), body) end |
.find(type, headers = {}, &block) ⇒ Object
21 22 23 |
# File 'lib/plenty_client/account/contact/type.rb', line 21 def find(type, headers = {}, &block) get(build_endpoint(FIND_A_CONTACT_TYPE, type: type), headers, &block) end |
.list(headers = {}, &block) ⇒ Object
17 18 19 |
# File 'lib/plenty_client/account/contact/type.rb', line 17 def list(headers = {}, &block) get(build_endpoint(LIST_A_CONTACT_TYPES), headers, &block) end |
.update(type, body = {}) ⇒ Object
29 30 31 |
# File 'lib/plenty_client/account/contact/type.rb', line 29 def update(type, body = {}) put(build_endpoint(UPDATE_A_CONTACT_TYPE, type: type), body) end |