fintoc 1.14.0 → 1.15.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: f276c501caff1bac32cb8a15915a2896a1128c34e37aefb76712ae1f711a668b
4
- data.tar.gz: 7190c09cab66eb18662c998392470ccb14af900014d359e5561c035bd1f873f9
3
+ metadata.gz: d791f2eeb81b30aef86b926cefc80928702fbbeb01f8d36b719963bf0bad44cc
4
+ data.tar.gz: b19fdc5e8f05a792ba812ab43ba552e2e01628badee044a13fffbd58efaa86a0
5
5
  SHA512:
6
- metadata.gz: 7c0b8e7f9dd50a5e68b4ef01b893f43e7689ad5d81d1146e65df62f2828673104599fec6b3d307ba1379c42e25215f1d055d22496a11aab0b16975421d0b7e8e
7
- data.tar.gz: 07a3b314e53f67a9d3253c0a7edd5b3df7cd04dd5c8768e89850a442e7d93644094533b3f415ff471356c578f6365958946289512d1d13bdea1b65ec23de4f35
6
+ metadata.gz: b83d81e62a2d8923db706b9144d7a5a4a971415bd6f87ee036a31ead050460c1a1d84dc52df49932c9da8db3f1523f76b58a499e6a45ff8de8d321bd1b6971df
7
+ data.tar.gz: 19d324de1240f7e64f7f691c2dd6dd31f79f582ab6175e08874fd1f15dd0d021b1fd202826f77529032f7d0ef3f91babc31791771c059aa299edbb05c4026b00
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- fintoc (1.14.0)
4
+ fintoc (1.15.0)
5
5
  http
6
6
  money-rails
7
7
  tabulate
data/README.md CHANGED
@@ -248,6 +248,8 @@ customer = client.v2.customers.create(email: 'customer@example.com', name: 'Jon
248
248
  payment_methods = client.v2.payment_methods.list(customer: 'customer_id')
249
249
  client.v2.payment_methods.cancel('payment_method_id')
250
250
  mandate = client.v2.payment_methods.mandate_document('payment_method_id')
251
+ installments = client.v2.payment_methods.installments('payment_method_id', amount: 1000, currency: 'CLP')
252
+ # => { available_installments: [3, 6, 12] }
251
253
  # Mexican direct debit mandates are sent as multipart. Nested fields are sent in
252
254
  # bracket notation and consent documents accept a path or an IO.
253
255
  payment_method = client.v2.payment_methods.create(
data/lib/fintoc/errors.rb CHANGED
@@ -214,6 +214,7 @@ module Fintoc
214
214
  class RejectedRefreshIntentError < FintocError; end
215
215
  class SenderBlockedAccountError < FintocError; end
216
216
  class AmountOutOfRangeError < FintocError; end
217
+ class ChargeProcessingFeeNotAllowedError < FintocError; end
217
218
  class CountryNotSupportedError < FintocError; end
218
219
  class DirectDebitSuspendedError < FintocError; end
219
220
  class FileTooLargeError < FintocError; end
@@ -36,6 +36,11 @@ module Fintoc
36
36
  @client.get(version: :v2).call("payment_methods/#{payment_method_id}/mandate_document")
37
37
  end
38
38
 
39
+ def installments(payment_method_id, amount:, currency:)
40
+ @client.get(version: :v2)
41
+ .call("payment_methods/#{payment_method_id}/installments", amount:, currency:)
42
+ end
43
+
39
44
  private
40
45
 
41
46
  def flatten_form(fields, prefix = nil)
@@ -1,3 +1,3 @@
1
1
  module Fintoc
2
- VERSION = '1.14.0'
2
+ VERSION = '1.15.0'
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fintoc
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.14.0
4
+ version: 1.15.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Juan Ca Sardin