New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

gn-api-sdk-node

Package Overview
Dependencies
Maintainers
1
Versions
39
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

gn-api-sdk-node - npm Package Compare versions

Comparing version 0.0.14 to 0.0.15

docs/carnet-create-history.md

5

CHANGELOG.md

@@ -0,1 +1,6 @@

# 0.0.15
- Added: new endpoint (carnet history)
- Added: new endpoint (carnet resend)
- Updated: docs
# 0.0.14

@@ -2,0 +7,0 @@ - Added: new endpoint (charge history)

2

docs/all-in-one.md

@@ -82,3 +82,3 @@ ## Create charge and payment

"total": 2250,
"status": 'new',
"status": "new",
"custom_id": null,

@@ -85,0 +85,0 @@ "created_at": "2015-05-18"

@@ -19,3 +19,3 @@ ## Detailing carnets

The response you'll receive contains all the information about the carnet:
The response you"ll receive contains all the information about the carnet:

@@ -26,7 +26,7 @@ ```js

"data": {
"carnet_id": 6,
"carnet_id": 1002,
"status": "active",
"repeats": 4,
"cover": "https://visualizacao.gerencianet.com.br/emissao/28333_2385_ZEMAL5/A5CC-28333-61428-LEENA9/28333-61428-LEENA9",
"value": 4000,
"value": 8000,
"split_items": false,

@@ -38,3 +38,3 @@ "charges": [{

"value": 2000,
"expire_at": '2015-06-01',
"expire_at": "2020-06-01",
"url": "https://visualizacao.gerencianet.com.br/emissao/28333_2385_ZEMAL5/A5CL-28333-61428-LEENA9/28333-61428-LEENA9",

@@ -47,3 +47,3 @@ "barcode": "00190.00009 01523.894002 00061.428181 1 64780000002000"

"value": 2000,
"expire_at": '2015-07-01',
"expire_at": "2020-07-01",
"url": "https://visualizacao.gerencianet.com.br/emissao/28333_2385_ZEMAL5/A5CL-28333-61428-LEENA9/28333-61429-CORZE4",

@@ -56,3 +56,3 @@ "barcode": "00190.00009 01523.894002 00061.428181 8 65090000002000"

"value": 2000,
"expire_at": '2015-08-01',
"expire_at": "2020-08-01",
"url": "https://visualizacao.gerencianet.com.br/emissao/28333_2385_ZEMAL5/A5CL-28333-61428-LEENA9/28333-61430-HIRRA4",

@@ -65,8 +65,15 @@ "barcode": "00190.00009 01523.894002 00061.428181 7 65400000002000"

"value": 2000,
"expire_at": '2015-09-01',
"expire_at": "2020-09-01",
"url": "https://visualizacao.gerencianet.com.br/emissao/28333_2385_ZEMAL5/A5CL-28333-61428-LEENA9/28333-61431-HIRRA4",
"barcode": "00190.00009 01523.894002 00061.428181 5 65400000002000"
}
],
"created_at": "2015-08-23 16:52:58",
"history": [
{
"message": "Carnê ativo",
"created_at": "2015-05-23 16:52:59"
}
]
}
}

@@ -42,7 +42,7 @@ ## Updating carnets

var params = {
id: 1008
id: 1008,
parcel: 1
}
var body = {
parcel: 1,
expire_at: '2020-12-12'

@@ -49,0 +49,0 @@ }

@@ -5,9 +5,8 @@ ## Creating carnet billets

In order to generate a carnet, you'll need the items, the customer and the number of repeats (or parcels).
In order to generate a carnet, you'll need the items, the customer, the expiration date of the first charge and the number of repeats (or parcels).
The carnets can also be generated with the `metadata` attribute, just like in the banking billet, containing the `notification_url` and/or `custom_id`
The carnets can also be generated with the `metadata` attribute, just like in the banking billet, containing the `notification_url` and/or `custom_id`.
There are other optional params:
- `expiration date` of the first charge
- `post_office_service`, which tells if the carnet must be sent via post office service (to you or to your clients)

@@ -41,3 +40,3 @@ - `split_items`, identifying if the total value must be splitted among the charges (defaults to `false`)

repeats: 12,
split_items: false
expire_at: '2020-06-01'
}

@@ -63,2 +62,3 @@ ```

