Skip to content

Commit 34ad8b4

Browse files
authored
chore: drop omitempty tag for required fields in ecommerce postback (#234)
Co-authored-by: kacperf531 <kacperf531@users.noreply.github.com>
1 parent 591e810 commit 34ad8b4

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

agent/structures.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,8 +56,8 @@ type TransferChatOptions struct {
5656
}
5757

5858
type PostbackEcommerce struct {
59-
ProductID string `json:"product_id,omitempty"`
60-
OptionID string `json:"option_id,omitempty"`
59+
ProductID string `json:"product_id"`
60+
OptionID string `json:"option_id"`
6161
Quantity int `json:"quantity,omitempty"`
6262
}
6363

customer/structures.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -504,8 +504,8 @@ type Postback struct {
504504
}
505505

506506
type PostbackEcommerce struct {
507-
ProductID string `json:"product_id,omitempty"`
508-
OptionID string `json:"option_id,omitempty"`
507+
ProductID string `json:"product_id"`
508+
OptionID string `json:"option_id"`
509509
Quantity int `json:"quantity,omitempty"`
510510
}
511511

0 commit comments

Comments
 (0)