add description all the way
This commit is contained in:
@@ -15,9 +15,10 @@ type Rule struct {
|
||||
}
|
||||
|
||||
type Voucher struct {
|
||||
Code string `json:"code"`
|
||||
Value int64 `json:"value"`
|
||||
Rules string `json:"rules"`
|
||||
Code string `json:"code"`
|
||||
Value int64 `json:"value"`
|
||||
Rules string `json:"rules"`
|
||||
Description string `json:"description,omitempty"`
|
||||
}
|
||||
|
||||
type Service struct {
|
||||
@@ -40,8 +41,9 @@ func (s *Service) GetVoucher(code string) (*messages.AddVoucher, error) {
|
||||
}
|
||||
|
||||
return &messages.AddVoucher{
|
||||
Code: code,
|
||||
Value: v.Value,
|
||||
Code: code,
|
||||
Value: v.Value,
|
||||
Description: v.Description,
|
||||
VoucherRules: []string{
|
||||
v.Rules,
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user