Sha256: 9bb832a999728beb74c9abadbdffb71bf70970baa78e462a83909be8427068e4

Contents?: true

Size: 1.82 KB

Versions: 1

Compression:

Stored size: 1.82 KB

Contents

require "gerencianet"
require_relative "./credentials"

options = {
  client_id: CREDENTIALS::CLIENT_ID,
  client_secret: CREDENTIALS::CLIENT_SECRET,
  sandbox: CREDENTIALS::SANDBOX
}

params = {
  id: 1000
}

body = {
  title: "Balancete Demonstrativo",
  body: [
    {
      header: "Demonstrativo de Consumo",
      tables: [
        {
          rows: [
            [
              {
                align: "left",
                color: "#000000",
                style: "bold",
                text: "Exemplo de despesa",
                colspan: 2
              },
              {
                align: "left",
                color: "#000000",
                style: "bold",
                text: "Total lançado",
                colspan: 2
              }
            ],
            [
              {
                align: "left",
                color: "#000000",
                style: "normal",
                text: "Instalação",
                colspan: 2
              },
              {
                align: "left",
                color: "#000000",
                style: "normal",
                text: "R$ 100,00",
                colspan: 2
              }
            ]
          ]
        }
      ]
    },
    {
      header: "Balancete Geral",
      tables: [
        {
          rows: [
            [
              {
                align: "left",
                color: "#000000",
                style: "normal",
                text: "Confira na documentação da Gerencianet todas as configurações possíveis de um boleto balancete.",
                colspan: 4
              }
            ]
          ]
        }
      ]
    }
  ]
}

gerencianet = Gerencianet.new(options)
puts gerencianet.create_charge_balance_sheet(params: params, body: body)

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
gerencianet-1.0.0 examples/default/charge/create_charge_balance_sheet.rb