Class: FundAmerica::AchAuthorization

Inherits:
Object
  • Object
show all
Defined in:
lib/fund_america/ach_authorization.rb

Class Method Summary collapse

Class Method Details

.ach_tokens(options) ⇒ Object

TODO - As ACH token has a single end point it has been clubbed with ACH authorizations. Either all end points that are single methods have to be taken in a common file separately or clubbed with related end point set. To be discussed further on approach



48
49
50
# File 'lib/fund_america/ach_authorization.rb', line 48

def ach_tokens(options)
  API::request(:post, 'ach_tokens', options)
end

.agreement_htmlObject

End point: apps.fundamerica.com/api/ach_authorizations/agreement_html (GET) Usage: FundAmerica::AchAuthorization.agreement_html Output: Returns the ACH authorization HTML



36
37
38
# File 'lib/fund_america/ach_authorization.rb', line 36

def agreement_html
  API::request(:get, "ach_authorizations/agreement_html")
end

.create(options) ⇒ Object

End point: apps.fundamerica.com/api/ach_authorizations (POST) Usage: FundAmerica::AchAuthorization.create(options) Output: Creates a new ach_authorization



15
16
17
# File 'lib/fund_america/ach_authorization.rb', line 15

def create(options)
  API::request(:post, 'ach_authorizations', options)
end

.delete(ach_authorization_id) ⇒ Object

End point: apps.fundamerica.com/api/ach_authorizations/:id (DELETE) Usage: FundAmerica::AchAuthorization.delete(ach_authorization_id) Output: Deletes an ach_authorization with matching id



29
30
31
# File 'lib/fund_america/ach_authorization.rb', line 29

def delete(ach_authorization_id)
  API::request(:delete, "ach_authorizations/#{ach_authorization_id}")
end

.details(ach_authorization_id) ⇒ Object

End point: apps.fundamerica.com/api/ach_authorizations/:id (GET) Usage: FundAmerica::AchAuthorization.details(ach_authorization_id) Output: Returns the details of an ach_authorization with matching id



22
23
24
# File 'lib/fund_america/ach_authorization.rb', line 22

def details(ach_authorization_id)
  API::request(:get, "ach_authorizations/#{ach_authorization_id}")
end

.listObject

End point: apps.fundamerica.com/api/ach_authorizations (GET) Usage: FundAmerica::AchAuthorization.list Output: Returns list of ach_authorizations



8
9
10
# File 'lib/fund_america/ach_authorization.rb', line 8

def list
  API::request(:get, 'ach_authorizations')
end