payjp 0.0.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.gitignore +7 -0
- data/.rubocop.yml +82 -0
- data/.rubocop_todo.yml +35 -0
- data/.travis.yml +22 -0
- data/CONTRIBUTORS +0 -0
- data/Gemfile +8 -0
- data/History.txt +0 -0
- data/LICENSE +21 -0
- data/README.rdoc +43 -0
- data/Rakefile +8 -0
- data/VERSION +1 -0
- data/gemfiles/default-with-activesupport.gemfile +10 -0
- data/gemfiles/json.gemfile +12 -0
- data/gemfiles/yajl.gemfile +12 -0
- data/lib/payjp.rb +279 -0
- data/lib/payjp/account.rb +11 -0
- data/lib/payjp/api_operations/create.rb +16 -0
- data/lib/payjp/api_operations/delete.rb +11 -0
- data/lib/payjp/api_operations/list.rb +17 -0
- data/lib/payjp/api_operations/request.rb +39 -0
- data/lib/payjp/api_operations/update.rb +17 -0
- data/lib/payjp/api_resource.rb +35 -0
- data/lib/payjp/card.rb +18 -0
- data/lib/payjp/charge.rb +27 -0
- data/lib/payjp/customer.rb +8 -0
- data/lib/payjp/errors/api_connection_error.rb +4 -0
- data/lib/payjp/errors/api_error.rb +4 -0
- data/lib/payjp/errors/authentication_error.rb +4 -0
- data/lib/payjp/errors/card_error.rb +11 -0
- data/lib/payjp/errors/invalid_request_error.rb +10 -0
- data/lib/payjp/errors/payjp_error.rb +20 -0
- data/lib/payjp/event.rb +5 -0
- data/lib/payjp/list_object.rb +33 -0
- data/lib/payjp/payjp_object.rb +259 -0
- data/lib/payjp/plan.rb +8 -0
- data/lib/payjp/subscription.rb +37 -0
- data/lib/payjp/token.rb +5 -0
- data/lib/payjp/transfer.rb +5 -0
- data/lib/payjp/util.rb +121 -0
- data/lib/payjp/version.rb +3 -0
- data/payjp.gemspec +27 -0
- data/test/payjp/account_test.rb +17 -0
- data/test/payjp/api_resource_test.rb +445 -0
- data/test/payjp/charge_test.rb +83 -0
- data/test/payjp/customer_card_test.rb +61 -0
- data/test/payjp/customer_test.rb +35 -0
- data/test/payjp/event_test.rb +26 -0
- data/test/payjp/list_object_test.rb +16 -0
- data/test/payjp/metadata_test.rb +103 -0
- data/test/payjp/payjp_object_test.rb +28 -0
- data/test/payjp/plan_test.rb +48 -0
- data/test/payjp/subscription_test.rb +58 -0
- data/test/payjp/token_test.rb +34 -0
- data/test/payjp/transfer_test.rb +34 -0
- data/test/payjp/util_test.rb +34 -0
- data/test/test_data.rb +291 -0
- data/test/test_helper.rb +45 -0
- metadata +201 -0
@@ -0,0 +1,34 @@
|
|
1
|
+
require File.expand_path('../../test_helper', __FILE__)
|
2
|
+
|
3
|
+
module Payjp
|
4
|
+
class TokenTest < Test::Unit::TestCase
|
5
|
+
should "create should return a new token" do
|
6
|
+
@mock.expects(:post).once.returns(test_response(test_token))
|
7
|
+
token = Payjp::Token.create({
|
8
|
+
:card => {
|
9
|
+
:number => '4242424242424242',
|
10
|
+
:exp_month => 2,
|
11
|
+
:exp_year => 2020
|
12
|
+
}
|
13
|
+
})
|
14
|
+
assert_equal Payjp::Token, token.class
|
15
|
+
assert_equal 'tok_test_token', token.id
|
16
|
+
end
|
17
|
+
|
18
|
+
should "retrieve should retrieve token" do
|
19
|
+
@mock.expects(:get).once.returns(test_response(test_token))
|
20
|
+
token = Payjp::Token.retrieve('tok_test_token')
|
21
|
+
|
22
|
+
assert_equal Payjp::Token, token.class
|
23
|
+
assert_equal 'tok_test_token', token.id
|
24
|
+
end
|
25
|
+
|
26
|
+
should "token should not be deletable" do
|
27
|
+
assert_raises NoMethodError do
|
28
|
+
@mock.expects(:get).once.returns(test_response(test_token))
|
29
|
+
token = Payjp::Token.retrieve('tok_test_token')
|
30
|
+
token.delete
|
31
|
+
end
|
32
|
+
end
|
33
|
+
end
|
34
|
+
end
|
@@ -0,0 +1,34 @@
|
|
1
|
+
require File.expand_path('../../test_helper', __FILE__)
|
2
|
+
|
3
|
+
module Payjp
|
4
|
+
class TransferTest < Test::Unit::TestCase
|
5
|
+
should "transfers should be listable" do
|
6
|
+
@mock.expects(:get).once.returns(test_response(test_transfer_array))
|
7
|
+
c = Payjp::Transfer.all.data
|
8
|
+
assert c.is_a? Array
|
9
|
+
assert c[0].is_a? Payjp::Transfer
|
10
|
+
end
|
11
|
+
|
12
|
+
should "retrieve should retrieve transfer" do
|
13
|
+
@mock.expects(:get).once.returns(test_response(test_transfer))
|
14
|
+
transfer = Payjp::Transfer.retrieve('tr_test_transfer')
|
15
|
+
assert_equal 'tr_test_transfer', transfer.id
|
16
|
+
end
|
17
|
+
|
18
|
+
should "transfers should not be deletable" do
|
19
|
+
assert_raises NoMethodError do
|
20
|
+
@mock.expects(:get).once.returns(test_response(test_transfer))
|
21
|
+
transfer = Payjp::Transfer.retrieve('tr_test_transfer')
|
22
|
+
transfer.delete
|
23
|
+
end
|
24
|
+
end
|
25
|
+
|
26
|
+
should "transfer.charges should return charge list" do
|
27
|
+
@mock.expects(:get).once.returns(test_response(test_transfer))
|
28
|
+
transfer = Payjp::Transfer.retrieve('tr_test_transfer')
|
29
|
+
c = transfer.charges.data
|
30
|
+
assert c.is_a? Array
|
31
|
+
assert c[0].is_a? Payjp::Charge
|
32
|
+
end
|
33
|
+
end
|
34
|
+
end
|
@@ -0,0 +1,34 @@
|
|
1
|
+
require File.expand_path('../../test_helper', __FILE__)
|
2
|
+
|
3
|
+
module Payjp
|
4
|
+
class UtilTest < Test::Unit::TestCase
|
5
|
+
should "symbolize_names should convert names to symbols" do
|
6
|
+
start = {
|
7
|
+
'foo' => 'bar',
|
8
|
+
'array' => [{ 'foo' => 'bar' }],
|
9
|
+
'nested' => {
|
10
|
+
1 => 2,
|
11
|
+
:symbol => 9,
|
12
|
+
'string' => nil
|
13
|
+
}
|
14
|
+
}
|
15
|
+
finish = {
|
16
|
+
:foo => 'bar',
|
17
|
+
:array => [{ :foo => 'bar' }],
|
18
|
+
:nested => {
|
19
|
+
1 => 2,
|
20
|
+
:symbol => 9,
|
21
|
+
:string => nil
|
22
|
+
}
|
23
|
+
}
|
24
|
+
|
25
|
+
symbolized = Payjp::Util.symbolize_names(start)
|
26
|
+
assert_equal(finish, symbolized)
|
27
|
+
end
|
28
|
+
|
29
|
+
should "normalize_opts should reject nil keys" do
|
30
|
+
assert_raise { Payjp::Util.normalize_opts(nil) }
|
31
|
+
assert_raise { Payjp::Util.normalize_opts(:api_key => nil) }
|
32
|
+
end
|
33
|
+
end
|
34
|
+
end
|
data/test/test_data.rb
ADDED
@@ -0,0 +1,291 @@
|
|
1
|
+
module Payjp
|
2
|
+
module TestData
|
3
|
+
def test_response(body, code = 200)
|
4
|
+
# When an exception is raised, restclient clobbers method_missing. Hence we
|
5
|
+
# can't just use the stubs interface.
|
6
|
+
body = JSON.generate(body) unless body.is_a? String
|
7
|
+
m = mock
|
8
|
+
m.instance_variable_set('@payjp_values', { :body => body, :code => code })
|
9
|
+
def m.body
|
10
|
+
@payjp_values[:body]
|
11
|
+
end
|
12
|
+
def m.code
|
13
|
+
@payjp_values[:code]
|
14
|
+
end
|
15
|
+
m
|
16
|
+
end
|
17
|
+
|
18
|
+
def test_customer(params = {})
|
19
|
+
id = params[:id] || 'c_test_customer'
|
20
|
+
{
|
21
|
+
:cards => test_customer_card_array(id),
|
22
|
+
:created => 1304114758,
|
23
|
+
:default_card => "cc_test_card",
|
24
|
+
:description => nil,
|
25
|
+
:email => nil,
|
26
|
+
:id => id,
|
27
|
+
:livemode => false,
|
28
|
+
:object => "customer",
|
29
|
+
:subscriptions => test_subscription_array(id),
|
30
|
+
:metadata => {}
|
31
|
+
}.merge(params)
|
32
|
+
end
|
33
|
+
|
34
|
+
def test_customer_array
|
35
|
+
{
|
36
|
+
:count => 3,
|
37
|
+
:data => [test_customer, test_customer, test_customer],
|
38
|
+
:object => 'list',
|
39
|
+
:url => '/v1/customers'
|
40
|
+
}
|
41
|
+
end
|
42
|
+
|
43
|
+
def test_charge(params = {})
|
44
|
+
id = params[:id] || 'ch_test_charge'
|
45
|
+
{
|
46
|
+
:amount => 3500,
|
47
|
+
:amount_refunded => 0,
|
48
|
+
:captured => true,
|
49
|
+
:card => {
|
50
|
+
:address_city => nil,
|
51
|
+
:address_line1 => nil,
|
52
|
+
:address_line2 => nil,
|
53
|
+
:address_state => nil,
|
54
|
+
:address_zip => nil,
|
55
|
+
:address_zip_check => 'unchecked',
|
56
|
+
:brand => "Visa",
|
57
|
+
:country => nil,
|
58
|
+
:created => 1433127983,
|
59
|
+
:cvc_check => "unchecked",
|
60
|
+
:exp_month => 2,
|
61
|
+
:exp_year => 2020,
|
62
|
+
:fingerprint => "e1d8225886e3a7211127df751c86787f",
|
63
|
+
:id => "cc_test_card",
|
64
|
+
:last4 => "4242",
|
65
|
+
:name => nil,
|
66
|
+
:object => "card"
|
67
|
+
},
|
68
|
+
:created => 1433127983,
|
69
|
+
:currency => "jpy",
|
70
|
+
:customer => nil,
|
71
|
+
:description => nil,
|
72
|
+
:expired_at => nil,
|
73
|
+
:failure_code => nil,
|
74
|
+
:failure_message => nil,
|
75
|
+
:fee => 0,
|
76
|
+
:id => id,
|
77
|
+
:livemode => false,
|
78
|
+
:object => "charge",
|
79
|
+
:paid => true,
|
80
|
+
:refund_reason => nil,
|
81
|
+
:refunded => false,
|
82
|
+
:subscription => nil,
|
83
|
+
:metadata => {}
|
84
|
+
}.merge(params)
|
85
|
+
end
|
86
|
+
|
87
|
+
def test_charge_array
|
88
|
+
{
|
89
|
+
:count => 3,
|
90
|
+
:data => [test_charge, test_charge, test_charge],
|
91
|
+
:object => 'list',
|
92
|
+
:url => '/v1/charges'
|
93
|
+
}
|
94
|
+
end
|
95
|
+
|
96
|
+
def test_customer_card_array(customer_id)
|
97
|
+
{
|
98
|
+
:count => 3,
|
99
|
+
:data => [test_card, test_card, test_card],
|
100
|
+
:object => 'list',
|
101
|
+
:url => '/v1/customers/' + customer_id + '/cards'
|
102
|
+
}
|
103
|
+
end
|
104
|
+
|
105
|
+
def test_card(params = {})
|
106
|
+
{
|
107
|
+
:address_city => nil,
|
108
|
+
:address_line1 => nil,
|
109
|
+
:address_line2 => nil,
|
110
|
+
:address_state => nil,
|
111
|
+
:address_zip => nil,
|
112
|
+
:address_zip_check => 'unchecked',
|
113
|
+
:brand => "Visa",
|
114
|
+
:country => nil,
|
115
|
+
:created => 1433127983,
|
116
|
+
:customer => 'test_customer',
|
117
|
+
:cvc_check => "unchecked",
|
118
|
+
:exp_month => 2,
|
119
|
+
:exp_year => 2020,
|
120
|
+
:fingerprint => "e1d8225886e3a7211127df751c86787f",
|
121
|
+
:id => "cc_test_card",
|
122
|
+
:last4 => "4242",
|
123
|
+
:livemode => false,
|
124
|
+
:name => nil,
|
125
|
+
:object => "card"
|
126
|
+
}.merge(params)
|
127
|
+
end
|
128
|
+
|
129
|
+
def test_event_array
|
130
|
+
{
|
131
|
+
:count => 3,
|
132
|
+
:data => [test_event, test_event, test_event],
|
133
|
+
:object => 'list',
|
134
|
+
:url => '/v1/events'
|
135
|
+
}
|
136
|
+
end
|
137
|
+
|
138
|
+
def test_event(params = {})
|
139
|
+
{
|
140
|
+
:created => 1432973142,
|
141
|
+
:data => {},
|
142
|
+
:id => 'evnt_test_event',
|
143
|
+
:livemode => false,
|
144
|
+
:object => 'event',
|
145
|
+
:pending_webhooks => 0,
|
146
|
+
:type => 'subscription.resumed'
|
147
|
+
}.merge(params)
|
148
|
+
end
|
149
|
+
|
150
|
+
def test_plan_array
|
151
|
+
{
|
152
|
+
:count => 3,
|
153
|
+
:data => [test_plan, test_plan, test_plan],
|
154
|
+
:object => 'list',
|
155
|
+
:url => '/v1/plans'
|
156
|
+
}
|
157
|
+
end
|
158
|
+
|
159
|
+
def test_plan(params = {})
|
160
|
+
{
|
161
|
+
:amount => 500,
|
162
|
+
:created => 1433127983,
|
163
|
+
:currency => 'jpy',
|
164
|
+
:id => 'pln_test_plan',
|
165
|
+
:interval => 'month',
|
166
|
+
:livemode => false,
|
167
|
+
:object => 'plan',
|
168
|
+
:trial_days => 30
|
169
|
+
}.merge(params)
|
170
|
+
end
|
171
|
+
|
172
|
+
# FIXME: nested overrides would be better than hardcoding plan_id
|
173
|
+
def test_subscription(params = {})
|
174
|
+
plan = params.delete(:plan) || 'gold'
|
175
|
+
{
|
176
|
+
:current_period_end => 1308681468,
|
177
|
+
:status => "trialing",
|
178
|
+
:plan => {
|
179
|
+
:interval => "month",
|
180
|
+
:amount => 7500,
|
181
|
+
:trial_period_days => 30,
|
182
|
+
:object => "plan",
|
183
|
+
:identifier => plan
|
184
|
+
},
|
185
|
+
:current_period_start => 1308595038,
|
186
|
+
:start => 1308595038,
|
187
|
+
:object => "subscription",
|
188
|
+
:trial_start => 1308595038,
|
189
|
+
:trial_end => 1308681468,
|
190
|
+
:customer => "c_test_customer",
|
191
|
+
:id => 's_test_subscription'
|
192
|
+
}.merge(params)
|
193
|
+
end
|
194
|
+
|
195
|
+
def test_subscription_array(customer_id)
|
196
|
+
{
|
197
|
+
:data => [test_subscription, test_subscription, test_subscription],
|
198
|
+
:object => 'list',
|
199
|
+
:url => '/v1/customers/' + customer_id + '/subscriptions'
|
200
|
+
}
|
201
|
+
end
|
202
|
+
|
203
|
+
def test_token(params = {})
|
204
|
+
card = params[:card] || {}
|
205
|
+
{
|
206
|
+
:card => test_card(card),
|
207
|
+
:created => 1433127983,
|
208
|
+
:id => 'tok_test_token',
|
209
|
+
:livemode => false,
|
210
|
+
:object => 'token',
|
211
|
+
:used => false
|
212
|
+
}.merge(params)
|
213
|
+
end
|
214
|
+
|
215
|
+
def test_transfer(params = {})
|
216
|
+
{
|
217
|
+
:amount => 1000,
|
218
|
+
:charges => {
|
219
|
+
:count => 1,
|
220
|
+
:data => [test_charge],
|
221
|
+
:object => 'list',
|
222
|
+
:url => '/v1/transfers/tr_test_transfer/charges'
|
223
|
+
},
|
224
|
+
:created => 1432965397,
|
225
|
+
:currency => "jpy",
|
226
|
+
:date => 1432965401,
|
227
|
+
:description => "test",
|
228
|
+
:id => "tr_test_transfer",
|
229
|
+
:livemode => false,
|
230
|
+
:object => "transfer",
|
231
|
+
:status => 'paid',
|
232
|
+
:summary => {
|
233
|
+
:charge_count => 1,
|
234
|
+
:charge_fee => 0,
|
235
|
+
:charge_gross => 1000,
|
236
|
+
:net => 1000,
|
237
|
+
:refund_amount => 0,
|
238
|
+
:refund_count => 0
|
239
|
+
},
|
240
|
+
:metadata => {}
|
241
|
+
}.merge(params)
|
242
|
+
end
|
243
|
+
|
244
|
+
def test_transfer_array
|
245
|
+
{
|
246
|
+
:count => 3,
|
247
|
+
:data => [test_transfer, test_transfer, test_transfer],
|
248
|
+
:object => 'list',
|
249
|
+
:url => '/v1/transfers'
|
250
|
+
}
|
251
|
+
end
|
252
|
+
|
253
|
+
def test_invalid_api_key_error
|
254
|
+
{
|
255
|
+
:error => {
|
256
|
+
:type => "invalid_request_error",
|
257
|
+
:message => "Invalid API Key provided: invalid"
|
258
|
+
}
|
259
|
+
}
|
260
|
+
end
|
261
|
+
|
262
|
+
def test_invalid_exp_year_error
|
263
|
+
{
|
264
|
+
:error => {
|
265
|
+
:code => "invalid_expiry_year",
|
266
|
+
:param => "exp_year",
|
267
|
+
:type => "card_error",
|
268
|
+
:message => "Your card's expiration year is invalid"
|
269
|
+
}
|
270
|
+
}
|
271
|
+
end
|
272
|
+
|
273
|
+
def test_missing_id_error
|
274
|
+
{
|
275
|
+
:error => {
|
276
|
+
:param => "id",
|
277
|
+
:type => "invalid_request_error",
|
278
|
+
:message => "Missing id"
|
279
|
+
}
|
280
|
+
}
|
281
|
+
end
|
282
|
+
|
283
|
+
def test_api_error
|
284
|
+
{
|
285
|
+
:error => {
|
286
|
+
:type => "api_error"
|
287
|
+
}
|
288
|
+
}
|
289
|
+
end
|
290
|
+
end
|
291
|
+
end
|
data/test/test_helper.rb
ADDED
@@ -0,0 +1,45 @@
|
|
1
|
+
require 'payjp'
|
2
|
+
require 'test/unit'
|
3
|
+
require 'mocha/setup'
|
4
|
+
require 'stringio'
|
5
|
+
require 'shoulda'
|
6
|
+
require File.expand_path('../test_data', __FILE__)
|
7
|
+
|
8
|
+
# monkeypatch request methods
|
9
|
+
module Payjp
|
10
|
+
@mock_rest_client = nil
|
11
|
+
|
12
|
+
class << self
|
13
|
+
attr_writer :mock_rest_client
|
14
|
+
end
|
15
|
+
|
16
|
+
def self.execute_request(opts)
|
17
|
+
get_params = (opts[:headers] || {})[:params]
|
18
|
+
post_params = opts[:payload]
|
19
|
+
case opts[:method]
|
20
|
+
when :get then @mock_rest_client.get opts[:url], get_params, post_params
|
21
|
+
when :post then @mock_rest_client.post opts[:url], get_params, post_params
|
22
|
+
when :delete then @mock_rest_client.delete opts[:url], get_params, post_params
|
23
|
+
end
|
24
|
+
end
|
25
|
+
end
|
26
|
+
|
27
|
+
class Test::Unit::TestCase
|
28
|
+
include Payjp::TestData
|
29
|
+
include Mocha
|
30
|
+
|
31
|
+
def encode_credentials(user_name)
|
32
|
+
"Basic #{Base64.encode64("#{user_name}:")}"
|
33
|
+
end
|
34
|
+
|
35
|
+
setup do
|
36
|
+
@mock = mock
|
37
|
+
Payjp.mock_rest_client = @mock
|
38
|
+
Payjp.api_key = "foo"
|
39
|
+
end
|
40
|
+
|
41
|
+
teardown do
|
42
|
+
Payjp.mock_rest_client = nil
|
43
|
+
Payjp.api_key = nil
|
44
|
+
end
|
45
|
+
end
|
metadata
ADDED
@@ -0,0 +1,201 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: payjp
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.0.2
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- PAY.JP
|
8
|
+
autorequire:
|
9
|
+
bindir: bin
|
10
|
+
cert_chain: []
|
11
|
+
date: 2015-09-07 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: rest-client
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - "~>"
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: '1.4'
|
20
|
+
type: :runtime
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - "~>"
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: '1.4'
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: json
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - "~>"
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: 1.8.1
|
34
|
+
type: :runtime
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - "~>"
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: 1.8.1
|
41
|
+
- !ruby/object:Gem::Dependency
|
42
|
+
name: mocha
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - "~>"
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: 0.13.2
|
48
|
+
type: :development
|
49
|
+
prerelease: false
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - "~>"
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: 0.13.2
|
55
|
+
- !ruby/object:Gem::Dependency
|
56
|
+
name: shoulda
|
57
|
+
requirement: !ruby/object:Gem::Requirement
|
58
|
+
requirements:
|
59
|
+
- - "~>"
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: 3.4.0
|
62
|
+
type: :development
|
63
|
+
prerelease: false
|
64
|
+
version_requirements: !ruby/object:Gem::Requirement
|
65
|
+
requirements:
|
66
|
+
- - "~>"
|
67
|
+
- !ruby/object:Gem::Version
|
68
|
+
version: 3.4.0
|
69
|
+
- !ruby/object:Gem::Dependency
|
70
|
+
name: test-unit
|
71
|
+
requirement: !ruby/object:Gem::Requirement
|
72
|
+
requirements:
|
73
|
+
- - ">="
|
74
|
+
- !ruby/object:Gem::Version
|
75
|
+
version: '0'
|
76
|
+
type: :development
|
77
|
+
prerelease: false
|
78
|
+
version_requirements: !ruby/object:Gem::Requirement
|
79
|
+
requirements:
|
80
|
+
- - ">="
|
81
|
+
- !ruby/object:Gem::Version
|
82
|
+
version: '0'
|
83
|
+
- !ruby/object:Gem::Dependency
|
84
|
+
name: rake
|
85
|
+
requirement: !ruby/object:Gem::Requirement
|
86
|
+
requirements:
|
87
|
+
- - ">="
|
88
|
+
- !ruby/object:Gem::Version
|
89
|
+
version: '0'
|
90
|
+
type: :development
|
91
|
+
prerelease: false
|
92
|
+
version_requirements: !ruby/object:Gem::Requirement
|
93
|
+
requirements:
|
94
|
+
- - ">="
|
95
|
+
- !ruby/object:Gem::Version
|
96
|
+
version: '0'
|
97
|
+
description: PAY.JP is the easiest way to accept payments online.
|
98
|
+
email:
|
99
|
+
- support@pay.jp
|
100
|
+
executables: []
|
101
|
+
extensions: []
|
102
|
+
extra_rdoc_files: []
|
103
|
+
files:
|
104
|
+
- ".gitignore"
|
105
|
+
- ".rubocop.yml"
|
106
|
+
- ".rubocop_todo.yml"
|
107
|
+
- ".travis.yml"
|
108
|
+
- CONTRIBUTORS
|
109
|
+
- Gemfile
|
110
|
+
- History.txt
|
111
|
+
- LICENSE
|
112
|
+
- README.rdoc
|
113
|
+
- Rakefile
|
114
|
+
- VERSION
|
115
|
+
- gemfiles/default-with-activesupport.gemfile
|
116
|
+
- gemfiles/json.gemfile
|
117
|
+
- gemfiles/yajl.gemfile
|
118
|
+
- lib/payjp.rb
|
119
|
+
- lib/payjp/account.rb
|
120
|
+
- lib/payjp/api_operations/create.rb
|
121
|
+
- lib/payjp/api_operations/delete.rb
|
122
|
+
- lib/payjp/api_operations/list.rb
|
123
|
+
- lib/payjp/api_operations/request.rb
|
124
|
+
- lib/payjp/api_operations/update.rb
|
125
|
+
- lib/payjp/api_resource.rb
|
126
|
+
- lib/payjp/card.rb
|
127
|
+
- lib/payjp/charge.rb
|
128
|
+
- lib/payjp/customer.rb
|
129
|
+
- lib/payjp/errors/api_connection_error.rb
|
130
|
+
- lib/payjp/errors/api_error.rb
|
131
|
+
- lib/payjp/errors/authentication_error.rb
|
132
|
+
- lib/payjp/errors/card_error.rb
|
133
|
+
- lib/payjp/errors/invalid_request_error.rb
|
134
|
+
- lib/payjp/errors/payjp_error.rb
|
135
|
+
- lib/payjp/event.rb
|
136
|
+
- lib/payjp/list_object.rb
|
137
|
+
- lib/payjp/payjp_object.rb
|
138
|
+
- lib/payjp/plan.rb
|
139
|
+
- lib/payjp/subscription.rb
|
140
|
+
- lib/payjp/token.rb
|
141
|
+
- lib/payjp/transfer.rb
|
142
|
+
- lib/payjp/util.rb
|
143
|
+
- lib/payjp/version.rb
|
144
|
+
- payjp.gemspec
|
145
|
+
- test/payjp/account_test.rb
|
146
|
+
- test/payjp/api_resource_test.rb
|
147
|
+
- test/payjp/charge_test.rb
|
148
|
+
- test/payjp/customer_card_test.rb
|
149
|
+
- test/payjp/customer_test.rb
|
150
|
+
- test/payjp/event_test.rb
|
151
|
+
- test/payjp/list_object_test.rb
|
152
|
+
- test/payjp/metadata_test.rb
|
153
|
+
- test/payjp/payjp_object_test.rb
|
154
|
+
- test/payjp/plan_test.rb
|
155
|
+
- test/payjp/subscription_test.rb
|
156
|
+
- test/payjp/token_test.rb
|
157
|
+
- test/payjp/transfer_test.rb
|
158
|
+
- test/payjp/util_test.rb
|
159
|
+
- test/test_data.rb
|
160
|
+
- test/test_helper.rb
|
161
|
+
homepage: https://pay.jp
|
162
|
+
licenses:
|
163
|
+
- MIT
|
164
|
+
metadata: {}
|
165
|
+
post_install_message:
|
166
|
+
rdoc_options: []
|
167
|
+
require_paths:
|
168
|
+
- lib
|
169
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
170
|
+
requirements:
|
171
|
+
- - ">="
|
172
|
+
- !ruby/object:Gem::Version
|
173
|
+
version: '0'
|
174
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
175
|
+
requirements:
|
176
|
+
- - ">="
|
177
|
+
- !ruby/object:Gem::Version
|
178
|
+
version: '0'
|
179
|
+
requirements: []
|
180
|
+
rubyforge_project:
|
181
|
+
rubygems_version: 2.4.5
|
182
|
+
signing_key:
|
183
|
+
specification_version: 4
|
184
|
+
summary: Ruby bindings for the Payjp API
|
185
|
+
test_files:
|
186
|
+
- test/payjp/account_test.rb
|
187
|
+
- test/payjp/api_resource_test.rb
|
188
|
+
- test/payjp/charge_test.rb
|
189
|
+
- test/payjp/customer_card_test.rb
|
190
|
+
- test/payjp/customer_test.rb
|
191
|
+
- test/payjp/event_test.rb
|
192
|
+
- test/payjp/list_object_test.rb
|
193
|
+
- test/payjp/metadata_test.rb
|
194
|
+
- test/payjp/payjp_object_test.rb
|
195
|
+
- test/payjp/plan_test.rb
|
196
|
+
- test/payjp/subscription_test.rb
|
197
|
+
- test/payjp/token_test.rb
|
198
|
+
- test/payjp/transfer_test.rb
|
199
|
+
- test/payjp/util_test.rb
|
200
|
+
- test/test_data.rb
|
201
|
+
- test/test_helper.rb
|