pub struct SqliteLoyaltyProgramRepository { /* private fields */ }Available on crate feature
sqlite only.Implementations§
Source§impl SqliteLoyaltyProgramRepository
impl SqliteLoyaltyProgramRepository
pub const fn new(pool: Pool<SqliteConnectionManager>) -> Self
Trait Implementations§
Source§impl LoyaltyProgramRepository for SqliteLoyaltyProgramRepository
impl LoyaltyProgramRepository for SqliteLoyaltyProgramRepository
Source§fn create(&self, input: CreateLoyaltyProgram) -> Result<LoyaltyProgram>
fn create(&self, input: CreateLoyaltyProgram) -> Result<LoyaltyProgram>
Create a new loyalty program
Source§fn get(&self, id: LoyaltyProgramId) -> Result<Option<LoyaltyProgram>>
fn get(&self, id: LoyaltyProgramId) -> Result<Option<LoyaltyProgram>>
Get loyalty program by ID
Source§fn enroll(&self, input: EnrollCustomer) -> Result<LoyaltyAccount>
fn enroll(&self, input: EnrollCustomer) -> Result<LoyaltyAccount>
Enroll a customer in a program
Source§fn get_account(&self, id: LoyaltyAccountId) -> Result<Option<LoyaltyAccount>>
fn get_account(&self, id: LoyaltyAccountId) -> Result<Option<LoyaltyAccount>>
Get a loyalty account
Source§fn get_account_by_customer(
&self,
customer_id: CustomerId,
program_id: LoyaltyProgramId,
) -> Result<Option<LoyaltyAccount>>
fn get_account_by_customer( &self, customer_id: CustomerId, program_id: LoyaltyProgramId, ) -> Result<Option<LoyaltyAccount>>
Get loyalty account by customer and program
Source§fn list_accounts(
&self,
filter: LoyaltyAccountFilter,
) -> Result<Vec<LoyaltyAccount>>
fn list_accounts( &self, filter: LoyaltyAccountFilter, ) -> Result<Vec<LoyaltyAccount>>
List loyalty accounts with filter
Source§fn adjust_points(&self, input: AdjustPoints) -> Result<LoyaltyTransaction>
fn adjust_points(&self, input: AdjustPoints) -> Result<LoyaltyTransaction>
Adjust points on an account (earn, redeem, etc.)
Source§fn get_transactions(
&self,
account_id: LoyaltyAccountId,
limit: Option<u32>,
) -> Result<Vec<LoyaltyTransaction>>
fn get_transactions( &self, account_id: LoyaltyAccountId, limit: Option<u32>, ) -> Result<Vec<LoyaltyTransaction>>
Get transaction history for an account
Auto Trait Implementations§
impl !RefUnwindSafe for SqliteLoyaltyProgramRepository
impl !UnwindSafe for SqliteLoyaltyProgramRepository
impl Freeze for SqliteLoyaltyProgramRepository
impl Send for SqliteLoyaltyProgramRepository
impl Sync for SqliteLoyaltyProgramRepository
impl Unpin for SqliteLoyaltyProgramRepository
impl UnsafeUnpin for SqliteLoyaltyProgramRepository
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more