Class: Finicity::V1::Request::DeleteAccount
- Inherits:
-
Object
- Object
- Finicity::V1::Request::DeleteAccount
- Extended by:
- HTTPClient::IncludeClient
- Includes:
- Logger
- Defined in:
- lib/finicity/v1/request/delete_account.rb
Instance Attribute Summary collapse
-
#account_id ⇒ Object
Attributes.
-
#customer_id ⇒ Object
Attributes.
-
#token ⇒ Object
Attributes.
Instance Method Summary collapse
- #delete_account ⇒ Object
- #headers ⇒ Object
-
#initialize(token, customer_id, account_id) ⇒ DeleteAccount
constructor
Instance Methods.
- #url ⇒ Object
Methods included from Logger
Constructor Details
#initialize(token, customer_id, account_id) ⇒ DeleteAccount
Instance Methods
18 19 20 21 22 |
# File 'lib/finicity/v1/request/delete_account.rb', line 18 def initialize(token, customer_id, account_id) @account_id = account_id @customer_id = customer_id @token = token end |
Instance Attribute Details
#account_id ⇒ Object
Attributes
13 14 15 |
# File 'lib/finicity/v1/request/delete_account.rb', line 13 def account_id @account_id end |
#customer_id ⇒ Object
Attributes
13 14 15 |
# File 'lib/finicity/v1/request/delete_account.rb', line 13 def customer_id @customer_id end |
#token ⇒ Object
Attributes
13 14 15 |
# File 'lib/finicity/v1/request/delete_account.rb', line 13 def token @token end |
Instance Method Details
#delete_account ⇒ Object
24 25 26 |
# File 'lib/finicity/v1/request/delete_account.rb', line 24 def delete_account http_client.delete(url, nil, headers) end |
#headers ⇒ Object
28 29 30 31 32 33 |
# File 'lib/finicity/v1/request/delete_account.rb', line 28 def headers { 'Finicity-App-Key' => ::Finicity.config.app_key, 'Finicity-App-Token' => token } end |
#url ⇒ Object
35 36 37 38 39 40 41 42 43 44 |
# File 'lib/finicity/v1/request/delete_account.rb', line 35 def url ::URI.join( ::Finicity.config.base_url, 'v1/', 'customers/', "#{customer_id}/", 'accounts/', "#{account_id}" ) end |