Module: Credova::Payments
- Extended by:
- API
- Defined in:
- lib/credova/payments.rb
Constant Summary
collapse
- ENDPOINTS =
{
lowest_payment_option: "calculator/store/%s/amount/%s/lowestpaymentoption".freeze,
lender_payment_options: "calculator/lender/%s/amount/%s".freeze,
store_payment_options: "calculator/store/%s/amount/%s".freeze,
}
Constants included
from API
API::API_VERSION, API::DEVELOPMENT_URL, API::FILE_UPLOAD_ATTRS, API::PRODUCTION_URL, API::USER_AGENT
Class Method Summary
collapse
Methods included from API
get_request, post_file_request, post_request
Class Method Details
.lender_payment_options(lender_code, amount_to_finance) ⇒ Object
20
21
22
23
24
|
# File 'lib/credova/payments.rb', line 20
def self.lender_payment_options(lender_code, amount_to_finance)
endpoint = ENDPOINTS[:lender_payment_options] % [lender_code, amount_to_finance]
post_request(endpoint)
end
|
.lowest_payment_option(store_code, amount_to_finance) ⇒ Object
14
15
16
17
18
|
# File 'lib/credova/payments.rb', line 14
def self.lowest_payment_option(store_code, amount_to_finance)
endpoint = ENDPOINTS[:lowest_payment_option] % [store_code, amount_to_finance]
post_request(endpoint)
end
|
.store_payment_options(store_code, amount_to_finance) ⇒ Object
26
27
28
29
30
|
# File 'lib/credova/payments.rb', line 26
def self.store_payment_options(store_code, amount_to_finance)
endpoint = ENDPOINTS[:store_payment_options] % [store_code, amount_to_finance]
post_request(endpoint)
end
|