Packlink.com API client
Add this line to your application's Gemfile:
gem 'packlink_lite'
PacklinkLite.configure do |config|
config.api_key = ENV['PACKLINK_API_KEY']
config.testing = true
end
API key can be passed via options too:
PacklinkLite::Service.all(query, api_key: 'mykey')
PacklinkLite::Order.create(order_hash, api_key: 'mykey')
services = PacklinkLite::Service.all(
from: { country: 'DE', zip: 56457 },
to: { country: 'DE', zip: 56457 },
packages: { 0 => { width: 10, height: 10, length: 10, weight: 1 } }
)
order = PacklinkLite::Order.create(order_hash)
tracking_history = PacklinkLite::TrackingHistory.find(shipment_reference)
PacklinkLite.change_shipment_callback_url(url)
PacklinkLite.change_tracking_callback_url(url)
Bug reports and pull requests are welcome on GitHub at https://github.com/vinted/packlink_lite.
The gem is available as open source under the terms of the MIT License.