InvoiceSettingCustomerSetting.fromJson constructor
InvoiceSettingCustomerSetting.fromJson(
- Object? json
Implementation
factory InvoiceSettingCustomerSetting.fromJson(Object? json) {
final map = (json as Map).cast<String, Object?>();
return InvoiceSettingCustomerSetting(
customFields: map['custom_fields'] == null
? null
: (map['custom_fields'] as List<Object?>)
.map((el) => InvoiceSettingCustomField.fromJson(el))
.toList(),
defaultPaymentMethod: map['default_payment_method'] == null
? null
: PaymentMethodOrId.fromJson(map['default_payment_method']),
footer: map['footer'] == null ? null : (map['footer'] as String),
renderingOptions: map['rendering_options'] == null
? null
: InvoiceRenderingOptions.fromJson(map['rendering_options']),
);
}