class AusPostAPI::PAC
The PAC
class implements methods specified by the Australia Post Postage Assessment Calculator. A config hash must be supplied that specifies a valid PAC_AUTH_KEY, and request format. Setting the key TEST to true in the config hash will ignore any supplied auth_key and use the test endpoint.
Public Class Methods
new(config)
click to toggle source
# File lib/aus_post_api/pac.rb, line 7 def initialize(config) @config = config end
Public Instance Methods
country(params = {})
click to toggle source
# File lib/aus_post_api/pac.rb, line 15 def country(params = {}) AusPostAPI::PAC::Country.new(params, @config).execute end
domestic_letter_size(params = {})
click to toggle source
# File lib/aus_post_api/pac.rb, line 27 def domestic_letter_size(params = {}) AusPostAPI::PAC::DomesticLetterSize.new(params, @config).execute end
domestic_letter_thickness(params = {})
click to toggle source
# File lib/aus_post_api/pac.rb, line 19 def domestic_letter_thickness(params = {}) AusPostAPI::PAC::DomesticLetterThickness.new(params, @config).execute end
domestic_letter_weight(params = {})
click to toggle source
# File lib/aus_post_api/pac.rb, line 23 def domestic_letter_weight(params = {}) AusPostAPI::PAC::DomesticLetterWeight.new(params, @config).execute end
domestic_parcel_size(params = {})
click to toggle source
# File lib/aus_post_api/pac.rb, line 47 def domestic_parcel_size(params = {}) AusPostAPI::PAC::DomesticParcelSize.new(params, @config).execute end
domestic_parcel_type(params = {})
click to toggle source
# File lib/aus_post_api/pac.rb, line 43 def domestic_parcel_type(params = {}) AusPostAPI::PAC::DomesticParcelType.new(params, @config).execute end
domestic_parcel_weight(params = {})
click to toggle source
# File lib/aus_post_api/pac.rb, line 39 def domestic_parcel_weight(params = {}) AusPostAPI::PAC::DomesticParcelWeight.new(params, @config).execute end
domestic_postcode_search(params = {})
click to toggle source
# File lib/aus_post_api/pac.rb, line 11 def domestic_postcode_search(params = {}) AusPostAPI::PAC::DomesticPostcodeSearch.new(params, @config).execute end
international_letter_weight(params = {})
click to toggle source
# File lib/aus_post_api/pac.rb, line 31 def international_letter_weight(params = {}) AusPostAPI::PAC::InternationalLetterWeight.new(params, @config).execute end
international_parcel_weight(params = {})
click to toggle source
# File lib/aus_post_api/pac.rb, line 35 def international_parcel_weight(params = {}) AusPostAPI::PAC::InternationalParcelWeight.new(params, @config).execute end
postage_letter_domestic_calculate(params = {})
click to toggle source
# File lib/aus_post_api/pac.rb, line 75 def postage_letter_domestic_calculate(params = {}) AusPostAPI::PAC::PostageLetterDomesticCalculate.new(params, @config).execute end
postage_letter_domestic_service(params = {})
click to toggle source
# File lib/aus_post_api/pac.rb, line 51 def postage_letter_domestic_service(params = {}) AusPostAPI::PAC::PostageLetterDomesticService.new(params, @config).execute end
postage_letter_international_calculate(params = {})
click to toggle source
# File lib/aus_post_api/pac.rb, line 79 def postage_letter_international_calculate(params = {}) AusPostAPI::PAC::PostageLetterInternationalCalculate.new(params, @config).execute end
postage_letter_international_service(params = {})
click to toggle source
# File lib/aus_post_api/pac.rb, line 59 def postage_letter_international_service(params = {}) AusPostAPI::PAC::PostageLetterInternationalService.new(params, @config).execute end
postage_parcel_domestic_calculate(params = {})
click to toggle source
# File lib/aus_post_api/pac.rb, line 67 def postage_parcel_domestic_calculate(params = {}) AusPostAPI::PAC::PostageParcelDomesticCalculate.new(params, @config).execute end
postage_parcel_domestic_service(params = {})
click to toggle source
# File lib/aus_post_api/pac.rb, line 55 def postage_parcel_domestic_service(params = {}) AusPostAPI::PAC::PostageParcelDomesticService.new(params, @config).execute end
postage_parcel_international_calculate(params = {})
click to toggle source
# File lib/aus_post_api/pac.rb, line 71 def postage_parcel_international_calculate(params = {}) AusPostAPI::PAC::PostageParcelInternationalCalculate.new(params, @config).execute end
postage_parcel_international_service(params = {})
click to toggle source
# File lib/aus_post_api/pac.rb, line 63 def postage_parcel_international_service(params = {}) AusPostAPI::PAC::PostageParcelInternationalService.new(params, @config).execute end