Skip to content

Commit

Permalink
Merge pull request #9 from flip-id/CU-860rc67a2_Wappin-V2-Implement-w…
Browse files Browse the repository at this point in the history
…appin-v2-in-github-library

adjust subtype for button request
  • Loading branch information
asqolani-flip authored Aug 7, 2023
2 parents 82ba7cd + ab11282 commit 4693919
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
6 changes: 3 additions & 3 deletions v2/payload.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,9 @@ type LanguageRequest struct {
// Index is optional, used to set button position, only valid for templates with buttons
type ComponentRequest struct {
Type string `json:"type,omitempty"`
SubType string `json:"subType,omitempty"`
SubType string `json:"sub_type,omitempty"`
Parameters []ComponentParameterRequest `json:"parameters,omitempty"`
Index int `json:"index,omitempty"`
Index *int `json:"index,omitempty"`
}

// ComponentParameterRequest is required if the template has a dynamic variable value
Expand All @@ -50,5 +50,5 @@ type MediaParameterRequest struct {
Id string `json:"id,omitempty"`
Link string `json:"link,omitempty"`
Caption string `json:"caption,omitempty"`
FileName string `json:"fileName,omitempty"`
FileName string `json:"file_name,omitempty"`
}
6 changes: 6 additions & 0 deletions v2/sub_type_button_const.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
package v2

const (
Url = "url"
QuickReply = "quick_reply"
)

0 comments on commit 4693919

Please sign in to comment.