Class: WellsFargo::API

Inherits:
Object
  • Object
show all
Includes:
Endpoints
Defined in:
lib/wells_fargo/api.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from Endpoints

#ach, #token, #wires

Constructor Details

#initialize(url, credentials) ⇒ API

Returns a new instance of API.



14
15
16
17
# File 'lib/wells_fargo/api.rb', line 14

def initialize(url, credentials)
  @url = url
  @credentials = credentials
end

Instance Attribute Details

#credentialsObject (readonly)

Returns the value of attribute credentials.



12
13
14
# File 'lib/wells_fargo/api.rb', line 12

def credentials
  @credentials
end

#urlObject (readonly)

Returns the value of attribute url.



12
13
14
# File 'lib/wells_fargo/api.rb', line 12

def url
  @url
end

Instance Method Details

#execute(method, path, params) ⇒ Object



19
20
21
22
23
# File 'lib/wells_fargo/api.rb', line 19

def execute(method, path, params)
  raw_response = connection.request(method: method, path: path, **params)

  Response.new(raw_response)
end