aircall

package module
v1.0.7 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 18, 2024 License: MIT Imports: 11 Imported by: 0

README

go-aircall-api

A Aircall API Golang Wrapper for the Aircall API

Install

$ go get github.com/dinistavares/go-aircall-api

Usage

Import the Aircall package.

import "github.com/dinistavares/go-aircall-api"

Create a new Aircall Client and use the provided services.

  client := aircall.New()

  // List Aircall calls
  calls, _, err := client.Call.List(nil)

Authenticate

Authenticate with access token for OAuth app

import (
  "github.com/dinistavares/go-aircall-api"
)

func main(){
  accessToken := "xxxxxxx"

  client := aircall.New()
  client.Authenticate(accessToken)

  // List Aircall calls
  calls, _, err := client.Call.List(nil)
}

Authenticate with api_key and api_token for Aircall customers

import (
  "github.com/dinistavares/go-aircall-api"
)

func main(){
  apiKey := "xxxxxxx"
  apiToken := "xxxxxxx"

  client := aircall.New()
  client.AuthenticateBasic(apiKey, apiToken)

  // List Aircall calls
  calls, _, err := client.Call.List(nil)
}

Examples

Calls

List calls

  // Create query filter and set 'from' and 'to'
  opts := client.Call.Query().NewListCalls()
  opts.From("1728722536")
  opts.To("1728922536")

  response, _, err := client.Call.List(opts)

Get call by ID

  id := 23456

  response, _, err := client.Call.GetByID(id)

Search calls

  opts := client.Call.Query().NewSearchCalls()
  opts.From("1728722536")
  opts.To("1728922536")
  opts.Direction("inbound")

  response, _, err := client.Call.Search(opts)

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type A2PCampaignAssociation

type A2PCampaignAssociation struct {
	ID            int         `json:"id,omitempty"`
	CompanyID     int         `json:"company_id,omitempty"`
	ExternalID    string      `json:"external_id,omitempty"`
	UpdateStatus  string      `json:"update_status,omitempty"`
	UpdateMessage string      `json:"update_message,omitempty"`
	CreatedAt     interface{} `json:"created_at,omitempty"`
	UpdatedAt     interface{} `json:"updated_at,omitempty"`
	Numbers       *[]int      `json:"numbers,omitempty"`
}

type A2PCampaignAssociationResponse

type A2PCampaignAssociationResponse struct {
	Contact *A2PCampaignAssociation `json:"a2p_campaign_associations,omitempty"`
}

type A2PCampaignAssociationsQueries

type A2PCampaignAssociationsQueries struct{}

func (A2PCampaignAssociationsQueries) NewListA2PCampaignAssociations

func (pq A2PCampaignAssociationsQueries) NewListA2PCampaignAssociations() *ListA2PCampaignAssociationsQueryParams

Creates Query parameters for 'ListContacts'

type A2PCampaignAssociationsResponse

type A2PCampaignAssociationsResponse struct {
	Meta     *GenericResponseMeta      `json:"meta,omitempty"`
	Contacts *[]A2PCampaignAssociation `json:"a2p_campaign_associations,omitempty"`
}

type A2PCampaignAssociationsService

type A2PCampaignAssociationsService service

A2P Campaign Associations service

func (*A2PCampaignAssociationsService) Create

Create A2P campaign association. Reference: https://developer.aircall.io/api-references/#create-an-a2p-campaign-association

func (*A2PCampaignAssociationsService) Delete

func (service *A2PCampaignAssociationsService) Delete(a2pCampaignAssociationID int) (*Response, error)

Delete a contact. Reference: https://developer.aircall.io/api-references/#delete-an-a2p-campaign-association

func (*A2PCampaignAssociationsService) List

Get all A2P campaign associations. Reference: https://developer.aircall.io/api-references/#list-a2p-campaign-associations

func (*A2PCampaignAssociationsService) Query

Create Query parameters for accounts routes.

func (*A2PCampaignAssociationsService) Update

Update A2P campaign association. Reference: https://developer.aircall.io/api-references/#update-an-a2p-campaign-association

type ApiType

type ApiType string

type Call

type Call struct {
	ID                 int                `json:"id,omitempty"`
	Sid                string             `json:"sid,omitempty"`
	DirectLink         string             `json:"direct_link,omitempty"`
	Direction          string             `json:"direction,omitempty"`
	Status             string             `json:"status,omitempty"`
	MissedCallReason   string             `json:"missed_call_reason,omitempty"`
	StartedAt          int                `json:"started_at,omitempty"`
	AnsweredAt         int                `json:"answered_at,omitempty"`
	EndedAt            int                `json:"ended_at,omitempty"`
	Duration           int                `json:"duration,omitempty"`
	Voicemail          string             `json:"voicemail,omitempty"`
	Recording          string             `json:"recording,omitempty"`
	Asset              string             `json:"asset,omitempty"`
	RawDigits          string             `json:"raw_digits,omitempty"`
	Archived           bool               `json:"archived,omitempty"`
	Cost               string             `json:"cost,omitempty"`
	Contact            *Contact           `json:"contact,omitempty"`
	Number             *Number            `json:"number,omitempty"`
	User               *User              `json:"user,omitempty"`
	TransferredBy      *User              `json:"transferred_by,omitempty"`
	TransferredTo      *User              `json:"transferred_to,omitempty"`
	AssignedTo         *User              `json:"assigned_to,omitempty"`
	IvrOptionsSelected *CallIVROption     `json:"ivr_options_selected,omitempty"`
	Comments           *[]CallComment     `json:"comments,omitempty"`
	Tags               *[]CallTag         `json:"tags,omitempty"`
	Participants       *[]CallParticipant `json:"participants,omitempty"`
	Teams              *[]Team            `json:"teams,omitempty"`
}

type CallActionBy

type CallActionBy struct {
	ID                 int         `json:"id,omitempty"`
	DirectLink         string      `json:"direct_link,omitempty"`
	Name               string      `json:"name,omitempty"`
	Email              string      `json:"email,omitempty"`
	Available          bool        `json:"available,omitempty"`
	AvailabilityStatus string      `json:"availability_status,omitempty"`
	CreatedAt          interface{} `json:"created_at,omitempty"`
	TimeZone           string      `json:"time_zone,omitempty"`
	Language           string      `json:"language,omitempty"`
	State              string      `json:"state,omitempty"`

	// Included in Webhook event only
	Substatus string `json:"substatus,omitempty"`
}

type CallComment

type CallComment struct {
	ID       int           `json:"id,omitempty"`
	Content  string        `json:"content,omitempty"`
	PostedAt int           `json:"posted_at,omitempty"`
	PostedBy *CallActionBy `json:"posted_by,omitempty"`
}

type CallIVROption added in v1.0.1

