BioPayload.fromJson constructor

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

Implementation

BioPayload.fromJson(Map<String, dynamic> json) {
  androidApplicationId = json["android_application_id"];
  iosApplicationId = json["ios_application_id"];

  pg = json["pg"];
  method = json["method"];
  methods = json["methods"];
  orderName = json["orderName"];

  price = json["price"];
  taxFree = json["tax_free"];

  orderId = json["order_id"];
  // useOrderId = json["use_order_id"];


  subscriptionId = json["subscriptionId"];
  authenticationId = json["authenticationId"];
  walletId = json["walletId"];
  token = json["token"];
  authenticateType = json["authenticateType"];
  userToken = json["userToken"];

  metadata = json["metadata"];

  if(json["user"] != null) user = User.fromJson(json["user"]);
  if(json["extra"] != null) extra = BioExtra.fromJson(json["extra"]);
  if(json["items"] != null) items = json["items"].map((e) => Item.fromJson(e)).toList();

  names = json["names"];
  if(json["prices"] != null) prices = json["prices"].map((e) => BioPrice.fromJson(e)).toList();
}