Module: Accounts

Included in:
TessituraRest
Defined in:
lib/tessitura_rest/crm/accounts.rb

Instance Method Summary collapse

Instance Method Details

#delete_account(account_id, transaction_origin = 'webapi', override_delete_protection = false, options = {}) ⇒ Object



2
3
4
5
6
7
# File 'lib/tessitura_rest/crm/accounts.rb', line 2

def (, transaction_origin = 'webapi', override_delete_protection = false, options = {})
  options.merge!(basic_auth: @auth, headers: @headers)
  self.class.delete(
    base_api_endpoint("CRM/Accounts/#{}?transactionOrigin=#{transaction_origin}&overrideDeleteProtection=#{override_delete_protection}"), options
  )
end

#get_all_accounts(constituent_id, inactive = false, include_affiliate = false, options = {}) ⇒ Object



9
10
11
12
13
14
15
# File 'lib/tessitura_rest/crm/accounts.rb', line 9

def get_all_accounts(constituent_id, inactive = false, include_affiliate = false, options = {})
  options.merge!(basic_auth: @auth, headers: @headers)
  response = self.class.get(
    base_api_endpoint("CRM/Accounts?constituentId=#{constituent_id}&includeInactive=#{inactive}&includeAffiliates=#{include_affiliate}"), options
  )
  JSON.parse(response.body)
end