-
Notifications
You must be signed in to change notification settings - Fork 755
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
8f4de7e
commit 1da29e0
Showing
18 changed files
with
1,120 additions
and
28 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
// File generated from our OpenAPI spec | ||
|
||
'use strict'; | ||
|
||
const StripeResource = require('../../StripeResource'); | ||
|
||
module.exports = StripeResource.extend({ | ||
path: 'identity/verification_reports', | ||
|
||
includeBasic: ['retrieve', 'list'], | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
// File generated from our OpenAPI spec | ||
|
||
'use strict'; | ||
|
||
const StripeResource = require('../../StripeResource'); | ||
const stripeMethod = StripeResource.method; | ||
|
||
module.exports = StripeResource.extend({ | ||
path: 'identity/verification_sessions', | ||
|
||
includeBasic: ['create', 'retrieve', 'update', 'list'], | ||
|
||
cancel: stripeMethod({ | ||
method: 'POST', | ||
path: '/{session}/cancel', | ||
}), | ||
|
||
redact: stripeMethod({ | ||
method: 'POST', | ||
path: '/{session}/redact', | ||
}), | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
'use strict'; | ||
|
||
const stripe = require('../../../testUtils').getSpyableStripe(); | ||
const expect = require('chai').expect; | ||
|
||
describe('Identity', () => { | ||
describe('VerificationReport Resource', () => { | ||
describe('retrieve', () => { | ||
it('Sends the correct request', () => { | ||
stripe.identity.verificationReports.retrieve('vr_123'); | ||
expect(stripe.LAST_REQUEST).to.deep.equal({ | ||
method: 'GET', | ||
url: '/v1/identity/verification_reports/vr_123', | ||
data: {}, | ||
headers: {}, | ||
settings: {}, | ||
}); | ||
}); | ||
}); | ||
|
||
describe('list', () => { | ||
it('Sends the correct request', () => { | ||
stripe.identity.verificationReports.list(); | ||
expect(stripe.LAST_REQUEST).to.deep.equal({ | ||
method: 'GET', | ||
url: '/v1/identity/verification_reports', | ||
data: {}, | ||
headers: {}, | ||
settings: {}, | ||
}); | ||
}); | ||
}); | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,96 @@ | ||
'use strict'; | ||
|
||
const stripe = require('../../../testUtils').getSpyableStripe(); | ||
const expect = require('chai').expect; | ||
|
||
describe('Identity', () => { | ||
describe('VerificationSession Resource', () => { | ||
describe('create', () => { | ||
it('Sends the correct request', () => { | ||
stripe.identity.verificationSessions.create({type: 'id_number'}); | ||
expect(stripe.LAST_REQUEST).to.deep.equal({ | ||
method: 'POST', | ||
url: '/v1/identity/verification_sessions', | ||
data: {type: 'id_number'}, | ||
headers: {}, | ||
settings: {}, | ||
}); | ||
}); | ||
}); | ||
|
||
describe('retrieve', () => { | ||
it('Sends the correct request', () => { | ||
stripe.identity.verificationSessions.retrieve('vs_123'); | ||
expect(stripe.LAST_REQUEST).to.deep.equal({ | ||
method: 'GET', | ||
url: '/v1/identity/verification_sessions/vs_123', | ||
data: {}, | ||
headers: {}, | ||
settings: {}, | ||
}); | ||
}); | ||
}); | ||
|
||
describe('list', () => { | ||
it('Sends the correct request', () => { | ||
stripe.identity.verificationSessions.list(); | ||
expect(stripe.LAST_REQUEST).to.deep.equal({ | ||
method: 'GET', | ||
url: '/v1/identity/verification_sessions', | ||
data: {}, | ||
headers: {}, | ||
settings: {}, | ||
}); | ||
}); | ||
}); | ||
|
||
describe('update', () => { | ||
it('Sends the correct request', () => { | ||
stripe.identity.verificationSessions.update('vs_123', { | ||
metadata: { | ||
thing1: true, | ||
thing2: 'yes', | ||
}, | ||
}); | ||
expect(stripe.LAST_REQUEST).to.deep.equal({ | ||
method: 'POST', | ||
url: '/v1/identity/verification_sessions/vs_123', | ||
headers: {}, | ||
data: { | ||
metadata: { | ||
thing1: true, | ||
thing2: 'yes', | ||
}, | ||
}, | ||
settings: {}, | ||
}); | ||
}); | ||
}); | ||
|
||
describe('cancel', () => { | ||
it('Sends the correct request', () => { | ||
stripe.identity.verificationSessions.cancel('vs_123'); | ||
expect(stripe.LAST_REQUEST).to.deep.equal({ | ||
method: 'POST', | ||
url: '/v1/identity/verification_sessions/vs_123/cancel', | ||
headers: {}, | ||
data: {}, | ||
settings: {}, | ||
}); | ||
}); | ||
}); | ||
|
||
describe('redact', () => { | ||
it('Sends the correct request', () => { | ||
stripe.identity.verificationSessions.redact('vs_123'); | ||
expect(stripe.LAST_REQUEST).to.deep.equal({ | ||
method: 'POST', | ||
url: '/v1/identity/verification_sessions/vs_123/redact', | ||
headers: {}, | ||
data: {}, | ||
settings: {}, | ||
}); | ||
}); | ||
}); | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.