Class: ActiveMerchant::Shipping::NewZealandPost::Domestic
- Inherits:
-
RateRequest
show all
- Defined in:
- lib/active_shipping/shipping/carriers/new_zealand_post.rb
Instance Attribute Summary
Attributes inherited from RateRequest
#raw_responses, #urls
Instance Method Summary
collapse
Methods inherited from RateRequest
from, #initialize, #new_zealand_origin?, #rate_response
Instance Method Details
153
154
155
|
# File 'lib/active_shipping/shipping/carriers/new_zealand_post.rb', line 153
def api
:domestic
end
|
#api_params ⇒ Object
157
158
159
160
161
162
163
|
# File 'lib/active_shipping/shipping/carriers/new_zealand_post.rb', line 157
def api_params
{
:postcode_src => @origin.postal_code,
:postcode_dest => @destination.postal_code,
:carrier => "all"
}
end
|
#price(product) ⇒ Object
165
166
167
|
# File 'lib/active_shipping/shipping/carriers/new_zealand_post.rb', line 165
def price(product)
product["cost"].to_f
end
|
#service_name(product) ⇒ Object
149
150
151
|
# File 'lib/active_shipping/shipping/carriers/new_zealand_post.rb', line 149
def service_name(product)
[ product["service_group_description"], product["description"] ].join(" ")
end
|