PaymentService
public protocol PaymentService
Base Protocol to get Payment Information
-
Fetches the list of
InsurancePayerassociated with the tenantDeclaration
Swift
func getInsurancePayers(tenant: String, success: @escaping ([InsurancePayer]) -> Void, failure: @escaping (FailedReason) -> Void)Parameters
tenantA string to indicate which tenant you want the list of
InsurancePayerforsuccessA closure called with a list of
InsurancePayerfailureA closure called if any FailedReason errors are returned
-
Validates the coupon code (sometimes called service key) and returns the amount of the coupon
Declaration
Swift
func verifyCouponCode(couponCode: String, success: @escaping (Decimal) -> Void, failure: @escaping (CouponCodeFailedReason) -> Void)Parameters
couponCodeA string to indicate the coupon code (sometimes called service key) used for verification
successA closure called with a Decimal of the coupon amount in dollars. ie. 49.00 for $49
failureA closure called if any CouponCodeFailedReason errors are returned
-
getInsurancePayers(tenant:Asynchronous) Fetches the list of
InsurancePayerassociated with the tenantThrows
FailedReasonDeclaration
Swift
func getInsurancePayers(tenant: String) async throws -> [InsurancePayer]Parameters
tenantA string to indicate which tenant you want the list of
InsurancePayerforReturn Value
An array of
InsurancePayer -
verifyCouponCode(couponCode:Asynchronous) Validates the coupon code (sometimes called service key) and returns the amount of the coupon
Throws
Throws:CouponCodeFailedReasonDeclaration
Swift
func verifyCouponCode(couponCode: String) async throws -> DecimalParameters
couponCodeA string to indicate the coupon code (sometimes called service key) used for verification
Return Value
Decimal of the coupon amount in dollars. ie. 49.00 for $49
View on GitHub
Install in Dash