PaymentService

public protocol PaymentService

Base Protocol to get Payment Information

  • Fetches the list of InsurancePayer associated with the tenant

    Declaration

    Swift

    func getInsurancePayers(tenant: String, success: @escaping ([InsurancePayer]) -> Void, failure: @escaping (FailedReason) -> Void)

    Parameters

    tenant

    A string to indicate which tenant you want the list of InsurancePayer for

    success

    A closure called with a list of InsurancePayer

    failure

    A 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

    couponCode

    A string to indicate the coupon code (sometimes called service key) used for verification

    success

    A closure called with a Decimal of the coupon amount in dollars. ie. 49.00 for $49

    failure

    A closure called if any CouponCodeFailedReason errors are returned

  • Uploads insurance card images that are saved for the provider to view.

    Declaration

    Swift

    func uploadInsuranceCard(frontImage: UIImage, backImage: UIImage, success: @escaping (String) -> Void, failure: @escaping (InsuranceCardFailedReason) -> Void)

    Parameters

    frontImage

    an UIImage representing the front of the insurance card

    backImage

    an UIImage representing the back of the insurance card

    success

    a cardId String that needs to be used when booking a retail visit with a PaymentMethod of insuranceImageSelf or insuranceImageOther

    failure

    A closure called if any InsuranceCardFailedReason errors are returned