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\Http\Request\Transactions;
 4: 
 5: use ShippoClient\Http\Request\CommonParameter;
 6: use TurmericSpice\Container\InvalidAttributeException;
 7: 
 8: /**
 9:  * A Transaction is the purchase of a Shipment Label for a given Shipment Rate.
10:  * Transactions can be as simple as posting a Rate ID, but also allow you to define further parameters of the desired Label, such as pickup and notifications.
11:  * Transactions can only be created for Rates that are less than 7 days old and that have an object_purpose of "PURCHASE".
12:  * Transactions are created asynchronous. The response time depends exclusively on the carrier's server.
13:  */
14: class CreateObject extends CommonParameter
15: {
16:     /**
17:      * ID of the Rate object for which a Label has to be obtained.
18:      * Please note that only rates that are not older than 7 days can be purchased in order to ensure up-to-date pricing.
19:      *
20:      * @return string
21:      * @throws InvalidAttributeException
22:      */
23:     public function getRate()
24:     {
25:         return $this->attributes->mustHave('rate')->asString();
26:     }
27: }
28: 
API documentation generated by ApiGen