lib/tessitura_rest/crm/accounts.rb in tessitura_rest-2.1.3 vs lib/tessitura_rest/crm/accounts.rb in tessitura_rest-2.1.4
- old
+ new
@@ -1,5 +1,12 @@
module Accounts
+ def delete_account(account_id, transaction_origin = 'webapi', override_delete_protection = false, options = {})
+ options.merge!(basic_auth: @auth, headers: @headers)
+ self.class.delete(
+ base_api_endpoint("CRM/Accounts/#{account_id}?transactionOrigin=#{transaction_origin}&overrideDeleteProtection=#{override_delete_protection}"), options
+ )
+ end
+
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
)