Module: Accounts
- Included in:
- TessituraRest
- Defined in:
- lib/tessitura_rest/crm/accounts.rb
Instance Method Summary collapse
- #delete_account(account_id, transaction_origin = 'webapi', override_delete_protection = false, options = {}) ⇒ Object
- #get_all_accounts(constituent_id, inactive = false, include_affiliate = false, options = {}) ⇒ Object
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 delete_account(account_id, transaction_origin = 'webapi', override_delete_protection = false, = {}) .merge!(basic_auth: @auth, headers: @headers) self.class.delete( base_api_endpoint("CRM/Accounts/#{account_id}?transactionOrigin=#{transaction_origin}&overrideDeleteProtection=#{override_delete_protection}"), ) 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, = {}) .merge!(basic_auth: @auth, headers: @headers) response = self.class.get( base_api_endpoint("CRM/Accounts?constituentId=#{constituent_id}&includeInactive=#{inactive}&includeAffiliates=#{include_affiliate}"), ) JSON.parse(response.body) end |