Ejemplo n.º 1
0
 /// <summary>
 /// Initializes a new instance of the <see cref="Address"/> class, resolving the given API Type
 /// </summary>
 /// <param name="fromType">From type.</param>
 public Address(customerAddressExType fromType) {
     this.City = fromType.city;
     this.Company = fromType.company;
     this.Country = fromType.country;
     this.ID = fromType.customerAddressId;
     this.Last = fromType.lastName;
     this.First = fromType.firstName;
     this.Street = fromType.address;
     this.Fax = fromType.faxNumber;
     this.Phone = fromType.phoneNumber;
     this.State = fromType.state;
     this.Zip = fromType.zip;
 }
Ejemplo n.º 2
0
 /// <summary>
 /// Creates an API type for use with outbound requests to the Gateway. Mostly for internal use.
 /// </summary>
 /// <returns></returns>
 public customerAddressExType ToAPIExType() {
     var result = new customerAddressExType();
     result.address = this.Street;
     result.city = this.City;
     result.company = this.Company;
     result.country = this.Country;
     result.faxNumber = this.Fax;
     result.firstName = this.First;
     result.lastName = this.Last;
     result.phoneNumber = this.Phone;
     result.state = this.State;
     result.zip = this.Zip;
     result.customerAddressId = this.ID;
     return result;
 }