Invoice.fromMap constructor

Invoice.fromMap(
  1. Map<String, dynamic> map
)

Implementation

Invoice.fromMap(Map<String, dynamic> map) {
  extra = map['@extra'];
  client_id = map['@client_id'];
  currency = map['currency'];
  if (map['price_parts'] != null) {
    price_parts = [];
    for (var someValue in map['price_parts']) {
      if (someValue != null) {
        price_parts?.add(TdApiMap.fromMap(someValue) as LabeledPricePart);
      }
    }
  }
  max_tip_amount = map['max_tip_amount'];
  if (map['suggested_tip_amounts'] != null) {
    suggested_tip_amounts = [];
    for (var someValue in map['suggested_tip_amounts']) {
      suggested_tip_amounts?.add(someValue);
    }
  }
  recurring_payment_terms_of_service_url = map['recurring_payment_terms_of_service_url'];
  is_test = map['is_test'];
  need_name = map['need_name'];
  need_phone_number = map['need_phone_number'];
  need_email_address = map['need_email_address'];
  need_shipping_address = map['need_shipping_address'];
  send_phone_number_to_provider = map['send_phone_number_to_provider'];
  send_email_address_to_provider = map['send_email_address_to_provider'];
  is_flexible = map['is_flexible'];
}