5.11.2 • Published 1 month ago

@frentecorretora/change_request v5.11.2

Weekly downloads
-
License
MIT
Repository
gitlab
Last release
1 month ago

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

Client

A Client entity

Type: object

Properties

  • agency number The Change agency related to the client
  • fullName string Client full name
  • shortName string Client CPF with only numbers
  • code number Client CPF as integer
  • type number Client type on Change
  • subType string Client sub-type on Change
  • address string Address first line
  • city string Address city
  • state string Address state initials
  • countryCode number Address country code following Change internal rules
  • originCountryCode number Client origin country code following Change internal rules
  • zipCode string Address zip code
  • createdAt Date When client have been created on Change
  • isActive boolean Client status
  • phone string Obligation of the operation defined by Change
  • mobile string Obligation of the operation defined by Change
  • birthDate Date Obligation of the operation defined by Change
  • rg string Client RG only numbers
  • email string Client email
  • operationalLimit number Client operational limit in dollars
  • operationalLimitPeriod number Operational limit period in days

Transaction

TODO - Create Remittance transaction entity

Type: object

PaperMoney

A Paper Money transaction entity

Type: object

Properties

  • bank string Bank inforamtion
  • agency number The agencyId of tha agency responsible for the money
  • account string The account number where the tranference will be made
  • purposeCode number Change purpodeCode for paper money
  • clientCode number Client cpf as integer
  • currencyCode string Currency code following ISO 4217
  • quotationValue number Quotation value with 4 deciamals precision and without taxes
  • nationalCurrencyValue number National currency value without taxes
  • foreignCurrencyValue number Foreign currency value without taxes
  • levelingRate number Leveling rate with 4 deciamals precision
  • countryCode number Country code
  • iofValue number Total IOF value of the national currency value
  • deliveryCost number Delivery cost of the operation
  • modality string Modality of the operation defined by Change
  • obligation string Obligation of the operation defined by Change

RequestChange

Creates new RequestChange entity

Parameters

  • baseURL string public URL of change instance
  • timeout number Max time to waiting before cancel request (optional, default 30000)

insertTransaction

Create new remittance transaction on Change

Parameters
  • transactionData

Returns object The created transaction

insertPaperMoneyTransaction

Create new paper money transaction on Change

Parameters
  • transactionData

Returns object The created transaction

insertClient

Create new Client on change

Parameters
  • clientData

Returns object The created clien

searchClientByCode

Search client by code (CPF)

Parameters

Returns object The client found

searchClientByShortName

Search client by shortName (CPF)

Parameters
  • shortName string The client CPF

Returns object The client found

searchTransaction

TODO

Parameters
  • transactionData object An transaction object

Returns object The transaction found

searchTransactionByCode

Search transaction by code

Parameters
  • code string The trnsaction unique code

Returns object The transaction found

deleteInvoiceById

Delete Invoice By Id

Parameters
  • changeTransactionCode string 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

5.11.2

1 month ago

5.11.1

1 year ago

5.10.4

1 year ago

5.10.2

1 year ago

5.11.0

1 year ago

5.10.1

1 year ago

5.10.0

2 years ago

5.9.1

2 years ago

5.9.0

2 years ago

5.8.0

2 years ago

5.6.0

2 years ago

5.5.1

2 years ago

5.6.3

2 years ago

5.6.2

2 years ago

5.7.0

2 years ago

5.6.1

2 years ago

5.5.0

2 years ago

5.4.0

2 years ago

5.3.2

3 years ago

5.3.0

3 years ago

5.2.1

3 years ago

5.2.0

3 years ago