Skip to content

Commit

Permalink
chore(tests): update test examples (#221)
Browse files Browse the repository at this point in the history
  • Loading branch information
stainless-bot committed Oct 4, 2023
1 parent 61bf2f9 commit f43b180
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 23 deletions.
4 changes: 2 additions & 2 deletions tests/api-resources/account-holders.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -404,7 +404,7 @@ describe('resource accountHolders', () => {

test('uploadDocument: only required params', async () => {
const responsePromise = lithic.accountHolders.uploadDocument('182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e', {
document_type: 'commercial_license',
document_type: 'drivers_license',
});
const rawResponse = await responsePromise.asResponse();
expect(rawResponse).toBeInstanceOf(Response);
Expand All @@ -417,7 +417,7 @@ describe('resource accountHolders', () => {

test('uploadDocument: required and optional params', async () => {
const response = await lithic.accountHolders.uploadDocument('182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e', {
document_type: 'commercial_license',
document_type: 'drivers_license',
});
});
});
4 changes: 2 additions & 2 deletions tests/api-resources/cards.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,8 @@ describe('resource cards', () => {
phone_number: '+12124007676',
},
shipping_method: 'STANDARD',
spend_limit: 0,
spend_limit_duration: 'ANNUALLY',
spend_limit: 1000,
spend_limit_duration: 'TRANSACTION',
state: 'OPEN',
});
});
Expand Down
8 changes: 4 additions & 4 deletions tests/api-resources/tokenizations.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ describe('resource tokenizations', () => {
test('simulate: only required params', async () => {
const responsePromise = lithic.tokenizations.simulate({
cvv: '776',
expiration_date: 'xxxxx',
expiration_date: '08/29',
pan: '4111111289144142',
tokenization_source: 'APPLE_PAY',
});
Expand All @@ -28,11 +28,11 @@ describe('resource tokenizations', () => {
test('simulate: required and optional params', async () => {
const response = await lithic.tokenizations.simulate({
cvv: '776',
expiration_date: 'xxxxx',
expiration_date: '08/29',
pan: '4111111289144142',
tokenization_source: 'APPLE_PAY',
account_score: 0,
device_score: 0,
account_score: 5,
device_score: 5,
wallet_recommended_decision: 'APPROVED',
});
});
Expand Down
30 changes: 15 additions & 15 deletions tests/api-resources/transactions.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ describe('resource transactions', () => {

test('simulateAuthorization: only required params', async () => {
const responsePromise = lithic.transactions.simulateAuthorization({
amount: 0,
amount: 3831,
descriptor: 'COFFEE SHOP',
pan: '4111111289144142',
});
Expand All @@ -82,7 +82,7 @@ describe('resource transactions', () => {

test('simulateAuthorization: required and optional params', async () => {
const response = await lithic.transactions.simulateAuthorization({
amount: 0,
amount: 3831,
descriptor: 'COFFEE SHOP',
pan: '4111111289144142',
mcc: '5812',
Expand All @@ -96,8 +96,8 @@ describe('resource transactions', () => {

test('simulateAuthorizationAdvice: only required params', async () => {
const responsePromise = lithic.transactions.simulateAuthorizationAdvice({
token: '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',
amount: 0,
token: 'fabd829d-7f7b-4432-a8f2-07ea4889aaac',
amount: 3831,
});
const rawResponse = await responsePromise.asResponse();
expect(rawResponse).toBeInstanceOf(Response);
Expand All @@ -110,8 +110,8 @@ describe('resource transactions', () => {

test('simulateAuthorizationAdvice: required and optional params', async () => {
const response = await lithic.transactions.simulateAuthorizationAdvice({
token: '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',
amount: 0,
token: 'fabd829d-7f7b-4432-a8f2-07ea4889aaac',
amount: 3831,
});
});

Expand All @@ -137,7 +137,7 @@ describe('resource transactions', () => {

test('simulateCreditAuthorization: only required params', async () => {
const responsePromise = lithic.transactions.simulateCreditAuthorization({
amount: 0,
amount: 3831,
descriptor: 'COFFEE SHOP',
pan: '4111111289144142',
});
Expand All @@ -152,7 +152,7 @@ describe('resource transactions', () => {

test('simulateCreditAuthorization: required and optional params', async () => {
const response = await lithic.transactions.simulateCreditAuthorization({
amount: 0,
amount: 3831,
descriptor: 'COFFEE SHOP',
pan: '4111111289144142',
mcc: '5812',
Expand All @@ -162,7 +162,7 @@ describe('resource transactions', () => {

test('simulateReturn: only required params', async () => {
const responsePromise = lithic.transactions.simulateReturn({
amount: 0,
amount: 3831,
descriptor: 'COFFEE SHOP',
pan: '4111111289144142',
});
Expand All @@ -177,15 +177,15 @@ describe('resource transactions', () => {

test('simulateReturn: required and optional params', async () => {
const response = await lithic.transactions.simulateReturn({
amount: 0,
amount: 3831,
descriptor: 'COFFEE SHOP',
pan: '4111111289144142',
});
});

test('simulateReturnReversal: only required params', async () => {
const responsePromise = lithic.transactions.simulateReturnReversal({
token: '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',
token: 'fabd829d-7f7b-4432-a8f2-07ea4889aaac',
});
const rawResponse = await responsePromise.asResponse();
expect(rawResponse).toBeInstanceOf(Response);
Expand All @@ -198,13 +198,13 @@ describe('resource transactions', () => {

test('simulateReturnReversal: required and optional params', async () => {
const response = await lithic.transactions.simulateReturnReversal({
token: '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',
token: 'fabd829d-7f7b-4432-a8f2-07ea4889aaac',
});
});

test('simulateVoid: only required params', async () => {
const responsePromise = lithic.transactions.simulateVoid({
token: '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',
token: 'fabd829d-7f7b-4432-a8f2-07ea4889aaac',
});
const rawResponse = await responsePromise.asResponse();
expect(rawResponse).toBeInstanceOf(Response);
Expand All @@ -217,8 +217,8 @@ describe('resource transactions', () => {

test('simulateVoid: required and optional params', async () => {
const response = await lithic.transactions.simulateVoid({
token: '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',
amount: 0,
token: 'fabd829d-7f7b-4432-a8f2-07ea4889aaac',
amount: 100,
type: 'AUTHORIZATION_EXPIRY',
});
});
Expand Down

0 comments on commit f43b180

Please sign in to comment.