module PlentyClient::Account

Constants

ACCOUNT_LOGIN
ACCOUNT_LOGOUT
ACCOUNT_REFRESH
CREATE_ACCOUNT
DELETE_ACCOUNT
FIND_ACCOUNT
LIST_ACCOUNTS
LIST_ACCOUNTS_CONTACTS
UPDATE_ACCOUNT

Public Class Methods

create(body = {}) click to toggle source
# File lib/plenty_client/account.rb, line 28
def create(body = {})
  post(CREATE_ACCOUNT, body)
end
destroy(account_id, body = {}) click to toggle source
# File lib/plenty_client/account.rb, line 36
def destroy(account_id, body = {})
  delete(build_endpoint(DELETE_ACCOUNT, account: account_id), body)
end
find(account_id, headers = {}, &block) click to toggle source
# File lib/plenty_client/account.rb, line 24
def find(account_id, headers = {}, &block)
  get(build_endpoint(FIND_ACCOUNT, account: account_id), headers, &block)
end
list(headers = {}, &block) click to toggle source
# File lib/plenty_client/account.rb, line 20
def list(headers = {}, &block)
  get(build_endpoint(LIST_ACCOUNTS), headers, &block)
end
list_contacts(account_id, headers = {}, &block) click to toggle source
# File lib/plenty_client/account.rb, line 40
def list_contacts(account_id, headers = {}, &block)
  get(build_endpoint(LIST_ACCOUNTS_CONTACTS, account: account_id), headers, &block)
end
login(body = {}) click to toggle source
# File lib/plenty_client/account.rb, line 44
def login(body = {})
  post(ACCOUNT_LOGIN, body)
end
logout(body = {}) click to toggle source
# File lib/plenty_client/account.rb, line 52
def logout(body = {})
  post(ACCOUNT_LOGOUT, body)
end
refresh_login(body = {}) click to toggle source
# File lib/plenty_client/account.rb, line 48
def refresh_login(body = {})
  post(ACCOUNT_REFRESH, body)
end
update(account_id, body = {}) click to toggle source
# File lib/plenty_client/account.rb, line 32
def update(account_id, body = {})
  put(build_endpoint(UPDATE_ACCOUNT, account: account_id), body)
end