type CallIVROption struct {
	ID                  string      `json:"id,omitempty"`
	Title               string      `json:"title,omitempty"`
	Key                 string      `json:"key,omitempty"`
	Branch              string      `json:"branch,omitempty"`
	CreatedAt           interface{} `json:"created_at,omitempty"`
	TransitionStartedAt string      `json:"transition_started_at,omitempty"`
	TransitionEndedAt   string      `json:"transition_ended_at,omitempty"`
}

type CallInsightCard

type CallInsightCard struct {
	Contents *[]CallInsightCardContents `json:"contents,omitempty"`
}

type CallInsightCardContents

type CallInsightCardContents struct {
	Type   string `json:"type,omitempty"`
	Text   string `json:"text,omitempty"`
	Link   string `json:"link,omitempty"`
	Label  string `json:"label,omitempty"`
	UserID int    `json:"user_id,omitempty"`
}

type CallParticipant

type CallParticipant struct {
	ID          *string `json:"id,omitempty"`
	Type        string  `json:"type,omitempty"`
	Name        *string `json:"name,omitempty"`
	PhoneNumber *string `json:"phone_number,omitempty"`
}

type CallQueries

type CallQueries struct{}

func (CallQueries) NewListCalls

func (pq CallQueries) NewListCalls() *ListCallsQueryParams

Creates Query parameters for 'List'

func (CallQueries) NewSearchCalls

func (pq CallQueries) NewSearchCalls() *SearchCallsQueryParams

Creates Query parameters for 'SearchCalls'

type CallResponse

type CallResponse struct {
	Call *Call `json:"call,omitempty"`
}

type CallTag

type CallTag struct {
	ID        int           `json:"id,omitempty"`
	Name      string        `json:"name,omitempty"`
	CreatedAt interface{}   `json:"created_at,omitempty"`
	TaggedBy  *CallActionBy `json:"tagged_by,omitempty"`

	// Included in Webhook event only
	TaggedAt int `json:"tagged_at,omitempty"`
}

type CallTags

type CallTags struct {
	Tags []int `json:"tags,omitempty"`
}

type CallTransfer

type CallTransfer struct {
	UserID              string `json:"user_id,omitempty"`
	TeamID              string `json:"team_id,omitempty"`
	Number              string `json:"number,omitempty"`
	DispatchingStrategy string `json:"dispatching_strategy,omitempty"`
}

type CallsResponse

type CallsResponse struct {
	Meta  *GenericResponseMeta `json:"meta,omitempty"`
	Calls *[]Call              `json:"calls,omitempty"`
}

type CallsService

type CallsService service

Call service

func (*CallsService) AddInsightCard

func (service *CallsService) AddInsightCard(callID int, insightCard *CallInsightCard) (*Response, error)

Add insight card to call. Reference: https://developer.aircall.io/api-references/#insight-cards

func (*CallsService) Archive

func (service *CallsService) Archive(callID int) (*CallResponse, *Response, error)

Archive a call. Reference: https://developer.aircall.io/api-references/#archive-a-call

func (*CallsService) Comment

func (service *CallsService) Comment(callID int, comment string) (*Response, error)

Comment a call. Reference: https://developer.aircall.io/api-references/#comment-a-call

func (*CallsService) DeleteRecording

func (service *CallsService) DeleteRecording(callID int) (*Response, error)

Delete call recording. Reference: https://developer.aircall.io/api-references/#delete-call-recording

func (*CallsService) DeleteVoicemail

func (service *CallsService) DeleteVoicemail(callID int) (*Response, error)

Delete call voicemail. Reference: https://developer.aircall.io/api-references/#delete-call-voicemail

func (*CallsService) Get

func (service *CallsService) Get(callID int) (*CallResponse, *Response, error)

Get a call. Reference: https://developer.aircall.io/api-references/#retrieve-a-call

func (*CallsService) List

func (service *CallsService) List(opts *ListCallsQueryParams) (*CallsResponse, *Response, error)

List calls. Reference: https://developer.aircall.io/api-references/#list-all-calls

func (*CallsService) PauseRecording

func (service *CallsService) PauseRecording(callID int) (*Response, error)

Pause recording on a call. Reference: https://developer.aircall.io/api-references/#pause-recording-on-a-call

func (*CallsService) Query

func (service *CallsService) Query() *CallQueries

Create Query parameters for accounts routes.

func (*CallsService) ResumeRecording

func (service *CallsService) ResumeRecording(callID int) (*Response, error)

Resume recording on a call. Reference: https://developer.aircall.io/api-references/#resume-recording-on-a-call

func (*CallsService) Search

func (service *CallsService) Search(opts *SearchCallsQueryParams) (*CallsResponse, *Response, error)

Search calls. Reference: https://developer.aircall.io/api-references/#search-calls

func (*CallsService) Tag

func (service *CallsService) Tag(callID int, tags []int) (*Response, error)

Tag a call. Reference: https://developer.aircall.io/api-references/#tag-a-call

func (*CallsService) Transfer

func (service *CallsService) Transfer(callID int, transferCall *CallTransfer) (*Response, error)

Transfer a call. Reference: https://developer.aircall.io/api-references/#transfer-a-call

func (*CallsService) Unarchive

func (service *CallsService) Unarchive(callID int) (*CallResponse, *Response, error)

Unarchive a call. Reference: https://developer.aircall.io/api-references/#unarchive-a-call

type Client

type Client struct {
	A2PCampaignAssociations  *A2PCampaignAssociationsService
	Call                     *CallsService
	Contact                  *ContactsService
	ConversationIntelligence *ConversationIntelligenceService
	Company                  *CompaniesService
	Integration              *IntegrationService
	DialerCampaign           *DialerCampaignsService
	Number                   *NumbersService
	Message                  *MessagesService
	User                     *UsersService
	Tag                      *TagsService
	Team                     *TeamsService
	Webhook                  *WebhookService
	// contains filtered or unexported fields
}

func New

func New() *Client

func NewWithConfig

func NewWithConfig(config ClientConfig) *Client

func (*Client) AuthenricateBasic

func (client *Client) AuthenricateBasic(apiID string, apiToken string)

func (*Client) Authenticate

func (client *Client) Authenticate(accessToken string)

func (*Client) Delete

func (client *Client) Delete(url string, v ...interface{}) (*Response, error)

func (*Client) Do

func (client *Client) Do(req *http.Request, v interface{}) (*Response, error)

Do sends an API request

func (*Client) Get

func (client *Client) Get(url string, opts interface{}, v interface{}) (*Response, error)

func (*Client) NewRequest

func (client *Client) NewRequest(method, urlStr string, opts interface{}, body interface{}) (*http.Request, error)

NewRequest creates an API request

func (*Client) Post

func (client *Client) Post(url string, body interface{}, v interface{}) (*Response, error)

func (*Client) Put

func (client *Client) Put(url string, body interface{}, v interface{}) (*Response, error)

type ClientConfig

type ClientConfig struct {
	HttpClient      *http.Client
	RestEndpointURL string
}

