Skip to content
Merged
5 changes: 5 additions & 0 deletions src/main/java/com/resend/services/apikeys/ApiKeys.java
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
import com.resend.core.helper.URLHelper;
import com.resend.core.net.AbstractHttpResponse;
import com.resend.core.net.HttpMethod;
import com.resend.core.net.IHttpClient;
import com.resend.core.net.ListParams;
import com.resend.core.service.BaseService;
import com.resend.services.apikeys.model.CreateApiKeyResponse;
Expand All @@ -25,6 +26,10 @@ public ApiKeys(final String apiKey) {
super(apiKey);
}

ApiKeys(final String apiKey, final IHttpClient httpClient) {
super(apiKey, httpClient);
}

/**
* Creates an API key.
*
Expand Down
5 changes: 5 additions & 0 deletions src/main/java/com/resend/services/audiences/Audiences.java
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
import com.resend.core.helper.URLHelper;
import com.resend.core.net.AbstractHttpResponse;
import com.resend.core.net.HttpMethod;
import com.resend.core.net.IHttpClient;
import com.resend.core.net.ListParams;
import com.resend.core.service.BaseService;
import com.resend.services.audiences.model.*;
Expand All @@ -23,6 +24,10 @@ public Audiences(final String apiKey) {
super(apiKey);
}

Audiences(final String apiKey, final IHttpClient httpClient) {
super(apiKey, httpClient);
}

/**
* Creates an Audience.
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
import com.resend.core.exception.ResendException;
import com.resend.core.net.AbstractHttpResponse;
import com.resend.core.net.HttpMethod;
import com.resend.core.net.IHttpClient;
import com.resend.core.service.BaseService;
import com.resend.services.automations.model.*;
import okhttp3.MediaType;
Expand All @@ -22,6 +23,10 @@ public Automations(final String apiKey) {
super(apiKey);
}

Automations(final String apiKey, final IHttpClient httpClient) {
super(apiKey, httpClient);
}

/**
* Creates a new automation.
*
Expand Down
5 changes: 5 additions & 0 deletions src/main/java/com/resend/services/batch/Batch.java
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
import com.resend.core.exception.ResendException;
import com.resend.core.net.AbstractHttpResponse;
import com.resend.core.net.HttpMethod;
import com.resend.core.net.IHttpClient;
import com.resend.core.net.RequestOptions;
import com.resend.core.service.BaseService;

Expand All @@ -25,6 +26,10 @@ public Batch(final String apiKey) {
super(apiKey);
}

Batch(final String apiKey, final IHttpClient httpClient) {
super(apiKey, httpClient);
}

/**
* Sends up to 100 batch emails.
*
Expand Down
4 changes: 4 additions & 0 deletions src/main/java/com/resend/services/broadcasts/Broadcasts.java
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
import com.resend.core.helper.URLHelper;
import com.resend.core.net.AbstractHttpResponse;
import com.resend.core.net.HttpMethod;
import com.resend.core.net.IHttpClient;
import com.resend.core.net.ListParams;
import com.resend.core.service.BaseService;
import com.resend.services.broadcasts.model.*;
Expand All @@ -21,7 +22,10 @@ public class Broadcasts extends BaseService {
*/
public Broadcasts(final String apiKey) {
super(apiKey);
}

