Note: This release is in preview. Features described here don’t become generally available until the latest general availability date that Salesforce announces for this release. Before then, and where features are noted as beta, pilot, or developer preview, we can’t guarantee general availability within any particular time frame or at all. Make your purchase decisions only on the basis of generally available products and features.
LoyaltyAPIInterface
The LoyaltyApiInterface class defines
the interface for creating, formatting, and sending REST requests to the Salesforce service.
This class stores REST API call definitions for all Loyalty API.
Use this signature to define the LoyaltyAPIInterface
class.
1public interface LoyaltyApiInterfaceMethod Summary
| Modifier and Type | Method | Method Detail | Description |
|---|---|---|---|
| abstract Result<EnrollmentResponse> | postEnrollment(@Url() String url, @Body() EnrollmentRequest json) |
postEnrollment |
Creates a POST request for an individual enrollment for the loyalty program. |
| abstract Result<MemberProfileResponse> | getMemberProfile(@Url() String url, @Query(value = "memberId") String memberId, @Query(value = "membershipNumber") String membershipNumber, @Query(value = "programCurrencyName") String programCurrencyName) |
getMemberProfile |
Retrieves profile details related to the member ID. |
| abstract Result<MemberBenefitsResponse> | getMemberBenefits(@Url() String url, @Query(value = "membershipNumber") String membershipNumber) |
getMemberBenefits |
Retrieves benefits related to the member ID. |
| abstract Result<TransactionsResponse> | getTransactions(@Url() String url, @Query(value = "pageNumber") Integer pageNumber, @Query(value = "journalTypeName") String journalTypeName, @Query(value = "journalSubTypeName") String journalSubTypeName, @Query(value = "periodStartDate") String periodStartDate, @Query(value = "periodEndDate") String periodEndDate) |
getTransactions |
Retrieves transactions related to the member. |
| abstract Result<PromotionsResponse> | getEligiblePromotions(@Url() String url, @Body() PromotionsRequest requestBody) |
getEligiblePromotions |
Retrieves promotions that a promotion is eligible to enroll for. |
| abstract Result<EnrollPromotionsResponse> | enrollInPromotion(@Url() String url, @Body() PromotionsRequest requestBody) |
enrollInPromotion |
Enrolls member in a promotion. |
| abstract Result<UnenrollPromotionResponse> | unenrollPromotion(@Url() String url, @Body() PromotionsRequest requestBody) |
unenrollPromotion |
Opts out a member from an available promotion. |
| abstract Result<VoucherResult> | getVouchers(@Url() String url, @Query(value = "voucherStatus") String voucherStatus, @Query(value = "pageNumber") Integer pageNumber, @Query(value = "productId") String productId, @Query(value = "productCategoryId") String productCategoryId, @Query(value = "productName") String productName, @Query(value = "productCategoryName") String productCategoryName) |
getVouchers |
Retrieves vouchers that are available to the program member. |