bitpagos 0.2.3 → 0.3.0

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: 733ad730ba2a7b7db82a8568e28181f3747e20a9
4
- data.tar.gz: ab91524f88464707d722b70e0815590dfd6d6e96
3
+ metadata.gz: f7169a4a6edfeba0a437acea15d2ab06828e0442
4
+ data.tar.gz: f9125372ab55f2f2e0fc32425ba20b50323d354a
5
5
  SHA512:
6
- metadata.gz: 96040336fac88cf313484e430728f97bc6d983749526134b97234d8d84724ef4f46b2e74ee6ad1e92ba5f0a005376a2fc178685c6d3f73af3e8425a395c5c932
7
- data.tar.gz: cdd2c145cc7298762b012c8b186a2fc4424766a0be903739e765ef0462ce5d70e7597a030c5fb53b248a9cefb694c4184229a85c68fb76e789b450690e514313
6
+ metadata.gz: 126f3dceab89b0a95141733b1a5f8d476aa8abf892cbc2180d6341376f3b2c3e29d75d21d301f04887b41176fb76c93e5a57265df3253eaf3153a052f3c69610
7
+ data.tar.gz: 5d494319701a37422dd55964d3ad75c4702b5c16f494e511360d4974d70522be172cdac5f0b0cb8eecfeaf4e731c3de97ed020f4b085c31a0bad868e6b60c60b
@@ -42,11 +42,19 @@ module Bitpagos
42
42
  retrieve_transactions(PARTIALLY_PAID)
43
43
  end
44
44
 
45
+ # Returns the total count of transactions in all states.
46
+ #
47
+ # @return [Integer] Total transaction count
48
+ def transaction_count
49
+ all_transactions["meta"]["total_count"]
50
+ end
51
+
45
52
  private
46
53
 
47
54
  def retrieve_transactions(query = nil, transaction_id = nil)
48
55
  url = "#{API_BASE}/transaction/#{transaction_id}"
49
- RestClient.get(url, headers)
56
+ response = RestClient.get(url, headers)
57
+ JSON.parse(response)
50
58
  end
51
59
  end
52
60
  end
@@ -1,3 +1,3 @@
1
1
  module Bitpagos
2
- VERSION = '0.2.3'
2
+ VERSION = '0.3.0'
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: bitpagos
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.3
4
+ version: 0.3.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Mauro Otonelli
@@ -105,7 +105,6 @@ files:
105
105
  - lib/bitpagos/client.rb
106
106
  - lib/bitpagos/errors/generic_error.rb
107
107
  - lib/bitpagos/errors/invalid_api_key.rb
108
- - lib/bitpagos/errors/invalid_query.rb
109
108
  - lib/bitpagos/version.rb
110
109
  homepage: http://github.com/ombulabs/bitpagos
111
110
  licenses:
@@ -1,6 +0,0 @@
1
- module Bitpagos
2
- module Errors
3
- class InvalidQuery < GenericError
4
- end
5
- end
6
- end