From 166a4e9e8bc7087475d9565339b2b831ed074987 Mon Sep 17 00:00:00 2001 From: luistarkbank Date: Mon, 18 Sep 2023 16:34:00 -0300 Subject: [PATCH] Fix-central-bank-attributes --- CHANGELOG.md | 7 +++++++ src/starkbank/brcode_preview.clj | 4 ---- src/starkbank/dict_key.clj | 22 ++++++++-------------- 3 files changed, 15 insertions(+), 18 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 39795f6..e28e1ea 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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 diff --git a/src/starkbank/brcode_preview.clj b/src/starkbank/brcode_preview.clj index 5299a73..7dfd972 100644 --- a/src/starkbank/brcode_preview.clj +++ b/src/starkbank/brcode_preview.clj @@ -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) @@ -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) diff --git a/src/starkbank/dict_key.clj b/src/starkbank/dict_key.clj index 14d7ff7..3335f82 100644 --- a/src/starkbank/dict_key.clj +++ b/src/starkbank/dict_key.clj @@ -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: \"tony@starkbank.com\", \"722.461.430-04\", \"20.018.183/0001-80\", \"+5511988887777\", \"b6295ee1-f054-47d1-9e90-ee57b74f60d9\" + - `:id` [string, default nil]: DictKey object unique id. ex: \"tony@starkbank.com\", \"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] @@ -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