Documentation ¶
Index ¶
- type ApiService
- func (c *ApiService) CreateFax(params *CreateFaxParams) (*FaxV1Fax, error)
- func (c *ApiService) DeleteFax(Sid string) error
- func (c *ApiService) DeleteFaxMedia(FaxSid string, Sid string) error
- func (c *ApiService) FetchFax(Sid string) (*FaxV1Fax, error)
- func (c *ApiService) FetchFaxMedia(FaxSid string, Sid string) (*FaxV1FaxMedia, error)
- func (c *ApiService) ListFax(params *ListFaxParams) ([]FaxV1Fax, error)
- func (c *ApiService) ListFaxMedia(FaxSid string, params *ListFaxMediaParams) ([]FaxV1FaxMedia, error)
- func (c *ApiService) PageFax(params *ListFaxParams, pageToken, pageNumber string) (*ListFaxResponse, error)
- func (c *ApiService) PageFaxMedia(FaxSid string, params *ListFaxMediaParams, pageToken, pageNumber string) (*ListFaxMediaResponse, error)
- func (c *ApiService) StreamFax(params *ListFaxParams) (chan FaxV1Fax, error)
- func (c *ApiService) StreamFaxMedia(FaxSid string, params *ListFaxMediaParams) (chan FaxV1FaxMedia, error)
- func (c *ApiService) UpdateFax(Sid string, params *UpdateFaxParams) (*FaxV1Fax, error)
- type CreateFaxParams
- func (params *CreateFaxParams) SetFrom(From string) *CreateFaxParams
- func (params *CreateFaxParams) SetMediaUrl(MediaUrl string) *CreateFaxParams
- func (params *CreateFaxParams) SetQuality(Quality string) *CreateFaxParams
- func (params *CreateFaxParams) SetSipAuthPassword(SipAuthPassword string) *CreateFaxParams
- func (params *CreateFaxParams) SetSipAuthUsername(SipAuthUsername string) *CreateFaxParams
- func (params *CreateFaxParams) SetStatusCallback(StatusCallback string) *CreateFaxParams
- func (params *CreateFaxParams) SetStoreMedia(StoreMedia bool) *CreateFaxParams
- func (params *CreateFaxParams) SetTo(To string) *CreateFaxParams
- func (params *CreateFaxParams) SetTtl(Ttl int) *CreateFaxParams
- type FaxV1Fax
- type FaxV1FaxMedia
- type ListFaxMediaParams
- type ListFaxMediaResponse
- type ListFaxParams
- func (params *ListFaxParams) SetDateCreatedAfter(DateCreatedAfter time.Time) *ListFaxParams
- func (params *ListFaxParams) SetDateCreatedOnOrBefore(DateCreatedOnOrBefore time.Time) *ListFaxParams
- func (params *ListFaxParams) SetFrom(From string) *ListFaxParams
- func (params *ListFaxParams) SetLimit(Limit int) *ListFaxParams
- func (params *ListFaxParams) SetPageSize(PageSize int) *ListFaxParams
- func (params *ListFaxParams) SetTo(To string) *ListFaxParams
- type ListFaxResponse
- type ListFaxResponseMeta
- type UpdateFaxParams
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ApiService ¶ added in v0.11.0
type ApiService struct {
// contains filtered or unexported fields
}
func NewApiService ¶ added in v0.11.0
func NewApiService(requestHandler *twilio.RequestHandler) *ApiService
func NewApiServiceWithClient ¶ added in v0.11.0
func NewApiServiceWithClient(client twilio.BaseClient) *ApiService
func (*ApiService) CreateFax ¶ added in v0.11.0
func (c *ApiService) CreateFax(params *CreateFaxParams) (*FaxV1Fax, error)
Create a new fax to send to a phone number or SIP endpoint.
func (*ApiService) DeleteFax ¶ added in v0.11.0
func (c *ApiService) DeleteFax(Sid string) error
Delete a specific fax and its associated media.
func (*ApiService) DeleteFaxMedia ¶ added in v0.11.0
func (c *ApiService) DeleteFaxMedia(FaxSid string, Sid string) error
Delete a specific fax media instance.
func (*ApiService) FetchFax ¶ added in v0.11.0
func (c *ApiService) FetchFax(Sid string) (*FaxV1Fax, error)
Fetch a specific fax.
func (*ApiService) FetchFaxMedia ¶ added in v0.11.0
func (c *ApiService) FetchFaxMedia(FaxSid string, Sid string) (*FaxV1FaxMedia, error)
Fetch a specific fax media instance.
func (*ApiService) ListFax ¶ added in v0.11.0
func (c *ApiService) ListFax(params *ListFaxParams) ([]FaxV1Fax, error)
Lists Fax records from the API as a list. Unlike stream, this operation is eager and loads 'limit' records into memory before returning.
func (*ApiService) ListFaxMedia ¶ added in v0.11.0
func (c *ApiService) ListFaxMedia(FaxSid string, params *ListFaxMediaParams) ([]FaxV1FaxMedia, error)
Lists FaxMedia records from the API as a list. Unlike stream, this operation is eager and loads 'limit' records into memory before returning.
func (*ApiService) PageFax ¶ added in v0.13.0
func (c *ApiService) PageFax(params *ListFaxParams, pageToken, pageNumber string) (*ListFaxResponse, error)
Retrieve a single page of Fax records from the API. Request is executed immediately.
func (*ApiService) PageFaxMedia ¶ added in v0.13.0
func (c *ApiService) PageFaxMedia(FaxSid string, params *ListFaxMediaParams, pageToken, pageNumber string) (*ListFaxMediaResponse, error)
Retrieve a single page of FaxMedia records from the API. Request is executed immediately.
func (*ApiService) StreamFax ¶ added in v0.13.0
func (c *ApiService) StreamFax(params *ListFaxParams) (chan FaxV1Fax, error)
Streams Fax records from the API as a channel stream. This operation lazily loads records as efficiently as possible until the limit is reached.
func (*ApiService) StreamFaxMedia ¶ added in v0.13.0
func (c *ApiService) StreamFaxMedia(FaxSid string, params *ListFaxMediaParams) (chan FaxV1FaxMedia, error)
Streams FaxMedia records from the API as a channel stream. This operation lazily loads records as efficiently as possible until the limit is reached.
func (*ApiService) UpdateFax ¶ added in v0.11.0
func (c *ApiService) UpdateFax(Sid string, params *UpdateFaxParams) (*FaxV1Fax, error)
Update a specific fax.
type CreateFaxParams ¶
type CreateFaxParams struct { // The number the fax was sent from. Can be the phone number in [E.164](https://www.twilio.com/docs/glossary/what-e164) format or the SIP `from` value. The caller ID displayed to the recipient uses this value. If this is a phone number, it must be a Twilio number or a verified outgoing caller id from your account. If `to` is a SIP address, this can be any alphanumeric string (and also the characters `+`, `_`, `.`, and `-`), which will be used in the `from` header of the SIP request. From *string `json:"From,omitempty"` // The URL of the PDF that contains the fax. See our [security](https://www.twilio.com/docs/usage/security) page for information on how to ensure the request for your media comes from Twilio. MediaUrl *string `json:"MediaUrl,omitempty"` // The [Fax Quality value](https://www.twilio.com/docs/fax/api/fax-resource#fax-quality-values) that describes the fax quality. Can be: `standard`, `fine`, or `superfine` and defaults to `fine`. Quality *string `json:"Quality,omitempty"` // The password to use with `sip_auth_username` to authenticate faxes sent to a SIP address. SipAuthPassword *string `json:"SipAuthPassword,omitempty"` // The username to use with the `sip_auth_password` to authenticate faxes sent to a SIP address. SipAuthUsername *string `json:"SipAuthUsername,omitempty"` // The URL we should call using the `POST` method to send [status information](https://www.twilio.com/docs/fax/api/fax-resource#fax-status-callback) to your application when the status of the fax changes. StatusCallback *string `json:"StatusCallback,omitempty"` // Whether to store a copy of the sent media on our servers for later retrieval. Can be: `true` or `false` and the default is `true`. StoreMedia *bool `json:"StoreMedia,omitempty"` // The phone number to receive the fax in [E.164](https://www.twilio.com/docs/glossary/what-e164) format or the recipient's SIP URI. To *string `json:"To,omitempty"` // How long in minutes from when the fax is initiated that we should try to send the fax. Ttl *int `json:"Ttl,omitempty"` }
Optional parameters for the method 'CreateFax'
func (*CreateFaxParams) SetFrom ¶
func (params *CreateFaxParams) SetFrom(From string) *CreateFaxParams
func (*CreateFaxParams) SetMediaUrl ¶
func (params *CreateFaxParams) SetMediaUrl(MediaUrl string) *CreateFaxParams
func (*CreateFaxParams) SetQuality ¶
func (params *CreateFaxParams) SetQuality(Quality string) *CreateFaxParams
func (*CreateFaxParams) SetSipAuthPassword ¶
func (params *CreateFaxParams) SetSipAuthPassword(SipAuthPassword string) *CreateFaxParams
func (*CreateFaxParams) SetSipAuthUsername ¶
func (params *CreateFaxParams) SetSipAuthUsername(SipAuthUsername string) *CreateFaxParams
func (*CreateFaxParams) SetStatusCallback ¶
func (params *CreateFaxParams) SetStatusCallback(StatusCallback string) *CreateFaxParams
func (*CreateFaxParams) SetStoreMedia ¶
func (params *CreateFaxParams) SetStoreMedia(StoreMedia bool) *CreateFaxParams
func (*CreateFaxParams) SetTo ¶
func (params *CreateFaxParams) SetTo(To string) *CreateFaxParams
func (*CreateFaxParams) SetTtl ¶
func (params *CreateFaxParams) SetTtl(Ttl int) *CreateFaxParams
type FaxV1Fax ¶
type FaxV1Fax struct { // The SID of the Account that created the resource AccountSid *string `json:"account_sid,omitempty"` // The API version used to transmit the fax ApiVersion *string `json:"api_version,omitempty"` // The ISO 8601 formatted date and time in GMT when the resource was created DateCreated *time.Time `json:"date_created,omitempty"` // The ISO 8601 formatted date and time in GMT when the resource was last updated DateUpdated *time.Time `json:"date_updated,omitempty"` // The direction of the fax Direction *string `json:"direction,omitempty"` // The time it took to transmit the fax Duration *int `json:"duration,omitempty"` // The number the fax was sent from From *string `json:"from,omitempty"` // The URLs of the fax's related resources Links *map[string]interface{} `json:"links,omitempty"` // The SID of the FaxMedia resource that is associated with the Fax MediaSid *string `json:"media_sid,omitempty"` // The Twilio-hosted URL that can be used to download fax media MediaUrl *string `json:"media_url,omitempty"` // The number of pages contained in the fax document NumPages *int `json:"num_pages,omitempty"` // The fax transmission price Price *float32 `json:"price,omitempty"` // The ISO 4217 currency used for billing PriceUnit *string `json:"price_unit,omitempty"` // The quality of the fax Quality *string `json:"quality,omitempty"` // The unique string that identifies the resource Sid *string `json:"sid,omitempty"` // The status of the fax Status *string `json:"status,omitempty"` // The phone number that received the fax To *string `json:"to,omitempty"` // The absolute URL of the fax resource Url *string `json:"url,omitempty"` }
FaxV1Fax struct for FaxV1Fax
type FaxV1FaxMedia ¶ added in v0.14.0
type FaxV1FaxMedia struct { // The SID of the Account that created the resource AccountSid *string `json:"account_sid,omitempty"` // The content type of the stored fax media ContentType *string `json:"content_type,omitempty"` // The ISO 8601 date and time in GMT when the resource was created DateCreated *time.Time `json:"date_created,omitempty"` // The ISO 8601 date and time in GMT when the resource was last updated DateUpdated *time.Time `json:"date_updated,omitempty"` // The SID of the fax the FaxMedia resource is associated with FaxSid *string `json:"fax_sid,omitempty"` // The unique string that identifies the resource Sid *string `json:"sid,omitempty"` // The absolute URL of the FaxMedia resource Url *string `json:"url,omitempty"` }
FaxV1FaxMedia struct for FaxV1FaxMedia
type ListFaxMediaParams ¶
type ListFaxMediaParams struct { // How many resources to return in each list page. The default is 50, and the maximum is 1000. PageSize *int `json:"PageSize,omitempty"` // Max number of records to return. Limit *int `json:"limit,omitempty"` }
Optional parameters for the method 'ListFaxMedia'
func (*ListFaxMediaParams) SetLimit ¶ added in v0.13.0
func (params *ListFaxMediaParams) SetLimit(Limit int) *ListFaxMediaParams
func (*ListFaxMediaParams) SetPageSize ¶
func (params *ListFaxMediaParams) SetPageSize(PageSize int) *ListFaxMediaParams
type ListFaxMediaResponse ¶
type ListFaxMediaResponse struct { Media []FaxV1FaxMedia `json:"media,omitempty"` Meta ListFaxResponseMeta `json:"meta,omitempty"` }
ListFaxMediaResponse struct for ListFaxMediaResponse
type ListFaxParams ¶
type ListFaxParams struct { // Retrieve only those faxes sent from this phone number, specified in [E.164](https://www.twilio.com/docs/glossary/what-e164) format. From *string `json:"From,omitempty"` // Retrieve only those faxes sent to this phone number, specified in [E.164](https://www.twilio.com/docs/glossary/what-e164) format. To *string `json:"To,omitempty"` // Retrieve only those faxes with a `date_created` that is before or equal to this value, specified in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format. DateCreatedOnOrBefore *time.Time `json:"DateCreatedOnOrBefore,omitempty"` // Retrieve only those faxes with a `date_created` that is later than this value, specified in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format. DateCreatedAfter *time.Time `json:"DateCreatedAfter,omitempty"` // How many resources to return in each list page. The default is 50, and the maximum is 1000. PageSize *int `json:"PageSize,omitempty"` // Max number of records to return. Limit *int `json:"limit,omitempty"` }
Optional parameters for the method 'ListFax'
func (*ListFaxParams) SetDateCreatedAfter ¶
func (params *ListFaxParams) SetDateCreatedAfter(DateCreatedAfter time.Time) *ListFaxParams
func (*ListFaxParams) SetDateCreatedOnOrBefore ¶
func (params *ListFaxParams) SetDateCreatedOnOrBefore(DateCreatedOnOrBefore time.Time) *ListFaxParams
func (*ListFaxParams) SetFrom ¶
func (params *ListFaxParams) SetFrom(From string) *ListFaxParams
func (*ListFaxParams) SetLimit ¶ added in v0.13.0
func (params *ListFaxParams) SetLimit(Limit int) *ListFaxParams
func (*ListFaxParams) SetPageSize ¶
func (params *ListFaxParams) SetPageSize(PageSize int) *ListFaxParams
func (*ListFaxParams) SetTo ¶
func (params *ListFaxParams) SetTo(To string) *ListFaxParams
type ListFaxResponse ¶
type ListFaxResponse struct { Faxes []FaxV1Fax `json:"faxes,omitempty"` Meta ListFaxResponseMeta `json:"meta,omitempty"` }
ListFaxResponse struct for ListFaxResponse
type ListFaxResponseMeta ¶
type ListFaxResponseMeta struct { FirstPageUrl string `json:"first_page_url,omitempty"` Key string `json:"key,omitempty"` NextPageUrl string `json:"next_page_url,omitempty"` Page int `json:"page,omitempty"` PageSize int `json:"page_size,omitempty"` PreviousPageUrl string `json:"previous_page_url,omitempty"` Url string `json:"url,omitempty"` }
ListFaxResponseMeta struct for ListFaxResponseMeta
type UpdateFaxParams ¶
type UpdateFaxParams struct { // The new [status](https://www.twilio.com/docs/fax/api/fax-resource#fax-status-values) of the resource. Can be only `canceled`. This may fail if transmission has already started. Status *string `json:"Status,omitempty"` }
Optional parameters for the method 'UpdateFax'
func (*UpdateFaxParams) SetStatus ¶
func (params *UpdateFaxParams) SetStatus(Status string) *UpdateFaxParams