type CompaniesService

type CompaniesService service

Company service

func (*CompaniesService) Get

func (service *CompaniesService) Get() (*CompanyResponse, *Response, error)

Get a company. Reference: https://developer.aircall.io/api-references/#retrieve-company-information

type Company

type Company struct {
	Name         string `json:"name,omitempty"`
	UsersCount   int    `json:"users_count,omitempty"`
	NumbersCount int    `json:"numbers_count,omitempty"`
}

type CompanyResponse

type CompanyResponse struct {
	Company *Company `json:"company,omitempty"`
}

type Contact

type Contact struct {
	ID           interface{}    `json:"id,omitempty"`
	FirstName    string         `json:"first_name,omitempty"`
	LastName     string         `json:"last_name,omitempty"`
	CompanyName  string         `json:"company_name,omitempty"`
	Information  string         `json:"information,omitempty"`
	IsShared     bool           `json:"is_shared,omitempty"`
	DirectLink   string         `json:"direct_link,omitempty"`
	CreatedAt    interface{}    `json:"created_at,omitempty"`
	UpdatedAt    interface{}    `json:"updated_at,omitempty"`
	PhoneNumbers *[]ContactInfo `json:"phone_numbers,omitempty"`
	Emails       *[]ContactInfo `json:"emails,omitempty"`
}

type ContactInfo

type ContactInfo struct {
	ID    int    `json:"id,omitempty"`
	Label string `json:"label,omitempty"`
	Value string `json:"value,omitempty"`
}

type ContactInfoResponse

type ContactInfoResponse struct {
	PhoneDetail *ContactInfo `json:"phone_detail,omitempty"`
	EmailDetail *ContactInfo `json:"email_detail,omitempty"`
}

type ContactQueries

type ContactQueries struct{}

func (ContactQueries) NewListContacts

func (pq ContactQueries) NewListContacts() *ListContactsQueryParams

Creates Query parameters for 'ListContacts'

func (ContactQueries) NewSearchContacts

func (pq ContactQueries) NewSearchContacts() *SearchContactsQueryParams

Creates Query parameters for 'ListContacts'

type ContactResponse

type ContactResponse struct {
	Contact *Contact `json:"contact,omitempty"`
}

type ContactsResponse

type ContactsResponse struct {
	Meta     *GenericResponseMeta `json:"meta,omitempty"`
	Contacts *[]Contact           `json:"contacts,omitempty"`
}

type ContactsService

type ContactsService service

Contact service

func (*ContactsService) AddEmail

func (service *ContactsService) AddEmail(contactID int, email *ContactInfo) (*ContactInfoResponse, *Response, error)

Add an email to a contact. Reference: https://developer.aircall.io/api-references/#add-email-to-a-contact

func (*ContactsService) AddNumber

func (service *ContactsService) AddNumber(contactID int, number *ContactInfo) (*ContactInfoResponse, *Response, error)

Add a phone number to a contact. Reference: https://developer.aircall.io/api-references/#add-phone-number-to-a-contact

func (*ContactsService) Create

func (service *ContactsService) Create(contact *CreateUpdateContact) (*ContactResponse, *Response, error)

Create a contact. Reference: https://developer.aircall.io/api-references/#create-a-contact

func (*ContactsService) Delete

func (service *ContactsService) Delete(contactID int) (*Response, error)

Delete a contact. Reference: https://developer.aircall.io/api-references/#delete-a-contact

func (*ContactsService) DeleteEmail

func (service *ContactsService) DeleteEmail(contactID int, emailID int) (*Response, error)

Delete a phone number from a contact. Reference: https://developer.aircall.io/api-references/#delete-phone-number-from-a-contact

func (*ContactsService) DeleteNumber

func (service *ContactsService) DeleteNumber(contactID int, numberID int) (*Response, error)

Delete a phone number from a contact. Reference: https://developer.aircall.io/api-references/#delete-phone-number-from-a-contact

func (*ContactsService) Get

func (service *ContactsService) Get(contactID int) (*ContactResponse, *Response, error)

Get a contact. Reference: https://developer.aircall.io/api-references/#retrieve-a-contact

func (*ContactsService) List

List contacts. Reference: https://developer.aircall.io/api-references/#list-all-contacts

func (*ContactsService) Query

func (service *ContactsService) Query() *ContactQueries

Create Query parameters for accounts routes.

func (*ContactsService) Search

Search contacts. Reference: https://developer.aircall.io/api-references/#search-contacts

func (*ContactsService) Update

func (service *ContactsService) Update(contactID int, contact *CreateUpdateContact) (*CreateUpdateContact, *Response, error)

Update a contact. Reference: https://developer.aircall.io/api-references/#update-a-contact

func (*ContactsService) UpdateEmail

func (service *ContactsService) UpdateEmail(contactID int, emailID int, email *ContactInfo) (*ContactInfoResponse, *Response, error)

Update a phone number to a contact. Reference: https://developer.aircall.io/api-references/#update-phone-number-to-a-contact

func (*ContactsService) UpdateNumber

func (service *ContactsService) UpdateNumber(contactID int, numberID int, number *ContactInfo) (*ContactInfoResponse, *Response, error)

Update a phone number to a contact. Reference: https://developer.aircall.io/api-references/#update-phone-number-to-a-contact

type ConversationIntelligenceParticipants

type ConversationIntelligenceParticipants struct {
	PhoneNumber     string `json:"phone_number,omitempty"`
	Value           string `json:"value,omitempty"`
	Type            string `json:"type,omitempty"`
	UserID          string `json:"user_id,omitempty"`
	ParticipantType string `json:"participant_type,omitempty"`
}

type ConversationIntelligenceSentiment

type ConversationIntelligenceSentiment struct {
	ID           int                                     `json:"id,omitempty"`
	CallID       int                                     `json:"call_id,omitempty"`
	Participants *[]ConversationIntelligenceParticipants `json:"participants,omitempty"`
}

type ConversationIntelligenceSentimentResponse

type ConversationIntelligenceSentimentResponse struct {
	Sentiment *ConversationIntelligenceSentiment `json:"sentiment,omitempty"`
}

type ConversationIntelligenceService

type ConversationIntelligenceService service

Conversation Intelligence service

func (*ConversationIntelligenceService) GetSentiment

Get a call sentiment. Reference: https://developer.aircall.io/api-references/#retrieve-sentiments

func (*ConversationIntelligenceService) GetSummary

Get a call summary. Reference: https://developer.aircall.io/api-references/#retrieve-a-summary

func (*ConversationIntelligenceService) GetTopics

Get a call topics. Reference: https://developer.aircall.io/api-references/#retrieve-topics

func (*ConversationIntelligenceService) GetTranscription added in v1.0.2

Get a call transcription. Reference: https://developer.aircall.io/api-references/#retrieve-a-transcription

type ConversationIntelligenceSummary

