Skip to content

Commit

Permalink
Merge pull request #5 from jessica-gavaGN/master
Browse files Browse the repository at this point in the history
API Pix endpoints
  • Loading branch information
jessica-gavaGN authored Jul 1, 2021
2 parents 3d58610 + b6c0ae4 commit e92bd2b
Show file tree
Hide file tree
Showing 74 changed files with 971 additions and 227 deletions.
4 changes: 2 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
language: ruby
rvm:
- 2.1.0
before_install: gem install bundler -v 1.10.6
- 2.6.6
before_install: gem install bundler -v 1.17.2
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# 1.0.0

- Added: API Pix endpoints

# 0.0.15

- Added: new endpoint (one step)
Expand Down
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,17 +29,17 @@ $ gem install gerencianet
```
## Tested with
```
ruby 2.1.0
ruby 2.6.6
```
## Basic usage

```ruby
require "gerencianet"

options = {
client_id: "client_id",
client_secret: "client_secret",
sandbox: true
client_id: CREDENTIALS::CLIENT_ID,
client_secret: CREDENTIALS::CLIENT_SECRET,
sandbox: CREDENTIALS::SANDBOX
}

gerencianet = Gerencianet.new(options)
Expand Down
Empty file.
Empty file.
6 changes: 4 additions & 2 deletions examples/credentials.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# example
module CREDENTIALS
CLIENT_ID = ""
CLIENT_SECRET = ""
CLIENT_ID = "Client_Id"
CLIENT_SECRET = "Client_Secret"
PIX_CERT = "../../certs/developmentCertificate.pem"
SANDBOX = true
end
4 changes: 2 additions & 2 deletions examples/cancel_carnet.rb → examples/default/carnet/cancel_carnet.rb
100644 → 100755
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
require "gerencianet"
require_relative "./credentials"
require_relative "../../credentials"

options = {
client_id: CREDENTIALS::CLIENT_ID,
client_secret: CREDENTIALS::CLIENT_SECRET,
sandbox: true
sandbox: CREDENTIALS::SANDBOX
}

