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 +4 -4
- data/lib/bitpagos/client.rb +9 -1
- data/lib/bitpagos/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 60ca94b3844e127c4893feb23035034be90d43d4
|
4
|
+
data.tar.gz: e18c640e8be7acc1b281208dbbcdc1cba7cc3aee
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0e9e0e67325ee01afde86130b0243f645d5409326fe02033ecf0cc6bf0d2058402b5c92cfa64c507d18751896c33c6d351e513e3e30a80d10a738d9d005656c2
|
7
|
+
data.tar.gz: 7d08f81e70f5f9e3a14bf00e6ba8bcf1980c5c43b49c390b2c4c431e205ba8abe8e05638233b816782ac85dc554fbfd2cd072c5b177cfe390d797e2e87c50cb7
|
data/lib/bitpagos/client.rb
CHANGED
@@ -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
|
data/lib/bitpagos/version.rb
CHANGED