https://github.com/postmen/postmen-sdk-ruby
AfterShip Shipping (Postmen) API Client Library for Ruby (USPS, FedEx, UPS, DHL and more)
https://github.com/postmen/postmen-sdk-ruby
aftership api api-client postmen ruby sdk shipping shipping-api
Last synced: 7 months ago
JSON representation
AfterShip Shipping (Postmen) API Client Library for Ruby (USPS, FedEx, UPS, DHL and more)
- Host: GitHub
- URL: https://github.com/postmen/postmen-sdk-ruby
- Owner: postmen
- License: other
- Created: 2015-07-06T14:40:27.000Z (almost 11 years ago)
- Default Branch: master
- Last Pushed: 2017-03-30T19:25:36.000Z (about 9 years ago)
- Last Synced: 2025-09-05T10:47:54.682Z (8 months ago)
- Topics: aftership, api, api-client, postmen, ruby, sdk, shipping, shipping-api
- Language: Ruby
- Homepage: https://www.aftership.com/postmen
- Size: 77.1 KB
- Stars: 7
- Watchers: 3
- Forks: 3
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.txt
Awesome Lists containing this project
README
## postmen-ruby
[](https://travis-ci.org/postmen/postmen-sdk-ruby)
[](https://codeclimate.com/github/postmen/postmen-sdk-ruby)
[](https://badge.fury.io/rb/postmen)
[](https://gemnasium.com/github.com/postmen/postmen-sdk-ruby)
[](https://coveralls.io/github/postmen/postmen-sdk-ruby?branch=master)
[](https://inch-ci.org/github/postmen/postmen-sdk-ruby)
Ruby Gem for Postmen API.
This extension helps developers to integrate with Postmen easily.
## Resources
- API documentation/overview
- Example App
- Ruby technical documentation
## Installation
1. Add the following line to your application's Gemfile
```
gem 'postmen', '~> 1.0'
```
2. Run bundler
```
bundle install
```
## Configuration
```ruby
Postmen.configure do |config|
config.region = 'sandbox' # set 'sandbox' or 'production. Required
config.api_key = 'YOUR API KEY' # Required
config.endpoint = 'http://my-custom-endpoint.example.com' # Optionally set custom endpoint url.
end
```
## Getting started
```ruby
require 'postmen'
# Setup your postmen account (https://postmen.com), obtain an API key.
# Configure Postmen, see Configuration section
### Fetch all labels:
Postmen::Label.all # Returns an instance of Postmen::LabelCollection
# optionally you can pass additional params to the query:
Postmen::Label.all(shipper_account_id: '1111')
Postmen::Label.all(status: 'created')
# For more options, please see the documentation: https://docs.postmen.com/api.html#labels-list-all-labels
### Fetch single label
Postmen::Label.find('1111') # Returns an instance of Postmen::Label
```
## The License (MIT)
Released under the MIT license. See the LICENSE file for the complete wording.