catarse_pagarme 1.5.0 → 1.5.1

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
  SHA1:
3
- metadata.gz: 864f07f0136f325cfd8444c238154bb95747baa2
4
- data.tar.gz: e4acb2eac1b3c145d09fabf6194f9a7007c2a3f8
3
+ metadata.gz: bbe83c3e34caa718da7183ebbb6629580a5dda87
4
+ data.tar.gz: b0497311d790bf10cde2cb6bcd161eee9cfdc828
5
5
  SHA512:
6
- metadata.gz: 4b0f3ad4f53106ec83cec2e5019971aa3c6053301985e761f3f5a1a292ba50ed192d45a7c349388ff0e4f2747756f54de1fa36a24b061c67c494fafed699bf41
7
- data.tar.gz: 08a240dbaee9f74925f4dc43f49630560179d813c2fd07c07af87fc647089208afc84ef2c1946f57732aeab0808ebd1289b8f06617d7978eaca00d96fef7535d
6
+ metadata.gz: 9a73a63493b8294542bee68f4102b456f8ba64bc8e92a2685a6a6a6ef8081300b033de185658a509e7834e22da049a658e0995447e59f3819761da9139ef5614
7
+ data.tar.gz: 714b101839d815588a7dd2b962fc920096eb432c518c9c9ed3ff594a86115a9b2b7751ff6e861b7b0903a284f81158ae934b8c41b0b18042052b2fee288fb82d
@@ -10,6 +10,10 @@ module CatarsePagarme::FeeCalculatorConcern
10
10
  if acquirer_name == 'stone'
11
11
  self.contribution.installments > 1 ? tax_calc_for_installment(stone_tax) : tax_calc(stone_tax)
12
12
  else
13
+ if self.transaction.card_brand == 'amex'
14
+ self.contribution.installments > 1 ? tax_calc_for_installment(cielo_installment_amex_tax) : tax_calc(cielo_installment_not_amex_tax)
15
+ end
16
+
13
17
  current_tax = self.transaction.card_brand == 'diners' ? installment_diners_tax : installment_not_diners_tax
14
18
  self.contribution.installments > 1 ? tax_calc_for_installment(current_tax) : tax_calc(cielo_tax)
15
19
  end
@@ -50,5 +54,13 @@ module CatarsePagarme::FeeCalculatorConcern
50
54
  CatarsePagarme.configuration.cielo_installment_not_diners_tax.to_f
51
55
  end
52
56
 
57
+ def cielo_installment_amex_tax
58
+ CatarsePagarme.configuration.cielo_installment_amex_tax.to_f
59
+ end
60
+
61
+ def cielo_installment_not_amex_tax
62
+ CatarsePagarme.configuration.cielo_installment_not_amex_tax.to_f
63
+ end
64
+
53
65
  end
54
66
  end
@@ -2,7 +2,8 @@ module CatarsePagarme
2
2
  class Configuration
3
3
  attr_accessor :api_key, :slip_tax, :credit_card_tax, :interest_rate, :host, :subdomain, :protocol,
4
4
  :max_installments, :minimum_value_for_installment, :credit_card_cents_fee, :pagarme_tax, :stone_tax,
5
- :cielo_tax, :cielo_installment_diners_tax, :cielo_installment_not_diners_tax
5
+ :cielo_tax, :cielo_installment_diners_tax, :cielo_installment_not_diners_tax,
6
+ :cielo_installment_amex_tax, :cielo_installment_not_amex_tax
6
7
 
7
8
  def initialize
8
9
  self.api_key = ''
@@ -1,3 +1,3 @@
1
1
  module CatarsePagarme
2
- VERSION = "1.5.0"
2
+ VERSION = "1.5.1"
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: 1.5.0
4
+ version: 1.5.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Antônio Roberto Silva
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2014-12-23 00:00:00.000000000 Z
12
+ date: 2015-01-08 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rails