Documentation
¶
Overview ¶
Package mocks holds MockClient, a testify mock of client.AhaSendClient, with which tests run commands without calling the API, and fixtures of the resources commands print. APIResponse records a body behind a mocked result, as the real client does, so a test can check JSON output.
Index ¶
- Constants
- func APIResponse[T any](t testing.TB, body string) *T
- func NewAPIKey() *responses.APIKey
- func NewDomain() *responses.Domain
- func NewMessageResponse(messageID string) *responses.CreateMessageResponse
- func NewSubAccount() *responses.SubAccount
- func NewSubAccountUsage(removedReception int64) *responses.SubAccountUsageResponse
- type MockClient
- func (m *MockClient) BatchAddListContacts(listID uuid.UUID, req requests.BatchAddListContactsRequest, ...) (*responses.BatchAddListContactsResponse, error)
- func (m *MockClient) BatchUpsertContacts(req requests.BatchUpsertContactsRequest, opts ...api.RequestOption) (*responses.BatchUpsertContactsResponse, error)
- func (m *MockClient) CancelMessage(messageID string) (*common.SuccessResponse, error)
- func (m *MockClient) CheckDomainDNS(domain string) (*responses.Domain, error)
- func (m *MockClient) ConnectWebSocket(wsURL string, forceReconnect bool) (*client.WebSocketClient, error)
- func (m *MockClient) CreateAPIKey(req requests.CreateAPIKeyRequest, opts ...api.RequestOption) (*responses.APIKey, error)
- func (m *MockClient) CreateCampaign(req requests.CreateCampaignRequest, opts ...api.RequestOption) (*responses.Campaign, error)
- func (m *MockClient) CreateCampaignTemplate(req requests.CreateCampaignTemplateRequest, opts ...api.RequestOption) (*responses.CampaignTemplate, error)
- func (m *MockClient) CreateContact(req requests.CreateContactRequest, opts ...api.RequestOption) (*responses.Contact, error)
- func (m *MockClient) CreateDomain(req requests.CreateDomainRequest, opts ...api.RequestOption) (*responses.Domain, error)
- func (m *MockClient) CreateList(req requests.CreateListRequest, opts ...api.RequestOption) (*responses.ContactList, error)
- func (m *MockClient) CreateRoute(req requests.CreateRouteRequest, opts ...api.RequestOption) (*responses.Route, error)
- func (m *MockClient) CreateSMTPCredential(req requests.CreateSMTPCredentialRequest, opts ...api.RequestOption) (*responses.SMTPCredential, error)
- func (m *MockClient) CreateSegment(req requests.CreateSegmentRequest, opts ...api.RequestOption) (*responses.Segment, error)
- func (m *MockClient) CreateSubAccount(req requests.CreateSubAccountRequest, opts ...api.RequestOption) (*responses.SubAccount, error)
- func (m *MockClient) CreateSubAccountAPIKey(subAccountID uuid.UUID, req requests.CreateAPIKeyRequest, ...) (*responses.APIKey, error)
- func (m *MockClient) CreateSuppression(req requests.CreateSuppressionRequest, opts ...api.RequestOption) (*responses.CreateSuppressionResponse, error)
- func (m *MockClient) CreateTemplate(req requests.CreateTemplateRequest, opts ...api.RequestOption) (*responses.Template, error)
- func (m *MockClient) CreateWebhook(req requests.CreateWebhookRequest, opts ...api.RequestOption) (*responses.Webhook, error)
- func (m *MockClient) DeleteAPIKey(keyID uuid.UUID) (*common.SuccessResponse, error)
- func (m *MockClient) DeleteCampaign(campaignID uuid.UUID) (*common.SuccessResponse, error)
- func (m *MockClient) DeleteCampaignTemplate(templateID uuid.UUID) (*common.SuccessResponse, error)
- func (m *MockClient) DeleteContact(idOrEmail string) (*common.SuccessResponse, error)
- func (m *MockClient) DeleteDomain(domain string) (*common.SuccessResponse, error)
- func (m *MockClient) DeleteList(listID uuid.UUID) (*common.SuccessResponse, error)
- func (m *MockClient) DeleteListContact(listID uuid.UUID, idOrEmail string) (*common.SuccessResponse, error)
- func (m *MockClient) DeleteRoute(routeID uuid.UUID) (*common.SuccessResponse, error)
- func (m *MockClient) DeleteSMTPCredential(credentialID uuid.UUID) (*common.SuccessResponse, error)
- func (m *MockClient) DeleteSegment(segmentID uuid.UUID) (*common.SuccessResponse, error)
- func (m *MockClient) DeleteSubAccount(subAccountID uuid.UUID) (*common.SuccessResponse, error)
- func (m *MockClient) DeleteSubAccountAPIKey(subAccountID, keyID uuid.UUID) (*common.SuccessResponse, error)
- func (m *MockClient) DeleteSuppression(email string, domain *string) (*common.SuccessResponse, error)
- func (m *MockClient) DeleteTemplate(templateID uuid.UUID) (*common.SuccessResponse, error)
- func (m *MockClient) DeleteWebhook(webhookID uuid.UUID) (*common.SuccessResponse, error)
- func (m *MockClient) DiscardTemplateDraft(templateID uuid.UUID) (*responses.Template, error)
- func (m *MockClient) DuplicateCampaign(campaignID uuid.UUID, req requests.DuplicateCampaignRequest, ...) (*responses.Campaign, error)
- func (m *MockClient) GetAPIKey(keyID uuid.UUID) (*responses.APIKey, error)
- func (m *MockClient) GetAccount() (*responses.Account, error)
- func (m *MockClient) GetAccountID() string
- func (m *MockClient) GetBounceStatistics(params requests.GetBounceStatisticsParams) (*responses.BounceStatisticsResponse, error)
- func (m *MockClient) GetCampaign(campaignID uuid.UUID) (*responses.Campaign, error)
- func (m *MockClient) GetCampaignStats(campaignID uuid.UUID) (*responses.CampaignStats, error)
- func (m *MockClient) GetCampaignTemplate(templateID uuid.UUID) (*responses.CampaignTemplate, error)
- func (m *MockClient) GetContact(idOrEmail string) (*responses.Contact, error)
- func (m *MockClient) GetContactLists(idOrEmail string, params requests.GetContactListsParams) (*responses.PaginatedListContactsResponse, error)
- func (m *MockClient) GetContactSegments(idOrEmail string, params requests.GetContactSegmentsParams) (*responses.PaginatedSegmentsResponse, error)
- func (m *MockClient) GetContacts(params requests.GetContactsParams) (*responses.PaginatedContactsResponse, error)
- func (m *MockClient) GetDeliverabilityStatistics(params requests.GetDeliverabilityStatisticsParams) (*responses.DeliverabilityStatisticsResponse, error)
- func (m *MockClient) GetDeliveryTimeStatistics(params requests.GetDeliveryTimeStatisticsParams) (*responses.DeliveryTimeStatisticsResponse, error)
- func (m *MockClient) GetDomain(domain string) (*responses.Domain, error)
- func (m *MockClient) GetEmailStatistics(params requests.GetEmailStatisticsParams) (*responses.EmailStatisticsResponse, error)
- func (m *MockClient) GetList(listID uuid.UUID) (*responses.ContactList, error)
- func (m *MockClient) GetListContacts(listID uuid.UUID, params requests.GetListContactsParams) (*responses.PaginatedListContactsResponse, error)
- func (m *MockClient) GetLists(params requests.GetListsParams) (*responses.PaginatedContactListsResponse, error)
- func (m *MockClient) GetMessage(messageID string) (*responses.Message, error)
- func (m *MockClient) GetMessages(params requests.GetMessagesParams) (*responses.PaginatedMessagesResponse, error)
- func (m *MockClient) GetPublishedTemplate(templateID uuid.UUID) (*responses.Template, error)
- func (m *MockClient) GetRoute(routeID uuid.UUID) (*responses.Route, error)
- func (m *MockClient) GetSMTPCredential(credentialID uuid.UUID) (*responses.SMTPCredential, error)
- func (m *MockClient) GetSegment(segmentID uuid.UUID) (*responses.SegmentDetail, error)
- func (m *MockClient) GetSegmentContacts(segmentID uuid.UUID, params requests.GetSegmentContactsParams) (*responses.PaginatedSegmentContactsResponse, error)
- func (m *MockClient) GetSegments(params requests.GetSegmentsParams) (*responses.PaginatedSegmentsResponse, error)
- func (m *MockClient) GetSubAccount(subAccountID uuid.UUID) (*responses.SubAccount, error)
- func (m *MockClient) GetSubAccountAPIKey(subAccountID, keyID uuid.UUID) (*responses.APIKey, error)
- func (m *MockClient) GetSubAccountsUsage() (*responses.SubAccountUsageResponse, error)
- func (m *MockClient) GetTemplate(templateID uuid.UUID) (*responses.Template, error)
- func (m *MockClient) GetTemplateVersion(templateID, versionID uuid.UUID) (*responses.TemplateVersionDetail, error)
- func (m *MockClient) GetTemplateVersions(templateID uuid.UUID) (*responses.TemplateVersionsResponse, error)
- func (m *MockClient) GetTemplates(params requests.GetTemplatesParams) (*responses.PaginatedTemplatesResponse, error)
- func (m *MockClient) GetWebhook(webhookID uuid.UUID) (*responses.Webhook, error)
- func (m *MockClient) InitiateRouteStream(routeID *uuid.UUID, recipient string) (*client.RouteStreamResponse, error)
- func (m *MockClient) InitiateWebhookStream(webhookID *uuid.UUID) (*client.WebhookStreamResponse, error)
- func (m *MockClient) ListAPIKeys(pagination common.PaginationParams) (*responses.PaginatedAPIKeysResponse, error)
- func (m *MockClient) ListCampaignRecipients(campaignID uuid.UUID, params requests.ListCampaignRecipientsParams) (*responses.PaginatedCampaignRecipientsResponse, error)
- func (m *MockClient) ListCampaignTemplates(params requests.ListCampaignTemplatesParams) (*responses.PaginatedCampaignTemplatesResponse, error)
- func (m *MockClient) ListCampaigns(params requests.ListCampaignsParams) (*responses.PaginatedCampaignsResponse, error)
- func (m *MockClient) ListDomains(params requests.GetDomainsParams) (*responses.PaginatedDomainsResponse, error)
- func (m *MockClient) ListRoutes(params requests.GetRoutesParams) (*responses.PaginatedRoutesResponse, error)
- func (m *MockClient) ListSMTPCredentials(pagination common.PaginationParams) (*responses.PaginatedSMTPCredentialsResponse, error)
- func (m *MockClient) ListSubAccountAPIKeys(subAccountID uuid.UUID, pagination common.PaginationParams) (*responses.PaginatedAPIKeysResponse, error)
- func (m *MockClient) ListSubAccounts(pagination common.PaginationParams) (*responses.PaginatedSubAccountsResponse, error)
- func (m *MockClient) ListSuppressions(params requests.GetSuppressionsParams) (*responses.PaginatedSuppressionsResponse, error)
- func (m *MockClient) ListWebhooks(pagination common.PaginationParams, enabled *bool, events []string) (*responses.PaginatedWebhooksResponse, error)
- func (m *MockClient) Ping() (*common.SuccessResponse, error)
- func (m *MockClient) PreviewSegment(req requests.PreviewSegmentRequest) (*responses.SegmentPreview, error)
- func (m *MockClient) PublishTemplate(templateID uuid.UUID, opts ...api.RequestOption) (*responses.Template, error)
- func (m *MockClient) RestoreTemplateVersion(templateID, versionID uuid.UUID, req requests.RestoreTemplateVersionRequest, ...) (*responses.Template, error)
- func (m *MockClient) SendCampaign(campaignID uuid.UUID, req requests.SendCampaignRequest, ...) (*responses.CampaignSend, error)
- func (m *MockClient) SendMessageWithIdempotencyKey(req requests.CreateMessageRequest, idempotencyKey string) (*responses.CreateMessageResponse, error)
- func (m *MockClient) SendTemplateMessageWithIdempotencyKey(req requests.CreateTemplateMessageRequest, idempotencyKey string) (*responses.CreateMessageResponse, error)
- func (m *MockClient) SuspendSubAccount(subAccountID uuid.UUID, req requests.SuspendSubAccountRequest) (*responses.SubAccount, error)
- func (m *MockClient) TestCampaign(campaignID uuid.UUID, req requests.TestCampaignRequest, ...) (*responses.CampaignTest, error)
- func (m *MockClient) TriggerRoute(routeID uuid.UUID) (*common.SuccessResponse, error)
- func (m *MockClient) TriggerWebhook(webhookID uuid.UUID, events []string) (*common.SuccessResponse, error)
- func (m *MockClient) UnpauseSubAccountDomain(subAccountID uuid.UUID, domain string) (*responses.Domain, error)
- func (m *MockClient) UnscheduleCampaign(campaignID uuid.UUID, opts ...api.RequestOption) (*responses.Campaign, error)
- func (m *MockClient) UnsuspendSubAccount(subAccountID uuid.UUID) (*responses.SubAccount, error)
- func (m *MockClient) UpdateAPIKey(keyID uuid.UUID, req requests.UpdateAPIKeyRequest) (*responses.APIKey, error)
- func (m *MockClient) UpdateCampaign(campaignID uuid.UUID, req requests.UpdateCampaignRequest, ...) (*responses.Campaign, error)
- func (m *MockClient) UpdateCampaignTemplate(templateID uuid.UUID, req requests.UpdateCampaignTemplateRequest, ...) (*responses.CampaignTemplate, error)
- func (m *MockClient) UpdateContact(idOrEmail string, req requests.UpdateContactRequest) (*responses.Contact, error)
- func (m *MockClient) UpdateDomain(domain string, req requests.UpdateDomainRequest) (*responses.Domain, error)
- func (m *MockClient) UpdateList(listID uuid.UUID, req requests.UpdateListRequest) (*responses.ContactList, error)
- func (m *MockClient) UpdateRoute(routeID uuid.UUID, req requests.UpdateRouteRequest) (*responses.Route, error)
- func (m *MockClient) UpdateSegment(segmentID uuid.UUID, req requests.UpdateSegmentRequest) (*responses.Segment, error)
- func (m *MockClient) UpdateSubAccount(subAccountID uuid.UUID, req requests.UpdateSubAccountRequest) (*responses.SubAccount, error)
- func (m *MockClient) UpdateSubAccountAPIKey(subAccountID, keyID uuid.UUID, req requests.UpdateAPIKeyRequest) (*responses.APIKey, error)
- func (m *MockClient) UpdateTemplate(templateID uuid.UUID, req requests.UpdateTemplateRequest, ...) (*responses.Template, error)
- func (m *MockClient) UpdateWebhook(webhookID uuid.UUID, req requests.UpdateWebhookRequest) (*responses.Webhook, error)
- func (m *MockClient) UpsertListContact(listID uuid.UUID, idOrEmail string, req requests.UpsertListContactRequest) (*responses.ListContact, error)
- func (m *MockClient) WipeSuppressions(domain *string) (*common.SuccessResponse, error)
Constants ¶
const ( // FixtureSubAccountID is the ID of NewSubAccount and the account of // NewAPIKey. FixtureSubAccountID = "11111111-1111-1111-1111-111111111111" // FixtureParentAccountID is the parent account of NewSubAccount. FixtureParentAccountID = "22222222-2222-2222-2222-222222222222" // FixtureAPIKeyID is the ID of NewAPIKey. FixtureAPIKeyID = "44444444-4444-4444-4444-444444444444" // FixtureDomainID is the ID of NewDomain, which belongs to the account // FixtureSubAccountID. FixtureDomainID = "55555555-5555-4555-8555-555555555555" )
Variables ¶
This section is empty.
Functions ¶
func APIResponse ¶ added in v0.3.0
APIResponse decodes body into a new T, records body as the API response behind it, and returns it for use in a mock's Return. Table and plain output then see the decoded struct, and JSON output sees body.
func NewAPIKey ¶ added in v0.3.0
NewAPIKey returns an API key of the sub-account of NewSubAccount, without scopes, IP allow list or secret key.
func NewDomain ¶ added in v0.3.0
NewDomain returns the domain example.com with a DMARC and a tracking DNS record.
func NewMessageResponse ¶ added in v0.3.0
func NewMessageResponse(messageID string) *responses.CreateMessageResponse
NewMessageResponse returns the response of a send to one recipient, whose message has the ID messageID.
func NewSubAccount ¶ added in v0.3.0
func NewSubAccount() *responses.SubAccount
NewSubAccount returns a sub-account with every field set.
func NewSubAccountUsage ¶ added in v0.3.0
func NewSubAccountUsage(removedReception int64) *responses.SubAccountUsageResponse
NewSubAccountUsage returns the June 2026 usage of the parent account and one sub-account, with removedReception messages of removed sub-accounts.
Types ¶
type MockClient ¶
MockClient is a mock implementation of the AhaSendClient interface
func (*MockClient) BatchAddListContacts ¶ added in v0.3.0
func (m *MockClient) BatchAddListContacts(listID uuid.UUID, req requests.BatchAddListContactsRequest, opts ...api.RequestOption) (*responses.BatchAddListContactsResponse, error)
func (*MockClient) BatchUpsertContacts ¶ added in v0.3.0
func (m *MockClient) BatchUpsertContacts(req requests.BatchUpsertContactsRequest, opts ...api.RequestOption) (*responses.BatchUpsertContactsResponse, error)
func (*MockClient) CancelMessage ¶
func (m *MockClient) CancelMessage(messageID string) (*common.SuccessResponse, error)
func (*MockClient) CheckDomainDNS ¶
func (m *MockClient) CheckDomainDNS(domain string) (*responses.Domain, error)
func (*MockClient) ConnectWebSocket ¶
func (m *MockClient) ConnectWebSocket(wsURL string, forceReconnect bool) (*client.WebSocketClient, error)
func (*MockClient) CreateAPIKey ¶
func (m *MockClient) CreateAPIKey(req requests.CreateAPIKeyRequest, opts ...api.RequestOption) (*responses.APIKey, error)
func (*MockClient) CreateCampaign ¶ added in v0.3.0
func (m *MockClient) CreateCampaign(req requests.CreateCampaignRequest, opts ...api.RequestOption) (*responses.Campaign, error)
func (*MockClient) CreateCampaignTemplate ¶ added in v0.3.0
func (m *MockClient) CreateCampaignTemplate(req requests.CreateCampaignTemplateRequest, opts ...api.RequestOption) (*responses.CampaignTemplate, error)
func (*MockClient) CreateContact ¶ added in v0.3.0
func (m *MockClient) CreateContact(req requests.CreateContactRequest, opts ...api.RequestOption) (*responses.Contact, error)
func (*MockClient) CreateDomain ¶
func (m *MockClient) CreateDomain(req requests.CreateDomainRequest, opts ...api.RequestOption) (*responses.Domain, error)
func (*MockClient) CreateList ¶ added in v0.3.0
func (m *MockClient) CreateList(req requests.CreateListRequest, opts ...api.RequestOption) (*responses.ContactList, error)
func (*MockClient) CreateRoute ¶
func (m *MockClient) CreateRoute(req requests.CreateRouteRequest, opts ...api.RequestOption) (*responses.Route, error)
func (*MockClient) CreateSMTPCredential ¶
func (m *MockClient) CreateSMTPCredential(req requests.CreateSMTPCredentialRequest, opts ...api.RequestOption) (*responses.SMTPCredential, error)
func (*MockClient) CreateSegment ¶ added in v0.4.0
func (m *MockClient) CreateSegment(req requests.CreateSegmentRequest, opts ...api.RequestOption) (*responses.Segment, error)
func (*MockClient) CreateSubAccount ¶
func (m *MockClient) CreateSubAccount(req requests.CreateSubAccountRequest, opts ...api.RequestOption) (*responses.SubAccount, error)
func (*MockClient) CreateSubAccountAPIKey ¶
func (m *MockClient) CreateSubAccountAPIKey(subAccountID uuid.UUID, req requests.CreateAPIKeyRequest, opts ...api.RequestOption) (*responses.APIKey, error)
func (*MockClient) CreateSuppression ¶
func (m *MockClient) CreateSuppression(req requests.CreateSuppressionRequest, opts ...api.RequestOption) (*responses.CreateSuppressionResponse, error)
func (*MockClient) CreateTemplate ¶ added in v0.3.0
func (m *MockClient) CreateTemplate(req requests.CreateTemplateRequest, opts ...api.RequestOption) (*responses.Template, error)
func (*MockClient) CreateWebhook ¶
func (m *MockClient) CreateWebhook(req requests.CreateWebhookRequest, opts ...api.RequestOption) (*responses.Webhook, error)
func (*MockClient) DeleteAPIKey ¶
func (m *MockClient) DeleteAPIKey(keyID uuid.UUID) (*common.SuccessResponse, error)
func (*MockClient) DeleteCampaign ¶ added in v0.3.0
func (m *MockClient) DeleteCampaign(campaignID uuid.UUID) (*common.SuccessResponse, error)
func (*MockClient) DeleteCampaignTemplate ¶ added in v0.3.0
func (m *MockClient) DeleteCampaignTemplate(templateID uuid.UUID) (*common.SuccessResponse, error)
func (*MockClient) DeleteContact ¶ added in v0.3.0
func (m *MockClient) DeleteContact(idOrEmail string) (*common.SuccessResponse, error)
func (*MockClient) DeleteDomain ¶
func (m *MockClient) DeleteDomain(domain string) (*common.SuccessResponse, error)
func (*MockClient) DeleteList ¶ added in v0.3.0
func (m *MockClient) DeleteList(listID uuid.UUID) (*common.SuccessResponse, error)
func (*MockClient) DeleteListContact ¶ added in v0.3.0
func (m *MockClient) DeleteListContact(listID uuid.UUID, idOrEmail string) (*common.SuccessResponse, error)
func (*MockClient) DeleteRoute ¶
func (m *MockClient) DeleteRoute(routeID uuid.UUID) (*common.SuccessResponse, error)
func (*MockClient) DeleteSMTPCredential ¶
func (m *MockClient) DeleteSMTPCredential(credentialID uuid.UUID) (*common.SuccessResponse, error)
func (*MockClient) DeleteSegment ¶ added in v0.4.0
func (m *MockClient) DeleteSegment(segmentID uuid.UUID) (*common.SuccessResponse, error)
func (*MockClient) DeleteSubAccount ¶
func (m *MockClient) DeleteSubAccount(subAccountID uuid.UUID) (*common.SuccessResponse, error)
func (*MockClient) DeleteSubAccountAPIKey ¶
func (m *MockClient) DeleteSubAccountAPIKey(subAccountID, keyID uuid.UUID) (*common.SuccessResponse, error)
func (*MockClient) DeleteSuppression ¶
func (m *MockClient) DeleteSuppression(email string, domain *string) (*common.SuccessResponse, error)
func (*MockClient) DeleteTemplate ¶ added in v0.3.0
func (m *MockClient) DeleteTemplate(templateID uuid.UUID) (*common.SuccessResponse, error)
func (*MockClient) DeleteWebhook ¶
func (m *MockClient) DeleteWebhook(webhookID uuid.UUID) (*common.SuccessResponse, error)
func (*MockClient) DiscardTemplateDraft ¶ added in v0.3.0
func (*MockClient) DuplicateCampaign ¶ added in v0.3.0
func (m *MockClient) DuplicateCampaign(campaignID uuid.UUID, req requests.DuplicateCampaignRequest, opts ...api.RequestOption) (*responses.Campaign, error)
func (*MockClient) GetAccount ¶
func (m *MockClient) GetAccount() (*responses.Account, error)
func (*MockClient) GetAccountID ¶
func (m *MockClient) GetAccountID() string
func (*MockClient) GetBounceStatistics ¶
func (m *MockClient) GetBounceStatistics(params requests.GetBounceStatisticsParams) (*responses.BounceStatisticsResponse, error)
func (*MockClient) GetCampaign ¶ added in v0.3.0
func (*MockClient) GetCampaignStats ¶ added in v0.3.0
func (m *MockClient) GetCampaignStats(campaignID uuid.UUID) (*responses.CampaignStats, error)
func (*MockClient) GetCampaignTemplate ¶ added in v0.3.0
func (m *MockClient) GetCampaignTemplate(templateID uuid.UUID) (*responses.CampaignTemplate, error)
func (*MockClient) GetContact ¶ added in v0.3.0
func (m *MockClient) GetContact(idOrEmail string) (*responses.Contact, error)
func (*MockClient) GetContactLists ¶ added in v0.3.0
func (m *MockClient) GetContactLists(idOrEmail string, params requests.GetContactListsParams) (*responses.PaginatedListContactsResponse, error)
func (*MockClient) GetContactSegments ¶ added in v0.4.0
func (m *MockClient) GetContactSegments(idOrEmail string, params requests.GetContactSegmentsParams) (*responses.PaginatedSegmentsResponse, error)
func (*MockClient) GetContacts ¶ added in v0.3.0
func (m *MockClient) GetContacts(params requests.GetContactsParams) (*responses.PaginatedContactsResponse, error)
func (*MockClient) GetDeliverabilityStatistics ¶
func (m *MockClient) GetDeliverabilityStatistics(params requests.GetDeliverabilityStatisticsParams) (*responses.DeliverabilityStatisticsResponse, error)
Statistics operations methods
func (*MockClient) GetDeliveryTimeStatistics ¶
func (m *MockClient) GetDeliveryTimeStatistics(params requests.GetDeliveryTimeStatisticsParams) (*responses.DeliveryTimeStatisticsResponse, error)
func (*MockClient) GetDomain ¶
func (m *MockClient) GetDomain(domain string) (*responses.Domain, error)
func (*MockClient) GetEmailStatistics ¶ added in v0.5.0
func (m *MockClient) GetEmailStatistics(params requests.GetEmailStatisticsParams) (*responses.EmailStatisticsResponse, error)
func (*MockClient) GetList ¶ added in v0.3.0
func (m *MockClient) GetList(listID uuid.UUID) (*responses.ContactList, error)
func (*MockClient) GetListContacts ¶ added in v0.3.0
func (m *MockClient) GetListContacts(listID uuid.UUID, params requests.GetListContactsParams) (*responses.PaginatedListContactsResponse, error)
func (*MockClient) GetLists ¶ added in v0.3.0
func (m *MockClient) GetLists(params requests.GetListsParams) (*responses.PaginatedContactListsResponse, error)
func (*MockClient) GetMessage ¶
func (m *MockClient) GetMessage(messageID string) (*responses.Message, error)
func (*MockClient) GetMessages ¶
func (m *MockClient) GetMessages(params requests.GetMessagesParams) (*responses.PaginatedMessagesResponse, error)
func (*MockClient) GetPublishedTemplate ¶ added in v0.4.0
func (*MockClient) GetSMTPCredential ¶
func (m *MockClient) GetSMTPCredential(credentialID uuid.UUID) (*responses.SMTPCredential, error)
func (*MockClient) GetSegment ¶ added in v0.4.0
func (m *MockClient) GetSegment(segmentID uuid.UUID) (*responses.SegmentDetail, error)
func (*MockClient) GetSegmentContacts ¶ added in v0.4.0
func (m *MockClient) GetSegmentContacts(segmentID uuid.UUID, params requests.GetSegmentContactsParams) (*responses.PaginatedSegmentContactsResponse, error)
func (*MockClient) GetSegments ¶ added in v0.4.0
func (m *MockClient) GetSegments(params requests.GetSegmentsParams) (*responses.PaginatedSegmentsResponse, error)
func (*MockClient) GetSubAccount ¶
func (m *MockClient) GetSubAccount(subAccountID uuid.UUID) (*responses.SubAccount, error)
func (*MockClient) GetSubAccountAPIKey ¶
func (*MockClient) GetSubAccountsUsage ¶
func (m *MockClient) GetSubAccountsUsage() (*responses.SubAccountUsageResponse, error)
func (*MockClient) GetTemplate ¶ added in v0.3.0
func (*MockClient) GetTemplateVersion ¶ added in v0.3.0
func (m *MockClient) GetTemplateVersion(templateID, versionID uuid.UUID) (*responses.TemplateVersionDetail, error)
func (*MockClient) GetTemplateVersions ¶ added in v0.3.0
func (m *MockClient) GetTemplateVersions(templateID uuid.UUID) (*responses.TemplateVersionsResponse, error)
func (*MockClient) GetTemplates ¶ added in v0.3.0
func (m *MockClient) GetTemplates(params requests.GetTemplatesParams) (*responses.PaginatedTemplatesResponse, error)
func (*MockClient) GetWebhook ¶
func (*MockClient) InitiateRouteStream ¶
func (m *MockClient) InitiateRouteStream(routeID *uuid.UUID, recipient string) (*client.RouteStreamResponse, error)
func (*MockClient) InitiateWebhookStream ¶
func (m *MockClient) InitiateWebhookStream(webhookID *uuid.UUID) (*client.WebhookStreamResponse, error)
func (*MockClient) ListAPIKeys ¶
func (m *MockClient) ListAPIKeys(pagination common.PaginationParams) (*responses.PaginatedAPIKeysResponse, error)
API Key operations methods
func (*MockClient) ListCampaignRecipients ¶ added in v0.3.0
func (m *MockClient) ListCampaignRecipients(campaignID uuid.UUID, params requests.ListCampaignRecipientsParams) (*responses.PaginatedCampaignRecipientsResponse, error)
func (*MockClient) ListCampaignTemplates ¶ added in v0.3.0
func (m *MockClient) ListCampaignTemplates(params requests.ListCampaignTemplatesParams) (*responses.PaginatedCampaignTemplatesResponse, error)
func (*MockClient) ListCampaigns ¶ added in v0.3.0
func (m *MockClient) ListCampaigns(params requests.ListCampaignsParams) (*responses.PaginatedCampaignsResponse, error)
func (*MockClient) ListDomains ¶
func (m *MockClient) ListDomains(params requests.GetDomainsParams) (*responses.PaginatedDomainsResponse, error)
func (*MockClient) ListRoutes ¶
func (m *MockClient) ListRoutes(params requests.GetRoutesParams) (*responses.PaginatedRoutesResponse, error)
func (*MockClient) ListSMTPCredentials ¶
func (m *MockClient) ListSMTPCredentials(pagination common.PaginationParams) (*responses.PaginatedSMTPCredentialsResponse, error)
func (*MockClient) ListSubAccountAPIKeys ¶
func (m *MockClient) ListSubAccountAPIKeys(subAccountID uuid.UUID, pagination common.PaginationParams) (*responses.PaginatedAPIKeysResponse, error)
Sub-account API key operations methods
func (*MockClient) ListSubAccounts ¶
func (m *MockClient) ListSubAccounts(pagination common.PaginationParams) (*responses.PaginatedSubAccountsResponse, error)
Sub-account operations methods
func (*MockClient) ListSuppressions ¶
func (m *MockClient) ListSuppressions(params requests.GetSuppressionsParams) (*responses.PaginatedSuppressionsResponse, error)
func (*MockClient) ListWebhooks ¶
func (m *MockClient) ListWebhooks(pagination common.PaginationParams, enabled *bool, events []string) (*responses.PaginatedWebhooksResponse, error)
func (*MockClient) Ping ¶
func (m *MockClient) Ping() (*common.SuccessResponse, error)
func (*MockClient) PreviewSegment ¶ added in v0.4.0
func (m *MockClient) PreviewSegment(req requests.PreviewSegmentRequest) (*responses.SegmentPreview, error)
func (*MockClient) PublishTemplate ¶ added in v0.3.0
func (m *MockClient) PublishTemplate(templateID uuid.UUID, opts ...api.RequestOption) (*responses.Template, error)
func (*MockClient) RestoreTemplateVersion ¶ added in v0.3.0
func (m *MockClient) RestoreTemplateVersion(templateID, versionID uuid.UUID, req requests.RestoreTemplateVersionRequest, opts ...api.RequestOption) (*responses.Template, error)
func (*MockClient) SendCampaign ¶ added in v0.3.0
func (m *MockClient) SendCampaign(campaignID uuid.UUID, req requests.SendCampaignRequest, opts ...api.RequestOption) (*responses.CampaignSend, error)
func (*MockClient) SendMessageWithIdempotencyKey ¶
func (m *MockClient) SendMessageWithIdempotencyKey(req requests.CreateMessageRequest, idempotencyKey string) (*responses.CreateMessageResponse, error)
func (*MockClient) SendTemplateMessageWithIdempotencyKey ¶ added in v0.3.0
func (m *MockClient) SendTemplateMessageWithIdempotencyKey(req requests.CreateTemplateMessageRequest, idempotencyKey string) (*responses.CreateMessageResponse, error)
func (*MockClient) SuspendSubAccount ¶
func (m *MockClient) SuspendSubAccount(subAccountID uuid.UUID, req requests.SuspendSubAccountRequest) (*responses.SubAccount, error)
func (*MockClient) TestCampaign ¶ added in v0.3.0
func (m *MockClient) TestCampaign(campaignID uuid.UUID, req requests.TestCampaignRequest, opts ...api.RequestOption) (*responses.CampaignTest, error)
func (*MockClient) TriggerRoute ¶
func (m *MockClient) TriggerRoute(routeID uuid.UUID) (*common.SuccessResponse, error)
func (*MockClient) TriggerWebhook ¶
func (m *MockClient) TriggerWebhook(webhookID uuid.UUID, events []string) (*common.SuccessResponse, error)
func (*MockClient) UnpauseSubAccountDomain ¶ added in v0.3.0
func (*MockClient) UnscheduleCampaign ¶ added in v0.3.0
func (m *MockClient) UnscheduleCampaign(campaignID uuid.UUID, opts ...api.RequestOption) (*responses.Campaign, error)
func (*MockClient) UnsuspendSubAccount ¶
func (m *MockClient) UnsuspendSubAccount(subAccountID uuid.UUID) (*responses.SubAccount, error)
func (*MockClient) UpdateAPIKey ¶
func (m *MockClient) UpdateAPIKey(keyID uuid.UUID, req requests.UpdateAPIKeyRequest) (*responses.APIKey, error)
func (*MockClient) UpdateCampaign ¶ added in v0.3.0
func (m *MockClient) UpdateCampaign(campaignID uuid.UUID, req requests.UpdateCampaignRequest, opts ...api.RequestOption) (*responses.Campaign, error)
func (*MockClient) UpdateCampaignTemplate ¶ added in v0.3.0
func (m *MockClient) UpdateCampaignTemplate(templateID uuid.UUID, req requests.UpdateCampaignTemplateRequest, opts ...api.RequestOption) (*responses.CampaignTemplate, error)
func (*MockClient) UpdateContact ¶ added in v0.3.0
func (m *MockClient) UpdateContact(idOrEmail string, req requests.UpdateContactRequest) (*responses.Contact, error)
func (*MockClient) UpdateDomain ¶
func (m *MockClient) UpdateDomain(domain string, req requests.UpdateDomainRequest) (*responses.Domain, error)
func (*MockClient) UpdateList ¶ added in v0.3.0
func (m *MockClient) UpdateList(listID uuid.UUID, req requests.UpdateListRequest) (*responses.ContactList, error)
func (*MockClient) UpdateRoute ¶
func (m *MockClient) UpdateRoute(routeID uuid.UUID, req requests.UpdateRouteRequest) (*responses.Route, error)
func (*MockClient) UpdateSegment ¶ added in v0.4.0
func (m *MockClient) UpdateSegment(segmentID uuid.UUID, req requests.UpdateSegmentRequest) (*responses.Segment, error)
func (*MockClient) UpdateSubAccount ¶
func (m *MockClient) UpdateSubAccount(subAccountID uuid.UUID, req requests.UpdateSubAccountRequest) (*responses.SubAccount, error)
func (*MockClient) UpdateSubAccountAPIKey ¶
func (m *MockClient) UpdateSubAccountAPIKey(subAccountID, keyID uuid.UUID, req requests.UpdateAPIKeyRequest) (*responses.APIKey, error)
func (*MockClient) UpdateTemplate ¶ added in v0.3.0
func (m *MockClient) UpdateTemplate(templateID uuid.UUID, req requests.UpdateTemplateRequest, opts ...api.RequestOption) (*responses.Template, error)
func (*MockClient) UpdateWebhook ¶
func (m *MockClient) UpdateWebhook(webhookID uuid.UUID, req requests.UpdateWebhookRequest) (*responses.Webhook, error)
func (*MockClient) UpsertListContact ¶ added in v0.3.0
func (m *MockClient) UpsertListContact(listID uuid.UUID, idOrEmail string, req requests.UpsertListContactRequest) (*responses.ListContact, error)
func (*MockClient) WipeSuppressions ¶
func (m *MockClient) WipeSuppressions(domain *string) (*common.SuccessResponse, error)