Sha256: 537c0e86a0fa3eade274267d9ff8f556bb4df7226cc0d04b2574a48ea7c65356

Contents?: true

Size: 889 Bytes

Versions: 4

Compression:

Stored size: 889 Bytes

Contents

require 'json'

class BoletoTransaction

  # Valor do boleto em centavos
  attr_accessor :AmountInCents

  # Número do banco
  attr_accessor :BankNumber

  # Instruções a serem impressas no boleto
  attr_accessor :Instructions

  # Número do documento
  attr_accessor :DocumentNumber

  # Indentificador da transação no sistema da loja
  attr_accessor :TransactionReference

  # Data da criação da transação no sistema da loja
  attr_accessor :TransactionDateInMerchant

  # Opções da transação de boleto
  attr_accessor :Options

  # Endereço de cobrança
  attr_accessor :BillingAddress

  def initialize
    @Options = BoletoTransactionOptions.new
    @BillingAddress = BillingAddress.new
  end


  def to_json
    hash = {}
    instance_variables.each {|var| hash[var.to_s.delete('@')] = instance_variable_get(var) }
    hash

    #JSON.pretty_generate(hash)
  end

end

Version data entries

4 entries across 4 versions & 2 rubygems

Version Path
stone_ecommerce-1.0.3 lib/gateway/BoletoTransaction/boleto_transaction.rb
mundipagg_sdk-1.0.3 lib/gateway/BoletoTransaction/boleto_transaction.rb
stone_ecommerce-1.0.2 lib/gateway/BoletoTransaction/boleto_transaction.rb
stone_ecommerce-1.0.0 lib/gateway/BoletoTransaction/boleto_transaction.rb