Client constructor

  1. @JsonSerializable(explicitToJson: true)
Client(
  1. {@Default('') String id,
  2. @Default('') @JsonKey(name: 'user_id') String createdById,
  3. @Default('') @JsonKey(name: 'assigned_user_id') String assignedToId,
  4. @Default(0) @JsonKey(name: 'created_at') int createdAt,
  5. @Default(0) @JsonKey(name: 'updated_at') int updatedAt,
  6. @Default(0) @JsonKey(name: 'archived_at') int archivedAt,
  7. @Default(false) @JsonKey(name: 'is_deleted') bool isDeleted,
  8. @Default('') @JsonKey(name: 'custom_value1') String customValue1,
  9. @Default('') @JsonKey(name: 'custom_value2') String customValue2,
  10. @Default('') @JsonKey(name: 'custom_value3') String customValue3,
  11. @Default('') @JsonKey(name: 'custom_value4') String customValue4,
  12. @Default('') String name,
  13. @Default('') String website,
  14. @Default('') @JsonKey(name: 'private_notes') String privateNotes,
  15. @Default(0) double balance,
  16. @Default('') @JsonKey(name: 'group_settings_id') String groupId,
  17. @Default(0) @JsonKey(name: 'paid_to_date') double paidToDate,
  18. @Default(0) @JsonKey(name: 'credit_balance') double creditBalance,
  19. @Default(0) @JsonKey(name: 'last_login') int lastLogin,
  20. @Default('') @JsonKey(name: 'size_id') String sizeId,
  21. @Default('') @JsonKey(name: 'public_notes') String publicNotes,
  22. @Default('') String phone,
  23. @Default('') String address1,
  24. @Default('') String address2,
  25. @Default('') String city,
  26. @Default('') String state,
  27. @Default('') @JsonKey(name: 'postal_code') String postalCode,
  28. @Default('') @JsonKey(name: 'country_id') String countryId,
  29. @Default('') @JsonKey(name: 'industry_id') String industryId,
  30. @Default('') @JsonKey(name: 'shipping_address1') String shippingAddress1,
  31. @Default('') @JsonKey(name: 'shipping_address2') String shippingAddress2,
  32. @Default('') @JsonKey(name: 'shipping_city') String shippingCity,
  33. @Default('') @JsonKey(name: 'shipping_state') String shippingState,
  34. @Default('') @JsonKey(name: 'shipping_postal_code') String shippingPostalCode,
  35. @Default('') @JsonKey(name: 'shipping_country_id') String shippingCountryId,
  36. ClientSettings settings,
  37. @Default('') @JsonKey(name: 'id_number') String idNumber,
  38. @Default('') @JsonKey(name: 'vat_number') String vatNumber,
  39. @Default(<ClientContact>[]) List<ClientContact> contacts}
)

Client factory constructor

Implementation

@JsonSerializable(explicitToJson: true)
factory Client({
  @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('') String name,
  @Default('') String website,
  @Default('') @JsonKey(name: 'private_notes') String privateNotes,
  @Default(0) double balance,
  @Default('') @JsonKey(name: 'group_settings_id') String groupId,
  @Default(0) @JsonKey(name: 'paid_to_date') double paidToDate,
  @Default(0) @JsonKey(name: 'credit_balance') double creditBalance,
  @Default(0) @JsonKey(name: 'last_login') int lastLogin,
  @Default('') @JsonKey(name: 'size_id') String sizeId,
  @Default('') @JsonKey(name: 'public_notes') String publicNotes,
  @Default('') String phone,
  @Default('') String address1,
  @Default('') String address2,
  @Default('') String city,
  @Default('') String state,
  @Default('') @JsonKey(name: 'postal_code') String postalCode,
  @Default('') @JsonKey(name: 'country_id') String countryId,
  @Default('') @JsonKey(name: 'industry_id') String industryId,
  @Default('') @JsonKey(name: 'shipping_address1') String shippingAddress1,
  @Default('') @JsonKey(name: 'shipping_address2') String shippingAddress2,
  @Default('') @JsonKey(name: 'shipping_city') String shippingCity,
  @Default('') @JsonKey(name: 'shipping_state') String shippingState,
  @Default('')
  @JsonKey(name: 'shipping_postal_code')
      String shippingPostalCode,
  @Default('') @JsonKey(name: 'shipping_country_id') String shippingCountryId,
  ClientSettings settings,
  @Default('') @JsonKey(name: 'id_number') String idNumber,
  @Default('') @JsonKey(name: 'vat_number') String vatNumber,
  @Default(<ClientContact>[]) List<ClientContact> contacts,
}) = _Client;