Sha256: b5f08c0638cf5d81ac3d721bec4d95d8b585bdbd8b7151539ee564ca6b4b734f

Contents?: true

Size: 551 Bytes

Versions: 18

Compression:

Stored size: 551 Bytes

Contents

module PagSeguro
  class Transaction
    class PaymentMethod
      attr_reader :payment_method

      PAYMENT_TYPE = { '1' => :credit_card, '2' => :boleto, '3' => :tef,
        '4' => :pagseguro_balance, '5' => :io_paggo, '6' => :deposit }

      def initialize(payment_method)
        @payment_method = payment_method
      end

      def payment_type
        payment_method['type']
      end

      def payment_type_name
        PAYMENT_TYPE[payment_type]
      end

      def payment_code
        payment_method['code']
      end
    end
  end
end

Version data entries

18 entries across 18 versions & 1 rubygems

Version Path
pagseguro-transparente-0.2.5 lib/pagseguro/transaction/payment_method.rb
pagseguro-transparente-0.2.4 lib/pagseguro/transaction/payment_method.rb
pagseguro-transparente-0.2.3 lib/pagseguro/transaction/payment_method.rb
pagseguro-transparente-0.2.2 lib/pagseguro/transaction/payment_method.rb
pagseguro-transparente-0.2.1 lib/pagseguro/transaction/payment_method.rb
pagseguro-transparente-0.2.0 lib/pagseguro/transaction/payment_method.rb
pagseguro-transparente-0.1.3 lib/pagseguro/transaction/payment_method.rb
pagseguro-transparente-0.1.2 lib/pagseguro/transaction/payment_method.rb
pagseguro-transparente-0.1.1 lib/pagseguro/transaction/payment_method.rb
pagseguro-transparente-0.1.0 lib/pagseguro/transaction/payment_method.rb
pagseguro-transparente-0.0.9 lib/pagseguro/transaction/payment_method.rb
pagseguro-transparente-0.0.8 lib/pagseguro/transaction/payment_method.rb
pagseguro-transparente-0.0.7 lib/pagseguro/transaction/payment_method.rb
pagseguro-transparente-0.0.6 lib/pagseguro/transaction/payment_method.rb
pagseguro-transparente-0.0.5 lib/pagseguro/transaction/payment_method.rb
pagseguro-transparente-0.0.4 lib/pagseguro/transaction/payment_method.rb
pagseguro-transparente-0.0.3 lib/pagseguro/transaction/payment_method.rb
pagseguro-transparente-0.0.2 lib/pagseguro/transaction/payment_method.rb