lib/revo/loans_api/client.rb in revo-loans_api-0.0.23 vs lib/revo/loans_api/client.rb in revo-loans_api-0.0.24
- old
+ new
@@ -81,9 +81,19 @@
result = make_request(:get, "loan_requests/#{token}?amount=#{amount}")
result.success? ? result.response[:loan_request] : []
end
+ def get_loan_request_attributes(token:)
+ result = make_request(:get, "loan_requests/#{token}")
+ return result unless result.success?
+
+ Result.new(
+ success?: true,
+ response: result.response[:loan_request_attributes]
+ )
+ end
+
# prerequisite: a client with the LR's phone number should already exist
def document(token:, type:, format: 'html')
make_request(:get, "loan_requests/#{token}/documents/#{type}.#{format}")
end