P2PServicing
public protocol P2PServicing
A protocol for managing P2P (Person-to-Person) related operations.
-
Fetches a P2P (Person-to-Person) request as the payer.
Declaration
Swift
func fetchP2PRequestAsPayer( _ id: String, response: LoadableSubject<P2PRequestAsPayerResponse> )
Parameters
id
The ID of the P2P request as the payer.
response
The loadable subject to track the response. The loadable subject tracks the state of the P2P request retrieval operation as the payer, representing the success state with the loaded
P2PRequestAsPayerResponse
value or the failure state with the associatedNetworkError
. -
Fetches a P2P (Person-to-Person) request as the payee.
Declaration
Swift
func fetchP2PRequestAsPayee( _ id: String, response: LoadableSubject<P2PRequestAsPayeeResponse> )
Parameters
id
The ID of the P2P request as the payee.
response
The loadable subject to track the response. The loadable subject tracks the state of the P2P request retrieval operation as the payee, representing the success state with the loaded
P2PRequestAsPayeeResponse
value or the failure state with the associatedNetworkError
. -
Fetches received P2P (Person-to-Person) requests.
Declaration
Swift
func fetchReceivedP2PRequests( fetchData: P2PRequestsFetchData, response: LoadableSubject<P2PReceivedRequestsFetchResponse> )
Parameters
fetchData
The data to fetch received P2P requests.
response
The loadable subject to track the response. The loadable subject tracks the state of the received P2P requests fetch operation, representing the success state with the loaded
P2PReceivedRequestsFetchResponse
value or the failure state with the associatedNetworkError
. -
Fetches sent P2P (Person-to-Person) requests.
Declaration
Swift
func fetchSentP2PRequests( fetchData: P2PRequestsFetchData, response: LoadableSubject<P2PSentRequestsFetchResponse> )
Parameters
fetchData
The data to fetch sent P2P requests.
response
The loadable subject to track the response. The loadable subject tracks the state of the sent P2P requests fetch operation, representing the success state with the loaded
P2PSentRequestsFetchResponse
value or the failure -
Creates a P2P (Person-to-Person) request as the payee.
- request: The request object containing the details of the P2P request as the payee.
- response: The loadable subject to track the response. The loadable subject tracks the state of the P2P request creation operation as the payee, representing the success state with the loaded P2PRequestAsPayeeResponse value or the failure state with the associated NetworkError.
Declaration
Swift
func createP2PRequest( _ request: CreateP2PRequestAsPayeeRequest, response: LoadableSubject<P2PRequestAsPayeeResponse> )
-
Cancels a P2P (Person-to-Person) request.
Declaration
Swift
func cancelP2PRequest( _ id: String, response: LoadableSubject<Void> )
Parameters
id
The ID of the P2P request to cancel.
response
The loadable subject to track the response. The loadable subject tracks the state of the P2P request cancellation operation, representing the success state with
Void
value or the failure state with the associatedNetworkError
. -
Approves a P2P (Person-to-Person) request.
Declaration
Swift
func approveP2PRequest( _ id: String, _ request: P2PRequestApprovalRequest, response: LoadableSubject<P2PRequestApprovalResponse> )
Parameters
id
The ID of the P2P request to approve.
request
The request object containing the details of the P2P request approval.
response
The loadable subject to track the response. The loadable subject tracks the state of the P2P request approval operation, representing the success state with the loaded
P2PRequestApprovalResponse
value or the failure state with the associatedNetworkError
. -
Rejects a P2P (Person-to-Person) request.
Declaration
Swift
func rejectP2PRequest( _ id: String, response: LoadableSubject<Void> )
Parameters
id
The ID of the P2P request to reject.
response
The loadable subject to track the response. The loadable subject tracks the state of the P2P request rejection operation, representing the success state with
Void
value or the failure state with the associatedNetworkError
. -
Creates a P2P (Person-to-Person) payment as the payer.
Declaration
Swift
func createP2PPayment( _ request: CreateP2PPaymentAsPayerRequest, response: LoadableSubject<CreateP2PPaymentAsPayerResponse> )
Parameters
request
The request object containing the details of the P2P payment as the payer.
response
The loadable subject to track the response. The loadable subject tracks the state of the P2P payment creation operation as the payer, representing the success state with the loaded
CreateP2PPaymentAsPayerResponse
value or the failure state with the associatedNetworkError
. -
Approves a P2P (Person-to-Person) payment.
Declaration
Swift
func approveP2PPayment( _ id: String, _ request: P2PPaymentApprovalRequest, response: LoadableSubject<Void> )
Parameters
id
The ID of the P2P payment to approve.
request
The request object containing the details of the P2P payment approval.
response
The loadable subject to track the response. The loadable subject tracks the state of the P2P payment approval operation, representing the success state with
Void
value or the failure state with the associatedNetworkError
. -
Fetches P2P (Person-to-Person) payments.
Declaration
Swift
func fetchP2PPayments( _ fetchData: P2PPaymentsFetchData, response: LoadableSubject<P2PPaymentsFetchResponse> )
Parameters
fetchData
The data to fetch P2P payments.
response
The loadable subject to track the response. The loadable subject tracks the state of the P2P payments fetch operation, representing the success state with the loaded
P2PPaymentsFetchResponse
value or the failure state with the associatedNetworkError
.