Ruby adapter for Australia Post's ClickAndSend API.
Add this line to your application's Gemfile:
And then execute:
Or install it yourself as:
$ gem install click_and_send
Configure like this:
ClickAndSend.configure do |c| c.account_number = '1234567' c.api_key = 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx' c.user_name = 'acme' c.wsdl = 'https://auspost-staging.oss.neopost-id.com/modules/oss/api/ship/wsdl?sz_Client=AustraliaPost' end
Note that the WSDL URL above is for ClickAndSend's staging environment.
You should only need to call methods on the
Refer to ClickAndSend docs and acceptance tests for usage examples.
Optionally configure a logger. It defaults to a standard Logger instance writing to log/click_and_send.log or Rails.logger when applicable.
# Set logfile ClickAndSend.configure do |c| c.logfile = 'path/to/my/logfile' end # Custom logger ClickAndSend.configure do |c| c.logger = MyApp.logger end
Order is important for ClickAndSend API data structures. Therefore, under ruby 1.8, use
ActiveSupport::OrderedHash instead of a regular
- Fork it
- Create your feature branch (
git checkout -b my-new-feature)
- Commit your changes (
git commit -am 'Added some feature')
- Push to the branch (
git push origin my-new-feature)
- Create new Pull Request