pagseguro-transparente 1.0.0 → 1.0.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: 50b6c3781ffdbe907acfcbbe270e64fbf62a04c0
4
- data.tar.gz: bf8eaa4feb3fdb20515e3ab76c9b3f5d77047ca9
3
+ metadata.gz: 50c23ec1585127452ab5ef5825ab28c1f49d7890
4
+ data.tar.gz: 06b91010e1abc25b4134b3e8525abfa3dc63af30
5
5
  SHA512:
6
- metadata.gz: 55f19a7f2d74fc5c05c04efff644dac7d386a0f1b7e9cd00473ac3ddb6b121c3de436cc602e5e906d471cf8d83dd256a6c0a0a57fc47c99df252f3425de5d2fb
7
- data.tar.gz: 8460ec3591ad1e8c7ec7d86fcf91763302227736bd8e4a8a8eab62f7fa2235cbbb5014addc7e5c030407803d9e6aede29dceddcdb55815bbd8f20adc07f00e67
6
+ metadata.gz: 19c26ce1724c42fe0021c6719a4b8efe1c33783e878ec3c91649398b8a68fb7648f481ab69d260ddee439b8d5cf5832cd63dff3d23d116b1e76e7521e2b84594
7
+ data.tar.gz: 7f135a9e059b7c3d754a083f0d8e95df1657c2f7076dadcbc5a50ef620469f5479258820065d65bada411228055143743bf2b70dbacb39a488253b20153ae72d
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- pagseguro-transparente (1.0.0)
4
+ pagseguro-transparente (1.0.1)
5
5
  activemodel
6
6
  httparty (~> 0.13)
7
7
  i18n (~> 0.7)
@@ -4,7 +4,7 @@ module PagSeguro
4
4
  attr_reader :response
5
5
 
6
6
  def_delegators :creditor_fees, :installment_fee_amount,
7
- :intermediation_rate_amount, :intermediation_fee_amount, :fee_amount
7
+ :intermediation_rate_amount, :intermediation_fee_amount
8
8
 
9
9
  PAYMENT_STATUS = { '1' => :awaiting_payment, '2' => :pending, '3' => :paid,
10
10
  '4' => :available, '5' => :in_dispute, '6' => :refunded, '7' => :canceled,
@@ -100,6 +100,10 @@ module PagSeguro
100
100
  [response['errors']['error']].flatten
101
101
  end
102
102
 
103
+ def fee_amount
104
+ transaction['feeAmount'] || creditor_fees.fee_amount
105
+ end
106
+
103
107
  private
104
108
  def transaction
105
109
  @transaction ||= response['transaction']
@@ -1,3 +1,3 @@
1
1
  module PagSeguro
2
- VERSION = "1.0.0"
2
+ VERSION = "1.0.1"
3
3
  end
@@ -78,6 +78,16 @@ describe PagSeguro::Transaction do
78
78
  its(:errors) { should eq( [ { "code" => "53044", "message" => "credit card holder name invalid value: Flora"} ]) }
79
79
  end
80
80
 
81
+ context 'with fee_amount' do
82
+ let(:xml_file) {
83
+ "<transaction>
84
+ <feeAmount>49.50</feeAmount>
85
+ </transaction>"
86
+ }
87
+
88
+ its(:fee_amount) { should eq("49.50") }
89
+ end
90
+
81
91
  context "various errors" do
82
92
  let(:xml_file) {
83
93
  "<errors>
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: pagseguro-transparente
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0
4
+ version: 1.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Cirdes Henrique
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2015-03-11 00:00:00.000000000 Z
12
+ date: 2015-03-16 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: activemodel