pub struct SingleSends {
    pub client: Client,
}

Fields

client: Client

Implementations

Get All Single Sends.

This function performs a GET to the /marketing/singlesends endpoint.

This endpoint allows you to retrieve all your Single Sends.

Returns all of your Single Sends with condensed details about each, including the Single Sends’ IDs. For more details about an individual Single Send, pass the Single Send’s ID to the /marketing/singlesends/{id} endpoint.

Parameters:

  • page_size: i64
  • page_token: &str – The license key provided with your New Relic account.

Create Single Send.

This function performs a POST to the /marketing/singlesends endpoint.

This endpoint allows you to create a new Single Send.

Please note that if you are migrating from the previous version of Single Sends, you no longer need to pass a template ID with your request to this endpoint. Instead, you will pass all template data in the email_config object.

Bulk Delete Single Sends.

This function performs a DELETE to the /marketing/singlesends endpoint.

This endpoint allows you to delete multiple Single Sends using an array of Single Sends IDs.

To first retrieve all your Single Sends’ IDs, you can make a GET request to the /marketing/singlensends endpoint.

Please note that a DELETE request is permanent, and your Single Sends will not be recoverable after deletion.

Parameters:

  • ids: &[String] – The recipient IDs of the recipients that already existed from this request.

Get Single Send by ID.

This function performs a GET to the /marketing/singlesends/{id} endpoint.

This endpoint allows you to retrieve details about one Single Send using a Single Send ID.

You can retrieve all of your Single Sends by making a GET request to the /marketing/singlesends endpoint.

Duplicate Single Send.

This function performs a POST to the /marketing/singlesends/{id} endpoint.

This endpoint allows you to duplicate an existing Single Send using its Single Send ID.

Duplicating a Single Send is useful when you want to create a Single Send but don’t want to start from scratch. Once duplicated, you can update or edit the Single Send by making a PATCH request to the /marketing/singlesends/{id} endpoint.

If you leave the name field blank, your duplicate will be assigned the name of the Single Send it was copied from with the text “Copy of ” prepended to it. The name field length is limited to 100 characters, so the end of the new Single Send name, including “Copy of ”, will be trimmed if the name exceeds this limit.

Delete Single Send by ID.

This function performs a DELETE to the /marketing/singlesends/{id} endpoint.

This endpoint allows you to delete one Single Send using a Single Send ID.

To first retrieve all your Single Sends’ IDs, you can make a GET request to the /marketing/singlensends endpoint.

Please note that a DELETE request is permanent, and your Single Send will not be recoverable after deletion.

Update Single Send.

This function performs a PATCH to the /marketing/singlesends/{id} endpoint.

This endpoint allows you to update a Single Send using a Single Send ID.

You only need to pass the fields you want to update. Any blank/missing fields will remain unaltered.

Get Single Sends Search.

This function performs a POST to the /marketing/singlesends/search endpoint.

This endpoint allows you to search for Single Sends based on specified criteria.

You can search for Single Sends by passing a combination of values using the name, status, and categories request body fields.

For example, if you want to search for all Single Sends that are “drafts” or “scheduled” and also associated with the category “shoes,” your request body may look like the example below.

{
  "status": [
    "draft",
    "scheduled"
  ],
  "categories": [
    "shoes"
  ],
}

Parameters:

  • page_size: i64
  • page_token: &str – The license key provided with your New Relic account.

Schedule Single Send.

This function performs a PUT to the /marketing/singlesends/{id}/schedule endpoint.

This endpoint allows you to schedule a Single Send for future delivery using a Single Send ID.

To schedule a Single Send, you must pass a date string in ISO 8601 time format (yyyy-MM-ddTHH:mm:ssZ) using the required send_at field. For example, the ISO 8601 format for 9:00 AM UTC on May 6, 2020 would be 2020-05-06T09:00:00Z. You may also pass the string "now" to send the Single Send immediately.

Delete Single Send Schedule.

This function performs a DELETE to the /marketing/singlesends/{id}/schedule endpoint.

This endpoint allows you to cancel a scheduled Single Send using a Single Send ID.

Making a DELETE request to this endpoint will cancel the scheduled sending of a Single Send. The request will not delete the Single Send itself. Deleting a Single Send can be done by passing a DELETE request to /marketing/singlesends/{id}.

Get All Categories.

This function performs a GET to the /marketing/singlesends/categories endpoint.

This endpoint allows you to retrieve all the categories associated with your Single Sends.

This endpoint will return your latest 1,000 categories.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Attaches the provided Context to this type, returning a WithContext wrapper. Read more
Attaches the current Context to this type, returning a WithContext wrapper. Read more
Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Instruments this type with the current Span, returning an Instrumented wrapper. Read more

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.
Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more