MailingAddress constructor

const MailingAddress({
  1. required String id,
  2. @JsonKey.new(defaultValue: '') required String address1,
  3. @JsonKey.new(defaultValue: '') required String city,
  4. @JsonKey.new(defaultValue: '') required String country,
  5. String? zip,
  6. String? lastName,
  7. String? name,
  8. String? firstName,
  9. String? address2,
  10. String? company,
  11. String? countryCodeV2,
  12. String? formattedArea,
  13. double? latitude,
  14. double? longitude,
  15. String? phone,
  16. String? province,
  17. String? provinceCode,
})

The mailing address constructor

Implementation

const factory MailingAddress({
  required String id,

  /// Nullable on the Storefront API; empty string when absent.
  @JsonKey(defaultValue: '') required String address1,

  /// Nullable on the Storefront API; empty string when absent.
  @JsonKey(defaultValue: '') required String city,

  /// Nullable on the Storefront API; empty string when absent.
  @JsonKey(defaultValue: '') required String country,
  String? zip,
  String? lastName,
  String? name,
  String? firstName,
  String? address2,
  String? company,
  String? countryCodeV2,
  String? formattedArea,
  double? latitude,
  double? longitude,
  String? phone,
  String? province,
  String? provinceCode,
}) = _MailingAddress;