PPOrderAddress constructor

  1. @JsonSerializable(fieldRename: FieldRename.snake)
const PPOrderAddress({
  1. @JsonKey(name: 'address_line_1') String? addressLine1,
  2. @JsonKey(name: 'address_line_2') String? addressLine2,
  3. @JsonKey(name: 'admin_area_1') String? adminArea1,
  4. @JsonKey(name: 'admin_area_2') String? adminArea2,
  5. String? postalCode,
  6. String? countryCode,
})

Implementation

@JsonSerializable(fieldRename: FieldRename.snake)
const factory PPOrderAddress({
  @JsonKey(name: 'address_line_1') String? addressLine1,
  @JsonKey(name: 'address_line_2') String? addressLine2,

  /// state or province like "CA" or "California"
  @JsonKey(name: 'admin_area_1') String? adminArea1,

  /// city like "San Francisco"
  @JsonKey(name: 'admin_area_2') String? adminArea2,
  String? postalCode,
  String? countryCode,
}) = _PPOrderAddress;