Skip to content

Commit

Permalink
chore(tests): limit array example length (#570)
Browse files Browse the repository at this point in the history
  • Loading branch information
stainless-app[bot] authored Nov 18, 2024
1 parent bcf174e commit f3a3245
Show file tree
Hide file tree
Showing 6 changed files with 15 additions and 155 deletions.
116 changes: 1 addition & 115 deletions tests/api-resources/account-holders.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,30 +24,6 @@ describe('resource accountHolders', () => {
legal_business_name: 'Acme, Inc.',
phone_numbers: ['+12124007676'],
},
{
address: {
address1: '123 Old Forest Way',
city: 'Omaha',
country: 'USA',
postal_code: '68022',
state: 'NE',
},
government_id: '114-123-1513',
legal_business_name: 'Acme, Inc.',
phone_numbers: ['+12124007676'],
},
{
address: {
address1: '123 Old Forest Way',
city: 'Omaha',
country: 'USA',
postal_code: '68022',
state: 'NE',
},
government_id: '114-123-1513',
legal_business_name: 'Acme, Inc.',
phone_numbers: ['+12124007676'],
},
],
beneficial_owner_individuals: [
{
Expand All @@ -64,34 +40,6 @@ describe('resource accountHolders', () => {
government_id: '111-23-1412',
last_name: 'Bombadil',
},
{
address: {
address1: '123 Old Forest Way',
city: 'Omaha',
country: 'USA',
postal_code: '68022',
state: 'NE',
},
dob: '1991-03-08 08:00:00',
email: '[email protected]',
first_name: 'Tom',
government_id: '111-23-1412',
last_name: 'Bombadil',
},
{
address: {
address1: '123 Old Forest Way',
city: 'Omaha',
country: 'USA',
postal_code: '68022',
state: 'NE',
},
dob: '1991-03-08 08:00:00',
email: '[email protected]',
first_name: 'Tom',
government_id: '111-23-1412',
last_name: 'Bombadil',
},
],
business_entity: {
address: {
Expand Down Expand Up @@ -150,36 +98,6 @@ describe('resource accountHolders', () => {
dba_business_name: 'dba_business_name',
parent_company: 'parent_company',
},
{
address: {
address1: '123 Old Forest Way',
city: 'Omaha',
country: 'USA',
postal_code: '68022',
state: 'NE',
address2: 'address2',
},
government_id: '114-123-1513',
legal_business_name: 'Acme, Inc.',
phone_numbers: ['+12124007676'],
dba_business_name: 'dba_business_name',
parent_company: 'parent_company',
},
{
address: {
address1: '123 Old Forest Way',
city: 'Omaha',
country: 'USA',
postal_code: '68022',
state: 'NE',
address2: 'address2',
},
government_id: '114-123-1513',
legal_business_name: 'Acme, Inc.',
phone_numbers: ['+12124007676'],
dba_business_name: 'dba_business_name',
parent_company: 'parent_company',
},
],
beneficial_owner_individuals: [
{
Expand All @@ -198,38 +116,6 @@ describe('resource accountHolders', () => {
last_name: 'Bombadil',
phone_number: '+12124007676',
},
{
address: {
address1: '123 Old Forest Way',
city: 'Omaha',
country: 'USA',
postal_code: '68022',
state: 'NE',
address2: 'address2',
},
dob: '1991-03-08 08:00:00',
email: '[email protected]',
first_name: 'Tom',
government_id: '111-23-1412',
last_name: 'Bombadil',
phone_number: '+12124007676',
},
{
address: {
address1: '123 Old Forest Way',
city: 'Omaha',
country: 'USA',
postal_code: '68022',
state: 'NE',
address2: 'address2',
},
dob: '1991-03-08 08:00:00',
email: '[email protected]',
first_name: 'Tom',
government_id: '111-23-1412',
last_name: 'Bombadil',
phone_number: '+12124007676',
},
],
business_entity: {
address: {
Expand Down Expand Up @@ -457,7 +343,7 @@ describe('resource accountHolders', () => {
const response = await client.accountHolders.simulateEnrollmentDocumentReview({
document_upload_token: 'b11cd67b-0a52-4180-8365-314f3def5426',
status: 'UPLOADED',
accepted_entity_status_reasons: ['string', 'string', 'string'],
accepted_entity_status_reasons: ['string'],
status_reason: 'DOCUMENT_MISSING_REQUIRED_DATA',
});
});
Expand Down
32 changes: 5 additions & 27 deletions tests/api-resources/auth-rules/v2.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,7 @@ const client = new Lithic({
describe('resource v2', () => {
test('create: only required params', async () => {
const responsePromise = client.authRules.v2.create({
account_tokens: [
'182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',
'182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',
'182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',
],
account_tokens: ['182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e'],
});
const rawResponse = await responsePromise.asResponse();
expect(rawResponse).toBeInstanceOf(Response);
Expand All @@ -28,18 +24,8 @@ describe('resource v2', () => {

test('create: required and optional params', async () => {
const response = await client.authRules.v2.create({
account_tokens: [
'182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',
'182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',
'182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',
],
parameters: {
conditions: [
{ attribute: 'MCC', operation: 'IS_ONE_OF', value: 'string' },
{ attribute: 'MCC', operation: 'IS_ONE_OF', value: 'string' },
{ attribute: 'MCC', operation: 'IS_ONE_OF', value: 'string' },
],
},
account_tokens: ['182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e'],
parameters: { conditions: [{ attribute: 'MCC', operation: 'IS_ONE_OF', value: 'string' }] },
type: 'CONDITIONAL_BLOCK',
});
});
Expand Down Expand Up @@ -111,11 +97,7 @@ describe('resource v2', () => {

test('apply: only required params', async () => {
const responsePromise = client.authRules.v2.apply('182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e', {
account_tokens: [
'182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',
'182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',
'182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',
],
account_tokens: ['182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e'],
});
const rawResponse = await responsePromise.asResponse();
expect(rawResponse).toBeInstanceOf(Response);
Expand All @@ -128,11 +110,7 @@ describe('resource v2', () => {

test('apply: required and optional params', async () => {
const response = await client.authRules.v2.apply('182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e', {
account_tokens: [
'182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',
'182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',
'182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',
],
account_tokens: ['182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e'],
});
});

Expand Down
6 changes: 1 addition & 5 deletions tests/api-resources/disputes.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -92,11 +92,7 @@ describe('resource disputes', () => {
page_size: 1,
starting_after: 'starting_after',
status: 'ARBITRATION',
transaction_tokens: [
'182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',
'182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',
'182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',
],
transaction_tokens: ['182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e'],
},
{ path: '/_stainless_unknown_path' },
),
Expand Down
2 changes: 1 addition & 1 deletion tests/api-resources/events/events.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ describe('resource events', () => {
begin: '2019-12-27T18:11:19.117Z',
end: '2019-12-27T18:11:19.117Z',
ending_before: 'ending_before',
event_types: ['account_holder.created', 'account_holder.updated', 'account_holder.verification'],
event_types: ['account_holder.created'],
page_size: 1,
starting_after: 'starting_after',
with_content: true,
Expand Down
4 changes: 2 additions & 2 deletions tests/api-resources/events/subscriptions.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ describe('resource subscriptions', () => {
url: 'https://example.com',
description: 'description',
disabled: true,
event_types: ['account_holder.created', 'account_holder.updated', 'account_holder.verification'],
event_types: ['account_holder.created'],
});
});

Expand Down Expand Up @@ -65,7 +65,7 @@ describe('resource subscriptions', () => {
url: 'https://example.com',
description: 'description',
disabled: true,
event_types: ['account_holder.created', 'account_holder.updated', 'account_holder.verification'],
event_types: ['account_holder.created'],
});
});

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -107,14 +107,14 @@ describe('resource externalBankAccounts', () => {
client.externalBankAccounts.list(
{
account_token: '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',
account_types: ['CHECKING', 'SAVINGS'],
countries: ['string', 'string', 'string'],
account_types: ['CHECKING'],
countries: ['string'],
ending_before: 'ending_before',
owner_types: ['INDIVIDUAL', 'BUSINESS'],
owner_types: ['INDIVIDUAL'],
page_size: 1,
starting_after: 'starting_after',
states: ['ENABLED', 'CLOSED', 'PAUSED'],
verification_states: ['PENDING', 'ENABLED', 'FAILED_VERIFICATION'],
states: ['ENABLED'],
verification_states: ['PENDING'],
},
{ path: '/_stainless_unknown_path' },
),
Expand Down

0 comments on commit f3a3245

Please sign in to comment.