fintoc 1.7.0 → 1.8.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: 64cdfca14464289a89d38a2693912d7b54791261e25c76851a59b5fd26664b37
4
- data.tar.gz: '049af1d5371b2a8ec247dcb434299a619b456f069e3db27abb378011748ac2ba'
3
+ metadata.gz: 86cb95f11227365b5cc658916f6cf151503b495e07ecfb3f105cea3556b57a36
4
+ data.tar.gz: c50e35e79db4e944f7d930924be55211afe940130980f56470fb294a27f7fc4c
5
5
  SHA512:
6
- metadata.gz: '089cf2234d2fb65530c6ad3ee1b8e9b7798563db02fb546fdc98bf34220bad5e4d8d62fd48e7100de2286e6684c1daa00baca9bd7db96e48496af481324948ca'
7
- data.tar.gz: 5572417e3bbf04894ce218ab87c85e58456b46c974b9914a5e8bc58928c1b5d1416799a9f02e1a512e48bc30f5b32f95c0dcab70e1c5f3bff5d299b6f63fd55a
6
+ metadata.gz: 7ad5d6d2d7b5bfe4cb3adc3864c5671042b3085d703a3f01981e6088141f40f62ae17b4b837d957e596965d2a64f28fdf87a0f0aadbb9b5d415bb9d9f64e9019
7
+ data.tar.gz: cbae5df406a5a1f571fecb0aef8bd921985c31893fa79c1520641e6b49922b63996da581912db8aeb56cdf3f364f6004ff390bb4598e7ccd577cd8a32ed449e5
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- fintoc (1.7.0)
4
+ fintoc (1.8.0)
5
5
  http
6
6
  money-rails
7
7
  tabulate
data/README.md CHANGED
@@ -530,6 +530,14 @@ client = Fintoc::Client.new('api_key', jws_private_key: 'jws_private_key')
530
530
  # Create an account verification
531
531
  account_verification = client.v2.account_verifications.create(account_number: 'account_number')
532
532
 
533
+ # Create an account verification for a Chilean account
534
+ account_verification = client.v2.account_verifications.create(
535
+ account_number: '000000001',
536
+ institution_id: 'cl_banco_de_chile',
537
+ account_type: 'checking_account',
538
+ holder_id: '11.111.111-1'
539
+ )
540
+
533
541
  # Get a specific account verification
534
542
  account_verification = client.v2.account_verifications.get('account_verification_id')
535
543
 
data/lib/fintoc/errors.rb CHANGED
@@ -191,6 +191,8 @@ module Fintoc
191
191
  class InvoiceNotPayableError < FintocError; end
192
192
  class InvoiceNotVoidableError < FintocError; end
193
193
  class LegalRepresentativeRequiredError < FintocError; end
194
+ class MandateLimitExceededError < FintocError; end
195
+ class MaximumAmountLimitError < FintocError; end
194
196
  class MerchantChargeLimitExceededError < FintocError; end
195
197
  class MerchantVolumeLimitExceededError < FintocError; end
196
198
  class NotOneDayCompanyError < FintocError; end
@@ -8,8 +8,8 @@ module Fintoc
8
8
  @client = client
9
9
  end
10
10
 
11
- def create(account_number:, idempotency_key: nil)
12
- data = _create_account_verification(account_number:, idempotency_key:)
11
+ def create(account_number:, idempotency_key: nil, **params)
12
+ data = _create_account_verification(account_number:, idempotency_key:, **params)
13
13
  build_account_verification(data)
14
14
  end
15
15
 
@@ -24,9 +24,9 @@ module Fintoc
24
24
 
25
25
  private
26
26
 
27
- def _create_account_verification(account_number:, idempotency_key: nil)
27
+ def _create_account_verification(account_number:, idempotency_key: nil, **params)
28
28
  @client.post(version: :v2, use_jws: true, idempotency_key:)
29
- .call('account_verifications', account_number:)
29
+ .call('account_verifications', account_number:, **params)
30
30
  end
31
31
 
32
32
  def _get_account_verification(account_verification_id)
@@ -5,9 +5,9 @@ module Fintoc
5
5
  :customer_email, :customer_phone, :error_reason, :expires_at, :invoices,
6
6
  :metadata, :mode, :next_action, :payment_method, :payment_type,
7
7
  :payment_type_options, :recipient_account, :reference_id, :sender_account,
8
- :status, :transaction_date, :widget_token
8
+ :split, :split_applied, :status, :transaction_date, :widget_token
9
9
 
10
- def initialize( # rubocop:disable Metrics/MethodLength
10
+ def initialize( # rubocop:disable Metrics/AbcSize, Metrics/MethodLength
11
11
  id:,
12
12
  object:,
13
13
  amount: nil,
@@ -29,6 +29,8 @@ module Fintoc
29
29
  recipient_account: nil,
30
30
  reference_id: nil,
31
31
  sender_account: nil,
32
+ split: nil,
33
+ split_applied: nil,
32
34
  status: nil,
33
35
  transaction_date: nil,
34
36
  widget_token: nil,
@@ -55,6 +57,8 @@ module Fintoc
55
57
  @recipient_account = recipient_account
56
58
  @reference_id = reference_id
57
59
  @sender_account = sender_account
60
+ @split = split
61
+ @split_applied = split_applied
58
62
  @status = status
59
63
  @transaction_date = transaction_date
60
64
  @widget_token = widget_token
@@ -1,3 +1,3 @@
1
1
  module Fintoc
2
- VERSION = '1.7.0'
2
+ VERSION = '1.8.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.7.0
4
+ version: 1.8.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Juan Ca Sardin