Skip to content

Commit

Permalink
feat(ccc): add certificate read method
Browse files Browse the repository at this point in the history
  • Loading branch information
etienne-bechara committed Aug 24, 2024
1 parent d99145b commit 6ec953d
Show file tree
Hide file tree
Showing 3 changed files with 128 additions and 5 deletions.
1 change: 1 addition & 0 deletions .config/swagger-typescript-api/generate.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ const renamingDictionary = {
ConsultaSimplesEMeiParams: 'SimplesReadDto',
ComprovanteSimplesEMeiParams: 'SimplesCertificateReadDto',
ConsultaCccParams: 'CccReadDto',
ComprovanteCccParams: 'CccCertificateReadDto',
ConsultaSuframaParams: 'SuframaReadDto',
ComprovanteSuframaParams: 'SuframaCertificateReadDto',
}
Expand Down
13 changes: 12 additions & 1 deletion source/ccc/ccc.service.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { CccDto, CccReadDto } from '../cnpja/cnpja.dto';
import { CccCertificateReadDto, CccDto, CccReadDto } from '../cnpja/cnpja.dto';
import { HttpService } from '../http/http.service';

export class CccService {
Expand All @@ -18,4 +18,15 @@ export class CccService {
});
}

/**
* ### Comprovante CCC
* [ 1 ₪ ] Emite o comprovante em PDF do registro no Cadastro de Contribuintes.
* @param params
*/
public certificate(params: CccCertificateReadDto): Promise<Buffer> {
return this.httpService.get('ccc/certificate', {
query: params,
});
}

}
Loading

0 comments on commit 6ec953d

Please sign in to comment.