Refactor domain transfer models
This commit is contained in:
parent
8fe9e8bbeb
commit
c5dfdd85b6
|
@ -3,3 +3,4 @@ pub mod create;
|
||||||
pub mod delete;
|
pub mod delete;
|
||||||
pub mod info;
|
pub mod info;
|
||||||
pub mod renew;
|
pub mod renew;
|
||||||
|
pub mod transfer;
|
||||||
|
|
|
@ -5,6 +5,7 @@ use epp_client_macros::*;
|
||||||
use crate::epp::object::data::{DomainAuthInfo, Period};
|
use crate::epp::object::data::{DomainAuthInfo, Period};
|
||||||
use crate::epp::object::{ElementName, EppObject, StringValue};
|
use crate::epp::object::{ElementName, EppObject, StringValue};
|
||||||
use crate::epp::request::Command;
|
use crate::epp::request::Command;
|
||||||
|
use crate::epp::response::{CommandResponse, EppCommandResponse};
|
||||||
use crate::epp::xml::EPP_DOMAIN_XMLNS;
|
use crate::epp::xml::EPP_DOMAIN_XMLNS;
|
||||||
use serde::{Deserialize, Serialize};
|
use serde::{Deserialize, Serialize};
|
||||||
|
|
||||||
|
@ -17,7 +18,7 @@ use serde::{Deserialize, Serialize};
|
||||||
///
|
///
|
||||||
/// use epp_client::config::{EppClientConfig, EppClientConnection};
|
/// use epp_client::config::{EppClientConfig, EppClientConnection};
|
||||||
/// use epp_client::EppClient;
|
/// use epp_client::EppClient;
|
||||||
/// use epp_client::epp::{EppDomainTransferRequest, EppDomainTransferRequestResponse};
|
/// use epp_client::domain::transfer::{EppDomainTransferRequest, EppDomainTransferRequestResponse};
|
||||||
/// use epp_client::epp::generate_client_tr_id;
|
/// use epp_client::epp::generate_client_tr_id;
|
||||||
///
|
///
|
||||||
/// #[tokio::main]
|
/// #[tokio::main]
|
||||||
|
@ -56,7 +57,7 @@ use serde::{Deserialize, Serialize};
|
||||||
/// client.logout().await.unwrap();
|
/// client.logout().await.unwrap();
|
||||||
/// }
|
/// }
|
||||||
/// ```
|
/// ```
|
||||||
pub type EppDomainTransferRequest = EppObject<Command<DomainTransfer>>;
|
pub type EppDomainTransferRequest = EppObject<Command<DomainTransferRequest>>;
|
||||||
|
|
||||||
/// Type that represents the <epp> request for transfer approval for domains
|
/// Type that represents the <epp> request for transfer approval for domains
|
||||||
///
|
///
|
||||||
|
@ -67,7 +68,7 @@ pub type EppDomainTransferRequest = EppObject<Command<DomainTransfer>>;
|
||||||
///
|
///
|
||||||
/// use epp_client::config::{EppClientConfig, EppClientConnection};
|
/// use epp_client::config::{EppClientConfig, EppClientConnection};
|
||||||
/// use epp_client::EppClient;
|
/// use epp_client::EppClient;
|
||||||
/// use epp_client::epp::{EppDomainTransferApprove, EppDomainTransferApproveResponse};
|
/// use epp_client::domain::transfer::{EppDomainTransferApprove, EppDomainTransferApproveResponse};
|
||||||
/// use epp_client::epp::generate_client_tr_id;
|
/// use epp_client::epp::generate_client_tr_id;
|
||||||
///
|
///
|
||||||
/// #[tokio::main]
|
/// #[tokio::main]
|
||||||
|
@ -106,7 +107,7 @@ pub type EppDomainTransferRequest = EppObject<Command<DomainTransfer>>;
|
||||||
/// client.logout().await.unwrap();
|
/// client.logout().await.unwrap();
|
||||||
/// }
|
/// }
|
||||||
/// ```
|
/// ```
|
||||||
pub type EppDomainTransferApprove = EppObject<Command<DomainTransfer>>;
|
pub type EppDomainTransferApprove = EppObject<Command<DomainTransferRequest>>;
|
||||||
|
|
||||||
/// Type that represents the <epp> request for transfer rejection for domains
|
/// Type that represents the <epp> request for transfer rejection for domains
|
||||||
///
|
///
|
||||||
|
@ -117,7 +118,7 @@ pub type EppDomainTransferApprove = EppObject<Command<DomainTransfer>>;
|
||||||
///
|
///
|
||||||
/// use epp_client::config::{EppClientConfig, EppClientConnection};
|
/// use epp_client::config::{EppClientConfig, EppClientConnection};
|
||||||
/// use epp_client::EppClient;
|
/// use epp_client::EppClient;
|
||||||
/// use epp_client::epp::{EppDomainTransferReject, EppDomainTransferRejectResponse};
|
/// use epp_client::domain::transfer::{EppDomainTransferReject, EppDomainTransferRejectResponse};
|
||||||
/// use epp_client::epp::generate_client_tr_id;
|
/// use epp_client::epp::generate_client_tr_id;
|
||||||
///
|
///
|
||||||
/// #[tokio::main]
|
/// #[tokio::main]
|
||||||
|
@ -156,7 +157,7 @@ pub type EppDomainTransferApprove = EppObject<Command<DomainTransfer>>;
|
||||||
/// client.logout().await.unwrap();
|
/// client.logout().await.unwrap();
|
||||||
/// }
|
/// }
|
||||||
/// ```
|
/// ```
|
||||||
pub type EppDomainTransferReject = EppObject<Command<DomainTransfer>>;
|
pub type EppDomainTransferReject = EppObject<Command<DomainTransferRequest>>;
|
||||||
|
|
||||||
/// Type that represents the <epp> request for transfer request cancellation for domains
|
/// Type that represents the <epp> request for transfer request cancellation for domains
|
||||||
///
|
///
|
||||||
|
@ -167,7 +168,7 @@ pub type EppDomainTransferReject = EppObject<Command<DomainTransfer>>;
|
||||||
///
|
///
|
||||||
/// use epp_client::config::{EppClientConfig, EppClientConnection};
|
/// use epp_client::config::{EppClientConfig, EppClientConnection};
|
||||||
/// use epp_client::EppClient;
|
/// use epp_client::EppClient;
|
||||||
/// use epp_client::epp::{EppDomainTransferCancel, EppDomainTransferCancelResponse};
|
/// use epp_client::domain::transfer::{EppDomainTransferCancel, EppDomainTransferCancelResponse};
|
||||||
/// use epp_client::epp::generate_client_tr_id;
|
/// use epp_client::epp::generate_client_tr_id;
|
||||||
///
|
///
|
||||||
/// #[tokio::main]
|
/// #[tokio::main]
|
||||||
|
@ -206,7 +207,7 @@ pub type EppDomainTransferReject = EppObject<Command<DomainTransfer>>;
|
||||||
/// client.logout().await.unwrap();
|
/// client.logout().await.unwrap();
|
||||||
/// }
|
/// }
|
||||||
/// ```
|
/// ```
|
||||||
pub type EppDomainTransferCancel = EppObject<Command<DomainTransfer>>;
|
pub type EppDomainTransferCancel = EppObject<Command<DomainTransferRequest>>;
|
||||||
|
|
||||||
/// Type that represents the <epp> request for transfer request query for domains
|
/// Type that represents the <epp> request for transfer request query for domains
|
||||||
///
|
///
|
||||||
|
@ -217,7 +218,7 @@ pub type EppDomainTransferCancel = EppObject<Command<DomainTransfer>>;
|
||||||
///
|
///
|
||||||
/// use epp_client::config::{EppClientConfig, EppClientConnection};
|
/// use epp_client::config::{EppClientConfig, EppClientConnection};
|
||||||
/// use epp_client::EppClient;
|
/// use epp_client::EppClient;
|
||||||
/// use epp_client::epp::{EppDomainTransferQuery, EppDomainTransferQueryResponse};
|
/// use epp_client::domain::transfer::{EppDomainTransferQuery, EppDomainTransferQueryResponse};
|
||||||
/// use epp_client::epp::generate_client_tr_id;
|
/// use epp_client::epp::generate_client_tr_id;
|
||||||
///
|
///
|
||||||
/// #[tokio::main]
|
/// #[tokio::main]
|
||||||
|
@ -256,39 +257,7 @@ pub type EppDomainTransferCancel = EppObject<Command<DomainTransfer>>;
|
||||||
/// client.logout().await.unwrap();
|
/// client.logout().await.unwrap();
|
||||||
/// }
|
/// }
|
||||||
/// ```
|
/// ```
|
||||||
pub type EppDomainTransferQuery = EppObject<Command<DomainTransfer>>;
|
pub type EppDomainTransferQuery = EppObject<Command<DomainTransferRequest>>;
|
||||||
|
|
||||||
/// Type for elements under the domain <transfer> tag
|
|
||||||
#[derive(Serialize, Deserialize, Debug)]
|
|
||||||
pub struct DomainTransferData {
|
|
||||||
/// XML namespace for domain commands
|
|
||||||
#[serde(rename = "xmlns:domain")]
|
|
||||||
xmlns: String,
|
|
||||||
/// The name of the domain under transfer
|
|
||||||
#[serde(rename = "domain:name")]
|
|
||||||
name: StringValue,
|
|
||||||
/// The period of renewal upon a successful transfer
|
|
||||||
/// Only applicable in case of a transfer request
|
|
||||||
#[serde(rename = "domain:period")]
|
|
||||||
period: Option<Period>,
|
|
||||||
/// The authInfo for the domain under transfer
|
|
||||||
/// Only applicable to domain transfer and domain transfer query requests
|
|
||||||
#[serde(rename = "domain:authInfo")]
|
|
||||||
auth_info: Option<DomainAuthInfo>,
|
|
||||||
}
|
|
||||||
|
|
||||||
#[derive(Serialize, Deserialize, Debug, ElementName)]
|
|
||||||
#[element_name(name = "transfer")]
|
|
||||||
/// Type for EPP XML <transfer> command for domains
|
|
||||||
pub struct DomainTransfer {
|
|
||||||
/// The transfer operation to perform indicated by the 'op' attr
|
|
||||||
/// The values are one of transfer, approve, reject, cancel, or query
|
|
||||||
#[serde(rename = "op")]
|
|
||||||
operation: String,
|
|
||||||
/// The data under the <transfer> tag in the transfer request
|
|
||||||
#[serde(rename = "domain:transfer")]
|
|
||||||
domain: DomainTransferData,
|
|
||||||
}
|
|
||||||
|
|
||||||
impl EppDomainTransferRequest {
|
impl EppDomainTransferRequest {
|
||||||
/// Creates a new EppObject for domain transfer request corresponding to the <epp> tag in EPP XML
|
/// Creates a new EppObject for domain transfer request corresponding to the <epp> tag in EPP XML
|
||||||
|
@ -298,10 +267,10 @@ impl EppDomainTransferRequest {
|
||||||
auth_password: &str,
|
auth_password: &str,
|
||||||
client_tr_id: &str,
|
client_tr_id: &str,
|
||||||
) -> EppDomainTransferRequest {
|
) -> EppDomainTransferRequest {
|
||||||
EppObject::build(Command::<DomainTransfer>::new(
|
EppObject::build(Command::<DomainTransferRequest>::new(
|
||||||
DomainTransfer {
|
DomainTransferRequest {
|
||||||
operation: "request".to_string(),
|
operation: "request".to_string(),
|
||||||
domain: DomainTransferData {
|
domain: DomainTransferRequestData {
|
||||||
xmlns: EPP_DOMAIN_XMLNS.to_string(),
|
xmlns: EPP_DOMAIN_XMLNS.to_string(),
|
||||||
name: name.into(),
|
name: name.into(),
|
||||||
period: Some(Period::new(years)),
|
period: Some(Period::new(years)),
|
||||||
|
@ -321,10 +290,10 @@ impl EppDomainTransferRequest {
|
||||||
impl EppDomainTransferApprove {
|
impl EppDomainTransferApprove {
|
||||||
/// Creates a new EppObject for domain transfer approval corresponding to the <epp> tag in EPP XML
|
/// Creates a new EppObject for domain transfer approval corresponding to the <epp> tag in EPP XML
|
||||||
pub fn approve(name: &str, client_tr_id: &str) -> EppDomainTransferApprove {
|
pub fn approve(name: &str, client_tr_id: &str) -> EppDomainTransferApprove {
|
||||||
EppObject::build(Command::<DomainTransfer>::new(
|
EppObject::build(Command::<DomainTransferRequest>::new(
|
||||||
DomainTransfer {
|
DomainTransferRequest {
|
||||||
operation: "approve".to_string(),
|
operation: "approve".to_string(),
|
||||||
domain: DomainTransferData {
|
domain: DomainTransferRequestData {
|
||||||
xmlns: EPP_DOMAIN_XMLNS.to_string(),
|
xmlns: EPP_DOMAIN_XMLNS.to_string(),
|
||||||
name: name.into(),
|
name: name.into(),
|
||||||
period: None,
|
period: None,
|
||||||
|
@ -339,10 +308,10 @@ impl EppDomainTransferApprove {
|
||||||
impl EppDomainTransferCancel {
|
impl EppDomainTransferCancel {
|
||||||
/// Creates a new EppObject for domain transfer request cancellation corresponding to the <epp> tag in EPP XML
|
/// Creates a new EppObject for domain transfer request cancellation corresponding to the <epp> tag in EPP XML
|
||||||
pub fn cancel(name: &str, client_tr_id: &str) -> EppDomainTransferCancel {
|
pub fn cancel(name: &str, client_tr_id: &str) -> EppDomainTransferCancel {
|
||||||
EppObject::build(Command::<DomainTransfer>::new(
|
EppObject::build(Command::<DomainTransferRequest>::new(
|
||||||
DomainTransfer {
|
DomainTransferRequest {
|
||||||
operation: "cancel".to_string(),
|
operation: "cancel".to_string(),
|
||||||
domain: DomainTransferData {
|
domain: DomainTransferRequestData {
|
||||||
xmlns: EPP_DOMAIN_XMLNS.to_string(),
|
xmlns: EPP_DOMAIN_XMLNS.to_string(),
|
||||||
name: name.into(),
|
name: name.into(),
|
||||||
period: None,
|
period: None,
|
||||||
|
@ -357,10 +326,10 @@ impl EppDomainTransferCancel {
|
||||||
impl EppDomainTransferReject {
|
impl EppDomainTransferReject {
|
||||||
/// Creates a new EppObject for domain transfer rejection corresponding to the <epp> tag in EPP XML
|
/// Creates a new EppObject for domain transfer rejection corresponding to the <epp> tag in EPP XML
|
||||||
pub fn reject(name: &str, client_tr_id: &str) -> EppDomainTransferReject {
|
pub fn reject(name: &str, client_tr_id: &str) -> EppDomainTransferReject {
|
||||||
EppObject::build(Command::<DomainTransfer>::new(
|
EppObject::build(Command::<DomainTransferRequest>::new(
|
||||||
DomainTransfer {
|
DomainTransferRequest {
|
||||||
operation: "reject".to_string(),
|
operation: "reject".to_string(),
|
||||||
domain: DomainTransferData {
|
domain: DomainTransferRequestData {
|
||||||
xmlns: EPP_DOMAIN_XMLNS.to_string(),
|
xmlns: EPP_DOMAIN_XMLNS.to_string(),
|
||||||
name: name.into(),
|
name: name.into(),
|
||||||
period: None,
|
period: None,
|
||||||
|
@ -375,10 +344,10 @@ impl EppDomainTransferReject {
|
||||||
impl EppDomainTransferQuery {
|
impl EppDomainTransferQuery {
|
||||||
/// Creates a new EppObject for domain transfer request query corresponding to the <epp> tag in EPP XML
|
/// Creates a new EppObject for domain transfer request query corresponding to the <epp> tag in EPP XML
|
||||||
pub fn query(name: &str, auth_password: &str, client_tr_id: &str) -> EppDomainTransferQuery {
|
pub fn query(name: &str, auth_password: &str, client_tr_id: &str) -> EppDomainTransferQuery {
|
||||||
EppObject::build(Command::<DomainTransfer>::new(
|
EppObject::build(Command::<DomainTransferRequest>::new(
|
||||||
DomainTransfer {
|
DomainTransferRequest {
|
||||||
operation: "query".to_string(),
|
operation: "query".to_string(),
|
||||||
domain: DomainTransferData {
|
domain: DomainTransferRequestData {
|
||||||
xmlns: EPP_DOMAIN_XMLNS.to_string(),
|
xmlns: EPP_DOMAIN_XMLNS.to_string(),
|
||||||
name: name.into(),
|
name: name.into(),
|
||||||
period: None,
|
period: None,
|
||||||
|
@ -389,3 +358,86 @@ impl EppDomainTransferQuery {
|
||||||
))
|
))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// Type that represents the <epp> tag for the EPP XML domain transfer request response
|
||||||
|
pub type EppDomainTransferRequestResponse = EppObject<CommandResponse<DomainTransferResponse>>;
|
||||||
|
/// Type that represents the <epp> tag for the EPP XML domain transfer approval response
|
||||||
|
pub type EppDomainTransferApproveResponse = EppCommandResponse;
|
||||||
|
/// Type that represents the <epp> tag for the EPP XML domain transfer rejection response
|
||||||
|
pub type EppDomainTransferRejectResponse = EppCommandResponse;
|
||||||
|
/// Type that represents the <epp> tag for the EPP XML domain transfer cancellation response
|
||||||
|
pub type EppDomainTransferCancelResponse = EppCommandResponse;
|
||||||
|
/// Type that represents the <epp> tag for the EPP XML domain transfer query response
|
||||||
|
pub type EppDomainTransferQueryResponse = EppObject<CommandResponse<DomainTransferResponse>>;
|
||||||
|
|
||||||
|
// Request
|
||||||
|
|
||||||
|
/// Type for elements under the domain <transfer> tag
|
||||||
|
#[derive(Serialize, Deserialize, Debug)]
|
||||||
|
pub struct DomainTransferRequestData {
|
||||||
|
/// XML namespace for domain commands
|
||||||
|
#[serde(rename = "xmlns:domain")]
|
||||||
|
xmlns: String,
|
||||||
|
/// The name of the domain under transfer
|
||||||
|
#[serde(rename = "domain:name")]
|
||||||
|
name: StringValue,
|
||||||
|
/// The period of renewal upon a successful transfer
|
||||||
|
/// Only applicable in case of a transfer request
|
||||||
|
#[serde(rename = "domain:period")]
|
||||||
|
period: Option<Period>,
|
||||||
|
/// The authInfo for the domain under transfer
|
||||||
|
/// Only applicable to domain transfer and domain transfer query requests
|
||||||
|
#[serde(rename = "domain:authInfo")]
|
||||||
|
auth_info: Option<DomainAuthInfo>,
|
||||||
|
}
|
||||||
|
|
||||||
|
#[derive(Serialize, Deserialize, Debug, ElementName)]
|
||||||
|
#[element_name(name = "transfer")]
|
||||||
|
/// Type for EPP XML <transfer> command for domains
|
||||||
|
pub struct DomainTransferRequest {
|
||||||
|
/// The transfer operation to perform indicated by the 'op' attr
|
||||||
|
/// The values are one of transfer, approve, reject, cancel, or query
|
||||||
|
#[serde(rename = "op")]
|
||||||
|
operation: String,
|
||||||
|
/// The data under the <transfer> tag in the transfer request
|
||||||
|
#[serde(rename = "domain:transfer")]
|
||||||
|
domain: DomainTransferRequestData,
|
||||||
|
}
|
||||||
|
|
||||||
|
// Response
|
||||||
|
|
||||||
|
/// Type that represents the <trnData> tag for domain transfer response
|
||||||
|
#[derive(Serialize, Deserialize, Debug)]
|
||||||
|
pub struct DomainTransferResponseData {
|
||||||
|
/// XML namespace for domain response data
|
||||||
|
#[serde(rename = "xmlns:domain")]
|
||||||
|
xmlns: String,
|
||||||
|
/// The domain name
|
||||||
|
pub name: StringValue,
|
||||||
|
/// The domain transfer status
|
||||||
|
#[serde(rename = "trStatus")]
|
||||||
|
pub transfer_status: StringValue,
|
||||||
|
/// The epp user who requested the transfer
|
||||||
|
#[serde(rename = "reID")]
|
||||||
|
pub requester_id: StringValue,
|
||||||
|
/// The transfer rquest date
|
||||||
|
#[serde(rename = "reDate")]
|
||||||
|
pub requested_at: StringValue,
|
||||||
|
/// The epp user who should acknowledge the transfer request
|
||||||
|
#[serde(rename = "acID")]
|
||||||
|
pub ack_id: StringValue,
|
||||||
|
/// THe date by which the acknowledgment should be made
|
||||||
|
#[serde(rename = "acDate")]
|
||||||
|
pub ack_by: StringValue,
|
||||||
|
/// The domain expiry date
|
||||||
|
#[serde(rename = "exDate")]
|
||||||
|
pub expiring_at: StringValue,
|
||||||
|
}
|
||||||
|
|
||||||
|
/// Type that represents the <resData> tag for domain transfer response
|
||||||
|
#[derive(Serialize, Deserialize, Debug)]
|
||||||
|
pub struct DomainTransferResponse {
|
||||||
|
/// Data under the <trnData> tag
|
||||||
|
#[serde(rename = "trnData")]
|
||||||
|
pub transfer_data: DomainTransferResponseData,
|
||||||
|
}
|
|
@ -12,7 +12,6 @@ pub use request::contact::info::*;
|
||||||
pub use request::contact::update::*;
|
pub use request::contact::update::*;
|
||||||
pub use request::domain::rgp::report::*;
|
pub use request::domain::rgp::report::*;
|
||||||
pub use request::domain::rgp::request::*;
|
pub use request::domain::rgp::request::*;
|
||||||
pub use request::domain::transfer::*;
|
|
||||||
pub use request::domain::update::*;
|
pub use request::domain::update::*;
|
||||||
pub use request::host::check::*;
|
pub use request::host::check::*;
|
||||||
pub use request::host::create::*;
|
pub use request::host::create::*;
|
||||||
|
@ -29,7 +28,6 @@ pub use response::contact::info::*;
|
||||||
pub use response::contact::update::*;
|
pub use response::contact::update::*;
|
||||||
pub use response::domain::rgp::report::*;
|
pub use response::domain::rgp::report::*;
|
||||||
pub use response::domain::rgp::request::*;
|
pub use response::domain::rgp::request::*;
|
||||||
pub use response::domain::transfer::*;
|
|
||||||
pub use response::domain::update::*;
|
pub use response::domain::update::*;
|
||||||
pub use response::host::check::*;
|
pub use response::host::check::*;
|
||||||
pub use response::host::create::*;
|
pub use response::host::create::*;
|
||||||
|
|
|
@ -1,5 +1,4 @@
|
||||||
//! Types for EPP domain requests
|
//! Types for EPP domain requests
|
||||||
|
|
||||||
pub mod rgp;
|
pub mod rgp;
|
||||||
pub mod transfer;
|
|
||||||
pub mod update;
|
pub mod update;
|
||||||
|
|
|
@ -1,5 +1,4 @@
|
||||||
//! Types for EPP domain responses
|
//! Types for EPP domain responses
|
||||||
|
|
||||||
pub mod rgp;
|
pub mod rgp;
|
||||||
pub mod transfer;
|
|
||||||
pub mod update;
|
pub mod update;
|
||||||
|
|
|
@ -1,53 +0,0 @@
|
||||||
//! Types for EPP domain transfer response
|
|
||||||
use serde::{Deserialize, Serialize};
|
|
||||||
|
|
||||||
use crate::epp::object::{EppObject, StringValue};
|
|
||||||
use crate::epp::response::CommandResponse;
|
|
||||||
use crate::epp::response::EppCommandResponse;
|
|
||||||
|
|
||||||
/// Type that represents the <epp> tag for the EPP XML domain transfer request response
|
|
||||||
pub type EppDomainTransferRequestResponse = EppObject<CommandResponse<DomainTransferResult>>;
|
|
||||||
/// Type that represents the <epp> tag for the EPP XML domain transfer approval response
|
|
||||||
pub type EppDomainTransferApproveResponse = EppCommandResponse;
|
|
||||||
/// Type that represents the <epp> tag for the EPP XML domain transfer rejection response
|
|
||||||
pub type EppDomainTransferRejectResponse = EppCommandResponse;
|
|
||||||
/// Type that represents the <epp> tag for the EPP XML domain transfer cancellation response
|
|
||||||
pub type EppDomainTransferCancelResponse = EppCommandResponse;
|
|
||||||
/// Type that represents the <epp> tag for the EPP XML domain transfer query response
|
|
||||||
pub type EppDomainTransferQueryResponse = EppObject<CommandResponse<DomainTransferResult>>;
|
|
||||||
|
|
||||||
/// Type that represents the <trnData> tag for domain transfer response
|
|
||||||
#[derive(Serialize, Deserialize, Debug)]
|
|
||||||
pub struct DomainTransferData {
|
|
||||||
/// XML namespace for domain response data
|
|
||||||
#[serde(rename = "xmlns:domain")]
|
|
||||||
xmlns: String,
|
|
||||||
/// The domain name
|
|
||||||
pub name: StringValue,
|
|
||||||
/// The domain transfer status
|
|
||||||
#[serde(rename = "trStatus")]
|
|
||||||
pub transfer_status: StringValue,
|
|
||||||
/// The epp user who requested the transfer
|
|
||||||
#[serde(rename = "reID")]
|
|
||||||
pub requester_id: StringValue,
|
|
||||||
/// The transfer rquest date
|
|
||||||
#[serde(rename = "reDate")]
|
|
||||||
pub requested_at: StringValue,
|
|
||||||
/// The epp user who should acknowledge the transfer request
|
|
||||||
#[serde(rename = "acID")]
|
|
||||||
pub ack_id: StringValue,
|
|
||||||
/// THe date by which the acknowledgment should be made
|
|
||||||
#[serde(rename = "acDate")]
|
|
||||||
pub ack_by: StringValue,
|
|
||||||
/// The domain expiry date
|
|
||||||
#[serde(rename = "exDate")]
|
|
||||||
pub expiring_at: StringValue,
|
|
||||||
}
|
|
||||||
|
|
||||||
/// Type that represents the <resData> tag for domain transfer response
|
|
||||||
#[derive(Serialize, Deserialize, Debug)]
|
|
||||||
pub struct DomainTransferResult {
|
|
||||||
/// Data under the <trnData> tag
|
|
||||||
#[serde(rename = "trnData")]
|
|
||||||
pub transfer_data: DomainTransferData,
|
|
||||||
}
|
|
|
@ -8,6 +8,11 @@ mod response {
|
||||||
use crate::domain::delete::EppDomainDeleteResponse;
|
use crate::domain::delete::EppDomainDeleteResponse;
|
||||||
use crate::domain::info::EppDomainInfoResponse;
|
use crate::domain::info::EppDomainInfoResponse;
|
||||||
use crate::domain::renew::EppDomainRenewResponse;
|
use crate::domain::renew::EppDomainRenewResponse;
|
||||||
|
use crate::domain::transfer::EppDomainTransferApproveResponse;
|
||||||
|
use crate::domain::transfer::EppDomainTransferCancelResponse;
|
||||||
|
use crate::domain::transfer::EppDomainTransferQueryResponse;
|
||||||
|
use crate::domain::transfer::EppDomainTransferRejectResponse;
|
||||||
|
use crate::domain::transfer::EppDomainTransferRequestResponse;
|
||||||
use crate::epp::response::ExpiryType;
|
use crate::epp::response::ExpiryType;
|
||||||
use crate::epp::response::Relative;
|
use crate::epp::response::Relative;
|
||||||
use crate::epp::response::{
|
use crate::epp::response::{
|
||||||
|
|
|
@ -8,6 +8,11 @@ mod request {
|
||||||
use crate::domain::delete::EppDomainDelete;
|
use crate::domain::delete::EppDomainDelete;
|
||||||
use crate::domain::info::EppDomainInfo;
|
use crate::domain::info::EppDomainInfo;
|
||||||
use crate::domain::renew::EppDomainRenew;
|
use crate::domain::renew::EppDomainRenew;
|
||||||
|
use crate::domain::transfer::EppDomainTransferApprove;
|
||||||
|
use crate::domain::transfer::EppDomainTransferCancel;
|
||||||
|
use crate::domain::transfer::EppDomainTransferQuery;
|
||||||
|
use crate::domain::transfer::EppDomainTransferReject;
|
||||||
|
use crate::domain::transfer::EppDomainTransferRequest;
|
||||||
use crate::epp::object::data::{
|
use crate::epp::object::data::{
|
||||||
Address, ContactStatus, DomainAuthInfo, DomainContact, DomainStatus, HostAddr, HostAttr,
|
Address, ContactStatus, DomainAuthInfo, DomainContact, DomainStatus, HostAddr, HostAttr,
|
||||||
HostStatus, Phone, PostalInfo,
|
HostStatus, Phone, PostalInfo,
|
||||||
|
|
Loading…
Reference in New Issue