Invoice.fromJson constructor

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

Parse from a json

Implementation

Invoice.fromJson(Map<String, dynamic> json) {
  this.currency = json['currency'];
  this.priceParts = List<LabeledPricePart>.from((json['price_parts'] ?? [])
      .map((item) => LabeledPricePart.fromJson(item ?? <String, dynamic>{}))
      .toList());
  this.isTest = json['is_test'];
  this.needName = json['need_name'];
  this.needPhoneNumber = json['need_phone_number'];
  this.needEmailAddress = json['need_email_address'];
  this.needShippingAddress = json['need_shipping_address'];
  this.sendPhoneNumberToProvider = json['send_phone_number_to_provider'];
  this.sendEmailAddressToProvider = json['send_email_address_to_provider'];
  this.isFlexible = json['is_flexible'];
}