params = {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
options = {
client_id: CREDENTIALS::CLIENT_ID,
client_secret: CREDENTIALS::CLIENT_SECRET,
sandbox: true
sandbox: CREDENTIALS::SANDBOX
}

params = {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
options = {
client_id: CREDENTIALS::CLIENT_ID,
client_secret: CREDENTIALS::CLIENT_SECRET,
sandbox: true
sandbox: CREDENTIALS::SANDBOX
}

tomorrow = Date.today + 1
Expand All @@ -20,7 +20,7 @@
customer: {
name: "Gorbadoc Oldbuck",
email: "oldbuck@gerencianet.com.br",
cpf: "04267484171",
cpf: "94271564656",
birth: "1977-01-15",
phone_number: "5144916523"
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
options = {
client_id: CREDENTIALS::CLIENT_ID,
client_secret: CREDENTIALS::CLIENT_SECRET,
sandbox: true
sandbox: CREDENTIALS::SANDBOX
}

params = {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
options = {
client_id: CREDENTIALS::CLIENT_ID,
client_secret: CREDENTIALS::CLIENT_SECRET,
sandbox: true
sandbox: CREDENTIALS::SANDBOX
}

params = {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
options = {
client_id: CREDENTIALS::CLIENT_ID,
client_secret: CREDENTIALS::CLIENT_SECRET,
sandbox: true
sandbox: CREDENTIALS::SANDBOX
}

params = {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
options = {
client_id: CREDENTIALS::CLIENT_ID,
client_secret: CREDENTIALS::CLIENT_SECRET,
sandbox: true
sandbox: CREDENTIALS::SANDBOX
}

params = {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
options = {
client_id: CREDENTIALS::CLIENT_ID,
client_secret: CREDENTIALS::CLIENT_SECRET,
sandbox: true
sandbox: CREDENTIALS::SANDBOX
}

params = {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
options = {
client_id: CREDENTIALS::CLIENT_ID,
client_secret: CREDENTIALS::CLIENT_SECRET,
sandbox: true
sandbox: CREDENTIALS::SANDBOX
}

params = {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
options = {
client_id: CREDENTIALS::CLIENT_ID,
client_secret: CREDENTIALS::CLIENT_SECRET,
sandbox: true
sandbox: CREDENTIALS::SANDBOX
}

params = {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
options = {
client_id: CREDENTIALS::CLIENT_ID,
client_secret: CREDENTIALS::CLIENT_SECRET,
sandbox: true
sandbox: CREDENTIALS::SANDBOX
}

charge = {
Expand Down Expand Up @@ -38,7 +38,7 @@
customer: {
name: "Gorbadoc Oldbuck",
email: "oldbuck@gerencianet.com.br",
cpf: "04267484171",
cpf: "94271564656",
birth: "1977-01-15",
phone_number: "5144916523"
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
options = {
client_id: CREDENTIALS::CLIENT_ID,
client_secret: CREDENTIALS::CLIENT_SECRET,
sandbox: true
sandbox: CREDENTIALS::SANDBOX
}

params = {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
options = {
client_id: CREDENTIALS::CLIENT_ID,
client_secret: CREDENTIALS::CLIENT_SECRET,
sandbox: true
sandbox: CREDENTIALS::SANDBOX
}

expireAt = Date.today + 3
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
options = {
client_id: CREDENTIALS::CLIENT_ID,
client_secret: CREDENTIALS::CLIENT_SECRET,
sandbox: true
sandbox: CREDENTIALS::SANDBOX
}

tomorrow = Date.today + 1
Expand All @@ -21,7 +21,7 @@
customer: {
name: "Gorbadoc Oldbuck",
email: "oldbuck@gerencianet.com.br",
cpf: "04267484171",
cpf: "94271564656",
birth: "1977-01-15",
phone_number: "5144916523"
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
options = {
client_id: CREDENTIALS::CLIENT_ID,
client_secret: CREDENTIALS::CLIENT_SECRET,
sandbox: true
sandbox: CREDENTIALS::SANDBOX
}

body = {
Expand All @@ -23,7 +23,7 @@
customer: {
name: "Gorbadoc Oldbuck",
email: "oldbuck@gerencianet.com.br",
cpf: "04267484171",
cpf: "94271564656",
birth: "1977-01-15",
phone_number: "5144916523"
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
options = {
client_id: CREDENTIALS::CLIENT_ID,
client_secret: CREDENTIALS::CLIENT_SECRET,
sandbox: true
sandbox: CREDENTIALS::SANDBOX
}

body = {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
options = {
client_id: CREDENTIALS::CLIENT_ID,
client_secret: CREDENTIALS::CLIENT_SECRET,
sandbox: true
sandbox: CREDENTIALS::SANDBOX
}

params = {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
options = {
client_id: CREDENTIALS::CLIENT_ID,
client_secret: CREDENTIALS::CLIENT_SECRET,
sandbox: true
sandbox: CREDENTIALS::SANDBOX
}

params = {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
options = {
client_id: CREDENTIALS::CLIENT_ID,
client_secret: CREDENTIALS::CLIENT_SECRET,
sandbox: true
sandbox: CREDENTIALS::SANDBOX
}

body = {
Expand All @@ -23,7 +23,7 @@
customer: {
name: "Gorbadoc Oldbuck",
email: "oldbuck@gerencianet.com.br",
cpf: "04267484171",
cpf: "94271564656",
birth: "1977-01-15",
phone_number: "5144916523"
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
options = {
client_id: CREDENTIALS::CLIENT_ID,
client_secret: CREDENTIALS::CLIENT_SECRET,
sandbox: true
sandbox: CREDENTIALS::SANDBOX
}

body = {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
options = {
client_id: CREDENTIALS::CLIENT_ID,
client_secret: CREDENTIALS::CLIENT_SECRET,
sandbox: true
sandbox: CREDENTIALS::SANDBOX
}

params = {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
options = {
client_id: CREDENTIALS::CLIENT_ID,
client_secret: CREDENTIALS::CLIENT_SECRET,
sandbox: true
sandbox: CREDENTIALS::SANDBOX
}

params = {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
options = {
client_id: CREDENTIALS::CLIENT_ID,
client_secret: CREDENTIALS::CLIENT_SECRET,
sandbox: true
sandbox: CREDENTIALS::SANDBOX
}

params = {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
options = {
client_id: CREDENTIALS::CLIENT_ID,
client_secret: CREDENTIALS::CLIENT_SECRET,
sandbox: true
sandbox: CREDENTIALS::SANDBOX
}

params = {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
options = {
client_id: CREDENTIALS::CLIENT_ID,
client_secret: CREDENTIALS::CLIENT_SECRET,
sandbox: true
sandbox: CREDENTIALS::SANDBOX
}

expireAt = Date.today + 3
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
options = {
client_id: CREDENTIALS::CLIENT_ID,
client_secret: CREDENTIALS::CLIENT_SECRET,
sandbox: true
sandbox: CREDENTIALS::SANDBOX
}

params = {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
options = {
client_id: CREDENTIALS::CLIENT_ID,
client_secret: CREDENTIALS::CLIENT_SECRET,
sandbox: true
sandbox: CREDENTIALS::SANDBOX
}

body = {
Expand Down Expand Up @@ -32,7 +32,7 @@
customer: {
name: "Gorbadoc Oldbuck",
email: "oldbuck@gerencianet.com.br",
cpf: "04267484171",
cpf: "94271564656",
birth: "1977-01-15",
phone_number: "5144916523"
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
options = {
client_id: CREDENTIALS::CLIENT_ID,
client_secret: CREDENTIALS::CLIENT_SECRET,
sandbox: true
sandbox: CREDENTIALS::SANDBOX
}

body = {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
options = {
client_id: CREDENTIALS::CLIENT_ID,
client_secret: CREDENTIALS::CLIENT_SECRET,
sandbox: true
sandbox: CREDENTIALS::SANDBOX
}

params = {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
options = {
client_id: CREDENTIALS::CLIENT_ID,
client_secret: CREDENTIALS::CLIENT_SECRET,
sandbox: true
sandbox: CREDENTIALS::SANDBOX
}

params = {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
options = {
client_id: CREDENTIALS::CLIENT_ID,
client_secret: CREDENTIALS::CLIENT_SECRET,
sandbox: true
sandbox: CREDENTIALS::SANDBOX
}

params = {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
options = {
client_id: CREDENTIALS::CLIENT_ID,
client_secret: CREDENTIALS::CLIENT_SECRET,
sandbox: true
sandbox: CREDENTIALS::SANDBOX
}

body = {
Expand Down
Loading

0 comments on commit e92bd2b

Please sign in to comment.