omise 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.gitignore +14 -0
- data/Gemfile +4 -0
- data/LICENSE.txt +22 -0
- data/README.md +56 -0
- data/Rakefile +8 -0
- data/data/ca_certificates.pem +105 -0
- data/lib/omise.rb +6 -0
- data/lib/omise/account.rb +8 -0
- data/lib/omise/all.rb +9 -0
- data/lib/omise/attributes.rb +63 -0
- data/lib/omise/balance.rb +8 -0
- data/lib/omise/card.rb +19 -0
- data/lib/omise/card_list.rb +22 -0
- data/lib/omise/charge.rb +55 -0
- data/lib/omise/config.rb +36 -0
- data/lib/omise/customer.rb +50 -0
- data/lib/omise/error.rb +12 -0
- data/lib/omise/list.rb +37 -0
- data/lib/omise/object.rb +60 -0
- data/lib/omise/refund.rb +32 -0
- data/lib/omise/refund_list.rb +19 -0
- data/lib/omise/resource.rb +43 -0
- data/lib/omise/singleton_resource.rb +21 -0
- data/lib/omise/testing/resource.rb +38 -0
- data/lib/omise/token.rb +26 -0
- data/lib/omise/transaction.rb +16 -0
- data/lib/omise/transfer.rb +32 -0
- data/lib/omise/util.rb +24 -0
- data/lib/omise/vault.rb +15 -0
- data/lib/omise/version.rb +3 -0
- data/omise.gemspec +25 -0
- data/test/fixtures/api.omise.co/account-get.json +6 -0
- data/test/fixtures/api.omise.co/balance-get.json +7 -0
- data/test/fixtures/api.omise.co/charges-get.json +59 -0
- data/test/fixtures/api.omise.co/charges-post.json +36 -0
- data/test/fixtures/api.omise.co/charges/404-get.json +6 -0
- data/test/fixtures/api.omise.co/charges/chrg_test_4yq7duw15p9hdrjp8oq-get.json +58 -0
- data/test/fixtures/api.omise.co/charges/chrg_test_4yq7duw15p9hdrjp8oq-patch.json +58 -0
- data/test/fixtures/api.omise.co/charges/chrg_test_4yq7duw15p9hdrjp8oq/refunds-get.json +21 -0
- data/test/fixtures/api.omise.co/charges/chrg_test_4yq7duw15p9hdrjp8oq/refunds-post.json +10 -0
- data/test/fixtures/api.omise.co/charges/chrg_test_4yq7duw15p9hdrjp8oq/refunds/404-get.json +6 -0
- data/test/fixtures/api.omise.co/charges/chrg_test_4yq7duw15p9hdrjp8oq/refunds/rfnd_test_4yqmv79ahghsiz23y3c-get.json +10 -0
- data/test/fixtures/api.omise.co/customers-get.json +49 -0
- data/test/fixtures/api.omise.co/customers-post.json +22 -0
- data/test/fixtures/api.omise.co/customers/404-get.json +6 -0
- data/test/fixtures/api.omise.co/customers/cust_test_4yq6txdpfadhbaqnwp3-delete.json +6 -0
- data/test/fixtures/api.omise.co/customers/cust_test_4yq6txdpfadhbaqnwp3-get.json +39 -0
- data/test/fixtures/api.omise.co/customers/cust_test_4yq6txdpfadhbaqnwp3-patch.json +39 -0
- data/test/fixtures/api.omise.co/customers/cust_test_4yq6txdpfadhbaqnwp3/cards/404-get.json +6 -0
- data/test/fixtures/api.omise.co/customers/cust_test_4yq6txdpfadhbaqnwp3/cards/card_test_4yq6tuucl9h4erukfl0-delete.json +6 -0
- data/test/fixtures/api.omise.co/customers/cust_test_4yq6txdpfadhbaqnwp3/cards/card_test_4yq6tuucl9h4erukfl0-get.json +18 -0
- data/test/fixtures/api.omise.co/customers/cust_test_4yq6txdpfadhbaqnwp3/cards/card_test_4yq6tuucl9h4erukfl0-patch.json +18 -0
- data/test/fixtures/api.omise.co/transactions-get.json +26 -0
- data/test/fixtures/api.omise.co/transactions/trxn_test_4yq7duwb9jts1vxgqua-get.json +8 -0
- data/test/fixtures/api.omise.co/transactions/trxn_test_4yqafnvlztbf3908vs1-get.json +8 -0
- data/test/fixtures/api.omise.co/transactions/trxn_test_4yqmv79fzpy0gmz5mmq-get.json +8 -0
- data/test/fixtures/api.omise.co/transfers-get.json +24 -0
- data/test/fixtures/api.omise.co/transfers-post.json +14 -0
- data/test/fixtures/api.omise.co/transfers/trsf_test_4yqacz8t3cbipcj766u-get.json +14 -0
- data/test/fixtures/vault.omise.co/tokens-post.json +25 -0
- data/test/fixtures/vault.omise.co/tokens/tokn_test_4yq8lbecl0q6dsjzxr5-get.json +25 -0
- data/test/omise/test_account.rb +19 -0
- data/test/omise/test_balance.rb +19 -0
- data/test/omise/test_card.rb +52 -0
- data/test/omise/test_charge.rb +56 -0
- data/test/omise/test_customer.rb +59 -0
- data/test/omise/test_refund.rb +41 -0
- data/test/omise/test_token.rb +31 -0
- data/test/omise/test_transaction.rb +18 -0
- data/test/omise/test_transfer.rb +24 -0
- data/test/support.rb +12 -0
- data/test/test_omise.rb +7 -0
- metadata +214 -0
data/omise.gemspec
ADDED
@@ -0,0 +1,25 @@
|
|
1
|
+
# coding: utf-8
|
2
|
+
lib = File.expand_path('../lib', __FILE__)
|
3
|
+
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
4
|
+
require 'omise/version'
|
5
|
+
|
6
|
+
Gem::Specification.new do |spec|
|
7
|
+
spec.name = "omise"
|
8
|
+
spec.version = Omise::VERSION
|
9
|
+
spec.authors = ["Robin Clart"]
|
10
|
+
spec.email = ["robin@omise.co"]
|
11
|
+
spec.summary = %q{Omise Ruby client}
|
12
|
+
spec.homepage = "https://www.omise.co/"
|
13
|
+
spec.license = "MIT"
|
14
|
+
|
15
|
+
spec.files = `git ls-files -z`.split("\x0")
|
16
|
+
spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
|
17
|
+
spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
|
18
|
+
spec.require_paths = ["lib"]
|
19
|
+
|
20
|
+
spec.add_dependency "rest-client", "~> 1.7.2"
|
21
|
+
|
22
|
+
spec.add_development_dependency "bundler", "~> 1.7"
|
23
|
+
spec.add_development_dependency "rake", "~> 10.0"
|
24
|
+
spec.add_development_dependency "minitest", "~> 5.4.2"
|
25
|
+
end
|
@@ -0,0 +1,59 @@
|
|
1
|
+
{
|
2
|
+
"object": "list",
|
3
|
+
"from": "1970-01-01T00:00:00+00:00",
|
4
|
+
"to": "2015-01-15T05:04:30+00:00",
|
5
|
+
"offset": 0,
|
6
|
+
"limit": 20,
|
7
|
+
"total": 2,
|
8
|
+
"data": [
|
9
|
+
{
|
10
|
+
"object": "charge",
|
11
|
+
"id": "chrg_test_4yq7duw15p9hdrjp8oq",
|
12
|
+
"livemode": false,
|
13
|
+
"location": "/charges/chrg_test_4yq7duw15p9hdrjp8oq",
|
14
|
+
"amount": 100000,
|
15
|
+
"currency": "thb",
|
16
|
+
"description": "Charge for order 3947",
|
17
|
+
"capture": true,
|
18
|
+
"authorized": true,
|
19
|
+
"captured": true,
|
20
|
+
"transaction": "trxn_test_4yq7duwb9jts1vxgqua",
|
21
|
+
"refunded": 0,
|
22
|
+
"refunds": {
|
23
|
+
"object": "list",
|
24
|
+
"from": "1970-01-01T00:00:00+00:00",
|
25
|
+
"to": "2015-01-15T05:04:30+00:00",
|
26
|
+
"offset": 0,
|
27
|
+
"limit": 20,
|
28
|
+
"total": 0,
|
29
|
+
"data": [
|
30
|
+
|
31
|
+
],
|
32
|
+
"location": "/charges/chrg_test_4yq7duw15p9hdrjp8oq/refunds"
|
33
|
+
},
|
34
|
+
"failure_code": null,
|
35
|
+
"failure_message": null,
|
36
|
+
"card": {
|
37
|
+
"object": "card",
|
38
|
+
"id": "card_test_4yq6tuucl9h4erukfl0",
|
39
|
+
"livemode": false,
|
40
|
+
"location": "/customers/cust_test_4yq6txdpfadhbaqnwp3/cards/card_test_4yq6tuucl9h4erukfl0",
|
41
|
+
"country": "",
|
42
|
+
"city": "Bangkok",
|
43
|
+
"postal_code": "10320",
|
44
|
+
"financing": "",
|
45
|
+
"last_digits": "4242",
|
46
|
+
"brand": "Visa",
|
47
|
+
"expiration_month": 1,
|
48
|
+
"expiration_year": 2017,
|
49
|
+
"fingerprint": "sRF/oMw2UQJJp/WbU+2/ZbVzwROjpMf1lyhOHhOqziw=",
|
50
|
+
"name": "JOHN DOE",
|
51
|
+
"security_code_check": true,
|
52
|
+
"created": "2015-01-15T04:03:40Z"
|
53
|
+
},
|
54
|
+
"customer": "cust_test_4yq6txdpfadhbaqnwp3",
|
55
|
+
"ip": null,
|
56
|
+
"created": "2015-01-15T05:00:29Z"
|
57
|
+
}
|
58
|
+
]
|
59
|
+
}
|
@@ -0,0 +1,36 @@
|
|
1
|
+
{
|
2
|
+
"object": "charge",
|
3
|
+
"id": "chrg_test_4yq7duw15p9hdrjp8oq",
|
4
|
+
"livemode": false,
|
5
|
+
"location": "/charges/chrg_test_4yq7duw15p9hdrjp8oq",
|
6
|
+
"amount": 100000,
|
7
|
+
"currency": "thb",
|
8
|
+
"description": "Charge for order 3947",
|
9
|
+
"capture": true,
|
10
|
+
"authorized": true,
|
11
|
+
"captured": true,
|
12
|
+
"transaction": "trxn_test_4yq7duwb9jts1vxgqua",
|
13
|
+
"failure_code": null,
|
14
|
+
"failure_message": null,
|
15
|
+
"card": {
|
16
|
+
"object": "card",
|
17
|
+
"id": "card_test_4yq6tuucl9h4erukfl0",
|
18
|
+
"livemode": false,
|
19
|
+
"location": "/customers/cust_test_4yq6txdpfadhbaqnwp3/cards/card_test_4yq6tuucl9h4erukfl0",
|
20
|
+
"country": "",
|
21
|
+
"city": "Bangkok",
|
22
|
+
"postal_code": "10320",
|
23
|
+
"financing": "",
|
24
|
+
"last_digits": "4242",
|
25
|
+
"brand": "Visa",
|
26
|
+
"expiration_month": 1,
|
27
|
+
"expiration_year": 2017,
|
28
|
+
"fingerprint": "sRF/oMw2UQJJp/WbU+2/ZbVzwROjpMf1lyhOHhOqziw=",
|
29
|
+
"name": "JOHN DOE",
|
30
|
+
"security_code_check": true,
|
31
|
+
"created": "2015-01-15T04:03:40Z"
|
32
|
+
},
|
33
|
+
"customer": "cust_test_4yq6txdpfadhbaqnwp3",
|
34
|
+
"ip": null,
|
35
|
+
"created": "2015-01-15T05:00:29Z"
|
36
|
+
}
|
@@ -0,0 +1,58 @@
|
|
1
|
+
{
|
2
|
+
"object": "charge",
|
3
|
+
"id": "chrg_test_4yq7duw15p9hdrjp8oq",
|
4
|
+
"livemode": false,
|
5
|
+
"location": "/charges/chrg_test_4yq7duw15p9hdrjp8oq",
|
6
|
+
"amount": 100000,
|
7
|
+
"currency": "thb",
|
8
|
+
"description": "Charge for order 3947",
|
9
|
+
"capture": true,
|
10
|
+
"authorized": true,
|
11
|
+
"captured": true,
|
12
|
+
"transaction": "trxn_test_4yq7duwb9jts1vxgqua",
|
13
|
+
"refunded": 10000,
|
14
|
+
"refunds": {
|
15
|
+
"object": "list",
|
16
|
+
"from": "1970-01-01T00:00:00+00:00",
|
17
|
+
"to": "2015-01-16T07:23:49+00:00",
|
18
|
+
"offset": 0,
|
19
|
+
"limit": 20,
|
20
|
+
"total": 1,
|
21
|
+
"data": [
|
22
|
+
{
|
23
|
+
"object": "refund",
|
24
|
+
"id": "rfnd_test_4yqmv79ahghsiz23y3c",
|
25
|
+
"location": "/charges/chrg_test_4yq7duw15p9hdrjp8oq/refunds/rfnd_test_4yqmv79ahghsiz23y3c",
|
26
|
+
"amount": 10000,
|
27
|
+
"currency": "thb",
|
28
|
+
"charge": "chrg_test_4yq7duw15p9hdrjp8oq",
|
29
|
+
"transaction": "trxn_test_4yqmv79fzpy0gmz5mmq",
|
30
|
+
"created": "2015-01-16T07:23:45Z"
|
31
|
+
}
|
32
|
+
],
|
33
|
+
"location": "/charges/chrg_test_4yq7duw15p9hdrjp8oq/refunds"
|
34
|
+
},
|
35
|
+
"failure_code": null,
|
36
|
+
"failure_message": null,
|
37
|
+
"card": {
|
38
|
+
"object": "card",
|
39
|
+
"id": "card_test_4yq6tuucl9h4erukfl0",
|
40
|
+
"livemode": false,
|
41
|
+
"location": "/customers/cust_test_4yq6txdpfadhbaqnwp3/cards/card_test_4yq6tuucl9h4erukfl0",
|
42
|
+
"country": "",
|
43
|
+
"city": "Bangkok",
|
44
|
+
"postal_code": "10320",
|
45
|
+
"financing": "",
|
46
|
+
"last_digits": "4242",
|
47
|
+
"brand": "Visa",
|
48
|
+
"expiration_month": 1,
|
49
|
+
"expiration_year": 2017,
|
50
|
+
"fingerprint": "sRF/oMw2UQJJp/WbU+2/ZbVzwROjpMf1lyhOHhOqziw=",
|
51
|
+
"name": "JOHN DOE",
|
52
|
+
"security_code_check": true,
|
53
|
+
"created": "2015-01-15T04:03:40Z"
|
54
|
+
},
|
55
|
+
"customer": "cust_test_4yq6txdpfadhbaqnwp3",
|
56
|
+
"ip": null,
|
57
|
+
"created": "2015-01-15T05:00:29Z"
|
58
|
+
}
|
@@ -0,0 +1,58 @@
|
|
1
|
+
{
|
2
|
+
"object": "charge",
|
3
|
+
"id": "chrg_test_4yq7duw15p9hdrjp8oq",
|
4
|
+
"livemode": false,
|
5
|
+
"location": "/charges/chrg_test_4yq7duw15p9hdrjp8oq",
|
6
|
+
"amount": 100000,
|
7
|
+
"currency": "thb",
|
8
|
+
"description": "Charge for order 3947 (XXL)",
|
9
|
+
"capture": true,
|
10
|
+
"authorized": true,
|
11
|
+
"captured": true,
|
12
|
+
"transaction": "trxn_test_4yq7duwb9jts1vxgqua",
|
13
|
+
"refunded": 10000,
|
14
|
+
"refunds": {
|
15
|
+
"object": "list",
|
16
|
+
"from": "1970-01-01T00:00:00+00:00",
|
17
|
+
"to": "2015-01-16T07:23:49+00:00",
|
18
|
+
"offset": 0,
|
19
|
+
"limit": 20,
|
20
|
+
"total": 1,
|
21
|
+
"data": [
|
22
|
+
{
|
23
|
+
"object": "refund",
|
24
|
+
"id": "rfnd_test_4yqmv79ahghsiz23y3c",
|
25
|
+
"location": "/charges/chrg_test_4yq7duw15p9hdrjp8oq/refunds/rfnd_test_4yqmv79ahghsiz23y3c",
|
26
|
+
"amount": 10000,
|
27
|
+
"currency": "thb",
|
28
|
+
"charge": "chrg_test_4yq7duw15p9hdrjp8oq",
|
29
|
+
"transaction": "trxn_test_4yqmv79fzpy0gmz5mmq",
|
30
|
+
"created": "2015-01-16T07:23:45Z"
|
31
|
+
}
|
32
|
+
],
|
33
|
+
"location": "/charges/chrg_test_4yq7duw15p9hdrjp8oq/refunds"
|
34
|
+
},
|
35
|
+
"failure_code": null,
|
36
|
+
"failure_message": null,
|
37
|
+
"card": {
|
38
|
+
"object": "card",
|
39
|
+
"id": "card_test_4yq6tuucl9h4erukfl0",
|
40
|
+
"livemode": false,
|
41
|
+
"location": "/customers/cust_test_4yq6txdpfadhbaqnwp3/cards/card_test_4yq6tuucl9h4erukfl0",
|
42
|
+
"country": "",
|
43
|
+
"city": "Bangkok",
|
44
|
+
"postal_code": "10320",
|
45
|
+
"financing": "",
|
46
|
+
"last_digits": "4242",
|
47
|
+
"brand": "Visa",
|
48
|
+
"expiration_month": 1,
|
49
|
+
"expiration_year": 2017,
|
50
|
+
"fingerprint": "sRF/oMw2UQJJp/WbU+2/ZbVzwROjpMf1lyhOHhOqziw=",
|
51
|
+
"name": "JOHN DOE",
|
52
|
+
"security_code_check": true,
|
53
|
+
"created": "2015-01-15T04:03:40Z"
|
54
|
+
},
|
55
|
+
"customer": "cust_test_4yq6txdpfadhbaqnwp3",
|
56
|
+
"ip": null,
|
57
|
+
"created": "2015-01-15T05:00:29Z"
|
58
|
+
}
|
@@ -0,0 +1,21 @@
|
|
1
|
+
{
|
2
|
+
"object": "list",
|
3
|
+
"from": "1970-01-01T00:00:00+00:00",
|
4
|
+
"to": "2015-01-16T07:24:51+00:00",
|
5
|
+
"offset": 0,
|
6
|
+
"limit": 20,
|
7
|
+
"total": 1,
|
8
|
+
"data": [
|
9
|
+
{
|
10
|
+
"object": "refund",
|
11
|
+
"id": "rfnd_test_4yqmv79ahghsiz23y3c",
|
12
|
+
"location": "/charges/chrg_test_4yq7duw15p9hdrjp8oq/refunds/rfnd_test_4yqmv79ahghsiz23y3c",
|
13
|
+
"amount": 10000,
|
14
|
+
"currency": "thb",
|
15
|
+
"charge": "chrg_test_4yq7duw15p9hdrjp8oq",
|
16
|
+
"transaction": "trxn_test_4yqmv79fzpy0gmz5mmq",
|
17
|
+
"created": "2015-01-16T07:23:45Z"
|
18
|
+
}
|
19
|
+
],
|
20
|
+
"location": "/charges/chrg_test_4yq7duw15p9hdrjp8oq/refunds"
|
21
|
+
}
|
@@ -0,0 +1,10 @@
|
|
1
|
+
{
|
2
|
+
"object": "refund",
|
3
|
+
"id": "rfnd_test_4yqmv79ahghsiz23y3c",
|
4
|
+
"location": "/charges/chrg_test_4yq7duw15p9hdrjp8oq/refunds/rfnd_test_4yqmv79ahghsiz23y3c",
|
5
|
+
"amount": 10000,
|
6
|
+
"currency": "thb",
|
7
|
+
"charge": "chrg_test_4yq7duw15p9hdrjp8oq",
|
8
|
+
"transaction": "trxn_test_4yqmv79fzpy0gmz5mmq",
|
9
|
+
"created": "2015-01-16T07:23:45Z"
|
10
|
+
}
|
@@ -0,0 +1,10 @@
|
|
1
|
+
{
|
2
|
+
"object": "refund",
|
3
|
+
"id": "rfnd_test_4yqmv79ahghsiz23y3c",
|
4
|
+
"location": "/charges/chrg_test_4yq7duw15p9hdrjp8oq/refunds/rfnd_test_4yqmv79ahghsiz23y3c",
|
5
|
+
"amount": 10000,
|
6
|
+
"currency": "thb",
|
7
|
+
"charge": "chrg_test_4yq7duw15p9hdrjp8oq",
|
8
|
+
"transaction": "trxn_test_4yqmv79fzpy0gmz5mmq",
|
9
|
+
"created": "2015-01-16T07:23:45Z"
|
10
|
+
}
|
@@ -0,0 +1,49 @@
|
|
1
|
+
{
|
2
|
+
"object": "list",
|
3
|
+
"from": "1970-01-01T00:00:00+00:00",
|
4
|
+
"to": "2015-01-15T04:23:47+00:00",
|
5
|
+
"offset": 0,
|
6
|
+
"limit": 20,
|
7
|
+
"total": 1,
|
8
|
+
"data": [
|
9
|
+
{
|
10
|
+
"object": "customer",
|
11
|
+
"id": "cust_test_4yq6txdpfadhbaqnwp3",
|
12
|
+
"livemode": false,
|
13
|
+
"location": "/customers/cust_test_4yq6txdpfadhbaqnwp3",
|
14
|
+
"default_card": "card_test_4yq6tuucl9h4erukfl0",
|
15
|
+
"email": "john.doe@example.com",
|
16
|
+
"description": "John Doe (id: 30)",
|
17
|
+
"created": "2015-01-15T04:03:52Z",
|
18
|
+
"cards": {
|
19
|
+
"object": "list",
|
20
|
+
"from": "1970-01-01T00:00:00+00:00",
|
21
|
+
"to": "2015-01-15T04:23:47+00:00",
|
22
|
+
"offset": 0,
|
23
|
+
"limit": 20,
|
24
|
+
"total": 1,
|
25
|
+
"data": [
|
26
|
+
{
|
27
|
+
"object": "card",
|
28
|
+
"id": "card_test_4yq6tuucl9h4erukfl0",
|
29
|
+
"livemode": false,
|
30
|
+
"location": "/customers/cust_test_4yq6txdpfadhbaqnwp3/cards/card_test_4yq6tuucl9h4erukfl0",
|
31
|
+
"country": "",
|
32
|
+
"city": "Bangkok",
|
33
|
+
"postal_code": "10320",
|
34
|
+
"financing": "",
|
35
|
+
"last_digits": "4242",
|
36
|
+
"brand": "Visa",
|
37
|
+
"expiration_month": 1,
|
38
|
+
"expiration_year": 2017,
|
39
|
+
"fingerprint": "sRF/oMw2UQJJp/WbU+2/ZbVzwROjpMf1lyhOHhOqziw=",
|
40
|
+
"name": "JOHN DOE",
|
41
|
+
"security_code_check": true,
|
42
|
+
"created": "2015-01-15T04:03:40Z"
|
43
|
+
}
|
44
|
+
],
|
45
|
+
"location": "/customers/cust_test_4yq6txdpfadhbaqnwp3/cards"
|
46
|
+
}
|
47
|
+
}
|
48
|
+
]
|
49
|
+
}
|
@@ -0,0 +1,22 @@
|
|
1
|
+
{
|
2
|
+
"object": "customer",
|
3
|
+
"id": "cust_test_4yq6txdpfadhbaqnwp3",
|
4
|
+
"livemode": false,
|
5
|
+
"location": "/customers/cust_test_4yq6txdpfadhbaqnwp3",
|
6
|
+
"default_card": "card_test_4yq6tuucl9h4erukfl0",
|
7
|
+
"email": "john.doe@example.com",
|
8
|
+
"description": "John Doe (id: 30)",
|
9
|
+
"created": "2015-01-15T04:03:52Z",
|
10
|
+
"cards": {
|
11
|
+
"object": "list",
|
12
|
+
"from": "1970-01-01T00:00:00+00:00",
|
13
|
+
"to": "2015-01-15T04:03:52+00:00",
|
14
|
+
"offset": 0,
|
15
|
+
"limit": 20,
|
16
|
+
"total": 1,
|
17
|
+
"data": [
|
18
|
+
|
19
|
+
],
|
20
|
+
"location": "/customers/cust_test_4yq6txdpfadhbaqnwp3/cards"
|
21
|
+
}
|
22
|
+
}
|
@@ -0,0 +1,39 @@
|
|
1
|
+
{
|
2
|
+
"object": "customer",
|
3
|
+
"id": "cust_test_4yq6txdpfadhbaqnwp3",
|
4
|
+
"livemode": false,
|
5
|
+
"location": "/customers/cust_test_4yq6txdpfadhbaqnwp3",
|
6
|
+
"default_card": "card_test_4yq6tuucl9h4erukfl0",
|
7
|
+
"email": "john.doe@example.com",
|
8
|
+
"description": "John Doe (id: 30)",
|
9
|
+
"created": "2015-01-15T04:03:52Z",
|
10
|
+
"cards": {
|
11
|
+
"object": "list",
|
12
|
+
"from": "1970-01-01T00:00:00+00:00",
|
13
|
+
"to": "2015-01-15T04:03:52+00:00",
|
14
|
+
"offset": 0,
|
15
|
+
"limit": 20,
|
16
|
+
"total": 1,
|
17
|
+
"data": [
|
18
|
+
{
|
19
|
+
"object": "card",
|
20
|
+
"id": "card_test_4yq6tuucl9h4erukfl0",
|
21
|
+
"livemode": false,
|
22
|
+
"location": "/customers/cust_test_4yq6txdpfadhbaqnwp3/cards/card_test_4yq6tuucl9h4erukfl0",
|
23
|
+
"country": "",
|
24
|
+
"city": "Bangkok",
|
25
|
+
"postal_code": "10320",
|
26
|
+
"financing": "",
|
27
|
+
"last_digits": "4242",
|
28
|
+
"brand": "Visa",
|
29
|
+
"expiration_month": 1,
|
30
|
+
"expiration_year": 2017,
|
31
|
+
"fingerprint": "sRF/oMw2UQJJp/WbU+2/ZbVzwROjpMf1lyhOHhOqziw=",
|
32
|
+
"name": "JOHN DOE",
|
33
|
+
"security_code_check": true,
|
34
|
+
"created": "2015-01-15T04:03:40Z"
|
35
|
+
}
|
36
|
+
],
|
37
|
+
"location": "/customers/cust_test_4yq6txdpfadhbaqnwp3/cards"
|
38
|
+
}
|
39
|
+
}
|