Name | Type | Description | Notes |
---|---|---|---|
Id | Pointer to int32 | Internal ID of this entity. | |
Created | Pointer to time.Time | The time this entity was created. | |
CampaignId | Pointer to int32 | The ID of the campaign that owns this entity. | |
Value | Pointer to string | The coupon code. | |
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] |
UsageCounter | Pointer to int32 | The number of times the coupon has been successfully redeemed. | |
DiscountCounter | Pointer to float32 | The amount of discounts given on rules redeeming this coupon. Only usable if a coupon discount budget was set for this coupon. | [optional] |
DiscountRemainder | Pointer to float32 | The remaining discount this coupon can give. | [optional] |
ReservationCounter | Pointer to float32 | The number of times this coupon has been reserved. | [optional] |
Attributes | Pointer to map[string]interface{} | Custom attributes associated with this coupon. | [optional] |
ReferralId | Pointer to int32 | The integration ID of the referring customer (if any) for whom this coupon was created as an effect. | [optional] |
RecipientIntegrationId | Pointer to string | The Integration ID of the customer that is allowed to redeem this coupon. | [optional] |
ImportId | Pointer to int32 | The ID of the Import which created this coupon. | [optional] |
Reservation | Pointer to bool | Defines the reservation type: - `true`: The coupon can be reserved for multiple customers. - `false`: The coupon can be reserved only for one customer. It is a personal code. | [optional] [default to true] |
BatchId | Pointer to string | The id of the batch the coupon belongs to. | [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 *Coupon) GetId() int32
GetId returns the Id field if non-nil, zero value otherwise.
func (o *Coupon) GetIdOk() (int32, bool)
GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise and a boolean to check if the value has been set.
func (o *Coupon) HasId() bool
HasId returns a boolean if a field has been set.
func (o *Coupon) SetId(v int32)
SetId gets a reference to the given int32 and assigns it to the Id field.
func (o *Coupon) GetCreated() time.Time
GetCreated returns the Created field if non-nil, zero value otherwise.
func (o *Coupon) GetCreatedOk() (time.Time, bool)
GetCreatedOk returns a tuple with the Created field if it's non-nil, zero value otherwise and a boolean to check if the value has been set.
func (o *Coupon) HasCreated() bool
HasCreated returns a boolean if a field has been set.
func (o *Coupon) SetCreated(v time.Time)
SetCreated gets a reference to the given time.Time and assigns it to the Created field.
func (o *Coupon) GetCampaignId() int32
GetCampaignId returns the CampaignId field if non-nil, zero value otherwise.
func (o *Coupon) GetCampaignIdOk() (int32, bool)
GetCampaignIdOk returns a tuple with the CampaignId field if it's non-nil, zero value otherwise and a boolean to check if the value has been set.
func (o *Coupon) HasCampaignId() bool
HasCampaignId returns a boolean if a field has been set.
func (o *Coupon) SetCampaignId(v int32)
SetCampaignId gets a reference to the given int32 and assigns it to the CampaignId field.
func (o *Coupon) GetValue() string
GetValue returns the Value field if non-nil, zero value otherwise.
func (o *Coupon) GetValueOk() (string, bool)
GetValueOk returns a tuple with the Value field if it's non-nil, zero value otherwise and a boolean to check if the value has been set.
func (o *Coupon) HasValue() bool
HasValue returns a boolean if a field has been set.
func (o *Coupon) SetValue(v string)
SetValue gets a reference to the given string and assigns it to the Value field.
func (o *Coupon) GetUsageLimit() int32
GetUsageLimit returns the UsageLimit field if non-nil, zero value otherwise.
func (o *Coupon) 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 *Coupon) HasUsageLimit() bool
HasUsageLimit returns a boolean if a field has been set.
func (o *Coupon) SetUsageLimit(v int32)
SetUsageLimit gets a reference to the given int32 and assigns it to the UsageLimit field.
func (o *Coupon) GetDiscountLimit() float32
GetDiscountLimit returns the DiscountLimit field if non-nil, zero value otherwise.
func (o *Coupon) 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 *Coupon) HasDiscountLimit() bool
HasDiscountLimit returns a boolean if a field has been set.
func (o *Coupon) SetDiscountLimit(v float32)
SetDiscountLimit gets a reference to the given float32 and assigns it to the DiscountLimit field.
func (o *Coupon) GetReservationLimit() int32
GetReservationLimit returns the ReservationLimit field if non-nil, zero value otherwise.
func (o *Coupon) 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 *Coupon) HasReservationLimit() bool
HasReservationLimit returns a boolean if a field has been set.
func (o *Coupon) SetReservationLimit(v int32)
SetReservationLimit gets a reference to the given int32 and assigns it to the ReservationLimit field.
func (o *Coupon) GetStartDate() time.Time
GetStartDate returns the StartDate field if non-nil, zero value otherwise.
func (o *Coupon) 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 *Coupon) HasStartDate() bool
HasStartDate returns a boolean if a field has been set.
func (o *Coupon) SetStartDate(v time.Time)
SetStartDate gets a reference to the given time.Time and assigns it to the StartDate field.
func (o *Coupon) GetExpiryDate() time.Time
GetExpiryDate returns the ExpiryDate field if non-nil, zero value otherwise.
func (o *Coupon) 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 *Coupon) HasExpiryDate() bool
HasExpiryDate returns a boolean if a field has been set.
func (o *Coupon) SetExpiryDate(v time.Time)
SetExpiryDate gets a reference to the given time.Time and assigns it to the ExpiryDate field.
func (o *Coupon) GetLimits() []LimitConfig
GetLimits returns the Limits field if non-nil, zero value otherwise.
func (o *Coupon) 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 *Coupon) HasLimits() bool
HasLimits returns a boolean if a field has been set.
func (o *Coupon) SetLimits(v []LimitConfig)
SetLimits gets a reference to the given []LimitConfig and assigns it to the Limits field.
func (o *Coupon) GetUsageCounter() int32
GetUsageCounter returns the UsageCounter field if non-nil, zero value otherwise.
func (o *Coupon) GetUsageCounterOk() (int32, bool)
GetUsageCounterOk returns a tuple with the UsageCounter field if it's non-nil, zero value otherwise and a boolean to check if the value has been set.
func (o *Coupon) HasUsageCounter() bool
HasUsageCounter returns a boolean if a field has been set.
func (o *Coupon) SetUsageCounter(v int32)
SetUsageCounter gets a reference to the given int32 and assigns it to the UsageCounter field.
func (o *Coupon) GetDiscountCounter() float32
GetDiscountCounter returns the DiscountCounter field if non-nil, zero value otherwise.
func (o *Coupon) GetDiscountCounterOk() (float32, bool)
GetDiscountCounterOk returns a tuple with the DiscountCounter field if it's non-nil, zero value otherwise and a boolean to check if the value has been set.
func (o *Coupon) HasDiscountCounter() bool
HasDiscountCounter returns a boolean if a field has been set.
func (o *Coupon) SetDiscountCounter(v float32)
SetDiscountCounter gets a reference to the given float32 and assigns it to the DiscountCounter field.
func (o *Coupon) GetDiscountRemainder() float32
GetDiscountRemainder returns the DiscountRemainder field if non-nil, zero value otherwise.
func (o *Coupon) GetDiscountRemainderOk() (float32, bool)
GetDiscountRemainderOk returns a tuple with the DiscountRemainder field if it's non-nil, zero value otherwise and a boolean to check if the value has been set.
func (o *Coupon) HasDiscountRemainder() bool
HasDiscountRemainder returns a boolean if a field has been set.
func (o *Coupon) SetDiscountRemainder(v float32)
SetDiscountRemainder gets a reference to the given float32 and assigns it to the DiscountRemainder field.
func (o *Coupon) GetReservationCounter() float32
GetReservationCounter returns the ReservationCounter field if non-nil, zero value otherwise.
func (o *Coupon) GetReservationCounterOk() (float32, bool)
GetReservationCounterOk returns a tuple with the ReservationCounter field if it's non-nil, zero value otherwise and a boolean to check if the value has been set.
func (o *Coupon) HasReservationCounter() bool
HasReservationCounter returns a boolean if a field has been set.
func (o *Coupon) SetReservationCounter(v float32)
SetReservationCounter gets a reference to the given float32 and assigns it to the ReservationCounter field.
func (o *Coupon) GetAttributes() map[string]interface{}
GetAttributes returns the Attributes field if non-nil, zero value otherwise.
func (o *Coupon) 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 *Coupon) HasAttributes() bool
HasAttributes returns a boolean if a field has been set.
func (o *Coupon) SetAttributes(v map[string]interface{})
SetAttributes gets a reference to the given map[string]interface{} and assigns it to the Attributes field.
func (o *Coupon) GetReferralId() int32
GetReferralId returns the ReferralId field if non-nil, zero value otherwise.
func (o *Coupon) GetReferralIdOk() (int32, bool)
GetReferralIdOk returns a tuple with the ReferralId field if it's non-nil, zero value otherwise and a boolean to check if the value has been set.
func (o *Coupon) HasReferralId() bool
HasReferralId returns a boolean if a field has been set.
func (o *Coupon) SetReferralId(v int32)
SetReferralId gets a reference to the given int32 and assigns it to the ReferralId field.
func (o *Coupon) GetRecipientIntegrationId() string
GetRecipientIntegrationId returns the RecipientIntegrationId field if non-nil, zero value otherwise.
func (o *Coupon) 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 *Coupon) HasRecipientIntegrationId() bool
HasRecipientIntegrationId returns a boolean if a field has been set.
func (o *Coupon) SetRecipientIntegrationId(v string)
SetRecipientIntegrationId gets a reference to the given string and assigns it to the RecipientIntegrationId field.
func (o *Coupon) GetImportId() int32
GetImportId returns the ImportId field if non-nil, zero value otherwise.
func (o *Coupon) GetImportIdOk() (int32, bool)
GetImportIdOk returns a tuple with the ImportId field if it's non-nil, zero value otherwise and a boolean to check if the value has been set.
func (o *Coupon) HasImportId() bool
HasImportId returns a boolean if a field has been set.
func (o *Coupon) SetImportId(v int32)
SetImportId gets a reference to the given int32 and assigns it to the ImportId field.
func (o *Coupon) GetReservation() bool
GetReservation returns the Reservation field if non-nil, zero value otherwise.
func (o *Coupon) GetReservationOk() (bool, bool)
GetReservationOk returns a tuple with the Reservation field if it's non-nil, zero value otherwise and a boolean to check if the value has been set.
func (o *Coupon) HasReservation() bool
HasReservation returns a boolean if a field has been set.
func (o *Coupon) SetReservation(v bool)
SetReservation gets a reference to the given bool and assigns it to the Reservation field.
func (o *Coupon) GetBatchId() string
GetBatchId returns the BatchId field if non-nil, zero value otherwise.
func (o *Coupon) GetBatchIdOk() (string, bool)
GetBatchIdOk returns a tuple with the BatchId field if it's non-nil, zero value otherwise and a boolean to check if the value has been set.
func (o *Coupon) HasBatchId() bool
HasBatchId returns a boolean if a field has been set.
func (o *Coupon) SetBatchId(v string)
SetBatchId gets a reference to the given string and assigns it to the BatchId field.
func (o *Coupon) GetIsReservationMandatory() bool
GetIsReservationMandatory returns the IsReservationMandatory field if non-nil, zero value otherwise.
func (o *Coupon) 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 *Coupon) HasIsReservationMandatory() bool
HasIsReservationMandatory returns a boolean if a field has been set.
func (o *Coupon) SetIsReservationMandatory(v bool)
SetIsReservationMandatory gets a reference to the given bool and assigns it to the IsReservationMandatory field.
func (o *Coupon) GetImplicitlyReserved() bool
GetImplicitlyReserved returns the ImplicitlyReserved field if non-nil, zero value otherwise.
func (o *Coupon) 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 *Coupon) HasImplicitlyReserved() bool
HasImplicitlyReserved returns a boolean if a field has been set.
func (o *Coupon) SetImplicitlyReserved(v bool)
SetImplicitlyReserved gets a reference to the given bool and assigns it to the ImplicitlyReserved field.