Skip to content

Commit 5e9608e

Browse files
chore: break long lines in snippets into multiline
1 parent a06ac86 commit 5e9608e

File tree

11 files changed

+116
-21
lines changed

11 files changed

+116
-21
lines changed

README.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -232,7 +232,9 @@ const response = await client.cards.create({ type: 'SINGLE_USE' }).asResponse();
232232
console.log(response.headers.get('X-My-Header'));
233233
console.log(response.statusText); // access the underlying Response object
234234

235-
const { data: card, response: raw } = await client.cards.create({ type: 'SINGLE_USE' }).withResponse();
235+
const { data: card, response: raw } = await client.cards
236+
.create({ type: 'SINGLE_USE' })
237+
.withResponse();
236238
console.log(raw.headers.get('X-My-Header'));
237239
console.log(card.token);
238240
```

tests/api-resources/auth-rules/v2/v2.test.ts

Lines changed: 18 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,15 @@ const client = new Lithic({
1010
describe('resource v2', () => {
1111
test('create: only required params', async () => {
1212
const responsePromise = client.authRules.v2.create({
13-
parameters: { conditions: [{ attribute: 'MCC', operation: 'IS_ONE_OF', value: 'string' }] },
13+
parameters: {
14+
conditions: [
15+
{
16+
attribute: 'MCC',
17+
operation: 'IS_ONE_OF',
18+
value: 'string',
19+
},
20+
],
21+
},
1422
type: 'CONDITIONAL_BLOCK',
1523
});
1624
const rawResponse = await responsePromise.asResponse();
@@ -24,7 +32,15 @@ describe('resource v2', () => {
2432

2533
test('create: required and optional params', async () => {
2634
const response = await client.authRules.v2.create({
27-
parameters: { conditions: [{ attribute: 'MCC', operation: 'IS_ONE_OF', value: 'string' }] },
35+
parameters: {
36+
conditions: [
37+
{
38+
attribute: 'MCC',
39+
operation: 'IS_ONE_OF',
40+
value: 'string',
41+
},
42+
],
43+
},
2844
type: 'CONDITIONAL_BLOCK',
2945
account_tokens: ['182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e'],
3046
business_account_tokens: ['182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e'],

tests/api-resources/card-programs.test.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,11 @@ describe('resource cardPrograms', () => {
3434
// ensure the request options are being passed correctly by passing an invalid HTTP method in order to cause an error
3535
await expect(
3636
client.cardPrograms.list(
37-
{ ending_before: 'ending_before', page_size: 1, starting_after: 'starting_after' },
37+
{
38+
ending_before: 'ending_before',
39+
page_size: 1,
40+
starting_after: 'starting_after',
41+
},
3842
{ path: '/_stainless_unknown_path' },
3943
),
4044
).rejects.toThrow(Lithic.NotFoundError);

tests/api-resources/digital-card-art.test.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,11 @@ describe('resource digitalCardArt', () => {
3434
// ensure the request options are being passed correctly by passing an invalid HTTP method in order to cause an error
3535
await expect(
3636
client.digitalCardArt.list(
37-
{ ending_before: 'ending_before', page_size: 1, starting_after: 'starting_after' },
37+
{
38+
ending_before: 'ending_before',
39+
page_size: 1,
40+
starting_after: 'starting_after',
41+
},
3842
{ path: '/_stainless_unknown_path' },
3943
),
4044
).rejects.toThrow(Lithic.NotFoundError);

tests/api-resources/events/subscriptions.test.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,11 @@ describe('resource subscriptions', () => {
7676
// ensure the request options are being passed correctly by passing an invalid HTTP method in order to cause an error
7777
await expect(
7878
client.events.subscriptions.list(
79-
{ ending_before: 'ending_before', page_size: 1, starting_after: 'starting_after' },
79+
{
80+
ending_before: 'ending_before',
81+
page_size: 1,
82+
starting_after: 'starting_after',
83+
},
8084
{ path: '/_stainless_unknown_path' },
8185
),
8286
).rejects.toThrow(Lithic.NotFoundError);

tests/api-resources/external-bank-accounts/external-bank-accounts.test.ts

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,14 @@ describe('resource externalBankAccounts', () => {
4141
type: 'CHECKING',
4242
verification_method: 'MANUAL',
4343
account_token: '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',
44-
address: { address1: 'x', city: 'x', country: 'USD', postal_code: '11201', state: 'xx', address2: 'x' },
44+
address: {
45+
address1: 'x',
46+
city: 'x',
47+
country: 'USD',
48+
postal_code: '11201',
49+
state: 'xx',
50+
address2: 'x',
51+
},
4552
company_id: 'sq',
4653
dob: '2019-12-27',
4754
doing_business_as: 'x',

tests/api-resources/network-programs.test.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,11 @@ describe('resource networkPrograms', () => {
3434
// ensure the request options are being passed correctly by passing an invalid HTTP method in order to cause an error
3535
await expect(
3636
client.networkPrograms.list(
37-
{ begin: '2019-12-27T18:11:19.117Z', end: '2019-12-27T18:11:19.117Z', page_size: 1 },
37+
{
38+
begin: '2019-12-27T18:11:19.117Z',
39+
end: '2019-12-27T18:11:19.117Z',
40+
page_size: 1,
41+
},
3842
{ path: '/_stainless_unknown_path' },
3943
),
4044
).rejects.toThrow(Lithic.NotFoundError);

tests/api-resources/payments.test.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,11 @@ describe('resource payments', () => {
3232
external_bank_account_token: '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',
3333
financial_account_token: '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',
3434
method: 'ACH_NEXT_DAY',
35-
method_attributes: { sec_code: 'CCD', ach_hold__period: 0, addenda: 'addenda' },
35+
method_attributes: {
36+
sec_code: 'CCD',
37+
ach_hold__period: 0,
38+
addenda: 'addenda',
39+
},
3640
type: 'COLLECTION',
3741
token: '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',
3842
memo: 'memo',

tests/api-resources/reports/settlement/settlement.test.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,11 @@ describe('resource settlement', () => {
2424
await expect(
2525
client.reports.settlement.listDetails(
2626
'2023-09-01',
27-
{ ending_before: 'ending_before', page_size: 1, starting_after: 'starting_after' },
27+
{
28+
ending_before: 'ending_before',
29+
page_size: 1,
30+
starting_after: 'starting_after',
31+
},
2832
{ path: '/_stainless_unknown_path' },
2933
),
3034
).rejects.toThrow(Lithic.NotFoundError);

tests/api-resources/three-ds/authentication.test.ts

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,12 @@ describe('resource authentication', () => {
2121

2222
test('simulate: only required params', async () => {
2323
const responsePromise = client.threeDS.authentication.simulate({
24-
merchant: { id: 'OODKZAPJVN4YS7O', country: 'USA', mcc: '5812', name: 'COFFEE SHOP' },
24+
merchant: {
25+
id: 'OODKZAPJVN4YS7O',
26+
country: 'USA',
27+
mcc: '5812',
28+
name: 'COFFEE SHOP',
29+
},
2530
pan: '4111111289144142',
2631
transaction: { amount: 0, currency: 'GBP' },
2732
});
@@ -36,7 +41,12 @@ describe('resource authentication', () => {
3641

3742
test('simulate: required and optional params', async () => {
3843
const response = await client.threeDS.authentication.simulate({
39-
merchant: { id: 'OODKZAPJVN4YS7O', country: 'USA', mcc: '5812', name: 'COFFEE SHOP' },
44+
merchant: {
45+
id: 'OODKZAPJVN4YS7O',
46+
country: 'USA',
47+
mcc: '5812',
48+
name: 'COFFEE SHOP',
49+
},
4050
pan: '4111111289144142',
4151
transaction: { amount: 0, currency: 'GBP' },
4252
card_expiry_check: 'MATCH',

0 commit comments

Comments
 (0)