pub struct Contacts<'a> {
pub client: &'a Client,
}
Expand description
The Contacts Service handles the contacts endpoint of the DNSimple API.
Fields§
§client: &'a Client
Implementations§
source§impl Contacts<'_>
impl Contacts<'_>
sourcepub fn list_contacts(
&self,
account_id: u64,
options: Option<RequestOptions>
) -> Result<DNSimpleResponse<Vec<Contact>>, DNSimpleError>
pub fn list_contacts( &self, account_id: u64, options: Option<RequestOptions> ) -> Result<DNSimpleResponse<Vec<Contact>>, DNSimpleError>
Lists the contacts in the account.
Arguments
account_id
: The account ID
options
: The RequestOptions
- Sort: id
, label
, email
sourcepub fn create_contact(
&self,
account_id: u64,
payload: ContactPayload
) -> Result<DNSimpleResponse<Contact>, DNSimpleError>
pub fn create_contact( &self, account_id: u64, payload: ContactPayload ) -> Result<DNSimpleResponse<Contact>, DNSimpleError>
Create a contact in the account.
Arguments
account_id
: The account ID
payload
: The ContactPayload
with the information needed to create the contact
sourcepub fn get_contact(
&self,
account_id: u64,
contact: u64
) -> Result<DNSimpleResponse<Contact>, DNSimpleError>
pub fn get_contact( &self, account_id: u64, contact: u64 ) -> Result<DNSimpleResponse<Contact>, DNSimpleError>
sourcepub fn update_contact(
&self,
account_id: u64,
contact: u64,
payload: ContactPayload
) -> Result<DNSimpleResponse<Contact>, DNSimpleError>
pub fn update_contact( &self, account_id: u64, contact: u64, payload: ContactPayload ) -> Result<DNSimpleResponse<Contact>, DNSimpleError>
Update a contact
Arguments
account_id
: The account ID
contact
: The contact id
payload
: The ContactPayload
with the information needed to update the contact