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 +4 -4
- data/Gemfile.lock +1 -1
- data/README.md +2 -0
- data/lib/fintoc/errors.rb +1 -0
- data/lib/fintoc/v2/managers/payment_methods_manager.rb +5 -0
- data/lib/fintoc/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: d791f2eeb81b30aef86b926cefc80928702fbbeb01f8d36b719963bf0bad44cc
|
|
4
|
+
data.tar.gz: b19fdc5e8f05a792ba812ab43ba552e2e01628badee044a13fffbd58efaa86a0
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: b83d81e62a2d8923db706b9144d7a5a4a971415bd6f87ee036a31ead050460c1a1d84dc52df49932c9da8db3f1523f76b58a499e6a45ff8de8d321bd1b6971df
|
|
7
|
+
data.tar.gz: 19d324de1240f7e64f7f691c2dd6dd31f79f582ab6175e08874fd1f15dd0d021b1fd202826f77529032f7d0ef3f91babc31791771c059aa299edbb05c4026b00
|
data/Gemfile.lock
CHANGED
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)
|
data/lib/fintoc/version.rb
CHANGED