Name | Type | Description | Notes |
---|---|---|---|
UsageLimit | Pointer to int32 | The number of times the coupon code can be redeemed. `0` means unlimited redemptions but any campaign usage limits will still apply. | |
DiscountLimit | Pointer to float32 | The total discount value that the code can give. Typically used to represent a gift card value. | [optional] |
ReservationLimit | Pointer to int32 | The number of reservations that can be made with this coupon code. | [optional] |
StartDate | Pointer to time.Time | Timestamp at which point the coupon becomes valid. | [optional] |
ExpiryDate | Pointer to time.Time | Expiration date of the coupon. Coupon never expires if this is omitted. | [optional] |
Limits | Pointer to []LimitConfig | Limits configuration for a coupon. These limits will override the limits set from the campaign. Note: Only usable when creating a single coupon which is not tied to a specific recipient. Only per-profile limits are allowed to be configured. | [optional] |
NumberOfCoupons | Pointer to int32 | The number of new coupon codes to generate for the campaign. Must be at least 1. | |
UniquePrefix | Pointer to string | DEPRECATED To create more than 20,000 coupons in one request, use Create coupons asynchronously endpoint. | [optional] |
Attributes | Pointer to map[string]interface{} | Arbitrary properties associated with this item. | [optional] |
RecipientIntegrationId | Pointer to string | The integration ID for this coupon's beneficiary's profile. | [optional] |
ValidCharacters | Pointer to []string | List of characters used to generate the random parts of a code. By default, the list of characters is equivalent to the `[A-Z, 0-9]` regular expression. | [optional] |
CouponPattern | Pointer to string | The pattern used to generate coupon codes. The character `#` is a placeholder and is replaced by a random character from the `validCharacters` set. | [optional] |
IsReservationMandatory | Pointer to bool | An indication of whether the code can be redeemed only if it has been reserved first. | [optional] [default to false] |
ImplicitlyReserved | Pointer to bool | An indication of whether the coupon is implicitly reserved for all customers. | [optional] |
func (o *NewCoupons) GetUsageLimit() int32
GetUsageLimit returns the UsageLimit field if non-nil, zero value otherwise.
func (o *NewCoupons) GetUsageLimitOk() (int32, bool)
GetUsageLimitOk returns a tuple with the UsageLimit field if it's non-nil, zero value otherwise and a boolean to check if the value has been set.
func (o *NewCoupons) HasUsageLimit() bool
HasUsageLimit returns a boolean if a field has been set.
func (o *NewCoupons) SetUsageLimit(v int32)
SetUsageLimit gets a reference to the given int32 and assigns it to the UsageLimit field.
func (o *NewCoupons) GetDiscountLimit() float32
GetDiscountLimit returns the DiscountLimit field if non-nil, zero value otherwise.
func (o *NewCoupons) GetDiscountLimitOk() (float32, bool)
GetDiscountLimitOk returns a tuple with the DiscountLimit field if it's non-nil, zero value otherwise and a boolean to check if the value has been set.
func (o *NewCoupons) HasDiscountLimit() bool
HasDiscountLimit returns a boolean if a field has been set.
func (o *NewCoupons) SetDiscountLimit(v float32)
SetDiscountLimit gets a reference to the given float32 and assigns it to the DiscountLimit field.
func (o *NewCoupons) GetReservationLimit() int32
GetReservationLimit returns the ReservationLimit field if non-nil, zero value otherwise.
func (o *NewCoupons) GetReservationLimitOk() (int32, bool)
GetReservationLimitOk returns a tuple with the ReservationLimit field if it's non-nil, zero value otherwise and a boolean to check if the value has been set.
func (o *NewCoupons) HasReservationLimit() bool
HasReservationLimit returns a boolean if a field has been set.
func (o *NewCoupons) SetReservationLimit(v int32)
SetReservationLimit gets a reference to the given int32 and assigns it to the ReservationLimit field.
func (o *NewCoupons) GetStartDate() time.Time
GetStartDate returns the StartDate field if non-nil, zero value otherwise.
func (o *NewCoupons) GetStartDateOk() (time.Time, bool)
GetStartDateOk returns a tuple with the StartDate field if it's non-nil, zero value otherwise and a boolean to check if the value has been set.
func (o *NewCoupons) HasStartDate() bool
HasStartDate returns a boolean if a field has been set.
func (o *NewCoupons) SetStartDate(v time.Time)
SetStartDate gets a reference to the given time.Time and assigns it to the StartDate field.
func (o *NewCoupons) GetExpiryDate() time.Time
GetExpiryDate returns the ExpiryDate field if non-nil, zero value otherwise.
func (o *NewCoupons) GetExpiryDateOk() (time.Time, bool)
GetExpiryDateOk returns a tuple with the ExpiryDate field if it's non-nil, zero value otherwise and a boolean to check if the value has been set.
func (o *NewCoupons) HasExpiryDate() bool
HasExpiryDate returns a boolean if a field has been set.
func (o *NewCoupons) SetExpiryDate(v time.Time)
SetExpiryDate gets a reference to the given time.Time and assigns it to the ExpiryDate field.
func (o *NewCoupons) GetLimits() []LimitConfig
GetLimits returns the Limits field if non-nil, zero value otherwise.
func (o *NewCoupons) GetLimitsOk() ([]LimitConfig, bool)
GetLimitsOk returns a tuple with the Limits field if it's non-nil, zero value otherwise and a boolean to check if the value has been set.
func (o *NewCoupons) HasLimits() bool
HasLimits returns a boolean if a field has been set.
func (o *NewCoupons) SetLimits(v []LimitConfig)
SetLimits gets a reference to the given []LimitConfig and assigns it to the Limits field.
func (o *NewCoupons) GetNumberOfCoupons() int32
GetNumberOfCoupons returns the NumberOfCoupons field if non-nil, zero value otherwise.
func (o *NewCoupons) GetNumberOfCouponsOk() (int32, bool)
GetNumberOfCouponsOk returns a tuple with the NumberOfCoupons field if it's non-nil, zero value otherwise and a boolean to check if the value has been set.
func (o *NewCoupons) HasNumberOfCoupons() bool
HasNumberOfCoupons returns a boolean if a field has been set.
func (o *NewCoupons) SetNumberOfCoupons(v int32)
SetNumberOfCoupons gets a reference to the given int32 and assigns it to the NumberOfCoupons field.
func (o *NewCoupons) GetUniquePrefix() string
GetUniquePrefix returns the UniquePrefix field if non-nil, zero value otherwise.
func (o *NewCoupons) GetUniquePrefixOk() (string, bool)
GetUniquePrefixOk returns a tuple with the UniquePrefix field if it's non-nil, zero value otherwise and a boolean to check if the value has been set.
func (o *NewCoupons) HasUniquePrefix() bool
HasUniquePrefix returns a boolean if a field has been set.
func (o *NewCoupons) SetUniquePrefix(v string)
SetUniquePrefix gets a reference to the given string and assigns it to the UniquePrefix field.
func (o *NewCoupons) GetAttributes() map[string]interface{}
GetAttributes returns the Attributes field if non-nil, zero value otherwise.
func (o *NewCoupons) GetAttributesOk() (map[string]interface{}, bool)
GetAttributesOk returns a tuple with the Attributes field if it's non-nil, zero value otherwise and a boolean to check if the value has been set.
func (o *NewCoupons) HasAttributes() bool
HasAttributes returns a boolean if a field has been set.
func (o *NewCoupons) SetAttributes(v map[string]interface{})
SetAttributes gets a reference to the given map[string]interface{} and assigns it to the Attributes field.
func (o *NewCoupons) GetRecipientIntegrationId() string
GetRecipientIntegrationId returns the RecipientIntegrationId field if non-nil, zero value otherwise.
func (o *NewCoupons) GetRecipientIntegrationIdOk() (string, bool)
GetRecipientIntegrationIdOk returns a tuple with the RecipientIntegrationId field if it's non-nil, zero value otherwise and a boolean to check if the value has been set.
func (o *NewCoupons) HasRecipientIntegrationId() bool
HasRecipientIntegrationId returns a boolean if a field has been set.
func (o *NewCoupons) SetRecipientIntegrationId(v string)
SetRecipientIntegrationId gets a reference to the given string and assigns it to the RecipientIntegrationId field.
func (o *NewCoupons) GetValidCharacters() []string
GetValidCharacters returns the ValidCharacters field if non-nil, zero value otherwise.
func (o *NewCoupons) GetValidCharactersOk() ([]string, bool)
GetValidCharactersOk returns a tuple with the ValidCharacters field if it's non-nil, zero value otherwise and a boolean to check if the value has been set.
func (o *NewCoupons) HasValidCharacters() bool
HasValidCharacters returns a boolean if a field has been set.
func (o *NewCoupons) SetValidCharacters(v []string)
SetValidCharacters gets a reference to the given []string and assigns it to the ValidCharacters field.
func (o *NewCoupons) GetCouponPattern() string
GetCouponPattern returns the CouponPattern field if non-nil, zero value otherwise.
func (o *NewCoupons) GetCouponPatternOk() (string, bool)
GetCouponPatternOk returns a tuple with the CouponPattern field if it's non-nil, zero value otherwise and a boolean to check if the value has been set.
func (o *NewCoupons) HasCouponPattern() bool
HasCouponPattern returns a boolean if a field has been set.
func (o *NewCoupons) SetCouponPattern(v string)
SetCouponPattern gets a reference to the given string and assigns it to the CouponPattern field.
func (o *NewCoupons) GetIsReservationMandatory() bool
GetIsReservationMandatory returns the IsReservationMandatory field if non-nil, zero value otherwise.
func (o *NewCoupons) GetIsReservationMandatoryOk() (bool, bool)
GetIsReservationMandatoryOk returns a tuple with the IsReservationMandatory field if it's non-nil, zero value otherwise and a boolean to check if the value has been set.
func (o *NewCoupons) HasIsReservationMandatory() bool
HasIsReservationMandatory returns a boolean if a field has been set.
func (o *NewCoupons) SetIsReservationMandatory(v bool)
SetIsReservationMandatory gets a reference to the given bool and assigns it to the IsReservationMandatory field.
func (o *NewCoupons) GetImplicitlyReserved() bool
GetImplicitlyReserved returns the ImplicitlyReserved field if non-nil, zero value otherwise.
func (o *NewCoupons) GetImplicitlyReservedOk() (bool, bool)
GetImplicitlyReservedOk returns a tuple with the ImplicitlyReserved field if it's non-nil, zero value otherwise and a boolean to check if the value has been set.
func (o *NewCoupons) HasImplicitlyReserved() bool
HasImplicitlyReserved returns a boolean if a field has been set.
func (o *NewCoupons) SetImplicitlyReserved(v bool)
SetImplicitlyReserved gets a reference to the given bool and assigns it to the ImplicitlyReserved field.