File tree Expand file tree Collapse file tree 2 files changed +25
-0
lines changed
Expand file tree Collapse file tree 2 files changed +25
-0
lines changed Original file line number Diff line number Diff line change 11import FormData from 'form-data' ;
22import { type ArcAPIOptions , ArcAbstractAPI } from '../abstract-api.js' ;
33import type {
4+ CreateEnterpriseGroupPayload ,
5+ CreateEnterpriseGroupResponse ,
46 MigrateBatchSubscriptionsParams ,
57 MigrateBatchSubscriptionsPayload ,
68 MigrateBatchSubscriptionsResponse ,
@@ -25,3 +27,14 @@ export class ArcSales extends ArcAbstractAPI {
2527 return data ;
2628 }
2729}
30+
31+ export class ArcSalesV2 extends ArcAbstractAPI {
32+ constructor ( options : ArcAPIOptions ) {
33+ super ( { ...options , apiPath : 'sales/api/v2' } ) ;
34+ }
35+
36+ async createEnterpriseGroup ( payload : CreateEnterpriseGroupPayload ) : Promise < CreateEnterpriseGroupResponse > {
37+ const { data } = await this . client . post < CreateEnterpriseGroupResponse > ( '/subscriptions/enterprise' , payload ) ;
38+ return data ;
39+ }
40+ }
Original file line number Diff line number Diff line change @@ -92,3 +92,15 @@ export type Refund = {
9292 tax : number ;
9393 providerReference ?: string ;
9494} ;
95+
96+ export type CreateEnterpriseGroupPayload = {
97+ name : string ;
98+ sku : string ;
99+ } ;
100+
101+ export type CreateEnterpriseGroupResponse = {
102+ name : string ;
103+ sku : string ;
104+ nonceExpirationInDays : number ;
105+ id : number ;
106+ } ;
You can’t perform that action at this time.
0 commit comments