Пример #1
0
 private static void SetRecipient(ProcessShipmentRequest request, DeliveryNotice notice)
 {
     request.RequestedShipment.Recipient                             = new Party();
     request.RequestedShipment.Recipient.Contact                     = new Contact();
     request.RequestedShipment.Recipient.Contact.PersonName          = notice.F_HS_DeliveryName;
     request.RequestedShipment.Recipient.Contact.CompanyName         = notice.FCustCompany;
     request.RequestedShipment.Recipient.Contact.PhoneNumber         = notice.F_HS_MobilePhone;
     request.RequestedShipment.Recipient.Address                     = new Address();
     request.RequestedShipment.Recipient.Address.StreetLines         = GetDeliveryAddress(notice.F_HS_DeliveryAddress);
     request.RequestedShipment.Recipient.Address.City                = notice.F_HS_DeliveryCity;
     request.RequestedShipment.Recipient.Address.StateOrProvinceCode = StateOrProvinceCode.GetStateOrProvinceCode(notice.F_HS_DeliveryProvinces);
     request.RequestedShipment.Recipient.Address.PostalCode          = notice.F_HS_PostCode;
     request.RequestedShipment.Recipient.Address.CountryCode         = notice.F_HS_RecipientCountry;
     request.RequestedShipment.Recipient.Address.Residential         = true;
 }
Пример #2
0
 private static void SetSender(ProcessShipmentRequest request)
 {
     request.RequestedShipment.Shipper                     = new Party();
     request.RequestedShipment.Shipper.Contact             = new Contact();
     request.RequestedShipment.Shipper.Contact.PersonName  = HSDeliveryNoticeConst.SenderName;
     request.RequestedShipment.Shipper.Contact.CompanyName = HSDeliveryNoticeConst.SenderCompanyName;
     request.RequestedShipment.Shipper.Contact.PhoneNumber = HSDeliveryNoticeConst.SenderPhoneNumber;
     request.RequestedShipment.Shipper.Address             = new Address();
     request.RequestedShipment.Shipper.Address.StreetLines = new string[2] {
         HSDeliveryNoticeConst.SenderAddress_1, HSDeliveryNoticeConst.SenderAddrss_2
     };
     request.RequestedShipment.Shipper.Address.City = HSDeliveryNoticeConst.SenderCity;
     request.RequestedShipment.Shipper.Address.StateOrProvinceCode = StateOrProvinceCode.GetStateOrProvinceCode(HSDeliveryNoticeConst.SenderStateOrProvinceCode);
     request.RequestedShipment.Shipper.Address.PostalCode          = HSDeliveryNoticeConst.SenderPostalCode;
     request.RequestedShipment.Shipper.Address.CountryCode         = HSDeliveryNoticeConst.SenderCountryCode;
 }