HEX
Server: Apache/2.4.41 (Ubuntu)
System: Linux ip-172-31-42-149 5.15.0-1084-aws #91~20.04.1-Ubuntu SMP Fri May 2 07:00:04 UTC 2025 aarch64
User: ubuntu (1000)
PHP: 7.4.33
Disabled: pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_get_handler,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,pcntl_async_signals,pcntl_unshare,
Upload Files
File: /var/www/vhost/disk-apps/agile-selling-orl/vendor/gabrielbull/ups-api/src/Entity/RatedShipment.php
<?php

namespace Ups\Entity;

class RatedShipment
{
    public $Service;
    public $RateShipmentWarning;
    public $BillingWeight;
    public $TransportationCharges;
    public $ServiceOptionsCharges;
    public $TotalCharges;
    public $GuaranteedDaysToDelivery;
    public $ScheduledDeliveryTime;
    public $RatedPackage;
    public $SurCharges;
    public $TimeInTransit;

    /**
     * @var NegotiatedRates|null
     */
    public $NegotiatedRates;

    public function __construct($response = null)
    {
        $this->Service = new Service();
        $this->BillingWeight = new BillingWeight();
        $this->TransportationCharges = new Charges();
        $this->ServiceOptionsCharges = new Charges();
        $this->TotalCharges = new Charges();
        $this->RatedPackage = [];
        $this->SurCharges = [];

        if (null !== $response) {
            if (isset($response->Service)) {
                $this->Service->setCode($response->Service->Code);
            }
            if (isset($response->RatedShipmentWarning)) {
                $this->RateShipmentWarning = $response->RatedShipmentWarning;
            }
            if (isset($response->BillingWeight)) {
                $this->BillingWeight = new BillingWeight($response->BillingWeight);
            }
            if (isset($response->GuaranteedDaysToDelivery)) {
                $this->GuaranteedDaysToDelivery = $response->GuaranteedDaysToDelivery;
            }
            if (isset($response->ScheduledDeliveryTime)) {
                $this->ScheduledDeliveryTime = $response->ScheduledDeliveryTime;
            }
            if (isset($response->TransportationCharges)) {
                $this->TransportationCharges = new Charges($response->TransportationCharges);
            }
            if (isset($response->ServiceOptionsCharges)) {
                $this->ServiceOptionsCharges = new Charges($response->ServiceOptionsCharges);
            }
            if (isset($response->TotalCharges)) {
                $this->TotalCharges = new Charges($response->TotalCharges);
            }
            if (isset($response->RatedPackage)) {
                if (is_array($response->RatedPackage)) {
                    foreach ($response->RatedPackage as $ratedPackage) {
                        $this->RatedPackage[] = new RatedPackage($ratedPackage);
                    }
                } else {
                    $this->RatedPackage[] = new RatedPackage($response->RatedPackage);
                }
            }

            if (isset($response->SurCharges)) {
                if (is_array($response->SurCharges)) {
                    foreach ($response->SurCharges as $surCharges) {
                        $this->SurCharges[] = new Charges($surCharges);
                    }
                } else {
                    $this->SurCharges[] = new Charges($response->SurCharges);
                }
            }

            if (isset($response->TimeInTransit)) {
                $this->TimeInTransit = new RateTimeInTransitResponse($response->TimeInTransit);
            }

            if (isset($response->NegotiatedRates)) {
                $this->NegotiatedRates = new NegotiatedRates($response->NegotiatedRates);
            }
        }
    }

    public function getServiceName()
    {
        return $this->Service->getName();
    }
}