UpdateRequest.fromJson constructor

UpdateRequest.fromJson(
  1. Map<String, Object?> json
)

Implementation

factory UpdateRequest.fromJson(
  Map<String, Object?> json,
) =>
    UpdateRequest(
      expiresAt: json["expires_at"] == null
          ? null
          : decodeDateTime(json["expires_at"]),
      id: json["id"] == null ? null : json["id"] as String,
      quantity: json["quantity"] == null
          ? null
          : UpdateRequestQuantity.fromJson(
              (json["quantity"] as Map).cast<String, Object?>(),
            ),
      purchaseIntentId: json["purchase_intent_id"] == null
          ? null
          : json["purchase_intent_id"] as String,
      reactivate:
          json["reactivate"] == null ? null : json["reactivate"] as bool,
      presentation: json["presentation"] == null
          ? null
          : UpdatePresentation.fromJson(
              (json["presentation"] as Map).cast<String, Object?>(),
            ),
    );