Class: Iyzipay::Model::PaymentCard

Inherits:
Object
  • Object
show all
Defined in:
lib/iyzipay/model/payment_card.rb

Class Method Summary collapse

Class Method Details

.to_pki_string(request) ⇒ Object



4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
# File 'lib/iyzipay/model/payment_card.rb', line 4

def self.to_pki_string(request)
  unless request.nil?
    PkiBuilder.new.
        append(:cardHolderName, request[:cardHolderName]).
        append(:cardNumber, request[:cardNumber]).
        append(:expireYear, request[:expireYear]).
        append(:expireMonth, request[:expireMonth]).
        append(:cvc, request[:cvc]).
        append(:registerCard, request[:registerCard]).
        append(:cardAlias, request[:cardAlias]).
        append(:cardToken, request[:cardToken]).
        append(:cardUserKey, request[:cardUserKey]).
        get_request_string
  end
end