PaymentForm.fromJson constructor

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

Parse from a json

Implementation

factory PaymentForm.fromJson(Map<String, dynamic> json) => PaymentForm(
  id: int.parse(json['id']),
  invoice: Invoice.fromJson(json['invoice']),
  url: json['url'],
  sellerBotUserId: json['seller_bot_user_id'],
  paymentsProviderUserId: json['payments_provider_user_id'],
  paymentsProvider: json['payments_provider'] == null ? null : PaymentsProviderStripe.fromJson(json['payments_provider']),
  savedOrderInfo: json['saved_order_info'] == null ? null : OrderInfo.fromJson(json['saved_order_info']),
  savedCredentials: json['saved_credentials'] == null ? null : SavedCredentials.fromJson(json['saved_credentials']),
  canSaveCredentials: json['can_save_credentials'],
  needPassword: json['need_password'],
  extra: json['@extra'],
  clientId: json['@client_id'],
);