webpay 2.4.0 → 2.4.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/webpay/response_converter.rb +3 -0
- data/lib/webpay/version.rb +1 -1
- data/spec/resources/customers/retrieve.txt +53 -21
- data/spec/webpay/customer_spec.rb +3 -0
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 87d8f18ea9c3ebbec42dd9ba16a04affffc7359c
|
4
|
+
data.tar.gz: cf40c50dc29ba456df180e226de6d0590ecf984e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4288b0e1971a4f31ae6e016bdb9892ad31f3a8bc28124ae2d8a6b575563b9113e59d12246e6a5cf81d00650064791c0392472a3be8e1e9be003c60fa611425b6
|
7
|
+
data.tar.gz: 863e697452bf067c38e7af2f8a8a9d986612f9541281abe193afa4c01412f1cf2976d8e357d325dca2d9857ce88f370350a67fe923e8faa65a72cf669939c3de
|
@@ -25,6 +25,9 @@ module WebPay
|
|
25
25
|
if attributes['active_card']
|
26
26
|
attributes['active_card'] = convert(attributes['active_card'])
|
27
27
|
end
|
28
|
+
if attributes['recursions']
|
29
|
+
attributes['recursions'] = attributes['recursions'].map { |recursion| convert(recursion) }
|
30
|
+
end
|
28
31
|
Customer.new(attributes)
|
29
32
|
when 'token'
|
30
33
|
if attributes['card']
|
data/lib/webpay/version.rb
CHANGED
@@ -1,31 +1,63 @@
|
|
1
1
|
HTTP/1.1 200 OK
|
2
2
|
Content-Type: application/json; charset=utf-8
|
3
3
|
X-Ua-Compatible: IE=Edge
|
4
|
-
Etag: "
|
4
|
+
Etag: "06933120f2f5472b96a5c7bb784fdc79"
|
5
5
|
Cache-Control: max-age=0, private, must-revalidate
|
6
|
-
X-Request-Id:
|
7
|
-
X-Runtime: 0.
|
6
|
+
X-Request-Id: ed053966c8a42b4f1e0b997539c15cc0
|
7
|
+
X-Runtime: 0.027041
|
8
8
|
Server: WEBrick/1.3.1 (Ruby/1.9.3/2013-02-22)
|
9
|
-
Date:
|
10
|
-
Content-Length:
|
9
|
+
Date: Sun, 11 May 2014 20:31:00 GMT
|
10
|
+
Content-Length: 1500
|
11
11
|
Connection: Keep-Alive
|
12
12
|
|
13
13
|
{
|
14
14
|
"id": "cus_39o4Fv82E1et5Xb",
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
15
|
+
"object": "customer",
|
16
|
+
"livemode": false,
|
17
|
+
"created": 1399578334,
|
18
|
+
"email": null,
|
19
|
+
"description": "Test Customer",
|
20
|
+
"active_card": {
|
21
|
+
"object": "card",
|
22
|
+
"exp_year": 2015,
|
23
|
+
"exp_month": 12,
|
24
|
+
"fingerprint": "215b5b2fe460809b8bb90bae6eeac0e0e0987bd7",
|
25
|
+
"name": "KENGO HAMASAKI",
|
26
|
+
"country": "JP",
|
27
|
+
"type": "Visa",
|
28
|
+
"cvc_check": "pass",
|
29
|
+
"last4": "4242"
|
30
|
+
},
|
31
|
+
"recursions": [
|
32
|
+
{
|
33
|
+
"id": "rec_7pF9dTfm11u5cXL",
|
34
|
+
"object": "recursion",
|
35
|
+
"livemode": false,
|
36
|
+
"shop": null,
|
37
|
+
"created": 1399816586,
|
38
|
+
"amount": 200,
|
39
|
+
"currency": "jpy",
|
40
|
+
"period": "month",
|
41
|
+
"description": "",
|
42
|
+
"customer": "cus_799eQegDKfdq05D",
|
43
|
+
"last_executed": 1399816654,
|
44
|
+
"next_scheduled": 1402494986,
|
45
|
+
"status": "active"
|
46
|
+
},
|
47
|
+
{
|
48
|
+
"id": "rec_7pF6qudH9e7xgJF",
|
49
|
+
"object": "recursion",
|
50
|
+
"livemode": false,
|
51
|
+
"shop": null,
|
52
|
+
"created": 1399816800,
|
53
|
+
"amount": 100,
|
54
|
+
"currency": "jpy",
|
55
|
+
"period": "month",
|
56
|
+
"description": "",
|
57
|
+
"customer": "cus_799eQegDKfdq05D",
|
58
|
+
"last_executed": 1399816834,
|
59
|
+
"next_scheduled": 1402495200,
|
60
|
+
"status": "active"
|
61
|
+
}
|
62
|
+
]
|
31
63
|
}
|
@@ -34,6 +34,9 @@ describe WebPay::Customer do
|
|
34
34
|
it 'active_card.fingerprint' do
|
35
35
|
expect(customer.active_card.fingerprint).to eq '215b5b2fe460809b8bb90bae6eeac0e0e0987bd7'
|
36
36
|
end
|
37
|
+
it 'recursions.first.id' do
|
38
|
+
expect(customer.recursions.first.id).to eq 'rec_7pF9dTfm11u5cXL'
|
39
|
+
end
|
37
40
|
end
|
38
41
|
|
39
42
|
describe '.retrieve deleted instance' do
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: webpay
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.4.
|
4
|
+
version: 2.4.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- webpay
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2014-05-
|
12
|
+
date: 2014-05-12 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: faraday
|