asaas-ruby 0.2.25 → 0.2.27
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.ruby-version +1 -1
- data/lib/asaas/api/base.rb +15 -8
- data/lib/asaas/entity/account.rb +1 -0
- data/lib/asaas/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 009e79c222a295a1148c7ad2e10a9990c4eee72e6500700749d8a4076683bc5a
|
4
|
+
data.tar.gz: 3c5f9396e8927f1c63c718c815a26cbc444bab68d783b1212154220153cc63ef
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ab0ec8e6a6003e139f5a39a618d307c20147ab7bd0db1a35ef26ace4a2b2eb3b95d85f731165ee45e7c2f50deb730a43df0bd7d3f328b66e7ad4db48f0bffbb6
|
7
|
+
data.tar.gz: 5143268bede2080f81bc18ebc09625d01cd0ab3578d3eb0e2e18d6f0ffc06b72f9648423d2ba05c247ce54ceebd7c113d7121f04c2bc48f74fa35c8436117792
|
data/.ruby-version
CHANGED
@@ -1 +1 @@
|
|
1
|
-
2.
|
1
|
+
2.3.1
|
data/lib/asaas/api/base.rb
CHANGED
@@ -85,18 +85,12 @@ module Asaas
|
|
85
85
|
end
|
86
86
|
|
87
87
|
def request(method, params = {}, body = nil)
|
88
|
-
body = body.to_h
|
89
|
-
body = body.delete_if { |k, v| v.nil? || v.to_s.empty? }
|
90
|
-
body = body.to_json
|
91
88
|
@response = Typhoeus::Request.new(
|
92
89
|
parse_url(params.fetch(:id, false)),
|
93
90
|
method: method,
|
94
|
-
body: body,
|
91
|
+
body: body_parser(body),
|
95
92
|
params: params,
|
96
|
-
headers:
|
97
|
-
'access_token': @token || Asaas::Configuration.token,
|
98
|
-
'Content-Type': 'application/json'
|
99
|
-
},
|
93
|
+
headers: request_headers,
|
100
94
|
verbose: Asaas::Configuration.debug
|
101
95
|
).run
|
102
96
|
end
|
@@ -153,6 +147,19 @@ module Asaas
|
|
153
147
|
def get_headers
|
154
148
|
{ 'access_token': @token || Asaas::Configuration.token }
|
155
149
|
end
|
150
|
+
|
151
|
+
def body_parser(body)
|
152
|
+
return nil unless body
|
153
|
+
|
154
|
+
body.to_h.delete_if { |k, v| v.nil? || v.to_s.empty? }.to_json
|
155
|
+
end
|
156
|
+
|
157
|
+
def request_headers
|
158
|
+
{
|
159
|
+
'access_token': @token || Asaas::Configuration.token,
|
160
|
+
'Content-Type': 'application/json'
|
161
|
+
}
|
162
|
+
end
|
156
163
|
end
|
157
164
|
end
|
158
165
|
end
|
data/lib/asaas/entity/account.rb
CHANGED
data/lib/asaas/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: asaas-ruby
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.27
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Marcos Junior
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2023-09-30 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -253,7 +253,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
253
253
|
- !ruby/object:Gem::Version
|
254
254
|
version: '0'
|
255
255
|
requirements: []
|
256
|
-
rubygems_version: 3.
|
256
|
+
rubygems_version: 3.0.9
|
257
257
|
signing_key:
|
258
258
|
specification_version: 4
|
259
259
|
summary: Asass.com Ruby API Wrapper
|