PaymentLinkResponse.fromJson constructor
Create PaymentLinkResponse from JSON
Implementation
factory PaymentLinkResponse.fromJson(Map<String, dynamic> json) {
return PaymentLinkResponse(
id: json['id'] as int,
currency: json['currency'] as String?,
clientInfo: ClientInfo.fromJson(json['client_info'] as Map<String, dynamic>),
referenceId: json['reference_id'] as String?,
amountCents: json['amount_cents'] as int,
state: json['state'] as String,
description: json['description'] as String?,
createdAt: DateTime.parse(json['created_at'] as String),
expiresAt: json['expires_at'] != null ? DateTime.parse(json['expires_at'] as String) : null,
paidAt: json['paid_at'] != null ? DateTime.parse(json['paid_at'] as String) : null,
clientUrl: json['client_url'] as String,
origin: json['origin'] as int,
merchantStaffTag: json['merchant_staff_tag'] as String?,
paymentLinkImage: json['payment_link_image'] as String?,
order: json['order'] as int,
);
}