Class: ActiveShipping::NewZealandPost::Domestic
- Inherits:
-
RateRequest
- Object
- RateRequest
- ActiveShipping::NewZealandPost::Domestic
show all
- Defined in:
- lib/active_shipping/carriers/new_zealand_post.rb
Instance Attribute Summary
Attributes inherited from RateRequest
#raw_responses, #urls
Instance Method Summary
collapse
Methods inherited from RateRequest
domestic?, from, #initialize, new_zealand?, #new_zealand_origin?, #params, #parse_response, #product_arrays, #products_hash, #rate_options, #rate_response, #rates, #rates_hash, #response_options, #response_params, #responses, #url
Instance Method Details
#api ⇒ Object
148
149
150
|
# File 'lib/active_shipping/carriers/new_zealand_post.rb', line 148
def api
:domestic
end
|
#api_params ⇒ Object
152
153
154
155
156
157
158
|
# File 'lib/active_shipping/carriers/new_zealand_post.rb', line 152
def api_params
{
:postcode_src => @origin.postal_code,
:postcode_dest => @destination.postal_code,
:carrier => "all"
}
end
|
#price(product) ⇒ Object
160
161
162
|
# File 'lib/active_shipping/carriers/new_zealand_post.rb', line 160
def price(product)
product["cost"].to_f
end
|
#service_name(product) ⇒ Object
144
145
146
|
# File 'lib/active_shipping/carriers/new_zealand_post.rb', line 144
def service_name(product)
[product["service_group_description"], product["description"]].join(" ")
end
|