catarse_pagarme 2.2.1 → 2.3.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
  SHA1:
3
- metadata.gz: 6c48a1512d89ae5ebe5a44edcd38a9548c5fd53a
4
- data.tar.gz: 15e683d53ffea58b753f4cf6888c12171e639049
3
+ metadata.gz: 4bb44dcd1ff070cdd8fe7e8ee470a14cd60defa3
4
+ data.tar.gz: f2839ec3d7a514f999cc09bbc15df01a68a05983
5
5
  SHA512:
6
- metadata.gz: 3b169f22e2c2c12da73d4af92bd6c8df958bc6390673a7fbc6db414f9704d09bcfbbf3119ec224095d2a5b61ef322d022520c2b5632ae778f6c97b24c41f0756
7
- data.tar.gz: bc23d0c2e06d8aa6f06ee080ee3a0325b85a250e4e29739261cef1e68d697c79c00f1ecece782124609f7383d0b54dc020dfe42e82de5bc243e076fa12787d41
6
+ metadata.gz: 94006c7a955913deb3f170a520aa4b409d826aa5481df83138f7e344e6426432c543e6854f050164edece08e833a8f5f7b250a680471cf2546b762a639f994f2
7
+ data.tar.gz: 786669779d47a95aa68ee6ce6ffe50a6d7515b4564d1c900160ff0f4f90054a75c782f2828cbe4b669f82bb3349109b77f31443181b8c2394e55b39f3abc3bf8
@@ -42,6 +42,10 @@ module CatarsePagarme
42
42
  end
43
43
  end
44
44
 
45
+ def value_for_installment(installment)
46
+ get_installment(installment).try(:[], "installment_amount")
47
+ end
48
+
45
49
  def transaction
46
50
  @transaction ||= ::PagarMe::Transaction.find_by_id(self.contribution.payment_id)
47
51
  end
@@ -27,7 +27,7 @@ module CatarsePagarme
27
27
  payment_method: 'Pagarme',
28
28
  slip_url: self.transaction.boleto_url,
29
29
  installments: (self.transaction.installments || 1),
30
- installment_value: (delegator.value_with_installment_tax(self.transaction.installments || 1) / 100.0).to_f,
30
+ installment_value: (delegator.value_for_installment(self.transaction.installments || 0) / 100.0).to_f,
31
31
  acquirer_name: self.transaction.acquirer_name,
32
32
  acquirer_tid: self.transaction.tid
33
33
  }
@@ -1,3 +1,3 @@
1
1
  module CatarsePagarme
2
- VERSION = "2.2.1"
2
+ VERSION = "2.3.0"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: catarse_pagarme
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.2.1
4
+ version: 2.3.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Antônio Roberto Silva