-
Notifications
You must be signed in to change notification settings - Fork 0
/
promotion.go
35 lines (33 loc) · 1.95 KB
/
promotion.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
package shopware
const (
CODE_TYPE_NO_CODE = "no_code"
)
// Promotion see:
// https://github.com/shopware/platform/blob/6.2/src/Core/Checkout/Promotion/PromotionEntity.php
type Promotion struct {
Entity
Name string `json:"name"`
Active bool `json:"active"`
ValidFrom string `json:"validFrom"`
ValidUntil string `json:"validUntil"`
MaxRedemptionsGlobal int `json:"maxRedemptionsGlobal"`
MaxRedemptionsPerCustomer int `json:"maxRedemptionsPerCustomer"`
Exclusive bool `json:"exclusive"`
UseCodes bool `json:"useCodes"`
UseSetGroups bool `json:"useSetGroups"`
CustomerRestriction bool `json:"customerRestriction"`
UseIndividualCodes bool `json:"useIndividualCodes"`
IndividualCodePattern string `json:"individualCodePattern"`
SalesChannels []*PromotionSalesChannel `json:"salesChannels"`
Code string `json:"code"`
Discounts []*PromotionDiscount `json:"discounts"`
Setgroups []*PromotionSetGroup `json:"setgroups"`
OrderRules []*Rule `json:"orderRules"`
PersonaRules []*Rule `json:"personaRules"`
PersonaCustomers []*Customer `json:"personaCustomers"`
CartRules []*Rule `json:"cartRules"`
Translations []*PromotionTranslation `json:"translations"`
OrderCount int `json:"orderCount"`
OrdersPerCustomerCount []string `json:"ordersPerCustomerCount"`
ExclusionIDs []string `json:"exclusionIds"`
}