komoju 0.0.7 → 0.0.8
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/.gitignore +1 -0
- data/README.md +1 -1
- data/komoju.gemspec +1 -1
- data/lib/komoju/client.rb +741 -1336
- data/lib/komoju/version.rb +1 -1
- metadata +7 -9
- data/Gemfile.lock +0 -37
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 259d2079aab7d8c0a95d2a1e19b3e30ee15f304463afa9088879a70ab1589b66
|
4
|
+
data.tar.gz: dc72042ac25b1d6e8fde06767d341d27931aa6677938c183bbf0122bfe0d1d9c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4fcff7a529050e3b2463f52a0302fdbf4799b4ed9cbd576c8456e1d53ebaf956d39a72aceffa60f8e96b069630dde82576ba63c8b8dcdafed3bc4683526977d0
|
7
|
+
data.tar.gz: 13680056e9f5b972f42c390d8a72537dab6bb12f5b4c224c248b9bde9586f432bd2acfb5ca6082268462dca6434b81e5780d75f57697176d5d52aa0fb76db123
|
data/.gitignore
CHANGED
data/README.md
CHANGED
@@ -21,7 +21,7 @@ Or install it yourself as:
|
|
21
21
|
## Usage
|
22
22
|
|
23
23
|
```ruby
|
24
|
-
client = Komoju.connect("api-secret-key"
|
24
|
+
client = Komoju.connect("api-secret-key")
|
25
25
|
client.payments.show("55404024b7b0dd6ec490158925")
|
26
26
|
|
27
27
|
payment_details = {
|
data/komoju.gemspec
CHANGED
@@ -18,7 +18,7 @@ Gem::Specification.new do |spec|
|
|
18
18
|
spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
|
19
19
|
spec.require_paths = ["lib"]
|
20
20
|
|
21
|
-
spec.add_dependency 'heroics'
|
21
|
+
spec.add_dependency 'heroics'
|
22
22
|
spec.add_dependency 'moneta'
|
23
23
|
|
24
24
|
spec.add_development_dependency "bundler", "~> 1.7"
|
data/lib/komoju/client.rb
CHANGED
@@ -9,6 +9,7 @@
|
|
9
9
|
|
10
10
|
require 'heroics'
|
11
11
|
require 'uri'
|
12
|
+
require 'moneta'
|
12
13
|
|
13
14
|
module Komoju
|
14
15
|
# Get a Client configured to use HTTP Basic or header-based authentication.
|
@@ -111,13 +112,6 @@ module Komoju
|
|
111
112
|
@payments_resource ||= Payments.new(@client)
|
112
113
|
end
|
113
114
|
|
114
|
-
# Payout Resource
|
115
|
-
#
|
116
|
-
# @return [Payouts]
|
117
|
-
def payouts
|
118
|
-
@payouts_resource ||= Payouts.new(@client)
|
119
|
-
end
|
120
|
-
|
121
115
|
# Subscription Resource
|
122
116
|
#
|
123
117
|
# @return [Subscriptions]
|
@@ -132,27 +126,6 @@ module Komoju
|
|
132
126
|
@customers_resource ||= Customers.new(@client)
|
133
127
|
end
|
134
128
|
|
135
|
-
# Subscription Invoice
|
136
|
-
#
|
137
|
-
# @return [Invoices]
|
138
|
-
def invoices
|
139
|
-
@invoices_resource ||= Invoices.new(@client)
|
140
|
-
end
|
141
|
-
|
142
|
-
# Subscription Invoice Items
|
143
|
-
#
|
144
|
-
# @return [InvoiceItems]
|
145
|
-
def invoice_items
|
146
|
-
@invoice_items_resource ||= InvoiceItems.new(@client)
|
147
|
-
end
|
148
|
-
|
149
|
-
# Subscription Plans
|
150
|
-
#
|
151
|
-
# @return [Plans]
|
152
|
-
def plans
|
153
|
-
@plans_resource ||= Plans.new(@client)
|
154
|
-
end
|
155
|
-
|
156
129
|
# Token resource
|
157
130
|
#
|
158
131
|
# @return [Tokens]
|
@@ -240,34 +213,6 @@ module Komoju
|
|
240
213
|
end
|
241
214
|
end
|
242
215
|
|
243
|
-
# Payout Resource
|
244
|
-
class Payouts
|
245
|
-
def initialize(client)
|
246
|
-
@client = client
|
247
|
-
end
|
248
|
-
|
249
|
-
# List payouts
|
250
|
-
#
|
251
|
-
# @param body: the object to pass as the request payload
|
252
|
-
def list(body = {})
|
253
|
-
@client.payouts.list(body)
|
254
|
-
end
|
255
|
-
|
256
|
-
# Show a payout
|
257
|
-
#
|
258
|
-
# @param payouts_id: A unique identifier for a payout.
|
259
|
-
def show(payouts_id)
|
260
|
-
@client.payouts.show(payouts_id)
|
261
|
-
end
|
262
|
-
|
263
|
-
# List payout items
|
264
|
-
#
|
265
|
-
# @param payouts_id: A unique identifier for a payout.
|
266
|
-
def payout_items(payouts_id)
|
267
|
-
@client.payouts.payout_items(payouts_id)
|
268
|
-
end
|
269
|
-
end
|
270
|
-
|
271
216
|
# Subscription Resource
|
272
217
|
class Subscriptions
|
273
218
|
def initialize(client)
|
@@ -298,9 +243,8 @@ module Komoju
|
|
298
243
|
# Destroy a subscription
|
299
244
|
#
|
300
245
|
# @param subscriptions_id: A unique identifier for a subscription.
|
301
|
-
|
302
|
-
|
303
|
-
@client.subscriptions.destroy(subscriptions_id, body)
|
246
|
+
def destroy(subscriptions_id)
|
247
|
+
@client.subscriptions.destroy(subscriptions_id)
|
304
248
|
end
|
305
249
|
end
|
306
250
|
|
@@ -347,126 +291,6 @@ module Komoju
|
|
347
291
|
end
|
348
292
|
end
|
349
293
|
|
350
|
-
# Subscription Invoice
|
351
|
-
class Invoices
|
352
|
-
def initialize(client)
|
353
|
-
@client = client
|
354
|
-
end
|
355
|
-
|
356
|
-
# List invoices
|
357
|
-
#
|
358
|
-
# @param body: the object to pass as the request payload
|
359
|
-
def list(body = {})
|
360
|
-
@client.invoices.list(body)
|
361
|
-
end
|
362
|
-
|
363
|
-
# Show an invoice
|
364
|
-
#
|
365
|
-
# @param invoices_id: A unique identifier for the invoice.
|
366
|
-
def show(invoices_id)
|
367
|
-
@client.invoices.show(invoices_id)
|
368
|
-
end
|
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
|
-
|
377
|
-
# Create an invoice
|
378
|
-
#
|
379
|
-
# @param body: the object to pass as the request payload
|
380
|
-
def create(body = {})
|
381
|
-
@client.invoices.create(body)
|
382
|
-
end
|
383
|
-
|
384
|
-
# Preview an upcoming invoice
|
385
|
-
#
|
386
|
-
# @param body: the object to pass as the request payload
|
387
|
-
def preview(body = {})
|
388
|
-
@client.invoices.preview(body)
|
389
|
-
end
|
390
|
-
|
391
|
-
# Pay an invoice
|
392
|
-
#
|
393
|
-
# @param invoices_id: A unique identifier for the invoice.
|
394
|
-
# @param body: the object to pass as the request payload
|
395
|
-
def pay(invoices_id, body = {})
|
396
|
-
@client.invoices.pay(invoices_id, body)
|
397
|
-
end
|
398
|
-
end
|
399
|
-
|
400
|
-
# Subscription Invoice Items
|
401
|
-
class InvoiceItems
|
402
|
-
def initialize(client)
|
403
|
-
@client = client
|
404
|
-
end
|
405
|
-
|
406
|
-
# List invoice items
|
407
|
-
#
|
408
|
-
# @param body: the object to pass as the request payload
|
409
|
-
def list(body = {})
|
410
|
-
@client.invoice_items.list(body)
|
411
|
-
end
|
412
|
-
|
413
|
-
# Show an invoice item
|
414
|
-
#
|
415
|
-
# @param invoice_items_id: A unique identifier for the invoice items.
|
416
|
-
def show(invoice_items_id)
|
417
|
-
@client.invoice_items.show(invoice_items_id)
|
418
|
-
end
|
419
|
-
|
420
|
-
# Create an invoice item
|
421
|
-
#
|
422
|
-
# @param body: the object to pass as the request payload
|
423
|
-
def create(body = {})
|
424
|
-
@client.invoice_items.create(body)
|
425
|
-
end
|
426
|
-
|
427
|
-
# Deletes an invoice item from the upcoming invoice.
|
428
|
-
#
|
429
|
-
# @param invoice_items_id: A unique identifier for the invoice items.
|
430
|
-
def destroy(invoice_items_id)
|
431
|
-
@client.invoice_items.destroy(invoice_items_id)
|
432
|
-
end
|
433
|
-
end
|
434
|
-
|
435
|
-
# Subscription Plans
|
436
|
-
class Plans
|
437
|
-
def initialize(client)
|
438
|
-
@client = client
|
439
|
-
end
|
440
|
-
|
441
|
-
# List plans
|
442
|
-
#
|
443
|
-
# @param body: the object to pass as the request payload
|
444
|
-
def list(body = {})
|
445
|
-
@client.plans.list(body)
|
446
|
-
end
|
447
|
-
|
448
|
-
# Show a plan
|
449
|
-
#
|
450
|
-
# @param plans_name: Name of the plan.
|
451
|
-
def show(plans_name)
|
452
|
-
@client.plans.show(plans_name)
|
453
|
-
end
|
454
|
-
|
455
|
-
# Create a plan
|
456
|
-
#
|
457
|
-
# @param body: the object to pass as the request payload
|
458
|
-
def create(body = {})
|
459
|
-
@client.plans.create(body)
|
460
|
-
end
|
461
|
-
|
462
|
-
# Destroy a plan
|
463
|
-
#
|
464
|
-
# @param plans_name: Name of the plan.
|
465
|
-
def destroy(plans_name)
|
466
|
-
@client.plans.destroy(plans_name)
|
467
|
-
end
|
468
|
-
end
|
469
|
-
|
470
294
|
# Token resource
|
471
295
|
class Tokens
|
472
296
|
def initialize(client)
|
@@ -503,17 +327,59 @@ module Komoju
|
|
503
327
|
"format": "date-time"
|
504
328
|
},
|
505
329
|
"per_page": {
|
506
|
-
"
|
507
|
-
"number"
|
508
|
-
]
|
330
|
+
"$ref": "#/definitions/per_page"
|
509
331
|
},
|
510
332
|
"page": {
|
333
|
+
"$ref": "#/definitions/page"
|
334
|
+
}
|
335
|
+
}
|
336
|
+
},
|
337
|
+
"payment_list_filter": {
|
338
|
+
"type": [
|
339
|
+
"object"
|
340
|
+
],
|
341
|
+
"properties": {
|
342
|
+
"start_time": {
|
511
343
|
"type": [
|
512
|
-
"
|
513
|
-
]
|
344
|
+
"string"
|
345
|
+
],
|
346
|
+
"format": "date-time"
|
347
|
+
},
|
348
|
+
"end_time": {
|
349
|
+
"type": [
|
350
|
+
"string"
|
351
|
+
],
|
352
|
+
"format": "date-time"
|
353
|
+
},
|
354
|
+
"per_page": {
|
355
|
+
"$ref": "#/definitions/per_page"
|
356
|
+
},
|
357
|
+
"page": {
|
358
|
+
"$ref": "#/definitions/page"
|
359
|
+
},
|
360
|
+
"currency": {
|
361
|
+
"$ref": "#/definitions/payments/definitions/currency"
|
362
|
+
},
|
363
|
+
"external_order_num": {
|
364
|
+
"$ref": "#/definitions/payments/definitions/external_order_num"
|
365
|
+
},
|
366
|
+
"status": {
|
367
|
+
"$ref": "#/definitions/payments/definitions/status"
|
514
368
|
}
|
515
369
|
}
|
516
370
|
},
|
371
|
+
"page": {
|
372
|
+
"type": [
|
373
|
+
"number"
|
374
|
+
],
|
375
|
+
"minimum": 1
|
376
|
+
},
|
377
|
+
"per_page": {
|
378
|
+
"type": [
|
379
|
+
"number"
|
380
|
+
],
|
381
|
+
"minimum": 1
|
382
|
+
},
|
517
383
|
"list": {
|
518
384
|
"type": [
|
519
385
|
"object"
|
@@ -530,14 +396,10 @@ module Komoju
|
|
530
396
|
]
|
531
397
|
},
|
532
398
|
"page": {
|
533
|
-
"
|
534
|
-
"integer"
|
535
|
-
]
|
399
|
+
"$ref": "#/definitions/page"
|
536
400
|
},
|
537
401
|
"per_page": {
|
538
|
-
"
|
539
|
-
"integer"
|
540
|
-
]
|
402
|
+
"$ref": "#/definitions/per_page"
|
541
403
|
},
|
542
404
|
"last_page": {
|
543
405
|
"type": [
|
@@ -545,7 +407,7 @@ module Komoju
|
|
545
407
|
]
|
546
408
|
},
|
547
409
|
"data": {
|
548
|
-
"
|
410
|
+
"anyOf": [
|
549
411
|
{
|
550
412
|
"type": [
|
551
413
|
"array"
|
@@ -554,22 +416,6 @@ module Komoju
|
|
554
416
|
"$ref": "#/definitions/payments"
|
555
417
|
}
|
556
418
|
},
|
557
|
-
{
|
558
|
-
"type": [
|
559
|
-
"array"
|
560
|
-
],
|
561
|
-
"items": {
|
562
|
-
"$ref": "#/definitions/payouts"
|
563
|
-
}
|
564
|
-
},
|
565
|
-
{
|
566
|
-
"type": [
|
567
|
-
"array"
|
568
|
-
],
|
569
|
-
"items": {
|
570
|
-
"$ref": "#/definitions/payouts/definitions/payout_item"
|
571
|
-
}
|
572
|
-
},
|
573
419
|
{
|
574
420
|
"type": [
|
575
421
|
"array"
|
@@ -593,38 +439,6 @@ module Komoju
|
|
593
439
|
"items": {
|
594
440
|
"$ref": "#/definitions/customers"
|
595
441
|
}
|
596
|
-
},
|
597
|
-
{
|
598
|
-
"type": [
|
599
|
-
"array"
|
600
|
-
],
|
601
|
-
"items": {
|
602
|
-
"$ref": "#/definitions/plans"
|
603
|
-
}
|
604
|
-
},
|
605
|
-
{
|
606
|
-
"type": [
|
607
|
-
"array"
|
608
|
-
],
|
609
|
-
"items": {
|
610
|
-
"$ref": "#/definitions/subscriptions"
|
611
|
-
}
|
612
|
-
},
|
613
|
-
{
|
614
|
-
"type": [
|
615
|
-
"array"
|
616
|
-
],
|
617
|
-
"items": {
|
618
|
-
"$ref": "#/definitions/invoices"
|
619
|
-
}
|
620
|
-
},
|
621
|
-
{
|
622
|
-
"type": [
|
623
|
-
"array"
|
624
|
-
],
|
625
|
-
"items": {
|
626
|
-
"$ref": "#/definitions/invoice_items"
|
627
|
-
}
|
628
442
|
}
|
629
443
|
]
|
630
444
|
}
|
@@ -731,33 +545,47 @@ module Komoju
|
|
731
545
|
"boolean"
|
732
546
|
],
|
733
547
|
"default": true,
|
734
|
-
"description": "If
|
548
|
+
"description": "If false, the payment will be authorized but not be captured. This option is ignored if a payment type is not credit_card"
|
735
549
|
},
|
736
|
-
"
|
550
|
+
"nonempty_string": {
|
737
551
|
"type": [
|
738
552
|
"string"
|
739
|
-
]
|
553
|
+
],
|
554
|
+
"minLength": 1
|
555
|
+
},
|
556
|
+
"given_name": {
|
557
|
+
"$ref": "#/definitions/payments/definitions/nonempty_string"
|
740
558
|
},
|
741
559
|
"family_name": {
|
742
|
-
"
|
743
|
-
"string"
|
744
|
-
]
|
560
|
+
"$ref": "#/definitions/payments/definitions/nonempty_string"
|
745
561
|
},
|
746
562
|
"given_name_kana": {
|
563
|
+
"$ref": "#/definitions/payments/definitions/nonempty_string"
|
564
|
+
},
|
565
|
+
"family_name_kana": {
|
566
|
+
"$ref": "#/definitions/payments/definitions/nonempty_string"
|
567
|
+
},
|
568
|
+
"name": {
|
569
|
+
"$ref": "#/definitions/payments/definitions/nonempty_string"
|
570
|
+
},
|
571
|
+
"email": {
|
747
572
|
"type": [
|
748
573
|
"string"
|
749
|
-
]
|
574
|
+
],
|
575
|
+
"format": "email",
|
576
|
+
"maxLength": 255
|
750
577
|
},
|
751
|
-
"
|
578
|
+
"return_url": {
|
752
579
|
"type": [
|
753
580
|
"string"
|
754
|
-
]
|
581
|
+
],
|
582
|
+
"format": "uri"
|
755
583
|
},
|
756
|
-
"
|
584
|
+
"cancel_url": {
|
757
585
|
"type": [
|
758
586
|
"string"
|
759
587
|
],
|
760
|
-
"format": "
|
588
|
+
"format": "uri"
|
761
589
|
},
|
762
590
|
"locale": {
|
763
591
|
"enum": [
|
@@ -765,7 +593,8 @@ module Komoju
|
|
765
593
|
"ja",
|
766
594
|
"ko"
|
767
595
|
],
|
768
|
-
"default": "ja"
|
596
|
+
"default": "ja",
|
597
|
+
"description": "Sets language of instruction page for supported payment methods. Valid options are 'en', 'ja', and 'ko'."
|
769
598
|
},
|
770
599
|
"partner_origin": {
|
771
600
|
"type": [
|
@@ -802,7 +631,9 @@ module Komoju
|
|
802
631
|
"external_order_num": {
|
803
632
|
"type": [
|
804
633
|
"string"
|
805
|
-
]
|
634
|
+
],
|
635
|
+
"maxLength": 255,
|
636
|
+
"description": "A unique ID from your application used to track this payment."
|
806
637
|
},
|
807
638
|
"bank_transfer_request": {
|
808
639
|
"type": [
|
@@ -833,7 +664,13 @@ module Komoju
|
|
833
664
|
"$ref": "#/definitions/payments/definitions/family_name_kana"
|
834
665
|
},
|
835
666
|
"expiry_days": {
|
836
|
-
"
|
667
|
+
"type": [
|
668
|
+
"integer"
|
669
|
+
],
|
670
|
+
"minimum": 14,
|
671
|
+
"maximum": 59,
|
672
|
+
"exclusiveMinimum": false,
|
673
|
+
"exclusiveMaximum": false
|
837
674
|
}
|
838
675
|
},
|
839
676
|
"required": [
|
@@ -914,10 +751,9 @@ module Komoju
|
|
914
751
|
"seven-eleven",
|
915
752
|
"lawson",
|
916
753
|
"family-mart",
|
917
|
-
"sunkus",
|
918
|
-
"circle-k",
|
919
754
|
"ministop",
|
920
|
-
"daily-yamazaki"
|
755
|
+
"daily-yamazaki",
|
756
|
+
"seicomart"
|
921
757
|
]
|
922
758
|
},
|
923
759
|
"email": {
|
@@ -951,10 +787,9 @@ module Komoju
|
|
951
787
|
"seven-eleven",
|
952
788
|
"lawson",
|
953
789
|
"family-mart",
|
954
|
-
"sunkus",
|
955
|
-
"circle-k",
|
956
790
|
"ministop",
|
957
|
-
"daily-yamazaki"
|
791
|
+
"daily-yamazaki",
|
792
|
+
"seicomart"
|
958
793
|
]
|
959
794
|
},
|
960
795
|
"instructions_url": {
|
@@ -1072,6 +907,9 @@ module Komoju
|
|
1072
907
|
"web_money"
|
1073
908
|
]
|
1074
909
|
},
|
910
|
+
"email": {
|
911
|
+
"$ref": "#/definitions/payments/definitions/email"
|
912
|
+
},
|
1075
913
|
"prepaid_number": {
|
1076
914
|
"type": [
|
1077
915
|
"string"
|
@@ -1133,21 +971,25 @@ module Komoju
|
|
1133
971
|
},
|
1134
972
|
"additionalProperties": false
|
1135
973
|
},
|
1136
|
-
"
|
974
|
+
"steam_prepaid_card_request": {
|
1137
975
|
"type": [
|
1138
976
|
"object"
|
1139
977
|
],
|
1140
978
|
"properties": {
|
1141
979
|
"type": {
|
1142
980
|
"enum": [
|
1143
|
-
"
|
981
|
+
"steam_prepaid_card"
|
1144
982
|
]
|
1145
983
|
},
|
984
|
+
"email": {
|
985
|
+
"$ref": "#/definitions/payments/definitions/email"
|
986
|
+
},
|
1146
987
|
"prepaid_number": {
|
1147
988
|
"type": [
|
1148
989
|
"string"
|
1149
990
|
],
|
1150
|
-
"maxLength": 16
|
991
|
+
"maxLength": 16,
|
992
|
+
"minLength": 16
|
1151
993
|
}
|
1152
994
|
},
|
1153
995
|
"required": [
|
@@ -1155,39 +997,116 @@ module Komoju
|
|
1155
997
|
"prepaid_number"
|
1156
998
|
]
|
1157
999
|
},
|
1158
|
-
"
|
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": {
|
1000
|
+
"steam_prepaid_card_response": {
|
1174
1001
|
"type": [
|
1175
1002
|
"object"
|
1176
1003
|
],
|
1177
1004
|
"properties": {
|
1178
1005
|
"type": {
|
1179
1006
|
"enum": [
|
1180
|
-
"
|
1007
|
+
"steam_prepaid_card"
|
1181
1008
|
]
|
1182
1009
|
},
|
1183
|
-
"
|
1010
|
+
"email": {
|
1184
1011
|
"type": [
|
1185
|
-
"string"
|
1012
|
+
"string",
|
1013
|
+
"null"
|
1186
1014
|
],
|
1187
|
-
"
|
1188
|
-
|
1189
|
-
|
1190
|
-
|
1015
|
+
"format": "email"
|
1016
|
+
},
|
1017
|
+
"short_amount": {
|
1018
|
+
"type": [
|
1019
|
+
"integer"
|
1020
|
+
]
|
1021
|
+
},
|
1022
|
+
"prepaid_cards": {
|
1023
|
+
"type": [
|
1024
|
+
"array"
|
1025
|
+
],
|
1026
|
+
"items": {
|
1027
|
+
"type": [
|
1028
|
+
"object"
|
1029
|
+
],
|
1030
|
+
"properties": {
|
1031
|
+
"last_four_digits": {
|
1032
|
+
"type": [
|
1033
|
+
"string"
|
1034
|
+
]
|
1035
|
+
},
|
1036
|
+
"points": {
|
1037
|
+
"type": [
|
1038
|
+
"number"
|
1039
|
+
]
|
1040
|
+
}
|
1041
|
+
},
|
1042
|
+
"additionalProperties": false
|
1043
|
+
}
|
1044
|
+
}
|
1045
|
+
},
|
1046
|
+
"additionalProperties": false
|
1047
|
+
},
|
1048
|
+
"bit_cash_request": {
|
1049
|
+
"type": [
|
1050
|
+
"object"
|
1051
|
+
],
|
1052
|
+
"properties": {
|
1053
|
+
"type": {
|
1054
|
+
"enum": [
|
1055
|
+
"bit_cash"
|
1056
|
+
]
|
1057
|
+
},
|
1058
|
+
"email": {
|
1059
|
+
"$ref": "#/definitions/payments/definitions/email"
|
1060
|
+
},
|
1061
|
+
"prepaid_number": {
|
1062
|
+
"type": [
|
1063
|
+
"string"
|
1064
|
+
],
|
1065
|
+
"maxLength": 16,
|
1066
|
+
"minLength": 16
|
1067
|
+
}
|
1068
|
+
},
|
1069
|
+
"required": [
|
1070
|
+
"type",
|
1071
|
+
"prepaid_number"
|
1072
|
+
]
|
1073
|
+
},
|
1074
|
+
"bit_cash_response": {
|
1075
|
+
"type": [
|
1076
|
+
"object"
|
1077
|
+
],
|
1078
|
+
"properties": {
|
1079
|
+
"type": {
|
1080
|
+
"enum": [
|
1081
|
+
"bit_cash"
|
1082
|
+
]
|
1083
|
+
}
|
1084
|
+
},
|
1085
|
+
"required": [
|
1086
|
+
"type"
|
1087
|
+
]
|
1088
|
+
},
|
1089
|
+
"nanaco_request": {
|
1090
|
+
"type": [
|
1091
|
+
"object"
|
1092
|
+
],
|
1093
|
+
"properties": {
|
1094
|
+
"type": {
|
1095
|
+
"enum": [
|
1096
|
+
"nanaco"
|
1097
|
+
]
|
1098
|
+
},
|
1099
|
+
"email": {
|
1100
|
+
"$ref": "#/definitions/payments/definitions/email"
|
1101
|
+
},
|
1102
|
+
"prepaid_number": {
|
1103
|
+
"type": [
|
1104
|
+
"string"
|
1105
|
+
],
|
1106
|
+
"maxLength": 16,
|
1107
|
+
"minLength": 16
|
1108
|
+
}
|
1109
|
+
},
|
1191
1110
|
"required": [
|
1192
1111
|
"type",
|
1193
1112
|
"prepaid_number"
|
@@ -1251,11 +1170,14 @@ module Komoju
|
|
1251
1170
|
"net_cash"
|
1252
1171
|
]
|
1253
1172
|
},
|
1173
|
+
"email": {
|
1174
|
+
"$ref": "#/definitions/payments/definitions/email"
|
1175
|
+
},
|
1254
1176
|
"prepaid_number": {
|
1255
1177
|
"type": [
|
1256
1178
|
"string"
|
1257
1179
|
],
|
1258
|
-
"maxLength":
|
1180
|
+
"maxLength": 20,
|
1259
1181
|
"minLength": 16
|
1260
1182
|
}
|
1261
1183
|
},
|
@@ -1326,13 +1248,15 @@ module Komoju
|
|
1326
1248
|
"type": [
|
1327
1249
|
"string"
|
1328
1250
|
],
|
1329
|
-
"maxLength": 12
|
1251
|
+
"maxLength": 12,
|
1252
|
+
"minLength": 1
|
1330
1253
|
},
|
1331
1254
|
"culture_password": {
|
1332
1255
|
"type": [
|
1333
1256
|
"string"
|
1334
1257
|
],
|
1335
|
-
"maxLength": 12
|
1258
|
+
"maxLength": 12,
|
1259
|
+
"minLength": 1
|
1336
1260
|
}
|
1337
1261
|
},
|
1338
1262
|
"required": [
|
@@ -1356,43 +1280,45 @@ module Komoju
|
|
1356
1280
|
"type"
|
1357
1281
|
]
|
1358
1282
|
},
|
1359
|
-
"
|
1283
|
+
"happy_money_request": {
|
1360
1284
|
"type": [
|
1361
1285
|
"object"
|
1362
1286
|
],
|
1363
1287
|
"properties": {
|
1364
1288
|
"type": {
|
1365
1289
|
"enum": [
|
1366
|
-
"
|
1290
|
+
"happy_money"
|
1367
1291
|
]
|
1368
1292
|
},
|
1369
|
-
"
|
1293
|
+
"happy_money_id": {
|
1370
1294
|
"type": [
|
1371
1295
|
"string"
|
1372
1296
|
],
|
1373
|
-
"maxLength": 20
|
1297
|
+
"maxLength": 20,
|
1298
|
+
"minLength": 1
|
1374
1299
|
},
|
1375
|
-
"
|
1300
|
+
"happy_money_password": {
|
1376
1301
|
"type": [
|
1377
1302
|
"string"
|
1378
1303
|
],
|
1379
|
-
"maxLength":
|
1304
|
+
"maxLength": 50,
|
1305
|
+
"minLength": 1
|
1380
1306
|
}
|
1381
1307
|
},
|
1382
1308
|
"required": [
|
1383
1309
|
"type",
|
1384
|
-
"
|
1385
|
-
"
|
1310
|
+
"happy_money_id",
|
1311
|
+
"happy_money_password"
|
1386
1312
|
]
|
1387
1313
|
},
|
1388
|
-
"
|
1314
|
+
"happy_money_response": {
|
1389
1315
|
"type": [
|
1390
1316
|
"object"
|
1391
1317
|
],
|
1392
1318
|
"properties": {
|
1393
1319
|
"type": {
|
1394
1320
|
"enum": [
|
1395
|
-
"
|
1321
|
+
"happy_money"
|
1396
1322
|
]
|
1397
1323
|
}
|
1398
1324
|
},
|
@@ -1400,120 +1326,351 @@ module Komoju
|
|
1400
1326
|
"type"
|
1401
1327
|
]
|
1402
1328
|
},
|
1403
|
-
"
|
1329
|
+
"mobile_request": {
|
1404
1330
|
"type": [
|
1405
1331
|
"object"
|
1406
1332
|
],
|
1407
1333
|
"properties": {
|
1408
1334
|
"type": {
|
1409
1335
|
"enum": [
|
1410
|
-
"
|
1336
|
+
"mobile"
|
1411
1337
|
]
|
1412
1338
|
},
|
1413
|
-
"
|
1339
|
+
"email": {
|
1340
|
+
"$ref": "#/definitions/payments/definitions/email"
|
1341
|
+
}
|
1342
|
+
},
|
1343
|
+
"required": [
|
1344
|
+
"type",
|
1345
|
+
"email"
|
1346
|
+
]
|
1347
|
+
},
|
1348
|
+
"mobile_response": {
|
1349
|
+
"type": [
|
1350
|
+
"object"
|
1351
|
+
],
|
1352
|
+
"properties": {
|
1353
|
+
"type": {
|
1354
|
+
"enum": [
|
1355
|
+
"mobile"
|
1356
|
+
]
|
1357
|
+
},
|
1358
|
+
"redirect_url": {
|
1414
1359
|
"type": [
|
1415
1360
|
"string"
|
1361
|
+
],
|
1362
|
+
"format": "uri"
|
1363
|
+
}
|
1364
|
+
},
|
1365
|
+
"required": [
|
1366
|
+
"type",
|
1367
|
+
"redirect_url"
|
1368
|
+
]
|
1369
|
+
},
|
1370
|
+
"toss_request": {
|
1371
|
+
"type": [
|
1372
|
+
"object"
|
1373
|
+
],
|
1374
|
+
"properties": {
|
1375
|
+
"type": {
|
1376
|
+
"enum": [
|
1377
|
+
"toss"
|
1416
1378
|
]
|
1417
1379
|
},
|
1418
|
-
"
|
1419
|
-
"
|
1420
|
-
|
1380
|
+
"email": {
|
1381
|
+
"$ref": "#/definitions/payments/definitions/email"
|
1382
|
+
}
|
1383
|
+
},
|
1384
|
+
"required": [
|
1385
|
+
"type",
|
1386
|
+
"email"
|
1387
|
+
]
|
1388
|
+
},
|
1389
|
+
"toss_response": {
|
1390
|
+
"type": [
|
1391
|
+
"object"
|
1392
|
+
],
|
1393
|
+
"properties": {
|
1394
|
+
"type": {
|
1395
|
+
"enum": [
|
1396
|
+
"toss"
|
1421
1397
|
]
|
1422
1398
|
},
|
1423
|
-
"
|
1399
|
+
"redirect_url": {
|
1424
1400
|
"type": [
|
1425
|
-
"
|
1401
|
+
"string"
|
1402
|
+
],
|
1403
|
+
"format": "uri"
|
1404
|
+
}
|
1405
|
+
},
|
1406
|
+
"required": [
|
1407
|
+
"type",
|
1408
|
+
"redirect_url"
|
1409
|
+
]
|
1410
|
+
},
|
1411
|
+
"zgold_request": {
|
1412
|
+
"type": [
|
1413
|
+
"object"
|
1414
|
+
],
|
1415
|
+
"properties": {
|
1416
|
+
"type": {
|
1417
|
+
"enum": [
|
1418
|
+
"zgold"
|
1426
1419
|
]
|
1427
1420
|
},
|
1428
|
-
"
|
1421
|
+
"item_title": {
|
1429
1422
|
"type": [
|
1430
1423
|
"string"
|
1431
1424
|
]
|
1432
1425
|
},
|
1433
|
-
"
|
1434
|
-
"$ref": "#/definitions/payments/definitions/given_name"
|
1435
|
-
},
|
1436
|
-
"family_name": {
|
1437
|
-
"$ref": "#/definitions/payments/definitions/family_name"
|
1438
|
-
},
|
1439
|
-
"last_four_digits": {
|
1426
|
+
"item_description": {
|
1440
1427
|
"type": [
|
1441
1428
|
"string"
|
1442
1429
|
]
|
1443
1430
|
},
|
1444
|
-
"
|
1445
|
-
"
|
1446
|
-
"
|
1447
|
-
|
1448
|
-
|
1449
|
-
"jcb",
|
1450
|
-
"diners_club"
|
1451
|
-
]
|
1431
|
+
"image_url": {
|
1432
|
+
"type": [
|
1433
|
+
"string"
|
1434
|
+
],
|
1435
|
+
"format": "uri"
|
1452
1436
|
}
|
1453
1437
|
},
|
1454
1438
|
"required": [
|
1455
|
-
"type"
|
1456
|
-
"number",
|
1457
|
-
"month",
|
1458
|
-
"year",
|
1459
|
-
"given_name",
|
1460
|
-
"family_name"
|
1439
|
+
"type"
|
1461
1440
|
]
|
1462
1441
|
},
|
1463
|
-
"
|
1442
|
+
"zgold_response": {
|
1464
1443
|
"type": [
|
1465
1444
|
"object"
|
1466
1445
|
],
|
1467
1446
|
"properties": {
|
1468
1447
|
"type": {
|
1469
1448
|
"enum": [
|
1470
|
-
"
|
1449
|
+
"zgold"
|
1471
1450
|
]
|
1472
1451
|
},
|
1473
|
-
"
|
1452
|
+
"redirect_url": {
|
1474
1453
|
"type": [
|
1475
|
-
"
|
1454
|
+
"string"
|
1455
|
+
],
|
1456
|
+
"format": "uri"
|
1457
|
+
}
|
1458
|
+
},
|
1459
|
+
"required": [
|
1460
|
+
"type",
|
1461
|
+
"redirect_url"
|
1462
|
+
]
|
1463
|
+
},
|
1464
|
+
"dospara_request": {
|
1465
|
+
"type": [
|
1466
|
+
"object"
|
1467
|
+
],
|
1468
|
+
"properties": {
|
1469
|
+
"type": {
|
1470
|
+
"enum": [
|
1471
|
+
"dospara"
|
1476
1472
|
]
|
1477
1473
|
},
|
1478
|
-
"
|
1474
|
+
"user_no": {
|
1479
1475
|
"type": [
|
1480
|
-
"
|
1481
|
-
]
|
1476
|
+
"string"
|
1477
|
+
],
|
1478
|
+
"maxLength": 20
|
1482
1479
|
},
|
1483
|
-
"
|
1480
|
+
"user_password": {
|
1484
1481
|
"type": [
|
1485
1482
|
"string"
|
1486
|
-
]
|
1487
|
-
|
1488
|
-
"brand": {
|
1489
|
-
"enum": [
|
1490
|
-
"visa",
|
1491
|
-
"american_express",
|
1492
|
-
"master",
|
1493
|
-
"jcb"
|
1494
|
-
]
|
1495
|
-
},
|
1496
|
-
"expiry_days": {
|
1497
|
-
"$ref": "#/definitions/payments/definitions/expiry_days"
|
1483
|
+
],
|
1484
|
+
"maxLength": 20
|
1498
1485
|
}
|
1499
1486
|
},
|
1500
1487
|
"required": [
|
1501
1488
|
"type",
|
1502
|
-
"
|
1503
|
-
"
|
1504
|
-
"month",
|
1505
|
-
"year"
|
1489
|
+
"user_no",
|
1490
|
+
"user_password"
|
1506
1491
|
]
|
1507
1492
|
},
|
1508
|
-
"
|
1509
|
-
"example": "94f128d4021b049bc616f5b1b0",
|
1510
|
-
"readOnly": true,
|
1493
|
+
"dospara_response": {
|
1511
1494
|
"type": [
|
1512
|
-
"
|
1495
|
+
"object"
|
1513
1496
|
],
|
1514
|
-
"
|
1515
|
-
|
1516
|
-
|
1497
|
+
"properties": {
|
1498
|
+
"type": {
|
1499
|
+
"enum": [
|
1500
|
+
"dospara"
|
1501
|
+
]
|
1502
|
+
}
|
1503
|
+
},
|
1504
|
+
"required": [
|
1505
|
+
"type"
|
1506
|
+
]
|
1507
|
+
},
|
1508
|
+
"cvs_request": {
|
1509
|
+
"type": [
|
1510
|
+
"object"
|
1511
|
+
],
|
1512
|
+
"properties": {
|
1513
|
+
"type": {
|
1514
|
+
"enum": [
|
1515
|
+
"cvs"
|
1516
|
+
]
|
1517
|
+
},
|
1518
|
+
"email": {
|
1519
|
+
"$ref": "#/definitions/payments/definitions/email"
|
1520
|
+
}
|
1521
|
+
},
|
1522
|
+
"required": [
|
1523
|
+
"type",
|
1524
|
+
"email"
|
1525
|
+
]
|
1526
|
+
},
|
1527
|
+
"cvs_korea_response": {
|
1528
|
+
"type": [
|
1529
|
+
"object"
|
1530
|
+
],
|
1531
|
+
"properties": {
|
1532
|
+
"type": {
|
1533
|
+
"enum": [
|
1534
|
+
"cvs"
|
1535
|
+
]
|
1536
|
+
}
|
1537
|
+
},
|
1538
|
+
"required": [
|
1539
|
+
"type",
|
1540
|
+
"email"
|
1541
|
+
]
|
1542
|
+
},
|
1543
|
+
"credit_card_request": {
|
1544
|
+
"type": [
|
1545
|
+
"object"
|
1546
|
+
],
|
1547
|
+
"properties": {
|
1548
|
+
"type": {
|
1549
|
+
"enum": [
|
1550
|
+
"credit_card"
|
1551
|
+
]
|
1552
|
+
},
|
1553
|
+
"email": {
|
1554
|
+
"$ref": "#/definitions/payments/definitions/email"
|
1555
|
+
},
|
1556
|
+
"number": {
|
1557
|
+
"type": [
|
1558
|
+
"string"
|
1559
|
+
],
|
1560
|
+
"maxLength": 19
|
1561
|
+
},
|
1562
|
+
"month": {
|
1563
|
+
"type": [
|
1564
|
+
"integer"
|
1565
|
+
],
|
1566
|
+
"maximum": 12,
|
1567
|
+
"minimum": 1
|
1568
|
+
},
|
1569
|
+
"year": {
|
1570
|
+
"type": [
|
1571
|
+
"integer"
|
1572
|
+
],
|
1573
|
+
"maximum": 2100,
|
1574
|
+
"minimum": 1
|
1575
|
+
},
|
1576
|
+
"verification_value": {
|
1577
|
+
"type": [
|
1578
|
+
"string"
|
1579
|
+
]
|
1580
|
+
},
|
1581
|
+
"given_name": {
|
1582
|
+
"$ref": "#/definitions/payments/definitions/given_name"
|
1583
|
+
},
|
1584
|
+
"family_name": {
|
1585
|
+
"$ref": "#/definitions/payments/definitions/family_name"
|
1586
|
+
},
|
1587
|
+
"name": {
|
1588
|
+
"$ref": "#/definitions/payments/definitions/family_name"
|
1589
|
+
},
|
1590
|
+
"three_d_secure": {
|
1591
|
+
"type": [
|
1592
|
+
"boolean"
|
1593
|
+
],
|
1594
|
+
"default": false
|
1595
|
+
},
|
1596
|
+
"expiry_days": {
|
1597
|
+
"$ref": "#/definitions/payments/definitions/expiry_days"
|
1598
|
+
}
|
1599
|
+
},
|
1600
|
+
"required": [
|
1601
|
+
"type",
|
1602
|
+
"number",
|
1603
|
+
"month",
|
1604
|
+
"year"
|
1605
|
+
],
|
1606
|
+
"anyOf": [
|
1607
|
+
{
|
1608
|
+
"required": [
|
1609
|
+
"given_name",
|
1610
|
+
"family_name"
|
1611
|
+
]
|
1612
|
+
},
|
1613
|
+
{
|
1614
|
+
"required": [
|
1615
|
+
"name"
|
1616
|
+
]
|
1617
|
+
}
|
1618
|
+
]
|
1619
|
+
},
|
1620
|
+
"credit_card_response": {
|
1621
|
+
"type": [
|
1622
|
+
"object"
|
1623
|
+
],
|
1624
|
+
"properties": {
|
1625
|
+
"type": {
|
1626
|
+
"enum": [
|
1627
|
+
"credit_card"
|
1628
|
+
]
|
1629
|
+
},
|
1630
|
+
"month": {
|
1631
|
+
"type": [
|
1632
|
+
"integer"
|
1633
|
+
]
|
1634
|
+
},
|
1635
|
+
"year": {
|
1636
|
+
"type": [
|
1637
|
+
"integer"
|
1638
|
+
]
|
1639
|
+
},
|
1640
|
+
"last_four_digits": {
|
1641
|
+
"type": [
|
1642
|
+
"string"
|
1643
|
+
]
|
1644
|
+
},
|
1645
|
+
"brand": {
|
1646
|
+
"enum": [
|
1647
|
+
"visa",
|
1648
|
+
"american_express",
|
1649
|
+
"master",
|
1650
|
+
"jcb"
|
1651
|
+
]
|
1652
|
+
},
|
1653
|
+
"expiry_days": {
|
1654
|
+
"$ref": "#/definitions/payments/definitions/expiry_days"
|
1655
|
+
}
|
1656
|
+
},
|
1657
|
+
"required": [
|
1658
|
+
"type",
|
1659
|
+
"brand",
|
1660
|
+
"last_four_digits",
|
1661
|
+
"month",
|
1662
|
+
"year"
|
1663
|
+
]
|
1664
|
+
},
|
1665
|
+
"id": {
|
1666
|
+
"example": "94f128d4021b049bc616f5b1b0",
|
1667
|
+
"readOnly": true,
|
1668
|
+
"type": [
|
1669
|
+
"string"
|
1670
|
+
],
|
1671
|
+
"description": "A unique indentifier for the payment"
|
1672
|
+
},
|
1673
|
+
"resource": {
|
1517
1674
|
"example": "payment",
|
1518
1675
|
"enum": [
|
1519
1676
|
"payment"
|
@@ -1534,6 +1691,7 @@ module Komoju
|
|
1534
1691
|
},
|
1535
1692
|
"amount": {
|
1536
1693
|
"example": "300",
|
1694
|
+
"maximum": 9999999,
|
1537
1695
|
"minimum": 0,
|
1538
1696
|
"type": [
|
1539
1697
|
"number"
|
@@ -1544,6 +1702,7 @@ module Komoju
|
|
1544
1702
|
"example": "30",
|
1545
1703
|
"type": [
|
1546
1704
|
"number",
|
1705
|
+
"string",
|
1547
1706
|
"null"
|
1548
1707
|
],
|
1549
1708
|
"description": "The amount of tax to be charged, or ‘auto’ to use the current consumption tax rate in Japan. Use a ‘.’ as a decimal separator, and no thousands separator. If the tax is more precise than the currency allows, it will be rounded using a round half up algorithm."
|
@@ -1589,7 +1748,7 @@ module Komoju
|
|
1589
1748
|
"string",
|
1590
1749
|
"null"
|
1591
1750
|
],
|
1592
|
-
"description": "
|
1751
|
+
"description": "Plaintext description for annotating a resource."
|
1593
1752
|
},
|
1594
1753
|
"subscription": {
|
1595
1754
|
"example": null,
|
@@ -1643,8 +1802,17 @@ module Komoju
|
|
1643
1802
|
"nanaco",
|
1644
1803
|
"net_cash",
|
1645
1804
|
"culture_voucher",
|
1646
|
-
"dospara"
|
1805
|
+
"dospara",
|
1806
|
+
"mobile",
|
1807
|
+
"zgold",
|
1808
|
+
"cvs",
|
1809
|
+
"steam_prepaid_card",
|
1810
|
+
"happy_money",
|
1811
|
+
"toss"
|
1647
1812
|
]
|
1813
|
+
},
|
1814
|
+
"email": {
|
1815
|
+
"$ref": "#/definitions/payments/definitions/email"
|
1648
1816
|
}
|
1649
1817
|
},
|
1650
1818
|
"required": [
|
@@ -1682,6 +1850,9 @@ module Komoju
|
|
1682
1850
|
{
|
1683
1851
|
"$ref": "#/definitions/payments/definitions/web_money_response"
|
1684
1852
|
},
|
1853
|
+
{
|
1854
|
+
"$ref": "#/definitions/payments/definitions/steam_prepaid_card_response"
|
1855
|
+
},
|
1685
1856
|
{
|
1686
1857
|
"$ref": "#/definitions/payments/definitions/bit_cash_response"
|
1687
1858
|
},
|
@@ -1691,8 +1862,23 @@ module Komoju
|
|
1691
1862
|
{
|
1692
1863
|
"$ref": "#/definitions/payments/definitions/culture_voucher_response"
|
1693
1864
|
},
|
1865
|
+
{
|
1866
|
+
"$ref": "#/definitions/payments/definitions/mobile_response"
|
1867
|
+
},
|
1868
|
+
{
|
1869
|
+
"$ref": "#/definitions/payments/definitions/toss_response"
|
1870
|
+
},
|
1871
|
+
{
|
1872
|
+
"$ref": "#/definitions/payments/definitions/zgold_response"
|
1873
|
+
},
|
1694
1874
|
{
|
1695
1875
|
"$ref": "#/definitions/payments/definitions/net_cash_response"
|
1876
|
+
},
|
1877
|
+
{
|
1878
|
+
"$ref": "#/definitions/payments/definitions/cvs_korea_response"
|
1879
|
+
},
|
1880
|
+
{
|
1881
|
+
"$ref": "#/definitions/payments/definitions/happy_money_response"
|
1696
1882
|
}
|
1697
1883
|
]
|
1698
1884
|
},
|
@@ -1771,7 +1957,7 @@ module Komoju
|
|
1771
1957
|
"$ref": "#/definitions/list/"
|
1772
1958
|
},
|
1773
1959
|
"schema": {
|
1774
|
-
"$ref": "#/definitions/
|
1960
|
+
"$ref": "#/definitions/payment_list_filter/"
|
1775
1961
|
}
|
1776
1962
|
},
|
1777
1963
|
{
|
@@ -1806,6 +1992,9 @@ module Komoju
|
|
1806
1992
|
"capture": {
|
1807
1993
|
"$ref": "#/definitions/payments/definitions/capture"
|
1808
1994
|
},
|
1995
|
+
"description": {
|
1996
|
+
"$ref": "#/definitions/payments/definitions/description"
|
1997
|
+
},
|
1809
1998
|
"tax": {
|
1810
1999
|
"$ref": "#/definitions/payments/definitions/tax"
|
1811
2000
|
},
|
@@ -1815,6 +2004,12 @@ module Komoju
|
|
1815
2004
|
"external_order_num": {
|
1816
2005
|
"$ref": "#/definitions/payments/definitions/external_order_num"
|
1817
2006
|
},
|
2007
|
+
"return_url": {
|
2008
|
+
"$ref": "#/definitions/payments/definitions/return_url"
|
2009
|
+
},
|
2010
|
+
"cancel_url": {
|
2011
|
+
"$ref": "#/definitions/payments/definitions/cancel_url"
|
2012
|
+
},
|
1818
2013
|
"locale": {
|
1819
2014
|
"$ref": "#/definitions/payments/definitions/locale"
|
1820
2015
|
},
|
@@ -1864,6 +2059,7 @@ module Komoju
|
|
1864
2059
|
},
|
1865
2060
|
"payment_details": {
|
1866
2061
|
"type": [
|
2062
|
+
"string",
|
1867
2063
|
"object"
|
1868
2064
|
],
|
1869
2065
|
"properties": {
|
@@ -1871,7 +2067,8 @@ module Komoju
|
|
1871
2067
|
"enum": [
|
1872
2068
|
"web_money",
|
1873
2069
|
"net_cash",
|
1874
|
-
"nanaco"
|
2070
|
+
"nanaco",
|
2071
|
+
"steam_prepaid_card"
|
1875
2072
|
]
|
1876
2073
|
}
|
1877
2074
|
},
|
@@ -1920,741 +2117,13 @@ module Komoju
|
|
1920
2117
|
},
|
1921
2118
|
{
|
1922
2119
|
"title": "Cancel",
|
1923
|
-
"description": "Cancel a payment",
|
1924
|
-
"href": "/payments/{(%2Fdefinitions%2Fpayments%2Fdefinitions%2Fid)}/cancel",
|
1925
|
-
"method": "POST",
|
1926
|
-
"rel": "self",
|
1927
|
-
"response_example": "payments#cancel",
|
1928
|
-
"targetSchema": {
|
1929
|
-
"$ref": "#/definitions/payments/"
|
1930
|
-
}
|
1931
|
-
}
|
1932
|
-
],
|
1933
|
-
"properties": {
|
1934
|
-
"id": {
|
1935
|
-
"$ref": "#/definitions/payments/definitions/id"
|
1936
|
-
},
|
1937
|
-
"resource": {
|
1938
|
-
"$ref": "#/definitions/payments/definitions/resource"
|
1939
|
-
},
|
1940
|
-
"status": {
|
1941
|
-
"$ref": "#/definitions/payments/definitions/status"
|
1942
|
-
},
|
1943
|
-
"amount": {
|
1944
|
-
"$ref": "#/definitions/payments/definitions/amount"
|
1945
|
-
},
|
1946
|
-
"tax": {
|
1947
|
-
"$ref": "#/definitions/payments/definitions/tax"
|
1948
|
-
},
|
1949
|
-
"payment_deadline": {
|
1950
|
-
"$ref": "#/definitions/payments/definitions/payment_deadline"
|
1951
|
-
},
|
1952
|
-
"payment_details": {
|
1953
|
-
"$ref": "#/definitions/payments/definitions/payment_details_response"
|
1954
|
-
},
|
1955
|
-
"payment_method_fee": {
|
1956
|
-
"$ref": "#/definitions/payments/definitions/payment_method_fee"
|
1957
|
-
},
|
1958
|
-
"total": {
|
1959
|
-
"$ref": "#/definitions/payments/definitions/total"
|
1960
|
-
},
|
1961
|
-
"currency": {
|
1962
|
-
"$ref": "#/definitions/payments/definitions/currency"
|
1963
|
-
},
|
1964
|
-
"description": {
|
1965
|
-
"$ref": "#/definitions/payments/definitions/description"
|
1966
|
-
},
|
1967
|
-
"subscription": {
|
1968
|
-
"$ref": "#/definitions/payments/definitions/subscription"
|
1969
|
-
},
|
1970
|
-
"captured_at": {
|
1971
|
-
"$ref": "#/definitions/payments/definitions/captured_at"
|
1972
|
-
},
|
1973
|
-
"metadata": {
|
1974
|
-
"$ref": "#/definitions/payments/definitions/metadata"
|
1975
|
-
},
|
1976
|
-
"created_at": {
|
1977
|
-
"$ref": "#/definitions/payments/definitions/created_at"
|
1978
|
-
},
|
1979
|
-
"refunds": {
|
1980
|
-
"type": [
|
1981
|
-
"array"
|
1982
|
-
]
|
1983
|
-
}
|
1984
|
-
},
|
1985
|
-
"description": "Payment resource",
|
1986
|
-
"title": "Payments"
|
1987
|
-
},
|
1988
|
-
"payouts": {
|
1989
|
-
"$schema": "http://json-schema.org/draft-04/hyper-schema",
|
1990
|
-
"type": [
|
1991
|
-
"object"
|
1992
|
-
],
|
1993
|
-
"definitions": {
|
1994
|
-
"id": {
|
1995
|
-
"example": "66a4824ac97cc7afff608f27c7",
|
1996
|
-
"readOnly": true,
|
1997
|
-
"type": [
|
1998
|
-
"string"
|
1999
|
-
],
|
2000
|
-
"description": "A unique identifier for a payout."
|
2001
|
-
},
|
2002
|
-
"resource": {
|
2003
|
-
"example": "event",
|
2004
|
-
"readOnly": true,
|
2005
|
-
"enum": [
|
2006
|
-
"payout"
|
2007
|
-
],
|
2008
|
-
"description": "Name of resource"
|
2009
|
-
},
|
2010
|
-
"payout_item": {
|
2011
|
-
"readOnly": true,
|
2012
|
-
"type": [
|
2013
|
-
"object"
|
2014
|
-
],
|
2015
|
-
"properties": {
|
2016
|
-
"resource": {
|
2017
|
-
"example": "payout_item",
|
2018
|
-
"readOnly": true,
|
2019
|
-
"enum": [
|
2020
|
-
"payout_item"
|
2021
|
-
],
|
2022
|
-
"description": "Name of resource."
|
2023
|
-
},
|
2024
|
-
"event_type": {
|
2025
|
-
"example": "capture",
|
2026
|
-
"readOnly": true,
|
2027
|
-
"enum": [
|
2028
|
-
"capture",
|
2029
|
-
"refund"
|
2030
|
-
],
|
2031
|
-
"description": "Describes whether the payout item is from a captured or refunded payment."
|
2032
|
-
},
|
2033
|
-
"timestamp": {
|
2034
|
-
"example": "2015-03-06T06:52:35Z",
|
2035
|
-
"readOnly": true,
|
2036
|
-
"format": "date-time",
|
2037
|
-
"description": "Timestamp describing when the payment was either captured or refunded."
|
2038
|
-
},
|
2039
|
-
"payment_method": {
|
2040
|
-
"example": "visa",
|
2041
|
-
"readOnly": true,
|
2042
|
-
"enum": [
|
2043
|
-
"visa",
|
2044
|
-
"master_card",
|
2045
|
-
"american_express",
|
2046
|
-
"jcb",
|
2047
|
-
"bank_transfer",
|
2048
|
-
"web_money",
|
2049
|
-
"lawson",
|
2050
|
-
"family-mart",
|
2051
|
-
"sunkus",
|
2052
|
-
"circle-k",
|
2053
|
-
"ministop",
|
2054
|
-
"daily-yamazaki",
|
2055
|
-
"seven-eleven"
|
2056
|
-
],
|
2057
|
-
"description": "The payment method of the payment."
|
2058
|
-
},
|
2059
|
-
"payment_fee": {
|
2060
|
-
"example": "300",
|
2061
|
-
"type": [
|
2062
|
-
"number"
|
2063
|
-
],
|
2064
|
-
"description": "Komoju platform fee deducted from the payment total."
|
2065
|
-
},
|
2066
|
-
"receivable": {
|
2067
|
-
"example": "300",
|
2068
|
-
"type": [
|
2069
|
-
"number"
|
2070
|
-
],
|
2071
|
-
"description": "The amount paid to your account for a given payment."
|
2072
|
-
},
|
2073
|
-
"amount": {
|
2074
|
-
"$ref": "#/definitions/payments/definitions/amount"
|
2075
|
-
},
|
2076
|
-
"tax": {
|
2077
|
-
"$ref": "#/definitions/payments/definitions/tax"
|
2078
|
-
},
|
2079
|
-
"total": {
|
2080
|
-
"$ref": "#/definitions/payments/definitions/total"
|
2081
|
-
}
|
2082
|
-
},
|
2083
|
-
"description": "Payout Item Resource"
|
2084
|
-
},
|
2085
|
-
"created_at": {
|
2086
|
-
"example": "2015-03-06T06:52:35Z",
|
2087
|
-
"format": "date-time",
|
2088
|
-
"readOnly": true,
|
2089
|
-
"type": [
|
2090
|
-
"string"
|
2091
|
-
],
|
2092
|
-
"description": "An ISO 8601 formatted timestamp of when the payout was created."
|
2093
|
-
}
|
2094
|
-
},
|
2095
|
-
"links": [
|
2096
|
-
{
|
2097
|
-
"title": "List",
|
2098
|
-
"description": "List payouts",
|
2099
|
-
"href": "/payouts",
|
2100
|
-
"method": "GET",
|
2101
|
-
"rel": "instances",
|
2102
|
-
"response_example": "payouts#index",
|
2103
|
-
"targetSchema": {
|
2104
|
-
"$ref": "#/definitions/list/"
|
2105
|
-
},
|
2106
|
-
"schema": {
|
2107
|
-
"$ref": "#/definitions/list_filter/"
|
2108
|
-
}
|
2109
|
-
},
|
2110
|
-
{
|
2111
|
-
"title": "Show",
|
2112
|
-
"description": "Show a payout",
|
2113
|
-
"href": "/payouts/{(%2Fdefinitions%2Fpayouts%2Fdefinitions%2Fid)}",
|
2114
|
-
"method": "GET",
|
2115
|
-
"rel": "self",
|
2116
|
-
"response_example": "payouts#show",
|
2117
|
-
"targetSchema": {
|
2118
|
-
"$ref": "#/definitions/payouts/"
|
2119
|
-
}
|
2120
|
-
},
|
2121
|
-
{
|
2122
|
-
"title": "Payout Items",
|
2123
|
-
"description": "List payout items",
|
2124
|
-
"href": "/payouts/{(%2Fdefinitions%2Fpayouts%2Fdefinitions%2Fid)}/payout_items",
|
2125
|
-
"method": "GET",
|
2126
|
-
"rel": "instances",
|
2127
|
-
"response_example": "payouts#payout_items",
|
2128
|
-
"targetSchema": {
|
2129
|
-
"$ref": "#/definitions/list/"
|
2130
|
-
}
|
2131
|
-
}
|
2132
|
-
],
|
2133
|
-
"properties": {
|
2134
|
-
"id": {
|
2135
|
-
"$ref": "#/definitions/payouts/definitions/id"
|
2136
|
-
},
|
2137
|
-
"resource": {
|
2138
|
-
"$ref": "#/definitions/payouts/definitions/resource"
|
2139
|
-
},
|
2140
|
-
"payout_items": {
|
2141
|
-
"$ref": "#/definitions/list/"
|
2142
|
-
},
|
2143
|
-
"created_at": {
|
2144
|
-
"$ref": "#/definitions/payouts/definitions/created_at"
|
2145
|
-
}
|
2146
|
-
},
|
2147
|
-
"description": "Payout Resource",
|
2148
|
-
"title": "Payouts"
|
2149
|
-
},
|
2150
|
-
"subscriptions": {
|
2151
|
-
"$schema": "http://json-schema.org/draft-04/hyper-schema",
|
2152
|
-
"type": [
|
2153
|
-
"object"
|
2154
|
-
],
|
2155
|
-
"definitions": {
|
2156
|
-
"id": {
|
2157
|
-
"example": "66a4824ac97cc7afff608f27c7",
|
2158
|
-
"readOnly": true,
|
2159
|
-
"type": [
|
2160
|
-
"string"
|
2161
|
-
],
|
2162
|
-
"description": "A unique identifier for a subscription."
|
2163
|
-
},
|
2164
|
-
"resource": {
|
2165
|
-
"example": "subscription",
|
2166
|
-
"readOnly": true,
|
2167
|
-
"enum": [
|
2168
|
-
"subscription"
|
2169
|
-
],
|
2170
|
-
"description": "Name of resource"
|
2171
|
-
},
|
2172
|
-
"status": {
|
2173
|
-
"example": "pending",
|
2174
|
-
"readOnly": true,
|
2175
|
-
"enum": [
|
2176
|
-
"cancelled",
|
2177
|
-
"pending",
|
2178
|
-
"active",
|
2179
|
-
"past_due"
|
2180
|
-
],
|
2181
|
-
"description": "The status of the subscription."
|
2182
|
-
},
|
2183
|
-
"plan": {
|
2184
|
-
"$ref": "#/definitions/plans"
|
2185
|
-
},
|
2186
|
-
"customer": {
|
2187
|
-
"$ref": "#/definitions/customers"
|
2188
|
-
},
|
2189
|
-
"current_period_end_at": {
|
2190
|
-
"example": null,
|
2191
|
-
"format": "date-time",
|
2192
|
-
"readOnly": true,
|
2193
|
-
"type": [
|
2194
|
-
"string",
|
2195
|
-
"null"
|
2196
|
-
],
|
2197
|
-
"description": "An ISO 8601 formatted timestamp of when the subscription will next be billed."
|
2198
|
-
},
|
2199
|
-
"cancel_later": {
|
2200
|
-
"type": [
|
2201
|
-
"boolean"
|
2202
|
-
],
|
2203
|
-
"default": true,
|
2204
|
-
"description": "Cancel the subscription at the end of the current billing period (default: true)"
|
2205
|
-
},
|
2206
|
-
"metadata": {
|
2207
|
-
"$ref": "#/definitions/payments/definitions/metadata"
|
2208
|
-
},
|
2209
|
-
"created_at": {
|
2210
|
-
"example": "2015-03-06T06:52:35Z",
|
2211
|
-
"format": "date-time",
|
2212
|
-
"readOnly": true,
|
2213
|
-
"type": [
|
2214
|
-
"string"
|
2215
|
-
],
|
2216
|
-
"description": "An ISO 8601 formatted timestamp of when the plan was created."
|
2217
|
-
}
|
2218
|
-
},
|
2219
|
-
"links": [
|
2220
|
-
{
|
2221
|
-
"title": "List",
|
2222
|
-
"description": "List subscriptions",
|
2223
|
-
"href": "/subscriptions",
|
2224
|
-
"method": "GET",
|
2225
|
-
"rel": "instances",
|
2226
|
-
"response_example": "subscriptions#index",
|
2227
|
-
"targetSchema": {
|
2228
|
-
"$ref": "#/definitions/list/"
|
2229
|
-
},
|
2230
|
-
"schema": {
|
2231
|
-
"$ref": "#/definitions/list_filter/"
|
2232
|
-
}
|
2233
|
-
},
|
2234
|
-
{
|
2235
|
-
"title": "Show",
|
2236
|
-
"description": "Show a subscription",
|
2237
|
-
"href": "/subscriptions/{(%2Fdefinitions%2Fsubscriptions%2Fdefinitions%2Fid)}",
|
2238
|
-
"method": "GET",
|
2239
|
-
"rel": "self",
|
2240
|
-
"response_example": "subscriptions#show",
|
2241
|
-
"targetSchema": {
|
2242
|
-
"$ref": "#/definitions/subscriptions/"
|
2243
|
-
}
|
2244
|
-
},
|
2245
|
-
{
|
2246
|
-
"title": "Create",
|
2247
|
-
"description": "Create a subscription",
|
2248
|
-
"href": "/subscriptions",
|
2249
|
-
"method": "POST",
|
2250
|
-
"rel": "create",
|
2251
|
-
"response_example": "subscriptions#create",
|
2252
|
-
"targetSchema": {
|
2253
|
-
"$ref": "#/definitions/subscriptions/"
|
2254
|
-
},
|
2255
|
-
"schema": {
|
2256
|
-
"type": [
|
2257
|
-
"object"
|
2258
|
-
],
|
2259
|
-
"properties": {
|
2260
|
-
"customer": {
|
2261
|
-
"type": [
|
2262
|
-
"string"
|
2263
|
-
]
|
2264
|
-
},
|
2265
|
-
"plan": {
|
2266
|
-
"type": [
|
2267
|
-
"string"
|
2268
|
-
]
|
2269
|
-
},
|
2270
|
-
"metadata": {
|
2271
|
-
"$ref": "#/definitions/subscriptions/definitions/metadata"
|
2272
|
-
}
|
2273
|
-
},
|
2274
|
-
"required": [
|
2275
|
-
"customer",
|
2276
|
-
"plan"
|
2277
|
-
]
|
2278
|
-
}
|
2279
|
-
},
|
2280
|
-
{
|
2281
|
-
"title": "Destroy",
|
2282
|
-
"description": "Destroy a subscription",
|
2283
|
-
"href": "/subscriptions/{(%2Fdefinitions%2Fsubscriptions%2Fdefinitions%2Fid)}",
|
2284
|
-
"method": "DELETE",
|
2285
|
-
"rel": "destroy",
|
2286
|
-
"response_example": "subscriptions#destroy",
|
2287
|
-
"targetSchema": {
|
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
|
-
}
|
2299
|
-
}
|
2300
|
-
}
|
2301
|
-
],
|
2302
|
-
"properties": {
|
2303
|
-
"id": {
|
2304
|
-
"$ref": "#/definitions/subscriptions/definitions/id"
|
2305
|
-
},
|
2306
|
-
"resource": {
|
2307
|
-
"$ref": "#/definitions/subscriptions/definitions/resource"
|
2308
|
-
},
|
2309
|
-
"status": {
|
2310
|
-
"$ref": "#/definitions/subscriptions/definitions/status"
|
2311
|
-
},
|
2312
|
-
"plan": {
|
2313
|
-
"$ref": "#/definitions/subscriptions/definitions/plan"
|
2314
|
-
},
|
2315
|
-
"customer": {
|
2316
|
-
"$ref": "#/definitions/subscriptions/definitions/customer"
|
2317
|
-
},
|
2318
|
-
"cancel_later": {
|
2319
|
-
"$ref": "#/definitions/subscriptions/definitions/cancel_later"
|
2320
|
-
},
|
2321
|
-
"metadata": {
|
2322
|
-
"$ref": "#/definitions/subscriptions/definitions/metadata"
|
2323
|
-
},
|
2324
|
-
"created_at": {
|
2325
|
-
"$ref": "#/definitions/subscriptions/definitions/created_at"
|
2326
|
-
}
|
2327
|
-
},
|
2328
|
-
"description": "Subscription Resource",
|
2329
|
-
"title": "Subscriptions"
|
2330
|
-
},
|
2331
|
-
"customers": {
|
2332
|
-
"$schema": "http://json-schema.org/draft-04/hyper-schema",
|
2333
|
-
"type": [
|
2334
|
-
"object"
|
2335
|
-
],
|
2336
|
-
"definitions": {
|
2337
|
-
"id": {
|
2338
|
-
"example": "fa799fca14be29d3fae455f22d",
|
2339
|
-
"readOnly": true,
|
2340
|
-
"type": [
|
2341
|
-
"string"
|
2342
|
-
],
|
2343
|
-
"description": "A unique identifier for the customer."
|
2344
|
-
},
|
2345
|
-
"resource": {
|
2346
|
-
"example": "customer",
|
2347
|
-
"readOnly": true,
|
2348
|
-
"enum": [
|
2349
|
-
"customer"
|
2350
|
-
],
|
2351
|
-
"description": "Name of resource"
|
2352
|
-
},
|
2353
|
-
"payment_details": {
|
2354
|
-
"$ref": "#/definitions/payments/definitions/payment_details_response"
|
2355
|
-
},
|
2356
|
-
"metadata": {
|
2357
|
-
"$ref": "#/definitions/payments/definitions/metadata"
|
2358
|
-
},
|
2359
|
-
"email": {
|
2360
|
-
"type": [
|
2361
|
-
"string",
|
2362
|
-
"null"
|
2363
|
-
],
|
2364
|
-
"format": "email",
|
2365
|
-
"description": "Customer's email address."
|
2366
|
-
},
|
2367
|
-
"created_at": {
|
2368
|
-
"example": "2015-03-06T06:52:35Z",
|
2369
|
-
"format": "date-time",
|
2370
|
-
"readOnly": true,
|
2371
|
-
"type": [
|
2372
|
-
"string"
|
2373
|
-
],
|
2374
|
-
"description": "An ISO 8601 formatted timestamp of when the customer was created."
|
2375
|
-
}
|
2376
|
-
},
|
2377
|
-
"links": [
|
2378
|
-
{
|
2379
|
-
"title": "List",
|
2380
|
-
"description": "List customers",
|
2381
|
-
"href": "/customers",
|
2382
|
-
"method": "GET",
|
2383
|
-
"rel": "instances",
|
2384
|
-
"response_example": "customers#index",
|
2385
|
-
"targetSchema": {
|
2386
|
-
"$ref": "#/definitions/list/"
|
2387
|
-
},
|
2388
|
-
"schema": {
|
2389
|
-
"$ref": "#/definitions/list_filter/"
|
2390
|
-
}
|
2391
|
-
},
|
2392
|
-
{
|
2393
|
-
"title": "Show",
|
2394
|
-
"description": "Show a customer",
|
2395
|
-
"href": "/customers/{(%2Fdefinitions%2Fcustomers%2Fdefinitions%2Fid)}",
|
2396
|
-
"method": "GET",
|
2397
|
-
"rel": "self",
|
2398
|
-
"response_example": "customers#show",
|
2399
|
-
"targetSchema": {
|
2400
|
-
"$ref": "#/definitions/customers/"
|
2401
|
-
}
|
2402
|
-
},
|
2403
|
-
{
|
2404
|
-
"title": "Create",
|
2405
|
-
"description": "Create a customer",
|
2406
|
-
"href": "/customers",
|
2407
|
-
"method": "POST",
|
2408
|
-
"rel": "create",
|
2409
|
-
"response_example": "customers#create",
|
2410
|
-
"targetSchema": {
|
2411
|
-
"$ref": "#/definitions/customers/"
|
2412
|
-
},
|
2413
|
-
"schema": {
|
2414
|
-
"type": [
|
2415
|
-
"object"
|
2416
|
-
],
|
2417
|
-
"properties": {
|
2418
|
-
"payment_details": {
|
2419
|
-
"$ref": "#/definitions/payments/definitions/payment_details_request"
|
2420
|
-
},
|
2421
|
-
"email": {
|
2422
|
-
"$ref": "#/definitions/customers/definitions/email"
|
2423
|
-
},
|
2424
|
-
"metadata": {
|
2425
|
-
"$ref": "#/definitions/customers/definitions/metadata"
|
2426
|
-
}
|
2427
|
-
},
|
2428
|
-
"additionalFields": false
|
2429
|
-
}
|
2430
|
-
},
|
2431
|
-
{
|
2432
|
-
"title": "Update",
|
2433
|
-
"description": "Update customers",
|
2434
|
-
"href": "/customers/{(%2Fdefinitions%2Fcustomers%2Fdefinitions%2Fid)}",
|
2435
|
-
"method": "PATCH",
|
2436
|
-
"rel": "self",
|
2437
|
-
"response_example": "customers#update",
|
2438
|
-
"schema": {
|
2439
|
-
"type": [
|
2440
|
-
"object"
|
2441
|
-
],
|
2442
|
-
"properties": {
|
2443
|
-
"payment_details": {
|
2444
|
-
"$ref": "#/definitions/payments/definitions/payment_details_request"
|
2445
|
-
},
|
2446
|
-
"email": {
|
2447
|
-
"$ref": "#/definitions/customers/definitions/email"
|
2448
|
-
},
|
2449
|
-
"metadata": {
|
2450
|
-
"$ref": "#/definitions/customers/definitions/metadata"
|
2451
|
-
}
|
2452
|
-
},
|
2453
|
-
"additionalFields": false
|
2454
|
-
},
|
2455
|
-
"targetSchema": {
|
2456
|
-
"$ref": "#/definitions/customers/"
|
2457
|
-
}
|
2458
|
-
},
|
2459
|
-
{
|
2460
|
-
"title": "Destroy",
|
2461
|
-
"description": "Destroy a customer",
|
2462
|
-
"href": "/customers/{(%2Fdefinitions%2Fcustomers%2Fdefinitions%2Fid)}",
|
2463
|
-
"method": "DELETE",
|
2464
|
-
"rel": "destroy",
|
2465
|
-
"response_example": "customers#destroy",
|
2466
|
-
"targetSchema": {
|
2467
|
-
"$ref": "#/definitions/customers/"
|
2468
|
-
}
|
2469
|
-
}
|
2470
|
-
],
|
2471
|
-
"properties": {
|
2472
|
-
"id": {
|
2473
|
-
"$ref": "#/definitions/customers/definitions/id"
|
2474
|
-
},
|
2475
|
-
"resource": {
|
2476
|
-
"$ref": "#/definitions/customers/definitions/resource"
|
2477
|
-
},
|
2478
|
-
"email": {
|
2479
|
-
"$ref": "#/definitions/customers/definitions/email"
|
2480
|
-
},
|
2481
|
-
"metadata": {
|
2482
|
-
"$ref": "#/definitions/customers/definitions/metadata"
|
2483
|
-
},
|
2484
|
-
"created_at": {
|
2485
|
-
"$ref": "#/definitions/customers/definitions/created_at"
|
2486
|
-
}
|
2487
|
-
},
|
2488
|
-
"description": "Customers",
|
2489
|
-
"title": "Customers"
|
2490
|
-
},
|
2491
|
-
"invoices": {
|
2492
|
-
"$schema": "http://json-schema.org/draft-04/hyper-schema",
|
2493
|
-
"type": [
|
2494
|
-
"object"
|
2495
|
-
],
|
2496
|
-
"definitions": {
|
2497
|
-
"id": {
|
2498
|
-
"readOnly": true,
|
2499
|
-
"type": [
|
2500
|
-
"string"
|
2501
|
-
],
|
2502
|
-
"description": "A unique identifier for the invoice."
|
2503
|
-
},
|
2504
|
-
"resource": {
|
2505
|
-
"example": "invoice",
|
2506
|
-
"readOnly": true,
|
2507
|
-
"enum": [
|
2508
|
-
"invoice"
|
2509
|
-
],
|
2510
|
-
"description": "Name of resource."
|
2511
|
-
},
|
2512
|
-
"invoice": {
|
2513
|
-
"readOnly": true,
|
2514
|
-
"type": [
|
2515
|
-
"string",
|
2516
|
-
"null"
|
2517
|
-
]
|
2518
|
-
},
|
2519
|
-
"renewal": {
|
2520
|
-
"type": [
|
2521
|
-
"boolean"
|
2522
|
-
],
|
2523
|
-
"default": true,
|
2524
|
-
"description": "Include the upcoming renewal charge (default: true)"
|
2525
|
-
},
|
2526
|
-
"paid": {
|
2527
|
-
"readOnly": true,
|
2528
|
-
"type": [
|
2529
|
-
"boolean"
|
2530
|
-
]
|
2531
|
-
},
|
2532
|
-
"created_at": {
|
2533
|
-
"readOnly": true,
|
2534
|
-
"format": "date-time",
|
2535
|
-
"type": [
|
2536
|
-
"string",
|
2537
|
-
"null"
|
2538
|
-
],
|
2539
|
-
"description": "An ISO 8601 formatted timestamp of when the invoice was created."
|
2540
|
-
}
|
2541
|
-
},
|
2542
|
-
"links": [
|
2543
|
-
{
|
2544
|
-
"title": "List",
|
2545
|
-
"description": "List invoices",
|
2546
|
-
"href": "/invoices",
|
2547
|
-
"method": "GET",
|
2548
|
-
"rel": "instances",
|
2549
|
-
"response_example": "invoices#index",
|
2550
|
-
"targetSchema": {
|
2551
|
-
"$ref": "#/definitions/list/"
|
2552
|
-
},
|
2553
|
-
"schema": {
|
2554
|
-
"$ref": "#/definitions/list_filter/"
|
2555
|
-
}
|
2556
|
-
},
|
2557
|
-
{
|
2558
|
-
"title": "Show",
|
2559
|
-
"description": "Show an invoice",
|
2560
|
-
"href": "/invoices/{(%2Fdefinitions%2Finvoices%2Fdefinitions%2Fid)}",
|
2561
|
-
"method": "GET",
|
2562
|
-
"rel": "self",
|
2563
|
-
"response_example": "invoices#show",
|
2564
|
-
"targetSchema": {
|
2565
|
-
"$ref": "#/definitions/invoices/"
|
2566
|
-
}
|
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
|
-
},
|
2579
|
-
{
|
2580
|
-
"title": "Create",
|
2581
|
-
"description": "Create an invoice",
|
2582
|
-
"href": "/invoices",
|
2583
|
-
"method": "POST",
|
2584
|
-
"rel": "create",
|
2585
|
-
"response_example": "invoices#create",
|
2586
|
-
"targetSchema": {
|
2587
|
-
"$ref": "#/definitions/invoices/"
|
2588
|
-
},
|
2589
|
-
"schema": {
|
2590
|
-
"type": [
|
2591
|
-
"object"
|
2592
|
-
],
|
2593
|
-
"properties": {
|
2594
|
-
"subscription": {
|
2595
|
-
"$ref": "#/definitions/subscriptions/definitions/id"
|
2596
|
-
},
|
2597
|
-
"metadata": {
|
2598
|
-
"$ref": "#/definitions/subscriptions/definitions/metadata"
|
2599
|
-
}
|
2600
|
-
},
|
2601
|
-
"required": [
|
2602
|
-
"subscription"
|
2603
|
-
]
|
2604
|
-
}
|
2605
|
-
},
|
2606
|
-
{
|
2607
|
-
"title": "Preview",
|
2608
|
-
"description": "Preview an upcoming invoice",
|
2609
|
-
"href": "/invoices/preview",
|
2610
|
-
"method": "GET",
|
2611
|
-
"rel": "self",
|
2612
|
-
"response_example": "invoices#preview",
|
2613
|
-
"targetSchema": {
|
2614
|
-
"$ref": "#/definitions/invoices/"
|
2615
|
-
},
|
2616
|
-
"schema": {
|
2617
|
-
"type": [
|
2618
|
-
"object"
|
2619
|
-
],
|
2620
|
-
"properties": {
|
2621
|
-
"subscription": {
|
2622
|
-
"$ref": "#/definitions/subscriptions/definitions/id"
|
2623
|
-
},
|
2624
|
-
"renewal": {
|
2625
|
-
"$ref": "#/definitions/invoices/definitions/renewal"
|
2626
|
-
}
|
2627
|
-
},
|
2628
|
-
"required": [
|
2629
|
-
"subscription"
|
2630
|
-
]
|
2631
|
-
}
|
2632
|
-
},
|
2633
|
-
{
|
2634
|
-
"title": "Pay",
|
2635
|
-
"description": "Pay an invoice",
|
2636
|
-
"href": "/invoices/{(%2Fdefinitions%2Finvoices%2Fdefinitions%2Fid)}/pay",
|
2637
|
-
"method": "POST",
|
2638
|
-
"rel": "self",
|
2639
|
-
"response_example": "invoices#pay",
|
2640
|
-
"targetSchema": {
|
2641
|
-
"$ref": "#/definitions/invoices/"
|
2642
|
-
},
|
2643
|
-
"schema": {
|
2644
|
-
"type": [
|
2645
|
-
"object"
|
2646
|
-
],
|
2647
|
-
"properties": {
|
2648
|
-
"payment_details": {
|
2649
|
-
"$ref": "#/definitions/payments/definitions/payment_details_request"
|
2650
|
-
},
|
2651
|
-
"fraud_details": {
|
2652
|
-
"$ref": "#/definitions/payments/definitions/fraud_details"
|
2653
|
-
}
|
2654
|
-
},
|
2655
|
-
"required": [
|
2656
|
-
"payment_details"
|
2657
|
-
]
|
2120
|
+
"description": "Cancel a payment",
|
2121
|
+
"href": "/payments/{(%2Fdefinitions%2Fpayments%2Fdefinitions%2Fid)}/cancel",
|
2122
|
+
"method": "POST",
|
2123
|
+
"rel": "self",
|
2124
|
+
"response_example": "payments#cancel",
|
2125
|
+
"targetSchema": {
|
2126
|
+
"$ref": "#/definitions/payments/"
|
2658
2127
|
}
|
2659
2128
|
}
|
2660
2129
|
],
|
@@ -2663,19 +2132,31 @@ module Komoju
|
|
2663
2132
|
"$ref": "#/definitions/payments/definitions/id"
|
2664
2133
|
},
|
2665
2134
|
"resource": {
|
2666
|
-
"$ref": "#/definitions/
|
2135
|
+
"$ref": "#/definitions/payments/definitions/resource"
|
2667
2136
|
},
|
2668
|
-
"
|
2669
|
-
"$ref": "#/definitions/
|
2137
|
+
"status": {
|
2138
|
+
"$ref": "#/definitions/payments/definitions/status"
|
2139
|
+
},
|
2140
|
+
"amount": {
|
2141
|
+
"$ref": "#/definitions/payments/definitions/amount"
|
2142
|
+
},
|
2143
|
+
"return_url": {
|
2144
|
+
"$ref": "#/definitions/payments/definitions/return_url"
|
2145
|
+
},
|
2146
|
+
"cancel_url": {
|
2147
|
+
"$ref": "#/definitions/payments/definitions/cancel_url"
|
2670
2148
|
},
|
2671
|
-
"
|
2672
|
-
"$ref": "#/definitions/
|
2149
|
+
"tax": {
|
2150
|
+
"$ref": "#/definitions/payments/definitions/tax"
|
2151
|
+
},
|
2152
|
+
"payment_deadline": {
|
2153
|
+
"$ref": "#/definitions/payments/definitions/payment_deadline"
|
2673
2154
|
},
|
2674
|
-
"
|
2675
|
-
"$ref": "#/definitions/
|
2155
|
+
"payment_details": {
|
2156
|
+
"$ref": "#/definitions/payments/definitions/payment_details_response"
|
2676
2157
|
},
|
2677
|
-
"
|
2678
|
-
"$ref": "#/definitions/
|
2158
|
+
"payment_method_fee": {
|
2159
|
+
"$ref": "#/definitions/payments/definitions/payment_method_fee"
|
2679
2160
|
},
|
2680
2161
|
"total": {
|
2681
2162
|
"$ref": "#/definitions/payments/definitions/total"
|
@@ -2683,251 +2164,185 @@ module Komoju
|
|
2683
2164
|
"currency": {
|
2684
2165
|
"$ref": "#/definitions/payments/definitions/currency"
|
2685
2166
|
},
|
2167
|
+
"description": {
|
2168
|
+
"$ref": "#/definitions/payments/definitions/description"
|
2169
|
+
},
|
2170
|
+
"subscription": {
|
2171
|
+
"$ref": "#/definitions/payments/definitions/subscription"
|
2172
|
+
},
|
2173
|
+
"captured_at": {
|
2174
|
+
"$ref": "#/definitions/payments/definitions/captured_at"
|
2175
|
+
},
|
2176
|
+
"metadata": {
|
2177
|
+
"$ref": "#/definitions/payments/definitions/metadata"
|
2178
|
+
},
|
2686
2179
|
"created_at": {
|
2687
|
-
"$ref": "#/definitions/
|
2180
|
+
"$ref": "#/definitions/payments/definitions/created_at"
|
2181
|
+
},
|
2182
|
+
"refunds": {
|
2183
|
+
"type": [
|
2184
|
+
"array"
|
2185
|
+
]
|
2688
2186
|
}
|
2689
2187
|
},
|
2690
|
-
"description": "
|
2691
|
-
"title": "
|
2188
|
+
"description": "Payment resource",
|
2189
|
+
"title": "Payments"
|
2692
2190
|
},
|
2693
|
-
"
|
2191
|
+
"subscriptions": {
|
2694
2192
|
"$schema": "http://json-schema.org/draft-04/hyper-schema",
|
2695
2193
|
"type": [
|
2696
2194
|
"object"
|
2697
2195
|
],
|
2698
2196
|
"definitions": {
|
2699
2197
|
"id": {
|
2198
|
+
"example": "fa888fca14be29d3fae455f22d",
|
2700
2199
|
"readOnly": true,
|
2701
2200
|
"type": [
|
2702
2201
|
"string"
|
2703
2202
|
],
|
2704
|
-
"description": "A unique identifier for
|
2203
|
+
"description": "A unique identifier for a subscription."
|
2705
2204
|
},
|
2706
|
-
"
|
2707
|
-
"example": "
|
2708
|
-
"readOnly": true,
|
2205
|
+
"period": {
|
2206
|
+
"example": "JPY",
|
2709
2207
|
"enum": [
|
2710
|
-
"
|
2208
|
+
"weekly",
|
2209
|
+
"monthly",
|
2210
|
+
"yearly"
|
2711
2211
|
],
|
2712
|
-
"description": "
|
2713
|
-
},
|
2714
|
-
"type": {
|
2715
|
-
"example": "invoice_item",
|
2716
|
-
"readOnly": true,
|
2717
|
-
"enum": [
|
2718
|
-
"invoice_item",
|
2719
|
-
"plan"
|
2720
|
-
]
|
2721
|
-
},
|
2722
|
-
"plan": {
|
2723
|
-
"oneOf": [
|
2724
|
-
{
|
2725
|
-
"$ref": "#/definitions/plans/"
|
2726
|
-
},
|
2727
|
-
{
|
2728
|
-
"type": [
|
2729
|
-
"null"
|
2730
|
-
]
|
2731
|
-
}
|
2732
|
-
]
|
2733
|
-
},
|
2734
|
-
"invoice": {
|
2735
|
-
"readOnly": true,
|
2736
|
-
"type": [
|
2737
|
-
"string",
|
2738
|
-
"null"
|
2739
|
-
]
|
2212
|
+
"description": "Interval for subscription payments: 'weekly', 'monthly', or 'yearly'"
|
2740
2213
|
}
|
2741
2214
|
},
|
2742
2215
|
"links": [
|
2743
2216
|
{
|
2744
2217
|
"title": "List",
|
2745
|
-
"description": "List
|
2746
|
-
"href": "/
|
2218
|
+
"description": "List subscriptions",
|
2219
|
+
"href": "/subscriptions",
|
2747
2220
|
"method": "GET",
|
2748
2221
|
"rel": "instances",
|
2749
|
-
"response_example": "
|
2750
|
-
"schema": {
|
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/"
|
2764
|
-
}
|
2765
|
-
]
|
2766
|
-
},
|
2222
|
+
"response_example": "subscriptions#index",
|
2767
2223
|
"targetSchema": {
|
2768
2224
|
"$ref": "#/definitions/list/"
|
2225
|
+
},
|
2226
|
+
"schema": {
|
2227
|
+
"$ref": "#/definitions/list_filter/"
|
2769
2228
|
}
|
2770
2229
|
},
|
2771
2230
|
{
|
2772
2231
|
"title": "Show",
|
2773
|
-
"description": "Show
|
2774
|
-
"href": "/
|
2232
|
+
"description": "Show a subscription",
|
2233
|
+
"href": "/subscriptions/{(%2Fdefinitions%2Fsubscriptions%2Fdefinitions%2Fid)}",
|
2775
2234
|
"method": "GET",
|
2776
2235
|
"rel": "self",
|
2777
|
-
"response_example": "
|
2236
|
+
"response_example": "subscriptions#show",
|
2778
2237
|
"targetSchema": {
|
2779
|
-
"$ref": "#/definitions/
|
2238
|
+
"$ref": "#/definitions/subscriptions/"
|
2780
2239
|
}
|
2781
2240
|
},
|
2782
2241
|
{
|
2783
2242
|
"title": "Create",
|
2784
|
-
"description": "Create
|
2785
|
-
"href": "/
|
2243
|
+
"description": "Create a subscription",
|
2244
|
+
"href": "/subscriptions",
|
2786
2245
|
"method": "POST",
|
2787
2246
|
"rel": "create",
|
2788
|
-
"response_example": "
|
2247
|
+
"response_example": "subscriptions#create",
|
2789
2248
|
"targetSchema": {
|
2790
|
-
"$ref": "#/definitions/
|
2249
|
+
"$ref": "#/definitions/subscriptions/"
|
2791
2250
|
},
|
2792
2251
|
"schema": {
|
2793
2252
|
"type": [
|
2794
2253
|
"object"
|
2795
2254
|
],
|
2796
2255
|
"properties": {
|
2256
|
+
"customer": {
|
2257
|
+
"$ref": "#/definitions/payments/definitions/customer"
|
2258
|
+
},
|
2797
2259
|
"amount": {
|
2798
|
-
"$ref": "#/definitions/
|
2260
|
+
"$ref": "#/definitions/payments/definitions/amount"
|
2261
|
+
},
|
2262
|
+
"currency": {
|
2263
|
+
"$ref": "#/definitions/payments/definitions/currency"
|
2799
2264
|
},
|
2800
|
-
"
|
2801
|
-
"$ref": "#/definitions/
|
2265
|
+
"period": {
|
2266
|
+
"$ref": "#/definitions/subscriptions/definitions/period"
|
2802
2267
|
},
|
2803
2268
|
"metadata": {
|
2804
|
-
"$ref": "#/definitions/
|
2269
|
+
"$ref": "#/definitions/payments/definitions/metadata"
|
2805
2270
|
}
|
2806
2271
|
},
|
2807
2272
|
"required": [
|
2273
|
+
"customer",
|
2808
2274
|
"amount",
|
2809
|
-
"
|
2810
|
-
|
2275
|
+
"currency",
|
2276
|
+
"period"
|
2277
|
+
],
|
2278
|
+
"additionalFields": false
|
2811
2279
|
}
|
2812
2280
|
},
|
2813
2281
|
{
|
2814
2282
|
"title": "Destroy",
|
2815
|
-
"description": "
|
2816
|
-
"href": "/
|
2283
|
+
"description": "Destroy a subscription",
|
2284
|
+
"href": "/subscriptions/{(%2Fdefinitions%2Fsubscriptions%2Fdefinitions%2Fid)}",
|
2817
2285
|
"method": "DELETE",
|
2818
2286
|
"rel": "destroy",
|
2819
|
-
"response_example": "
|
2287
|
+
"response_example": "subscriptions#destroy",
|
2820
2288
|
"targetSchema": {
|
2821
|
-
"$ref": "#/definitions/
|
2289
|
+
"$ref": "#/definitions/subscriptions/"
|
2822
2290
|
}
|
2823
2291
|
}
|
2824
2292
|
],
|
2825
2293
|
"properties": {
|
2826
|
-
"
|
2827
|
-
"$ref": "#/definitions/payments/definitions/
|
2828
|
-
},
|
2829
|
-
"resource": {
|
2830
|
-
"$ref": "#/definitions/invoice_items/definitions/resource"
|
2831
|
-
},
|
2832
|
-
"type": {
|
2833
|
-
"$ref": "#/definitions/invoice_items/definitions/type"
|
2294
|
+
"customer": {
|
2295
|
+
"$ref": "#/definitions/payments/definitions/customer"
|
2834
2296
|
},
|
2835
2297
|
"amount": {
|
2836
2298
|
"$ref": "#/definitions/payments/definitions/amount"
|
2837
2299
|
},
|
2838
|
-
"
|
2839
|
-
"$ref": "#/definitions/
|
2840
|
-
},
|
2841
|
-
"plan": {
|
2842
|
-
"$ref": "#/definitions/invoice_items/definitions/plan"
|
2843
|
-
},
|
2844
|
-
"subscription": {
|
2845
|
-
"$ref": "#/definitions/subscriptions/definitions/id"
|
2300
|
+
"currency": {
|
2301
|
+
"$ref": "#/definitions/payments/definitions/currency"
|
2846
2302
|
},
|
2847
|
-
"
|
2848
|
-
"$ref": "#/definitions/
|
2303
|
+
"period": {
|
2304
|
+
"$ref": "#/definitions/subscriptions/definitions/period"
|
2849
2305
|
}
|
2850
2306
|
},
|
2851
|
-
"
|
2852
|
-
|
2853
|
-
"resource",
|
2854
|
-
"type",
|
2855
|
-
"amount",
|
2856
|
-
"customer",
|
2857
|
-
"currency",
|
2858
|
-
"subscription",
|
2859
|
-
"invoice",
|
2860
|
-
"metadata",
|
2861
|
-
"plan"
|
2862
|
-
],
|
2863
|
-
"description": "Subscription Invoice Items",
|
2864
|
-
"title": "Invoice Items"
|
2307
|
+
"description": "Subscription Resource",
|
2308
|
+
"title": "Subscriptions"
|
2865
2309
|
},
|
2866
|
-
"
|
2310
|
+
"customers": {
|
2867
2311
|
"$schema": "http://json-schema.org/draft-04/hyper-schema",
|
2868
2312
|
"type": [
|
2869
2313
|
"object"
|
2870
2314
|
],
|
2871
2315
|
"definitions": {
|
2872
|
-
"
|
2873
|
-
"example": "
|
2316
|
+
"id": {
|
2317
|
+
"example": "fa799fca14be29d3fae455f22d",
|
2318
|
+
"readOnly": true,
|
2874
2319
|
"type": [
|
2875
2320
|
"string"
|
2876
2321
|
],
|
2877
|
-
"description": "
|
2322
|
+
"description": "A unique identifier for the customer."
|
2878
2323
|
},
|
2879
2324
|
"resource": {
|
2880
|
-
"example": "
|
2325
|
+
"example": "customer",
|
2326
|
+
"readOnly": true,
|
2881
2327
|
"enum": [
|
2882
|
-
"
|
2328
|
+
"customer"
|
2883
2329
|
],
|
2884
2330
|
"description": "Name of resource"
|
2885
2331
|
},
|
2886
|
-
"
|
2887
|
-
"
|
2888
|
-
"enum": [
|
2889
|
-
"day",
|
2890
|
-
"week",
|
2891
|
-
"month",
|
2892
|
-
"year"
|
2893
|
-
],
|
2894
|
-
"description": "The billing frequency of a subscription."
|
2895
|
-
},
|
2896
|
-
"interval_count": {
|
2897
|
-
"example": "1",
|
2898
|
-
"type": [
|
2899
|
-
"integer"
|
2900
|
-
],
|
2901
|
-
"minimum": 1,
|
2902
|
-
"description": "The number of intervals before the end of each billing period. For example, `interval=month` and `interval_count=3` would bill every 3 months."
|
2903
|
-
},
|
2904
|
-
"amount": {
|
2905
|
-
"$ref": "#/definitions/payments/definitions/amount"
|
2906
|
-
},
|
2907
|
-
"tax_percent": {
|
2908
|
-
"type": [
|
2909
|
-
"integer",
|
2910
|
-
"null"
|
2911
|
-
]
|
2912
|
-
},
|
2913
|
-
"currency": {
|
2914
|
-
"$ref": "#/definitions/payments/definitions/currency"
|
2332
|
+
"payment_details": {
|
2333
|
+
"$ref": "#/definitions/payments/definitions/payment_details_response"
|
2915
2334
|
},
|
2916
2335
|
"metadata": {
|
2917
2336
|
"$ref": "#/definitions/payments/definitions/metadata"
|
2918
2337
|
},
|
2919
|
-
"
|
2920
|
-
"example": 1,
|
2921
|
-
"type": [
|
2922
|
-
"integer"
|
2923
|
-
],
|
2924
|
-
"minimum": 0
|
2925
|
-
},
|
2926
|
-
"trial_period_days": {
|
2338
|
+
"email": {
|
2927
2339
|
"type": [
|
2928
|
-
"
|
2340
|
+
"string",
|
2341
|
+
"null"
|
2929
2342
|
],
|
2930
|
-
"
|
2343
|
+
"format": "email",
|
2344
|
+
"maxLength": 255,
|
2345
|
+
"description": "Customer's email address."
|
2931
2346
|
},
|
2932
2347
|
"created_at": {
|
2933
2348
|
"example": "2015-03-06T06:52:35Z",
|
@@ -2936,17 +2351,17 @@ module Komoju
|
|
2936
2351
|
"type": [
|
2937
2352
|
"string"
|
2938
2353
|
],
|
2939
|
-
"description": "An ISO 8601 formatted timestamp of when the
|
2354
|
+
"description": "An ISO 8601 formatted timestamp of when the customer was created."
|
2940
2355
|
}
|
2941
2356
|
},
|
2942
2357
|
"links": [
|
2943
2358
|
{
|
2944
2359
|
"title": "List",
|
2945
|
-
"description": "List
|
2946
|
-
"href": "/
|
2360
|
+
"description": "List customers",
|
2361
|
+
"href": "/customers",
|
2947
2362
|
"method": "GET",
|
2948
2363
|
"rel": "instances",
|
2949
|
-
"response_example": "
|
2364
|
+
"response_example": "customers#index",
|
2950
2365
|
"targetSchema": {
|
2951
2366
|
"$ref": "#/definitions/list/"
|
2952
2367
|
},
|
@@ -2956,112 +2371,111 @@ module Komoju
|
|
2956
2371
|
},
|
2957
2372
|
{
|
2958
2373
|
"title": "Show",
|
2959
|
-
"description": "Show a
|
2960
|
-
"href": "/
|
2374
|
+
"description": "Show a customer",
|
2375
|
+
"href": "/customers/{(%2Fdefinitions%2Fcustomers%2Fdefinitions%2Fid)}",
|
2961
2376
|
"method": "GET",
|
2962
2377
|
"rel": "self",
|
2963
|
-
"response_example": "
|
2378
|
+
"response_example": "customers#show",
|
2964
2379
|
"targetSchema": {
|
2965
|
-
"$ref": "#/definitions/
|
2380
|
+
"$ref": "#/definitions/customers/"
|
2966
2381
|
}
|
2967
2382
|
},
|
2968
2383
|
{
|
2969
2384
|
"title": "Create",
|
2970
|
-
"description": "Create a
|
2971
|
-
"href": "/
|
2385
|
+
"description": "Create a customer",
|
2386
|
+
"href": "/customers",
|
2972
2387
|
"method": "POST",
|
2973
2388
|
"rel": "create",
|
2974
|
-
"response_example": "
|
2389
|
+
"response_example": "customers#create",
|
2975
2390
|
"targetSchema": {
|
2976
|
-
"$ref": "#/definitions/
|
2391
|
+
"$ref": "#/definitions/customers/"
|
2977
2392
|
},
|
2978
2393
|
"schema": {
|
2979
2394
|
"type": [
|
2980
2395
|
"object"
|
2981
2396
|
],
|
2982
2397
|
"properties": {
|
2983
|
-
"
|
2984
|
-
"$ref": "#/definitions/
|
2985
|
-
},
|
2986
|
-
"interval": {
|
2987
|
-
"$ref": "#/definitions/plans/definitions/interval"
|
2988
|
-
},
|
2989
|
-
"interval_count": {
|
2990
|
-
"$ref": "#/definitions/plans/definitions/interval_count"
|
2398
|
+
"currency": {
|
2399
|
+
"$ref": "#/definitions/payments/definitions/currency"
|
2991
2400
|
},
|
2992
|
-
"
|
2993
|
-
"$ref": "#/definitions/
|
2401
|
+
"payment_details": {
|
2402
|
+
"$ref": "#/definitions/payments/definitions/payment_details_request"
|
2994
2403
|
},
|
2995
|
-
"
|
2996
|
-
"$ref": "#/definitions/
|
2404
|
+
"email": {
|
2405
|
+
"$ref": "#/definitions/customers/definitions/email"
|
2997
2406
|
},
|
2407
|
+
"metadata": {
|
2408
|
+
"$ref": "#/definitions/customers/definitions/metadata"
|
2409
|
+
}
|
2410
|
+
},
|
2411
|
+
"required": [
|
2412
|
+
"payment_details"
|
2413
|
+
],
|
2414
|
+
"additionalFields": false
|
2415
|
+
}
|
2416
|
+
},
|
2417
|
+
{
|
2418
|
+
"title": "Update",
|
2419
|
+
"description": "Update customers",
|
2420
|
+
"href": "/customers/{(%2Fdefinitions%2Fcustomers%2Fdefinitions%2Fid)}",
|
2421
|
+
"method": "PATCH",
|
2422
|
+
"rel": "self",
|
2423
|
+
"response_example": "customers#update",
|
2424
|
+
"schema": {
|
2425
|
+
"type": [
|
2426
|
+
"object"
|
2427
|
+
],
|
2428
|
+
"properties": {
|
2998
2429
|
"currency": {
|
2999
|
-
"$ref": "#/definitions/
|
2430
|
+
"$ref": "#/definitions/payments/definitions/currency"
|
3000
2431
|
},
|
3001
|
-
"
|
3002
|
-
"$ref": "#/definitions/
|
2432
|
+
"payment_details": {
|
2433
|
+
"$ref": "#/definitions/payments/definitions/payment_details_request"
|
3003
2434
|
},
|
3004
|
-
"
|
3005
|
-
"$ref": "#/definitions/
|
2435
|
+
"email": {
|
2436
|
+
"$ref": "#/definitions/customers/definitions/email"
|
3006
2437
|
},
|
3007
2438
|
"metadata": {
|
3008
|
-
"$ref": "#/definitions/
|
2439
|
+
"$ref": "#/definitions/customers/definitions/metadata"
|
3009
2440
|
}
|
3010
2441
|
},
|
3011
|
-
"
|
3012
|
-
|
3013
|
-
|
3014
|
-
|
3015
|
-
"currency"
|
3016
|
-
]
|
2442
|
+
"additionalFields": false
|
2443
|
+
},
|
2444
|
+
"targetSchema": {
|
2445
|
+
"$ref": "#/definitions/customers/"
|
3017
2446
|
}
|
3018
2447
|
},
|
3019
2448
|
{
|
3020
2449
|
"title": "Destroy",
|
3021
|
-
"description": "Destroy a
|
3022
|
-
"href": "/
|
2450
|
+
"description": "Destroy a customer",
|
2451
|
+
"href": "/customers/{(%2Fdefinitions%2Fcustomers%2Fdefinitions%2Fid)}",
|
3023
2452
|
"method": "DELETE",
|
3024
2453
|
"rel": "destroy",
|
3025
|
-
"response_example": "
|
2454
|
+
"response_example": "customers#destroy",
|
3026
2455
|
"targetSchema": {
|
3027
|
-
"$ref": "#/definitions/
|
2456
|
+
"$ref": "#/definitions/customers/"
|
3028
2457
|
}
|
3029
2458
|
}
|
3030
2459
|
],
|
3031
2460
|
"properties": {
|
3032
|
-
"
|
3033
|
-
"$ref": "#/definitions/
|
3034
|
-
},
|
3035
|
-
"name": {
|
3036
|
-
"$ref": "#/definitions/plans/definitions/name"
|
3037
|
-
},
|
3038
|
-
"interval": {
|
3039
|
-
"$ref": "#/definitions/plans/definitions/interval"
|
3040
|
-
},
|
3041
|
-
"interval_count": {
|
3042
|
-
"$ref": "#/definitions/plans/definitions/interval_count"
|
3043
|
-
},
|
3044
|
-
"currency": {
|
3045
|
-
"$ref": "#/definitions/plans/definitions/currency"
|
3046
|
-
},
|
3047
|
-
"amount": {
|
3048
|
-
"$ref": "#/definitions/plans/definitions/amount"
|
2461
|
+
"id": {
|
2462
|
+
"$ref": "#/definitions/customers/definitions/id"
|
3049
2463
|
},
|
3050
|
-
"
|
3051
|
-
"$ref": "#/definitions/
|
2464
|
+
"resource": {
|
2465
|
+
"$ref": "#/definitions/customers/definitions/resource"
|
3052
2466
|
},
|
3053
|
-
"
|
3054
|
-
"$ref": "#/definitions/
|
2467
|
+
"email": {
|
2468
|
+
"$ref": "#/definitions/customers/definitions/email"
|
3055
2469
|
},
|
3056
2470
|
"metadata": {
|
3057
|
-
"$ref": "#/definitions/
|
2471
|
+
"$ref": "#/definitions/customers/definitions/metadata"
|
3058
2472
|
},
|
3059
2473
|
"created_at": {
|
3060
|
-
"$ref": "#/definitions/
|
2474
|
+
"$ref": "#/definitions/customers/definitions/created_at"
|
3061
2475
|
}
|
3062
2476
|
},
|
3063
|
-
"description": "
|
3064
|
-
"title": "
|
2477
|
+
"description": "Customers",
|
2478
|
+
"title": "Customers"
|
3065
2479
|
},
|
3066
2480
|
"tokens": {
|
3067
2481
|
"$schema": "http://json-schema.org/draft-04/hyper-schema",
|
@@ -3115,6 +2529,9 @@ module Komoju
|
|
3115
2529
|
"object"
|
3116
2530
|
],
|
3117
2531
|
"properties": {
|
2532
|
+
"currency": {
|
2533
|
+
"$ref": "#/definitions/payments/definitions/currency"
|
2534
|
+
},
|
3118
2535
|
"payment_details": {
|
3119
2536
|
"$ref": "#/definitions/payments/definitions/payment_details_request"
|
3120
2537
|
}
|
@@ -3151,24 +2568,12 @@ module Komoju
|
|
3151
2568
|
"payments": {
|
3152
2569
|
"$ref": "#/definitions/payments"
|
3153
2570
|
},
|
3154
|
-
"payouts": {
|
3155
|
-
"$ref": "#/definitions/payouts"
|
3156
|
-
},
|
3157
2571
|
"subscriptions": {
|
3158
2572
|
"$ref": "#/definitions/subscriptions"
|
3159
2573
|
},
|
3160
2574
|
"customers": {
|
3161
2575
|
"$ref": "#/definitions/customers"
|
3162
2576
|
},
|
3163
|
-
"invoices": {
|
3164
|
-
"$ref": "#/definitions/invoices"
|
3165
|
-
},
|
3166
|
-
"invoice_items": {
|
3167
|
-
"$ref": "#/definitions/invoice_items"
|
3168
|
-
},
|
3169
|
-
"plans": {
|
3170
|
-
"$ref": "#/definitions/plans"
|
3171
|
-
},
|
3172
2577
|
"tokens": {
|
3173
2578
|
"$ref": "#/definitions/tokens"
|
3174
2579
|
}
|