Paymentable constructor

  1. @JsonSerializable(explicitToJson: true)
Paymentable({
  1. @Default('') String id,
  2. @Default('') @JsonKey(name: 'invoice_id') String invoiceId,
  3. @Default('') @JsonKey(name: 'credit_id') String creditId,
  4. @Default(0) double amount,
  5. @Default(0) double refunded,
  6. @Default(0) @JsonKey(name: 'created_at') int createdAt,
  7. @Default(0) @JsonKey(name: 'updated_at') int updatedAt,
})

Paymentable factory constructor

Implementation

@JsonSerializable(explicitToJson: true)
factory Paymentable({
  @Default('') String id,
  @Default('') @JsonKey(name: 'invoice_id') String invoiceId,
  @Default('') @JsonKey(name: 'credit_id') String creditId,
  @Default(0) double amount,
  @Default(0) double refunded,
  @Default(0) @JsonKey(name: 'created_at') int createdAt,
  @Default(0) @JsonKey(name: 'updated_at') int updatedAt,
}) = _Paymentable;