public ReqContactCreate ConvertToReqContactCreate(string domainName)
        {
            var req = new ReqContactCreate();

            req.DomainName = domainName;

            req.ContactId = this.Id;
            req.Email     = this.Email;
            if (!req.Fax.IsEmpty())
            {
                req.Fax = "+90." + this.Fax.Replace("+90", "");
            }
            req.Postals = new List <PostalInfo>()
            {
                new PostalInfo {
                    Type         = PostalInfo.PostalType.Int,
                    Name         = this.Name + " " + this.Surname,
                    Organization = this.Organization,
                    Address      = new AddressInfo {
                        City        = this.City,
                        CountryCode = this.Country,
                        PostalCode  = this.Zip,
                        SP          = this.State,
                        Streets     = new List <string> {
                            this.Address
                        }
                    }
                }
            };
            if (!this.Phone.IsEmpty())
            {
                req.Voice = new VoiceInfo
                {
                    Voice = "+90." + this.Phone.Replace("+90", "")
                }
            }
            ;

            req.AuthInfo = new AuthInfo()
            {
                Password = this.AuthInfo
            };

            return(req);
        }
    }
Exemple #2
0
 public ResContactCreate ContactCreate(ReqContactCreate req)
 {
     return(Call <ResContactCreate, ReqContactCreate>(req, "ContactCreate"));
 }