asaas-ruby 0.2.18 → 0.2.25

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: 0dd811d70deee95872c2f97b1d72affb8b76ed1ae9f29f9e8ead2e8017a43309
4
- data.tar.gz: 199bdb9a806540e89a5a756c41300f2ff324018cff4fce69ff929bf6975cb6b5
3
+ metadata.gz: 9014af80d8a4732eb528a51e063e99599dfdbbf968e40d91b2a73f747a58f13e
4
+ data.tar.gz: f0b671789d112681d5067da1ffe2f8fa80e31bae950877b1e25cfe38281402c6
5
5
  SHA512:
6
- metadata.gz: 8852d4cf92d4cc18307a2e0ad561d55a261f865b318f1ac6e66d28edd3bfdb3f5e1963322951c835715b3bc8bdb5b930da1a656156f6664e98f72ab53940090d
7
- data.tar.gz: 52ca4fb2cf3b529f841d4b939a98302c0f5f58927b4d2452ba81dfa24eed79dd070ba6ad3e8bb336afce1bdbdcd628a6c5ee2c856a4e76829456a6a95bdd9536
6
+ metadata.gz: 1e4a665d100614e4a709f511d01896169e29b2f9eea12ec01e32b48469eddc00f7415462e69e472f28a647ee96e74f1a5600626541a6770691a29a92d64a81f1
7
+ data.tar.gz: 9301131f39710e62a87cbb36222e5670bbc107650a5c1d2a12a6e7772c2e4754d25fcbad24396c79b6882b7119448b75fb76eb22022b50321d18102a956f3c96
data/.ruby-version CHANGED
@@ -1 +1 @@
1
- 2.3.3
1
+ 2.7.4
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", "~> 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"
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', "< 6"
28
- spec.add_dependency "virtus", '~> 1.0', "~> 1.0.5"
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", '~> 1.0', "~> 1.0.2"
33
- spec.add_dependency "rest-client", '~> 1.8', "~> 1.8.0"
34
- spec.add_dependency "awesome_print", '~> 1.6', "~> 1.6.1"
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
@@ -56,7 +56,7 @@ module Asaas
56
56
 
57
57
  def parse_response
58
58
  res = @response.response_code
59
- puts res
59
+ puts res if Asaas::Configuration.debug
60
60
  case @response.response_code
61
61
  when 200
62
62
  res = response_success
@@ -1,6 +1,6 @@
1
1
  module Asaas
2
2
  module Api
3
- class Documents < Asaas::Api::Base
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
@@ -9,5 +9,6 @@ module Asaas
9
9
  autoload :Subscription, 'asaas/api/subscription'
10
10
  autoload :Webhook, 'asaas/api/webhook'
11
11
  autoload :Transfer, 'asaas/api/transfer'
12
+ autoload :Document, 'asaas/api/document'
12
13
  end
13
14
  end
@@ -23,7 +23,6 @@ module Asaas
23
23
  attribute :pushNotificationUrl, String
24
24
  attribute :pushNotificationEmail, String
25
25
  attribute :bankAccount, Asaas::Entity::BankAccount
26
-
27
26
  end
28
27
  end
29
28
  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
@@ -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
@@ -1,3 +1,3 @@
1
1
  module Asaas
2
- VERSION = "0.2.18"
2
+ VERSION = '0.2.25'
3
3
  end
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.18
4
+ version: 0.2.25
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: 2020-01-13 00:00:00.000000000 Z
11
+ date: 2022-09-09 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/documents.rb
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.6
286
- signing_key:
256
+ rubygems_version: 3.2.17
257
+ signing_key:
287
258
  specification_version: 4
288
259
  summary: Asass.com Ruby API Wrapper
289
260
  test_files: []