Overview

Namespaces

  • ShippoClient
    • Entity
    • Http
      • Request
        • Addresses
        • Parcels
        • Shipments
        • Transactions
      • Response
        • Exception

Classes

  • ShippoClient\Addresses
  • ShippoClient\Entity\Address
  • ShippoClient\Entity\AddressCollection
  • ShippoClient\Entity\EntityCollection
  • ShippoClient\Entity\Location
  • ShippoClient\Entity\ObjectInformation
  • ShippoClient\Entity\Parcel
  • ShippoClient\Entity\ParcelCollection
  • ShippoClient\Entity\Rate
  • ShippoClient\Entity\RateCollection
  • ShippoClient\Entity\Refund
  • ShippoClient\Entity\RefundCollection
  • ShippoClient\Entity\ServiceLevel
  • ShippoClient\Entity\Shipment
  • ShippoClient\Entity\ShipmentCollection
  • ShippoClient\Entity\TrackingHistory
  • ShippoClient\Entity\TrackingStatus
  • ShippoClient\Entity\Tracks
  • ShippoClient\Entity\Transaction
  • ShippoClient\Entity\TransactionCollection
  • ShippoClient\Entity\WebhookTracks
  • ShippoClient\Http\Request
  • ShippoClient\Http\Request\Addresses\CreateObject
  • ShippoClient\Http\Request\CommonParameter
  • ShippoClient\Http\Request\MockCollection
  • ShippoClient\Http\Request\Parcels\CreateObject
  • ShippoClient\Http\Request\Shipments\CreateObject
  • ShippoClient\Http\Request\Shipments\CreateObjectByNested
  • ShippoClient\Http\Request\Shipments\CreateReturnObject
  • ShippoClient\Http\Request\Transactions\CreateObject
  • ShippoClient\Http\Response\AddressList
  • ShippoClient\Http\Response\ListResponse
  • ShippoClient\Http\Response\ParcelList
  • ShippoClient\Http\Response\RateList
  • ShippoClient\Http\Response\RefundList
  • ShippoClient\Http\Response\ShipmentList
  • ShippoClient\Http\Response\TransactionList
  • ShippoClient\Parcels
  • ShippoClient\Rates
  • ShippoClient\Refunds
  • ShippoClient\Shipments
  • ShippoClient\ShippoClient
  • ShippoClient\Tracks
  • ShippoClient\Transactions

Exceptions

  • ShippoClient\Http\Response\Exception\BadResponseException
  • ShippoClient\Http\Response\Exception\ClientErrorException
  • ShippoClient\Http\Response\Exception\ServerErrorException
  • Overview
  • Namespace
  • Class
 1: <?php
 2: 
 3: namespace ShippoClient\Entity;
 4: 
 5: use TurmericSpice\Container;
 6: use TurmericSpice\ReadableAttributes;
 7: 
 8: /**
 9:  * Each valid Shipment object will automatically trigger the calculation of all available Rates.
10:  * Depending on your Addresses and Parcel, there may be none, one or multiple Rates.
11:  *
12:  * By default, the calculated Rates will return the price in two currencies under the "amount" and "amount_local" keys, respectively.
13:  * The "amount" key will contain the price of a Rate expressed in the currency that is used in the country from which Parcel originates,
14:  * and the "amount_local" key will contain the price expressed in the currency that is used in the country the Parcel is shipped to.
15:  * You can request Rates with prices expressed in a different currency by adding the desired currency code in the end of the resource URL.
16:  * The full list of supported currencies along with their codes can be viewed on open exchange rates.
17:  *
18:  * Rates are created asynchronously. The response time depends exclusively on the carrier's server.
19:  */
20: class Rate extends ObjectInformation
21: {
22:     use ReadableAttributes {
23:         mayHaveAsString  as public getShipment;
24:         mayHaveAsArray   as public getAttributes;
25:         mayHaveAsFloat   as public getAmountLocal;
26:         mayHaveAsString  as public getCurrencyLocal;
27:         mayHaveAsFloat   as public getAmount;
28:         mayHaveAsString  as public getCurrency;
29:         mayHaveAsString  as public getProvider;
30:         mayHaveAsString  as public getServicelevelName;
31:         mayHaveAsString  as public getServicelevelTerms;
32:         mayHaveAsInt     as public getDays;
33:         mayHaveAsBoolean as public getTrackable;
34:         mayHaveAsBoolean as public getInsurance;
35:         mayHaveAsFloat   as public getInsuranceAmountLocal;
36:         mayHaveAsString  as public getInsuranceCurrencyLocal;
37:         mayHaveAsFloat   as public getInsuranceAmount;
38:         mayHaveAsString  as public getInsuranceCurrency;
39:         mayHaveAsString  as public getCarrierAccount;
40:         mayHaveAsString  as public getDurationTerms;
41:         mayHaveAsArray   as public getMessages;
42:         mayHaveAsString  as public getProviderImage_75;
43:         mayHaveAsString  as public getProviderImage_200;
44:     }
45: 
46:     /**
47:      * Description is not found in Shippo API doc, but this key is returned in fact.
48:      *
49:      * @return mixed|null
50:      */
51:     public function getAvailableShippo()
52:     {
53:         return $this->attributes->mayHave('available_shippo')->value();
54:     }
55: 
56:     /**
57:      * Description is not found in Shippo API doc, but this key is returned in fact.
58:      *
59:      * @return mixed|null
60:      */
61:     public function getOutboundEndpoint()
62:     {
63:         return $this->attributes->mayHave('outbound_endpoint')->value();
64:     }
65: 
66:     /**
67:      * Description is not found in Shippo API doc, but this key is returned in fact.
68:      *
69:      * @return mixed|null
70:      */
71:     public function getInboundEndpoint()
72:     {
73:         return $this->attributes->mayHave('inbound_endpoint')->value();
74:     }
75: 
76:     /**
77:      * Description is not found in Shippo API doc, but this key is returned in fact.
78:      *
79:      * @return mixed|null
80:      */
81:     public function getArrivesBy()
82:     {
83:         return $this->attributes->mayHave('arrives_by')->value();
84:     }
85: 
86:     /**
87:      * Description is not found in Shippo API doc, but this key is returned in fact.
88:      *
89:      * @return mixed|null
90:      */
91:     public function getDeliveryAttempts()
92:     {
93:         return $this->attributes->mayHave('delivery_attempts')->value();
94:     }
95: }
96: 
API documentation generated by ApiGen