| Name | Type | Description | Notes |
|---|---|---|---|
| Code | string | ||
| Coupon | CouponExternal | Coupon object for this promotion code. | |
| CouponId | string | ||
| CreatedAt | time.Time | DateTime at which the object was created, in 'ISO 8601' format. | |
| CustomerIds | Pointer to []string | List of customer ids who can redeem this PromotionCode. If empty all customers can redeem it. | [optional] |
| ExpiresAt | Pointer to NullableTime | [optional] | |
| Id | string | ||
| IsActive | bool | ||
| IsDeleted | Pointer to bool | If true, indicates that this object has been deleted | [optional] [default to false] |
| MaxRedemptions | Pointer to NullableInt32 | [optional] | |
| MaxRedemptionsPerCustomer | Pointer to NullableInt32 | [optional] | |
| Metadata | Pointer to map[string]interface{} | [optional] | |
| Object | Pointer to ObjectName | [optional] | |
| Restrictions | NullablePromoRestrictions | ||
| TimesRedeemed | Pointer to NullableInt32 | [optional] | |
| UpdatedAt | time.Time | DateTime at which the object was updated, in 'ISO 8601' format. |
func NewPromotionCodeExternal(code string, coupon CouponExternal, couponId string, createdAt time.Time, id string, isActive bool, restrictions NullablePromoRestrictions, updatedAt time.Time, ) *PromotionCodeExternal
NewPromotionCodeExternal instantiates a new PromotionCodeExternal object This constructor will assign default values to properties that have it defined, and makes sure properties required by API are set, but the set of arguments will change when the set of required properties is changed
func NewPromotionCodeExternalWithDefaults() *PromotionCodeExternal
NewPromotionCodeExternalWithDefaults instantiates a new PromotionCodeExternal object This constructor will only assign default values to properties that have it defined, but it doesn't guarantee that properties required by API are set
func (o *PromotionCodeExternal) GetCode() string
GetCode returns the Code field if non-nil, zero value otherwise.
func (o *PromotionCodeExternal) GetCodeOk() (*string, bool)
GetCodeOk returns a tuple with the Code field if it's non-nil, zero value otherwise and a boolean to check if the value has been set.
func (o *PromotionCodeExternal) SetCode(v string)
SetCode sets Code field to given value.
func (o *PromotionCodeExternal) GetCoupon() CouponExternal
GetCoupon returns the Coupon field if non-nil, zero value otherwise.
func (o *PromotionCodeExternal) GetCouponOk() (*CouponExternal, bool)
GetCouponOk returns a tuple with the Coupon field if it's non-nil, zero value otherwise and a boolean to check if the value has been set.
func (o *PromotionCodeExternal) SetCoupon(v CouponExternal)
SetCoupon sets Coupon field to given value.
func (o *PromotionCodeExternal) GetCouponId() string
GetCouponId returns the CouponId field if non-nil, zero value otherwise.
func (o *PromotionCodeExternal) GetCouponIdOk() (*string, bool)
GetCouponIdOk returns a tuple with the CouponId field if it's non-nil, zero value otherwise and a boolean to check if the value has been set.
func (o *PromotionCodeExternal) SetCouponId(v string)
SetCouponId sets CouponId field to given value.
func (o *PromotionCodeExternal) GetCreatedAt() time.Time
GetCreatedAt returns the CreatedAt field if non-nil, zero value otherwise.
func (o *PromotionCodeExternal) GetCreatedAtOk() (*time.Time, bool)
GetCreatedAtOk returns a tuple with the CreatedAt field if it's non-nil, zero value otherwise and a boolean to check if the value has been set.
func (o *PromotionCodeExternal) SetCreatedAt(v time.Time)
SetCreatedAt sets CreatedAt field to given value.
func (o *PromotionCodeExternal) GetCustomerIds() []string
GetCustomerIds returns the CustomerIds field if non-nil, zero value otherwise.
func (o *PromotionCodeExternal) GetCustomerIdsOk() (*[]string, bool)
GetCustomerIdsOk returns a tuple with the CustomerIds field if it's non-nil, zero value otherwise and a boolean to check if the value has been set.
func (o *PromotionCodeExternal) SetCustomerIds(v []string)
SetCustomerIds sets CustomerIds field to given value.
func (o *PromotionCodeExternal) HasCustomerIds() bool
HasCustomerIds returns a boolean if a field has been set.
func (o *PromotionCodeExternal) GetExpiresAt() time.Time
GetExpiresAt returns the ExpiresAt field if non-nil, zero value otherwise.
func (o *PromotionCodeExternal) GetExpiresAtOk() (*time.Time, bool)
GetExpiresAtOk returns a tuple with the ExpiresAt field if it's non-nil, zero value otherwise and a boolean to check if the value has been set.
func (o *PromotionCodeExternal) SetExpiresAt(v time.Time)
SetExpiresAt sets ExpiresAt field to given value.
func (o *PromotionCodeExternal) HasExpiresAt() bool
HasExpiresAt returns a boolean if a field has been set.
func (o *PromotionCodeExternal) SetExpiresAtNil(b bool)
SetExpiresAtNil sets the value for ExpiresAt to be an explicit nil
func (o *PromotionCodeExternal) UnsetExpiresAt()
UnsetExpiresAt ensures that no value is present for ExpiresAt, not even an explicit nil
func (o *PromotionCodeExternal) GetId() string
GetId returns the Id field if non-nil, zero value otherwise.
func (o *PromotionCodeExternal) GetIdOk() (*string, 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 *PromotionCodeExternal) SetId(v string)
SetId sets Id field to given value.
func (o *PromotionCodeExternal) GetIsActive() bool
GetIsActive returns the IsActive field if non-nil, zero value otherwise.
func (o *PromotionCodeExternal) GetIsActiveOk() (*bool, bool)
GetIsActiveOk returns a tuple with the IsActive field if it's non-nil, zero value otherwise and a boolean to check if the value has been set.
func (o *PromotionCodeExternal) SetIsActive(v bool)
SetIsActive sets IsActive field to given value.
func (o *PromotionCodeExternal) GetIsDeleted() bool
GetIsDeleted returns the IsDeleted field if non-nil, zero value otherwise.
func (o *PromotionCodeExternal) GetIsDeletedOk() (*bool, bool)
GetIsDeletedOk returns a tuple with the IsDeleted field if it's non-nil, zero value otherwise and a boolean to check if the value has been set.
func (o *PromotionCodeExternal) SetIsDeleted(v bool)
SetIsDeleted sets IsDeleted field to given value.
func (o *PromotionCodeExternal) HasIsDeleted() bool
HasIsDeleted returns a boolean if a field has been set.
func (o *PromotionCodeExternal) GetMaxRedemptions() int32
GetMaxRedemptions returns the MaxRedemptions field if non-nil, zero value otherwise.
func (o *PromotionCodeExternal) GetMaxRedemptionsOk() (*int32, bool)
GetMaxRedemptionsOk returns a tuple with the MaxRedemptions field if it's non-nil, zero value otherwise and a boolean to check if the value has been set.
func (o *PromotionCodeExternal) SetMaxRedemptions(v int32)
SetMaxRedemptions sets MaxRedemptions field to given value.
func (o *PromotionCodeExternal) HasMaxRedemptions() bool
HasMaxRedemptions returns a boolean if a field has been set.
func (o *PromotionCodeExternal) SetMaxRedemptionsNil(b bool)
SetMaxRedemptionsNil sets the value for MaxRedemptions to be an explicit nil
func (o *PromotionCodeExternal) UnsetMaxRedemptions()
UnsetMaxRedemptions ensures that no value is present for MaxRedemptions, not even an explicit nil
func (o *PromotionCodeExternal) GetMaxRedemptionsPerCustomer() int32
GetMaxRedemptionsPerCustomer returns the MaxRedemptionsPerCustomer field if non-nil, zero value otherwise.
func (o *PromotionCodeExternal) GetMaxRedemptionsPerCustomerOk() (*int32, bool)
GetMaxRedemptionsPerCustomerOk returns a tuple with the MaxRedemptionsPerCustomer field if it's non-nil, zero value otherwise and a boolean to check if the value has been set.
func (o *PromotionCodeExternal) SetMaxRedemptionsPerCustomer(v int32)
SetMaxRedemptionsPerCustomer sets MaxRedemptionsPerCustomer field to given value.
func (o *PromotionCodeExternal) HasMaxRedemptionsPerCustomer() bool
HasMaxRedemptionsPerCustomer returns a boolean if a field has been set.
func (o *PromotionCodeExternal) SetMaxRedemptionsPerCustomerNil(b bool)
SetMaxRedemptionsPerCustomerNil sets the value for MaxRedemptionsPerCustomer to be an explicit nil
func (o *PromotionCodeExternal) UnsetMaxRedemptionsPerCustomer()
UnsetMaxRedemptionsPerCustomer ensures that no value is present for MaxRedemptionsPerCustomer, not even an explicit nil
func (o *PromotionCodeExternal) GetMetadata() map[string]interface{}
GetMetadata returns the Metadata field if non-nil, zero value otherwise.
func (o *PromotionCodeExternal) GetMetadataOk() (*map[string]interface{}, bool)
GetMetadataOk returns a tuple with the Metadata field if it's non-nil, zero value otherwise and a boolean to check if the value has been set.
func (o *PromotionCodeExternal) SetMetadata(v map[string]interface{})
SetMetadata sets Metadata field to given value.
func (o *PromotionCodeExternal) HasMetadata() bool
HasMetadata returns a boolean if a field has been set.
func (o *PromotionCodeExternal) SetMetadataNil(b bool)
SetMetadataNil sets the value for Metadata to be an explicit nil
func (o *PromotionCodeExternal) UnsetMetadata()
UnsetMetadata ensures that no value is present for Metadata, not even an explicit nil
func (o *PromotionCodeExternal) GetObject() ObjectName
GetObject returns the Object field if non-nil, zero value otherwise.
func (o *PromotionCodeExternal) GetObjectOk() (*ObjectName, bool)
GetObjectOk returns a tuple with the Object field if it's non-nil, zero value otherwise and a boolean to check if the value has been set.
func (o *PromotionCodeExternal) SetObject(v ObjectName)
SetObject sets Object field to given value.
func (o *PromotionCodeExternal) HasObject() bool
HasObject returns a boolean if a field has been set.
func (o *PromotionCodeExternal) GetRestrictions() PromoRestrictions
GetRestrictions returns the Restrictions field if non-nil, zero value otherwise.
func (o *PromotionCodeExternal) GetRestrictionsOk() (*PromoRestrictions, bool)
GetRestrictionsOk returns a tuple with the Restrictions field if it's non-nil, zero value otherwise and a boolean to check if the value has been set.
func (o *PromotionCodeExternal) SetRestrictions(v PromoRestrictions)
SetRestrictions sets Restrictions field to given value.
func (o *PromotionCodeExternal) SetRestrictionsNil(b bool)
SetRestrictionsNil sets the value for Restrictions to be an explicit nil
func (o *PromotionCodeExternal) UnsetRestrictions()
UnsetRestrictions ensures that no value is present for Restrictions, not even an explicit nil
func (o *PromotionCodeExternal) GetTimesRedeemed() int32
GetTimesRedeemed returns the TimesRedeemed field if non-nil, zero value otherwise.
func (o *PromotionCodeExternal) GetTimesRedeemedOk() (*int32, bool)
GetTimesRedeemedOk returns a tuple with the TimesRedeemed field if it's non-nil, zero value otherwise and a boolean to check if the value has been set.
func (o *PromotionCodeExternal) SetTimesRedeemed(v int32)
SetTimesRedeemed sets TimesRedeemed field to given value.
func (o *PromotionCodeExternal) HasTimesRedeemed() bool
HasTimesRedeemed returns a boolean if a field has been set.
func (o *PromotionCodeExternal) SetTimesRedeemedNil(b bool)
SetTimesRedeemedNil sets the value for TimesRedeemed to be an explicit nil
func (o *PromotionCodeExternal) UnsetTimesRedeemed()
UnsetTimesRedeemed ensures that no value is present for TimesRedeemed, not even an explicit nil
func (o *PromotionCodeExternal) GetUpdatedAt() time.Time
GetUpdatedAt returns the UpdatedAt field if non-nil, zero value otherwise.
func (o *PromotionCodeExternal) GetUpdatedAtOk() (*time.Time, bool)
GetUpdatedAtOk returns a tuple with the UpdatedAt field if it's non-nil, zero value otherwise and a boolean to check if the value has been set.
func (o *PromotionCodeExternal) SetUpdatedAt(v time.Time)
SetUpdatedAt sets UpdatedAt field to given value.