Search Results for

    Show / Hide Table of Contents

    Class RewardPointsService

    Inheritance
    System.Object
    RewardPointsService
    Implements
    IRewardPointsService
    Namespace: DirectScale.Disco.Extension.Services
    Assembly: DirectScale.Disco.Extension.Abstractions.dll
    Syntax
    public class RewardPointsService : Object, IRewardPointsService

    Constructors

    RewardPointsService(IApiService)

    Declaration
    public RewardPointsService(IApiService apiService)
    Parameters
    Type Name Description
    IApiService apiService

    Methods

    AddRewardPoints(Int32, Double, String, Nullable<Int32>)

    Adds amount rewards points to associateId.

    Declaration
    public Task<int> AddRewardPoints(int associateId, double amount, string source, Nullable<int> orderId)
    Parameters
    Type Name Description
    System.Int32 associateId

    Associate to add points to.

    System.Double amount

    Amount of points to add.

    System.String source

    Describe the source of the points (255 char limit).

    System.Nullable<System.Int32> orderId

    Optional order that provided points.

    Returns
    Type Description
    System.Threading.Tasks.Task<System.Int32>
    Remarks

    Calls with availableDate set to now and expirationDate set to 365 days from now.

    AddRewardPointsWithExpiration(Int32, Double, String, DateTime, DateTime, Nullable<Int32>)

    Adds amount rewards points to associateId.

    Declaration
    public Task<int> AddRewardPointsWithExpiration(int associateId, double amount, string source, DateTime availableDate, DateTime expirationDate, Nullable<int> orderId)
    Parameters
    Type Name Description
    System.Int32 associateId

    Associate to add points to.

    System.Double amount

    Amount of points to add.

    System.String source

    Describe the source of the points (255 char limit).

    System.DateTime availableDate

    The date the rewards points were made available.

    System.DateTime expirationDate

    The date the rewards points will no longer be available.

    System.Nullable<System.Int32> orderId

    Optional order that provided points.

    Returns
    Type Description
    System.Threading.Tasks.Task<System.Int32>
    Remarks

    Calls with availableDate set to now and expirationDate set to 365 days from now.

    See Also
    AddRewardPoints(Int32, Double, String, Nullable<Int32>)

    GetAvailableRewardPoints(Int32)

    Get all of associateId's reward point quantities that have not been used yet.

    Declaration
    public Task<PointsItem[]> GetAvailableRewardPoints(int associateId)
    Parameters
    Type Name Description
    System.Int32 associateId
    Returns
    Type Description
    System.Threading.Tasks.Task<PointsItem[]>

    List of earned reward points that are still available.

    See Also
    GetRewardPointDetails(Int32)

    GetRewardPointDetails(Int32)

    Returns the detailed ledger of reward point activity, every addition and subtraction made for rewardPointId.

    Declaration
    public Task<RewardPointDetail[]> GetRewardPointDetails(int rewardPointId)
    Parameters
    Type Name Description
    System.Int32 rewardPointId

    The specific reward point to get details on.

    Returns
    Type Description
    System.Threading.Tasks.Task<RewardPointDetail[]>

    Details of how these points were earned and used.

    Remarks

    This is for auditing purposes and won't be needed often.

    See Also
    GetAvailableRewardPoints(Int32)

    GetRewardPoints(Int32)

    Gets the associateId's available reward point ballance.

    Declaration
    public Task<Decimal> GetRewardPoints(int associateId)
    Parameters
    Type Name Description
    System.Int32 associateId

    Associate with points.

    Returns
    Type Description
    System.Threading.Tasks.Task<System.Decimal>

    Available rewards points to use.

    Implements

    IRewardPointsService
    In This Article
    Back to top Copyright © 2022 DirectScale
    Generated by DocFX