@zrpaplicacoes/change_request
v5.2.0
Published
A sdk for interact with Change SOAP API
Keywords
Readme
Change Request
A sdk for interact with Change SOAP API
Instalation
npm install change-request
or
yarn add change-request
Usage
const RequestChange = require('change-request');
const url = 'http://sampleurl.com';
const timeout = 30000;
const requestChange = new RequestChange(url, timeout);
await requestChange.insertClient({
agency: 10000,
fullName: 'MAdasdas asdasdas',
code: 87037473014,
subType: 'F',
address: 'Rua Baquirivu 392',
city: 'São Paulo',
state: 'SP',
originCountryCode: 1058,
countryCode: 1058,
zipCode: '59148370',
});API
Table of Contents
- Change Request
Client
A Client entity
Type: object
Properties
agencynumber The Change agency related to the clientfullNamestring Client full nameshortNamestring Client CPF with only numberscodenumber Client CPF as integertypenumber Client type on ChangesubTypestring Client sub-type on Changeaddressstring Address first linecitystring Address citystatestring Address state initialscountryCodenumber Address country code following Change internal rulesoriginCountryCodenumber Client origin country code following Change internal ruleszipCodestring Address zip codecreatedAtDate When client have been created on ChangeisActiveboolean Client statusphonestring Obligation of the operation defined by Changemobilestring Obligation of the operation defined by ChangebirthDateDate Obligation of the operation defined by Changergstring Client RG only numbersemailstring Client emailoperationalLimitnumber Client operational limit in dollarsoperationalLimitPeriodnumber Operational limit period in days
Transaction
TODO - Create Remittance transaction entity
Type: object
PaperMoney
A Paper Money transaction entity
Type: object
Properties
bankstring Bank inforamtionagencynumber The agencyId of tha agency responsible for the moneyaccountstring The account number where the tranference will be madepurposeCodenumber Change purpodeCode for paper moneyclientCodenumber Client cpf as integercurrencyCodestring Currency code following ISO 4217quotationValuenumber Quotation value with 4 deciamals precision and without taxesnationalCurrencyValuenumber National currency value without taxesforeignCurrencyValuenumber Foreign currency value without taxeslevelingRatenumber Leveling rate with 4 deciamals precisioncountryCodenumber Country codeiofValuenumber Total IOF value of the national currency valuedeliveryCostnumber Delivery cost of the operationmodalitystring Modality of the operation defined by Changeobligationstring Obligation of the operation defined by Change
RequestChange
Creates new RequestChange entity
Parameters
baseURLstring public URL of change instancetimeoutnumber Max time to waiting before cancel request (optional, default30000)
insertTransaction
Create new remittance transaction on Change
Parameters
transactionDataThrows ClientBlocked
Returns object The created transaction
insertPaperMoneyTransaction
Create new paper money transaction on Change
Parameters
transactionDataThrows ClientBlocked
Returns object The created transaction
insertClient
Create new Client on change
Parameters
clientDataThrows ClientAlreadyExists
Returns object The created clien
searchClientByCode
Search client by code (CPF)
Parameters
codenumber The client CPF
Returns object The client found
searchClientByShortName
Search client by shortName (CPF)
Parameters
shortNamestring The client CPF
Returns object The client found
searchTransaction
TODO
Parameters
transactionDataobject An transaction object
Returns object The transaction found
searchTransactionByCode
Search transaction by code
Parameters
codestring The trnsaction unique code
Returns object The transaction found
deleteInvoiceById
Delete Invoice By Id
Parameters
changeTransactionCodestring The Change invoice unique code
Returns object Message with success with invoice id deleted
ClientBlocked
Client has a blocked status on Change and the operation can't proceed
Type: ClientBlocked
ClientAlreadyExists
Client already exists on Change, use an update method instead an insert method
Type: ClientAlreadyExists
