From 359a3c338c71c15c80500228aba85360636793d3 Mon Sep 17 00:00:00 2001 From: thiagogresende Date: Wed, 26 Dec 2018 11:45:04 -0200 Subject: [PATCH 1/2] TZSD_729-SDK-com-Settle:Foi adicionado dois endpoints (SettleCharge e SettleCarnetParcel) --- examples/settle_carnet_parcel.rb | 16 ++++++++++++++++ examples/settle_charge.rb | 15 +++++++++++++++ 2 files changed, 31 insertions(+) create mode 100644 examples/settle_carnet_parcel.rb create mode 100644 examples/settle_charge.rb diff --git a/examples/settle_carnet_parcel.rb b/examples/settle_carnet_parcel.rb new file mode 100644 index 0000000..0edea3c --- /dev/null +++ b/examples/settle_carnet_parcel.rb @@ -0,0 +1,16 @@ +require "gerencianet" +require_relative "./credentials" + +options = { + client_id: CREDENTIALS::CLIENT_ID, + client_secret: CREDENTIALS::CLIENT_SECRET, + sandbox: true +} + +params = { + id: 2363, + parcel: 1 +} + +gerencianet = Gerencianet.new(options) +puts gerencianet.settle_carnet_parcel(params: params) diff --git a/examples/settle_charge.rb b/examples/settle_charge.rb new file mode 100644 index 0000000..373df86 --- /dev/null +++ b/examples/settle_charge.rb @@ -0,0 +1,15 @@ +require "gerencianet" +require_relative "./credentials" + +options = { + client_id: CREDENTIALS::CLIENT_ID, + client_secret: CREDENTIALS::CLIENT_SECRET, + sandbox: true +} + +params = { + id: 553880 +} + +gerencianet = Gerencianet.new(options) +puts gerencianet.settle_charge(params: params) From 429fced8b979590e6e73d2dcde4cfe02092b0a3c Mon Sep 17 00:00:00 2001 From: thiagogresende Date: Wed, 26 Dec 2018 11:59:24 -0200 Subject: [PATCH 2/2] TZSD_729-SDK-com-Settle:Foi adicionado dois endpoints (SettleCharge e SettleCarnetParcel) --- CHANGELOG.md | 6 ++++++ examples/create_billet_payment.rb | 2 +- lib/gerencianet/constants.rb | 10 +++++++++- lib/gerencianet/version.rb | 2 +- 4 files changed, 17 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 397f692..72a5122 100755 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,9 @@ +# 0.0.14 + +- Added: new endpoint (settle charge) +- Added: new endpoint (settle carnet parcel) + + # 0.0.13 - Added: new endpoint (create charge balance sheet) diff --git a/examples/create_billet_payment.rb b/examples/create_billet_payment.rb index acce4bb..a27e73c 100644 --- a/examples/create_billet_payment.rb +++ b/examples/create_billet_payment.rb @@ -11,7 +11,7 @@ tomorrow = Date.today + 1 params = { - id: 2365 + id: 553880 } body = { diff --git a/lib/gerencianet/constants.rb b/lib/gerencianet/constants.rb index 4e0e843..396398b 100755 --- a/lib/gerencianet/constants.rb +++ b/lib/gerencianet/constants.rb @@ -142,7 +142,15 @@ module Constants create_charge_balance_sheet: { route: "/charge/:id/balance-sheet", method: "post" - } + }, + settleCharge: { + route: '/charge/:id/settle', + method: 'put' + }, + settleCarnetParcel: { + route: '/carnet/:id/parcel/:parcel/settle', + method: 'put' + } } end end diff --git a/lib/gerencianet/version.rb b/lib/gerencianet/version.rb index 1c57d6c..25f0653 100755 --- a/lib/gerencianet/version.rb +++ b/lib/gerencianet/version.rb @@ -1,4 +1,4 @@ # :nodoc: module Gerencianet - VERSION = "0.0.13" + VERSION = "0.0.14" end