# PaymentRequest class

Contains all data required for creating a payment.

Annotations
  - @JsonSerializable(explicitToJson: true)

## Constructors

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

## Properties

accountOnFile ↔ AccountOnFile?
  read / write
errorMessageIds ↔ List<ValidationErrorMessage>
  read / write
fieldValues ↔ Map<String, String>
  read / write
hashCode → int
  The hash code for this object.
  read-only inherited
paymentProduct ↔ PaymentProduct
  read / write
runtimeType → Type
  A representation of the runtime type of the object.
  read-only inherited
tokenize ↔ bool
  read / write

## 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