Class: Reggora::LenderApiClient
- Inherits:
-
Object
- Object
- Reggora::LenderApiClient
- Defined in:
- lib/reggora.rb
Class Method Summary collapse
Instance Method Summary collapse
- #delete(url, params = {}) ⇒ Object
- #get(url, params = {}) ⇒ Object
-
#initialize(username, password, integration_token) ⇒ LenderApiClient
constructor
A new instance of LenderApiClient.
- #post(url, params = {}, query_params = {}) ⇒ Object
- #post_file(url, params = {}) ⇒ Object
- #put(url, params = {}) ⇒ Object
Constructor Details
#initialize(username, password, integration_token) ⇒ LenderApiClient
Returns a new instance of LenderApiClient.
15 16 17 18 |
# File 'lib/reggora.rb', line 15 def initialize(username, password, integration_token) = ApiClient.authenticate(username, password, 'lender') @api_client = Requests.new(["token"], integration_token, 'lender') end |
Class Method Details
.authenticate(username, password) ⇒ Object
22 23 24 |
# File 'lib/reggora.rb', line 22 def self.authenticate(username, password) ApiClient.authenticate(username, password, 'lender') end |
Instance Method Details
#delete(url, params = {}) ⇒ Object
42 43 44 |
# File 'lib/reggora.rb', line 42 def delete(url, params = {}) @api_client.delete(url, params) end |
#get(url, params = {}) ⇒ Object
26 27 28 |
# File 'lib/reggora.rb', line 26 def get(url, params = {}) @api_client.get(url, params) end |
#post(url, params = {}, query_params = {}) ⇒ Object
30 31 32 |
# File 'lib/reggora.rb', line 30 def post(url, params = {}, query_params = {}) @api_client.post(url, params, query_params) end |
#post_file(url, params = {}) ⇒ Object
34 35 36 |
# File 'lib/reggora.rb', line 34 def post_file(url, params = {}) @api_client.post_file(url, params) end |
#put(url, params = {}) ⇒ Object
38 39 40 |
# File 'lib/reggora.rb', line 38 def put(url, params = {}) @api_client.put(url, params) end |