Class: ActiveShipping::Kunaki

Inherits:
Carrier
  • Object
show all
Defined in:
lib/active_shipping/carriers/kunaki.rb

Constant Summary collapse

URL =
'https://Kunaki.com/XMLService.ASP'
CARRIERS =
["UPS", "USPS", "FedEx", "Royal Mail", "Parcelforce", "Pharos", "Eurotrux", "Canada Post", "DHL"]
COUNTRIES =
{
  'AR' => 'Argentina',
  'AU' => 'Australia',
  'AT' => 'Austria',
  'BE' => 'Belgium',
  'BR' => 'Brazil',
  'BG' => 'Bulgaria',
  'CA' => 'Canada',
  'CN' => 'China',
  'CY' => 'Cyprus',
  'CZ' => 'Czech Republic',
  'DK' => 'Denmark',
  'EE' => 'Estonia',
  'FI' => 'Finland',
  'FR' => 'France',
  'DE' => 'Germany',
  'GI' => 'Gibraltar',
  'GR' => 'Greece',
  'GL' => 'Greenland',
  'HK' => 'Hong Kong',
  'HU' => 'Hungary',
  'IS' => 'Iceland',
  'IE' => 'Ireland',
  'IL' => 'Israel',
  'IT' => 'Italy',
  'JP' => 'Japan',
  'LV' => 'Latvia',
  'LI' => 'Liechtenstein',
  'LT' => 'Lithuania',
  'LU' => 'Luxembourg',
  'MX' => 'Mexico',
  'NL' => 'Netherlands',
  'NZ' => 'New Zealand',
  'NO' => 'Norway',
  'PL' => 'Poland',
  'PT' => 'Portugal',
  'RO' => 'Romania',
  'RU' => 'Russia',
  'SG' => 'Singapore',
  'SK' => 'Slovakia',
  'SI' => 'Slovenia',
  'ES' => 'Spain',
  'SE' => 'Sweden',
  'CH' => 'Switzerland',
  'TW' => 'Taiwan',
  'TR' => 'Turkey',
  'UA' => 'Ukraine',
  'GB' => 'United Kingdom',
  'US' => 'United States',
  'VA' => 'Vatican City',
  'RS' => 'Yugoslavia',
  'ME' => 'Yugoslavia'
}
@@name =
"Kunaki"

Instance Attribute Summary

Attributes inherited from Carrier

#last_request, #test_mode

Instance Method Summary collapse

Methods inherited from Carrier

#available_services, #cancel_shipment, #create_shipment, default_location, #find_tracking_info, #initialize, #maximum_address_field_length, #maximum_weight, #requirements, #save_request, #timestamp_from_business_day

Constructor Details

This class inherits a constructor from ActiveShipping::Carrier

Instance Method Details

#find_rates(origin, destination, packages, options = {}) ⇒ Object



66
67
68
69
# File 'lib/active_shipping/carriers/kunaki.rb', line 66

def find_rates(origin, destination, packages, options = {})
  requires!(options, :items)
  commit(origin, destination, options)
end

#valid_credentials?Boolean

Returns:

  • (Boolean)


71
72
73
# File 'lib/active_shipping/carriers/kunaki.rb', line 71

def valid_credentials?
  true
end