lib/revo/loans_api/client.rb in revo-loans_api-0.0.2 vs lib/revo/loans_api/client.rb in revo-loans_api-0.0.3
- old
+ new
@@ -69,11 +69,17 @@
def create_loan(token:, term_id:)
make_request(:post, "loan_requests/#{token}/loan", term_id: term_id)
end
- def finalize_loan(token:, code:)
- make_request(:post, "loan_requests/#{token}/loan/finalization", loan: { agree_processing: '1', confirmation_code: code })
+ def finalize_loan(token:, code:, sms_info: '0')
+ loan_params = {
+ agree_processing: '1',
+ confirmation_code: code,
+ agree_sms_info: sms_info
+ }
+
+ make_request(:post, "loan_requests/#{token}/loan/finalization", loan: loan_params)
end
# returns
def orders(store_id:, filters: {})
make_request(:get, 'orders', store_id: store_id, filters: filters)