Skip to content

Latest commit

 

History

History
377 lines (202 loc) · 11.7 KB

CustomerSession.md

File metadata and controls

377 lines (202 loc) · 11.7 KB

CustomerSession

Properties

Name Type Description Notes
IntegrationId Pointer to string The integration ID set by your integration layer.
Created Pointer to time.Time The time this entity was created.
ApplicationId Pointer to int32 The ID of the application that owns this entity.
ProfileId Pointer to string ID of the customer profile set by your integration layer. Note: If the customer does not yet have a known `profileId`, we recommend you use a guest `profileId`.
Coupon Pointer to string Any coupon code entered.
Referral Pointer to string Any referral code entered.
State Pointer to string Indicates the current state of the session. Sessions can be created as `open` or `closed`. The state transitions are: 1. `open` → `closed` 2. `open` → `cancelled` 3. `closed` → `cancelled` or `partially_returned` 4. `partially_returned` → `cancelled` For more information, see Customer session states. [default to STATE_OPEN]
CartItems Pointer to []CartItem Serialized JSON representation.
Identifiers Pointer to []string Session custom identifiers that you can set limits on or use inside your rules. For example, you can use IP addresses as identifiers to potentially identify devices and limit discounts abuse in case of customers creating multiple accounts. See the tutorial. [optional]
Total Pointer to float32 The total sum of the cart in one session.
Attributes Pointer to map[string]interface{} A key-value map of the sessions attributes. The potentially valid attributes are configured in your accounts developer settings.
FirstSession Pointer to bool Indicates whether this is the first session for the customer's profile. Will always be true for anonymous sessions.
Discounts Pointer to map[string]float32 A map of labelled discount values, values will be in the same currency as the application associated with the session.
Updated Pointer to time.Time Timestamp of the most recent event received on this session.

Methods

GetIntegrationId

func (o *CustomerSession) GetIntegrationId() string

GetIntegrationId returns the IntegrationId field if non-nil, zero value otherwise.

GetIntegrationIdOk

func (o *CustomerSession) GetIntegrationIdOk() (string, bool)

GetIntegrationIdOk returns a tuple with the IntegrationId field if it's non-nil, zero value otherwise and a boolean to check if the value has been set.

HasIntegrationId

func (o *CustomerSession) HasIntegrationId() bool

HasIntegrationId returns a boolean if a field has been set.

SetIntegrationId

func (o *CustomerSession) SetIntegrationId(v string)

SetIntegrationId gets a reference to the given string and assigns it to the IntegrationId field.

GetCreated

func (o *CustomerSession) GetCreated() time.Time

GetCreated returns the Created field if non-nil, zero value otherwise.

GetCreatedOk

func (o *CustomerSession) 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.

HasCreated

func (o *CustomerSession) HasCreated() bool

HasCreated returns a boolean if a field has been set.

SetCreated

func (o *CustomerSession) SetCreated(v time.Time)

SetCreated gets a reference to the given time.Time and assigns it to the Created field.

GetApplicationId

func (o *CustomerSession) GetApplicationId() int32

GetApplicationId returns the ApplicationId field if non-nil, zero value otherwise.

GetApplicationIdOk

func (o *CustomerSession) GetApplicationIdOk() (int32, bool)

GetApplicationIdOk returns a tuple with the ApplicationId field if it's non-nil, zero value otherwise and a boolean to check if the value has been set.

HasApplicationId

func (o *CustomerSession) HasApplicationId() bool

HasApplicationId returns a boolean if a field has been set.

SetApplicationId

func (o *CustomerSession) SetApplicationId(v int32)

SetApplicationId gets a reference to the given int32 and assigns it to the ApplicationId field.

GetProfileId

func (o *CustomerSession) GetProfileId() string

GetProfileId returns the ProfileId field if non-nil, zero value otherwise.

GetProfileIdOk

func (o *CustomerSession) GetProfileIdOk() (string, bool)

GetProfileIdOk returns a tuple with the ProfileId field if it's non-nil, zero value otherwise and a boolean to check if the value has been set.

HasProfileId

func (o *CustomerSession) HasProfileId() bool

HasProfileId returns a boolean if a field has been set.

SetProfileId

func (o *CustomerSession) SetProfileId(v string)

SetProfileId gets a reference to the given string and assigns it to the ProfileId field.

GetCoupon

func (o *CustomerSession) GetCoupon() string

GetCoupon returns the Coupon field if non-nil, zero value otherwise.

GetCouponOk

