From 4cc948ba76097f7e4948495c8fd74f0c064ca0e7 Mon Sep 17 00:00:00 2001 From: "jesse.berger" Date: Fri, 17 Jul 2026 15:38:11 +0200 Subject: [PATCH] feat(Domain): Renew optional expiry date field --- src/models/Domain.ts | 1 + src/resources/DomainApi.ts | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/src/models/Domain.ts b/src/models/Domain.ts index d5f2e36..4fd4fba 100644 --- a/src/models/Domain.ts +++ b/src/models/Domain.ts @@ -140,6 +140,7 @@ export interface IDomainRenew { domainName: string period: number billables?: IBillableDomain[] + expiryDate?: Date } export interface IDomainRestore { diff --git a/src/resources/DomainApi.ts b/src/resources/DomainApi.ts index 18e510f..0b0d06d 100644 --- a/src/resources/DomainApi.ts +++ b/src/resources/DomainApi.ts @@ -230,7 +230,7 @@ export default class DomainApi extends Base { * @param quote - If true, validate the request and request a quote for the action. Renew will not be executed. */ async renew (data: IDomainRenew, quote?: boolean): Promise { - const fields = (({ period, billables }) => ({ period, billables }))(data) + const fields = (({ period, billables, expiryDate }) => ({ period, billables, expiryDate }))(data) return this.axios.post('/domains/' + data.domainName + '/renew', fields, { params: quote ? { quote: true } : undefined }) .then(response => quote ? new Quote(response.data.quote) : new DomainRenewProcessResponse(response)) }