Skip to content

Commit

Permalink
Add PCR (#386)
Browse files Browse the repository at this point in the history
* Add PCR

* Fix comma

---------

Co-authored-by: Guilherme Branco Stracini <[email protected]>
  • Loading branch information
guibranco and guistracini-outsurance-ie authored May 15, 2024
1 parent 28e3254 commit 46808ee
Show file tree
Hide file tree
Showing 22 changed files with 329 additions and 184 deletions.
5 changes: 5 additions & 0 deletions .github/automations/abbreviations.json
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,11 @@
"pt_BR": "Plataforma Centralizada de Portabilidade de Salário",
"en_US": "Centralized Salary Portability Platform"
},
{
"acronym": "PCR",
"pt_BR": "Plataforma Centralizada de Recebíveis",
"en_US": "Centralized Receivables Platform"
},
{
"acronym": "PIX",
"pt_BR": "Pagamentos Instantâneos Brasileiro",
Expand Down
363 changes: 183 additions & 180 deletions CHANGELOG.md

Large diffs are not rendered by default.

2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,8 @@ Each of the lists has the following information (schema):
| CreditDocument | If does TED operations | true, false, null |
| LegalCheque | If it belongs to the "Cheque Legal" | true, false |
| DetectaFlow | If it belongs to the "Detecta Flow" | true, false |
| PCR | If it belongs to the "PCR" | true, false |
| PCRP | If it belongs to the "PCRP" | true, false |
| SalaryPortability | If does/accept salary portability | "Banco folha e Destinatário" - both operations, "Destinatário" - only receive, null |
| Products | List of products offered | In Portuguese only |
| Url | Website | - |
Expand Down
2 changes: 2 additions & 0 deletions README.pt-br.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,8 @@ Cada uma das listas possui as seguintes informações (schema):
| CreditDocument | Efetua TED | true, false, null |
| LegalCheque | Se pertence ao "Cheque Legal" | true, false |
| Detecta Flow | Se pertence ao "Detecta Flow" | true, false |
| PCR | Se pertence ao "PCR" | true, false |
| PCRP | Se pertence ao "PCRP" | true, false |
| SalaryPortability | Efetua/recebe portabilidade de salário | "Banco folha e Destinatário" - ambas as operações, "Destinatário" - apenas recebe, null |
| Products | Lista de produtos oferecidos | Apenas em português |
| Url | Website | - |
Expand Down
2 changes: 2 additions & 0 deletions examples/dotnet/Readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@ Each of the Collection has the following information (schema):
| CreditDocument | If does DOC/TED operations | true, false, null |
| LegalCheque | If it belongs to the "Cheque Legal" | true, false |
| Detecta Flow | If it belongs to the "Detecta Flow" | true, false |
| PCR | If it belongs to the "PCR" | true, false |
| PCRP | If it belongs to the "PCRP" | true, false |
| SalaryPortability | If does/accept salary portability | "Banco folha e Destinatário" - both operations, "Destinatário" - only receive, null |
| Products | List of products offered | In Portuguese only |
| Url | Website | - |
Expand Down
2 changes: 2 additions & 0 deletions examples/php/Readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,8 @@ Each of the Collection has the following information (schema):
| CreditDocument | If does DOC/TED operations | true, false, null |
| LegalCheque | If it belongs to the "Cheque Legal" | true, false |
| Detecta Flow | If it belongs to the "Detecta Flow" | true, false |
| PCR | If it belongs to the "PCR" | true, false |
| PCRP | If it belongs to the "PCRP" | true, false |
| SalaryPortability | If does/accept salary portability | "Banco folha e Destinatário" - both operations, "Destinatário" - only receive, null |
| Products | List of products offered | In Portuguese only |
| Url | Website | - |
Expand Down
18 changes: 18 additions & 0 deletions lib/src/bank_dto.dart
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ class BankDTO {
bool? _CreditDocument;
bool? _LegalCheque;
bool? _DetectaFlow;
bool? _Pcr;
bool? _Pcrp;
String? _SalaryPortability;
List<String?>? _Products;
String? _Url;
Expand All @@ -32,6 +34,8 @@ class BankDTO {
this._CreditDocument,
this._LegalCheque,
this._DetectaFlow,
this._Pcr,
this._Pcrp,
this._SalaryPortability,
this._Products,
this._Url,
Expand Down Expand Up @@ -65,6 +69,10 @@ class BankDTO {

bool? get DetectaFlow => _DetectaFlow;

bool? get Pcr => _Pcr;

bool? get Pcrp => _Pcrp;

String? get SalaryPortability => _SalaryPortability;

List<String?>? get Products => _Products;
Expand Down Expand Up @@ -104,6 +112,10 @@ class BankDTO {

set DetectaFlow(bool? value) => _DetectaFlow = value;

set Pcr(bool? value) => _Pcr = value;

set Pcrp(bool? value) => _Pcrp = value;

set SalaryPortability(String? value) => _SalaryPortability = value;

set Products(List<String?>? value) => _Products = value;
Expand Down Expand Up @@ -132,6 +144,8 @@ class BankDTO {
'CreditDocument': _CreditDocument,
'LegalCheque': _LegalCheque,
'DetectaFlow': _DetectaFlow,
'Pcr': _Pcr,
'Pcrp': _Pcrp,
'SalaryPortability': _SalaryPortability,
'Products': _Products,
'Url': _Url,
Expand All @@ -156,6 +170,8 @@ class BankDTO {
json['CreditDocument'],
json['LegalCheque'],
json['DetectaFlow'],
json['Pcr'],
json['Pcrp'],
json['SalaryPortability'],
List<String?>.from(json['Products'] ?? []),
json['Url'],
Expand All @@ -181,6 +197,8 @@ class BankDTO {
'"CreditDocument": $CreditDocument, '
'"LegalCheque": $LegalCheque, '
'"DetectaFlow": $DetectaFlow, '
'"Pcr": $Pcr, '
'"Pcrp": $Pcrp, '
'"SalaryPortability": "$SalaryPortability", '
'"Products": ${_listToJson(Products)}, '
'"Url": "$Url", '
Expand Down
6 changes: 6 additions & 0 deletions schemas/csharp.cs
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,12 @@ public class Bank
[JsonProperty("DetectaFlow")]
public bool DetectaFlow { get; set; }

[JsonProperty("PCR")]
public bool Pcr { get; set; }

[JsonProperty("PCRP")]
public bool Pcrp { get; set; }

[JsonProperty("SalaryPortability")]
public string SalaryPortability { get; set; }

Expand Down
15 changes: 15 additions & 0 deletions schemas/dart.dart
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@ class BankDTO {
bool _CreditDocument;
bool _LegalCheque;
bool _DetectaFlow;
bool _Pcr;
bool _Pcrp;

String _SalaryPortability;
List<String> _Products;
String _Url;
Expand All @@ -32,6 +35,8 @@ class BankDTO {
bool CreditDocument,
bool LegalCheque,
bool DetectaFlow,
bool Pcr,
bool Pcrp,
String SalaryPortability,
List<String> Products,
String Url,
Expand All @@ -52,6 +57,8 @@ class BankDTO {
_CreditDocument = CreditDocument;
_LegalCheque = LegalCheque;
_DetectaFlow = DetectaFlow;
_Pcr = Pcr;
_Pcrp = Pcrp;
_SalaryPortability = SalaryPortability;
_Products = Products;
_Url = Url;
Expand All @@ -74,6 +81,8 @@ class BankDTO {
bool get CreditDocument => _CreditDocument;
bool get LegalCheque => _LegalCheque;
bool get DetectaFlow => _DetectaFlow;
bool get Pcr => _Pcr;
bool get Pcrp => _Pcrp;
String get SalaryPortability => _SalaryPortability;
List<String> get Products => _Products;
String get Url => _Url;
Expand All @@ -95,6 +104,8 @@ class BankDTO {
set CreditDocument(bool value) => _CreditDocument = value;
set LegalCheque(bool value) => _LegalCheque = value;
set DetectaFlow(bool value) => _DetectaFlow = value;
set Pcr(bool value) => _Pcr = value;
set Pcrp(bool value) => _Pcrp = value;
set SalaryPortability(String value) => _SalaryPortability = value;
set Products(List<String> value) => _Products = value;
set Url(String value) => _Url = value;
Expand All @@ -117,6 +128,8 @@ class BankDTO {
'CreditDocument': _CreditDocument,
'LegalCheque': _LegalCheque,
'DetectaFlow': _DetectaFlow,
'Pcr': _Pcr,
'Pcrp': _Pcrp,
'SalaryPortability': _SalaryPortability,
'Products': _Products,
'Url': _Url,
Expand All @@ -141,6 +154,8 @@ class BankDTO {
CreditDocument: json['CreditDocument'],
LegalCheque: json['LegalCheque'],
DetectaFlow: json['DetectaFlow'],
Pcr: json['Pcr'],
Pcrp: json['Pcrp'],
SalaryPortability: json['SalaryPortability'],
Products: List<String>.from(json['Products']),
Url: json['Url'],
Expand Down
6 changes: 4 additions & 2 deletions schemas/go.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,10 @@ type BankElement struct {
PixType string `json:"PixType"`
Charge bool `json:"Charge"`
CreditDocument bool `json:"CreditDocument"`
LegalCheque bool `json:"LegalCheque"`
DetectaFlow bool `json:"DetectaFlow"`
LegalCheque bool `json:"LegalCheque"`
DetectaFlow bool `json:"DetectaFlow"`
Pcr bool `json:"Pcr"`
Pcrp bool `json:"Pcrp"`
SalaryPortability string `json:"SalaryPortability"`
Products []string `json:"Products"`
URL string `json:"Url"`
Expand Down
36 changes: 36 additions & 0 deletions schemas/java.java
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,8 @@
"CreditDocument",
"LegalCheque",
"DetectaFlow",
"Pcr",
"Pcrp",
"SalaryPortability",
"Products",
"Url",
Expand Down Expand Up @@ -75,6 +77,10 @@ public class Bank implements Serializable
private Object legalCheque;
@JsonProperty("DetectaFlow")
private Object detectaFlow;
@JsonProperty("Pcr")
private Object pcr;
@JsonProperty("Pcrp")
private Object pcrp;
@JsonProperty("SalaryPortability")
private Object salaryPortability;
@JsonProperty("Products")
Expand Down Expand Up @@ -273,6 +279,36 @@ public Bank withDetectaFlow(Object detectaFlow) {
return this;
}

@JsonProperty("Pcr")
public Object getPcr() {
return pcr;
}

@JsonProperty("Pcr")
public void setPcr(Object pcr) {
this.pcr = pcr;
}

public Bank withPcr(Object pcr) {
this.pcr = pcr;
return this;
}

@JsonProperty("Pcrp")
public Object getPcrp() {
return pcrp;
}

@JsonProperty("Pcrp")
public void setPcrp(Object pcrp) {
this.pcrp = pcrp;
}

public Bank withPcrp(Object pcrp) {
this.pcrp = pcrp;
return this;
}

@JsonProperty("SalaryPortability")
public Object getSalaryPortability() {
return salaryPortability;
Expand Down
2 changes: 2 additions & 0 deletions schemas/javascript.js
Original file line number Diff line number Diff line change
Expand Up @@ -160,6 +160,8 @@ const typeMap = {
{ json: "CreditDocument", js: "CreditDocument", typ: "" },
{ json: "LegalCheque", js: "LegalCheque", typ: "" },
{ json: "DetectaFlow", js: "DetectaFlow", typ: "" },
{ json: "Pcr", js: "Pcr", typ: "" },
{ json: "Pcrp", js: "Pcrp", typ: "" },
{ json: "SalaryPortability", js: "SalaryPortability", typ: "" },
{ json: "Products", js: "Products", typ: "" },
{ json: "Url", js: "Url", typ: u(null, "") },
Expand Down
6 changes: 6 additions & 0 deletions schemas/kotlin.kt
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,12 @@ data class BankElement (
@Json("DetectaFLow")
val detectaFlow: Boolean,

@Json("Pcr")
val pcr: Boolean,

@Json("Pcrp")
val pcrp: Boolean,

@Json("SalaryPortability")
val salaryPortability: String? = null,

Expand Down
6 changes: 6 additions & 0 deletions schemas/php.php
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,12 @@ class Bank
/** @var bool **/
public $DetectaFlow;

/** @var bool **/
public $Pcr;

/** @var bool **/
public $Pcrp;

/** @var string|null */
public $SalaryPortability;

Expand Down
16 changes: 14 additions & 2 deletions schemas/python.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,9 @@ class BankElement:
charge: bool
creditDocument: bool
legalCheque: bool
detectaFlow: bool
pcr: bool
pcrp: bool
salaryPortability: str
products: List[str]
url: Optional[str]
Expand All @@ -79,7 +82,7 @@ class BankElement:
date_registered: datetime
date_updated: datetime

def __init__(self, compe: str, ispb: str, document: str, long_name: str, short_name: str, network: Optional[str], type_: Optional[str], pix_type: Optional[str], charge: bool, creditDocument: bool, legalCheque: bool, salaryPortability: Optional[str], products: List[str], url: Optional[str], date_operation_started: Optional[str], date_pix_started: Optional[str], date_registered: datetime, date_updated: datetime) -> None:
def __init__(self, compe: str, ispb: str, document: str, long_name: str, short_name: str, network: Optional[str], type_: Optional[str], pix_type: Optional[str], charge: bool, creditDocument: bool, legalCheque: bool, detectaFlow: bool, pcr: bool, pcrp:bool, salaryPortability: Optional[str], products: List[str], url: Optional[str], date_operation_started: Optional[str], date_pix_started: Optional[str], date_registered: datetime, date_updated: datetime) -> None:
"""Return the bank DTO from JSON file."""
self.compe = compe
self.ispb = ispb
Expand All @@ -92,6 +95,9 @@ def __init__(self, compe: str, ispb: str, document: str, long_name: str, short_n
self.charge = charge
self.creditDocument = creditDocument
self.legalCheque = legalCheque
self.detectaFlow = detectaFlow
self.pcr = pcr
self.pcrp = pcrp
self.salaryPortability = salaryPortability
self.products = products
self.url = url
Expand All @@ -114,14 +120,17 @@ def from_dict(obj: Any) -> 'BankElement':
charge = from_union([from_none, from_str], obj.get("Charge"))
creditDocument = from_union([from_none, from_str], obj.get("CreditDocument"))
legalCheque = from_union([from_none, from_str], obj.get("LegalCheque"))
detectaFlow = from_union([from_none, from_str], obj.get("DetectaFlow"))
pcr = from_union([from_none, from_str], obj.get("PCR"))
pcrp = from_union([from_none, from_str], obj.get("PCRP"))
salaryPortability = from_union([from_none, from_str], obj.get("SalaryPortability"))
products = from_union([from_none, from_str], obj.get("Products"))
url = from_union([from_none, from_str], obj.get("Url"))
date_operation_started = from_union([from_none, from_str], obj.get("DateOperationStarted"))
date_pix_started = from_union([from_none, from_str], obj.get("DatePixStarted"))
date_registered = from_datetime(obj.get("DateRegistered"))
date_updated = from_datetime(obj.get("DateUpdated"))
return BankElement(compe, ispb, document, long_name, short_name, network, type_, pix_type, charge, creditDocument, legalCheque, salaryPortability, products, url, date_operation_started, date_pix_started, date_registered, date_updated)
return BankElement(compe, ispb, document, long_name, short_name, network, type_, pix_type, charge, creditDocument, legalCheque, detectaFlow, pcr, pcrp, salaryPortability, products, url, date_operation_started, date_pix_started, date_registered, date_updated)

def to_dict(self) -> dict:
result: dict = {}
Expand All @@ -136,6 +145,9 @@ def to_dict(self) -> dict:
result["Charge"] = from_union([from_none, from_str], self.charge)
result["CreditDocument"] = from_union([from_none, from_str], self.creditDocument)
result["LegalCheque"] = from_union([from_none, from_str], self.legalCheque)
result["DetectaFlow"] = from_union([from_none, from_str], self.detectaFlow)
result["PCR"] = from_union([from_none, from_str], self.pcr)
result["PCRP"] = from_union([from_none, from_str], self.pcrp)
result["SalaryPortability"] = from_union([from_none, from_str], self.salaryPortability)
result["Products"] = from_union([from_none, from_str], self.products)
result["Url"] = from_union([from_none, from_str], self.url)
Expand Down
4 changes: 4 additions & 0 deletions schemas/rust.rs
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,10 @@ pub struct BankElement {
pub legal_cheque: bool,
#[serde(rename = "DetectaFlow")]
pub detecta_flow: bool,
#[serde(rename = "Pcr")]
pub pcr: bool,
#[serde(rename = "Pcrp")]
pub pcrp: bool,
#[serde(rename = "SalaryPortability")]
pub salary_portability: String,
#[serde(rename = "Products")]
Expand Down
6 changes: 6 additions & 0 deletions schemas/schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,12 @@
"DetectaFlow": {
"type": "boolean"
},
"Pcr": {
"type": "boolean"
},
"Pcrp": {
"type": "boolean"
},
"SalaryPortability": {
"type": "string"
},
Expand Down
2 changes: 2 additions & 0 deletions schemas/schema.sql
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ CREATE TABLE Banks (
CreditDocument BIT NULL,
LegalCheque BIT,
DetectaFlow BIT,
Pcr BIT,
Pcrp BIT,
SalaryPortability VARCHAR(100) NULL,
Products TEXT NULL,
Url VARCHAR(255) NULL,
Expand Down
2 changes: 2 additions & 0 deletions schemas/schema.xml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@
<xs:element name="CreditDocument" type="xs:boolean" />
<xs:element name="LegalCheque" type="xs:boolean" />
<xs:element name="DetectaFlow" type="xs:boolean" />
<xs:element name="Pcr" type="xs:boolean" />
<xs:element name="Pcrp" type="xs:boolean" />
<xs:element name="SalaryPortability" type="xs:string" />
<xs:element name="Products">
<xs:complexType>
Expand Down
Loading

0 comments on commit 46808ee

Please sign in to comment.