예제 #1
0
 public static function GetObjectFromSoapObject($objSoapObject)
 {
     $objToReturn = new FedexShipment();
     if (property_exists($objSoapObject, 'FedexShipmentId')) {
         $objToReturn->intFedexShipmentId = $objSoapObject->FedexShipmentId;
     }
     if (property_exists($objSoapObject, 'Shipment') && $objSoapObject->Shipment) {
         $objToReturn->Shipment = Shipment::GetObjectFromSoapObject($objSoapObject->Shipment);
     }
     if (property_exists($objSoapObject, 'PackageType') && $objSoapObject->PackageType) {
         $objToReturn->PackageType = PackageType::GetObjectFromSoapObject($objSoapObject->PackageType);
     }
     if (property_exists($objSoapObject, 'ShippingAccount') && $objSoapObject->ShippingAccount) {
         $objToReturn->ShippingAccount = ShippingAccount::GetObjectFromSoapObject($objSoapObject->ShippingAccount);
     }
     if (property_exists($objSoapObject, 'FedexServiceType') && $objSoapObject->FedexServiceType) {
         $objToReturn->FedexServiceType = FedexServiceType::GetObjectFromSoapObject($objSoapObject->FedexServiceType);
     }
     if (property_exists($objSoapObject, 'CurrencyUnit') && $objSoapObject->CurrencyUnit) {
         $objToReturn->CurrencyUnit = CurrencyUnit::GetObjectFromSoapObject($objSoapObject->CurrencyUnit);
     }
     if (property_exists($objSoapObject, 'WeightUnit') && $objSoapObject->WeightUnit) {
         $objToReturn->WeightUnit = WeightUnit::GetObjectFromSoapObject($objSoapObject->WeightUnit);
     }
     if (property_exists($objSoapObject, 'LengthUnit') && $objSoapObject->LengthUnit) {
         $objToReturn->LengthUnit = LengthUnit::GetObjectFromSoapObject($objSoapObject->LengthUnit);
     }
     if (property_exists($objSoapObject, 'ToPhone')) {
         $objToReturn->strToPhone = $objSoapObject->ToPhone;
     }
     if (property_exists($objSoapObject, 'PayType')) {
         $objToReturn->intPayType = $objSoapObject->PayType;
     }
     if (property_exists($objSoapObject, 'PayerAccountNumber')) {
         $objToReturn->strPayerAccountNumber = $objSoapObject->PayerAccountNumber;
     }
     if (property_exists($objSoapObject, 'PackageWeight')) {
         $objToReturn->fltPackageWeight = $objSoapObject->PackageWeight;
     }
     if (property_exists($objSoapObject, 'PackageLength')) {
         $objToReturn->fltPackageLength = $objSoapObject->PackageLength;
     }
     if (property_exists($objSoapObject, 'PackageWidth')) {
         $objToReturn->fltPackageWidth = $objSoapObject->PackageWidth;
     }
     if (property_exists($objSoapObject, 'PackageHeight')) {
         $objToReturn->fltPackageHeight = $objSoapObject->PackageHeight;
     }
     if (property_exists($objSoapObject, 'DeclaredValue')) {
         $objToReturn->fltDeclaredValue = $objSoapObject->DeclaredValue;
     }
     if (property_exists($objSoapObject, 'Reference')) {
         $objToReturn->strReference = $objSoapObject->Reference;
     }
     if (property_exists($objSoapObject, 'SaturdayDeliveryFlag')) {
         $objToReturn->blnSaturdayDeliveryFlag = $objSoapObject->SaturdayDeliveryFlag;
     }
     if (property_exists($objSoapObject, 'NotifySenderEmail')) {
         $objToReturn->strNotifySenderEmail = $objSoapObject->NotifySenderEmail;
     }
     if (property_exists($objSoapObject, 'NotifySenderShipFlag')) {
         $objToReturn->blnNotifySenderShipFlag = $objSoapObject->NotifySenderShipFlag;
     }
     if (property_exists($objSoapObject, 'NotifySenderExceptionFlag')) {
         $objToReturn->blnNotifySenderExceptionFlag = $objSoapObject->NotifySenderExceptionFlag;
     }
     if (property_exists($objSoapObject, 'NotifySenderDeliveryFlag')) {
         $objToReturn->blnNotifySenderDeliveryFlag = $objSoapObject->NotifySenderDeliveryFlag;
     }
     if (property_exists($objSoapObject, 'NotifyRecipientEmail')) {
         $objToReturn->strNotifyRecipientEmail = $objSoapObject->NotifyRecipientEmail;
     }
     if (property_exists($objSoapObject, 'NotifyRecipientShipFlag')) {
         $objToReturn->blnNotifyRecipientShipFlag = $objSoapObject->NotifyRecipientShipFlag;
     }
     if (property_exists($objSoapObject, 'NotifyRecipientExceptionFlag')) {
         $objToReturn->blnNotifyRecipientExceptionFlag = $objSoapObject->NotifyRecipientExceptionFlag;
     }
     if (property_exists($objSoapObject, 'NotifyRecipientDeliveryFlag')) {
         $objToReturn->blnNotifyRecipientDeliveryFlag = $objSoapObject->NotifyRecipientDeliveryFlag;
     }
     if (property_exists($objSoapObject, 'NotifyOtherEmail')) {
         $objToReturn->strNotifyOtherEmail = $objSoapObject->NotifyOtherEmail;
     }
     if (property_exists($objSoapObject, 'NotifyOtherShipFlag')) {
         $objToReturn->blnNotifyOtherShipFlag = $objSoapObject->NotifyOtherShipFlag;
     }
     if (property_exists($objSoapObject, 'NotifyOtherExceptionFlag')) {
         $objToReturn->blnNotifyOtherExceptionFlag = $objSoapObject->NotifyOtherExceptionFlag;
     }
     if (property_exists($objSoapObject, 'NotifyOtherDeliveryFlag')) {
         $objToReturn->blnNotifyOtherDeliveryFlag = $objSoapObject->NotifyOtherDeliveryFlag;
     }
     if (property_exists($objSoapObject, 'HoldAtLocationFlag')) {
         $objToReturn->blnHoldAtLocationFlag = $objSoapObject->HoldAtLocationFlag;
     }
     if (property_exists($objSoapObject, 'HoldAtLocationAddress')) {
         $objToReturn->strHoldAtLocationAddress = $objSoapObject->HoldAtLocationAddress;
     }
     if (property_exists($objSoapObject, 'HoldAtLocationCity')) {
         $objToReturn->strHoldAtLocationCity = $objSoapObject->HoldAtLocationCity;
     }
     if (property_exists($objSoapObject, 'HoldAtLocationStateObject') && $objSoapObject->HoldAtLocationStateObject) {
         $objToReturn->HoldAtLocationStateObject = StateProvince::GetObjectFromSoapObject($objSoapObject->HoldAtLocationStateObject);
     }
     if (property_exists($objSoapObject, 'HoldAtLocationPostalCode')) {
         $objToReturn->strHoldAtLocationPostalCode = $objSoapObject->HoldAtLocationPostalCode;
     }
     if (property_exists($objSoapObject, '__blnRestored')) {
         $objToReturn->__blnRestored = $objSoapObject->__blnRestored;
     }
     return $objToReturn;
 }
예제 #2
0
 public static function GetArrayFromSoapArray($objSoapArray)
 {
     $objArrayToReturn = array();
     foreach ($objSoapArray as $objSoapObject) {
         array_push($objArrayToReturn, Shipment::GetObjectFromSoapObject($objSoapObject));
     }
     return $objArrayToReturn;
 }
 public static function GetObjectFromSoapObject($objSoapObject)
 {
     $objToReturn = new ShipmentCustomFieldHelper();
     if (property_exists($objSoapObject, 'Shipment') && $objSoapObject->Shipment) {
         $objToReturn->Shipment = Shipment::GetObjectFromSoapObject($objSoapObject->Shipment);
     }
     if (property_exists($objSoapObject, '__blnRestored')) {
         $objToReturn->__blnRestored = $objSoapObject->__blnRestored;
     }
     return $objToReturn;
 }