class ReactiveShipping::NewZealandPost::International
Public Instance Methods
api()
click to toggle source
# File lib/reactive_shipping/carriers/new_zealand_post.rb, line 175 def api :international end
api_params()
click to toggle source
# File lib/reactive_shipping/carriers/new_zealand_post.rb, line 179 def api_params { :country_code => @destination.country_code } end
price(product)
click to toggle source
# File lib/reactive_shipping/carriers/new_zealand_post.rb, line 183 def price(product) product["price"].to_f end
rates()
click to toggle source
Calls superclass method
ReactiveShipping::NewZealandPost::RateRequest#rates
# File lib/reactive_shipping/carriers/new_zealand_post.rb, line 166 def rates raise "New Zealand Post packages must originate in New Zealand" unless new_zealand_origin? super end
service_name(product)
click to toggle source
# File lib/reactive_shipping/carriers/new_zealand_post.rb, line 171 def service_name(product) [product["group"], product["name"]].join(" ") end