Table of Contents

Class RewardRule

Namespace
Dynamicweb.Ecommerce.Loyalty
Assembly
Dynamicweb.Ecommerce.dll
Represents information about an reward rule.
public class RewardRule
Inheritance
RewardRule
Inherited Members

Constructors

RewardRule()

Initializes a new instance of the class.
public RewardRule()

RewardRule(Reward)

Initializes a new instance of the class.
[Obsolete("Use other constructor instead.")]
public RewardRule(Reward sourceReward)

Parameters

sourceReward Reward
The reward.

RewardRule(IDataReader)

Initializes a new instance of the class.
[Obsolete("This method is no longer used.")]
public RewardRule(IDataReader dataReader)

Parameters

dataReader IDataReader
The data reader.

Properties

Active

Gets or sets the value indicating whether the rule is active.
public bool Active { get; set; }

Property Value

bool

Country

Gets or sets the country of the rule.
[Obsolete("Use GetCountry or SetCountry instead.")]
public Country Country { get; set; }

Property Value

Country

CountryCode2

Gets or sets the country code of the country.
public string CountryCode2 { get; set; }

Property Value

string

Remarks

The rule is valid for null is all countries.

Id

Gets or sets the reward rule id.
public int Id { get; set; }

Property Value

int

IsNew

Indicates whether the instance is new (not saved).
public bool IsNew { get; }

Property Value

bool

Language

Gets or sets the language of the rule.
[Obsolete("Use GetLanguage or SetLanguage instead.")]
public Language Language { get; set; }

Property Value

Language

LanguageId

Gets or sets the Id of the language.
public string LanguageId { get; set; }

Property Value

string

Remarks

The reward rule is valid for null is all languages.

Name

Gets or sets the name.
public string Name { get; set; }

Property Value

string

OrderFieldName

Gets or sets the name of order field of the rule.
public string OrderFieldName { get; set; }

Property Value

string

OrderFieldValue

Gets or sets the required value of the order field specified in the OrderFieldName property.
public string OrderFieldValue { get; set; }

Property Value

string

OrderLineFieldName

Gets or sets the name of order field of the rule.
public string OrderLineFieldName { get; set; }

Property Value

string

OrderTotalPrice

Gets or sets the order total price condition.
public double OrderTotalPrice { get; set; }

Property Value

double

Remarks

Default value is 0.00

OrderTotalPriceCondition

Gets or sets the conditional operator for comparing the order total price.
public OrderTotalPriceCondition OrderTotalPriceCondition { get; set; }

Property Value

OrderTotalPriceCondition

Payment

Gets or sets the payment of the rule.
[Obsolete("Use GetPayment or SetPayment instead.")]
public Payment Payment { get; set; }

Property Value

Payment

PaymentId

Gets or sets the Id of the payment.
public string PaymentId { get; set; }

Property Value

string

Remarks

The rule is valid for null is all payments.

ProductQuantification

Gets or sets the product quantification.
public ProductQuantification ProductQuantification { get; set; }

Property Value

ProductQuantification

Remarks

The rule uses when validating product quantities.

ProductQuantity

Gets or sets the product quantity required for the rule to be valid.
public double ProductQuantity { get; set; }

Property Value

double

ProductsAndGroupsIds

Gets or sets the ids for products and the groups.
public string ProductsAndGroupsIds { get; set; }

Property Value

string

Reward

[Obsolete("Use GetReward or SetReward instead.")]
public Reward Reward { get; set; }

Property Value

Reward

RewardId

Gets or sets the reward id.
public int RewardId { get; set; }

Property Value

int

Shipping

Gets or sets the shipping of the rule.
[Obsolete("Use GetShipping or SetShipping instead.")]
public Shipping Shipping { get; set; }

Property Value

Shipping

ShippingId

Gets or set the Id of the shipping.
public string ShippingId { get; set; }

Property Value

string

Remarks

The rule is valid for null is all shipping.

Shop

Gets or sets the shop of the rule.
[Obsolete("Use GetShop or SetShop instead.")]
public Shop Shop { get; set; }

Property Value

Shop

ShopId

Gets or sets the Id of the shop.
public string ShopId { get; set; }

Property Value

string

Remarks

The reward rule is valid for null is all shops.

User

Gets or sets the user of the rule.
[Obsolete("Use GetUser or SetUser instead.")]
public User User { get; set; }

Property Value

User

UserCustomerNumber

Gets or sets the customer number.
public string UserCustomerNumber { get; set; }

Property Value

string

Remarks

The rule is valid for null is all customer numbers.

UserGroup

Gets or sets the user group of the rule.
[Obsolete("Use GetUserGroup or SetUserGroup instead.")]
public Group UserGroup { get; set; }

Property Value

Group

UserGroupId

Gets or sets the Id of the user group.
public int? UserGroupId { get; set; }

Property Value

int?

Remarks

