Class: Iyzipay::Model::InstallmentPrices

Inherits:
Object
  • Object
show all
Defined in:
lib/iyzipay/model/installment_prices.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
# File 'lib/iyzipay/model/installment_prices.rb', line 4

def self.to_pki_string(request)
  unless request.nil?
    installment_prices = Array.new
    request.each do |item|
      item_pki = PkiBuilder.new.
          append(:installmentNumber, item[:installmentNumber]).
          append_price(:totalPrice, item[:totalPrice]).
          get_request_string
      installment_prices << item_pki
    end
    installment_prices
  end
end