class PayU::Customer
Constants
- ENDPOINT
Public Class Methods
new_from_api(params)
click to toggle source
Calls superclass method
# File lib/pay_u/customer.rb, line 12 def self.new_from_api(params) customer = super(params) customer.name = params["fullName"] if params["creditCards"] customer.credit_cards = params["creditCards"].map do |credit_card| PayU::CreditCard.new_from_api(credit_card) end end customer end
Public Instance Methods
to_params()
click to toggle source
# File lib/pay_u/customer.rb, line 27 def to_params { fullName: name, email: email, creditCards: credit_cards.map(&:to_params), } end