bitpagos 0.2.1 → 0.2.2

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: 6087fb6a708b9cf6b27db4ef9674370e45d74fef
4
- data.tar.gz: 1b0cb6ca29457e2708dd9f6f8408951be499e12c
3
+ metadata.gz: 60ca94b3844e127c4893feb23035034be90d43d4
4
+ data.tar.gz: e18c640e8be7acc1b281208dbbcdc1cba7cc3aee
5
5
  SHA512:
6
- metadata.gz: d2a6412e974a7aa4bc3814c81b9cffaa1bdc1b6e17fcc8dfc8b252f0053400b13a2df10920e197104509cc137ae184cbc0180842faf9fffb36dee3b2215a2222
7
- data.tar.gz: 1ac21b32811e63d2ce21012ef306414fa5359f0d91f5170e0ee6c5139d3e5669a9214cc67c0ec1afed10ecfc00f05483c840b48faa5b51a14b8da8794930bf96
6
+ metadata.gz: 0e9e0e67325ee01afde86130b0243f645d5409326fe02033ecf0cc6bf0d2058402b5c92cfa64c507d18751896c33c6d351e513e3e30a80d10a738d9d005656c2
7
+ data.tar.gz: 7d08f81e70f5f9e3a14bf00e6ba8bcf1980c5c43b49c390b2c4c431e205ba8abe8e05638233b816782ac85dc554fbfd2cd072c5b177cfe390d797e2e87c50cb7
@@ -1,5 +1,9 @@
1
1
  module Bitpagos
2
2
  class Client
3
+ PENDING = "PE".freeze
4
+ WAITING = "WA".freeze
5
+ COMPLETED = "CO".freeze
6
+ PARTIALLY_PAID = "PP".freeze
3
7
  API_BASE = "https://www.bitpagos.com/api/v1".freeze
4
8
 
5
9
  attr_accessor :headers, :api_base
@@ -15,6 +19,7 @@ module Bitpagos
15
19
  end
16
20
 
17
21
  def get_transaction(transaction_id)
22
+ retrieve_transactions(nil, transaction_id)
18
23
  end
19
24
 
20
25
  def all_transactions
@@ -22,16 +27,19 @@ module Bitpagos
22
27
  end
23
28
 
24
29
  def completed_transactions
25
- retrieve_transactions
30
+ retrieve_transactions(COMPLETED)
26
31
  end
27
32
 
28
33
  def waiting_transactions
34
+ retrieve_transactions(WAITING)
29
35
  end
30
36
 
31
37
  def pending_transactions
38
+ retrieve_transactions(PENDING)
32
39
  end
33
40
 
34
41
  def partially_paid_transactions
42
+ retrieve_transactions(PARTIALLY_PAID)
35
43
  end
36
44
 
37
45
  private
@@ -1,3 +1,3 @@
1
1
  module Bitpagos
2
- VERSION = '0.2.1'
2
+ VERSION = '0.2.2'
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.1
4
+ version: 0.2.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Mauro Otonelli