PaymentDetailsEntity class

A data class representing the details of a payment transaction.

This class encapsulates all the information needed to process a payment, including customer details, payment amount, currency, and various configuration options.

Example usage:

final details = PaymentDetailsEntity(
  amount: '100.00',
  currency: 'USD',
  merchantOrderId: 'order_123',
  orderPurpose: 'Product purchase',
  notifyCustomer: true,
);

// Access payment URL
final paymentUrl = details.getWebUrl;

Constructors

PaymentDetailsEntity({String? amount, String? currency, String? merchantOrderId, String? orderPurpose, bool? notifyCustomer, CustomerDetails? customerDetails, String? redirectUrl, DateTime? createdAt, String? paymentLink, String? orderStatus, String? orderId, bool? sendReceiptToCustomer})
Creates a PaymentDetailsEntity with the specified parameters.
PaymentDetailsEntity.fromJson(Map<String, dynamic> json)
Creates a PaymentDetailsEntity from a JSON response.
factory

Properties

amount String?
The amount to be paid, formatted as a string with decimal places.
final
createdAt DateTime?
The timestamp when this payment was created.
final
currency String?
The three-letter ISO currency code for the payment.
final
customerDetails CustomerDetails?
Information about the customer making the payment.
final
getWebUrl String?
Returns the complete URL for the payment web interface.
no setter
hashCode int
The hash code for this object.
no setterinherited
merchantOrderId String?
Your system's unique identifier for this order.
final
notifyCustomer bool?
Whether to send payment notifications to the customer.
final
orderId String?
The unique identifier assigned by CoFee payment system.
final
orderPurpose String?
A description of what the payment is for.
final
orderStatus String?
The current status of the order.
final
The base payment URL provided by the CoFee payment system.
final
redirectUrl String?
The URL where the customer should be redirected after payment.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
sendReceiptToCustomer bool?
Whether to send a payment receipt to the customer.
final

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toJson() Map<String, dynamic>
Converts this entity to a JSON map.
toString() String
A string representation of this object.
inherited

Operators

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