Documentation ¶
Index ¶
- Constants
- func DoBoolPostRequest(sling *sling.Sling, path string, requestParams interface{}) (bool, *http.Response, error)
- func MatchFirstError(httpError error, errorResponse *ErrorResponse) error
- type Action
- type ActionBuilder
- func (builder *ActionBuilder) BuildAddTagAction(tagName string) *Action
- func (builder *ActionBuilder) BuildRemoveTagAction(tagName string) *Action
- func (builder *ActionBuilder) BuildSetFieldValueAction(fieldName string, value interface{}) *Action
- func (builder *ActionBuilder) BuildUnsetFieldValueAction(fieldName string) *Action
- type AddSubscriberTagByNameRequest
- type AddSubscriberTagRequest
- type BoolSuccessResponse
- type BotField
- type BotFieldService
- func (s *BotFieldService) CreateBotField(request CreateBotFieldRequest) (*BotField, *http.Response, error)
- func (s *BotFieldService) GetBotFields() (*[]BotField, *http.Response, error)
- func (s *BotFieldService) SetBotField(request SetBotFieldRequest) (bool, *http.Response, error)
- func (s *BotFieldService) SetBotFieldByName(request SetBotFieldByNameRequest) (bool, *http.Response, error)
- func (s *BotFieldService) SetBotFields(request SetBotFieldsRequest) (bool, *http.Response, error)
- type BotFieldType
- type Button
- type ButtonsBuilder
- func (builder *ButtonsBuilder) BuildBuyButton(caption string, customer Customer, product Product, successTarget string) *Button
- func (builder *ButtonsBuilder) BuildCallButton(caption string, phone string) *Button
- func (builder *ButtonsBuilder) BuildCallbackButton(caption string, url string, method string, headers interface{}, ...) *Button
- func (builder *ButtonsBuilder) BuildFlowButton(caption string, target string) *Button
- func (builder *ButtonsBuilder) BuildNodeButton(caption string, target string) *Button
- func (builder *ButtonsBuilder) BuildUrlButton(caption string, url string, webViewSize string) *Button
- type Client
- type CreateBotFieldRequest
- type CreateSubscriberRequest
- type CreateTagRequest
- type CustomField
- type CustomFieldService
- type Customer
- type DataType
- type DynamicBlock
- func (dynamicBlock *DynamicBlock) AddAction(action *Action)
- func (dynamicBlock *DynamicBlock) AddActions(actions []*Action)
- func (dynamicBlock *DynamicBlock) AddMessage(message *Message)
- func (dynamicBlock *DynamicBlock) AddMessages(messages []*Message)
- func (dynamicBlock *DynamicBlock) AddQuickReplies(quickReplies []*QuickReply)
- func (dynamicBlock *DynamicBlock) AddQuickReply(quickReply *QuickReply)
- type DynamicBlockBuilder
- type ErrorResponse
- type ExternalMessage
- type ExternalMessageBuilder
- type FindSubscriberByCustomFieldRequest
- type FindSubscriberByEmailRequest
- type FindSubscriberByNameRequest
- type FindSubscriberByPhoneRequest
- type Flow
- type FlowService
- type Flows
- type Folder
- type Gallery
- type GalleryBuilder
- type GalleryCard
- type GetSubscriberInfoByUserRefRequest
- type GetSubscriberInfoRequest
- type GrowthTool
- type GrowthToolsService
- type Message
- type MessageBuilder
- func (builder *MessageBuilder) BuildAudioMessage(url string) *Message
- func (builder *MessageBuilder) BuildFileMessage(url string) *Message
- func (builder *MessageBuilder) BuildGalleryMessage(gallery *Gallery) *Message
- func (builder *MessageBuilder) BuildImageMessage(url string) *Message
- func (builder *MessageBuilder) BuildTextMessage(text string) *Message
- func (builder *MessageBuilder) BuildVideoMessage(url string) *Message
- type OtnTopic
- type OtnTopicService
- type Page
- type PageService
- type Product
- type QuickReply
- type QuickReplyBuilder
- func (builder *QuickReplyBuilder) BuildDynamicBlockCallbackQuickReply(caption string, url string, method string, headers interface{}, ...) *QuickReply
- func (builder *QuickReplyBuilder) BuildFlowQuickReply(caption string, target string) *QuickReply
- func (builder *QuickReplyBuilder) BuildNodeQuickReply(caption string, target string) *QuickReply
- type RateLimit
- type RemoveSubscriberTagByNameRequest
- type RemoveSubscriberTagRequest
- type RemoveTagByNameRequest
- type RemoveTagRequest
- type SendingSendContentByUserRefRequest
- type SendingSendContentRequest
- type SendingSendFlowRequest
- type SendingService
- func (s *SendingService) SendContent(request SendingSendContentRequest) (bool, *http.Response, error)
- func (s *SendingService) SendContentByUserRef(request SendingSendContentByUserRefRequest) (bool, *http.Response, error)
- func (s *SendingService) SendFlow(request SendingSendFlowRequest) (bool, *http.Response, error)
- type SetBotFieldByNameRequest
- type SetBotFieldRequest
- type SetBotFieldsItem
- type SetBotFieldsRequest
- type SetCustomFieldsItem
- type SetCustomFieldsRequest
- type SetSubscriberCustomFieldByNameRequest
- type SetSubscriberCustomFieldRequest
- type Subscriber
- type SubscriberCustomField
- type SubscriberRefField
- type SubscriberService
- func (s *SubscriberService) AddTag(request AddSubscriberTagRequest) (bool, *http.Response, error)
- func (s *SubscriberService) AddTagByName(request AddSubscriberTagRequest) (bool, *http.Response, error)
- func (s *SubscriberService) CreateSubscriber(request CreateSubscriberRequest) (*Subscriber, *http.Response, error)
- func (s *SubscriberService) FindByCustomField(request FindSubscriberByCustomFieldRequest) (*[]Subscriber, *http.Response, error)
- func (s *SubscriberService) FindByEmail(request FindSubscriberByEmailRequest) (*Subscriber, *http.Response, error)
- func (s *SubscriberService) FindByName(request FindSubscriberByNameRequest) (*[]Subscriber, *http.Response, error)
- func (s *SubscriberService) FindByPhone(request FindSubscriberByPhoneRequest) (*Subscriber, *http.Response, error)
- func (s *SubscriberService) GetInfo(request GetSubscriberInfoRequest) (*Subscriber, *http.Response, error)
- func (s *SubscriberService) GetInfoByUserRef(request GetSubscriberInfoByUserRefRequest) (*Subscriber, *http.Response, error)
- func (s *SubscriberService) RemoveTag(request RemoveSubscriberTagRequest) (bool, *http.Response, error)
- func (s *SubscriberService) RemoveTagByName(request RemoveSubscriberTagByNameRequest) (bool, *http.Response, error)
- func (s *SubscriberService) SetCustomField(request SetSubscriberCustomFieldRequest) (bool, *http.Response, error)
- func (s *SubscriberService) SetCustomFieldByName(request SetSubscriberCustomFieldByNameRequest) (bool, *http.Response, error)
- func (s *SubscriberService) SetCustomFields(request SetCustomFieldsRequest) (bool, *http.Response, error)
- func (s *SubscriberService) UpdateSubscriber(request UpdateSubscriberRequest) (*Subscriber, *http.Response, error)
- func (s *SubscriberService) VerifyBySignedRequest(request SubscriberVerifyBySignedRequestRequest) (bool, *http.Response, error)
- type SubscriberShopifyField
- type SubscriberVerifyBySignedRequestRequest
- type Tag
- type TagService
- func (s *TagService) CreateTag(request CreateTagRequest) (*Tag, *http.Response, error)
- func (s *TagService) GetTags() (*[]Tag, *http.Response, error)
- func (s *TagService) RemoveTag(request RemoveTagRequest) (bool, *http.Response, error)
- func (s *TagService) RemoveTagByName(request RemoveTagByNameRequest) (bool, *http.Response, error)
- type UpdateSubscriberRequest
- type СreateCustomFieldRequest
Constants ¶
View Source
const ( ActionAddTag string = "add_tag" ActionRemoveTag string = "remove_tag" ActionSetFieldValue string = "set_field_value" ActionUnsetFieldValue string = "unset_field_value" )
View Source
const ( ButtonTypeCall string = "call" ButtonTypeUrl string = "url" ButtonTypeFlow string = "flow" ButtonTypeNode string = "node" ButtonTypeBuy string = "buy" ButtonTypeDynamicBlockCallback string = "dynamic_block_callback" )
View Source
const ( WebViewSizeFull string = "full" WebViewSizeMedium string = "medium" WebViewSizeCompact string = "compact" )
View Source
const ( ImageAspectRatioHorizontal string = "horizontal" ImageAspectRationSquare string = "square" )
View Source
const ( MessageTypeText string = "text" MessageTypeImage string = "image" MessageTypeVideo string = "video" MessageTypeAudio string = "audio" MessageTypeFile string = "file" MessageTypeCards string = "cards" )
View Source
const ( QuickReplyTypeNode string = "node" QuickReplyTypeFlow string = "flow" QuickReplyTypeDynamicBlockCallback string = "dynamic_block_callback" )
Variables ¶
This section is empty.
Functions ¶
func DoBoolPostRequest ¶ added in v1.0.4
func MatchFirstError ¶ added in v1.0.4
func MatchFirstError(httpError error, errorResponse *ErrorResponse) error
Types ¶
type ActionBuilder ¶ added in v1.0.4
type ActionBuilder struct{}
func (*ActionBuilder) BuildAddTagAction ¶ added in v1.0.4
func (builder *ActionBuilder) BuildAddTagAction(tagName string) *Action
func (*ActionBuilder) BuildRemoveTagAction ¶ added in v1.0.4
func (builder *ActionBuilder) BuildRemoveTagAction(tagName string) *Action
func (*ActionBuilder) BuildSetFieldValueAction ¶ added in v1.0.4
func (builder *ActionBuilder) BuildSetFieldValueAction(fieldName string, value interface{}) *Action
func (*ActionBuilder) BuildUnsetFieldValueAction ¶ added in v1.0.4
func (builder *ActionBuilder) BuildUnsetFieldValueAction(fieldName string) *Action
type AddSubscriberTagByNameRequest ¶ added in v1.0.4
type AddSubscriberTagRequest ¶ added in v1.0.4
type BoolSuccessResponse ¶ added in v1.0.4
type BoolSuccessResponse struct {
Status string `json:"status"`
}
type BotField ¶ added in v1.0.4
type BotField struct { Id int64 `json:"id"` Name string `json:"name"` Type BotFieldType `json:"type"` Description string `json:"description"` Value interface{} `json:"value"` }
type BotFieldService ¶ added in v1.0.4
type BotFieldService struct {
// contains filtered or unexported fields
}
func (*BotFieldService) CreateBotField ¶ added in v1.0.4
func (s *BotFieldService) CreateBotField(request CreateBotFieldRequest) (*BotField, *http.Response, error)
func (*BotFieldService) GetBotFields ¶ added in v1.0.4
func (s *BotFieldService) GetBotFields() (*[]BotField, *http.Response, error)
func (*BotFieldService) SetBotField ¶ added in v1.0.4
func (s *BotFieldService) SetBotField(request SetBotFieldRequest) (bool, *http.Response, error)
func (*BotFieldService) SetBotFieldByName ¶ added in v1.0.4
func (s *BotFieldService) SetBotFieldByName(request SetBotFieldByNameRequest) (bool, *http.Response, error)
func (*BotFieldService) SetBotFields ¶ added in v1.0.4
func (s *BotFieldService) SetBotFields(request SetBotFieldsRequest) (bool, *http.Response, error)
type BotFieldType ¶ added in v1.0.4
type BotFieldType DataType
type Button ¶ added in v1.0.4
type Button struct { Type string `json:"type"` Caption string `json:"caption"` Phone string `json:"phone,omitempty"` Url string `json:"url,omitempty"` Method string `json:"method,omitempty"` WebViewSize string `json:"web_view_size,omitempty"` Target string `json:"target,omitempty"` Customer Customer `json:"customer,omitempty"` Product Product `json:"product,omitempty"` SuccessTarget string `json:"success_target,omitempty"` Headers interface{} `json:"headers,omitempty"` Payload interface{} `json:"payload,omitempty"` }
type ButtonsBuilder ¶ added in v1.0.4
type ButtonsBuilder struct{}
func (*ButtonsBuilder) BuildBuyButton ¶ added in v1.0.4
func (*ButtonsBuilder) BuildCallButton ¶ added in v1.0.4
func (builder *ButtonsBuilder) BuildCallButton(caption string, phone string) *Button
func (*ButtonsBuilder) BuildCallbackButton ¶ added in v1.0.4
func (builder *ButtonsBuilder) BuildCallbackButton(caption string, url string, method string, headers interface{}, payload interface{}) *Button
func (*ButtonsBuilder) BuildFlowButton ¶ added in v1.0.4
func (builder *ButtonsBuilder) BuildFlowButton(caption string, target string) *Button
func (*ButtonsBuilder) BuildNodeButton ¶ added in v1.0.4
func (builder *ButtonsBuilder) BuildNodeButton(caption string, target string) *Button
func (*ButtonsBuilder) BuildUrlButton ¶ added in v1.0.4
func (builder *ButtonsBuilder) BuildUrlButton(caption string, url string, webViewSize string) *Button
type Client ¶
type Client struct { Page *PageService Subscribers *SubscriberService Sending *SendingService DynamicBlock *DynamicBlockBuilder // contains filtered or unexported fields }
type CreateBotFieldRequest ¶ added in v1.0.4
type CreateSubscriberRequest ¶ added in v1.0.4
type CreateSubscriberRequest struct { FirstName string `json:"first_name"` LastName string `json:"last_name"` Phone string `json:"phone"` WhatsAppPhone string `json:"whatsapp_phone,omitempty"` Email string `json:"email"` Gender string `json:"gender"` HasOptInSMS bool `json:"has_opt_in_sms"` HasOptInEmail bool `json:"has_opt_in_email"` ConsentPhrase string `json:"consent_phrase"` }
type CreateTagRequest ¶ added in v1.0.4
type CreateTagRequest struct {
Name string `json:"name,omitempty"`
}
type CustomField ¶ added in v1.0.4
type CustomFieldService ¶ added in v1.0.4
type CustomFieldService struct {
// contains filtered or unexported fields
}
func (*CustomFieldService) CreateCustomField ¶ added in v1.0.4
func (s *CustomFieldService) CreateCustomField(request СreateCustomFieldRequest) (*CustomField, *http.Response, error)
func (*CustomFieldService) GetCustomFields ¶ added in v1.0.4
func (s *CustomFieldService) GetCustomFields() (*[]CustomField, *http.Response, error)
type DataType ¶ added in v1.0.4
type DataType string
const ( BotFieldTypeUndefined DataType = DataTypeUndefined BotFieldTypeText DataType = DataTypeText BotFieldTypeNumber DataType = DataTypeNumber BotFieldTypeDate DataType = DataTypeDate BotFieldTypeDateTime DataType = DataTypeDateTime BotFieldTypeBoolean DataType = DataTypeBoolean )
const ( CustomFieldTypeUndefined DataType = DataTypeUndefined CustomFieldTypeText DataType = DataTypeText CustomFieldTypeNumber DataType = DataTypeNumber CustomFieldTypeDate DataType = DataTypeDate CustomFieldTypeDateTime DataType = DataTypeDateTime CustomFieldTypeBoolean DataType = DataTypeBoolean )
type DynamicBlock ¶ added in v1.0.4
type DynamicBlock struct { Version string `json:"version"` Content struct { Messages []*Message `json:"messages"` Actions []*Action `json:"actions,omitempty"` QuickReplies []*QuickReply `json:"quick_replies,omitempty"` } `json:"content"` }
func (*DynamicBlock) AddAction ¶ added in v1.0.4
func (dynamicBlock *DynamicBlock) AddAction(action *Action)
func (*DynamicBlock) AddActions ¶ added in v1.0.4
func (dynamicBlock *DynamicBlock) AddActions(actions []*Action)
func (*DynamicBlock) AddMessage ¶ added in v1.0.4
func (dynamicBlock *DynamicBlock) AddMessage(message *Message)
func (*DynamicBlock) AddMessages ¶ added in v1.0.4
func (dynamicBlock *DynamicBlock) AddMessages(messages []*Message)
func (*DynamicBlock) AddQuickReplies ¶ added in v1.0.4
func (dynamicBlock *DynamicBlock) AddQuickReplies(quickReplies []*QuickReply)
func (*DynamicBlock) AddQuickReply ¶ added in v1.0.4
func (dynamicBlock *DynamicBlock) AddQuickReply(quickReply *QuickReply)
type DynamicBlockBuilder ¶ added in v1.0.4
type DynamicBlockBuilder struct { Messages *MessageBuilder Buttons *ButtonsBuilder Actions *ActionBuilder QuickReply *QuickReplyBuilder Gallery *GalleryBuilder ExternalMessage *ExternalMessageBuilder }
func NewDynamicBlockBuilder ¶ added in v1.0.4
func NewDynamicBlockBuilder() *DynamicBlockBuilder
func (*DynamicBlockBuilder) BuildDynamicBlock ¶ added in v1.0.4
func (builder *DynamicBlockBuilder) BuildDynamicBlock() *DynamicBlock
type ErrorResponse ¶ added in v1.0.4
type ExternalMessage ¶ added in v1.0.4
type ExternalMessageBuilder ¶ added in v1.0.4
type ExternalMessageBuilder struct{}
func (*ExternalMessageBuilder) BuildExternalMessage ¶ added in v1.0.4
func (builder *ExternalMessageBuilder) BuildExternalMessage(url string, method string, headers interface{}, payload interface{}, timeout int64) *ExternalMessage
type FindSubscriberByCustomFieldRequest ¶ added in v1.0.4
type FindSubscriberByCustomFieldRequest struct { FieldId int64 `url:"field_id"` FieldValue interface{} `url:"field_value"` }
type FindSubscriberByEmailRequest ¶ added in v1.0.4
type FindSubscriberByEmailRequest struct {
Email string `url:"email"`
}
type FindSubscriberByNameRequest ¶ added in v1.0.4
type FindSubscriberByNameRequest struct {
Name string `url:"name"`
}
type FindSubscriberByPhoneRequest ¶ added in v1.0.4
type FindSubscriberByPhoneRequest struct {
Phone string `url:"phone"`
}
type FlowService ¶ added in v1.0.4
type FlowService struct {
// contains filtered or unexported fields
}
type Gallery ¶ added in v1.0.4
type Gallery struct { Elements []*GalleryCard `json:"elements"` // contains filtered or unexported fields }
func (*Gallery) AddGalleryCard ¶ added in v1.0.4
func (*Gallery) GetImageAspectRation ¶ added in v1.0.4
func (*Gallery) SetImageAspectRation ¶ added in v1.0.4
type GalleryBuilder ¶ added in v1.0.4
type GalleryBuilder struct{}
func (*GalleryBuilder) NewGallery ¶ added in v1.0.4
func (builder *GalleryBuilder) NewGallery() *Gallery
type GalleryCard ¶ added in v1.0.4
type GetSubscriberInfoByUserRefRequest ¶ added in v1.0.4
type GetSubscriberInfoByUserRefRequest struct {
UserRef int64 `url:"user_ref"`
}
type GetSubscriberInfoRequest ¶ added in v1.0.4
type GetSubscriberInfoRequest struct {
SubscriberId int64 `url:"subscriber_id"`
}
type GrowthTool ¶ added in v1.0.4
type GrowthToolsService ¶ added in v1.0.4
type GrowthToolsService struct {
// contains filtered or unexported fields
}
func (*GrowthToolsService) GetGrowthTools ¶ added in v1.0.4
func (s *GrowthToolsService) GetGrowthTools() (*[]GrowthTool, *http.Response, error)
type Message ¶ added in v1.0.4
type Message struct { Type string `json:"type"` Text string `json:"text,omitempty"` Url string `json:"url,omitempty"` Buttons []*Button `json:"buttons,omitempty"` Elements []*GalleryCard `json:"elements,omitempty"` ImageAspectRatio string `json:"image_aspect_ratio"` }
func (*Message) AddButtons ¶ added in v1.0.4
type MessageBuilder ¶ added in v1.0.4
type MessageBuilder struct{}
func (*MessageBuilder) BuildAudioMessage ¶ added in v1.0.4
func (builder *MessageBuilder) BuildAudioMessage(url string) *Message
func (*MessageBuilder) BuildFileMessage ¶ added in v1.0.4
func (builder *MessageBuilder) BuildFileMessage(url string) *Message
func (*MessageBuilder) BuildGalleryMessage ¶ added in v1.0.4
func (builder *MessageBuilder) BuildGalleryMessage(gallery *Gallery) *Message
func (*MessageBuilder) BuildImageMessage ¶ added in v1.0.4
func (builder *MessageBuilder) BuildImageMessage(url string) *Message
func (*MessageBuilder) BuildTextMessage ¶ added in v1.0.4
func (builder *MessageBuilder) BuildTextMessage(text string) *Message
func (*MessageBuilder) BuildVideoMessage ¶ added in v1.0.4
func (builder *MessageBuilder) BuildVideoMessage(url string) *Message
type OtnTopicService ¶ added in v1.0.4
type OtnTopicService struct {
// contains filtered or unexported fields
}
func (*OtnTopicService) GetOtnTopics ¶ added in v1.0.4
func (s *OtnTopicService) GetOtnTopics() (*[]OtnTopic, *http.Response, error)
type Page ¶ added in v1.0.4
type Page struct { Id int64 `json:"id"` Name string `json:"name"` Category string `json:"category"` AvatarLink string `json:"avatar_link"` Username string `json:"username"` About string `json:"about"` Description string `json:"description"` IsPro bool `json:"is_pro"` Timezone string `json:"timezone"` }
type PageService ¶ added in v1.0.4
type PageService struct { Tags *TagService GrowthTools *GrowthToolsService Flows *FlowService OtnTopics *OtnTopicService CustomFields *CustomFieldService BotFields *BotFieldService // contains filtered or unexported fields }
func NewPageService ¶ added in v1.0.4
func NewPageService(sling *sling.Sling) *PageService
type QuickReply ¶ added in v1.0.4
type QuickReplyBuilder ¶ added in v1.0.4
type QuickReplyBuilder struct{}
func (*QuickReplyBuilder) BuildDynamicBlockCallbackQuickReply ¶ added in v1.0.4
func (builder *QuickReplyBuilder) BuildDynamicBlockCallbackQuickReply(caption string, url string, method string, headers interface{}, payload interface{}) *QuickReply
func (*QuickReplyBuilder) BuildFlowQuickReply ¶ added in v1.0.4
func (builder *QuickReplyBuilder) BuildFlowQuickReply(caption string, target string) *QuickReply
func (*QuickReplyBuilder) BuildNodeQuickReply ¶ added in v1.0.4
func (builder *QuickReplyBuilder) BuildNodeQuickReply(caption string, target string) *QuickReply
type RateLimit ¶ added in v1.0.4
type RateLimit uint16
const ( RateLimitPageGetInfo RateLimit = 100 RateLimitPageCreateTag RateLimit = 10 RateLimitPageGetTags RateLimit = 100 RateLimitPageRemoveTag RateLimit = 10 RateLimitPageRemoveTageByName RateLimit = 10 RateLimitPageCreateCustomField RateLimit = 10 RateLimitPageGetGrowthTools RateLimit = 100 RateLimitPageGetFlows RateLimit = 10 RateLimitPageGetCustomFields RateLimit = 100 RateLimitPageGetOtnTopics RateLimit = 100 RateLimitPageGetBotFields RateLimit = 100 RateLimitPageCreateBotField RateLimit = 10 RateLimitPageSetBotField RateLimit = 10 RateLimitPageSetBotFieldByName RateLimit = 10 RateLimitPageSetBotFields RateLimit = 10 RateLimitSubscriberGetInfo RateLimit = 10 RateLimitSubscriberFindByName RateLimit = 100 RateLimitSubscriberGetInfoByUserRef RateLimit = 1000 RateLimitSubscriberFindByCustomField RateLimit = 100 RateLimitSubscriberFindBySystemField RateLimit = 100 RateLimitSubscriberAddTag RateLimit = 10 RateLimitSubscriberAddTagByName RateLimit = 10 RateLimitSubscriberRemoveTag RateLimit = 10 RateLimitSubscriberRemoveTagByName RateLimit = 10 RateLimitSubscriberSetCustomField RateLimit = 10 RateLimitSubscriberSetCustomFields RateLimit = 10 RateLimitSubscriberSetCustomFieldByName RateLimit = 10 RateLimitSubscriberVerifyBySignedRequest RateLimit = 10 RateLimitSubscriberCreateSubscriber RateLimit = 10 RateLimitSubscriberUpdateSubscriber RateLimit = 10 RateLimitSendingSendContent RateLimit = 25 RateLimitSendingSendContentByUserRef RateLimit = 25 RateLimitSendingSendFlow RateLimit = 25 )
type RemoveSubscriberTagByNameRequest ¶ added in v1.0.4
type RemoveSubscriberTagRequest ¶ added in v1.0.4
type RemoveTagByNameRequest ¶ added in v1.0.4
type RemoveTagByNameRequest struct {
Name string `json:"tag_name,omitempty"`
}
type RemoveTagRequest ¶ added in v1.0.4
type RemoveTagRequest struct {
Id int64 `json:"tag_id,omitempty"`
}
type SendingSendContentByUserRefRequest ¶ added in v1.0.4
type SendingSendContentByUserRefRequest struct { UserRef int64 `json:"user_ref"` Data DynamicBlock `json:"data"` }
type SendingSendContentRequest ¶ added in v1.0.4
type SendingSendContentRequest struct { SubscriberId int64 `json:"subscriber_id"` Data *DynamicBlock `json:"data"` MessageTag string `json:"message_tag"` OtnTopicName string `json:"otn_topic_name,omitempty"` }
type SendingSendFlowRequest ¶ added in v1.0.4
type SendingService ¶ added in v1.0.4
type SendingService struct {
// contains filtered or unexported fields
}
func NewSendingService ¶ added in v1.0.4
func NewSendingService(sling *sling.Sling) *SendingService
func (*SendingService) SendContent ¶ added in v1.0.4
func (s *SendingService) SendContent(request SendingSendContentRequest) (bool, *http.Response, error)
func (*SendingService) SendContentByUserRef ¶ added in v1.0.4
func (s *SendingService) SendContentByUserRef(request SendingSendContentByUserRefRequest) (bool, *http.Response, error)
func (*SendingService) SendFlow ¶ added in v1.0.4
func (s *SendingService) SendFlow(request SendingSendFlowRequest) (bool, *http.Response, error)
type SetBotFieldByNameRequest ¶ added in v1.0.4
type SetBotFieldByNameRequest struct { FieldName string `json:"field_name"` FieldValue interface{} `json:"field_value"` }
type SetBotFieldRequest ¶ added in v1.0.4
type SetBotFieldRequest struct { FieldId int64 `json:"field_id"` FieldValue interface{} `json:"field_value"` }
type SetBotFieldsItem ¶ added in v1.0.4
type SetBotFieldsRequest ¶ added in v1.0.4
type SetBotFieldsRequest struct {
Items []SetBotFieldsItem `json:"fields"`
}
type SetCustomFieldsItem ¶ added in v1.0.4
type SetCustomFieldsRequest ¶ added in v1.0.4
type SetCustomFieldsRequest struct { SubscriberId int64 `json:"subscriber_id"` Items []SetCustomFieldsItem `json:"fields"` }
type SetSubscriberCustomFieldByNameRequest ¶ added in v1.0.4
type SetSubscriberCustomFieldRequest ¶ added in v1.0.4
type Subscriber ¶ added in v1.0.4
type Subscriber struct { Id string `json:"id"` PageId string `json:"page_id"` UserRefs []SubscriberRefField `json:"user_refs,omitempty"` FirstName string `json:"first_name"` LastName string `json:"last_name"` Name string `json:"name"` Gender string `json:"gender"` ProfilePic string `json:"profile_pic"` Locale string `json:"locale"` Language string `json:"language"` TimeZone string `json:"time_zone"` LiveChatUrl string `json:"live_chat_url"` LastInputText string `json:"last_input_text"` OptInPhone bool `json:"optin_phone"` Phone string `json:"phone"` OptInEmail bool `json:"optin_email"` Email string `json:"email"` Subscribed string `json:"subscribed"` LastInteraction string `json:"last_interaction"` LastSeen string `json:"last_seen"` IsFollowupEnabled bool `json:"is_followup_enabled"` IgUsername string `json:"ig_username"` IgId int64 `json:"ig_id"` WhatsAppPhone string `json:"whatsapp_phone"` OptInWhatsApp bool `json:"optin_whatsapp"` CustomFields []SubscriberCustomField `json:"custom_fields"` ShopifyFields []SubscriberShopifyField `json:"shopify_fields,omitempty"` Tags []Tag `json:"tags,omitempty"` }
type SubscriberCustomField ¶ added in v1.0.4
type SubscriberRefField ¶ added in v1.0.4
type SubscriberService ¶ added in v1.0.4
type SubscriberService struct {
// contains filtered or unexported fields
}
func NewSubscriberService ¶ added in v1.0.4
func NewSubscriberService(sling *sling.Sling) *SubscriberService
func (*SubscriberService) AddTag ¶ added in v1.0.4
func (s *SubscriberService) AddTag(request AddSubscriberTagRequest) (bool, *http.Response, error)
func (*SubscriberService) AddTagByName ¶ added in v1.0.4
func (s *SubscriberService) AddTagByName(request AddSubscriberTagRequest) (bool, *http.Response, error)
func (*SubscriberService) CreateSubscriber ¶ added in v1.0.4
func (s *SubscriberService) CreateSubscriber(request CreateSubscriberRequest) (*Subscriber, *http.Response, error)
func (*SubscriberService) FindByCustomField ¶ added in v1.0.4
func (s *SubscriberService) FindByCustomField(request FindSubscriberByCustomFieldRequest) (*[]Subscriber, *http.Response, error)
func (*SubscriberService) FindByEmail ¶ added in v1.0.4
func (s *SubscriberService) FindByEmail(request FindSubscriberByEmailRequest) (*Subscriber, *http.Response, error)
func (*SubscriberService) FindByName ¶ added in v1.0.4
func (s *SubscriberService) FindByName(request FindSubscriberByNameRequest) (*[]Subscriber, *http.Response, error)
func (*SubscriberService) FindByPhone ¶ added in v1.0.4
func (s *SubscriberService) FindByPhone(request FindSubscriberByPhoneRequest) (*Subscriber, *http.Response, error)
func (*SubscriberService) GetInfo ¶ added in v1.0.4
func (s *SubscriberService) GetInfo(request GetSubscriberInfoRequest) (*Subscriber, *http.Response, error)
func (*SubscriberService) GetInfoByUserRef ¶ added in v1.0.4
func (s *SubscriberService) GetInfoByUserRef(request GetSubscriberInfoByUserRefRequest) (*Subscriber, *http.Response, error)
func (*SubscriberService) RemoveTag ¶ added in v1.0.4
func (s *SubscriberService) RemoveTag(request RemoveSubscriberTagRequest) (bool, *http.Response, error)
func (*SubscriberService) RemoveTagByName ¶ added in v1.0.4
func (s *SubscriberService) RemoveTagByName(request RemoveSubscriberTagByNameRequest) (bool, *http.Response, error)
func (*SubscriberService) SetCustomField ¶ added in v1.0.4
func (s *SubscriberService) SetCustomField(request SetSubscriberCustomFieldRequest) (bool, *http.Response, error)
func (*SubscriberService) SetCustomFieldByName ¶ added in v1.0.4
func (s *SubscriberService) SetCustomFieldByName(request SetSubscriberCustomFieldByNameRequest) (bool, *http.Response, error)
func (*SubscriberService) SetCustomFields ¶ added in v1.0.8
func (s *SubscriberService) SetCustomFields(request SetCustomFieldsRequest) (bool, *http.Response, error)
func (*SubscriberService) UpdateSubscriber ¶ added in v1.0.4
func (s *SubscriberService) UpdateSubscriber(request UpdateSubscriberRequest) (*Subscriber, *http.Response, error)
func (*SubscriberService) VerifyBySignedRequest ¶ added in v1.0.4
func (s *SubscriberService) VerifyBySignedRequest(request SubscriberVerifyBySignedRequestRequest) (bool, *http.Response, error)
type SubscriberShopifyField ¶ added in v1.0.4
type SubscriberShopifyField struct { Id int64 `json:"id"` State string `json:"state"` Currency string `json:"currency"` TotalSpent string `json:"total_spent"` OrdersCount int64 `json:"orders_count"` AcceptsMarketing bool `json:"accepts_marketing"` LastOrderId int64 `json:"last_order_id"` LastOrderCreatedAt string `json:"last_order_created_at"` Tags []string `json:"tags"` LastCheckoutId int64 `json:"last_checkout_id"` LastCheckoutPrice string `json:"last_checkout_price"` LastCheckoutCreatedAt string `json:"last_checkout_created_at"` }
type SubscriberVerifyBySignedRequestRequest ¶ added in v1.0.4
type TagService ¶ added in v1.0.4
type TagService struct {
// contains filtered or unexported fields
}
func (*TagService) CreateTag ¶ added in v1.0.4
func (s *TagService) CreateTag(request CreateTagRequest) (*Tag, *http.Response, error)
func (*TagService) GetTags ¶ added in v1.0.4
func (s *TagService) GetTags() (*[]Tag, *http.Response, error)
func (*TagService) RemoveTag ¶ added in v1.0.4
func (s *TagService) RemoveTag(request RemoveTagRequest) (bool, *http.Response, error)
func (*TagService) RemoveTagByName ¶ added in v1.0.4
func (s *TagService) RemoveTagByName(request RemoveTagByNameRequest) (bool, *http.Response, error)
type UpdateSubscriberRequest ¶ added in v1.0.4
type UpdateSubscriberRequest struct { SubscriberId int64 `json:"subscriber_id"` FirstName string `json:"first_name"` LastName string `json:"last_name"` Phone string `json:"phone"` WhatsAppPhone string `json:"whatsapp_phone,omitempty"` Email string `json:"email"` Gender string `json:"gender"` HasOptInSMS bool `json:"has_opt_in_sms"` HasOptInEmail bool `json:"has_opt_in_email"` ConsentPhrase string `json:"consent_phrase"` }
type СreateCustomFieldRequest ¶ added in v1.0.4
Source Files ¶
Click to show internal directories.
Click to hide internal directories.