Sha256: 69769ff2d8b38cf1cfa2d9fb5c3f8f121f5b921d3b487bf02f90925d28ac07ec

Contents?: true

Size: 539 Bytes

Versions: 1

Compression:

Stored size: 539 Bytes

Contents

module PagseguroCatcher
  module Transaction
    
    class Amount
      attr_accessor :body
      
      def initialize(body)
        self.body = body
      end
      
      def gross
        self.body[:grossAmount].to_f
      end
      
      def discount
        self.body[:discountAmount].to_f
      end
      
      def fee
        self.body[:feeAmount].to_f
      end
      
      def net
        self.body[:netAmount].to_f
      end
      
      def extra
        self.body[:extraAmount].to_f
      end
      
    end
    
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
pagseguro_catcher-0.0.3 lib/pagseguro_catcher/transaction/amount.rb