Class: ActiveMerchant::Shipping::NewZealandPost
- Defined in:
- lib/active_shipping/shipping/carriers/new_zealand_post.rb
Defined Under Namespace
Classes: Domestic, International, NewZealandPostPackage, NewZealandPostRateResponse, RateRequest
Constant Summary collapse
- URL =
"http://api.nzpost.co.nz/ratefinder"
- @@name =
"New Zealand Post"
Instance Attribute Summary
Attributes inherited from Carrier
Instance Method Summary collapse
Methods inherited from Carrier
#initialize, #maximum_weight, #valid_credentials?
Constructor Details
This class inherits a constructor from ActiveMerchant::Shipping::Carrier
Instance Method Details
#find_rates(origin, destination, packages, options = {}) ⇒ Object
14 15 16 17 18 19 |
# File 'lib/active_shipping/shipping/carriers/new_zealand_post.rb', line 14 def find_rates(origin, destination, packages, = {}) = .merge() request = RateRequest.from(origin, destination, packages, ) request.raw_responses = commit(request.urls) if request.new_zealand_origin? request.rate_response end |
#requirements ⇒ Object
10 11 12 |
# File 'lib/active_shipping/shipping/carriers/new_zealand_post.rb', line 10 def requirements [:key] end |