type ConversationIntelligenceSummary struct {
	ID        int         `json:"id,omitempty"`
	CallID    int         `json:"call_id,omitempty"`
	CreatedAt interface{} `json:"created_at,omitempty"`
	Content   string      `json:"content,omitempty"`
}

type ConversationIntelligenceSummaryResponse

type ConversationIntelligenceSummaryResponse struct {
	Summary *ConversationIntelligenceSummary `json:"summary,omitempty"`
}

type ConversationIntelligenceTopic

type ConversationIntelligenceTopic struct {
	ID        int         `json:"id,omitempty"`
	CallID    int         `json:"call_id,omitempty"`
	CreatedAt interface{} `json:"created_at,omitempty"`
	Content   []string    `json:"content,omitempty"`
}

type ConversationIntelligenceTopicResponse

type ConversationIntelligenceTopicResponse struct {
	Topic *ConversationIntelligenceTopic `json:"topic,omitempty"`
}

type ConversationIntelligenceTranscription

type ConversationIntelligenceTranscription struct {
	ID            int                                           `json:"id,omitempty"`
	CallID        int                                           `json:"call_id,omitempty"`
	CallCreatedAt interface{}                                   `json:"call_created_at,omitempty"`
	Type          string                                        `json:"type,omitempty"`
	Content       *ConversationIntelligenceTranscriptionContent `json:"content,omitempty"`
}

type ConversationIntelligenceTranscriptionContent

type ConversationIntelligenceTranscriptionContent struct {
	Language   string                                             `json:"language,omitempty"`
	Utterances *[]ConversationIntelligenceTranscriptionUtterances `json:"utterances,omitempty"`
}

type ConversationIntelligenceTranscriptionResponse

type ConversationIntelligenceTranscriptionResponse struct {
	Transcription *ConversationIntelligenceTranscription `json:"transcription,omitempty"`
}

type ConversationIntelligenceTranscriptionUtterances

type ConversationIntelligenceTranscriptionUtterances struct {
	StartTime       float64 `json:"start_time,omitempty"`
	EndTime         float64 `json:"end_time,omitempty"`
	Text            string  `json:"text,omitempty"`
	ParticipantType string  `json:"participant_type,omitempty"`
	PhoneNumber     string  `json:"phone_number,omitempty"`
	UserID          int     `json:"user_id,omitempty"`
}

type CreateTeam

type CreateTeam struct {
	Name string `json:"name,omitempty"`
}

type CreateUpdateA2PCampaignAssociation

type CreateUpdateA2PCampaignAssociation struct {
	ExternalCampaignID string `json:"external_campaign_id,omitempty"`
	Numbers            *[]int `json:"numbers,omitempty"`
}

type CreateUpdateContact

type CreateUpdateContact struct {
	FirstName    string        `json:"first_name,omitempty"`
	LastName     string        `json:"last_name,omitempty"`
	Information  string        `json:"information,omitempty"`
	CompanyName  string        `json:"company_name,omitempty"`
	PhoneNumbers []ContactInfo `json:"phone_numbers,omitempty"`
	Emails       []ContactInfo `json:"emails,omitempty"`
}

type CreateUpdateDialerCampaign

type CreateUpdateDialerCampaign struct {
	PhoneNumbers []string `json:"phone_numbers,omitempty"`
}

type CreateUpdateTag

type CreateUpdateTag struct {
	Name  string `json:"name,omitempty"`
	Color string `json:"color,omitempty"`
}

type CreateUpdateUser

type CreateUpdateUser struct {
	Email              string   `json:"email,omitempty"`
	FirstName          string   `json:"first_name,omitempty"`
	LastName           string   `json:"last_name,omitempty"`
	AvailabilityStatus string   `json:"availability_status,omitempty"`
	RoleIDs            []string `json:"role_ids,omitempty"`
	WrapUpTime         int      `json:"wrap_up_time,omitempty"`
}

type CreateUpdateWebhook

type CreateUpdateWebhook struct {
	CustomName string   `json:"custom_name,omitempty"`
	URL        string   `json:"url,omitempty"`
	Events     []string `json:"events,omitempty"`
}

type DialerCampaign

type DialerCampaign struct {
	ID        int         `json:"id,omitempty"`
	NumberID  string      `json:"number_id,omitempty"`
	CreatedAt interface{} `json:"created_at,omitempty"`
}

type DialerCampaignPhoneNumber

type DialerCampaignPhoneNumber struct {
	ID        int         `json:"id,omitempty"`
	Number    string      `json:"number,omitempty"`
	Called    bool        `json:"called,omitempty"`
	CreatedAt interface{} `json:"created_at,omitempty"`
}

type DialerCampaignPhoneNumberResponse

type DialerCampaignPhoneNumberResponse struct {
	PhoneNumbers *[]DialerCampaignPhoneNumber `json:"numbers,omitempty"`
}

type DialerCampaignsService

type DialerCampaignsService service

Dialer Campaign service

func (*DialerCampaignsService) AddNumbers

func (service *DialerCampaignsService) AddNumbers(userId int, phoneNumbers *CreateUpdateDialerCampaign) (*Response, error)

Add dialer campaign phone numbers. Reference: https://developer.aircall.io/api-references/#add-phone-numbers

func (*DialerCampaignsService) Create

func (service *DialerCampaignsService) Create(userID int, dialerCampaign *CreateUpdateDialerCampaign) (*Response, error)

Create a dialer campaign. Reference: https://developer.aircall.io/api-references/#create-a-dialer-campaign

func (*DialerCampaignsService) Delete

func (service *DialerCampaignsService) Delete(userId int) (*Response, error)

Delete a dialer campaign. Reference: https://developer.aircall.io/api-references/#delete-a-dialer-campaign

func (*DialerCampaignsService) DeleteNumber

func (service *DialerCampaignsService) DeleteNumber(userId int, phoneNumberId int) (*Response, error)

Delete dialer campaign phone number. Reference: https://developer.aircall.io/api-references/#delete-a-phone-number

func (*DialerCampaignsService) Get

func (service *DialerCampaignsService) Get(userID int) (*DialerCampaign, *Response, error)

Get a dialer campaign. Reference: https://developer.aircall.io/api-references/#retrieve-a-dialer-campaign

func (*DialerCampaignsService) ListNumbers

func (service *DialerCampaignsService) ListNumbers(userId int) (*DialerCampaignPhoneNumberResponse, *Response, error)

List dialer campaign phone numbers. Reference: https://developer.aircall.io/api-references/#retrieve-phone-numbers

type ErrorResponse

type ErrorResponse struct {
	Response *http.Response

	Message      string `json:"message,omitempty"`
	ErrorMessage string `json:"error,omitempty"`
	Troubleshoot string `json:"troubleshoot,omitempty"`
	Success      bool   `json:"success,omitempty"`
}

func (*ErrorResponse) Error

