From d5e375f2b9dd19c18ca49f5f670c7a9e0889efd4 Mon Sep 17 00:00:00 2001 From: thiagogresende Date: Thu, 27 Dec 2018 14:25:37 -0200 Subject: [PATCH] TZSD_729-SDK-com-Settle:Foi adicionado dois endpoints (SettleCharge e SettleCarnetParcel) --- CHANGELOG.md | 5 +++++ examples/settle_carnet_parcel.py | 14 ++++++++++++++ examples/settle_charge.py | 13 +++++++++++++ gerencianet/constants.py | 8 ++++++++ gerencianet/version.py | 2 +- setup.py | 2 +- 6 files changed, 42 insertions(+), 2 deletions(-) create mode 100644 examples/settle_carnet_parcel.py create mode 100644 examples/settle_charge.py diff --git a/CHANGELOG.md b/CHANGELOG.md index ef5fc9e..9dca970 100755 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,8 @@ +# 1.0.10 + +- Added: new endpoint (settle charge) +- Added: new endpoint (settle parcel carnet) + # 1.0.9 - Added: new endpoint (create charge balance sheet) diff --git a/examples/settle_carnet_parcel.py b/examples/settle_carnet_parcel.py new file mode 100644 index 0000000..01a2f01 --- /dev/null +++ b/examples/settle_carnet_parcel.py @@ -0,0 +1,14 @@ +# encoding: utf-8 + +from gerencianet import Gerencianet +from credentials import CREDENTIALS + +gn = Gerencianet(CREDENTIALS) + +params = { + 'id': 1, + 'parcel': 1 +} + +response = gn.settle_carnet_parcel(params=params) +print(response) diff --git a/examples/settle_charge.py b/examples/settle_charge.py new file mode 100644 index 0000000..5aa7970 --- /dev/null +++ b/examples/settle_charge.py @@ -0,0 +1,13 @@ +# encoding: utf-8 + +from gerencianet import Gerencianet +from credentials import CREDENTIALS + +gn = Gerencianet(CREDENTIALS) + +params = { + 'id': 1 +} + +response = gn.settle_charge.py(params=params) +print(response) diff --git a/gerencianet/constants.py b/gerencianet/constants.py index b40793c..7829a9a 100755 --- a/gerencianet/constants.py +++ b/gerencianet/constants.py @@ -143,5 +143,13 @@ class Constants(object): 'create_charge_balance_sheet': { 'route': '/charge/:id/balance_sheet', 'method': 'post' + }, + 'settle_charge': { + 'route': '/charge/:id/settle', + 'method': 'put' + }, + 'settle_carnet_parcel': { + 'route': '/carnet/:id/parcel/:parcel/settle', + 'method': 'put' } } diff --git a/gerencianet/version.py b/gerencianet/version.py index f356d65..28f1af9 100755 --- a/gerencianet/version.py +++ b/gerencianet/version.py @@ -1,3 +1,3 @@ # encoding: utf-8 -VERSION = '1.0.9' +VERSION = '1.0.10' diff --git a/setup.py b/setup.py index 0b359a3..1afa191 100755 --- a/setup.py +++ b/setup.py @@ -17,7 +17,7 @@ setup( name='gerencianet', - version='1.0.9', + version='1.0.10', description='Module for integration with Gerencianet API', long_description=long_description,