exDate should always be optional
This commit is contained in:
parent
62645eec96
commit
b8e47fce4b
|
@ -89,7 +89,7 @@ pub struct DomainCreateResponseData {
|
||||||
pub created_at: StringValue,
|
pub created_at: StringValue,
|
||||||
/// The expiry date
|
/// The expiry date
|
||||||
#[serde(rename = "exDate")]
|
#[serde(rename = "exDate")]
|
||||||
pub expiring_at: StringValue,
|
pub expiring_at: Option<StringValue>,
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Type that represents the <resData> tag for domain create response
|
/// Type that represents the <resData> tag for domain create response
|
||||||
|
@ -250,7 +250,7 @@ mod tests {
|
||||||
"2021-07-25T18:11:35.0Z".into()
|
"2021-07-25T18:11:35.0Z".into()
|
||||||
);
|
);
|
||||||
assert_eq!(
|
assert_eq!(
|
||||||
result.create_data.expiring_at,
|
*result.create_data.expiring_at.as_ref().unwrap(),
|
||||||
"2022-07-25T18:11:34.0Z".into()
|
"2022-07-25T18:11:34.0Z".into()
|
||||||
);
|
);
|
||||||
assert_eq!(object.tr_ids.client_tr_id.unwrap(), CLTRID.into());
|
assert_eq!(object.tr_ids.client_tr_id.unwrap(), CLTRID.into());
|
||||||
|
|
|
@ -63,7 +63,7 @@ pub struct DomainRenewResponseData {
|
||||||
pub name: StringValue,
|
pub name: StringValue,
|
||||||
/// The new expiry date after renewal
|
/// The new expiry date after renewal
|
||||||
#[serde(rename = "exDate")]
|
#[serde(rename = "exDate")]
|
||||||
pub expiring_at: StringValue,
|
pub expiring_at: Option<StringValue>,
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Type that represents the <resData> tag for domain renew response
|
/// Type that represents the <resData> tag for domain renew response
|
||||||
|
@ -108,7 +108,7 @@ mod tests {
|
||||||
assert_eq!(object.result.message, SUCCESS_MSG.into());
|
assert_eq!(object.result.message, SUCCESS_MSG.into());
|
||||||
assert_eq!(result.renew_data.name, "eppdev-1.com".into());
|
assert_eq!(result.renew_data.name, "eppdev-1.com".into());
|
||||||
assert_eq!(
|
assert_eq!(
|
||||||
result.renew_data.expiring_at,
|
*result.renew_data.expiring_at.as_ref().unwrap(),
|
||||||
"2024-07-23T15:31:20.0Z".into()
|
"2024-07-23T15:31:20.0Z".into()
|
||||||
);
|
);
|
||||||
assert_eq!(object.tr_ids.client_tr_id.unwrap(), CLTRID.into());
|
assert_eq!(object.tr_ids.client_tr_id.unwrap(), CLTRID.into());
|
||||||
|
|
|
@ -52,7 +52,7 @@ pub struct MessageDomainTransferData {
|
||||||
pub ack_by: StringValue,
|
pub ack_by: StringValue,
|
||||||
/// The domain expiry date
|
/// The domain expiry date
|
||||||
#[serde(rename = "domain:exDate", alias = "exDate")]
|
#[serde(rename = "domain:exDate", alias = "exDate")]
|
||||||
pub expiring_at: StringValue,
|
pub expiring_at: Option<StringValue>,
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Type that represents the <resData> tag for message poll response
|
/// Type that represents the <resData> tag for message poll response
|
||||||
|
@ -113,7 +113,7 @@ mod tests {
|
||||||
assert_eq!(result.message_data.ack_id, "ClientY".into());
|
assert_eq!(result.message_data.ack_id, "ClientY".into());
|
||||||
assert_eq!(result.message_data.ack_by, "2021-07-28T15:31:21.0Z".into());
|
assert_eq!(result.message_data.ack_by, "2021-07-28T15:31:21.0Z".into());
|
||||||
assert_eq!(
|
assert_eq!(
|
||||||
result.message_data.expiring_at,
|
*result.message_data.expiring_at.as_ref().unwrap(),
|
||||||
"2022-07-02T14:53:19.0Z".into()
|
"2022-07-02T14:53:19.0Z".into()
|
||||||
);
|
);
|
||||||
assert_eq!(object.tr_ids.client_tr_id.unwrap(), CLTRID.into());
|
assert_eq!(object.tr_ids.client_tr_id.unwrap(), CLTRID.into());
|
||||||
|
|
Loading…
Reference in New Issue