PaymentSourceServicing
public protocol PaymentSourceServicing
A protocol for managing payment source operations.
-
Updates a payment source for the specified consumer.
- consumerId: The ID of the consumer.
- payload: The payload containing the updated payment source details.
- response: The loadable subject to track the response. The loadable subject tracks the state of the payment
instrument update operation, representing the success state with the loaded
PaymentSourceUpdatePayload
value or the failure state with the associated NetworkError.
Declaration
Swift
func updatePaymentSource( consumerId: String, payload: PaymentSourceUpdatePayload, response: LoadableSubject<PaymentSourceUpdateResponse> )
-
Adds a contact card for the specified consumer.
Declaration
Swift
func addContactCard( consumerId: String, payload: AddContactItemPayload, response: LoadableSubject<AddContactItemResponse> )
Parameters
consumerId
The ID of the consumer.
payload
The payload containing the contact card details to add.
response
The loadable subject to track the response. The loadable subject tracks the state of the contact card addition operation, representing the success state with the loaded
AddContactItemResponse
value or the failure state with the associatedNetworkError
. -
Removes a proxy from a payment source.
Declaration
Swift
func removeProxy( consumerId: String, paymentSourceProfileId: String, proxyId: String, response: LoadableSubject<RemoveProxyResponse> )
Parameters
consumerId
The ID of the consumer.
instrumentProfileId
The ID of the instrument profile.
proxyId
The ID of the proxy to remove.
response
The loadable subject to track the response. The loadable subject tracks the state of the proxy removal operation, representing the success state with the loaded
RemoveProxyResponse
value or the failure state with the associatedNetworkError
. -
Adds a proxy to a payment source.
Declaration
Swift
func addProxy( consumerId: String, paymentSourceProfileId: String, payload: AddProxyPayload, response: LoadableSubject<AddProxyResponse> )
Parameters
consumerId
The ID of the consumer.
instrumentProfileId
The ID of the instrument profile.
payload
The payload containing the proxy details to add.
response
The loadable subject to track the response. The loadable subject tracks the state of the proxy addition operation, representing the success state with the loaded
AddProxyResponse
value or the failure state with the associatedNetworkError
. -
Validates a proxy OTP (One-Time Password) at the specified URL.
Declaration
Swift
func validate( otp: ProxyOTPPayload, at url: URL, response: LoadableSubject<Void> )
Parameters
otp
The OTP payload to validate.
url
The URL where the OTP validation request is sent.
response
The loadable subject to track the response. The loadable subject tracks the state of the OTP validation operation, representing the success state with a void value or the failure state with the associated
NetworkError
. -
Requests a new OTP (One-Time Password) at the specified URL.
Declaration
Swift
func requestNewOtp( at url: URL, response: LoadableSubject<RequestOTPResponse> )
Parameters
url
The URL where the OTP request is sent.
response
The loadable subject to track the response. The loadable subject tracks the state of the OTP request operation, representing the success state with the loaded
RequestOTPResponse
value or the failure state with the associatedNetworkError
. -
Edits the display name of a payment source.
Declaration
Swift
func editDisplayName( consumerId: String, paymentSourceProfileId: String, payload: EditPaymentSourcePayload, response: LoadableSubject<EditPaymentSourceResponse> )
Parameters
consumerId
The ID of the consumer.
instrumentProfileId
The ID of the instrument profile.
payload
The payload containing the updated display name.
response
The loadable subject to track the response. The loadable subject tracks the state of the display name edit operation, representing the success state with the loaded
EditPaymentSourcePayload
value or the failure state with the associatedNetworkError
.