Skip to content

Commit c0925f2

Browse files
feat(api): api update
1 parent 6329910 commit c0925f2

File tree

5 files changed

+122
-5
lines changed

5 files changed

+122
-5
lines changed

.stats.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
configured_endpoints: 118
2-
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/orb%2Forb-cbce25283cb9c3282e03e08b7ee81395436af7d0eb480ffcbab307b5bf1c92a0.yml
3-
openapi_spec_hash: c286edf46db95dee05eb6f180ac24ab0
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/orb%2Forb-ef726ad139fa29757029206ee08150434fc6c52005fec6d42c7d2bcd3aa7ab47.yml
3+
openapi_spec_hash: e622beb7c26f9b0dd641bd5c92735a5b
44
config_hash: dd4343ce95871032ef6e0735a4ca038c

src/resources/customers/credits/ledger.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -471,15 +471,15 @@ export class LedgerListByExternalIDResponsesPage extends Page<LedgerListByExtern
471471
export interface AffectedBlock {
472472
id: string;
473473

474-
block_filters: Array<AffectedBlock.BlockFilter> | null;
475-
476474
expiry_date: string | null;
477475

476+
filters: Array<AffectedBlock.Filter>;
477+
478478
per_unit_cost_basis: string | null;
479479
}
480480

481481
export namespace AffectedBlock {
482-
export interface BlockFilter {
482+
export interface Filter {
483483
/**
484484
* The property of the price to filter on.
485485
*/

src/resources/customers/customers.ts

Lines changed: 95 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -461,6 +461,12 @@ export interface Customer {
461461

462462
accounting_sync_configuration?: Customer.AccountingSyncConfiguration | null;
463463

464+
/**
465+
* Whether automatic tax calculation is enabled for this customer. This field is
466+
* nullable for backwards compatibility but will always return a boolean value.
467+
*/
468+
automatic_tax_enabled?: boolean | null;
469+
464470
reporting_configuration?: Customer.ReportingConfiguration | null;
465471
}
466472

@@ -518,6 +524,12 @@ export interface NewAvalaraTaxConfiguration {
518524

519525
tax_provider: 'avalara';
520526

527+
/**
528+
* Whether to automatically calculate tax for this customer. When null, inherits
529+
* from account-level setting. When true or false, overrides the account setting.
530+
*/
531+
automatic_tax_enabled?: boolean | null;
532+
521533
tax_exemption_code?: string | null;
522534
}
523535

@@ -529,12 +541,24 @@ export interface NewSphereConfiguration {
529541
tax_exempt: boolean;
530542

531543
tax_provider: 'sphere';
544+
545+
/**
546+
* Whether to automatically calculate tax for this customer. When null, inherits
547+
* from account-level setting. When true or false, overrides the account setting.
548+
*/
549+
automatic_tax_enabled?: boolean | null;
532550
}
533551

534552
export interface NewTaxJarConfiguration {
535553
tax_exempt: boolean;
536554

537555
tax_provider: 'taxjar';
556+
557+
/**
558+
* Whether to automatically calculate tax for this customer. When null, inherits
559+
* from account-level setting. When true or false, overrides the account setting.
560+
*/
561+
automatic_tax_enabled?: boolean | null;
538562
}
539563

540564
export interface CustomerCreateParams {
@@ -625,6 +649,7 @@ export interface CustomerCreateParams {
625649
| NewTaxJarConfiguration
626650
| NewSphereConfiguration
627651
| CustomerCreateParams.NewNumeralConfiguration
652+
| CustomerCreateParams.NewAnrokConfiguration
628653
| null;
629654

630655
/**
@@ -788,6 +813,24 @@ export namespace CustomerCreateParams {
788813
tax_exempt: boolean;
789814

790815
tax_provider: 'numeral';
816+
817+
/**
818+
* Whether to automatically calculate tax for this customer. When null, inherits
819+
* from account-level setting. When true or false, overrides the account setting.
820+
*/
821+
automatic_tax_enabled?: boolean | null;
822+
}
823+
824+
export interface NewAnrokConfiguration {
825+
tax_exempt: boolean;
826+
827+
tax_provider: 'anrok';
828+
829+
/**
830+
* Whether to automatically calculate tax for this customer. When null, inherits
831+
* from account-level setting. When true or false, overrides the account setting.
832+
*/
833+
automatic_tax_enabled?: boolean | null;
791834
}
792835
}
793836

@@ -816,6 +859,13 @@ export interface CustomerUpdateParams {
816859
*/
817860
auto_issuance?: boolean | null;
818861

862+
/**
863+
* Whether automatic tax calculation is enabled for this customer. When null,
864+
* inherits from account-level setting. When true or false, overrides the account
865+
* setting.
866+
*/
867+
automatic_tax_enabled?: boolean | null;
868+
819869
billing_address?: AddressInput | null;
820870

821871
/**
@@ -883,6 +933,7 @@ export interface CustomerUpdateParams {
883933
| NewTaxJarConfiguration
884934
| NewSphereConfiguration
885935
| CustomerUpdateParams.NewNumeralConfiguration
936+
| CustomerUpdateParams.NewAnrokConfiguration
886937
| null;
887938

888939
/**
@@ -1039,6 +1090,24 @@ export namespace CustomerUpdateParams {
10391090
tax_exempt: boolean;
10401091

10411092
tax_provider: 'numeral';
1093+
1094+
/**
1095+
* Whether to automatically calculate tax for this customer. When null, inherits
1096+
* from account-level setting. When true or false, overrides the account setting.
1097+
*/
1098+
automatic_tax_enabled?: boolean | null;
1099+
}
1100+
1101+
export interface NewAnrokConfiguration {
1102+
tax_exempt: boolean;
1103+
1104+
tax_provider: 'anrok';
1105+
1106+
/**
1107+
* Whether to automatically calculate tax for this customer. When null, inherits
1108+
* from account-level setting. When true or false, overrides the account setting.
1109+
*/
1110+
automatic_tax_enabled?: boolean | null;
10421111
}
10431112
}
10441113

@@ -1077,6 +1146,13 @@ export interface CustomerUpdateByExternalIDParams {
10771146
*/
10781147
auto_issuance?: boolean | null;
10791148

1149+
/**
1150+
* Whether automatic tax calculation is enabled for this customer. When null,
1151+
* inherits from account-level setting. When true or false, overrides the account
1152+
* setting.
1153+
*/
1154+
automatic_tax_enabled?: boolean | null;
1155+
10801156
billing_address?: AddressInput | null;
10811157

10821158
/**
@@ -1144,6 +1220,7 @@ export interface CustomerUpdateByExternalIDParams {
11441220
| NewTaxJarConfiguration
11451221
| NewSphereConfiguration
11461222
| CustomerUpdateByExternalIDParams.NewNumeralConfiguration
1223+
| CustomerUpdateByExternalIDParams.NewAnrokConfiguration
11471224
| null;
11481225

11491226
/**
@@ -1300,6 +1377,24 @@ export namespace CustomerUpdateByExternalIDParams {
13001377
tax_exempt: boolean;
13011378

13021379
tax_provider: 'numeral';
1380+
1381+
/**
1382+
* Whether to automatically calculate tax for this customer. When null, inherits
1383+
* from account-level setting. When true or false, overrides the account setting.
1384+
*/
1385+
automatic_tax_enabled?: boolean | null;
1386+
}
1387+
1388+
export interface NewAnrokConfiguration {
1389+
tax_exempt: boolean;
1390+
1391+
tax_provider: 'anrok';
1392+
1393+
/**
1394+
* Whether to automatically calculate tax for this customer. When null, inherits
1395+
* from account-level setting. When true or false, overrides the account setting.
1396+
*/
1397+
automatic_tax_enabled?: boolean | null;
13031398
}
13041399
}
13051400

src/resources/shared.ts

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,27 @@ export interface Allocation {
6767
currency: string;
6868

6969
custom_expiration: CustomExpiration | null;
70+
71+
filters?: Array<Allocation.Filter>;
72+
}
73+
74+
export namespace Allocation {
75+
export interface Filter {
76+
/**
77+
* The property of the price to filter on.
78+
*/
79+
field: 'price_id' | 'item_id' | 'price_type' | 'currency' | 'pricing_unit_id';
80+
81+
/**
82+
* Should prices that match the filter be included or excluded.
83+
*/
84+
operator: 'includes' | 'excludes';
85+
86+
/**
87+
* The IDs or values that match this filter.
88+
*/
89+
values: Array<string>;
90+
}
7091
}
7192

7293
export interface AmountDiscount {

tests/api-resources/customers/customers.test.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,7 @@ describe('resource customers', () => {
6060
tax_configuration: {
6161
tax_exempt: true,
6262
tax_provider: 'avalara',
63+
automatic_tax_enabled: true,
6364
tax_exemption_code: 'tax_exemption_code',
6465
},
6566
tax_id: { country: 'AD', type: 'ad_nrt', value: 'value' },

0 commit comments

Comments
 (0)