func (response *ErrorResponse) Error() string

type GenericResponseMeta

type GenericResponseMeta struct {
	Count            int    `json:"count,omitempty"`
	Total            int    `json:"total,omitempty"`
	CurrentPage      int    `json:"current_page,omitempty"`
	PerPage          int    `json:"per_page,omitempty"`
	NextPageLink     string `json:"next_page_link,omitempty"`
	PreviousPageLink string `json:"previous_page_link,omitempty"`
}

type InboundWebhook

type InboundWebhook struct {
	Resource  string          `json:"resource,omitempty"`
	Event     string          `json:"event,omitempty"`
	EventName string          `json:"event_name,omitempty"`
	Timestamp int             `json:"timestamp,omitempty"`
	Token     string          `json:"token,omitempty"`
	Data      json.RawMessage `json:"data,omitempty"`
}

func (*InboundWebhook) GetCallData

func (w *InboundWebhook) GetCallData() (*Call, error)

func (*InboundWebhook) GetContactData

func (w *InboundWebhook) GetContactData() (*Contact, error)

func (*InboundWebhook) GetConversationIntelligenceSentimentData added in v1.0.1

func (w *InboundWebhook) GetConversationIntelligenceSentimentData() (*ConversationIntelligenceSentiment, error)

func (*InboundWebhook) GetConversationIntelligenceTranscriptionData added in v1.0.1

func (w *InboundWebhook) GetConversationIntelligenceTranscriptionData() (*ConversationIntelligenceTranscription, error)

func (*InboundWebhook) GetIntegrationData added in v1.0.1

func (w *InboundWebhook) GetIntegrationData() (*Integration, error)

func (*InboundWebhook) GetMessageData

func (w *InboundWebhook) GetMessageData() (*Message, error)

func (*InboundWebhook) GetNumberData

func (w *InboundWebhook) GetNumberData() (*Number, error)

func (*InboundWebhook) GetUserData

func (w *InboundWebhook) GetUserData() (*User, error)

type Integration

type Integration struct {
	ID           int    `json:"id,omitempty"`
	Name         string `json:"name,omitempty"`
	CustomName   string `json:"custom_name,omitempty"`
	CompanyID    int    `json:"company_id,omitempty"`
	Status       string `json:"status,omitempty"`
	Active       bool   `json:"active,omitempty"`
	NumbersCount int    `json:"numbers_count,omitempty"`
	NumberIDs    *[]int `json:"number_ids,omitempty"`
	User         *User  `json:"user,omitempty"`

	// Included in Webhook event only
	IntegrationID int `json:"integration_id,omitempty"`
}

type IntegrationResponse

type IntegrationResponse struct {
	Integration *Integration `json:"integration,omitempty"`
}

type IntegrationService

type IntegrationService service

Integration service

func (*IntegrationService) Disable

func (service *IntegrationService) Disable() (*Response, error)

Disable an integration. Reference: https://developer.aircall.io/api-references/#disable-integration

func (*IntegrationService) Enable

func (service *IntegrationService) Enable(install ...bool) (*Response, error)

Enable an integration. Reference: https://developer.aircall.io/api-references/#enable-integration

func (*IntegrationService) Get

Get an integration. Reference: https://developer.aircall.io/api-references/#retrieve-a-integration

type ListA2PCampaignAssociationsQueryParams

type ListA2PCampaignAssociationsQueryParams struct {
	QueryValues
}

Query parameters for 'ListA2PCampaignAssociations' method.

func (ListA2PCampaignAssociationsQueryParams) Paginate

func (p ListA2PCampaignAssociationsQueryParams) Paginate(page int, perPage int)

Set 'page' and 'per_page' for for 'List' method.

type ListCallsQueryParams

type ListCallsQueryParams struct {
	QueryValues
}

Query parameters for 'List' method.

func (ListCallsQueryParams) FetchCallTimeline

func (p ListCallsQueryParams) FetchCallTimeline(value bool)

Set 'fetch_call_timeline' for for 'List' method.

func (ListCallsQueryParams) FetchContact

func (p ListCallsQueryParams) FetchContact(value bool)

Set 'fetch_contact' for for 'List' method.

func (ListCallsQueryParams) FetchShortURLs

func (p ListCallsQueryParams) FetchShortURLs(value bool)

Set 'fetch_short_urls' for for 'List' method.

func (ListCallsQueryParams) From

func (p ListCallsQueryParams) From(value string)

Set from for for 'List' method.

func (ListCallsQueryParams) Order

func (p ListCallsQueryParams) Order(value string)

Set 'order' for for 'List' method.

func (ListCallsQueryParams) Paginate

func (p ListCallsQueryParams) Paginate(page int, perPage int)

Set 'page' and 'per_page' for for 'List' method.

func (ListCallsQueryParams) To

func (p ListCallsQueryParams) To(value string)

Set 'to' for for 'List' method.

type ListContactsQueryParams

type ListContactsQueryParams struct {
	QueryValues
}

Query parameters for 'ListContacts' method.

func (ListContactsQueryParams) From

func (p ListContactsQueryParams) From(value string)

Set 'from' for for 'List' method.

func (ListContactsQueryParams) Order

func (p ListContactsQueryParams) Order(value string)

Set 'order' for for 'List' method.

func (ListContactsQueryParams) OrderBy

func (p ListContactsQueryParams) OrderBy(value string)

Set 'order_by' by for for 'List' method.

func (ListContactsQueryParams) Paginate

func (p ListContactsQueryParams) Paginate(page int, perPage int)

Set 'page' and 'per_page' for for 'List' method.

func (ListContactsQueryParams) To

func (p ListContactsQueryParams) To(value string)

Set 'to' for for 'List' method.

type ListNumbersQueryParams

type ListNumbersQueryParams struct {
	QueryValues
}

Query parameters for 'ListNumbers' method.

func (ListNumbersQueryParams) From

func (p ListNumbersQueryParams) From(value string)

Set from for for 'List' method.

func (ListNumbersQueryParams) Order

func (p ListNumbersQueryParams) Order(value string)

Set 'order' for for 'List' method.

func (ListNumbersQueryParams) Paginate

func (p ListNumbersQueryParams) Paginate(page int, perPage int)

Set 'page' and 'per_page' for for 'List' method.

func (ListNumbersQueryParams) To

func (p ListNumbersQueryParams) To(value string)

Set 'to' for for 'List' method.

type ListTagsQueryParams

type ListTagsQueryParams struct {
	QueryValues
}

Query parameters for 'List' method.

func (ListTagsQueryParams) Paginate

func (p ListTagsQueryParams) Paginate(page int, perPage int)

Set 'page' and 'per_page' for for 'List' method.

type ListTeamsQueryParams

type ListTeamsQueryParams struct {
	QueryValues
}

Query parameters for 'ListTeams' method.

func (ListTeamsQueryParams) Order

