cmp

package
v2.0.10 Latest Latest
Warning

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

Go to latest
Published: Dec 8, 2023 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ProductionEndpoint = "https://apigw-86xkfxhy.appsdigit.inet.co.th"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type ChatResponse

type ChatResponse struct {
	To           string   `json:"to"`
	CustomNotify string   `json:"custom_notification"`
	Elements     Elements `json:"elements"`
}

type Choice

type Choice struct {
	Label        string `json:"label"`
	Type         string `json:"type"`
	Url          string `json:"url"`
	Size         string `json:"size"`
	Sign         string `json:"sign"`
	OneChatToken bool   `json:"onechat_token"`
}

type Client

type Client struct {
	ApiEndpoint string
}

func New

func New() Client

func (*Client) GetConsentStatus

func (c *Client) GetConsentStatus(form ConsentRequestForm) (StatusResult, error)

type ConsentRequestForm

type ConsentRequestForm struct {
	TaxId         string `json:"tax_id"`
	ShareToken    string `json:"shared_token"`
	ServiceId     string `json:"service_id"`
	ConsentFormId string `json:"consent_form_id"`
}

type Elements

type Elements struct {
	Image   string `json:"image"`
	Title   string `json:"title"`
	Detail  string `json:"detail"`
	Choices Choice `json:"choice"`
}

type StatusInfo

type StatusInfo struct {
	Status   string       `json:"status"`
	Response ChatResponse `json:"response"`
}

type StatusResult

type StatusResult struct {
	Result       string     `json:"result"`
	Data         StatusInfo `json:"data"`
	ErrorMessage string     `json:"errorMessage"`
	Code         int        `json:"code"`
}

Jump to

Keyboard shortcuts

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