PaymentLinksResourceInvoiceSettings.fromJson constructor
PaymentLinksResourceInvoiceSettings.fromJson(
- Object? json
Implementation
factory PaymentLinksResourceInvoiceSettings.fromJson(Object? json) {
final map = (json as Map).cast<String, Object?>();
return PaymentLinksResourceInvoiceSettings(
accountTaxIds: map['account_tax_ids'] == null
? null
: (map['account_tax_ids'] as List<Object?>)
.map((el) => InvoiceAccountTaxIdsItemOrId.fromJson(el))
.toList(),
customFields: map['custom_fields'] == null
? null
: (map['custom_fields'] as List<Object?>)
.map((el) => InvoiceSettingCustomField.fromJson(el))
.toList(),
description:
map['description'] == null ? null : (map['description'] as String),
footer: map['footer'] == null ? null : (map['footer'] as String),
issuer: map['issuer'] == null
? null
: ConnectAccountReference.fromJson(map['issuer']),
metadata: map['metadata'] == null
? null
: (map['metadata'] as Map).cast<String, Object?>().map((
key,
value,
) =>
MapEntry(
key,
(value as String),
)),
renderingOptions: map['rendering_options'] == null
? null
: InvoiceSettingRenderingOptions.fromJson(map['rendering_options']),
);
}