func (p ListTeamsQueryParams) Order(value string)

Set 'order' for for 'List' method.

func (ListTeamsQueryParams) Paginate

func (p ListTeamsQueryParams) Paginate(page int, perPage int)

Set 'page' and 'per_page' for for 'List' method.

type ListUsersAvailabilityQueryParams

type ListUsersAvailabilityQueryParams struct {
	QueryValues
}

Query parameters for 'ListAvailability' method.

func (ListUsersAvailabilityQueryParams) From

Set 'from' for for 'ListAvailability' method.

func (ListUsersAvailabilityQueryParams) Order

Set 'order' for for 'ListAvailability' method.

func (ListUsersAvailabilityQueryParams) Paginate

func (p ListUsersAvailabilityQueryParams) Paginate(page int, perPage int)

Set 'page' and 'per_page' for for 'ListAvailability' method.

func (ListUsersAvailabilityQueryParams) To

Set 'to' for for 'ListAvailability ' method.

type ListUsersQueryParams

type ListUsersQueryParams struct {
	QueryValues
}

Query parameters for 'List' method.

func (ListUsersQueryParams) From

func (p ListUsersQueryParams) From(value string)

Set 'from' for for 'List' method.

func (ListUsersQueryParams) Order

func (p ListUsersQueryParams) Order(value string)

Set 'order' for for 'List' method.

func (ListUsersQueryParams) Paginate

func (p ListUsersQueryParams) Paginate(page int, perPage int)

Set 'page' and 'per_page' for for 'List' method.

func (ListUsersQueryParams) To

func (p ListUsersQueryParams) To(value string)

Set 'to' for for 'List ' method.

type ListWebhooksQueryParams

type ListWebhooksQueryParams struct {
	QueryValues
}

Query parameters for 'ListWebhooks' method.

func (ListWebhooksQueryParams) Order

func (p ListWebhooksQueryParams) Order(value string)

func (ListWebhooksQueryParams) Paginate

func (p ListWebhooksQueryParams) Paginate(page int, perPage int)

type MediaDetail

type MediaDetail struct {
	FileName     string `json:"file_name,omitempty"`
	FileType     string `json:"file_type,omitempty"`
	PresignedURL string `json:"presigned_url,omitempty"`
}

type Message

type Message struct {
	ID             string         `json:"id,omitempty"`
	DirectLink     string         `json:"direct_link,omitempty"`
	Direction      string         `json:"direction,omitempty"`
	ExternalNumber string         `json:"external_number,omitempty"`
	Body           string         `json:"body,omitempty"`
	Status         string         `json:"status,omitempty"`
	RawDigits      string         `json:"raw_digits,omitempty"`
	CreatedAt      interface{}    `json:"created_at,omitempty"`
	UpdatedAt      interface{}    `json:"updated_at,omitempty"`
	SentAt         interface{}    `json:"sent_at,omitempty"`
	MediaURL       *[]string      `json:"media_url,omitempty"`
	User           *User          `json:"user,omitempty"`
	Number         *Number        `json:"number,omitempty"`
	Contact        *Contact       `json:"contact,omitempty"`
	MediaDetails   *[]MediaDetail `json:"media_details,omitempty"`
}

type Messages

type Messages struct {
	Welcome        string `json:"welcome,omitempty"`
	Waiting        string `json:"waiting,omitempty"`
	RingingTone    string `json:"ringing_tone,omitempty"`
	UnansweredCall string `json:"unanswered_call,omitempty"`
	AfterHours     string `json:"after_hours,omitempty"`
	IVR            string `json:"ivr,omitempty"`
	Voicemail      string `json:"voicemail,omitempty"`
	Closed         string `json:"closed,omitempty"`
	CallbackLater  string `json:"callback_later,omitempty"`
}

type MessagesService

type MessagesService service

Message service

func (*MessagesService) CreateNumberConfiguration

func (service *MessagesService) CreateNumberConfiguration(numberID int, numberConfiguration *NumberConfiguration) (*NumberConfiguration, *Response, error)

Create number configuration. Reference: https://developer.aircall.io/api-references/#create-number-configuration

func (*MessagesService) DeleteNumberConfiguration

func (service *MessagesService) DeleteNumberConfiguration(numberID int) (*Response, error)

Delete number configuration. Reference: https://developer.aircall.io/api-references/#fetch-number-configuration

func (*MessagesService) GetNumberConfiguration

func (service *MessagesService) GetNumberConfiguration(numberID int) (*NumberConfiguration, *Response, error)

Get number configuration. Reference: https://developer.aircall.io/api-references/#fetch-number-configuration

func (*MessagesService) Send

func (service *MessagesService) Send(numberID int, message *NewMessage) (*Message, *Response, error)

Send message. Reference: https://developer.aircall.io/api-references/#send-message

func (*MessagesService) UpdateMessages

func (service *MessagesService) UpdateMessages(numberID int, messages *Messages) (*NumberResponse, *Response, error)

Update music and messages. Reference: https://developer.aircall.io/api-references/#update-music-and-messages

type NewMessage

type NewMessage struct {
	To       string   `json:"to,omitempty"`
	Body     string   `json:"body,omitempty"`
	MediaURL []string `json:"media_url,omitempty"`
}

type NewUserCall

type NewUserCall struct {
	NumberID int    `json:"number_id,omitempty"`
	To       string `json:"to,omitempty"`
}

type Number

type Number struct {
	ID                     int         `json:"id,omitempty"`
	DirectLink             string      `json:"direct_link,omitempty"`
	Name                   string      `json:"name,omitempty"`
	Digits                 string      `json:"digits,omitempty"`
	CreatedAt              interface{} `json:"created_at,omitempty"`
	Country                string      `json:"country,omitempty"`
	TimeZone               string      `json:"time_zone,omitempty"`
	Open                   bool        `json:"open,omitempty"`
	AvailabilityStatus     string      `json:"availability_status,omitempty"`
	IsIVR                  bool        `json:"is_ivr,omitempty"`
	LiveRecordingActivated bool        `json:"live_recording_activated,omitempty"`
	Priority               *int        `json:"priority,omitempty"`
	Messages               *Messages   `json:"messages,omitempty"`
	Users                  *[]User     `json:"users,omitempty"`
}

type NumberConfiguration

type NumberConfiguration struct {
	Token       string `json:"token,omitempty"`
	CallbackURL string `json:"callbackUrl,omitempty"`
	Type        string `json:"type,omitempty"`
}

type NumberQueries

type NumberQueries struct{}

func (NumberQueries) NewListNumbers

func (pq NumberQueries) NewListNumbers() *ListNumbersQueryParams

Creates Query parameters for 'ListNumbers'

type NumberResponse

type NumberResponse struct {
	Number *Number `json:"number,omitempty"`
}

type NumbersResponse

type NumbersResponse struct {
	Meta    *GenericResponseMeta `json:"meta,omitempty"`
	Numbers *[]Number            `json:"numbers,omitempty"`
}

