Class: Postmen

Inherits:
Object
  • Object
show all
Extended by:
Dry::Configurable
Defined in:
lib/postmen.rb,
lib/postmen/rate.rb,
lib/postmen/label.rb,
lib/postmen/types.rb,
lib/postmen/parcel.rb,
lib/postmen/version.rb,
lib/postmen/manifest.rb,
lib/postmen/response.rb,
lib/postmen/shipment.rb,
lib/postmen/types/aes.rb,
lib/postmen/connection.rb,
lib/postmen/types/item.rb,
lib/postmen/types/uuid.rb,
lib/postmen/rate_object.rb,
lib/postmen/types/money.rb,
lib/postmen/types/no_eei.rb,
lib/postmen/types/weight.rb,
lib/postmen/types/address.rb,
lib/postmen/types/billing.rb,
lib/postmen/types/customs.rb,
lib/postmen/types/invoice.rb,
lib/postmen/types/passport.rb,
lib/postmen/rate_collection.rb,
lib/postmen/shipper_account.rb,
lib/postmen/types/dimension.rb,
lib/postmen/types/reference.rb,
lib/postmen/collection_proxy.rb,
lib/postmen/label_collection.rb,
lib/postmen/query/rate_query.rb,
lib/postmen/query/label_query.rb,
lib/postmen/manifest_collection.rb,
lib/postmen/query/manifest_query.rb,
lib/postmen/types/payment_method.rb,
lib/postmen/types/customs_billing.rb,
lib/postmen/types/detailed_charges.rb,
lib/postmen/query/create_rate_query.rb,
lib/postmen/query/create_label_query.rb,
lib/postmen/shipper_account_collection.rb,
lib/postmen/query/create_manifest_query.rb,
lib/postmen/query/shipper_account_query.rb,
lib/postmen/types/brief_shipper_account.rb,
lib/postmen/query/create_shipper_account_query.rb,
lib/postmen/query/shipper_account_update_query.rb,
lib/postmen/query/shipper_account_update_credentials_query.rb

Overview

shipper_account_id string Shipper account ID status string Manifest status Accepts: manifesting,manifested,failed. limit string Number of records per page created_at_min string Start date and time of the record created (default: 24hrs ago) created_at_max string End date and time of the record created (default: NOW()) next_token string Next token

Defined Under Namespace

Modules: CollectionProxy, Types Classes: Connection, CreateLabelQuery, CreateManifestQuery, CreateRateQuery, CreateShipperAccountQuery, Label, LabelCollection, LabelQuery, Manifest, ManifestCollection, ManifestQuery, Parcel, Rate, RateCollection, RateObject, RateQuery, Response, Shipment, ShipperAccount, ShipperAccountCollection, ShipperAccountQuery, ShipperAccountUpdateCredentialsQuery, ShipperAccountUpdateQuery

Constant Summary collapse

Error =

Generic Exception class, all other exceptions should inherit from this class

Class.new(StandardError)
RateLimitExceeded =

Exception raised if rate limit was exceeded

Class.new(Error)
ConnectionError =

Exception raised in case of any connection error

Class.new(Error)
RequestError =

Generic exception raised if the API returns an error

Class.new(Error)
ResourceNotFound =

Expcetion raised if resource was not found.

Class.new(RequestError)
VERSION =

SDK Version

'1.0.0'.freeze

Class Method Summary collapse

Class Method Details

.endpointString

Returns the endpoint used in all queries


63
64
65
# File 'lib/postmen.rb', line 63

def self.endpoint
  config.endpoint || "https://#{config.region}-api.postmen.com/v3"
end

.rootPathname

Returns path where gem is installed


70
71
72
# File 'lib/postmen.rb', line 70

def self.root
  Pathname.new(File.expand_path(File.join(File.dirname(__FILE__), '../')))
end