class PlentyClient::Account::Contact::Address
Constants
- CONTACT_ADDRESS_BASE_PATH
- CREATE_A_CONTACT_ADDRESS
- DELETE_A_CONTACT_ADDRESS
- LIST_A_CONTACT_ADDRESSES
- SET_PRIMARY_CONTACT_ADDRESS
- UPDATE_A_CONTACT_ADDRESS
Public Class Methods
create(body = {})
click to toggle source
# File lib/plenty_client/account/contact/address.rb, line 26 def create(body = {}) post("#{CONTACT_ADDRESS_BASE_PATH}#{CREATE_A_CONTACT_ADDRESS}", body) end
destroy(contact_id, address_id, body = {})
click to toggle source
# File lib/plenty_client/account/contact/address.rb, line 37 def destroy(contact_id, address_id, body = {}) delete(build_endpoint("#{CONTACT_ADDRESS_BASE_PATH}#{DELETE_A_CONTACT_ADDRESS}", contact: contact_id, address: address_id), body) end
list(contact_id, address_type = '', headers = {}, &block)
click to toggle source
# File lib/plenty_client/account/contact/address.rb, line 19 def list(contact_id, address_type = '', headers = {}, &block) get(build_endpoint("#{CONTACT_ADDRESS_BASE_PATH}#{LIST_A_CONTACT_ADDRESSES}", contact: contact_id, address_type: address_type), headers, &block) end
update(contact_id, address_id, body = {})
click to toggle source
# File lib/plenty_client/account/contact/address.rb, line 30 def update(contact_id, address_id, body = {}) put(build_endpoint("#{CONTACT_ADDRESS_BASE_PATH}#{UPDATE_A_CONTACT_ADDRESS}", contact: contact_id, address: address_id), body) end
update_primary(contact_id, address_id, address_type, body = {})
click to toggle source
# File lib/plenty_client/account/contact/address.rb, line 44 def update_primary(contact_id, address_id, address_type, body = {}) put(build_endpoint("#{CONTACT_ADDRESS_BASE_PATH}#{SET_PRIMARY_CONTACT_ADDRESS}", contact: contact_id, address: address_id, address_type: address_type), body) end