func (o *CustomerSession) GetCouponOk() (string, 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.

HasCoupon

func (o *CustomerSession) HasCoupon() bool

HasCoupon returns a boolean if a field has been set.

SetCoupon

func (o *CustomerSession) SetCoupon(v string)

SetCoupon gets a reference to the given string and assigns it to the Coupon field.

GetReferral

func (o *CustomerSession) GetReferral() string

GetReferral returns the Referral field if non-nil, zero value otherwise.

GetReferralOk

func (o *CustomerSession) GetReferralOk() (string, bool)

GetReferralOk returns a tuple with the Referral field if it's non-nil, zero value otherwise and a boolean to check if the value has been set.

HasReferral

func (o *CustomerSession) HasReferral() bool

HasReferral returns a boolean if a field has been set.

SetReferral

func (o *CustomerSession) SetReferral(v string)

SetReferral gets a reference to the given string and assigns it to the Referral field.

GetState

func (o *CustomerSession) GetState() string

GetState returns the State field if non-nil, zero value otherwise.

GetStateOk

func (o *CustomerSession) GetStateOk() (string, bool)

GetStateOk returns a tuple with the State field if it's non-nil, zero value otherwise and a boolean to check if the value has been set.

HasState

func (o *CustomerSession) HasState() bool

HasState returns a boolean if a field has been set.

SetState

func (o *CustomerSession) SetState(v string)

SetState gets a reference to the given string and assigns it to the State field.

GetCartItems

func (o *CustomerSession) GetCartItems() []CartItem

GetCartItems returns the CartItems field if non-nil, zero value otherwise.

GetCartItemsOk

func (o *CustomerSession) GetCartItemsOk() ([]CartItem, bool)

GetCartItemsOk returns a tuple with the CartItems field if it's non-nil, zero value otherwise and a boolean to check if the value has been set.

HasCartItems

func (o *CustomerSession) HasCartItems() bool

HasCartItems returns a boolean if a field has been set.

SetCartItems

func (o *CustomerSession) SetCartItems(v []CartItem)

SetCartItems gets a reference to the given []CartItem and assigns it to the CartItems field.

GetIdentifiers

func (o *CustomerSession) GetIdentifiers() []string

GetIdentifiers returns the Identifiers field if non-nil, zero value otherwise.

GetIdentifiersOk

func (o *CustomerSession) GetIdentifiersOk() ([]string, bool)

GetIdentifiersOk returns a tuple with the Identifiers field if it's non-nil, zero value otherwise and a boolean to check if the value has been set.

HasIdentifiers

func (o *CustomerSession) HasIdentifiers() bool

HasIdentifiers returns a boolean if a field has been set.

SetIdentifiers

func (o *CustomerSession) SetIdentifiers(v []string)

SetIdentifiers gets a reference to the given []string and assigns it to the Identifiers field.

GetTotal

func (o *CustomerSession) GetTotal() float32

GetTotal returns the Total field if non-nil, zero value otherwise.

GetTotalOk

func (o *CustomerSession) GetTotalOk() (float32, bool)

GetTotalOk returns a tuple with the Total field if it's non-nil, zero value otherwise and a boolean to check if the value has been set.

HasTotal

func (o *CustomerSession) HasTotal() bool

HasTotal returns a boolean if a field has been set.

SetTotal

func (o *CustomerSession) SetTotal(v float32)

SetTotal gets a reference to the given float32 and assigns it to the Total field.

GetAttributes

func (o *CustomerSession) GetAttributes() map[string]interface{}

GetAttributes returns the Attributes field if non-nil, zero value otherwise.

GetAttributesOk

func (o *CustomerSession) 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.

HasAttributes

func (o *CustomerSession) HasAttributes() bool

HasAttributes returns a boolean if a field has been set.

SetAttributes

func (o *CustomerSession) SetAttributes(v map[string]interface{})

SetAttributes gets a reference to the given map[string]interface{} and assigns it to the Attributes field.

GetFirstSession

func (o *CustomerSession) GetFirstSession() bool

GetFirstSession returns the FirstSession field if non-nil, zero value otherwise.

GetFirstSessionOk

func (o *CustomerSession) GetFirstSessionOk() (bool, bool)

GetFirstSessionOk returns a tuple with the FirstSession field if it's non-nil, zero value otherwise and a boolean to check if the value has been set.

HasFirstSession

func (o *CustomerSession) HasFirstSession() bool

HasFirstSession returns a boolean if a field has been set.

SetFirstSession

func (o *CustomerSession) SetFirstSession(v bool)

SetFirstSession gets a reference to the given bool and assigns it to the FirstSession field.

GetDiscounts

func (o *CustomerSession) GetDiscounts() map[string]float32

GetDiscounts returns the Discounts field if non-nil, zero value otherwise.

GetDiscountsOk

func (o *CustomerSession) GetDiscountsOk() (map[string]float32, bool)

GetDiscountsOk returns a tuple with the Discounts field if it's non-nil, zero value otherwise and a boolean to check if the value has been set.

HasDiscounts

func (o *CustomerSession) HasDiscounts() bool

HasDiscounts returns a boolean if a field has been set.

SetDiscounts

func (o *CustomerSession) SetDiscounts(v map[string]float32)

SetDiscounts gets a reference to the given map[string]float32 and assigns it to the Discounts field.

GetUpdated

func (o *CustomerSession) GetUpdated() time.Time

GetUpdated returns the Updated field if non-nil, zero value otherwise.

GetUpdatedOk

func (o *CustomerSession) GetUpdatedOk() (time.Time, bool)

GetUpdatedOk returns a tuple with the Updated field if it's non-nil, zero value otherwise and a boolean to check if the value has been set.

HasUpdated

func (o *CustomerSession) HasUpdated() bool

HasUpdated returns a boolean if a field has been set.

SetUpdated

func (o *CustomerSession) SetUpdated(v time.Time)

SetUpdated gets a reference to the given time.Time and assigns it to the Updated field.

[Back to Model list] [Back to API list] [Back to README]