class RubyRedtail::Contact::Account

Public Class Methods

new(contact_id, account_id, api_hash) click to toggle source
# File lib/ruby-redtail/contact/accounts.rb, line 4
def initialize(contact_id, account_id, api_hash)
  @api_hash = api_hash
  @contact_id = contact_id
  @account_id = account_id
end

Public Instance Methods

assets(account_id) click to toggle source
# File lib/ruby-redtail/contact/accounts.rb, line 22
def assets (account_id)
  RubyRedtail::Query.run("contacts/#{@contact_id}/#{account_id}/assets", @api_hash, "GET")
end
create(params) click to toggle source
# File lib/ruby-redtail/contact/accounts.rb, line 14
def create (params)
  update(@contact_id, 0, params)
end
fetch() click to toggle source
# File lib/ruby-redtail/contact/accounts.rb, line 10
def fetch
  RubyRedtail::Query.run("contacts/#{@contact_id}/accounts", @api_hash, "GET")
end
update(account_id, params) click to toggle source
# File lib/ruby-redtail/contact/accounts.rb, line 18
def update (account_id, params)
  RubyRedtail::Query.run("contacts/#{@contact_id}/accounts/#{account_id}", @api_hash, 'PUT', params)
end