Broadcasts(final String apiKey, final IHttpClient httpClient) {
super(apiKey, httpClient);
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
import com.resend.core.exception.ResendException;
import com.resend.core.net.AbstractHttpResponse;
import com.resend.core.net.HttpMethod;
import com.resend.core.net.IHttpClient;
import com.resend.core.service.BaseService;
import com.resend.services.contactproperties.model.*;
import okhttp3.MediaType;
Expand All @@ -21,6 +22,10 @@ public ContactProperties(final String apiKey) {
super(apiKey);
}

ContactProperties(final String apiKey, final IHttpClient httpClient) {
super(apiKey, httpClient);
}

/**
* Creates a ContactProperty.
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
import com.resend.core.helper.URLHelper;
import com.resend.core.net.AbstractHttpResponse;
import com.resend.core.net.HttpMethod;
import com.resend.core.net.IHttpClient;
import com.resend.core.net.ListParams;
import com.resend.core.net.RequestOptions;
import com.resend.core.service.BaseService;
Expand Down Expand Up @@ -40,6 +41,10 @@ public ContactImports(final String apiKey) {
super(apiKey);
}

ContactImports(final String apiKey, final IHttpClient httpClient) {
super(apiKey, httpClient);
}

/**
* Creates a new contact import from a CSV file.
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
import com.resend.core.helper.URLHelper;
import com.resend.core.net.AbstractHttpResponse;
import com.resend.core.net.HttpMethod;
import com.resend.core.net.IHttpClient;
import com.resend.core.net.ListParams;
import com.resend.core.service.BaseService;
import com.resend.services.contacts.model.*;
Expand All @@ -24,6 +25,10 @@ public ContactSegments(final String apiKey) {
super(apiKey);
}

ContactSegments(final String apiKey, final IHttpClient httpClient) {
super(apiKey, httpClient);
}

/**
* Adds an existing contact to a segment.
*
Expand Down
5 changes: 5 additions & 0 deletions src/main/java/com/resend/services/contacts/ContactTopics.java
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
import com.resend.core.helper.URLHelper;
import com.resend.core.net.AbstractHttpResponse;
import com.resend.core.net.HttpMethod;
import com.resend.core.net.IHttpClient;
import com.resend.core.net.ListParams;
import com.resend.core.service.BaseService;
import com.resend.services.contacts.model.ListContactTopicsResponse;
Expand All @@ -26,6 +27,10 @@ public ContactTopics(final String apiKey) {
super(apiKey);
}

ContactTopics(final String apiKey, final IHttpClient httpClient) {
super(apiKey, httpClient);
}

/**
* Retrieves a list of topic subscriptions for a contact.
*
Expand Down
11 changes: 8 additions & 3 deletions src/main/java/com/resend/services/contacts/Contacts.java
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
import com.resend.core.helper.URLHelper;
import com.resend.core.net.AbstractHttpResponse;
import com.resend.core.net.HttpMethod;
import com.resend.core.net.IHttpClient;
import com.resend.core.net.ListParams;
import com.resend.core.service.BaseService;
import com.resend.services.contacts.model.*;
Expand Down Expand Up @@ -49,14 +50,18 @@ public Contacts(final String apiKey) {
super(apiKey);
}

Contacts(final String apiKey, final IHttpClient httpClient) {
Comment thread
cubic-dev-ai[bot] marked this conversation as resolved.
super(apiKey, httpClient);
}

/**
* Returns the ContactSegments sub-service for managing contact segment memberships.
*
* @return The ContactSegments service instance.
*/
public ContactSegments segments() {
if (this.contactSegments == null) {
this.contactSegments = new ContactSegments(this.apiKey);
this.contactSegments = new ContactSegments(this.apiKey, this.httpClient);
}
return this.contactSegments;
}
Expand All @@ -68,7 +73,7 @@ public ContactSegments segments() {
*/
public ContactTopics topics() {
if (this.contactTopics == null) {
this.contactTopics = new ContactTopics(this.apiKey);
this.contactTopics = new ContactTopics(this.apiKey, this.httpClient);
}
return this.contactTopics;
}
Expand All @@ -83,7 +88,7 @@ public ContactTopics topics() {
*/
public ContactImports imports() {
if (this.contactImports == null) {
this.contactImports = new ContactImports(this.apiKey);
this.contactImports = new ContactImports(this.apiKey, this.httpClient);
}
return this.contactImports;
}
Expand Down
7 changes: 6 additions & 1 deletion src/main/java/com/resend/services/domains/Domains.java
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
import com.resend.core.helper.URLHelper;
import com.resend.core.net.AbstractHttpResponse;
import com.resend.core.net.HttpMethod;
import com.resend.core.net.IHttpClient;
import com.resend.core.net.ListParams;
import com.resend.core.service.BaseService;
import com.resend.services.domains.model.*;
Expand All @@ -23,6 +24,10 @@ public Domains(final String apiKey) {
super(apiKey);
}

Domains(final String apiKey, final IHttpClient httpClient) {
super(apiKey, httpClient);
}

/**
* Creates a domain based on the provided CreateDomainOptions and returns a CreateDomainResponse.
*
Expand Down Expand Up @@ -142,7 +147,7 @@ public UpdateDomainResponseSuccess update(UpdateDomainOptions updateDomainOption
* @return A DomainClaims object.
*/
public DomainClaims claims() {
return new DomainClaims(apiKey);
return new DomainClaims(apiKey, this.httpClient);
}

/**
Expand Down
5 changes: 5 additions & 0 deletions src/main/java/com/resend/services/emails/Emails.java
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
import com.resend.core.helper.URLHelper;
import com.resend.core.net.AbstractHttpResponse;
import com.resend.core.net.HttpMethod;
import com.resend.core.net.IHttpClient;
import com.resend.core.net.ListParams;
import com.resend.core.net.RequestOptions;
import com.resend.core.service.BaseService;
Expand All @@ -27,6 +28,10 @@ public Emails(final String apiKey) {
super(apiKey);
}

Emails(final String apiKey, final IHttpClient httpClient) {
super(apiKey, httpClient);
}

/**
* Sends an email based on the provided email request.
*
Expand Down
5 changes: 5 additions & 0 deletions src/main/java/com/resend/services/events/Events.java
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
import com.resend.core.helper.URLHelper;
import com.resend.core.net.AbstractHttpResponse;
import com.resend.core.net.HttpMethod;
import com.resend.core.net.IHttpClient;
import com.resend.core.net.ListParams;
import com.resend.core.service.BaseService;
import com.resend.services.events.model.*;
Expand All @@ -23,6 +24,10 @@ public Events(final String apiKey) {
super(apiKey);
}

Events(final String apiKey, final IHttpClient httpClient) {
super(apiKey, httpClient);
}

/**
* Creates a new event.
*
Expand Down
5 changes: 5 additions & 0 deletions src/main/java/com/resend/services/logs/Logs.java
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
import com.resend.core.helper.URLHelper;
import com.resend.core.net.AbstractHttpResponse;
import com.resend.core.net.HttpMethod;
import com.resend.core.net.IHttpClient;
import com.resend.core.net.ListParams;
import com.resend.core.service.BaseService;
import com.resend.services.logs.model.GetLogResponseSuccess;
Expand All @@ -24,6 +25,10 @@ public Logs(final String apiKey) {
super(apiKey);
}

Logs(final String apiKey, final IHttpClient httpClient) {
super(apiKey, httpClient);
}

/**
* Retrieves a single log entry by its unique identifier.
*
Expand Down
5 changes: 5 additions & 0 deletions src/main/java/com/resend/services/receiving/Receiving.java
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
import com.resend.core.helper.URLHelper;
import com.resend.core.net.AbstractHttpResponse;
import com.resend.core.net.HttpMethod;
import com.resend.core.net.IHttpClient;
import com.resend.core.net.ListParams;
import com.resend.core.service.BaseService;
import com.resend.services.receiving.model.*;
Expand All @@ -23,6 +24,10 @@ public Receiving(final String apiKey) {
super(apiKey);
}

Receiving(final String apiKey, final IHttpClient httpClient) {
super(apiKey, httpClient);
}

/**
* Retrieves a single received email by its ID.
*
Expand Down
5 changes: 5 additions & 0 deletions src/main/java/com/resend/services/segments/Segments.java
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
import com.resend.core.helper.URLHelper;
import com.resend.core.net.AbstractHttpResponse;
import com.resend.core.net.HttpMethod;
import com.resend.core.net.IHttpClient;
import com.resend.core.net.ListParams;
import com.resend.core.service.BaseService;
import com.resend.services.segments.model.*;
Expand All @@ -23,6 +24,10 @@ public Segments(final String apiKey) {
super(apiKey);
}

Segments(final String apiKey, final IHttpClient httpClient) {
super(apiKey, httpClient);
}

/**
* Creates a Segment.
*
Expand Down
5 changes: 5 additions & 0 deletions src/main/java/com/resend/services/templates/Templates.java
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
import com.resend.core.helper.URLHelper;
import com.resend.core.net.AbstractHttpResponse;
import com.resend.core.net.HttpMethod;
import com.resend.core.net.IHttpClient;
import com.resend.core.net.ListParams;
import com.resend.core.service.BaseService;
import com.resend.services.templates.model.*;
Expand All @@ -23,6 +24,10 @@ public Templates(final String apiKey) {
super(apiKey);
}

Templates(final String apiKey, final IHttpClient httpClient) {
super(apiKey, httpClient);
}

/**
* Creates a new template.
*
Expand Down
5 changes: 5 additions & 0 deletions src/main/java/com/resend/services/topics/Topics.java
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
import com.resend.core.helper.URLHelper;
import com.resend.core.net.AbstractHttpResponse;
import com.resend.core.net.HttpMethod;
import com.resend.core.net.IHttpClient;
import com.resend.core.net.ListParams;
import com.resend.core.service.BaseService;
import com.resend.services.topics.model.*;
Expand All @@ -23,6 +24,10 @@ public Topics(final String apiKey) {
super(apiKey);
}

Topics(final String apiKey, final IHttpClient httpClient) {
super(apiKey, httpClient);
}

/**
* Creates a new topic.
*
Expand Down
5 changes: 5 additions & 0 deletions src/main/java/com/resend/services/webhooks/Webhooks.java
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
import com.resend.core.helper.URLHelper;
import com.resend.core.net.AbstractHttpResponse;
import com.resend.core.net.HttpMethod;
import com.resend.core.net.IHttpClient;
import com.resend.core.net.ListParams;
import com.resend.core.service.BaseService;
import com.resend.services.webhooks.model.CreateWebhookOptions;
Expand Down Expand Up @@ -34,6 +35,10 @@ public Webhooks(final String apiKey) {
super(apiKey);
}

Webhooks(final String apiKey, final IHttpClient httpClient) {
super(apiKey, httpClient);
}

/**
* Creates a webhook based on the provided CreateWebhookOptions and returns a CreateWebhookResponseSuccess.
*
Expand Down
Loading
Loading