1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
use super::super::client;
use super::epp_proto;
impl From<epp_proto::isnic::PaymentInfo> for Option<client::isnic::PaymentInfo> {
fn from(from: epp_proto::isnic::PaymentInfo) -> Self {
from.payment_method.map(|m| match m {
epp_proto::isnic::payment_info::PaymentMethod::Prepaid(id) => {
client::isnic::PaymentInfo::Prepaid(id)
}
epp_proto::isnic::payment_info::PaymentMethod::Card(card) => {
client::isnic::PaymentInfo::Card {
id: card.id,
cvc: card.cvc,
}
}
})
}
}
impl From<epp_proto::isnic::HostInfo> for client::isnic::HostInfo {
fn from(from: epp_proto::isnic::HostInfo) -> Self {
client::isnic::HostInfo {
zone_contact: from.zone_contact,
}
}
}
impl From<epp_proto::isnic::DomainUpdate> for client::isnic::DomainUpdate {
fn from(from: epp_proto::isnic::DomainUpdate) -> Self {
client::isnic::DomainUpdate {
remove_all_ns: from.remove_all_ns,
new_master_ns: from.new_master_ns,
}
}
}
impl From<epp_proto::isnic::ContactCreate> for client::isnic::ContactCreate {
fn from(from: epp_proto::isnic::ContactCreate) -> Self {
client::isnic::ContactCreate {
mobile: from.mobile.map(Into::into),
sid: from.sid,
auto_update_from_national_registry: from.auto_update_from_national_registry,
paper_invoices: from.paper_invoices,
lang: from.lang,
}
}
}
impl From<epp_proto::isnic::ContactUpdate> for client::isnic::ContactUpdate {
fn from(from: epp_proto::isnic::ContactUpdate) -> Self {
client::isnic::ContactUpdate {
mobile: from.mobile.map(Into::into),
auto_update_from_national_registry: from.auto_update_from_national_registry,
paper_invoices: from.paper_invoices,
lang: from.lang,
password: from.password,
}
}
}