Table of Contents

Class RecurringOrder

Namespace
Dynamicweb.Ecommerce.Orders
Assembly
Dynamicweb.Ecommerce.dll

The class RecurringOrder represents recurring order.

public class RecurringOrder : DbObject
Inheritance
RecurringOrder
Inherited Members

Constructors

RecurringOrder()

Initializes a new instance of the RecurringOrder class.

public RecurringOrder()

RecurringOrder(IDataReader)

Initializes a new instance of the RecurringOrder class from data reader.

public RecurringOrder(IDataReader dataReader)

Parameters

dataReader IDataReader

The data reader.

Properties

BaseOrderId

Gets or sets recurring order base order ID.

public string BaseOrderId { get; set; }

Property Value

string

CanceledDeliveries

Gets or sets recurring order canceled deliveries as comma-separated string of serial numbers of deliveries counted from start date.

public string CanceledDeliveries { get; set; }

Property Value

string

EndDate

Gets or sets recurring orders end date.

public DateTime? EndDate { get; set; }

Property Value

DateTime?

Interval

Gets or sets recurring orders interval.

public int Interval { get; set; }

Property Value

int

IntervalUnit

Gets or sets recurring orders interval unit(day, week, month).

public RecurringIntervalUnitType IntervalUnit { get; set; }

Property Value

RecurringIntervalUnitType

LastDelivery

Gets or sets previous date of recurring.

public DateTime? LastDelivery { get; set; }

Property Value

DateTime?

NextDelivery

Gets next date of recurring.

public DateTime? NextDelivery { get; }

Property Value

DateTime?

StartDate

Gets or sets recurring orders start date.

public DateTime? StartDate { get; set; }

Property Value

DateTime?

TotalPrice

Gets or sets recurring order base order ID.

public PriceInfo TotalPrice { get; set; }

Property Value

PriceInfo

UserId

Gets the recurring order related user ID.

public int UserId { get; set; }

Property Value

int

Methods

EndRecurring(int)

Update recurring order end date to now

public static void EndRecurring(int recurringOrderId)

Parameters

recurringOrderId int

The id recurring order

Fill(IDataReader)

Fills the Card token properties from the specified data reader.

public override 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.

protected override void FillRow(DataRow row)

Parameters

row DataRow

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

GetEvents()

Retrieve recurring order events occurred during scheduler

public IEnumerable<OrderDebuggingInfo> GetEvents()

Returns

IEnumerable<OrderDebuggingInfo>

GetFutureDeliveriesList()

Gets information about the future deliveries

public IEnumerable<RecurringOrderFutureDelivery> GetFutureDeliveriesList()

Returns

IEnumerable<RecurringOrderFutureDelivery>

GetNextDeliveryIndex(bool)

Gets index of next delivery.

public int GetNextDeliveryIndex(bool checkForCanceled)

Parameters

checkForCanceled bool

Returns

int

GetPreviousOrdersIds()

Retrieve previous recurring orders IDs

public IEnumerable<string> GetPreviousOrdersIds()

Returns

IEnumerable<string>

GetRecurringOrderById(int)

Retrieve recurring order by ID

public static RecurringOrder GetRecurringOrderById(int id)

Parameters

id int

The id of recurring order

Returns

RecurringOrder

GetRecurringOrderByTemplateId(string)

Retrieve recurring order by ID

public static RecurringOrder GetRecurringOrderByTemplateId(string id)

Parameters

id string

The id of recurring order

Returns

RecurringOrder

GetRecurringOrderTotalPrice()

Retrieve recurring orders total

public PriceInfo GetRecurringOrderTotalPrice()

Returns

PriceInfo

GetUserRecurringOrders(int)

Retrieve recurring orders for an user

public static IEnumerable<RecurringOrder> GetUserRecurringOrders(int userId)

Parameters

userId int

The id of user

Returns

IEnumerable<RecurringOrder>

GetUserRecurringOrders(int, bool)

Retrieve recurring orders for an user

public static IEnumerable<RecurringOrder> GetUserRecurringOrders(int userId, bool useCustomerNumber)

Parameters

userId int

The id of user

useCustomerNumber bool

The indicator whether to use customer number instead of user id.

Returns

IEnumerable<RecurringOrder>

GetUserRecurringOrders(int, bool, DateTime)

Retrieve recurring orders for an user

public static IEnumerable<RecurringOrder> GetUserRecurringOrders(int userId, bool useCustomerNumber, DateTime fromDate)

Parameters

userId int

The id of user

useCustomerNumber bool

The indicator whether to use customer number instead of user id.

fromDate DateTime

The minimum order date.

Returns

IEnumerable<RecurringOrder>

HasErros()

Retrieve recurring order errors occurred during scheduler

public bool HasErros()

Returns

bool
To top