Class: PayU::CreditCard
- Inherits:
-
Object
show all
- Includes:
- Resource
- Defined in:
- lib/pay_u/credit_card.rb
Constant Summary
collapse
- ENDPOINT =
"rest/v#{PayU::API_VERSION}/creditCards".freeze
Instance Method Summary
collapse
Methods included from Resource
#delete, included, #save, #to_update_params
Instance Method Details
#create_url ⇒ Object
30
31
32
33
34
|
# File 'lib/pay_u/credit_card.rb', line 30
def create_url
raise StandardError, "Missing customer id" unless customer_id
"#{PayU::Customer::ENDPOINT}/#{customer_id}/creditCards"
end
|
#to_params ⇒ Object
17
18
19
20
21
22
23
24
25
26
27
|
# File 'lib/pay_u/credit_card.rb', line 17
def to_params
{
name: name,
document: document,
number: number,
expMonth: exp_month,
expYear: exp_year,
type: type,
address: address,
}
end
|