webpay 2.0.0 → 2.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/lib/webpay/customer.rb +9 -0
- data/lib/webpay/entity.rb +8 -0
- data/lib/webpay/version.rb +1 -1
- data/webpay.gemspec +1 -1
- metadata +3 -3
data/lib/webpay/customer.rb
CHANGED
@@ -44,6 +44,15 @@ module WebPay
|
|
44
44
|
end
|
45
45
|
end
|
46
46
|
|
47
|
+
# Return a hash similar to the response from API.
|
48
|
+
# If an attribute's value is updated, the updated value is used.
|
49
|
+
# @return [Hash] a hash similar to the response from API
|
50
|
+
def to_hash
|
51
|
+
Hash[@attributes.merge(@updated_attributes).map { |k, v| [k, v.is_a?(Entity) ? v.to_hash : v] }]
|
52
|
+
end
|
53
|
+
|
54
|
+
alias_method :to_h, :to_hash
|
55
|
+
|
47
56
|
# Send update request of modified attributes.
|
48
57
|
# description, card, and email are modifiable.
|
49
58
|
# @return [Customer] this object with attributes updated
|
data/lib/webpay/entity.rb
CHANGED
@@ -37,6 +37,14 @@ module WebPay
|
|
37
37
|
send(key)
|
38
38
|
end
|
39
39
|
|
40
|
+
# Return a hash similar to the response from API.
|
41
|
+
# @return [Hash] a hash similar to the response from API
|
42
|
+
def to_hash
|
43
|
+
Hash[@attributes.map { |k, v| [k, v.is_a?(Entity) ? v.to_hash : v] }]
|
44
|
+
end
|
45
|
+
|
46
|
+
alias_method :to_h, :to_hash
|
47
|
+
|
40
48
|
# Provide access to attributes
|
41
49
|
# @return [Object] The attribute's value
|
42
50
|
def method_missing(method_name, *args, &block)
|
data/lib/webpay/version.rb
CHANGED
data/webpay.gemspec
CHANGED
@@ -7,7 +7,7 @@ Gem::Specification.new do |spec|
|
|
7
7
|
spec.name = 'webpay'
|
8
8
|
spec.version = WebPay::VERSION
|
9
9
|
spec.authors = ['webpay', 'tomykaira']
|
10
|
-
spec.email = ['administrators@webpay.jp', 'tomykaira@
|
10
|
+
spec.email = ['administrators@webpay.jp', 'tomykaira@webpay.jp']
|
11
11
|
spec.description = 'WebPay is payment gateway service in Japan. see also https://webpay.jp/'
|
12
12
|
spec.summary = 'Ruby bindings of WebPay API'
|
13
13
|
spec.homepage = 'https://webpay.jp'
|
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.0.
|
4
|
+
version: 2.0.1
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -10,7 +10,7 @@ authors:
|
|
10
10
|
autorequire:
|
11
11
|
bindir: bin
|
12
12
|
cert_chain: []
|
13
|
-
date: 2013-07-
|
13
|
+
date: 2013-07-17 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: faraday
|
@@ -95,7 +95,7 @@ dependencies:
|
|
95
95
|
description: WebPay is payment gateway service in Japan. see also https://webpay.jp/
|
96
96
|
email:
|
97
97
|
- administrators@webpay.jp
|
98
|
-
- tomykaira@
|
98
|
+
- tomykaira@webpay.jp
|
99
99
|
executables: []
|
100
100
|
extensions: []
|
101
101
|
extra_rdoc_files: []
|