Class: Postmen
- Inherits:
-
Object
- Object
- Postmen
- Extended by:
- Dry::Configurable
- Defined in:
- lib/postmen.rb,
lib/postmen/rate.rb,
lib/postmen/label.rb,
lib/postmen/types.rb,
lib/postmen/errors.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/file.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/types/manifesting_label.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, RequestError, Response, Shipment, ShipperAccount, ShipperAccountCollection, ShipperAccountQuery, ShipperAccountUpdateCredentialsQuery, ShipperAccountUpdateQuery
Constant Summary collapse
- PAPER_SIZES =
[ '4x4', '4x6', '4x6.75', '4x8', '6x4', 'a4', 'default' ].freeze
- 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)
- MaximumNumberOfRetriesReachedError =
Exception raised if retriable request reached maximum number of attempts.
Class.new(Error)
- ResourceNotFound =
Expcetion raised if resource was not found.
Class.new(RequestError)
- VERSION =
SDK Version
'1.0.3'.freeze
Class Method Summary collapse
-
.endpoint ⇒ String
Returns the endpoint used in all queries.
-
.failover! ⇒ Object
Switch to failover domain.
-
.failover? ⇒ Boolean
Checks wheter we’re in failover mode.
-
.root ⇒ Pathname
Returns path where gem is installed.
Class Method Details
.endpoint ⇒ String
Returns the endpoint used in all queries
56 57 58 |
# File 'lib/postmen.rb', line 56 def self.endpoint config.endpoint || Connection.endpoint("#{config.region}-api", config.failover) end |
.failover! ⇒ Object
Switch to failover domain
73 74 75 |
# File 'lib/postmen.rb', line 73 def self.failover! config.failover = true end |
.failover? ⇒ Boolean
Checks wheter we’re in failover mode
68 69 70 |
# File 'lib/postmen.rb', line 68 def self.failover? !!config.failover end |
.root ⇒ Pathname
Returns path where gem is installed
63 64 65 |
# File 'lib/postmen.rb', line 63 def self.root Pathname.new(File.(File.join(File.dirname(__FILE__), '../'))) end |