PaymentRequest class

Contains all data required for creating a payment.

Annotations
  • @JsonSerializable(explicitToJson: true)

Constructors

PaymentRequest.new({required PaymentProduct paymentProduct, bool tokenize = false, AccountOnFile? accountOnFile})
PaymentRequest.fromJson(Map<String, dynamic> json)
factory

Properties

accountOnFile AccountOnFile?
If a payment is to be made using an AccountOnFile, it should be provided here.
getter/setter pair
errorMessageIds List<ValidationErrorMessage>
Holds the ValidationErrorMessages, if any, after validation.
getter/setter pair
fieldValues Map<String, String>
The PaymentProductField identifiers and input values.
getter/setter pair
hashCode int
The hash code for this object.
no setterinherited
paymentProduct PaymentProduct
The PaymentProduct to be used for this payment.
getter/setter pair
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
tokenize bool
Whether or not the payment fields should be tokenized.
getter/setter pair

Methods

getMaskedValue(String fieldId) Future<String>
Returns the masked value for the given payment product fieldId.
getMaskedValues() Future<Map<String, String>>
Returns a Map of a payment product field id and the corresponding masked value
getUnmaskedValue(String fieldId) Future<String>
Returns the unmasked value for the given payment product fieldId.
getUnmaskedValues() Future<Map<String, String>>
Returns a Map of a payment product field id and the corresponding unmasked value
getValue(String paymentProductFieldId) String?
Returns the value of the PaymentProductField corresponding with the paymentProductFieldId.
mergePaymentRequest({required PaymentProduct paymentProduct}) → dynamic
Merges existing field values map with the paymentProduct values.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
removeValue(String paymentProductFieldId) → dynamic
Removes the value from the PaymentProductField corresponding with the paymentProductFieldId.
setValue(String paymentProductFieldId, String value) → dynamic
Sets the value for the PaymentProductField corresponding with the paymentProductFieldId.
toJson() Map<String, dynamic>
toString() String
A string representation of this object.
inherited
validate() Future<List<ValidationErrorMessage>>
Validates all fields based on their value and their validation rules. If a field is prefilled from the AccountOnFile, but it has been altered, it will be validated. Returns a list of ValidationErrorMessage.

Operators

operator ==(Object other) bool
The equality operator.
inherited