class Finicity::V1::Request::RefreshAccounts

Attributes

customer_id[RW]

Attributes

token[RW]

Attributes

Public Class Methods

new(token, customer_id) click to toggle source

Instance Methods

# File lib/finicity/v1/request/refresh_accounts.rb, line 19
def initialize(token, customer_id)
  @customer_id = customer_id
  @token = token
end

Public Instance Methods

headers() click to toggle source
# File lib/finicity/v1/request/refresh_accounts.rb, line 28
def headers
  {
    'Finicity-App-Key' => ::Finicity.config.app_key,
    'Finicity-App-Token' => token
  }
end
refresh_accounts() click to toggle source
# File lib/finicity/v1/request/refresh_accounts.rb, line 24
def refresh_accounts
  http_client.post(url, nil, headers)
end
url() click to toggle source
# File lib/finicity/v1/request/refresh_accounts.rb, line 35
def url
  ::URI.join(
    ::Finicity.config.base_url,
    'v1/',
    'customers/',
    "#{customer_id}/",
    'accounts'
  )
end