class ActiveShipping::NewZealandPost
Constants
- URL
Protected Class Methods
default_location()
click to toggle source
# File lib/active_shipping/carriers/new_zealand_post.rb, line 25 def self.default_location Location.new( :country => "NZ", :city => "Wellington", :address1 => "22 Waterloo Quay", :address2 => "Pipitea", :postal_code => "6011" ) end
Public Instance Methods
find_rates(origin, destination, packages, options = {})
click to toggle source
# File lib/active_shipping/carriers/new_zealand_post.rb, line 12 def find_rates(origin, destination, packages, options = {}) options = @options.merge(options) request = RateRequest.from(origin, destination, packages, options) request.raw_responses = commit(request.urls) if request.new_zealand_origin? request.rate_response end
requirements()
click to toggle source
# File lib/active_shipping/carriers/new_zealand_post.rb, line 8 def requirements [:key] end
Protected Instance Methods
commit(urls)
click to toggle source
# File lib/active_shipping/carriers/new_zealand_post.rb, line 21 def commit(urls) save_request(urls).map { |url| ssl_get(url) } end