Gini Health
GiniHealth is the main class for interacting with the Gini Health SDK. It provides a way to submit a document for reviewing its extracted payment details and let's the user make the payment with one of the payment providers.
The recommended flow is:
Call checkRequirements to make sure that the flow can be completed.
Call one of the overloads of setDocumentForReview, to submit a document.
Display ReviewFragment.
setDocumentForReview can be called with:
Document instance in the case the upload was performed with Gini Pay Api lib (GiniHealthAPI).
Document id, this will probably be the case when there's backend integration between the Health SDK and the Gini Health API. This method will make a network call to obtain a Document instance so the other one is preferred if you have the Document instance.
documentFlow, paymentFlow, openBankState are used by the ReviewFragment to observe their state, but they are public so that they can be observed anywhere, the main purpose for this is to observe errors.
Constructors
Types
Functions
Checks whether the document is payable by fetching the document and its extractions from the Gini Pay API and verifying that the extractions contain an IBAN.
Checks the required conditions needed to finish the payment flow to avoid unnecessary document upload. See Requirement for possible requirements.
Checks the required conditions needed to finish the payment flow to avoid unnecessary document upload. See Requirement for possible requirements.
A flow for getting the Document set for review setDocumentForReview.
A flow that exposes the state of opening the bank. You can collect this flow to get information about the errors of this action.
A flow for getting extracted PaymentDetails for the document set for review (see setDocumentForReview).
Sets a Document for review. Results can be collected from documentFlow and paymentFlow.
Sets a lifecycle observer to handle state restoration after the system kills the app.
Properties
A flow for getting the Document set for review setDocumentForReview.
A flow for getting extracted PaymentDetails for the document set for review (see setDocumentForReview).