Skip to content

Commit

Permalink
chore(examples): minor formatting changes (#434)
Browse files Browse the repository at this point in the history
  • Loading branch information
stainless-app[bot] committed Aug 13, 2024
1 parent 23140a9 commit 3027e3c
Show file tree
Hide file tree
Showing 7 changed files with 95 additions and 95 deletions.
2 changes: 1 addition & 1 deletion tests/api-resources/hris/benefits/individuals.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,13 +25,13 @@ describe('resource individuals', () => {
test('enrollMany: required and optional params', async () => {
const response = await client.hris.benefits.individuals.enrollMany('benefit_id', [
{
individual_id: 'd02a6346-1f08-4312-a064-49ff3cafaa7a',
configuration: {
employee_deduction: { type: 'percent', amount: 1000 },
company_contribution: { type: 'percent', amount: 400 },
catch_up: false,
annual_maximum: 500000,
},
individual_id: 'd02a6346-1f08-4312-a064-49ff3cafaa7a',
},
]);
});
Expand Down
44 changes: 22 additions & 22 deletions tests/api-resources/sandbox/company.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,25 +35,25 @@ describe('resource company', () => {
const response = await client.sandbox.company.update({
accounts: [
{
routing_number: 'routing_number',
account_name: 'account_name',
institution_name: 'institution_name',
account_type: 'checking',
account_number: 'account_number',
account_type: 'checking',
institution_name: 'institution_name',
routing_number: 'routing_number',
},
{
routing_number: 'routing_number',
account_name: 'account_name',
institution_name: 'institution_name',
account_type: 'checking',
account_number: 'account_number',
account_type: 'checking',
institution_name: 'institution_name',
routing_number: 'routing_number',
},
{
routing_number: 'routing_number',
account_name: 'account_name',
institution_name: 'institution_name',
account_type: 'checking',
account_number: 'account_number',
account_type: 'checking',
institution_name: 'institution_name',
routing_number: 'routing_number',
},
],
departments: [
Expand All @@ -62,38 +62,38 @@ describe('resource company', () => {
{ name: 'name', parent: { name: 'name' } },
],
ein: 'ein',
entity: { type: 'llc', subtype: 's_corporation' },
entity: { subtype: 's_corporation', type: 'llc' },
legal_name: 'legal_name',
locations: [
{
line1: 'line1',
line2: 'line2',
city: 'city',
state: 'state',
postal_code: 'postal_code',
country: 'country',
line1: 'line1',
line2: 'line2',
name: 'name',
postal_code: 'postal_code',
source_id: 'source_id',
state: 'state',
},
{
line1: 'line1',
line2: 'line2',
city: 'city',
state: 'state',
postal_code: 'postal_code',
country: 'country',
line1: 'line1',
line2: 'line2',
name: 'name',
postal_code: 'postal_code',
source_id: 'source_id',
state: 'state',
},
{
line1: 'line1',
line2: 'line2',
city: 'city',
state: 'state',
postal_code: 'postal_code',
country: 'country',
line1: 'line1',
line2: 'line2',
name: 'name',
postal_code: 'postal_code',
source_id: 'source_id',
state: 'state',
},
],
primary_email: 'primary_email',
Expand Down
2 changes: 1 addition & 1 deletion tests/api-resources/sandbox/connections/accounts.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ describe('resource accounts', () => {
// ensure the request options are being passed correctly by passing an invalid HTTP method in order to cause an error
await expect(
client.sandbox.connections.accounts.update(
{ connection_status: 'reauth' },
{ connection_status: 'pending' },
{ path: '/_stainless_unknown_path' },
),
).rejects.toThrow(Finch.NotFoundError);
Expand Down
80 changes: 40 additions & 40 deletions tests/api-resources/sandbox/directory.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,65 +25,65 @@ describe('resource directory', () => {
test('create: required and optional params', async () => {
const response = await client.sandbox.directory.create([
{
first_name: 'John',
middle_name: 'middle_name',
last_name: 'Smith',
preferred_name: 'preferred_name',
class_code: 'class_code',
custom_fields: [
{ name: 'name', value: {} },
{ name: 'name', value: {} },
{ name: 'name', value: {} },
],
department: { name: 'name' },
dob: '01/01/2000',
emails: [
{ data: 'data', type: 'work' },
{ data: 'data', type: 'work' },
{ data: 'data', type: 'work' },
],
employment: { subtype: 'full_time', type: 'employee' },
encrypted_ssn: 'encrypted_ssn',
end_date: 'end_date',
ethnicity: 'asian',
first_name: 'John',
gender: 'female',
income: { amount: 0, currency: 'currency', effective_date: 'effective_date', unit: 'yearly' },
income_history: [
{ amount: 0, currency: 'currency', effective_date: 'effective_date', unit: 'yearly' },
{ amount: 0, currency: 'currency', effective_date: 'effective_date', unit: 'yearly' },
{ amount: 0, currency: 'currency', effective_date: 'effective_date', unit: 'yearly' },
],
is_active: true,
last_name: 'Smith',
location: {
city: 'city',
country: 'country',
line1: 'line1',
line2: 'line2',
name: 'name',
postal_code: 'postal_code',
source_id: 'source_id',
state: 'state',
},
manager: { id: 'id' },
middle_name: 'middle_name',
phone_numbers: [
{ data: 'data', type: 'work' },
{ data: 'data', type: 'work' },
{ data: 'data', type: 'work' },
],
gender: 'female',
ethnicity: 'asian',
dob: '01/01/2000',
ssn: 'ssn',
encrypted_ssn: 'encrypted_ssn',
preferred_name: 'preferred_name',
residence: {
line1: 'line1',
line2: 'line2',
city: 'city',
state: 'state',
postal_code: 'postal_code',
country: 'country',
name: 'name',
source_id: 'source_id',
},
title: 'title',
manager: { id: 'id' },
department: { name: 'name' },
employment: { type: 'employee', subtype: 'full_time' },
start_date: 'start_date',
end_date: 'end_date',
is_active: true,
class_code: 'class_code',
location: {
line1: 'line1',
line2: 'line2',
city: 'city',
state: 'state',
postal_code: 'postal_code',
country: 'country',
name: 'name',
postal_code: 'postal_code',
source_id: 'source_id',
state: 'state',
},
income: { unit: 'yearly', amount: 0, currency: 'currency', effective_date: 'effective_date' },
income_history: [
{ unit: 'yearly', amount: 0, currency: 'currency', effective_date: 'effective_date' },
{ unit: 'yearly', amount: 0, currency: 'currency', effective_date: 'effective_date' },
{ unit: 'yearly', amount: 0, currency: 'currency', effective_date: 'effective_date' },
],
custom_fields: [
{ name: 'name', value: {} },
{ name: 'name', value: {} },
{ name: 'name', value: {} },
],
source_id: 'source_id',
ssn: 'ssn',
start_date: 'start_date',
title: 'title',
},
]);
});
Expand Down
18 changes: 9 additions & 9 deletions tests/api-resources/sandbox/employment.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -42,26 +42,26 @@ describe('resource employment', () => {
{ name: 'name', value: {} },
],
department: { name: 'name' },
employment: { type: 'employee', subtype: 'full_time' },
employment: { subtype: 'full_time', type: 'employee' },
end_date: 'end_date',
first_name: 'first_name',
income: { unit: 'yearly', amount: 0, currency: 'currency', effective_date: 'effective_date' },
income: { amount: 0, currency: 'currency', effective_date: 'effective_date', unit: 'yearly' },
income_history: [
{ unit: 'yearly', amount: 0, currency: 'currency', effective_date: 'effective_date' },
{ unit: 'yearly', amount: 0, currency: 'currency', effective_date: 'effective_date' },
{ unit: 'yearly', amount: 0, currency: 'currency', effective_date: 'effective_date' },
{ amount: 0, currency: 'currency', effective_date: 'effective_date', unit: 'yearly' },
{ amount: 0, currency: 'currency', effective_date: 'effective_date', unit: 'yearly' },
{ amount: 0, currency: 'currency', effective_date: 'effective_date', unit: 'yearly' },
],
is_active: true,
last_name: 'last_name',
location: {
line1: 'line1',
line2: 'line2',
city: 'city',
state: 'state',
postal_code: 'postal_code',
country: 'country',
line1: 'line1',
line2: 'line2',
name: 'name',
postal_code: 'postal_code',
source_id: 'source_id',
state: 'state',
},
manager: { id: 'id' },
middle_name: 'middle_name',
Expand Down
8 changes: 4 additions & 4 deletions tests/api-resources/sandbox/individual.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -54,14 +54,14 @@ describe('resource individual', () => {
],
preferred_name: 'preferred_name',
residence: {
line1: 'line1',
line2: 'line2',
city: 'city',
state: 'state',
postal_code: 'postal_code',
country: 'country',
line1: 'line1',
line2: 'line2',
name: 'name',
postal_code: 'postal_code',
source_id: 'source_id',
state: 'state',
},
ssn: 'ssn',
},
Expand Down
36 changes: 18 additions & 18 deletions tests/api-resources/sandbox/payment.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,30 +37,30 @@ describe('resource payment', () => {
end_date: 'end_date',
pay_statements: [
{
individual_id: 'b2338cfb-472f-4f72-9faa-e028c083144a',
type: 'regular_payroll',
payment_method: 'check',
total_hours: 0,
gross_pay: { amount: 0, currency: 'currency' },
net_pay: { amount: 0, currency: 'currency' },
earnings: [
{ type: 'salary', name: 'name', amount: 0, currency: 'currency', hours: 0 },
{ type: 'salary', name: 'name', amount: 0, currency: 'currency', hours: 0 },
{ type: 'salary', name: 'name', amount: 0, currency: 'currency', hours: 0 },
],
taxes: [
{ type: 'state', name: 'name', employer: true, amount: 0, currency: 'currency' },
{ type: 'state', name: 'name', employer: true, amount: 0, currency: 'currency' },
{ type: 'state', name: 'name', employer: true, amount: 0, currency: 'currency' },
{ amount: 0, currency: 'currency', hours: 0, name: 'name', type: 'salary' },
{ amount: 0, currency: 'currency', hours: 0, name: 'name', type: 'salary' },
{ amount: 0, currency: 'currency', hours: 0, name: 'name', type: 'salary' },
],
employee_deductions: [
{ name: '401k test', amount: 2000, currency: 'usd', pre_tax: true, type: '401k' },
{ amount: 2000, currency: 'usd', name: '401k test', pre_tax: true, type: '401k' },
],
employer_contributions: [
{ name: 'name', amount: 0, currency: 'currency', type: '401k' },
{ name: 'name', amount: 0, currency: 'currency', type: '401k' },
{ name: 'name', amount: 0, currency: 'currency', type: '401k' },
{ amount: 0, currency: 'currency', name: 'name', type: '401k' },
{ amount: 0, currency: 'currency', name: 'name', type: '401k' },
{ amount: 0, currency: 'currency', name: 'name', type: '401k' },
],
gross_pay: { amount: 0, currency: 'currency' },
individual_id: 'b2338cfb-472f-4f72-9faa-e028c083144a',
net_pay: { amount: 0, currency: 'currency' },
payment_method: 'check',
taxes: [
{ amount: 0, currency: 'currency', employer: true, name: 'name', type: 'state' },
{ amount: 0, currency: 'currency', employer: true, name: 'name', type: 'state' },
{ amount: 0, currency: 'currency', employer: true, name: 'name', type: 'state' },
],
total_hours: 0,
type: 'regular_payroll',
},
],
start_date: 'start_date',
Expand Down

0 comments on commit 3027e3c

Please sign in to comment.