contact

package
Version: v1.2.11 Latest Latest
Warning

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

Go to latest
Published: Jun 17, 2021 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct {
	// contains filtered or unexported fields
}

func NewClient

func NewClient(config *client.Config) (*Client, error)

func (*Client) Create

func (c *Client) Create(context context.Context, request *CreateRequest) (*CreateResult, error)

func (*Client) Delete

func (c *Client) Delete(context context.Context, request *DeleteRequest) (*DeleteResult, error)

func (*Client) Disable

func (c *Client) Disable(context context.Context, request *DisableRequest) (*DisableResult, error)

func (*Client) Enable

func (c *Client) Enable(context context.Context, request *EnableRequest) (*EnableResult, error)

func (*Client) Get

func (c *Client) Get(context context.Context, request *GetRequest) (*GetResult, error)

func (*Client) List

func (c *Client) List(context context.Context, request *ListRequest) (*ListResult, error)

func (*Client) Update

func (c *Client) Update(context context.Context, request *UpdateRequest) (*UpdateResult, error)

type Contact

type Contact struct {
	Id              string `json:"id"`
	MethodOfContact string `json:"method"`
	To              string `json:"to,omitempty"`
	Status          Status `json:"status,omitempty"`
	ApplyOrder      uint32 `json:"applyOrder,omitempty"`
}

type CreateRequest

type CreateRequest struct {
	client.BaseRequest
	UserIdentifier  string
	To              string     `json:"to"`
	MethodOfContact MethodType `json:"method"`
}

func (*CreateRequest) Method

func (r *CreateRequest) Method() string

func (*CreateRequest) ResourcePath

func (r *CreateRequest) ResourcePath() string

func (*CreateRequest) Validate

func (r *CreateRequest) Validate() error

type CreateResult

type CreateResult struct {
	client.ResultMetadata
	Id string `json:"id,omitempty"`
}

type DeleteRequest

type DeleteRequest struct {
	client.BaseRequest
	UserIdentifier    string
	ContactIdentifier string
}

func (*DeleteRequest) Method

func (r *DeleteRequest) Method() string

func (*DeleteRequest) ResourcePath

func (r *DeleteRequest) ResourcePath() string

func (*DeleteRequest) Validate

func (r *DeleteRequest) Validate() error

type DeleteResult

type DeleteResult struct {
	client.ResultMetadata
	Result string `json:"result,omitempty"`
}

type DisableRequest

type DisableRequest struct {
	client.BaseRequest
	UserIdentifier    string
	ContactIdentifier string
}

func (*DisableRequest) Method

func (r *DisableRequest) Method() string

func (*DisableRequest) ResourcePath

func (r *DisableRequest) ResourcePath() string

func (*DisableRequest) Validate

func (r *DisableRequest) Validate() error

type DisableResult

type DisableResult struct {
	client.ResultMetadata
	Id string `json:"id,omitempty"`
}

type EnableRequest

type EnableRequest struct {
	client.BaseRequest
	UserIdentifier    string
	ContactIdentifier string
}

func (*EnableRequest) Method

func (r *EnableRequest) Method() string

func (*EnableRequest) ResourcePath

func (r *EnableRequest) ResourcePath() string

func (*EnableRequest) Validate

func (r *EnableRequest) Validate() error

type EnableResult

type EnableResult struct {
	client.ResultMetadata
	Id string `json:"id,omitempty"`
}

type GetRequest

type GetRequest struct {
	client.BaseRequest
	UserIdentifier    string
	ContactIdentifier string
}

func (*GetRequest) Method

func (r *GetRequest) Method() string

func (*GetRequest) ResourcePath

func (r *GetRequest) ResourcePath() string

func (*GetRequest) Validate

func (r *GetRequest) Validate() error

type GetResult

type GetResult struct {
	client.ResultMetadata
	Id              string `json:"id"`
	MethodOfContact string `json:"method"`
	To              string `json:"to,omitempty"`
	Status          Status `json:"status,omitempty"`
}

type ListRequest

type ListRequest struct {
	client.BaseRequest
	UserIdentifier string
}

func (*ListRequest) Method

func (r *ListRequest) Method() string

func (*ListRequest) ResourcePath

func (r *ListRequest) ResourcePath() string

func (*ListRequest) Validate

func (r *ListRequest) Validate() error

type ListResult

type ListResult struct {
	client.ResultMetadata
	Contact []Contact `json:"data,omitempty"`
}

type MethodType

type MethodType string
const (
	Sms   MethodType = "sms"
	Email MethodType = "email"
	Voice MethodType = "voice"
)

type Status

type Status struct {
	Enabled        bool   `json:"enabled"`
	DisabledReason string `json:"disabledReason"`
}

type UpdateRequest

type UpdateRequest struct {
	client.BaseRequest
	UserIdentifier    string
	ContactIdentifier string
	To                string `json:"to"`
}

func (*UpdateRequest) Method

func (r *UpdateRequest) Method() string

func (*UpdateRequest) ResourcePath

func (r *UpdateRequest) ResourcePath() string

func (*UpdateRequest) Validate

func (r *UpdateRequest) Validate() error

type UpdateResult

type UpdateResult struct {
	client.ResultMetadata
	Id string `json:"id,omitempty"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
t or T : Toggle theme light dark auto
y or Y : Canonical URL