type NumbersService

type NumbersService service

Number service

func (*NumbersService) Get

func (service *NumbersService) Get(numberID int) (*NumberResponse, *Response, error)

Get a number. Reference: https://developer.aircall.io/api-references/#retrieve-a-number

func (*NumbersService) List

List calls. Reference: https://developer.aircall.io/api-references/#list-all-calls

func (*NumbersService) Update

func (service *NumbersService) Update(numberID int, number *Number) (*NumberResponse, *Response, error)

Update a number. Reference: https://developer.aircall.io/api-references/#update-a-number

type QueryValues

type QueryValues map[string]string

type Response

type Response struct {
	*http.Response
}

type SearchCallsQueryParams

type SearchCallsQueryParams struct {
	QueryValues
}

Query parameters for 'SearchCalls' method.

func (SearchCallsQueryParams) Direction

func (p SearchCallsQueryParams) Direction(value string)

Set 'direction' for for 'Search' method.

func (SearchCallsQueryParams) FetchCallTimeline

func (p SearchCallsQueryParams) FetchCallTimeline(value bool)

Set 'fetch_call_timeline' for for 'SearchCalls' method.

func (SearchCallsQueryParams) FetchContact

func (p SearchCallsQueryParams) FetchContact(value bool)

Set 'fetch_contact' for for 'SearchCalls' method.

func (SearchCallsQueryParams) FetchShortURLs

func (p SearchCallsQueryParams) FetchShortURLs(value bool)

Set 'fetch_short_urls' for for 'SearchCalls' method.

func (SearchCallsQueryParams) From

func (p SearchCallsQueryParams) From(value string)

Set from for for 'Search' method.

func (SearchCallsQueryParams) Order

func (p SearchCallsQueryParams) Order(value string)

Set 'order' for for 'Search' method.

func (SearchCallsQueryParams) Paginate

func (p SearchCallsQueryParams) Paginate(page int, perPage int)

Set 'page' and 'per_page' for for 'Search' method.

func (SearchCallsQueryParams) PhoneNumber

func (p SearchCallsQueryParams) PhoneNumber(value string)

Set 'phone_number' for for 'Search' method.

func (SearchCallsQueryParams) To

func (p SearchCallsQueryParams) To(value string)

Set 'to' for for 'Search' method.

func (SearchCallsQueryParams) UserID

func (p SearchCallsQueryParams) UserID(value int)

Set 'user_id' for for 'Search' method.

type SearchContactsQueryParams

type SearchContactsQueryParams struct {
	QueryValues
}

Query parameters for 'SearchContacts' method.

func (SearchContactsQueryParams) Email

func (p SearchContactsQueryParams) Email(value string)

Set 'email' for for 'Search' method.

func (SearchContactsQueryParams) From

func (p SearchContactsQueryParams) From(value string)

Set from for for 'Search' method.

func (SearchContactsQueryParams) Order

func (p SearchContactsQueryParams) Order(value string)

Set 'order' for for 'Search' method.

func (SearchContactsQueryParams) OrderBy

func (p SearchContactsQueryParams) OrderBy(value string)

Set 'order_by' by for for 'Search' method.

func (SearchContactsQueryParams) Paginate

func (p SearchContactsQueryParams) Paginate(page int, perPage int)

Set 'page' and 'per_page' for for 'Search' method.

func (SearchContactsQueryParams) PhoneNumber

func (p SearchContactsQueryParams) PhoneNumber(value string)

Set 'phone_number' for for 'Search' method.

func (SearchContactsQueryParams) To

func (p SearchContactsQueryParams) To(value string)

Set 'to' for for 'Search' method.

type SearchUsersQueryParams

type SearchUsersQueryParams struct {
	QueryValues
}

Query parameters for 'SearchUsers' method.

type Tag

type Tag struct {
	ID          int    `json:"id,omitempty"`
	DirectLink  string `json:"direct_link,omitempty"`
	Name        string `json:"name,omitempty"`
	Color       string `json:"color,omitempty"`
	Description string `json:"description,omitempty"`
}

type TagQueries

type TagQueries struct{}

func (TagQueries) NewListTags

func (pq TagQueries) NewListTags() *ListTagsQueryParams

Creates Query parameters for 'List'

type TagResponse

type TagResponse struct {
	Tag *Tag `json:"tag,omitempty"`
}

type TagsResponse

type TagsResponse struct {
	Meta *GenericResponseMeta `json:"meta,omitempty"`
	Tags *[]Tag               `json:"tags,omitempty"`
}

type TagsService

type TagsService service

Tag service

func (*TagsService) Create

func (service *TagsService) Create(tag *CreateUpdateTag) (*TagResponse, *Response, error)

Create a tag. Reference: https://developer.aircall.io/api-references/#create-a-tag

func (*TagsService) Delete

func (service *TagsService) Delete(tagID int) (*Response, error)

Delete a tag. Reference: https://developer.aircall.io/api-references/#delete-a-tag

func (*TagsService) Get

func (service *TagsService) Get(tagID int) (*TagResponse, *Response, error)

Get a tag. Reference: https://developer.aircall.io/api-references/#retrieve-a-tag

func (*TagsService) List

func (service *TagsService) List(opts *ListTagsQueryParams) (*TagsResponse, *Response, error)

List tags. Reference: https://developer.aircall.io/api-references/#list-all-tags

func (*TagsService) Query

func (service *TagsService) Query() *TagQueries

Create Query parameters for accounts routes.

func (*TagsService) Update

func (service *TagsService) Update(tagID int, tag *CreateUpdateTag) (*TagResponse, *Response, error)

Update a tag. Reference: https://developer.aircall.io/api-references/#update-a-tag

type Team

type Team struct {
	ID         int         `json:"id,omitempty"`
	DirectLink string      `json:"direct_link,omitempty"`
	Name       string      `json:"name,omitempty"`
	CreatedAt  interface{} `json:"created_at,omitempty"`
	Users      *[]User     `json:"users,omitempty"`
}

type TeamQueries

type TeamQueries struct{}

func (TeamQueries) NewListTeams

func (pq TeamQueries) NewListTeams() *ListTeamsQueryParams

Creates Query parameters for 'ListContacts'

type TeamResponse

type TeamResponse struct {
	Team *Team `json:"team,omitempty"`
}

type TeamsResponse

type TeamsResponse struct {
	Meta  *GenericResponseMeta `json:"meta,omitempty"`
	Teams *[]Team              `json:"teams,omitempty"`
}

type TeamsService

type TeamsService service

Team service

func (*TeamsService) AddUser

func (service *TeamsService) AddUser(teamID int, userID int) (*TeamResponse, *Response, error)

Add a user to a team. Reference: https://developer.aircall.io/api-references/#add-a-user-to-a-team

func (*TeamsService) Create

