Payment constructor
- @JsonSerializable(explicitToJson: true)
- @Default('') String id,
- @Default('') @JsonKey(name: 'user_id') String createdById,
- @Default('') @JsonKey(name: 'assigned_user_id') String assignedToId,
- @Default(0) @JsonKey(name: 'created_at') int createdAt,
- @Default(0) @JsonKey(name: 'updated_at') int updatedAt,
- @Default(0) @JsonKey(name: 'archived_at') int archivedAt,
- @Default(false) @JsonKey(name: 'is_deleted') bool isDeleted,
- @Default('') @JsonKey(name: 'custom_value1') String customValue1,
- @Default('') @JsonKey(name: 'custom_value2') String customValue2,
- @Default('') @JsonKey(name: 'custom_value3') String customValue3,
- @Default('') @JsonKey(name: 'custom_value4') String customValue4,
- @Default('') @JsonKey(name: 'client_id') String clientId,
- @Default('') @JsonKey(name: 'invitation_id') String invitationId,
- @Default('') @JsonKey(name: 'client_contact_id') String clientContactId,
- @Default('') @JsonKey(name: 'type_id') String typeId,
- @Default('') @JsonKey(name: 'date') String date,
- @Default('') @JsonKey(name: 'transaction_reference') String transactionReference,
- @Default('') @JsonKey(name: 'private_notes') String privateNotes,
- @Default(false) @JsonKey(name: 'is_manual') bool isManual,
- @Default(0.0) @JsonKey(name: 'amount') double amount,
- @Default(0.0) @JsonKey(name: 'applied') double applied,
- @Default(0.0) @JsonKey(name: 'refunded') double refunded,
- @Default(0.0) @JsonKey(name: 'company_gateway_id') double companyGatewayId,
- @Default(<Paymentable>[]) @JsonKey(name: 'paymentables') List<
Paymentable> paymentables, - @Default(<Paymentable>[]) @JsonKey(name: 'invoices') List<
Paymentable> invoices, - @Default(<Paymentable>[]) @JsonKey(name: 'credits') List<
Paymentable> credits, - @Default(<Document>[]) List<
Document> documents,
Payment factory constructor
Implementation
@JsonSerializable(explicitToJson: true)
factory Payment({
@Default('') String id,
@Default('') @JsonKey(name: 'user_id') String createdById,
@Default('') @JsonKey(name: 'assigned_user_id') String assignedToId,
@Default(0) @JsonKey(name: 'created_at') int createdAt,
@Default(0) @JsonKey(name: 'updated_at') int updatedAt,
@Default(0) @JsonKey(name: 'archived_at') int archivedAt,
@Default(false) @JsonKey(name: 'is_deleted') bool isDeleted,
@Default('') @JsonKey(name: 'custom_value1') String customValue1,
@Default('') @JsonKey(name: 'custom_value2') String customValue2,
@Default('') @JsonKey(name: 'custom_value3') String customValue3,
@Default('') @JsonKey(name: 'custom_value4') String customValue4,
@Default('') @JsonKey(name: 'client_id') String clientId,
@Default('') @JsonKey(name: 'invitation_id') String invitationId,
@Default('') @JsonKey(name: 'client_contact_id') String clientContactId,
@Default('') @JsonKey(name: 'type_id') String typeId,
@Default('') @JsonKey(name: 'date') String date,
@Default('')
@JsonKey(name: 'transaction_reference')
String transactionReference,
@Default('') @JsonKey(name: 'private_notes') String privateNotes,
@Default(false) @JsonKey(name: 'is_manual') bool isManual,
@Default(0.0) @JsonKey(name: 'amount') double amount,
@Default(0.0) @JsonKey(name: 'applied') double applied,
@Default(0.0) @JsonKey(name: 'refunded') double refunded,
@Default(0.0) @JsonKey(name: 'company_gateway_id') double companyGatewayId,
@Default(<Paymentable>[])
@JsonKey(name: 'paymentables')
List<Paymentable> paymentables,
@Default(<Paymentable>[])
@JsonKey(name: 'invoices')
List<Paymentable> invoices,
@Default(<Paymentable>[])
@JsonKey(name: 'credits')
List<Paymentable> credits,
@Default(<Document>[]) List<Document> documents,
}) = _Payment;