inter_api 1.0.3 → 1.0.5

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 851ced5270a63cb3feea8a1d570c23918548e0fa8fd0ad4175ffd7faf9a87333
4
- data.tar.gz: afb5f7ae4dc0455e34d2c584ffd832246015ef24495fd41df79d44a2829c662d
3
+ metadata.gz: 6cd1144f6a5ec04e72c467470ac9ae97acd46091c66c0931fcce8e38871a405f
4
+ data.tar.gz: 34637a1f4ddf0391d27b57743af09505129fcc1d7a3067283dac07a770643f0e
5
5
  SHA512:
6
- metadata.gz: 7ef44ff9c60803a68fa10212ec3062af971c31f9cd891ae7e46d7e7811a901a3856e09fcfaacc103625c5b9f805662ec4ef18e7132c1f210332d3aff254350d5
7
- data.tar.gz: 1aef7ac40411244ff0226ca03daee9a14b6af5c93ae0b1f238327889ed08f9d259c13fbdb5b40796b6de85cde1ce4329b95e72297ad57d1de369ded5f23d8c66
6
+ metadata.gz: 7265434c98a67d6fa5d45527b52231b223d9612f6ce0e9428e3c5067052b26eefee7c3276dbda39b332efa320df60dcfbeebd3a1ef94fd3df06a5b634ae22add
7
+ data.tar.gz: c78d3e2c56d6f12e3e6af4a2e2418421faac4d5d2beb892474b5dd1fc93345da6e1998e52c4721dad77e817a192ddf210726ac060cdf9a5b2eca5c782d5d50ca
@@ -1,5 +1,5 @@
1
1
  module InterApi
2
- class Client < Ac::Base
2
+ class ClientProduction < Ac::Base
3
3
  BASE_URL = "https://cdpj.partners.bancointer.com.br/"
4
4
  MAX_RETIES = 2
5
5
 
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module InterApi
4
- VERSION = "1.0.3"
4
+ VERSION = "1.0.5"
5
5
  end
data/lib/inter_api.rb CHANGED
@@ -7,11 +7,24 @@ require "rqrcode"
7
7
  require "ac"
8
8
 
9
9
  require_relative "inter_api/version"
10
- require "inter_api/client"
10
+ require "inter_api/client_production"
11
11
  require "inter_api/payment"
12
12
  require "inter_api/payment_error"
13
13
 
14
14
  module InterApi
15
15
  class Error < StandardError; end
16
- # Your code goes here...
16
+
17
+ class ClientTeste < ClientProduction
18
+ BASE_URL = "https://cdpj-sandbox.partners.uatinter.co/"
19
+ end
20
+
21
+ class Client
22
+ def self.new **args
23
+ if args.delete(:test_mode)
24
+ ClientTeste.new(**args)
25
+ else
26
+ ClientProduction.new(**args)
27
+ end
28
+ end
29
+ end
17
30
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: inter_api
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.3
4
+ version: 1.0.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Todas Essas Coisas
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2024-06-11 00:00:00.000000000 Z
11
+ date: 2024-10-14 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: ac
@@ -80,7 +80,7 @@ files:
80
80
  - README.md
81
81
  - Rakefile
82
82
  - lib/inter_api.rb
83
- - lib/inter_api/client.rb
83
+ - lib/inter_api/client_production.rb
84
84
  - lib/inter_api/payment.rb
85
85
  - lib/inter_api/payment_error.rb
86
86
  - lib/inter_api/version.rb
@@ -107,7 +107,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
107
107
  - !ruby/object:Gem::Version
108
108
  version: '0'
109
109
  requirements: []
110
- rubygems_version: 3.5.9
110
+ rubygems_version: 3.5.16
111
111
  signing_key:
112
112
  specification_version: 4
113
113
  summary: ''