func (service *TeamsService) Create(team *CreateTeam) (*TeamResponse, *Response, error)

Create a team. Reference: https://developer.aircall.io/api-references/#create-a-team

func (*TeamsService) Delete

func (service *TeamsService) Delete(teamID int) (*Response, error)

Delete a team. Reference: https://developer.aircall.io/api-references/#delete-a-team

func (*TeamsService) Get

func (service *TeamsService) Get(teamID int) (*TeamResponse, *Response, error)

Get a team. Reference: https://developer.aircall.io/api-references/#retrieve-a-team

func (*TeamsService) List

func (service *TeamsService) List(opts *ListTeamsQueryParams) (*TeamsResponse, *Response, error)

List teams. Reference: https://developer.aircall.io/api-references/#list-all-teams

func (*TeamsService) Query

func (service *TeamsService) Query() *TeamQueries

Create Query parameters for accounts routes.

func (*TeamsService) RemoveUser

func (service *TeamsService) RemoveUser(teamID int, userID int) (*TeamResponse, *Response, error)

Remove a user from a team. Reference: https://developer.aircall.io/api-references/#remove-a-user-from-a-team

type User

type User struct {
	ID                 int         `json:"id,omitempty"`
	DirectLink         string      `json:"direct_link,omitempty"`
	Name               string      `json:"name,omitempty"`
	Email              string      `json:"email,omitempty"`
	CreatedAt          interface{} `json:"created_at,omitempty"`
	Available          bool        `json:"available,omitempty"`
	AvailabilityStatus string      `json:"availability_status,omitempty"`
	Substatus          string      `json:"substatus,omitempty"`
	TimeZone           string      `json:"time_zone,omitempty"`
	Language           string      `json:"language,omitempty"`
	WrapUpTime         int         `json:"wrap_up_time,omitempty"`
	Numbers            *[]Number   `json:"numbers,omitempty"`
}

type UserAvailabilitiesResponse

type UserAvailabilitiesResponse struct {
	Meta  *GenericResponseMeta `json:"meta,omitempty"`
	Users *[]UserAvailability  `json:"users,omitempty"`
}

type UserAvailability

type UserAvailability struct {
	ID           int    `json:"id,omitempty"`
	Availability string `json:"availability,omitempty"`
}

type UserQueries

type UserQueries struct{}

func (UserQueries) NewListUsers

func (pq UserQueries) NewListUsers() *ListUsersQueryParams

Creates Query parameters for 'List'

func (UserQueries) NewListUsersAvailability

func (pq UserQueries) NewListUsersAvailability() *ListUsersAvailabilityQueryParams

Creates Query parameters for 'List'

type UserResponse

type UserResponse struct {
	User *User `json:"user,omitempty"`
}

type UsersResponse

type UsersResponse struct {
	Meta  *GenericResponseMeta `json:"meta,omitempty"`
	Users *[]User              `json:"users,omitempty"`
}

type UsersService

type UsersService service

User service

func (*UsersService) Create

func (service *UsersService) Create(user *CreateUpdateUser) (*UserResponse, *Response, error)

Create a user. Reference: https://developer.aircall.io/api-references/#create-a-user

func (*UsersService) Delete

func (service *UsersService) Delete(userID int) (*Response, error)

Delete a user. Reference: https://developer.aircall.io/api-references/#delete-a-user

func (*UsersService) DialNumber

func (service *UsersService) DialNumber(userID int, call *NewUserCall) (*Response, error)

Dial a phone number in the phone. Reference: https://developer.aircall.io/api-references/#dial-a-phone-number-in-the-phone

func (*UsersService) Get

func (service *UsersService) Get(userID int) (*UserResponse, *Response, error)

Get a user. Reference: https://developer.aircall.io/api-references/#retrieve-a-user

func (*UsersService) GetAvailability

func (service *UsersService) GetAvailability(userID int) (*UserAvailability, *Response, error)

Get a user availability. Reference: https://developer.aircall.io/api-references/#check-availability-of-a-user

func (*UsersService) List

func (service *UsersService) List(opts *ListUsersQueryParams) (*UsersResponse, *Response, error)

List users. Reference: https://developer.aircall.io/api-references/#list-all-users

func (*UsersService) Query

func (service *UsersService) Query() *UserQueries

Create Query parameters for accounts routes.

func (*UsersService) StartOutboundCall

func (service *UsersService) StartOutboundCall(userID int, call *NewUserCall) (*Response, error)

Start an outbound call. Reference: https://developer.aircall.io/api-references/#start-an-outbound-call

func (*UsersService) Update

func (service *UsersService) Update(userID int, user *CreateUpdateUser) (*UserResponse, *Response, error)

Update a user. Reference: https://developer.aircall.io/api-references/#update-a-user

type Webhook

type Webhook struct {
	WebhookID  string      `json:"webhook_id,omitempty"`
	DirectLink string      `json:"direct_link,omitempty"`
	CreatedAt  interface{} `json:"created_at,omitempty"`
	URL        string      `json:"url,omitempty"`
	Active     bool        `json:"active,omitempty"`
	Token      string      `json:"token,omitempty"`
	Events     *[]string   `json:"events,omitempty"`
}

type WebhookQueries

type WebhookQueries struct{}

func (WebhookQueries) NewListWebhooks

func (pq WebhookQueries) NewListWebhooks() *ListWebhooksQueryParams

Creates Query parameters for 'ListContacts'

type WebhookResponse

type WebhookResponse struct {
	Webhook *Webhook `json:"webhook,omitempty"`
}

type WebhookService

type WebhookService service

Webhook service

func (*WebhookService) Create

func (service *WebhookService) Create(webhook *CreateUpdateWebhook) (*WebhookResponse, *Response, error)

Create a webhook. Reference: https://developer.aircall.io/api-references/#create-a-webhook

func (*WebhookService) Delete

func (service *WebhookService) Delete(webhookID string) (*Response, error)

Delete a webhook. Reference: https://developer.aircall.io/api-references/#delete-a-webhook

func (*WebhookService) Get

func (service *WebhookService) Get(webhookID string) (*WebhookResponse, *Response, error)

Get a webhook. Reference: https://developer.aircall.io/api-references/#retrieve-a-webhook

func (*WebhookService) List

List webhooks. Reference: https://developer.aircall.io/api-references/#list-all-webhooks

func (*WebhookService) Query

func (service *WebhookService) Query() *WebhookQueries

Create Query parameters for accounts routes.

func (*WebhookService) Update

func (service *WebhookService) Update(webhookID string, webhook *CreateUpdateWebhook) (*WebhookResponse, *Response, error)

Update a webhook. Reference: https://developer.aircall.io/api-references/#update-a-webhook

type WebhooksResponse

type WebhooksResponse struct {
	Meta     *GenericResponseMeta `json:"meta,omitempty"`
	Webhooks *[]Webhook           `json:"webhooks,omitempty"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL