/** * LV2Examine service. * @module api/LV2ExamineApi */ export default class LV2ExamineApi { /** * Constructs a new LV2ExamineApi. * @alias LV2ExamineApi * @class * @param {module:ApiClient} [apiClient] Optional API client implementation to use, * default to {@link module:ApiClient#instance} if unspecified. */ constructor(apiClient?: any); apiClient: any; /** * Callback function to receive the result of the examineEarningRules operation. * @callback examineEarningRulesCallback * @param {Error|null} error Error object if failed, null otherwise. * @param {LoyaltiesExamineEarningRulesExamineResponseBody} [data] The data returned by the service call. * @param {Object} [response] Full response object if successful. */ /** * Examine earning rules * Estimates earning opportunities for a customer without triggering any actual earning for loyalty v2 earning rules. The trigger selects whether all trigger events or one specific event is examined. When a specific event is selected, exactly one matching context object is required: customer_order_paid for customer.order.paid, customer_segment_entered for customer.segment.entered, and customer_custom_event for customer.custom_event. The other context objects must not be present. This endpoint can examine earning rules for all loyalty programs the customer belongs to by using customer_identification with customer_id or customer_source_id. To examine earning rules only for one program, use member_id in customer_identification, as member_id is loyalty program-specific. A customer who exists but has no active membership returns 200 with an empty memberships array. * @param {LoyaltiesExamineEarningRulesExamineRequestBody} loyaltiesExamineEarningRulesExamineRequestBody * @param {examineEarningRulesCallback} [callback] The callback function, accepting three arguments: error, data, response * data is of type: {@link LoyaltiesExamineEarningRulesExamineResponseBody} * @returns {Promise<(LoyaltiesExamineEarningRulesExamineResponseBody | undefined)>} Depending on whether the `callback` parameter is provided, the promise will resolve with a `LoyaltiesExamineEarningRulesExamineResponseBody` object or with `undefined`. */ examineEarningRules(loyaltiesExamineEarningRulesExamineRequestBody: LoyaltiesExamineEarningRulesExamineRequestBody, callback?: (error: Error | null, data?: LoyaltiesExamineEarningRulesExamineResponseBody, response?: any) => any): Promise<(LoyaltiesExamineEarningRulesExamineResponseBody | undefined)>; /** * Callback function to receive the result of the examineRewards operation. * @callback examineRewardsCallback * @param {Error|null} error Error object if failed, null otherwise. * @param {LoyaltiesExamineRewardsExamineResponseBody} [data] The data returned by the service call. * @param {Object} [response] Full response object if successful. */ /** * Examine rewards * Evaluates rewards assigned to a customers active Loyalty v2 program memberships. Applies temporary customer and member metadata overrides without updating stored data. Returns reward availability by card, including points costs and applicable unavailability reasons. Omits a reward when it is inactive, out of stock, has no matching cost, or the member has no card for that cost. This endpoint can examine rewards for all loyalty programs the customer belongs to by using customer_identification with customer_id or customer_source_id. To examine rewards only for one program, use member_id in customer_identification, as member_id is loyalty program-specific. A customer who exists but has no active membership returns 200 with an empty memberships array. * @param {LoyaltiesExamineRewardsExamineRequestBody} loyaltiesExamineRewardsExamineRequestBody * @param {examineRewardsCallback} [callback] The callback function, accepting three arguments: error, data, response * data is of type: {@link LoyaltiesExamineRewardsExamineResponseBody} * @returns {Promise<(LoyaltiesExamineRewardsExamineResponseBody | undefined)>} Depending on whether the `callback` parameter is provided, the promise will resolve with a `LoyaltiesExamineRewardsExamineResponseBody` object or with `undefined`. */ examineRewards(loyaltiesExamineRewardsExamineRequestBody: LoyaltiesExamineRewardsExamineRequestBody, callback?: (error: Error | null, data?: LoyaltiesExamineRewardsExamineResponseBody, response?: any) => any): Promise<(LoyaltiesExamineRewardsExamineResponseBody | undefined)>; } import LoyaltiesExamineEarningRulesExamineRequestBody from '../model/LoyaltiesExamineEarningRulesExamineRequestBody'; import LoyaltiesExamineEarningRulesExamineResponseBody from '../model/LoyaltiesExamineEarningRulesExamineResponseBody'; import LoyaltiesExamineRewardsExamineRequestBody from '../model/LoyaltiesExamineRewardsExamineRequestBody'; import LoyaltiesExamineRewardsExamineResponseBody from '../model/LoyaltiesExamineRewardsExamineResponseBody';