komoju 0.0.4 → 0.0.7
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.
- checksums.yaml +4 -4
- data/Gemfile.lock +13 -10
- data/bin/generate-client +6 -2
- data/komoju.gemspec +2 -6
- data/lib/komoju.rb +1 -0
- data/lib/komoju/client.rb +541 -111
- data/lib/komoju/version.rb +1 -1
- metadata +8 -74
- data/vendor/heroics/lib/heroics.rb +0 -22
- data/vendor/heroics/lib/heroics/cli.rb +0 -88
- data/vendor/heroics/lib/heroics/client.rb +0 -109
- data/vendor/heroics/lib/heroics/client_generator.rb +0 -99
- data/vendor/heroics/lib/heroics/command.rb +0 -67
- data/vendor/heroics/lib/heroics/errors.rb +0 -6
- data/vendor/heroics/lib/heroics/link.rb +0 -120
- data/vendor/heroics/lib/heroics/naming.rb +0 -19
- data/vendor/heroics/lib/heroics/resource.rb +0 -30
- data/vendor/heroics/lib/heroics/schema.rb +0 -444
- data/vendor/heroics/lib/heroics/version.rb +0 -3
- data/vendor/heroics/test.rb +0 -42
- data/vendor/heroics/test/cli_test.rb +0 -236
- data/vendor/heroics/test/client_generator_test.rb +0 -34
- data/vendor/heroics/test/client_test.rb +0 -215
- data/vendor/heroics/test/command_test.rb +0 -214
- data/vendor/heroics/test/helper.rb +0 -204
- data/vendor/heroics/test/link_test.rb +0 -398
- data/vendor/heroics/test/naming_test.rb +0 -45
- data/vendor/heroics/test/resource_test.rb +0 -35
- data/vendor/heroics/test/schema_test.rb +0 -287
- data/vendor/heroics/test/version_test.rb +0 -9
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8cfa7016aea050e4612e7c24e96854405b2f2237
|
4
|
+
data.tar.gz: b1c92adb38691718e43b2ab958398f45c6b4b7f7
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 49955905870bbb6ba5d1ecf8e3371040da2f2915bacec70bc26f87fc86d717cdc3681744c06ccb8a74200f7b2eba6cc6ef31a7e5300835eafb9c90b6c0f19219
|
7
|
+
data.tar.gz: 0f51662cdfaba2722219cea8a75c68ff7491a006d4b276a13f61680d4f15237a54516c45a4e306c2cb2081737f78edea410cec0ac7a3380e14d7188ebd1726e6
|
data/Gemfile.lock
CHANGED
@@ -1,24 +1,24 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
komoju (0.0.
|
5
|
-
|
6
|
-
excon
|
4
|
+
komoju (0.0.6)
|
5
|
+
heroics (= 0.0.21)
|
7
6
|
moneta
|
8
|
-
multi_json (>= 1.9.2)
|
9
|
-
netrc
|
10
7
|
|
11
8
|
GEM
|
12
9
|
remote: https://rubygems.org/
|
13
10
|
specs:
|
14
11
|
ansi (1.5.0)
|
15
12
|
erubis (2.7.0)
|
16
|
-
excon (0.
|
13
|
+
excon (0.55.0)
|
14
|
+
heroics (0.0.21)
|
15
|
+
erubis (~> 2.0)
|
16
|
+
excon
|
17
|
+
multi_json (>= 1.9.2)
|
17
18
|
minitest (4.7.5)
|
18
|
-
moneta (0.
|
19
|
-
multi_json (1.
|
20
|
-
|
21
|
-
rake (10.4.2)
|
19
|
+
moneta (1.0.0)
|
20
|
+
multi_json (1.12.1)
|
21
|
+
rake (10.5.0)
|
22
22
|
turn (0.9.7)
|
23
23
|
ansi
|
24
24
|
minitest (~> 4)
|
@@ -32,3 +32,6 @@ DEPENDENCIES
|
|
32
32
|
minitest (= 4.7.5)
|
33
33
|
rake (~> 10.0)
|
34
34
|
turn
|
35
|
+
|
36
|
+
BUNDLED WITH
|
37
|
+
1.13.7
|
data/bin/generate-client
CHANGED
@@ -3,9 +3,13 @@
|
|
3
3
|
require 'bundler/setup'
|
4
4
|
require 'heroics'
|
5
5
|
|
6
|
-
schema_url = "
|
6
|
+
schema_url = "https://komoju.com/api/v1/schema.json"
|
7
7
|
schema = Heroics.download_schema(schema_url, {})
|
8
8
|
endpoint_url = "https://komoju.com/api/v1"
|
9
9
|
|
10
|
-
|
10
|
+
Heroics::Configuration.defaults.module_name = "Komoju"
|
11
|
+
Heroics::Configuration.defaults.schema = schema
|
12
|
+
Heroics::Configuration.defaults.base_url = endpoint_url
|
13
|
+
|
14
|
+
client = Heroics.generate_client
|
11
15
|
File.write(File.join(File.dirname(__FILE__), "../lib/komoju/client.rb"), client)
|
data/komoju.gemspec
CHANGED
@@ -16,14 +16,10 @@ Gem::Specification.new do |spec|
|
|
16
16
|
spec.files = `git ls-files -z`.split("\x0") + Dir.glob("vendor/**/**.rb")
|
17
17
|
spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
|
18
18
|
spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
|
19
|
-
spec.require_paths = ["lib"
|
19
|
+
spec.require_paths = ["lib"]
|
20
20
|
|
21
|
-
|
22
|
-
spec.add_dependency 'erubis', '~> 2.0'
|
23
|
-
spec.add_dependency 'excon'
|
21
|
+
spec.add_dependency 'heroics', '0.0.21'
|
24
22
|
spec.add_dependency 'moneta'
|
25
|
-
spec.add_dependency 'multi_json', '>= 1.9.2'
|
26
|
-
spec.add_dependency 'netrc'
|
27
23
|
|
28
24
|
spec.add_development_dependency "bundler", "~> 1.7"
|
29
25
|
spec.add_development_dependency "rake", "~> 10.0"
|
data/lib/komoju.rb
CHANGED
data/lib/komoju/client.rb
CHANGED
@@ -1,4 +1,5 @@
|
|
1
1
|
# encoding: utf-8
|
2
|
+
# frozen_string_literal: true
|
2
3
|
|
3
4
|
#
|
4
5
|
# WARNING: Do not edit by hand, this file was generated by Heroics:
|
@@ -10,19 +11,27 @@ require 'heroics'
|
|
10
11
|
require 'uri'
|
11
12
|
|
12
13
|
module Komoju
|
13
|
-
# Get a Client configured to use HTTP Basic authentication.
|
14
|
+
# Get a Client configured to use HTTP Basic or header-based authentication.
|
14
15
|
#
|
15
16
|
# @param api_key [String] The API key to use when connecting.
|
16
17
|
# @param options [Hash<Symbol,String>] Optionally, custom settings
|
17
18
|
# to use with the client. Allowed options are `default_headers`,
|
18
19
|
# `cache`, `user` and `url`.
|
19
20
|
# @return [Client] A client configured to use the API with HTTP Basic
|
20
|
-
# authentication.
|
21
|
+
# or header-based authentication.
|
21
22
|
def self.connect(api_key, options=nil)
|
22
23
|
options = custom_options(options)
|
23
24
|
uri = URI.parse(options[:url])
|
24
|
-
|
25
|
-
|
25
|
+
|
26
|
+
if options[:user]
|
27
|
+
uri.user = URI.encode_www_form_component options[:user]
|
28
|
+
end
|
29
|
+
|
30
|
+
if api_key
|
31
|
+
uri.user ||= 'user'
|
32
|
+
uri.password = api_key
|
33
|
+
end
|
34
|
+
|
26
35
|
client = Heroics.client_from_schema(SCHEMA, uri.to_s, options)
|
27
36
|
Client.new(client)
|
28
37
|
end
|
@@ -65,7 +74,7 @@ module Komoju
|
|
65
74
|
if options[:default_headers]
|
66
75
|
final_options[:default_headers].merge!(options[:default_headers])
|
67
76
|
end
|
68
|
-
final_options[:cache] = options[:cache]
|
77
|
+
final_options[:cache] = options[:cache] || Moneta.new(:Memory)
|
69
78
|
final_options[:url] = options[:url] if options[:url]
|
70
79
|
final_options[:user] = options[:user] if options[:user]
|
71
80
|
final_options
|
@@ -74,10 +83,8 @@ module Komoju
|
|
74
83
|
# Get the default options.
|
75
84
|
def self.default_options
|
76
85
|
default_headers = {}
|
77
|
-
cache = {}
|
78
86
|
{
|
79
87
|
default_headers: default_headers,
|
80
|
-
cache: cache,
|
81
88
|
url: "https://komoju.com/api/v1"
|
82
89
|
}
|
83
90
|
end
|
@@ -163,10 +170,8 @@ module Komoju
|
|
163
170
|
end
|
164
171
|
|
165
172
|
# List events
|
166
|
-
|
167
|
-
|
168
|
-
def list(collection_options = {})
|
169
|
-
@client.events.list(collection_options)
|
173
|
+
def list()
|
174
|
+
@client.events.list()
|
170
175
|
end
|
171
176
|
|
172
177
|
# Show a event
|
@@ -185,9 +190,9 @@ module Komoju
|
|
185
190
|
|
186
191
|
# List payments
|
187
192
|
#
|
188
|
-
# @param
|
189
|
-
def list(
|
190
|
-
@client.payments.list(
|
193
|
+
# @param body: the object to pass as the request payload
|
194
|
+
def list(body = {})
|
195
|
+
@client.payments.list(body)
|
191
196
|
end
|
192
197
|
|
193
198
|
# Show a payment
|
@@ -200,7 +205,7 @@ module Komoju
|
|
200
205
|
# Create a payment
|
201
206
|
#
|
202
207
|
# @param body: the object to pass as the request payload
|
203
|
-
def create(body)
|
208
|
+
def create(body = {})
|
204
209
|
@client.payments.create(body)
|
205
210
|
end
|
206
211
|
|
@@ -208,15 +213,22 @@ module Komoju
|
|
208
213
|
#
|
209
214
|
# @param payments_id: A unique indentifier for the payment
|
210
215
|
# @param body: the object to pass as the request payload
|
211
|
-
def update(payments_id, body)
|
216
|
+
def update(payments_id, body = {})
|
212
217
|
@client.payments.update(payments_id, body)
|
213
218
|
end
|
214
219
|
|
220
|
+
# Capture a payment
|
221
|
+
#
|
222
|
+
# @param payments_id: A unique indentifier for the payment
|
223
|
+
def capture(payments_id)
|
224
|
+
@client.payments.capture(payments_id)
|
225
|
+
end
|
226
|
+
|
215
227
|
# Refund a payment
|
216
228
|
#
|
217
229
|
# @param payments_id: A unique indentifier for the payment
|
218
230
|
# @param body: the object to pass as the request payload
|
219
|
-
def refund(payments_id, body)
|
231
|
+
def refund(payments_id, body = {})
|
220
232
|
@client.payments.refund(payments_id, body)
|
221
233
|
end
|
222
234
|
|
@@ -236,9 +248,9 @@ module Komoju
|
|
236
248
|
|
237
249
|
# List payouts
|
238
250
|
#
|
239
|
-
# @param
|
240
|
-
def list(
|
241
|
-
@client.payouts.list(
|
251
|
+
# @param body: the object to pass as the request payload
|
252
|
+
def list(body = {})
|
253
|
+
@client.payouts.list(body)
|
242
254
|
end
|
243
255
|
|
244
256
|
# Show a payout
|
@@ -251,9 +263,8 @@ module Komoju
|
|
251
263
|
# List payout items
|
252
264
|
#
|
253
265
|
# @param payouts_id: A unique identifier for a payout.
|
254
|
-
|
255
|
-
|
256
|
-
@client.payouts.payout_items(payouts_id, collection_options)
|
266
|
+
def payout_items(payouts_id)
|
267
|
+
@client.payouts.payout_items(payouts_id)
|
257
268
|
end
|
258
269
|
end
|
259
270
|
|
@@ -265,9 +276,9 @@ module Komoju
|
|
265
276
|
|
266
277
|
# List subscriptions
|
267
278
|
#
|
268
|
-
# @param
|
269
|
-
def list(
|
270
|
-
@client.subscriptions.list(
|
279
|
+
# @param body: the object to pass as the request payload
|
280
|
+
def list(body = {})
|
281
|
+
@client.subscriptions.list(body)
|
271
282
|
end
|
272
283
|
|
273
284
|
# Show a subscription
|
@@ -280,15 +291,16 @@ module Komoju
|
|
280
291
|
# Create a subscription
|
281
292
|
#
|
282
293
|
# @param body: the object to pass as the request payload
|
283
|
-
def create(body)
|
294
|
+
def create(body = {})
|
284
295
|
@client.subscriptions.create(body)
|
285
296
|
end
|
286
297
|
|
287
|
-
#
|
298
|
+
# Destroy a subscription
|
288
299
|
#
|
289
300
|
# @param subscriptions_id: A unique identifier for a subscription.
|
290
|
-
|
291
|
-
|
301
|
+
# @param body: the object to pass as the request payload
|
302
|
+
def destroy(subscriptions_id, body = {})
|
303
|
+
@client.subscriptions.destroy(subscriptions_id, body)
|
292
304
|
end
|
293
305
|
end
|
294
306
|
|
@@ -300,9 +312,9 @@ module Komoju
|
|
300
312
|
|
301
313
|
# List customers
|
302
314
|
#
|
303
|
-
# @param
|
304
|
-
def list(
|
305
|
-
@client.customers.list(
|
315
|
+
# @param body: the object to pass as the request payload
|
316
|
+
def list(body = {})
|
317
|
+
@client.customers.list(body)
|
306
318
|
end
|
307
319
|
|
308
320
|
# Show a customer
|
@@ -315,7 +327,7 @@ module Komoju
|
|
315
327
|
# Create a customer
|
316
328
|
#
|
317
329
|
# @param body: the object to pass as the request payload
|
318
|
-
def create(body)
|
330
|
+
def create(body = {})
|
319
331
|
@client.customers.create(body)
|
320
332
|
end
|
321
333
|
|
@@ -323,15 +335,15 @@ module Komoju
|
|
323
335
|
#
|
324
336
|
# @param customers_id: A unique identifier for the customer.
|
325
337
|
# @param body: the object to pass as the request payload
|
326
|
-
def update(customers_id, body)
|
338
|
+
def update(customers_id, body = {})
|
327
339
|
@client.customers.update(customers_id, body)
|
328
340
|
end
|
329
341
|
|
330
|
-
#
|
342
|
+
# Destroy a customer
|
331
343
|
#
|
332
344
|
# @param customers_id: A unique identifier for the customer.
|
333
|
-
def
|
334
|
-
@client.customers.
|
345
|
+
def destroy(customers_id)
|
346
|
+
@client.customers.destroy(customers_id)
|
335
347
|
end
|
336
348
|
end
|
337
349
|
|
@@ -343,9 +355,9 @@ module Komoju
|
|
343
355
|
|
344
356
|
# List invoices
|
345
357
|
#
|
346
|
-
# @param
|
347
|
-
def list(
|
348
|
-
@client.invoices.list(
|
358
|
+
# @param body: the object to pass as the request payload
|
359
|
+
def list(body = {})
|
360
|
+
@client.invoices.list(body)
|
349
361
|
end
|
350
362
|
|
351
363
|
# Show an invoice
|
@@ -355,17 +367,24 @@ module Komoju
|
|
355
367
|
@client.invoices.show(invoices_id)
|
356
368
|
end
|
357
369
|
|
370
|
+
# Cancel an invoice
|
371
|
+
#
|
372
|
+
# @param invoices_id: A unique identifier for the invoice.
|
373
|
+
def cancel(invoices_id)
|
374
|
+
@client.invoices.cancel(invoices_id)
|
375
|
+
end
|
376
|
+
|
358
377
|
# Create an invoice
|
359
378
|
#
|
360
379
|
# @param body: the object to pass as the request payload
|
361
|
-
def create(body)
|
380
|
+
def create(body = {})
|
362
381
|
@client.invoices.create(body)
|
363
382
|
end
|
364
383
|
|
365
384
|
# Preview an upcoming invoice
|
366
385
|
#
|
367
386
|
# @param body: the object to pass as the request payload
|
368
|
-
def preview(body)
|
387
|
+
def preview(body = {})
|
369
388
|
@client.invoices.preview(body)
|
370
389
|
end
|
371
390
|
|
@@ -373,7 +392,7 @@ module Komoju
|
|
373
392
|
#
|
374
393
|
# @param invoices_id: A unique identifier for the invoice.
|
375
394
|
# @param body: the object to pass as the request payload
|
376
|
-
def pay(invoices_id, body)
|
395
|
+
def pay(invoices_id, body = {})
|
377
396
|
@client.invoices.pay(invoices_id, body)
|
378
397
|
end
|
379
398
|
end
|
@@ -386,10 +405,9 @@ module Komoju
|
|
386
405
|
|
387
406
|
# List invoice items
|
388
407
|
#
|
389
|
-
# @param collection_options: additional collection options to pass with the request
|
390
408
|
# @param body: the object to pass as the request payload
|
391
|
-
def list(
|
392
|
-
@client.invoice_items.list(
|
409
|
+
def list(body = {})
|
410
|
+
@client.invoice_items.list(body)
|
393
411
|
end
|
394
412
|
|
395
413
|
# Show an invoice item
|
@@ -402,7 +420,7 @@ module Komoju
|
|
402
420
|
# Create an invoice item
|
403
421
|
#
|
404
422
|
# @param body: the object to pass as the request payload
|
405
|
-
def create(body)
|
423
|
+
def create(body = {})
|
406
424
|
@client.invoice_items.create(body)
|
407
425
|
end
|
408
426
|
|
@@ -422,9 +440,9 @@ module Komoju
|
|
422
440
|
|
423
441
|
# List plans
|
424
442
|
#
|
425
|
-
# @param
|
426
|
-
def list(
|
427
|
-
@client.plans.list(
|
443
|
+
# @param body: the object to pass as the request payload
|
444
|
+
def list(body = {})
|
445
|
+
@client.plans.list(body)
|
428
446
|
end
|
429
447
|
|
430
448
|
# Show a plan
|
@@ -437,15 +455,15 @@ module Komoju
|
|
437
455
|
# Create a plan
|
438
456
|
#
|
439
457
|
# @param body: the object to pass as the request payload
|
440
|
-
def create(body)
|
458
|
+
def create(body = {})
|
441
459
|
@client.plans.create(body)
|
442
460
|
end
|
443
461
|
|
444
|
-
#
|
462
|
+
# Destroy a plan
|
445
463
|
#
|
446
464
|
# @param plans_name: Name of the plan.
|
447
|
-
def
|
448
|
-
@client.plans.
|
465
|
+
def destroy(plans_name)
|
466
|
+
@client.plans.destroy(plans_name)
|
449
467
|
end
|
450
468
|
end
|
451
469
|
|
@@ -458,7 +476,7 @@ module Komoju
|
|
458
476
|
# Create a token
|
459
477
|
#
|
460
478
|
# @param body: the object to pass as the request payload
|
461
|
-
def create(body)
|
479
|
+
def create(body = {})
|
462
480
|
@client.tokens.create(body)
|
463
481
|
end
|
464
482
|
end
|
@@ -467,6 +485,35 @@ module Komoju
|
|
467
485
|
{
|
468
486
|
"$schema": "http://json-schema.org/draft-04/hyper-schema",
|
469
487
|
"definitions": {
|
488
|
+
"list_filter": {
|
489
|
+
"type": [
|
490
|
+
"object"
|
491
|
+
],
|
492
|
+
"properties": {
|
493
|
+
"start_time": {
|
494
|
+
"type": [
|
495
|
+
"string"
|
496
|
+
],
|
497
|
+
"format": "date-time"
|
498
|
+
},
|
499
|
+
"end_time": {
|
500
|
+
"type": [
|
501
|
+
"string"
|
502
|
+
],
|
503
|
+
"format": "date-time"
|
504
|
+
},
|
505
|
+
"per_page": {
|
506
|
+
"type": [
|
507
|
+
"number"
|
508
|
+
]
|
509
|
+
},
|
510
|
+
"page": {
|
511
|
+
"type": [
|
512
|
+
"number"
|
513
|
+
]
|
514
|
+
}
|
515
|
+
}
|
516
|
+
},
|
470
517
|
"list": {
|
471
518
|
"type": [
|
472
519
|
"object"
|
@@ -679,6 +726,13 @@ module Komoju
|
|
679
726
|
"object"
|
680
727
|
],
|
681
728
|
"definitions": {
|
729
|
+
"capture": {
|
730
|
+
"type": [
|
731
|
+
"boolean"
|
732
|
+
],
|
733
|
+
"default": true,
|
734
|
+
"description": "If true, the payment will be immediately captured. This option is ignored if a payment type is not credit_card"
|
735
|
+
},
|
682
736
|
"given_name": {
|
683
737
|
"type": [
|
684
738
|
"string"
|
@@ -705,6 +759,19 @@ module Komoju
|
|
705
759
|
],
|
706
760
|
"format": "email"
|
707
761
|
},
|
762
|
+
"locale": {
|
763
|
+
"enum": [
|
764
|
+
"en",
|
765
|
+
"ja",
|
766
|
+
"ko"
|
767
|
+
],
|
768
|
+
"default": "ja"
|
769
|
+
},
|
770
|
+
"partner_origin": {
|
771
|
+
"type": [
|
772
|
+
"string"
|
773
|
+
]
|
774
|
+
},
|
708
775
|
"phone": {
|
709
776
|
"type": [
|
710
777
|
"string"
|
@@ -804,7 +871,7 @@ module Komoju
|
|
804
871
|
},
|
805
872
|
"account_number": {
|
806
873
|
"type": [
|
807
|
-
"
|
874
|
+
"string"
|
808
875
|
]
|
809
876
|
},
|
810
877
|
"account_type": {
|
@@ -866,7 +933,6 @@ module Komoju
|
|
866
933
|
"required": [
|
867
934
|
"type",
|
868
935
|
"store",
|
869
|
-
"phone",
|
870
936
|
"email"
|
871
937
|
]
|
872
938
|
},
|
@@ -896,7 +962,8 @@ module Komoju
|
|
896
962
|
},
|
897
963
|
"confirmation_code": {
|
898
964
|
"type": [
|
899
|
-
"string"
|
965
|
+
"string",
|
966
|
+
"null"
|
900
967
|
]
|
901
968
|
},
|
902
969
|
"receipt": {
|
@@ -1066,6 +1133,273 @@ module Komoju
|
|
1066
1133
|
},
|
1067
1134
|
"additionalProperties": false
|
1068
1135
|
},
|
1136
|
+
"bit_cash_request": {
|
1137
|
+
"type": [
|
1138
|
+
"object"
|
1139
|
+
],
|
1140
|
+
"properties": {
|
1141
|
+
"type": {
|
1142
|
+
"enum": [
|
1143
|
+
"bit_cash"
|
1144
|
+
]
|
1145
|
+
},
|
1146
|
+
"prepaid_number": {
|
1147
|
+
"type": [
|
1148
|
+
"string"
|
1149
|
+
],
|
1150
|
+
"maxLength": 16
|
1151
|
+
}
|
1152
|
+
},
|
1153
|
+
"required": [
|
1154
|
+
"type",
|
1155
|
+
"prepaid_number"
|
1156
|
+
]
|
1157
|
+
},
|
1158
|
+
"bit_cash_response": {
|
1159
|
+
"type": [
|
1160
|
+
"object"
|
1161
|
+
],
|
1162
|
+
"properties": {
|
1163
|
+
"type": {
|
1164
|
+
"enum": [
|
1165
|
+
"bit_cash"
|
1166
|
+
]
|
1167
|
+
}
|
1168
|
+
},
|
1169
|
+
"required": [
|
1170
|
+
"type"
|
1171
|
+
]
|
1172
|
+
},
|
1173
|
+
"nanaco_request": {
|
1174
|
+
"type": [
|
1175
|
+
"object"
|
1176
|
+
],
|
1177
|
+
"properties": {
|
1178
|
+
"type": {
|
1179
|
+
"enum": [
|
1180
|
+
"nanaco"
|
1181
|
+
]
|
1182
|
+
},
|
1183
|
+
"prepaid_number": {
|
1184
|
+
"type": [
|
1185
|
+
"string"
|
1186
|
+
],
|
1187
|
+
"maxLength": 16,
|
1188
|
+
"minLength": 16
|
1189
|
+
}
|
1190
|
+
},
|
1191
|
+
"required": [
|
1192
|
+
"type",
|
1193
|
+
"prepaid_number"
|
1194
|
+
]
|
1195
|
+
},
|
1196
|
+
"nanaco_response": {
|
1197
|
+
"type": [
|
1198
|
+
"object"
|
1199
|
+
],
|
1200
|
+
"properties": {
|
1201
|
+
"type": {
|
1202
|
+
"enum": [
|
1203
|
+
"nanaco"
|
1204
|
+
]
|
1205
|
+
},
|
1206
|
+
"email": {
|
1207
|
+
"type": [
|
1208
|
+
"string",
|
1209
|
+
"null"
|
1210
|
+
],
|
1211
|
+
"format": "email"
|
1212
|
+
},
|
1213
|
+
"short_amount": {
|
1214
|
+
"type": [
|
1215
|
+
"integer"
|
1216
|
+
]
|
1217
|
+
},
|
1218
|
+
"prepaid_cards": {
|
1219
|
+
"type": [
|
1220
|
+
"array"
|
1221
|
+
],
|
1222
|
+
"items": {
|
1223
|
+
"type": [
|
1224
|
+
"object"
|
1225
|
+
],
|
1226
|
+
"properties": {
|
1227
|
+
"last_four_digits": {
|
1228
|
+
"type": [
|
1229
|
+
"string"
|
1230
|
+
]
|
1231
|
+
},
|
1232
|
+
"points": {
|
1233
|
+
"type": [
|
1234
|
+
"number"
|
1235
|
+
]
|
1236
|
+
}
|
1237
|
+
},
|
1238
|
+
"additionalProperties": false
|
1239
|
+
}
|
1240
|
+
}
|
1241
|
+
},
|
1242
|
+
"additionalProperties": false
|
1243
|
+
},
|
1244
|
+
"net_cash_request": {
|
1245
|
+
"type": [
|
1246
|
+
"object"
|
1247
|
+
],
|
1248
|
+
"properties": {
|
1249
|
+
"type": {
|
1250
|
+
"enum": [
|
1251
|
+
"net_cash"
|
1252
|
+
]
|
1253
|
+
},
|
1254
|
+
"prepaid_number": {
|
1255
|
+
"type": [
|
1256
|
+
"string"
|
1257
|
+
],
|
1258
|
+
"maxLength": 16,
|
1259
|
+
"minLength": 16
|
1260
|
+
}
|
1261
|
+
},
|
1262
|
+
"required": [
|
1263
|
+
"type",
|
1264
|
+
"prepaid_number"
|
1265
|
+
]
|
1266
|
+
},
|
1267
|
+
"net_cash_response": {
|
1268
|
+
"type": [
|
1269
|
+
"object"
|
1270
|
+
],
|
1271
|
+
"properties": {
|
1272
|
+
"type": {
|
1273
|
+
"enum": [
|
1274
|
+
"net_cash"
|
1275
|
+
]
|
1276
|
+
},
|
1277
|
+
"email": {
|
1278
|
+
"type": [
|
1279
|
+
"string",
|
1280
|
+
"null"
|
1281
|
+
],
|
1282
|
+
"format": "email"
|
1283
|
+
},
|
1284
|
+
"short_amount": {
|
1285
|
+
"type": [
|
1286
|
+
"integer"
|
1287
|
+
]
|
1288
|
+
},
|
1289
|
+
"prepaid_cards": {
|
1290
|
+
"type": [
|
1291
|
+
"array"
|
1292
|
+
],
|
1293
|
+
"items": {
|
1294
|
+
"type": [
|
1295
|
+
"object"
|
1296
|
+
],
|
1297
|
+
"properties": {
|
1298
|
+
"last_four_digits": {
|
1299
|
+
"type": [
|
1300
|
+
"string"
|
1301
|
+
]
|
1302
|
+
},
|
1303
|
+
"points": {
|
1304
|
+
"type": [
|
1305
|
+
"number"
|
1306
|
+
]
|
1307
|
+
}
|
1308
|
+
},
|
1309
|
+
"additionalProperties": false
|
1310
|
+
}
|
1311
|
+
}
|
1312
|
+
},
|
1313
|
+
"additionalProperties": false
|
1314
|
+
},
|
1315
|
+
"culture_voucher_request": {
|
1316
|
+
"type": [
|
1317
|
+
"object"
|
1318
|
+
],
|
1319
|
+
"properties": {
|
1320
|
+
"type": {
|
1321
|
+
"enum": [
|
1322
|
+
"culture_voucher"
|
1323
|
+
]
|
1324
|
+
},
|
1325
|
+
"culture_id": {
|
1326
|
+
"type": [
|
1327
|
+
"string"
|
1328
|
+
],
|
1329
|
+
"maxLength": 12
|
1330
|
+
},
|
1331
|
+
"culture_password": {
|
1332
|
+
"type": [
|
1333
|
+
"string"
|
1334
|
+
],
|
1335
|
+
"maxLength": 12
|
1336
|
+
}
|
1337
|
+
},
|
1338
|
+
"required": [
|
1339
|
+
"type",
|
1340
|
+
"culture_id",
|
1341
|
+
"culture_password"
|
1342
|
+
]
|
1343
|
+
},
|
1344
|
+
"culture_voucher_response": {
|
1345
|
+
"type": [
|
1346
|
+
"object"
|
1347
|
+
],
|
1348
|
+
"properties": {
|
1349
|
+
"type": {
|
1350
|
+
"enum": [
|
1351
|
+
"culture_voucher"
|
1352
|
+
]
|
1353
|
+
}
|
1354
|
+
},
|
1355
|
+
"required": [
|
1356
|
+
"type"
|
1357
|
+
]
|
1358
|
+
},
|
1359
|
+
"dospara_request": {
|
1360
|
+
"type": [
|
1361
|
+
"object"
|
1362
|
+
],
|
1363
|
+
"properties": {
|
1364
|
+
"type": {
|
1365
|
+
"enum": [
|
1366
|
+
"dospara"
|
1367
|
+
]
|
1368
|
+
},
|
1369
|
+
"user_no": {
|
1370
|
+
"type": [
|
1371
|
+
"string"
|
1372
|
+
],
|
1373
|
+
"maxLength": 20
|
1374
|
+
},
|
1375
|
+
"user_password": {
|
1376
|
+
"type": [
|
1377
|
+
"string"
|
1378
|
+
],
|
1379
|
+
"maxLength": 20
|
1380
|
+
}
|
1381
|
+
},
|
1382
|
+
"required": [
|
1383
|
+
"type",
|
1384
|
+
"user_no",
|
1385
|
+
"user_password"
|
1386
|
+
]
|
1387
|
+
},
|
1388
|
+
"dospara_response": {
|
1389
|
+
"type": [
|
1390
|
+
"object"
|
1391
|
+
],
|
1392
|
+
"properties": {
|
1393
|
+
"type": {
|
1394
|
+
"enum": [
|
1395
|
+
"dospara"
|
1396
|
+
]
|
1397
|
+
}
|
1398
|
+
},
|
1399
|
+
"required": [
|
1400
|
+
"type"
|
1401
|
+
]
|
1402
|
+
},
|
1069
1403
|
"credit_card_request": {
|
1070
1404
|
"type": [
|
1071
1405
|
"object"
|
@@ -1112,7 +1446,8 @@ module Komoju
|
|
1112
1446
|
"visa",
|
1113
1447
|
"american_express",
|
1114
1448
|
"master",
|
1115
|
-
"jcb"
|
1449
|
+
"jcb",
|
1450
|
+
"diners_club"
|
1116
1451
|
]
|
1117
1452
|
}
|
1118
1453
|
},
|
@@ -1157,6 +1492,9 @@ module Komoju
|
|
1157
1492
|
"master",
|
1158
1493
|
"jcb"
|
1159
1494
|
]
|
1495
|
+
},
|
1496
|
+
"expiry_days": {
|
1497
|
+
"$ref": "#/definitions/payments/definitions/expiry_days"
|
1160
1498
|
}
|
1161
1499
|
},
|
1162
1500
|
"required": [
|
@@ -1238,7 +1576,10 @@ module Komoju
|
|
1238
1576
|
"example": "JPY",
|
1239
1577
|
"enum": [
|
1240
1578
|
"JPY",
|
1241
|
-
"USD"
|
1579
|
+
"USD",
|
1580
|
+
"EUR",
|
1581
|
+
"TWD",
|
1582
|
+
"KRW"
|
1242
1583
|
],
|
1243
1584
|
"description": "3 letter ISO currency code of the transaction"
|
1244
1585
|
},
|
@@ -1297,7 +1638,12 @@ module Komoju
|
|
1297
1638
|
"bank_transfer",
|
1298
1639
|
"konbini",
|
1299
1640
|
"pay_easy",
|
1300
|
-
"web_money"
|
1641
|
+
"web_money",
|
1642
|
+
"bit_cash",
|
1643
|
+
"nanaco",
|
1644
|
+
"net_cash",
|
1645
|
+
"culture_voucher",
|
1646
|
+
"dospara"
|
1301
1647
|
]
|
1302
1648
|
}
|
1303
1649
|
},
|
@@ -1335,6 +1681,18 @@ module Komoju
|
|
1335
1681
|
},
|
1336
1682
|
{
|
1337
1683
|
"$ref": "#/definitions/payments/definitions/web_money_response"
|
1684
|
+
},
|
1685
|
+
{
|
1686
|
+
"$ref": "#/definitions/payments/definitions/bit_cash_response"
|
1687
|
+
},
|
1688
|
+
{
|
1689
|
+
"$ref": "#/definitions/payments/definitions/nanaco_response"
|
1690
|
+
},
|
1691
|
+
{
|
1692
|
+
"$ref": "#/definitions/payments/definitions/culture_voucher_response"
|
1693
|
+
},
|
1694
|
+
{
|
1695
|
+
"$ref": "#/definitions/payments/definitions/net_cash_response"
|
1338
1696
|
}
|
1339
1697
|
]
|
1340
1698
|
},
|
@@ -1363,6 +1721,11 @@ module Komoju
|
|
1363
1721
|
"string"
|
1364
1722
|
]
|
1365
1723
|
},
|
1724
|
+
"customer_id": {
|
1725
|
+
"type": [
|
1726
|
+
"string"
|
1727
|
+
]
|
1728
|
+
},
|
1366
1729
|
"browser_language": {
|
1367
1730
|
"type": [
|
1368
1731
|
"string"
|
@@ -1406,6 +1769,9 @@ module Komoju
|
|
1406
1769
|
"response_example": "payments#index",
|
1407
1770
|
"targetSchema": {
|
1408
1771
|
"$ref": "#/definitions/list/"
|
1772
|
+
},
|
1773
|
+
"schema": {
|
1774
|
+
"$ref": "#/definitions/list_filter/"
|
1409
1775
|
}
|
1410
1776
|
},
|
1411
1777
|
{
|
@@ -1437,6 +1803,9 @@ module Komoju
|
|
1437
1803
|
"amount": {
|
1438
1804
|
"$ref": "#/definitions/payments/definitions/amount"
|
1439
1805
|
},
|
1806
|
+
"capture": {
|
1807
|
+
"$ref": "#/definitions/payments/definitions/capture"
|
1808
|
+
},
|
1440
1809
|
"tax": {
|
1441
1810
|
"$ref": "#/definitions/payments/definitions/tax"
|
1442
1811
|
},
|
@@ -1446,6 +1815,12 @@ module Komoju
|
|
1446
1815
|
"external_order_num": {
|
1447
1816
|
"$ref": "#/definitions/payments/definitions/external_order_num"
|
1448
1817
|
},
|
1818
|
+
"locale": {
|
1819
|
+
"$ref": "#/definitions/payments/definitions/locale"
|
1820
|
+
},
|
1821
|
+
"partner_origin": {
|
1822
|
+
"$ref": "#/definitions/payments/definitions/partner_origin"
|
1823
|
+
},
|
1449
1824
|
"metadata": {
|
1450
1825
|
"$ref": "#/definitions/payments/definitions/metadata"
|
1451
1826
|
},
|
@@ -1494,7 +1869,9 @@ module Komoju
|
|
1494
1869
|
"properties": {
|
1495
1870
|
"type": {
|
1496
1871
|
"enum": [
|
1497
|
-
"web_money"
|
1872
|
+
"web_money",
|
1873
|
+
"net_cash",
|
1874
|
+
"nanaco"
|
1498
1875
|
]
|
1499
1876
|
}
|
1500
1877
|
},
|
@@ -1506,6 +1883,17 @@ module Komoju
|
|
1506
1883
|
"additionalProperties": false
|
1507
1884
|
}
|
1508
1885
|
},
|
1886
|
+
{
|
1887
|
+
"title": "Capture",
|
1888
|
+
"description": "Capture a payment",
|
1889
|
+
"href": "/payments/{(%2Fdefinitions%2Fpayments%2Fdefinitions%2Fid)}/capture",
|
1890
|
+
"method": "POST",
|
1891
|
+
"rel": "self",
|
1892
|
+
"response_example": "payments#capture",
|
1893
|
+
"targetSchema": {
|
1894
|
+
"$ref": "#/definitions/payments/"
|
1895
|
+
}
|
1896
|
+
},
|
1509
1897
|
{
|
1510
1898
|
"title": "Refund",
|
1511
1899
|
"description": "Refund a payment",
|
@@ -1714,6 +2102,9 @@ module Komoju
|
|
1714
2102
|
"response_example": "payouts#index",
|
1715
2103
|
"targetSchema": {
|
1716
2104
|
"$ref": "#/definitions/list/"
|
2105
|
+
},
|
2106
|
+
"schema": {
|
2107
|
+
"$ref": "#/definitions/list_filter/"
|
1717
2108
|
}
|
1718
2109
|
},
|
1719
2110
|
{
|
@@ -1805,10 +2196,12 @@ module Komoju
|
|
1805
2196
|
],
|
1806
2197
|
"description": "An ISO 8601 formatted timestamp of when the subscription will next be billed."
|
1807
2198
|
},
|
1808
|
-
"
|
2199
|
+
"cancel_later": {
|
1809
2200
|
"type": [
|
1810
2201
|
"boolean"
|
1811
|
-
]
|
2202
|
+
],
|
2203
|
+
"default": true,
|
2204
|
+
"description": "Cancel the subscription at the end of the current billing period (default: true)"
|
1812
2205
|
},
|
1813
2206
|
"metadata": {
|
1814
2207
|
"$ref": "#/definitions/payments/definitions/metadata"
|
@@ -1833,6 +2226,9 @@ module Komoju
|
|
1833
2226
|
"response_example": "subscriptions#index",
|
1834
2227
|
"targetSchema": {
|
1835
2228
|
"$ref": "#/definitions/list/"
|
2229
|
+
},
|
2230
|
+
"schema": {
|
2231
|
+
"$ref": "#/definitions/list_filter/"
|
1836
2232
|
}
|
1837
2233
|
},
|
1838
2234
|
{
|
@@ -1882,14 +2278,24 @@ module Komoju
|
|
1882
2278
|
}
|
1883
2279
|
},
|
1884
2280
|
{
|
1885
|
-
"title": "
|
1886
|
-
"description": "
|
2281
|
+
"title": "Destroy",
|
2282
|
+
"description": "Destroy a subscription",
|
1887
2283
|
"href": "/subscriptions/{(%2Fdefinitions%2Fsubscriptions%2Fdefinitions%2Fid)}",
|
1888
2284
|
"method": "DELETE",
|
1889
2285
|
"rel": "destroy",
|
1890
2286
|
"response_example": "subscriptions#destroy",
|
1891
2287
|
"targetSchema": {
|
1892
2288
|
"$ref": "#/definitions/subscriptions/"
|
2289
|
+
},
|
2290
|
+
"schema": {
|
2291
|
+
"type": [
|
2292
|
+
"object"
|
2293
|
+
],
|
2294
|
+
"properties": {
|
2295
|
+
"cancel_later": {
|
2296
|
+
"$ref": "#/definitions/subscriptions/definitions/cancel_later"
|
2297
|
+
}
|
2298
|
+
}
|
1893
2299
|
}
|
1894
2300
|
}
|
1895
2301
|
],
|
@@ -1909,8 +2315,8 @@ module Komoju
|
|
1909
2315
|
"customer": {
|
1910
2316
|
"$ref": "#/definitions/subscriptions/definitions/customer"
|
1911
2317
|
},
|
1912
|
-
"
|
1913
|
-
"$ref": "#/definitions/subscriptions/definitions/
|
2318
|
+
"cancel_later": {
|
2319
|
+
"$ref": "#/definitions/subscriptions/definitions/cancel_later"
|
1914
2320
|
},
|
1915
2321
|
"metadata": {
|
1916
2322
|
"$ref": "#/definitions/subscriptions/definitions/metadata"
|
@@ -1944,13 +2350,6 @@ module Komoju
|
|
1944
2350
|
],
|
1945
2351
|
"description": "Name of resource"
|
1946
2352
|
},
|
1947
|
-
"currency": {
|
1948
|
-
"readOnly": true,
|
1949
|
-
"type": [
|
1950
|
-
"string",
|
1951
|
-
"null"
|
1952
|
-
]
|
1953
|
-
},
|
1954
2353
|
"payment_details": {
|
1955
2354
|
"$ref": "#/definitions/payments/definitions/payment_details_response"
|
1956
2355
|
},
|
@@ -1985,6 +2384,9 @@ module Komoju
|
|
1985
2384
|
"response_example": "customers#index",
|
1986
2385
|
"targetSchema": {
|
1987
2386
|
"$ref": "#/definitions/list/"
|
2387
|
+
},
|
2388
|
+
"schema": {
|
2389
|
+
"$ref": "#/definitions/list_filter/"
|
1988
2390
|
}
|
1989
2391
|
},
|
1990
2392
|
{
|
@@ -2041,9 +2443,6 @@ module Komoju
|
|
2041
2443
|
"payment_details": {
|
2042
2444
|
"$ref": "#/definitions/payments/definitions/payment_details_request"
|
2043
2445
|
},
|
2044
|
-
"currency": {
|
2045
|
-
"$ref": "#/definitions/payments/definitions/currency"
|
2046
|
-
},
|
2047
2446
|
"email": {
|
2048
2447
|
"$ref": "#/definitions/customers/definitions/email"
|
2049
2448
|
},
|
@@ -2058,8 +2457,8 @@ module Komoju
|
|
2058
2457
|
}
|
2059
2458
|
},
|
2060
2459
|
{
|
2061
|
-
"title": "
|
2062
|
-
"description": "
|
2460
|
+
"title": "Destroy",
|
2461
|
+
"description": "Destroy a customer",
|
2063
2462
|
"href": "/customers/{(%2Fdefinitions%2Fcustomers%2Fdefinitions%2Fid)}",
|
2064
2463
|
"method": "DELETE",
|
2065
2464
|
"rel": "destroy",
|
@@ -2076,9 +2475,6 @@ module Komoju
|
|
2076
2475
|
"resource": {
|
2077
2476
|
"$ref": "#/definitions/customers/definitions/resource"
|
2078
2477
|
},
|
2079
|
-
"currency": {
|
2080
|
-
"$ref": "#/definitions/customers/definitions/currency"
|
2081
|
-
},
|
2082
2478
|
"email": {
|
2083
2479
|
"$ref": "#/definitions/customers/definitions/email"
|
2084
2480
|
},
|
@@ -2120,6 +2516,13 @@ module Komoju
|
|
2120
2516
|
"null"
|
2121
2517
|
]
|
2122
2518
|
},
|
2519
|
+
"renewal": {
|
2520
|
+
"type": [
|
2521
|
+
"boolean"
|
2522
|
+
],
|
2523
|
+
"default": true,
|
2524
|
+
"description": "Include the upcoming renewal charge (default: true)"
|
2525
|
+
},
|
2123
2526
|
"paid": {
|
2124
2527
|
"readOnly": true,
|
2125
2528
|
"type": [
|
@@ -2146,6 +2549,9 @@ module Komoju
|
|
2146
2549
|
"response_example": "invoices#index",
|
2147
2550
|
"targetSchema": {
|
2148
2551
|
"$ref": "#/definitions/list/"
|
2552
|
+
},
|
2553
|
+
"schema": {
|
2554
|
+
"$ref": "#/definitions/list_filter/"
|
2149
2555
|
}
|
2150
2556
|
},
|
2151
2557
|
{
|
@@ -2159,6 +2565,17 @@ module Komoju
|
|
2159
2565
|
"$ref": "#/definitions/invoices/"
|
2160
2566
|
}
|
2161
2567
|
},
|
2568
|
+
{
|
2569
|
+
"title": "Cancel",
|
2570
|
+
"description": "Cancel an invoice",
|
2571
|
+
"href": "/invoices/{(%2Fdefinitions%2Finvoices%2Fdefinitions%2Fid)}/cancel",
|
2572
|
+
"method": "POST",
|
2573
|
+
"rel": "self",
|
2574
|
+
"response_example": "invoices#cancel",
|
2575
|
+
"targetSchema": {
|
2576
|
+
"$ref": "#/definitions/invoices/"
|
2577
|
+
}
|
2578
|
+
},
|
2162
2579
|
{
|
2163
2580
|
"title": "Create",
|
2164
2581
|
"description": "Create an invoice",
|
@@ -2201,15 +2618,15 @@ module Komoju
|
|
2201
2618
|
"object"
|
2202
2619
|
],
|
2203
2620
|
"properties": {
|
2204
|
-
"customer": {
|
2205
|
-
"$ref": "#/definitions/customers/definitions/id"
|
2206
|
-
},
|
2207
2621
|
"subscription": {
|
2208
2622
|
"$ref": "#/definitions/subscriptions/definitions/id"
|
2623
|
+
},
|
2624
|
+
"renewal": {
|
2625
|
+
"$ref": "#/definitions/invoices/definitions/renewal"
|
2209
2626
|
}
|
2210
2627
|
},
|
2211
2628
|
"required": [
|
2212
|
-
"
|
2629
|
+
"subscription"
|
2213
2630
|
]
|
2214
2631
|
}
|
2215
2632
|
},
|
@@ -2251,6 +2668,9 @@ module Komoju
|
|
2251
2668
|
"subscription": {
|
2252
2669
|
"$ref": "#/definitions/subscriptions"
|
2253
2670
|
},
|
2671
|
+
"renewal": {
|
2672
|
+
"$ref": "#/definitions/invoices/definitions/renewal"
|
2673
|
+
},
|
2254
2674
|
"paid": {
|
2255
2675
|
"$ref": "#/definitions/invoices/definitions/paid"
|
2256
2676
|
},
|
@@ -2328,14 +2748,21 @@ module Komoju
|
|
2328
2748
|
"rel": "instances",
|
2329
2749
|
"response_example": "invoice_items#index",
|
2330
2750
|
"schema": {
|
2331
|
-
"
|
2332
|
-
|
2333
|
-
|
2334
|
-
|
2335
|
-
|
2336
|
-
"
|
2751
|
+
"allOf": [
|
2752
|
+
{
|
2753
|
+
"type": [
|
2754
|
+
"object"
|
2755
|
+
],
|
2756
|
+
"properties": {
|
2757
|
+
"subscription": {
|
2758
|
+
"$ref": "#/definitions/subscriptions/definitions/id"
|
2759
|
+
}
|
2760
|
+
}
|
2761
|
+
},
|
2762
|
+
{
|
2763
|
+
"$ref": "#/definitions/list_filter/"
|
2337
2764
|
}
|
2338
|
-
|
2765
|
+
]
|
2339
2766
|
},
|
2340
2767
|
"targetSchema": {
|
2341
2768
|
"$ref": "#/definitions/list/"
|
@@ -2370,11 +2797,8 @@ module Komoju
|
|
2370
2797
|
"amount": {
|
2371
2798
|
"$ref": "#/definitions/invoice_items/properties/amount"
|
2372
2799
|
},
|
2373
|
-
"
|
2374
|
-
"$ref": "#/definitions/invoice_items/properties/
|
2375
|
-
},
|
2376
|
-
"customer": {
|
2377
|
-
"$ref": "#/definitions/invoice_items/properties/customer"
|
2800
|
+
"subscription": {
|
2801
|
+
"$ref": "#/definitions/invoice_items/properties/subscription"
|
2378
2802
|
},
|
2379
2803
|
"metadata": {
|
2380
2804
|
"$ref": "#/definitions/invoice_items/properties/metadata"
|
@@ -2382,8 +2806,7 @@ module Komoju
|
|
2382
2806
|
},
|
2383
2807
|
"required": [
|
2384
2808
|
"amount",
|
2385
|
-
"
|
2386
|
-
"customer"
|
2809
|
+
"subscription"
|
2387
2810
|
]
|
2388
2811
|
}
|
2389
2812
|
},
|
@@ -2412,18 +2835,15 @@ module Komoju
|
|
2412
2835
|
"amount": {
|
2413
2836
|
"$ref": "#/definitions/payments/definitions/amount"
|
2414
2837
|
},
|
2415
|
-
"currency": {
|
2416
|
-
"$ref": "#/definitions/payments/definitions/currency"
|
2417
|
-
},
|
2418
|
-
"customer": {
|
2419
|
-
"$ref": "#/definitions/customers/definitions/id"
|
2420
|
-
},
|
2421
2838
|
"invoice": {
|
2422
2839
|
"$ref": "#/definitions/invoice_items/definitions/invoice"
|
2423
2840
|
},
|
2424
2841
|
"plan": {
|
2425
2842
|
"$ref": "#/definitions/invoice_items/definitions/plan"
|
2426
2843
|
},
|
2844
|
+
"subscription": {
|
2845
|
+
"$ref": "#/definitions/subscriptions/definitions/id"
|
2846
|
+
},
|
2427
2847
|
"metadata": {
|
2428
2848
|
"$ref": "#/definitions/payments/definitions/metadata"
|
2429
2849
|
}
|
@@ -2435,6 +2855,7 @@ module Komoju
|
|
2435
2855
|
"amount",
|
2436
2856
|
"customer",
|
2437
2857
|
"currency",
|
2858
|
+
"subscription",
|
2438
2859
|
"invoice",
|
2439
2860
|
"metadata",
|
2440
2861
|
"plan"
|
@@ -2528,6 +2949,9 @@ module Komoju
|
|
2528
2949
|
"response_example": "plans#index",
|
2529
2950
|
"targetSchema": {
|
2530
2951
|
"$ref": "#/definitions/list/"
|
2952
|
+
},
|
2953
|
+
"schema": {
|
2954
|
+
"$ref": "#/definitions/list_filter/"
|
2531
2955
|
}
|
2532
2956
|
},
|
2533
2957
|
{
|
@@ -2593,8 +3017,8 @@ module Komoju
|
|
2593
3017
|
}
|
2594
3018
|
},
|
2595
3019
|
{
|
2596
|
-
"title": "
|
2597
|
-
"description": "
|
3020
|
+
"title": "Destroy",
|
3021
|
+
"description": "Destroy a plan",
|
2598
3022
|
"href": "/plans/{(%2Fdefinitions%2Fplans%2Fdefinitions%2Fname)}",
|
2599
3023
|
"method": "DELETE",
|
2600
3024
|
"rel": "destroy",
|
@@ -2661,7 +3085,10 @@ module Komoju
|
|
2661
3085
|
"description": "Name of resource"
|
2662
3086
|
},
|
2663
3087
|
"payment_details": {
|
2664
|
-
"
|
3088
|
+
"type": [
|
3089
|
+
"object"
|
3090
|
+
],
|
3091
|
+
"description": "A hash or token describing the payment method."
|
2665
3092
|
},
|
2666
3093
|
"created_at": {
|
2667
3094
|
"example": "2015-03-06T06:52:35Z",
|
@@ -2703,6 +3130,9 @@ module Komoju
|
|
2703
3130
|
"id": {
|
2704
3131
|
"$ref": "#/definitions/tokens/definitions/id"
|
2705
3132
|
},
|
3133
|
+
"payment_details": {
|
3134
|
+
"$ref": "#/definitions/tokens/definitions/payment_details"
|
3135
|
+
},
|
2706
3136
|
"resource": {
|
2707
3137
|
"$ref": "#/definitions/tokens/definitions/resource"
|
2708
3138
|
},
|