omise 0.3.0 → 0.4.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +5 -0
- data/README.md +1 -0
- data/lib/omise/charge.rb +4 -0
- data/lib/omise/version.rb +1 -1
- data/omise.gemspec +1 -1
- data/test/fixtures/api.omise.co/charges/chrg_test_4yq7duw15p9hdrjp8oq/reverse-post.json +50 -0
- data/test/omise/test_charge.rb +4 -0
- metadata +6 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 0ff392328416601e36ba46368afcbb591eeb811b
|
4
|
+
data.tar.gz: e3317b3b98779651c2cfc7bd99621500f57a101d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 61bb3e5a0bfac06e1c930bb78d0e2cf89e07453e8ed1911a8874197d7152e69975457d9e923c2984b92e2a01f44a14180ec9f03707f5495120c585912aab2227
|
7
|
+
data.tar.gz: d5e4f4475e8cc0fc395d2c747206cbb60e569dd3dc8cceb11b3f3478eb9f00e82431197062a4e7d2dbacd3f90e1e1c2aacf8112194dc067a4b3de73441c54856
|
data/CHANGELOG.md
CHANGED
@@ -2,6 +2,11 @@
|
|
2
2
|
|
3
3
|
An [unreleased] version is not available on rubygems and is subject to changes and must not be considered final. Elements of unreleased list may be edited or removed at any time.
|
4
4
|
|
5
|
+
## [0.4.0] 2016-06-01
|
6
|
+
|
7
|
+
- [Added] Add charge reversal method (@zentetsukenz)
|
8
|
+
- [Updated] Update Rest-Client version (@zacksiri)
|
9
|
+
|
5
10
|
## [0.3.0] 2016-02-18
|
6
11
|
|
7
12
|
- [Added] Add Events API
|
data/README.md
CHANGED
@@ -3,6 +3,7 @@
|
|
3
3
|
[![CodeClimate](https://img.shields.io/codeclimate/github/omise/omise-ruby.svg?style=flat)](https://codeclimate.com/github/omise/omise-ruby)
|
4
4
|
![CircleCI](https://img.shields.io/circleci/project/omise/omise-ruby.svg?style=flat)
|
5
5
|
[![Gem](https://img.shields.io/gem/v/omise.svg?style=flat)](https://rubygems.org/gems/omise)
|
6
|
+
[![Join the chat at https://gitter.im/omise/omise-ruby](https://badges.gitter.im/omise/omise-ruby.svg)](https://gitter.im/omise/omise-ruby?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
|
6
7
|
|
7
8
|
## Installation
|
8
9
|
|
data/lib/omise/charge.rb
CHANGED
@@ -33,6 +33,10 @@ module Omise
|
|
33
33
|
assign_attributes nested_resource("capture", options).post
|
34
34
|
end
|
35
35
|
|
36
|
+
def reverse(options = {})
|
37
|
+
assign_attributes nested_resource("reverse", options).post
|
38
|
+
end
|
39
|
+
|
36
40
|
def customer(options = {})
|
37
41
|
expand_attribute Customer, "customer", options
|
38
42
|
end
|
data/lib/omise/version.rb
CHANGED
data/omise.gemspec
CHANGED
@@ -17,7 +17,7 @@ Gem::Specification.new do |spec|
|
|
17
17
|
spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
|
18
18
|
spec.require_paths = ["lib"]
|
19
19
|
|
20
|
-
spec.add_dependency "rest-client", "~> 1.
|
20
|
+
spec.add_dependency "rest-client", "~> 1.8.0"
|
21
21
|
spec.add_dependency "json", "~> 1.8.1"
|
22
22
|
|
23
23
|
spec.add_development_dependency "bundler"
|
@@ -0,0 +1,50 @@
|
|
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
|
+
"reversed": true,
|
12
|
+
"captured": false,
|
13
|
+
"transaction": "trxn_test_4yq7duwb9jts1vxgqua",
|
14
|
+
"refunded": 0,
|
15
|
+
"refunds": {
|
16
|
+
"object": "list",
|
17
|
+
"from": "1970-01-01T00:00:00+00:00",
|
18
|
+
"to": "2015-01-16T07:23:49+00:00",
|
19
|
+
"offset": 0,
|
20
|
+
"limit": 20,
|
21
|
+
"total": 1,
|
22
|
+
"data": [
|
23
|
+
|
24
|
+
],
|
25
|
+
"location": "/charges/chrg_test_4yq7duw15p9hdrjp8oq/refunds"
|
26
|
+
},
|
27
|
+
"failure_code": null,
|
28
|
+
"failure_message": null,
|
29
|
+
"card": {
|
30
|
+
"object": "card",
|
31
|
+
"id": "card_test_4yq6tuucl9h4erukfl0",
|
32
|
+
"livemode": false,
|
33
|
+
"location": "/customers/cust_test_4yq6txdpfadhbaqnwp3/cards/card_test_4yq6tuucl9h4erukfl0",
|
34
|
+
"country": "",
|
35
|
+
"city": "Bangkok",
|
36
|
+
"postal_code": "10320",
|
37
|
+
"financing": "",
|
38
|
+
"last_digits": "4242",
|
39
|
+
"brand": "Visa",
|
40
|
+
"expiration_month": 1,
|
41
|
+
"expiration_year": 2017,
|
42
|
+
"fingerprint": "sRF/oMw2UQJJp/WbU+2/ZbVzwROjpMf1lyhOHhOqziw=",
|
43
|
+
"name": "JOHN DOE",
|
44
|
+
"security_code_check": true,
|
45
|
+
"created": "2015-01-15T04:03:40Z"
|
46
|
+
},
|
47
|
+
"customer": "cust_test_4yq6txdpfadhbaqnwp3",
|
48
|
+
"ip": null,
|
49
|
+
"created": "2015-01-15T05:00:29Z"
|
50
|
+
}
|
data/test/omise/test_charge.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: omise
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.4.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Robin Clart
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-
|
11
|
+
date: 2016-06-01 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rest-client
|
@@ -16,14 +16,14 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - "~>"
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: 1.
|
19
|
+
version: 1.8.0
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
24
|
- - "~>"
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version: 1.
|
26
|
+
version: 1.8.0
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: json
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
@@ -136,6 +136,7 @@ files:
|
|
136
136
|
- test/fixtures/api.omise.co/charges/chrg_test_4yq7duw15p9hdrjp8oq/refunds-post.json
|
137
137
|
- test/fixtures/api.omise.co/charges/chrg_test_4yq7duw15p9hdrjp8oq/refunds/404-get.json
|
138
138
|
- test/fixtures/api.omise.co/charges/chrg_test_4yq7duw15p9hdrjp8oq/refunds/rfnd_test_4yqmv79ahghsiz23y3c-get.json
|
139
|
+
- test/fixtures/api.omise.co/charges/chrg_test_4yq7duw15p9hdrjp8oq/reverse-post.json
|
139
140
|
- test/fixtures/api.omise.co/customers-get.json
|
140
141
|
- test/fixtures/api.omise.co/customers-post.json
|
141
142
|
- test/fixtures/api.omise.co/customers/404-get.json
|
@@ -223,6 +224,7 @@ test_files:
|
|
223
224
|
- test/fixtures/api.omise.co/charges/chrg_test_4yq7duw15p9hdrjp8oq/refunds-post.json
|
224
225
|
- test/fixtures/api.omise.co/charges/chrg_test_4yq7duw15p9hdrjp8oq/refunds/404-get.json
|
225
226
|
- test/fixtures/api.omise.co/charges/chrg_test_4yq7duw15p9hdrjp8oq/refunds/rfnd_test_4yqmv79ahghsiz23y3c-get.json
|
227
|
+
- test/fixtures/api.omise.co/charges/chrg_test_4yq7duw15p9hdrjp8oq/reverse-post.json
|
226
228
|
- test/fixtures/api.omise.co/customers-get.json
|
227
229
|
- test/fixtures/api.omise.co/customers-post.json
|
228
230
|
- test/fixtures/api.omise.co/customers/404-get.json
|