Invoice.fromJson constructor
Parse from a json
Implementation
factory Invoice.fromJson(Map<String, dynamic> json) => Invoice(
currency: json['currency'],
priceParts: List<LabeledPricePart>.from((json['price_parts'] ?? [])
.map((item) => LabeledPricePart.fromJson(item))
.toList()),
maxTipAmount: json['max_tip_amount'],
suggestedTipAmounts: List<int>.from(
(json['suggested_tip_amounts'] ?? []).map((item) => item).toList()),
recurringPaymentTermsOfServiceUrl:
json['recurring_payment_terms_of_service_url'],
isTest: json['is_test'],
needName: json['need_name'],
needPhoneNumber: json['need_phone_number'],
needEmailAddress: json['need_email_address'],
needShippingAddress: json['need_shipping_address'],
sendPhoneNumberToProvider: json['send_phone_number_to_provider'],
sendEmailAddressToProvider: json['send_email_address_to_provider'],
isFlexible: json['is_flexible'],
);