asaas-ruby 0.2.18 → 0.2.26
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/README.md +7 -1
- data/asaas-ruby.gemspec +9 -10
- data/lib/asaas/api/base.rb +1 -1
- data/lib/asaas/api/{documents.rb → document.rb} +2 -2
- data/lib/asaas/api.rb +1 -0
- data/lib/asaas/entity/account.rb +1 -1
- data/lib/asaas/models/notification.rb +15 -0
- data/lib/asaas/models/payment.rb +4 -1
- data/lib/asaas/version.rb +1 -1
- data/lib/asaas-ruby.rb +1 -0
- metadata +24 -53
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a6ee610797c2478fde09da69873a241b94242e6593a4545080e8f18c8ecc14bd
|
4
|
+
data.tar.gz: 0df5257bbe512855715fb9ebf7f93131b660e994af03dd6708dcc3a763a320d8
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f3711e4c22b7f5519d8bd77a33d9117eb27f938daba4617b98cda4151cf341ce1f7ff2216bf51697e5636e06ccc2e654c3590467e84eec067c8e07aa12c1552a
|
7
|
+
data.tar.gz: 9c92a2e2fd8c50b7c052cda60a82a5d99d7992c1509398f28a539d8b54e64973838d770acde4208267637cce89a05bb5600f9ac652b72e89165ba1f02c947bce
|
data/.ruby-version
CHANGED
@@ -1 +1 @@
|
|
1
|
-
2.3.
|
1
|
+
2.3.1
|
data/README.md
CHANGED
@@ -21,8 +21,14 @@ gem build asaas-ruby.gemspec
|
|
21
21
|
|
22
22
|
### Changelog
|
23
23
|
|
24
|
+
- 0.2.24 - Add support to PIX billing type and fills missing CHANGELOG entries
|
25
|
+
- 0.2.23 - Add support to Ruby 2.7 and Rails 6.1
|
26
|
+
- 0.2.22 - Remove unecessary ActiveSupport version limit
|
27
|
+
- 0.2.21 - Add credit fields to Payment
|
28
|
+
- 0.2.20 - Adds debug flag to check responses
|
29
|
+
- 0.2.19 - Small fixes
|
24
30
|
- 0.2.18 - Account documents upload
|
25
|
-
- 0.2.17 -
|
31
|
+
- 0.2.17 - Add support to DEPOSIT billing type
|
26
32
|
- 0.2.16 - Wallet account tranfers
|
27
33
|
- 0.2.15 - Bank account tranfers
|
28
34
|
|
data/asaas-ruby.gemspec
CHANGED
@@ -18,18 +18,17 @@ Gem::Specification.new do |spec|
|
|
18
18
|
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
19
19
|
spec.require_paths = ["lib"]
|
20
20
|
|
21
|
-
spec.add_development_dependency "bundler", "
|
22
|
-
spec.add_development_dependency "rake", "
|
23
|
-
spec.add_development_dependency "rspec", "
|
24
|
-
spec.add_development_dependency "webmock", "
|
25
|
-
|
21
|
+
spec.add_development_dependency "bundler", ">= 1.12"
|
22
|
+
spec.add_development_dependency "rake", ">= 10.0"
|
23
|
+
spec.add_development_dependency "rspec", ">= 3.2"
|
24
|
+
spec.add_development_dependency "webmock", ">= 3.7.2"
|
26
25
|
|
27
|
-
spec.add_dependency "activesupport", '>= 4.2'
|
28
|
-
spec.add_dependency "virtus", '
|
26
|
+
spec.add_dependency "activesupport", '>= 4.2'
|
27
|
+
spec.add_dependency "virtus", '>= 1.0'
|
29
28
|
spec.add_dependency "dry-types", '0.15.0'
|
30
29
|
spec.add_dependency "dry-struct", '0.7.0'
|
31
30
|
spec.add_dependency "dry-monads", '1.2.0'
|
32
|
-
spec.add_dependency "typhoeus", '
|
33
|
-
spec.add_dependency "rest-client", '
|
34
|
-
spec.add_dependency "awesome_print", '
|
31
|
+
spec.add_dependency "typhoeus", '>= 1.0'
|
32
|
+
spec.add_dependency "rest-client", '>= 1.8'
|
33
|
+
spec.add_dependency "awesome_print", '>= 1.6'
|
35
34
|
end
|
data/lib/asaas/api/base.rb
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
module Asaas
|
2
2
|
module Api
|
3
|
-
class
|
3
|
+
class Document < Asaas::Api::Base
|
4
4
|
|
5
5
|
def initialize(token)
|
6
6
|
super(token, 2, '/documents')
|
@@ -15,7 +15,7 @@ module Asaas
|
|
15
15
|
|
16
16
|
@response = Typhoeus.post(URI(endpoint + route).to_s,
|
17
17
|
body: {
|
18
|
-
documentType: document_type
|
18
|
+
documentType: document_type,
|
19
19
|
documentGroupType: group_type,
|
20
20
|
documentFile: file
|
21
21
|
},
|
data/lib/asaas/api.rb
CHANGED
data/lib/asaas/entity/account.rb
CHANGED
@@ -17,13 +17,13 @@ module Asaas
|
|
17
17
|
attribute :country, String
|
18
18
|
attribute :postalCode, String
|
19
19
|
attribute :cpfCnpj, String
|
20
|
+
attribute :birthDate, String
|
20
21
|
attribute :personType, String
|
21
22
|
attribute :companyType, String
|
22
23
|
attribute :apiKey, String
|
23
24
|
attribute :pushNotificationUrl, String
|
24
25
|
attribute :pushNotificationEmail, String
|
25
26
|
attribute :bankAccount, Asaas::Entity::BankAccount
|
26
|
-
|
27
27
|
end
|
28
28
|
end
|
29
29
|
end
|
@@ -0,0 +1,15 @@
|
|
1
|
+
module Asaas
|
2
|
+
class Notification < Model
|
3
|
+
transform_keys(&:to_sym)
|
4
|
+
|
5
|
+
attribute :id, Types::Coercible::String
|
6
|
+
attribute :customer, Types::Coercible::String
|
7
|
+
attribute :event, Types::Coercible::String
|
8
|
+
attribute :scheduleOffset, Types::Integer.optional.default(nil)
|
9
|
+
attribute :emailEnabledForProvider, Types::Bool.optional.default(false)
|
10
|
+
attribute :smsEnabledForProvider, Types::Bool.optional.default(false)
|
11
|
+
attribute :emailEnabledForCustomer, Types::Bool.optional.default(true)
|
12
|
+
attribute :smsEnabledForCustomer, Types::Bool.optional.default(false)
|
13
|
+
attribute :enabled, Types::Bool.default(false)
|
14
|
+
end
|
15
|
+
end
|
data/lib/asaas/models/payment.rb
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
module Asaas
|
2
2
|
class Payment < Model
|
3
|
-
BillingTypes = Types::Strict::String.enum('BOLETO', 'CREDIT_CARD', 'UNDEFINED', 'TRANSFER', 'DEPOSIT')
|
3
|
+
BillingTypes = Types::Strict::String.enum('BOLETO', 'CREDIT_CARD', 'UNDEFINED', 'TRANSFER', 'DEPOSIT', 'PIX')
|
4
4
|
Status = Types::Strict::String.enum('PENDING', 'RECEIVED', 'CONFIRMED', 'OVERDUE', 'REFUNDED', 'RECEIVED_IN_CASH', 'REFUND_REQUESTED', 'CHARGEBACK_DISPUTE', 'AWAITING_CHARGEBACK_REVERSAL')
|
5
5
|
|
6
6
|
attribute :id, Types::Coercible::String.optional.default(nil)
|
@@ -29,5 +29,8 @@ module Asaas
|
|
29
29
|
attribute :bankSlipUrl, Types::Coercible::String.optional.default(nil)
|
30
30
|
attribute :invoiceNumber, Types::Coercible::String.optional.default(nil)
|
31
31
|
attribute :deleted, Types::Coercible::String.optional.default(nil)
|
32
|
+
|
33
|
+
attribute :creditDate, Types::Coercible::String.optional.default(nil)
|
34
|
+
attribute :estimatedCreditDate, Types::Coercible::String.optional.default(nil)
|
32
35
|
end
|
33
36
|
end
|
data/lib/asaas/version.rb
CHANGED
data/lib/asaas-ruby.rb
CHANGED
@@ -19,6 +19,7 @@ module Asaas
|
|
19
19
|
|
20
20
|
autoload :Model, 'asaas/models/model'
|
21
21
|
autoload :Customer, 'asaas/models/customer'
|
22
|
+
autoload :Notification, 'asaas/models/notification'
|
22
23
|
autoload :Payment, 'asaas/models/payment'
|
23
24
|
autoload :Discount, 'asaas/models/discount'
|
24
25
|
autoload :Interest, 'asaas/models/interest'
|
metadata
CHANGED
@@ -1,69 +1,69 @@
|
|
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.26
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Marcos Junior
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2023-09-18 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
|
-
- - "
|
17
|
+
- - ">="
|
18
18
|
- !ruby/object:Gem::Version
|
19
19
|
version: '1.12'
|
20
20
|
type: :development
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
|
-
- - "
|
24
|
+
- - ">="
|
25
25
|
- !ruby/object:Gem::Version
|
26
26
|
version: '1.12'
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: rake
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
|
-
- - "
|
31
|
+
- - ">="
|
32
32
|
- !ruby/object:Gem::Version
|
33
33
|
version: '10.0'
|
34
34
|
type: :development
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
|
-
- - "
|
38
|
+
- - ">="
|
39
39
|
- !ruby/object:Gem::Version
|
40
40
|
version: '10.0'
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
42
|
name: rspec
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
44
44
|
requirements:
|
45
|
-
- - "
|
45
|
+
- - ">="
|
46
46
|
- !ruby/object:Gem::Version
|
47
47
|
version: '3.2'
|
48
48
|
type: :development
|
49
49
|
prerelease: false
|
50
50
|
version_requirements: !ruby/object:Gem::Requirement
|
51
51
|
requirements:
|
52
|
-
- - "
|
52
|
+
- - ">="
|
53
53
|
- !ruby/object:Gem::Version
|
54
54
|
version: '3.2'
|
55
55
|
- !ruby/object:Gem::Dependency
|
56
56
|
name: webmock
|
57
57
|
requirement: !ruby/object:Gem::Requirement
|
58
58
|
requirements:
|
59
|
-
- - "
|
59
|
+
- - ">="
|
60
60
|
- !ruby/object:Gem::Version
|
61
61
|
version: 3.7.2
|
62
62
|
type: :development
|
63
63
|
prerelease: false
|
64
64
|
version_requirements: !ruby/object:Gem::Requirement
|
65
65
|
requirements:
|
66
|
-
- - "
|
66
|
+
- - ">="
|
67
67
|
- !ruby/object:Gem::Version
|
68
68
|
version: 3.7.2
|
69
69
|
- !ruby/object:Gem::Dependency
|
@@ -73,9 +73,6 @@ dependencies:
|
|
73
73
|
- - ">="
|
74
74
|
- !ruby/object:Gem::Version
|
75
75
|
version: '4.2'
|
76
|
-
- - "<"
|
77
|
-
- !ruby/object:Gem::Version
|
78
|
-
version: '6'
|
79
76
|
type: :runtime
|
80
77
|
prerelease: false
|
81
78
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -83,29 +80,20 @@ dependencies:
|
|
83
80
|
- - ">="
|
84
81
|
- !ruby/object:Gem::Version
|
85
82
|
version: '4.2'
|
86
|
-
- - "<"
|
87
|
-
- !ruby/object:Gem::Version
|
88
|
-
version: '6'
|
89
83
|
- !ruby/object:Gem::Dependency
|
90
84
|
name: virtus
|
91
85
|
requirement: !ruby/object:Gem::Requirement
|
92
86
|
requirements:
|
93
|
-
- - "
|
87
|
+
- - ">="
|
94
88
|
- !ruby/object:Gem::Version
|
95
89
|
version: '1.0'
|
96
|
-
- - "~>"
|
97
|
-
- !ruby/object:Gem::Version
|
98
|
-
version: 1.0.5
|
99
90
|
type: :runtime
|
100
91
|
prerelease: false
|
101
92
|
version_requirements: !ruby/object:Gem::Requirement
|
102
93
|
requirements:
|
103
|
-
- - "
|
94
|
+
- - ">="
|
104
95
|
- !ruby/object:Gem::Version
|
105
96
|
version: '1.0'
|
106
|
-
- - "~>"
|
107
|
-
- !ruby/object:Gem::Version
|
108
|
-
version: 1.0.5
|
109
97
|
- !ruby/object:Gem::Dependency
|
110
98
|
name: dry-types
|
111
99
|
requirement: !ruby/object:Gem::Requirement
|
@@ -152,62 +140,44 @@ dependencies:
|
|
152
140
|
name: typhoeus
|
153
141
|
requirement: !ruby/object:Gem::Requirement
|
154
142
|
requirements:
|
155
|
-
- - "
|
143
|
+
- - ">="
|
156
144
|
- !ruby/object:Gem::Version
|
157
145
|
version: '1.0'
|
158
|
-
- - "~>"
|
159
|
-
- !ruby/object:Gem::Version
|
160
|
-
version: 1.0.2
|
161
146
|
type: :runtime
|
162
147
|
prerelease: false
|
163
148
|
version_requirements: !ruby/object:Gem::Requirement
|
164
149
|
requirements:
|
165
|
-
- - "
|
150
|
+
- - ">="
|
166
151
|
- !ruby/object:Gem::Version
|
167
152
|
version: '1.0'
|
168
|
-
- - "~>"
|
169
|
-
- !ruby/object:Gem::Version
|
170
|
-
version: 1.0.2
|
171
153
|
- !ruby/object:Gem::Dependency
|
172
154
|
name: rest-client
|
173
155
|
requirement: !ruby/object:Gem::Requirement
|
174
156
|
requirements:
|
175
|
-
- - "
|
157
|
+
- - ">="
|
176
158
|
- !ruby/object:Gem::Version
|
177
159
|
version: '1.8'
|
178
|
-
- - "~>"
|
179
|
-
- !ruby/object:Gem::Version
|
180
|
-
version: 1.8.0
|
181
160
|
type: :runtime
|
182
161
|
prerelease: false
|
183
162
|
version_requirements: !ruby/object:Gem::Requirement
|
184
163
|
requirements:
|
185
|
-
- - "
|
164
|
+
- - ">="
|
186
165
|
- !ruby/object:Gem::Version
|
187
166
|
version: '1.8'
|
188
|
-
- - "~>"
|
189
|
-
- !ruby/object:Gem::Version
|
190
|
-
version: 1.8.0
|
191
167
|
- !ruby/object:Gem::Dependency
|
192
168
|
name: awesome_print
|
193
169
|
requirement: !ruby/object:Gem::Requirement
|
194
170
|
requirements:
|
195
|
-
- - "
|
171
|
+
- - ">="
|
196
172
|
- !ruby/object:Gem::Version
|
197
173
|
version: '1.6'
|
198
|
-
- - "~>"
|
199
|
-
- !ruby/object:Gem::Version
|
200
|
-
version: 1.6.1
|
201
174
|
type: :runtime
|
202
175
|
prerelease: false
|
203
176
|
version_requirements: !ruby/object:Gem::Requirement
|
204
177
|
requirements:
|
205
|
-
- - "
|
178
|
+
- - ">="
|
206
179
|
- !ruby/object:Gem::Version
|
207
180
|
version: '1.6'
|
208
|
-
- - "~>"
|
209
|
-
- !ruby/object:Gem::Version
|
210
|
-
version: 1.6.1
|
211
181
|
description: Asass.com Ruby API Wrapper
|
212
182
|
email:
|
213
183
|
- marcos@maini.com.br
|
@@ -232,7 +202,7 @@ files:
|
|
232
202
|
- lib/asaas/api/base.rb
|
233
203
|
- lib/asaas/api/city.rb
|
234
204
|
- lib/asaas/api/customer.rb
|
235
|
-
- lib/asaas/api/
|
205
|
+
- lib/asaas/api/document.rb
|
236
206
|
- lib/asaas/api/notification.rb
|
237
207
|
- lib/asaas/api/payment.rb
|
238
208
|
- lib/asaas/api/subscription.rb
|
@@ -259,6 +229,7 @@ files:
|
|
259
229
|
- lib/asaas/models/fine.rb
|
260
230
|
- lib/asaas/models/interest.rb
|
261
231
|
- lib/asaas/models/model.rb
|
232
|
+
- lib/asaas/models/notification.rb
|
262
233
|
- lib/asaas/models/payment.rb
|
263
234
|
- lib/asaas/models/transfer.rb
|
264
235
|
- lib/asaas/models/webhook.rb
|
@@ -267,7 +238,7 @@ files:
|
|
267
238
|
homepage: http://github.com/marcosgugs/asaas-ruby
|
268
239
|
licenses: []
|
269
240
|
metadata: {}
|
270
|
-
post_install_message:
|
241
|
+
post_install_message:
|
271
242
|
rdoc_options: []
|
272
243
|
require_paths:
|
273
244
|
- lib
|
@@ -282,8 +253,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
282
253
|
- !ruby/object:Gem::Version
|
283
254
|
version: '0'
|
284
255
|
requirements: []
|
285
|
-
rubygems_version: 3.0.
|
286
|
-
signing_key:
|
256
|
+
rubygems_version: 3.0.9
|
257
|
+
signing_key:
|
287
258
|
specification_version: 4
|
288
259
|
summary: Asass.com Ruby API Wrapper
|
289
260
|
test_files: []
|