repeats: 4,
expire_at: '2020-06-01',
metadata: {

@@ -73,25 +73,2 @@ custom_id: 'my_id',

### Required properties plus expiration date of the first charge **(optional)**:
If you don't provide the expiration date of the first charge, the defaut value will be the current day + 8.
```js
var body = {
items: [{
name: 'Carnet Item 1',
value: 1000,
amount: 2
}],
customer: {
name: 'Gorbadoc Oldbuck',
email: 'oldbuck@gerencianet.com.br',
cpf: '04267484171',
birth: '1977-01-15',
phone_number: '5144916523'
},
repeats: 4,
expire_at: '2020-12-12'
}
```
### Required properties plus post office service information **(optional)**:

@@ -116,2 +93,3 @@

repeats: 4,
expire_at: '2020-06-01',
post_office_service: {

@@ -145,2 +123,3 @@ send_to: 'customer'

repeats: 4,
expire_at: '2020-06-01',
split_items: true

@@ -169,2 +148,3 @@ }

repeats: 4,
expire_at: '2020-06-01',
instructions: [

@@ -193,3 +173,3 @@ "Pay only with money",

"data": {
"carnet_id": 6,
"carnet_id": 1002,
"cover": "https://visualizacao.gerencianet.com.br/emissao/28333_2385_ZEMAL5/A5CC-28333-61428-LEENA9/28333-61428-LEENA9",

@@ -201,3 +181,3 @@ "charges": [{

"value": 2000,
"expire_at": "2015-06-01",
"expire_at": "2020-06-01",
"url": "https://visualizacao.gerencianet.com.br/emissao/28333_2385_ZEMAL5/A5CL-28333-61428-LEENA9/28333-61428-LEENA9",

@@ -210,3 +190,3 @@ "barcode": "00190.00009 01523.894002 00061.428181 1 64780000002000"

"value": 2000,
"expire_at": "2015-07-01",
"expire_at": "2020-07-01",
"url": "https://visualizacao.gerencianet.com.br/emissao/28333_2385_ZEMAL5/A5CL-28333-61428-LEENA9/28333-61429-CORZE4",

@@ -219,3 +199,3 @@ "barcode": "00190.00009 01523.894002 00061.428181 8 65090000002000"

"value": 2000,
"expire_at": "2015-08-01",
"expire_at": "2020-08-01",
"url": "https://visualizacao.gerencianet.com.br/emissao/28333_2385_ZEMAL5/A5CL-28333-61428-LEENA9/28333-61430-HIRRA4",

@@ -228,3 +208,3 @@ "barcode": "00190.00009 01523.894002 00061.428181 7 65400000002000"

"value": 2000,
"expire_at": "2015-09-01",
"expire_at": "2020-09-01",
"url": "https://visualizacao.gerencianet.com.br/emissao/28333_2385_ZEMAL5/A5CL-28333-61428-LEENA9/28333-61431-HIRRA4",

@@ -231,0 +211,0 @@ "barcode": "00190.00009 01523.894002 00061.428181 5 65400000002000"

@@ -47,4 +47,2 @@ ## Paying charges

If you don't set the `expire_at` attribute, the date will be the current day + 3.
You'll receive the payment info in the callback, such as the barcode and the billet link:

@@ -51,0 +49,0 @@

@@ -23,5 +23,5 @@ 'use strict';

gerencianet
.chargeCreateHistory(params, body)
.createChargeHistory(params, body)
.then(console.log)
.catch(console.log)
.done();

@@ -100,4 +100,16 @@ 'use strict';

method: 'post'
},
resendCarnet: {
route: '/carnet/:id/resend',
method: 'post'
},
resendParcel: {
route: '/carnet/:id/parcel/:parcel/resend',
method: 'post'
},
createCarnetHistory: {
route: '/carnet/:id/history',
method: 'post'
}
}
};
};
{
"name": "gn-api-sdk-node",
"description": "Module for integration with Gerencianet API",
"version": "0.0.14",
"version": "0.0.15",
"author": "Francisco Carvalho <f.thiene@gmail.com>",

@@ -6,0 +6,0 @@ "license": "MIT",

@@ -117,2 +117,5 @@ # gn-api-sdk-node

- [Updating informations](https://github.com/gerencianet/gn-api-sdk-node/tree/master/docs/carnet-update.md)
- [Resending the carnet](https://github.com/gerencianet/gn-api-sdk-node/tree/master/docs/carnet-resend.md)
- [Resending carnet parcel](https://github.com/gerencianet/gn-api-sdk-node/tree/master/docs/carnet-resend-parcel.md)
- [Adding information to carnet history](https://github.com/gerencianet/gn-api-sdk-node/tree/master/docs/carnet-create-history.md)

@@ -119,0 +122,0 @@ ### Subscriptions

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc