Skip to content

Commit

Permalink
Merge pull request #2 from gerencianet/TZSD_729-SDK-com-Settle
Browse files Browse the repository at this point in the history
Tzsd 729 sdk com settle
  • Loading branch information
Thiagogresende authored Dec 27, 2018
2 parents d8d5690 + 429fced commit dc9ad0a
Show file tree
Hide file tree
Showing 6 changed files with 48 additions and 3 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -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)
Expand Down
2 changes: 1 addition & 1 deletion examples/create_billet_payment.rb
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
tomorrow = Date.today + 1

params = {
id: 2365
id: 553880
}

body = {
Expand Down
16 changes: 16 additions & 0 deletions examples/settle_carnet_parcel.rb
Original file line number Diff line number Diff line change
@@ -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)
15 changes: 15 additions & 0 deletions examples/settle_charge.rb
Original file line number Diff line number Diff line change
@@ -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)
10 changes: 9 additions & 1 deletion lib/gerencianet/constants.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
2 changes: 1 addition & 1 deletion lib/gerencianet/version.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# :nodoc:
module Gerencianet
VERSION = "0.0.13"
VERSION = "0.0.14"
end

0 comments on commit dc9ad0a

Please sign in to comment.