Module: PlentyClient::Account::Contact
- Includes:
- Endpoint, Request
- Defined in:
- lib/plenty_client.rb,
lib/plenty_client/account/contact.rb,
lib/plenty_client/account/contact/bank.rb,
lib/plenty_client/account/contact/type.rb,
lib/plenty_client/account/contact/address.rb
Defined Under Namespace
Classes: Address, Bank, Type
Constant Summary
collapse
- LIST_A_CONTACTS =
'/accounts/contacts'.freeze
- FIND_A_CONTACT =
'/accounts/contacts/{contactId}'.freeze
- CREATE_A_CONTACT =
'/accounts/contacts'.freeze
- UPDATE_A_CONTACT =
'/accounts/contacts/{contactId}'.freeze
- DELETE_A_CONTACT =
'/accounts/contacts/{contactId}'.freeze
Class Method Summary
collapse
Methods included from Request
included
Methods included from Endpoint
included
Class Method Details
.create(body = {}) ⇒ Object
22
23
24
|
# File 'lib/plenty_client/account/contact.rb', line 22
def create(body = {})
post(CREATE_A_CONTACT, body)
end
|
.destroy(contact_id, body = {}) ⇒ Object
30
31
32
|
# File 'lib/plenty_client/account/contact.rb', line 30
def destroy(contact_id, body = {})
delete(build_endpoint(DELETE_A_CONTACT, contact: contact_id), body)
end
|
.find(contact_id, headers = {}, &block) ⇒ Object
18
19
20
|
# File 'lib/plenty_client/account/contact.rb', line 18
def find(contact_id, = {}, &block)
get(build_endpoint(FIND_A_CONTACT, contact: contact_id), , &block)
end
|
.list(headers = {}, &block) ⇒ Object
14
15
16
|
# File 'lib/plenty_client/account/contact.rb', line 14
def list( = {}, &block)
get(build_endpoint(LIST_A_CONTACTS), , &block)
end
|
.update(contact_id, body = {}) ⇒ Object
26
27
28
|
# File 'lib/plenty_client/account/contact.rb', line 26
def update(contact_id, body = {})
put(build_endpoint(UPDATE_A_CONTACT, contact: contact_id), body)
end
|