PreCheckoutQuery.fromJson constructor

PreCheckoutQuery.fromJson(
  1. Map<String, dynamic> json
)

Creates a PreCheckoutQuery object from a JSON object

Implementation

factory PreCheckoutQuery.fromJson(Map<String, dynamic> json) {
  return PreCheckoutQuery(
    id: json['id']!,
    from: User.fromJson(json['from']!),
    currency: json['currency']!,
    totalAmount: json['total_amount']!,
    invoicePayload: json['invoice_payload']!,
    shippingOptionId: json['shipping_option_id'],
    orderInfo: json['order_info'] == null
        ? null
        : OrderInfo.fromJson(json['order_info']!),
  );
}