The rule is valid for null is all user groups.

UserId

Gets or sets the Id of the user.
public int? UserId { get; set; }

Property Value

int?

Remarks

The rule is valid for null is all users.

ValidFrom

Gets or sets start publication date.
public DateTime? ValidFrom { get; set; }

Property Value

DateTime?

ValidTo

Gets or sets end publication date.
public DateTime? ValidTo { get; set; }

Property Value

DateTime?

VoucherList

Gets or sets the voucher list.
[Obsolete("Use GetVoucherList or SetVoucherList instead.")]
public VoucherList VoucherList { get; set; }

Property Value

VoucherList

Exceptions

Exception
If not the OrderFieldName property is set to "OrderVoucherCode" and the value is not set to null an exception will be thrown.

VoucherListId

Gets or sets the voucher list id.
public int? VoucherListId { get; set; }

Property Value

int?

Methods

Delete()

Deletes the current instance.
[Obsolete("Use Services.Loyalty.DeleteRewardRule() instead.")]
public void Delete()

Delete(int)

[Obsolete("Use Services.Loyalty.DeleteRewardRule instead.")]
public void Delete(int id)

Parameters

id int

Fill(IDataReader)

Fills the reward rules properties.
[Obsolete("This method is no longer used.")]
public void Fill(IDataReader reader)

Parameters

reader IDataReader
The data reader.

FillRow(DataRow)

Fills the given System.Data.DataRow object with property values of the current object.
[Obsolete("This method is no longer used.")]
protected void FillRow(DataRow row)

Parameters

row DataRow
An instance of the System.Data.DataRow object to write data to.

get_ID()

[Obsolete("Use Id")]
public int get_ID()

Returns

int

GetCountry()

Gets the country of the rule.
public Country GetCountry()

Returns

Country

GetLanguage()

Gets the language of the rule.
public Language GetLanguage()

Returns

Language

GetPayment()

Gets the payment of the rule.
public Payment GetPayment()

Returns

Payment

GetReward()

Gets the reward of the rule.
public Reward GetReward()

Returns

Reward

GetRewardRuleById(int)

Gets the reward rule by id.
[Obsolete("Use Services.Loyalty.GetRewardRuleById() instead.")]
public static RewardRule GetRewardRuleById(int id)

Parameters

id int
The reward id.

Returns

RewardRule
The RewardRule.

GetRulesForReward(int)

Gets rules for the reward id.
[Obsolete("Use Services.Loyalty.GetRulesForReward() instead.")]
public static RewardRuleCollection GetRulesForReward(int rewardId)

Parameters

rewardId int
The reward id.

Returns

RewardRuleCollection

GetShipping()

Gets the shipping of the rule.
public Shipping GetShipping()

Returns

Shipping

GetShop()

Gets the shop of the rule.
public Shop GetShop()

Returns

Shop

GetUser()

Gets the user of the rule.
public User GetUser()

Returns

User

GetUserGroup()

Gets the user group of the rule.
public Group GetUserGroup()

Returns

Group

GetVoucherList()

Gets the voucher list of the rule.
public VoucherList GetVoucherList()

Returns

VoucherList

Load(int)

[Obsolete("Services.Loyalty.GetRewardRuleById instead.")]
public void Load(int id)

Parameters

id int

LoadRulesForRewards(RewardCollection)

Loads rules for specified rewards.
[Obsolete("Use Services.Loyalty.LoadRulesForRewards() instead.")]
public static void LoadRulesForRewards(RewardCollection rewards)

Parameters

rewards RewardCollection
The RewardCollection.

Save()

Saves current instance to the data base.
[Obsolete("Use Services.Loyalty.SaveRewardRule() instead.")]
public void Save()

set_ID(int)

[Obsolete("Use Id")]
public void set_ID(int value)

Parameters

value int

SetCountry(Country)

Sets the country of the rule.
public void SetCountry(Country value)

Parameters

value Country

SetLanguage(Language)

Sets the language of the rule.
public void SetLanguage(Language value)

Parameters

value Language

SetPayment(Payment)

Sets the payment of the rule.
public void SetPayment(Payment value)

Parameters

value Payment

SetReward(Reward)

Sets the reward of the rule.
public void SetReward(Reward value)

Parameters

value Reward

SetShipping(Shipping)

Sets the shipping of the rule.
public void SetShipping(Shipping value)

Parameters

value Shipping

SetShop(Shop)

Sets the shop of the rule.
public void SetShop(Shop value)

Parameters

value Shop

SetUser(User)

Sets the user of the rule.
public void SetUser(User value)

Parameters

value User

SetUserGroup(Group)

Sets the user group of the rule.
public void SetUserGroup(Group value)

Parameters

value Group

SetVoucherList(VoucherList)

Sets the voucher list of the rule.
public void SetVoucherList(VoucherList voucherList)

Parameters

voucherList VoucherList
To top