Sha256: ddedcaab9708dcb6262fcc6002cbbdf212fe81248b2a05c6e8c495a55d9f1cc3

Contents?: true

Size: 747 Bytes

Versions: 11

Compression:

Stored size: 747 Bytes

Contents

module GenesisRuby
  module Api
    module Mixins
      module Requests
        module Financial
          # Mixin Payment Attributes, brings Payment Attributes partial
          module PaymentAttributes

            attr_accessor :amount
            attr_writer   :currency

            # Currency Attribute getter
            def currency
              @currency.to_s.upcase
            end

            protected

            # Returns the Payment Attributes structure with the Genesis Request keys
            def payment_attributes_structure
              {
                amount:   transform_amount(amount, currency),
                currency: currency
              }
            end

          end
        end
      end
    end
  end
end

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
genesis_ruby-0.2.0 lib/genesis_ruby/api/mixins/requests/financial/payment_attributes.rb
genesis_ruby-0.1.9 lib/genesis_ruby/api/mixins/requests/financial/payment_attributes.rb
genesis_ruby-0.1.8 lib/genesis_ruby/api/mixins/requests/financial/payment_attributes.rb
genesis_ruby-0.1.7 lib/genesis_ruby/api/mixins/requests/financial/payment_attributes.rb
genesis_ruby-0.1.6 lib/genesis_ruby/api/mixins/requests/financial/payment_attributes.rb
genesis_ruby-0.1.5 lib/genesis_ruby/api/mixins/requests/financial/payment_attributes.rb
genesis_ruby-0.1.4 lib/genesis_ruby/api/mixins/requests/financial/payment_attributes.rb
genesis_ruby-0.1.3 lib/genesis_ruby/api/mixins/requests/financial/payment_attributes.rb
genesis_ruby-0.1.2 lib/genesis_ruby/api/mixins/requests/financial/payment_attributes.rb
genesis_ruby-0.1.1 lib/genesis_ruby/api/mixins/requests/financial/payment_attributes.rb
genesis_ruby-0.1.0 lib/genesis_ruby/api/mixins/requests/financial/payment_attributes.rb