Previous Docs Version

The documentation you are viewing is for a previous version of the Vendr product. Click here to jump to the current stable version.

GiftCard

API reference for GiftCard in Vendr, the eCommerce solution for Umbraco v8+

GiftCard

public class GiftCard : GiftCardReadOnly

Inheritance

Namespace

Methods

Create (1 of 2)

public static GiftCard Create(IUnitOfWork uow, Guid storeId, string code, Guid currencyId, 
    decimal originalAmount, Guid? orderId = default(Guid?))

Create (2 of 2)

public static GiftCard Create(IUnitOfWork uow, Guid id, Guid storeId, string code, Guid currencyId, 
    decimal originalAmount, Guid? orderId = default(Guid?))

RemoveProperties

Removes a series of properties from the order

public GiftCard RemoveProperties(IEnumerable<string> aliases)

Parameters

Parameter Description
aliases
The aliases of the properties to remove

Returns

The updated GiftCard entity


RemoveProperty

Removes a property from the order

public GiftCard RemoveProperty(string alias)

Parameters

Parameter Description
alias
The alias of the property to remove

Returns

The updated GiftCard entity


SetActive

public GiftCard SetActive(bool isActive)

SetCode

public GiftCard SetCode(string code)

SetCurrency (1 of 2)

public GiftCard SetCurrency(CurrencyReadOnly currency)

SetCurrency (2 of 2)

public GiftCard SetCurrency(Guid currencyId)

SetExpiryDate

public GiftCard SetExpiryDate(DateTime? expiryDate)

SetOrder (1 of 2)

public GiftCard SetOrder(OrderReadOnly order)

SetOrder (2 of 2)

public GiftCard SetOrder(Guid? orderId)

SetOriginalAmount

public GiftCard SetOriginalAmount(decimal amount, bool resetRemainingAmount = false)

SetProperties (1 of 2)

Sets a series of properties on the order

public GiftCard SetProperties(IDictionary<string, string> properties, 
    SetBehavior setBehavior = SetBehavior.Merge)

Parameters

Parameter Description
properties
The properties to set
setBehavior
The behavior of the set operation, whether to Merge the properties into the orders existing properties collection or Replace the orders property collection entirely

Returns

The updated GiftCard entity


SetProperties (2 of 2)

Sets a series of properties on the order

public GiftCard SetProperties(IDictionary<string, PropertyValue> properties, 
    SetBehavior setBehavior = SetBehavior.Merge)

Parameters

Parameter Description
properties
The properties to set
setBehavior
The behavior of the set operation, whether to Merge the properties into the orders existing properties collection or Replace the orders property collection entirely

Returns

The updated GiftCard entity


SetProperty (1 of 2)

Sets a property on the order

public GiftCard SetProperty(string alias, string value)

Parameters

Parameter Description
alias
The alias of the property to set
value
The value of the property

Returns

The updated GiftCard entity


SetProperty (2 of 2)

Sets a property on the order

public GiftCard SetProperty(string alias, PropertyValue value)

Parameters

Parameter Description
alias
The alias of the property to set
value
The PropertyValue of the property

Returns

The updated GiftCard entity


SetRemainingAmount

public GiftCard SetRemainingAmount(decimal amount)

Edit this page on GitHub

Site + logo design © 2024 Outfield Digital Ltd. Content contributions licensed under MIT.
Vendr® is a Registered Trademark of Outfield Digital Ltd.