Coder Social home page Coder Social logo

rafaelsilva / cobregratis-perl Goto Github PK

View Code? Open in Web Editor NEW

This project forked from cobregratis/cobregratis-perl

0.0 0.0 0.0 71 KB

Perl Wrapper para a API do Cobre Grátis

Home Page: https://github.com/BielSystems/cobregratis-api

License: MIT License

Perl 100.00%

cobregratis-perl's Introduction

Perl Wrapper para a API do Cobre Grátis

Essa biblioteca é um conjunto de classes em Perl para acessar as informações do Cobre Grátis através da API.

Todas as classes são herdadas do ActiveResouce. Veja a documentação do ActiveResouce para mais informações.

Instalando

git clone https://github.com/BielSystems/cobregratis-perl.git

Pré-requisitos

  • ActiveResource
  • common::sense
  • XML::Hash

Configurando seu token

use CobreGratis::Bank_Billet;

Bank_Billet->user("seu_token");
Bank_Billet->password("X");

Uso

# criar um boleto
my $bank_billet = Bank_Billet->create(
  amount => 230.50,
  expire_at => '2015-07-22',
  name => 'Rafael Lima'
);

print "Nosso Número: ".$bank_billet->attributes->{'our-number'}."\n";
print "Vencimento: ".$bank_billet->attributes->{'expire-at'}."\n";
print "Valor: ".$bank_billet->attributes->{'amount'}."\n";
print "Sacado: ".$bank_billet->attributes->{'name'}."\n";
print "URL: ".$bank_billet->attributes->{'external-link'}."\n";
print "=================================\n";

Veja um exemplo no arquivo example.pm

Licença

Esse código é livre para ser usado dentro dos termos da licença MIT license.

Bugs, Issues, Agradecimentos, etc

Comentários são bem-vindos. Envie seu feedback através do issue tracker do GitHub

Autor

Rafael Lima trabalhando na BielSystems

Blog: http://rafael.adm.br

Twitter: http://twitter.com/rafaelp

cobregratis-perl's People

Contributors

rafaelp avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.