Align response type names with XML
This commit is contained in:
parent
6b2b9d1a7f
commit
844f84dbef
|
@ -10,7 +10,7 @@ use crate::request::{Command, Transaction};
|
|||
impl<'a> Transaction<NoExtension> for ContactCreate<'a> {}
|
||||
|
||||
impl<'a> Command for ContactCreate<'a> {
|
||||
type Response = ContactCreateData;
|
||||
type Response = CreateData;
|
||||
const COMMAND: &'static str = "create";
|
||||
}
|
||||
|
||||
|
@ -73,7 +73,7 @@ impl<'a> ContactCreate<'a> {
|
|||
/// Type that represents the <creData> tag for contact create response
|
||||
#[derive(Debug, FromXml)]
|
||||
#[xml(rename = "creData", ns(XMLNS))]
|
||||
pub struct ContactCreateData {
|
||||
pub struct CreateData {
|
||||
/// The contact id
|
||||
pub id: String,
|
||||
#[xml(rename = "crDate")]
|
||||
|
|
|
@ -10,7 +10,7 @@ use crate::request::{Command, Transaction};
|
|||
impl<'a> Transaction<NoExtension> for ContactInfo<'a> {}
|
||||
|
||||
impl<'a> Command for ContactInfo<'a> {
|
||||
type Response = ContactInfoData;
|
||||
type Response = InfoData;
|
||||
const COMMAND: &'static str = "info";
|
||||
}
|
||||
|
||||
|
@ -50,7 +50,7 @@ impl<'a> ContactInfo<'a> {
|
|||
/// Type that represents the <infData> tag for contact check response
|
||||
#[derive(Debug, FromXml)]
|
||||
#[xml(rename = "infData", ns(XMLNS))]
|
||||
pub struct ContactInfoData {
|
||||
pub struct InfoData {
|
||||
/// The contact id
|
||||
pub id: String,
|
||||
/// The contact ROID
|
||||
|
|
|
@ -10,7 +10,7 @@ use crate::request::{Command, Transaction};
|
|||
impl<'a> Transaction<NoExtension> for DomainCreate<'a> {}
|
||||
|
||||
impl<'a> Command for DomainCreate<'a> {
|
||||
type Response = DomainCreateResponse;
|
||||
type Response = CreateData;
|
||||
const COMMAND: &'static str = "create";
|
||||
}
|
||||
|
||||
|
@ -72,7 +72,7 @@ impl<'a> DomainCreate<'a> {
|
|||
/// Type that represents the <chkData> tag for domain create response
|
||||
#[derive(Debug, FromXml)]
|
||||
#[xml(rename = "creData", ns(XMLNS))]
|
||||
pub struct DomainCreateResponse {
|
||||
pub struct CreateData {
|
||||
/// The domain name
|
||||
pub name: String,
|
||||
/// The creation date
|
||||
|
|
|
@ -10,7 +10,7 @@ use crate::request::{Command, Transaction};
|
|||
impl<'a> Transaction<NoExtension> for DomainInfo<'a> {}
|
||||
|
||||
impl<'a> Command for DomainInfo<'a> {
|
||||
type Response = DomainInfoResponse;
|
||||
type Response = InfoData;
|
||||
const COMMAND: &'static str = "info";
|
||||
}
|
||||
|
||||
|
@ -75,7 +75,7 @@ pub struct DomainNsList {
|
|||
/// Type that represents the <infData> tag for domain info response
|
||||
#[derive(Debug, FromXml)]
|
||||
#[xml(rename = "infData", ns(XMLNS))]
|
||||
pub struct DomainInfoResponse {
|
||||
pub struct InfoData {
|
||||
/// The domain name
|
||||
pub name: String,
|
||||
/// The domain ROID
|
||||
|
|
|
@ -10,7 +10,7 @@ use crate::request::{Command, Transaction};
|
|||
impl<'a> Transaction<NoExtension> for DomainRenew<'a> {}
|
||||
|
||||
impl<'a> Command for DomainRenew<'a> {
|
||||
type Response = DomainRenewResponse;
|
||||
type Response = RenewData;
|
||||
const COMMAND: &'static str = "renew";
|
||||
}
|
||||
|
||||
|
@ -55,7 +55,7 @@ pub struct DomainRenew<'a> {
|
|||
/// Type that represents the <renData> tag for domain renew response
|
||||
#[derive(Debug, FromXml)]
|
||||
#[xml(rename = "renData", ns(XMLNS))]
|
||||
pub struct DomainRenewResponse {
|
||||
pub struct RenewData {
|
||||
/// The name of the domain
|
||||
pub name: String,
|
||||
/// The new expiry date after renewal
|
||||
|
|
|
@ -10,7 +10,7 @@ use crate::request::{Command, Transaction};
|
|||
impl<'a> Transaction<NoExtension> for DomainTransfer<'a> {}
|
||||
|
||||
impl<'a> Command for DomainTransfer<'a> {
|
||||
type Response = DomainTransferResponseData;
|
||||
type Response = TransferData;
|
||||
const COMMAND: &'static str = "transfer";
|
||||
}
|
||||
|
||||
|
@ -96,7 +96,7 @@ pub struct DomainTransfer<'a> {
|
|||
/// Type that represents the <trnData> tag for domain transfer response
|
||||
#[derive(Debug, FromXml)]
|
||||
#[xml(rename = "trnData", ns(XMLNS))]
|
||||
pub struct DomainTransferResponseData {
|
||||
pub struct TransferData {
|
||||
/// The domain name
|
||||
pub name: String,
|
||||
/// The domain transfer status
|
||||
|
|
|
@ -12,7 +12,7 @@ use crate::request::{Command, Transaction};
|
|||
impl<'a> Transaction<NoExtension> for HostCreate<'a> {}
|
||||
|
||||
impl<'a> Command for HostCreate<'a> {
|
||||
type Response = HostCreateData;
|
||||
type Response = CreateData;
|
||||
const COMMAND: &'static str = "create";
|
||||
}
|
||||
|
||||
|
@ -50,7 +50,7 @@ pub struct HostCreate<'a> {
|
|||
/// Type that represents the <creData> tag for host create response
|
||||
#[derive(Debug, FromXml)]
|
||||
#[xml(rename = "creData", ns(XMLNS))]
|
||||
pub struct HostCreateData {
|
||||
pub struct CreateData {
|
||||
/// The host name
|
||||
pub name: String,
|
||||
/// The host creation date
|
||||
|
|
|
@ -13,7 +13,7 @@ use crate::request::{Command, Transaction};
|
|||
impl<'a> Transaction<NoExtension> for HostInfo<'a> {}
|
||||
|
||||
impl<'a> Command for HostInfo<'a> {
|
||||
type Response = HostInfoResponseData;
|
||||
type Response = InfoData;
|
||||
const COMMAND: &'static str = "info";
|
||||
}
|
||||
|
||||
|
@ -49,7 +49,7 @@ pub struct HostInfo<'a> {
|
|||
/// Type that represents the <infData> tag for host info response
|
||||
#[derive(Debug, FromXml)]
|
||||
#[xml(rename = "infData", ns(XMLNS))]
|
||||
pub struct HostInfoResponseData {
|
||||
pub struct InfoData {
|
||||
/// The host name
|
||||
pub name: String,
|
||||
/// The host ROID
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
use instant_xml::{FromXml, ToXml};
|
||||
|
||||
use crate::common::{NoExtension, EPP_XMLNS};
|
||||
use crate::domain::transfer::DomainTransferResponseData;
|
||||
use crate::domain::transfer::TransferData;
|
||||
use crate::extensions::low_balance::LowBalance;
|
||||
use crate::host::info::HostInfoResponseData;
|
||||
use crate::host::info::InfoData;
|
||||
use crate::request::{Command, Transaction};
|
||||
|
||||
impl<'a> Transaction<NoExtension> for MessagePoll<'a> {}
|
||||
|
@ -38,9 +38,9 @@ impl Default for MessagePoll<'static> {
|
|||
#[xml(forward)]
|
||||
pub enum MessagePollResponse {
|
||||
/// Data under the <domain:trnData> tag
|
||||
DomainTransfer(DomainTransferResponseData),
|
||||
DomainTransfer(TransferData),
|
||||
/// Data under the <host:infData> tag
|
||||
HostInfo(HostInfoResponseData),
|
||||
HostInfo(InfoData),
|
||||
/// Data under the <lowbalance> tag
|
||||
LowBalance(LowBalance),
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue