pagseguro-transparente 0.1.0 → 0.1.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: ab12880a19ccddd101916786a109ea33609f33e9
4
- data.tar.gz: 486667259e55a2f582a476b2d0f51b62b9ca1ba7
3
+ metadata.gz: 46c48e033101e088eac0919e399bb95a04191f39
4
+ data.tar.gz: 4103d9ed90670ac93d064a2fede0a3fd0607c0ce
5
5
  SHA512:
6
- metadata.gz: 995fa7f0e326d57756292aa75c8d430ea3b7d31cb410c92ea80f4b529e7aa0ad772486458ed11d67d7d194babd5d2ad71f075a177654bc0c8d8fa643a83b3869
7
- data.tar.gz: 59eac8af961141f789a4aabb2b034f45b26cd79e58cb818f835ece64bcc51a1e8e40fe29eaaf0bf0fecec22e38511b7c39cdd13a6bfb7d01dc31242f3010bedc
6
+ metadata.gz: a17ae59afdb86543e8bc8b7731105f4fa07c00cebaa1720e749c6c6d4dacf062660dd8f48adb578ace232bde70ae77f9d90c7cce1cbc3cb53ccbbb363e4942fd
7
+ data.tar.gz: 779c5ad5e9ab57a39610dcd23b1fe0b09d849d03c8df556eb809d01f590bdf2b01fec195a51d6b350aebc08336e9a2bdf128c85c3a5d41a05db33a83ee338d86
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- pagseguro-transparente (0.0.9)
4
+ pagseguro-transparente (0.1.0)
5
5
  activemodel
6
6
  httparty (~> 0.13)
7
7
  i18n (~> 0.6)
data/lib/pagseguro.rb CHANGED
@@ -16,6 +16,7 @@ require "pagseguro/transaction/phone"
16
16
  require "pagseguro/transaction/sender"
17
17
  require "pagseguro/transaction/shipping"
18
18
  require "pagseguro/notification"
19
+ require "pagseguro/query"
19
20
  require "pagseguro/sender"
20
21
  require "pagseguro/phone"
21
22
  require "pagseguro/document"
@@ -0,0 +1,13 @@
1
+ module PagSeguro
2
+ class Query < Request
3
+ attr_accessor :code, :email, :token
4
+
5
+ def initialize(code)
6
+ @code = code
7
+ end
8
+
9
+ def transaction
10
+ PagSeguro::Transaction.new get("/transactions/#{code}")
11
+ end
12
+ end
13
+ end
@@ -1,3 +1,3 @@
1
1
  module PagSeguro
2
- VERSION = "0.1.0"
2
+ VERSION = "0.1.1"
3
3
  end
@@ -0,0 +1,25 @@
1
+ require "spec_helper"
2
+
3
+ describe PagSeguro::Query do
4
+ let(:code) { '64C4CB1E-5FF2-4092-BE17-CACE271D789E' }
5
+
6
+ let(:query) { PagSeguro::Query.new(code) }
7
+ subject { query }
8
+
9
+ it { should respond_to(:transaction) }
10
+
11
+ before do
12
+ PagSeguro.email = 'mail'
13
+ PagSeguro.token = 'token'
14
+ end
15
+
16
+ describe "#transaction" do
17
+ subject { query.transaction }
18
+ before do
19
+ stub_request(:get, "https://ws.pagseguro.uol.com.br/v2/transactions/64C4CB1E-5FF2-4092-BE17-CACE271D789E?email=mail&token=token").
20
+ to_return(:status => 200, :body => "", :headers => {})
21
+ end
22
+
23
+ it { should be_a_kind_of(PagSeguro::Transaction) }
24
+ end
25
+ end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: pagseguro-transparente
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Cirdes Henrique
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-07-06 00:00:00.000000000 Z
11
+ date: 2014-07-07 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activemodel
@@ -208,6 +208,7 @@ files:
208
208
  - lib/pagseguro/payment.rb
209
209
  - lib/pagseguro/payment/serializer.rb
210
210
  - lib/pagseguro/phone.rb
211
+ - lib/pagseguro/query.rb
211
212
  - lib/pagseguro/request.rb
212
213
  - lib/pagseguro/sender.rb
213
214
  - lib/pagseguro/session.rb
@@ -236,6 +237,7 @@ files:
236
237
  - spec/pagseguro/payment/serializer_spec.rb
237
238
  - spec/pagseguro/payment_spec.rb
238
239
  - spec/pagseguro/phone_spec.rb
240
+ - spec/pagseguro/query_spec.rb
239
241
  - spec/pagseguro/sender_spec.rb
240
242
  - spec/pagseguro/session/response_spec.rb
241
243
  - spec/pagseguro/session_spec.rb
@@ -287,6 +289,7 @@ test_files:
287
289
  - spec/pagseguro/payment/serializer_spec.rb
288
290
  - spec/pagseguro/payment_spec.rb
289
291
  - spec/pagseguro/phone_spec.rb
292
+ - spec/pagseguro/query_spec.rb
290
293
  - spec/pagseguro/sender_spec.rb
291
294
  - spec/pagseguro/session/response_spec.rb
292
295
  - spec/pagseguro/session_spec.rb