Skip to content

Commit

Permalink
Fix-central-bank-attributes
Browse files Browse the repository at this point in the history
  • Loading branch information
luistarkbank committed Sep 18, 2023
1 parent 267fa8d commit 166a4e9
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 18 deletions.
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,13 @@ Given a version number MAJOR.MINOR.PATCH, increment:


## [Unreleased]
### Removed
- account-created, created, owned attributes to DictKey resource
- account-number, branch-code attributes to PaymentPreview resource
### Changed
- account-number, branch-code attributes to DictKey resource
### Fixed
- account-type docstring attribute to DictKey resource

## [2.5.2] - 2021-11-10
### Changed
Expand Down
4 changes: 0 additions & 4 deletions src/starkbank/brcode_preview.clj
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,6 @@
- `:name` [string]: Payment receiver name. ex: \"Tony Stark\"
- `:tax-id` [string]: Payment receiver tax ID. ex: \"012.345.678-90\"
- `:bank-code` [string]: Payment receiver bank code. ex: \"20018183\"
- `:branch-code` [string]: Payment receiver branch code. ex: \"0001\"
- `:account-number` [string]: Payment receiver account number. ex: \"1234567\"
- `:account-type` [string]: Payment receiver account type. ex: \"checking\"
- `:allow-change` [bool]: If True, the payment is able to receive amounts that are diferent from the nominal one. ex: True or False
- `:amount` [integer]: Value in cents that this payment is expecting to receive. If 0, any value is accepted. ex: 123 (= R$1,23)
Expand All @@ -28,8 +26,6 @@
:name (.name java-object)
:tax-id (.taxId java-object)
:bank-code (.bankCode java-object)
:branch-code (.branchCode java-object)
:account-number (.accountNumber java-object)
:account-type (.accountType java-object)
:allow-change (.allowChange java-object)
:amount (.amount java-object)
Expand Down
22 changes: 8 additions & 14 deletions src/starkbank/dict_key.clj
Original file line number Diff line number Diff line change
@@ -1,23 +1,20 @@
(ns starkbank.dict-key
"DictKey represents a PIX key registered in Bacen's DICT system.
"DictKey represents a Pix key registered in Bacen's DICT system.
## Parameters (optional):
- `:id` [string, default nil]: DictKey object unique id and PIX key itself. ex: \"[email protected]\", \"722.461.430-04\", \"20.018.183/0001-80\", \"+5511988887777\", \"b6295ee1-f054-47d1-9e90-ee57b74f60d9\"
- `:id` [string, default nil]: DictKey object unique id. ex: \"[email protected]\", \"722.461.430-04\", \"20.018.183/0001-80\", \"+5511988887777\", \"b6295ee1-f054-47d1-9e90-ee57b74f60d9\"
## Attributes (return-only):
- `:type` [string, default nil]: PIX key type. ex: \"email\", \"cpf\", \"cnpj\", \"phone\" or \"evp\"
- `:type` [string, default nil]: DICT key type. ex: \"email\", \"cpf\", \"cnpj\", \"phone\" or \"evp\"
- `:name` [string, default nil]: account owner full name. ex: \"Tony Stark\"
- `:tax-id [string, default nil]: tax ID (CPF or CNPJ) with or without formatting. ex: \"01234567890\" or \"20.018.183/0001-80\"
- `:owner-type` [string, default nil]: PIX key owner type. ex \"naturalPerson\" or \"legalPerson\"
- `:owner-type` [string, default nil]: DICT key owner type. ex \"naturalPerson\" or \"legalPerson\"
- `:bank-name` [string, default nil]: bank name associated with the DICT key. ex: \"Stark Bank\"
- `:ispb` [string, default nil]: ISPB code used for transactions. ex: \"20018183\"
- `:branch-code` [string, default nil]: bank account branch code associated with the PIX key. ex: \"9585\"
- `:account-number` [string, default nil]: bank account number associated with the PIX key. ex: \"9828282578010513\"
- `:account-type` [string, default nil]: bank account type associated with the PIX key. ex: \"checking\", \"saving\", \"salary\" or \"payment\"
- `:status` [string, default nil]: current PIX key status. ex: \"created\", \"registered\", \"canceled\" or \"failed\"
- `:account-created` [string, default nil]: creation datetime of the bank account associated with the PIX key. ex: \"2020-11-05T14:55:08.812665+00:00\"
- `:owned` [string, default nil]: datetime since when the current owner hold this PIX key. ex : \"2020-11-05T14:55:08.812665+00:00\"
- `:created` [string, default nil]: creation datetime for the PIX key. ex: \"2020-11-05T14:55:08.812665+00:00\""
- `:branch-code` [string, default nil]: encrypted bank account branch code associated with the DICT key. ex: \"ZW5jcnlwdGVkLWJyYW5jaC1jb2Rl\"
- `:account-number` [string, default nil]: encrypted bank account number associated with the DICT key. ex: \"ZW5jcnlwdGVkLWFjY291bnQtbnVtYmVy\"
- `:account-type` [string, default nil]: bank account type associated with the DICT key. ex: \"checking\", \"savings\", \"salary\" or \"payment\"
- `:status` [string, default nil]: current DICT key status. ex: \"created\", \"registered\", \"canceled\" or \"failed\""
(:refer-clojure :exclude [get set update keys])
(:import [com.starkbank DictKey])
(:use [starkbank.user]
Expand All @@ -37,9 +34,6 @@
:account-number (.accountNumber java-object)
:account-type (.accountType java-object)
:status (.status java-object)
:account-created (.accountCreated java-object)
:owned (.owned java-object)
:created (.created java-object)
}))

(defn- clojure-query-to-java
Expand Down

0 comments on commit 166a4e9

Please sign in to comment.