Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature request] Get "boleto" information from digitable line #239

Open
LucasCarrias opened this issue Jun 9, 2021 · 2 comments
Open
Labels
help wanted Extra attention is needed

Comments

@LucasCarrias
Copy link
Contributor

LucasCarrias commented Jun 9, 2021

The "boleto"'s digitable line has some information about the charge, for example:

  • Expiration date
  • Charge Value
  • Associate Bank code
  • Currency code

With that considered, I suggest that we should create a single function to get all values as bellow:

{
  expirationDate: Date,
  valueInCents: number,
  bankCode: string,
  currency: string
}

An alternative feature is to create functions to get each "boleto" information:

  function getExpirationDate(boleto: string): Date
  function getValueInCents(boleto: string): number
  function getBankCode(boleto: string) : string
  function getCurrency(boleto: string): string

Reference:
Campos dos boletos e linha digitável: o que significam?
Código dos bancos associados - Febraban


Edit: Add functions declaration examples

@hyanmandian
Copy link
Member

I like your suggestion! Can you help us to create this function? I think getBoletoInfo it's a good name for that.

@hyanmandian hyanmandian added the help wanted Extra attention is needed label Jun 10, 2021
@LucasCarrias
Copy link
Contributor Author

@hyanmandian I got ahead and already started working on that. I was just waiting some feedback before creating a PR.

So, I'll create the getBoletoInfo function.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants