Class: Shipping::Base
- Inherits:
-
Object
- Object
- Shipping::Base
- Defined in:
- app/services/shipping/base.rb
Direct Known Subclasses
AmazonSeller, Freightquote, FreightquoteLegacy, RlCarriers, RlCarriersLegacy, SaiaLegacy, ShipengineBase, SpeedeeDelivery, UpsFreight, WalmartSeller, YrcFreightLegacy
Instance Attribute Summary collapse
-
#address ⇒ Object
Returns the value of attribute address.
-
#address2 ⇒ Object
Returns the value of attribute address2.
-
#address3 ⇒ Object
Returns the value of attribute address3.
-
#address_residential ⇒ Object
Returns the value of attribute address_residential.
-
#attention_name ⇒ Object
Returns the value of attribute attention_name.
-
#billing_account ⇒ Object
Returns the value of attribute billing_account.
-
#billing_country ⇒ Object
Returns the value of attribute billing_country.
-
#billing_zip ⇒ Object
Returns the value of attribute billing_zip.
-
#ci_comments ⇒ Object
Returns the value of attribute ci_comments.
-
#city ⇒ Object
Returns the value of attribute city.
-
#close_report_only ⇒ Object
Returns the value of attribute close_report_only.
-
#cod_amount ⇒ Object
Returns the value of attribute cod_amount.
-
#cod_collection_type ⇒ Object
Returns the value of attribute cod_collection_type.
-
#company ⇒ Object
(also: #name)
Returns the value of attribute company.
-
#country ⇒ Object
Returns the value of attribute country.
-
#currency_code ⇒ Object
Returns the value of attribute currency_code.
-
#data ⇒ Object
readonly
Returns the value of attribute data.
-
#debug ⇒ Object
Returns the value of attribute debug.
-
#declared_value ⇒ Object
Returns the value of attribute declared_value.
-
#delivery_instructions ⇒ Object
Returns the value of attribute delivery_instructions.
-
#delivery_total_value ⇒ Object
Returns the value of attribute delivery_total_value.
-
#description ⇒ Object
Returns the value of attribute description.
-
#discount_price ⇒ Object
Returns the value of attribute discount_price.
-
#dropoff_type ⇒ Object
Returns the value of attribute dropoff_type.
-
#email ⇒ Object
Returns the value of attribute email.
-
#eta ⇒ Object
Returns the value of attribute eta.
-
#export_reason ⇒ Object
Returns the value of attribute export_reason.
-
#freight_class ⇒ Object
Returns the value of attribute freight_class.
-
#freightquote_authorization_url ⇒ Object
Returns the value of attribute freightquote_authorization_url.
-
#freightquote_client_id ⇒ Object
Returns the value of attribute freightquote_client_id.
-
#freightquote_client_secret ⇒ Object
Returns the value of attribute freightquote_client_secret.
-
#freightquote_customer_code ⇒ Object
Returns the value of attribute freightquote_customer_code.
-
#freightquote_events_url ⇒ Object
Returns the value of attribute freightquote_events_url.
-
#freightquote_rating_url ⇒ Object
Returns the value of attribute freightquote_rating_url.
-
#freightquote_shipping_url ⇒ Object
Returns the value of attribute freightquote_shipping_url.
-
#freightquote_voiding_url ⇒ Object
Returns the value of attribute freightquote_voiding_url.
-
#handling_instructions ⇒ Object
Returns the value of attribute handling_instructions.
-
#has_loading_dock ⇒ Object
Returns the value of attribute has_loading_dock.
-
#image_type ⇒ Object
Returns the value of attribute image_type.
-
#include_first_class_mail_options ⇒ Object
Returns the value of attribute include_first_class_mail_options.
-
#insured_value ⇒ Object
Returns the value of attribute insured_value.
-
#is_construction_site ⇒ Object
Returns the value of attribute is_construction_site.
-
#is_trade_show ⇒ Object
Returns the value of attribute is_trade_show.
-
#label_type ⇒ Object
Returns the value of attribute label_type.
-
#limited_access ⇒ Object
Returns the value of attribute limited_access.
-
#line_items ⇒ Object
Returns the value of attribute line_items.
-
#master_tracking_number ⇒ Object
Returns the value of attribute master_tracking_number.
-
#measure_height ⇒ Object
Returns the value of attribute measure_height.
-
#measure_length ⇒ Object
Returns the value of attribute measure_length.
-
#measure_units ⇒ Object
Returns the value of attribute measure_units.
-
#measure_width ⇒ Object
Returns the value of attribute measure_width.
-
#media_mail ⇒ Object
Returns the value of attribute media_mail.
-
#multiple_piece_shipping ⇒ Object
Returns the value of attribute multiple_piece_shipping.
-
#negotiated_rates ⇒ Object
Returns the value of attribute negotiated_rates.
-
#package ⇒ Object
Returns the value of attribute package.
-
#package_count ⇒ Object
Returns the value of attribute package_count.
-
#package_sequence_number ⇒ Object
Returns the value of attribute package_sequence_number.
-
#package_total ⇒ Object
Returns the value of attribute package_total.
-
#packages ⇒ Object
Returns the value of attribute packages.
-
#packaging_type ⇒ Object
Returns the value of attribute packaging_type.
-
#pay_type ⇒ Object
Returns the value of attribute pay_type.
-
#phone ⇒ Object
Returns the value of attribute phone.
-
#pickup_datetime ⇒ Object
Returns the value of attribute pickup_datetime.
-
#pickup_instructions ⇒ Object
Returns the value of attribute pickup_instructions.
-
#plain_response ⇒ Object
readonly
Returns the value of attribute plain_response.
-
#price ⇒ Object
Returns the value of attribute price.
-
#rate_data ⇒ Object
Returns the value of attribute rate_data.
-
#reference_number_1 ⇒ Object
Returns the value of attribute reference_number_1.
-
#reference_number_2 ⇒ Object
Returns the value of attribute reference_number_2.
-
#reference_number_3 ⇒ Object
Returns the value of attribute reference_number_3.
-
#reference_number_code_1 ⇒ Object
Returns the value of attribute reference_number_code_1.
-
#reference_number_code_2 ⇒ Object
Returns the value of attribute reference_number_code_2.
-
#required ⇒ Object
readonly
Returns the value of attribute required.
-
#requires_appointment ⇒ Object
Returns the value of attribute requires_appointment.
-
#requires_inside_delivery ⇒ Object
Returns the value of attribute requires_inside_delivery.
-
#requires_liftgate ⇒ Object
Returns the value of attribute requires_liftgate.
-
#response ⇒ Object
readonly
Returns the value of attribute response.
-
#return_to_address ⇒ Object
Returns the value of attribute return_to_address.
-
#return_to_address2 ⇒ Object
Returns the value of attribute return_to_address2.
-
#return_to_address3 ⇒ Object
Returns the value of attribute return_to_address3.
-
#return_to_address_residential ⇒ Object
Returns the value of attribute return_to_address_residential.
-
#return_to_attention_name ⇒ Object
Returns the value of attribute return_to_attention_name.
-
#return_to_city ⇒ Object
Returns the value of attribute return_to_city.
-
#return_to_company ⇒ Object
Returns the value of attribute return_to_company.
-
#return_to_country ⇒ Object
Returns the value of attribute return_to_country.
-
#return_to_email ⇒ Object
Returns the value of attribute return_to_email.
-
#return_to_has_loading_dock ⇒ Object
Returns the value of attribute return_to_has_loading_dock.
-
#return_to_is_construction_site ⇒ Object
Returns the value of attribute return_to_is_construction_site.
-
#return_to_is_trade_show ⇒ Object
Returns the value of attribute return_to_is_trade_show.
-
#return_to_limited_access ⇒ Object
Returns the value of attribute return_to_limited_access.
-
#return_to_name ⇒ Object
Returns the value of attribute return_to_name.
-
#return_to_phone ⇒ Object
Returns the value of attribute return_to_phone.
-
#return_to_requires_appointment ⇒ Object
Returns the value of attribute return_to_requires_appointment.
-
#return_to_requires_inside_delivery ⇒ Object
Returns the value of attribute return_to_requires_inside_delivery.
-
#return_to_requires_liftgate ⇒ Object
Returns the value of attribute return_to_requires_liftgate.
-
#return_to_state ⇒ Object
Returns the value of attribute return_to_state.
-
#return_to_zip ⇒ Object
Returns the value of attribute return_to_zip.
-
#rl_carriers_api_key ⇒ Object
Returns the value of attribute rl_carriers_api_key.
-
#rl_carriers_shipping_url ⇒ Object
Returns the value of attribute rl_carriers_shipping_url.
-
#saturday_delivery ⇒ Object
Returns the value of attribute saturday_delivery.
-
#sender_address ⇒ Object
Returns the value of attribute sender_address.
-
#sender_address2 ⇒ Object
Returns the value of attribute sender_address2.
-
#sender_address3 ⇒ Object
Returns the value of attribute sender_address3.
-
#sender_address_residential ⇒ Object
Returns the value of attribute sender_address_residential.
-
#sender_attention_name ⇒ Object
Returns the value of attribute sender_attention_name.
-
#sender_city ⇒ Object
Returns the value of attribute sender_city.
-
#sender_company ⇒ Object
Returns the value of attribute sender_company.
-
#sender_country ⇒ Object
Returns the value of attribute sender_country.
-
#sender_email ⇒ Object
Returns the value of attribute sender_email.
-
#sender_has_loading_dock ⇒ Object
Returns the value of attribute sender_has_loading_dock.
-
#sender_is_construction_site ⇒ Object
Returns the value of attribute sender_is_construction_site.
-
#sender_is_trade_show ⇒ Object
Returns the value of attribute sender_is_trade_show.
-
#sender_limited_access ⇒ Object
Returns the value of attribute sender_limited_access.
-
#sender_name ⇒ Object
Returns the value of attribute sender_name.
-
#sender_phone ⇒ Object
Returns the value of attribute sender_phone.
-
#sender_requires_appointment ⇒ Object
Returns the value of attribute sender_requires_appointment.
-
#sender_requires_inside_delivery ⇒ Object
Returns the value of attribute sender_requires_inside_delivery.
-
#sender_requires_liftgate ⇒ Object
Returns the value of attribute sender_requires_liftgate.
-
#sender_state ⇒ Object
Returns the value of attribute sender_state.
-
#sender_tax_identification_number ⇒ Object
Returns the value of attribute sender_tax_identification_number.
-
#sender_zip ⇒ Object
Returns the value of attribute sender_zip.
-
#service_code ⇒ Object
Returns the value of attribute service_code.
-
#service_type ⇒ Object
Returns the value of attribute service_type.
-
#services ⇒ Object
readonly
Returns the value of attribute services.
-
#ship_date ⇒ Object
Returns the value of attribute ship_date.
-
#shipengine_api_key ⇒ Object
Returns the value of attribute shipengine_api_key.
-
#shipengine_canadapost_account_id ⇒ Object
Returns the value of attribute shipengine_canadapost_account_id.
-
#shipengine_canadapost_parent_account_number ⇒ Object
Returns the value of attribute shipengine_canadapost_parent_account_number.
-
#shipengine_canpar_account_id ⇒ Object
Returns the value of attribute shipengine_canpar_account_id.
-
#shipengine_dhl_express_account_id ⇒ Object
Returns the value of attribute shipengine_dhl_express_account_id.
-
#shipengine_fed_ex_account_id ⇒ Object
Returns the value of attribute shipengine_fed_ex_account_id.
-
#shipengine_fed_ex_ca_account_id ⇒ Object
Returns the value of attribute shipengine_fed_ex_ca_account_id.
-
#shipengine_purolator_account_id ⇒ Object
Returns the value of attribute shipengine_purolator_account_id.
-
#shipengine_ups_account_id ⇒ Object
Returns the value of attribute shipengine_ups_account_id.
-
#shipengine_ups_ca_account_id ⇒ Object
Returns the value of attribute shipengine_ups_ca_account_id.
-
#shipengine_usps_account_id ⇒ Object
Returns the value of attribute shipengine_usps_account_id.
-
#shipper_address ⇒ Object
Returns the value of attribute shipper_address.
-
#shipper_address2 ⇒ Object
Returns the value of attribute shipper_address2.
-
#shipper_address3 ⇒ Object
Returns the value of attribute shipper_address3.
-
#shipper_address_residential ⇒ Object
Returns the value of attribute shipper_address_residential.
-
#shipper_attention_name ⇒ Object
Returns the value of attribute shipper_attention_name.
-
#shipper_city ⇒ Object
Returns the value of attribute shipper_city.
-
#shipper_company ⇒ Object
Returns the value of attribute shipper_company.
-
#shipper_country ⇒ Object
Returns the value of attribute shipper_country.
-
#shipper_email ⇒ Object
Returns the value of attribute shipper_email.
-
#shipper_has_loading_dock ⇒ Object
Returns the value of attribute shipper_has_loading_dock.
-
#shipper_is_construction_site ⇒ Object
Returns the value of attribute shipper_is_construction_site.
-
#shipper_is_trade_show ⇒ Object
Returns the value of attribute shipper_is_trade_show.
-
#shipper_limited_access ⇒ Object
Returns the value of attribute shipper_limited_access.
-
#shipper_name ⇒ Object
Returns the value of attribute shipper_name.
-
#shipper_phone ⇒ Object
Returns the value of attribute shipper_phone.
-
#shipper_requires_appointment ⇒ Object
Returns the value of attribute shipper_requires_appointment.
-
#shipper_requires_inside_delivery ⇒ Object
Returns the value of attribute shipper_requires_inside_delivery.
-
#shipper_requires_liftgate ⇒ Object
Returns the value of attribute shipper_requires_liftgate.
-
#shipper_state ⇒ Object
Returns the value of attribute shipper_state.
-
#shipper_zip ⇒ Object
Returns the value of attribute shipper_zip.
-
#signature_confirmation ⇒ Object
Returns the value of attribute signature_confirmation.
-
#skip_png_download ⇒ Object
Returns the value of attribute skip_png_download.
-
#skip_rate_test ⇒ Object
Returns the value of attribute skip_rate_test.
-
#special_instructions ⇒ Object
Returns the value of attribute special_instructions.
-
#state ⇒ Object
Returns the value of attribute state.
-
#tax_identification_number ⇒ Object
Returns the value of attribute tax_identification_number.
-
#time_in_transit ⇒ Object
Returns the value of attribute time_in_transit.
-
#total_shipment_weight ⇒ Object
Returns the value of attribute total_shipment_weight.
-
#transaction_type ⇒ Object
Returns the value of attribute transaction_type.
-
#weight ⇒ Object
Returns the value of attribute weight.
-
#weight_units ⇒ Object
Returns the value of attribute weight_units.
-
#zip ⇒ Object
Returns the value of attribute zip.
Class Method Summary collapse
Instance Method Summary collapse
-
#fedex ⇒ Object
Initializes an instance of Shipping::FedEx with the same instance variables as the base object.
-
#initialize(options = {}) ⇒ Base
constructor
A new instance of Base.
-
#purolator ⇒ Object
Initializes an instance of Shipping::Purolator with the same instance variables as the base object.
-
#ups ⇒ Object
Initializes an instance of Shipping::Ups with the same instance variables as the base object.
-
#ups_freight ⇒ Object
Initializes an instance of Shipping::UpsFreight with the same instance variables as the base object.
Constructor Details
#initialize(options = {}) ⇒ Base
Returns a new instance of Base.
65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 |
# File 'app/services/shipping/base.rb', line 65 def initialize( = {}) @required = [] @services = [] # include all provided data .each do |method, value| instance_variable_set(:"@#{method}", value) end case [:carrier] when 'fedex' fedex when 'ups' ups when 'ups_freight' ups_freight when 'purolator' purolator when nil else raise ShippingError, "unknown carrier: #{[:carrier]}" end end |
Instance Attribute Details
#address ⇒ Object
Returns the value of attribute address.
16 17 18 |
# File 'app/services/shipping/base.rb', line 16 def address @address end |
#address2 ⇒ Object
Returns the value of attribute address2.
16 17 18 |
# File 'app/services/shipping/base.rb', line 16 def address2 @address2 end |
#address3 ⇒ Object
Returns the value of attribute address3.
16 17 18 |
# File 'app/services/shipping/base.rb', line 16 def address3 @address3 end |
#address_residential ⇒ Object
Returns the value of attribute address_residential.
16 17 18 |
# File 'app/services/shipping/base.rb', line 16 def address_residential @address_residential end |
#attention_name ⇒ Object
Returns the value of attribute attention_name.
16 17 18 |
# File 'app/services/shipping/base.rb', line 16 def attention_name @attention_name end |
#billing_account ⇒ Object
Returns the value of attribute billing_account.
16 17 18 |
# File 'app/services/shipping/base.rb', line 16 def billing_account @billing_account end |
#billing_country ⇒ Object
Returns the value of attribute billing_country.
16 17 18 |
# File 'app/services/shipping/base.rb', line 16 def billing_country @billing_country end |
#billing_zip ⇒ Object
Returns the value of attribute billing_zip.
16 17 18 |
# File 'app/services/shipping/base.rb', line 16 def billing_zip @billing_zip end |
#ci_comments ⇒ Object
Returns the value of attribute ci_comments.
16 17 18 |
# File 'app/services/shipping/base.rb', line 16 def ci_comments @ci_comments end |
#city ⇒ Object
Returns the value of attribute city.
16 17 18 |
# File 'app/services/shipping/base.rb', line 16 def city @city end |
#close_report_only ⇒ Object
Returns the value of attribute close_report_only.
16 17 18 |
# File 'app/services/shipping/base.rb', line 16 def close_report_only @close_report_only end |
#cod_amount ⇒ Object
Returns the value of attribute cod_amount.
16 17 18 |
# File 'app/services/shipping/base.rb', line 16 def cod_amount @cod_amount end |
#cod_collection_type ⇒ Object
Returns the value of attribute cod_collection_type.
16 17 18 |
# File 'app/services/shipping/base.rb', line 16 def cod_collection_type @cod_collection_type end |
#company ⇒ Object Also known as: name
Returns the value of attribute company.
16 17 18 |
# File 'app/services/shipping/base.rb', line 16 def company @company end |
#country ⇒ Object
Returns the value of attribute country.
16 17 18 |
# File 'app/services/shipping/base.rb', line 16 def country @country end |
#currency_code ⇒ Object
Returns the value of attribute currency_code.
16 17 18 |
# File 'app/services/shipping/base.rb', line 16 def currency_code @currency_code end |
#data ⇒ Object (readonly)
Returns the value of attribute data.
14 15 16 |
# File 'app/services/shipping/base.rb', line 14 def data @data end |
#debug ⇒ Object
Returns the value of attribute debug.
16 17 18 |
# File 'app/services/shipping/base.rb', line 16 def debug @debug end |
#declared_value ⇒ Object
Returns the value of attribute declared_value.
16 17 18 |
# File 'app/services/shipping/base.rb', line 16 def declared_value @declared_value end |
#delivery_instructions ⇒ Object
Returns the value of attribute delivery_instructions.
16 17 18 |
# File 'app/services/shipping/base.rb', line 16 def delivery_instructions @delivery_instructions end |
#delivery_total_value ⇒ Object
Returns the value of attribute delivery_total_value.
16 17 18 |
# File 'app/services/shipping/base.rb', line 16 def delivery_total_value @delivery_total_value end |
#description ⇒ Object
Returns the value of attribute description.
16 17 18 |
# File 'app/services/shipping/base.rb', line 16 def description @description end |
#discount_price ⇒ Object
Returns the value of attribute discount_price.
16 17 18 |
# File 'app/services/shipping/base.rb', line 16 def discount_price @discount_price end |
#dropoff_type ⇒ Object
Returns the value of attribute dropoff_type.
16 17 18 |
# File 'app/services/shipping/base.rb', line 16 def dropoff_type @dropoff_type end |
#email ⇒ Object
Returns the value of attribute email.
16 17 18 |
# File 'app/services/shipping/base.rb', line 16 def email @email end |
#eta ⇒ Object
Returns the value of attribute eta.
16 17 18 |
# File 'app/services/shipping/base.rb', line 16 def eta @eta end |
#export_reason ⇒ Object
Returns the value of attribute export_reason.
16 17 18 |
# File 'app/services/shipping/base.rb', line 16 def export_reason @export_reason end |
#freight_class ⇒ Object
Returns the value of attribute freight_class.
16 17 18 |
# File 'app/services/shipping/base.rb', line 16 def freight_class @freight_class end |
#freightquote_authorization_url ⇒ Object
Returns the value of attribute freightquote_authorization_url.
16 17 18 |
# File 'app/services/shipping/base.rb', line 16 def @freightquote_authorization_url end |
#freightquote_client_id ⇒ Object
Returns the value of attribute freightquote_client_id.
16 17 18 |
# File 'app/services/shipping/base.rb', line 16 def freightquote_client_id @freightquote_client_id end |
#freightquote_client_secret ⇒ Object
Returns the value of attribute freightquote_client_secret.
16 17 18 |
# File 'app/services/shipping/base.rb', line 16 def freightquote_client_secret @freightquote_client_secret end |
#freightquote_customer_code ⇒ Object
Returns the value of attribute freightquote_customer_code.
16 17 18 |
# File 'app/services/shipping/base.rb', line 16 def freightquote_customer_code @freightquote_customer_code end |
#freightquote_events_url ⇒ Object
Returns the value of attribute freightquote_events_url.
16 17 18 |
# File 'app/services/shipping/base.rb', line 16 def freightquote_events_url @freightquote_events_url end |
#freightquote_rating_url ⇒ Object
Returns the value of attribute freightquote_rating_url.
16 17 18 |
# File 'app/services/shipping/base.rb', line 16 def @freightquote_rating_url end |
#freightquote_shipping_url ⇒ Object
Returns the value of attribute freightquote_shipping_url.
16 17 18 |
# File 'app/services/shipping/base.rb', line 16 def freightquote_shipping_url @freightquote_shipping_url end |
#freightquote_voiding_url ⇒ Object
Returns the value of attribute freightquote_voiding_url.
16 17 18 |
# File 'app/services/shipping/base.rb', line 16 def freightquote_voiding_url @freightquote_voiding_url end |
#handling_instructions ⇒ Object
Returns the value of attribute handling_instructions.
16 17 18 |
# File 'app/services/shipping/base.rb', line 16 def handling_instructions @handling_instructions end |
#has_loading_dock ⇒ Object
Returns the value of attribute has_loading_dock.
16 17 18 |
# File 'app/services/shipping/base.rb', line 16 def has_loading_dock @has_loading_dock end |
#image_type ⇒ Object
Returns the value of attribute image_type.
16 17 18 |
# File 'app/services/shipping/base.rb', line 16 def image_type @image_type end |
#include_first_class_mail_options ⇒ Object
Returns the value of attribute include_first_class_mail_options.
16 17 18 |
# File 'app/services/shipping/base.rb', line 16 def @include_first_class_mail_options end |
#insured_value ⇒ Object
Returns the value of attribute insured_value.
16 17 18 |
# File 'app/services/shipping/base.rb', line 16 def insured_value @insured_value end |
#is_construction_site ⇒ Object
Returns the value of attribute is_construction_site.
16 17 18 |
# File 'app/services/shipping/base.rb', line 16 def is_construction_site @is_construction_site end |
#is_trade_show ⇒ Object
Returns the value of attribute is_trade_show.
16 17 18 |
# File 'app/services/shipping/base.rb', line 16 def is_trade_show @is_trade_show end |
#label_type ⇒ Object
Returns the value of attribute label_type.
16 17 18 |
# File 'app/services/shipping/base.rb', line 16 def label_type @label_type end |
#limited_access ⇒ Object
Returns the value of attribute limited_access.
16 17 18 |
# File 'app/services/shipping/base.rb', line 16 def limited_access @limited_access end |
#line_items ⇒ Object
Returns the value of attribute line_items.
16 17 18 |
# File 'app/services/shipping/base.rb', line 16 def line_items @line_items end |
#master_tracking_number ⇒ Object
Returns the value of attribute master_tracking_number.
16 17 18 |
# File 'app/services/shipping/base.rb', line 16 def master_tracking_number @master_tracking_number end |
#measure_height ⇒ Object
Returns the value of attribute measure_height.
16 17 18 |
# File 'app/services/shipping/base.rb', line 16 def measure_height @measure_height end |
#measure_length ⇒ Object
Returns the value of attribute measure_length.
16 17 18 |
# File 'app/services/shipping/base.rb', line 16 def measure_length @measure_length end |
#measure_units ⇒ Object
Returns the value of attribute measure_units.
16 17 18 |
# File 'app/services/shipping/base.rb', line 16 def measure_units @measure_units end |
#measure_width ⇒ Object
Returns the value of attribute measure_width.
16 17 18 |
# File 'app/services/shipping/base.rb', line 16 def measure_width @measure_width end |
#media_mail ⇒ Object
Returns the value of attribute media_mail.
16 17 18 |
# File 'app/services/shipping/base.rb', line 16 def media_mail @media_mail end |
#multiple_piece_shipping ⇒ Object
Returns the value of attribute multiple_piece_shipping.
16 17 18 |
# File 'app/services/shipping/base.rb', line 16 def multiple_piece_shipping @multiple_piece_shipping end |
#negotiated_rates ⇒ Object
Returns the value of attribute negotiated_rates.
16 17 18 |
# File 'app/services/shipping/base.rb', line 16 def negotiated_rates @negotiated_rates end |
#package ⇒ Object
Returns the value of attribute package.
16 17 18 |
# File 'app/services/shipping/base.rb', line 16 def package @package end |
#package_count ⇒ Object
Returns the value of attribute package_count.
16 17 18 |
# File 'app/services/shipping/base.rb', line 16 def package_count @package_count end |
#package_sequence_number ⇒ Object
Returns the value of attribute package_sequence_number.
16 17 18 |
# File 'app/services/shipping/base.rb', line 16 def package_sequence_number @package_sequence_number end |
#package_total ⇒ Object
Returns the value of attribute package_total.
16 17 18 |
# File 'app/services/shipping/base.rb', line 16 def package_total @package_total end |
#packages ⇒ Object
Returns the value of attribute packages.
16 17 18 |
# File 'app/services/shipping/base.rb', line 16 def packages @packages end |
#packaging_type ⇒ Object
Returns the value of attribute packaging_type.
16 17 18 |
# File 'app/services/shipping/base.rb', line 16 def packaging_type @packaging_type end |
#pay_type ⇒ Object
Returns the value of attribute pay_type.
16 17 18 |
# File 'app/services/shipping/base.rb', line 16 def pay_type @pay_type end |
#phone ⇒ Object
Returns the value of attribute phone.
16 17 18 |
# File 'app/services/shipping/base.rb', line 16 def phone @phone end |
#pickup_datetime ⇒ Object
Returns the value of attribute pickup_datetime.
16 17 18 |
# File 'app/services/shipping/base.rb', line 16 def pickup_datetime @pickup_datetime end |
#pickup_instructions ⇒ Object
Returns the value of attribute pickup_instructions.
16 17 18 |
# File 'app/services/shipping/base.rb', line 16 def pickup_instructions @pickup_instructions end |
#plain_response ⇒ Object (readonly)
Returns the value of attribute plain_response.
14 15 16 |
# File 'app/services/shipping/base.rb', line 14 def plain_response @plain_response end |
#price ⇒ Object
Returns the value of attribute price.
16 17 18 |
# File 'app/services/shipping/base.rb', line 16 def price @price end |
#rate_data ⇒ Object
Returns the value of attribute rate_data.
16 17 18 |
# File 'app/services/shipping/base.rb', line 16 def rate_data @rate_data end |
#reference_number_1 ⇒ Object
Returns the value of attribute reference_number_1.
16 17 18 |
# File 'app/services/shipping/base.rb', line 16 def reference_number_1 @reference_number_1 end |
#reference_number_2 ⇒ Object
Returns the value of attribute reference_number_2.
16 17 18 |
# File 'app/services/shipping/base.rb', line 16 def reference_number_2 @reference_number_2 end |
#reference_number_3 ⇒ Object
Returns the value of attribute reference_number_3.
16 17 18 |
# File 'app/services/shipping/base.rb', line 16 def reference_number_3 @reference_number_3 end |
#reference_number_code_1 ⇒ Object
Returns the value of attribute reference_number_code_1.
16 17 18 |
# File 'app/services/shipping/base.rb', line 16 def reference_number_code_1 @reference_number_code_1 end |
#reference_number_code_2 ⇒ Object
Returns the value of attribute reference_number_code_2.
16 17 18 |
# File 'app/services/shipping/base.rb', line 16 def reference_number_code_2 @reference_number_code_2 end |
#required ⇒ Object (readonly)
Returns the value of attribute required.
14 15 16 |
# File 'app/services/shipping/base.rb', line 14 def required @required end |
#requires_appointment ⇒ Object
Returns the value of attribute requires_appointment.
16 17 18 |
# File 'app/services/shipping/base.rb', line 16 def requires_appointment @requires_appointment end |
#requires_inside_delivery ⇒ Object
Returns the value of attribute requires_inside_delivery.
16 17 18 |
# File 'app/services/shipping/base.rb', line 16 def requires_inside_delivery @requires_inside_delivery end |
#requires_liftgate ⇒ Object
Returns the value of attribute requires_liftgate.
16 17 18 |
# File 'app/services/shipping/base.rb', line 16 def requires_liftgate @requires_liftgate end |
#response ⇒ Object (readonly)
Returns the value of attribute response.
14 15 16 |
# File 'app/services/shipping/base.rb', line 14 def response @response end |
#return_to_address ⇒ Object
Returns the value of attribute return_to_address.
16 17 18 |
# File 'app/services/shipping/base.rb', line 16 def return_to_address @return_to_address end |
#return_to_address2 ⇒ Object
Returns the value of attribute return_to_address2.
16 17 18 |
# File 'app/services/shipping/base.rb', line 16 def return_to_address2 @return_to_address2 end |
#return_to_address3 ⇒ Object
Returns the value of attribute return_to_address3.
16 17 18 |
# File 'app/services/shipping/base.rb', line 16 def return_to_address3 @return_to_address3 end |
#return_to_address_residential ⇒ Object
Returns the value of attribute return_to_address_residential.
16 17 18 |
# File 'app/services/shipping/base.rb', line 16 def return_to_address_residential @return_to_address_residential end |
#return_to_attention_name ⇒ Object
Returns the value of attribute return_to_attention_name.
16 17 18 |
# File 'app/services/shipping/base.rb', line 16 def return_to_attention_name @return_to_attention_name end |
#return_to_city ⇒ Object
Returns the value of attribute return_to_city.
16 17 18 |
# File 'app/services/shipping/base.rb', line 16 def return_to_city @return_to_city end |
#return_to_company ⇒ Object
Returns the value of attribute return_to_company.
16 17 18 |
# File 'app/services/shipping/base.rb', line 16 def return_to_company @return_to_company end |
#return_to_country ⇒ Object
Returns the value of attribute return_to_country.
16 17 18 |
# File 'app/services/shipping/base.rb', line 16 def return_to_country @return_to_country end |
#return_to_email ⇒ Object
Returns the value of attribute return_to_email.
16 17 18 |
# File 'app/services/shipping/base.rb', line 16 def return_to_email @return_to_email end |
#return_to_has_loading_dock ⇒ Object
Returns the value of attribute return_to_has_loading_dock.
16 17 18 |
# File 'app/services/shipping/base.rb', line 16 def return_to_has_loading_dock @return_to_has_loading_dock end |
#return_to_is_construction_site ⇒ Object
Returns the value of attribute return_to_is_construction_site.
16 17 18 |
# File 'app/services/shipping/base.rb', line 16 def return_to_is_construction_site @return_to_is_construction_site end |
#return_to_is_trade_show ⇒ Object
Returns the value of attribute return_to_is_trade_show.
16 17 18 |
# File 'app/services/shipping/base.rb', line 16 def return_to_is_trade_show @return_to_is_trade_show end |
#return_to_limited_access ⇒ Object
Returns the value of attribute return_to_limited_access.
16 17 18 |
# File 'app/services/shipping/base.rb', line 16 def return_to_limited_access @return_to_limited_access end |
#return_to_name ⇒ Object
Returns the value of attribute return_to_name.
16 17 18 |
# File 'app/services/shipping/base.rb', line 16 def return_to_name @return_to_name end |
#return_to_phone ⇒ Object
Returns the value of attribute return_to_phone.
16 17 18 |
# File 'app/services/shipping/base.rb', line 16 def return_to_phone @return_to_phone end |
#return_to_requires_appointment ⇒ Object
Returns the value of attribute return_to_requires_appointment.
16 17 18 |
# File 'app/services/shipping/base.rb', line 16 def return_to_requires_appointment @return_to_requires_appointment end |
#return_to_requires_inside_delivery ⇒ Object
Returns the value of attribute return_to_requires_inside_delivery.
16 17 18 |
# File 'app/services/shipping/base.rb', line 16 def return_to_requires_inside_delivery @return_to_requires_inside_delivery end |
#return_to_requires_liftgate ⇒ Object
Returns the value of attribute return_to_requires_liftgate.
16 17 18 |
# File 'app/services/shipping/base.rb', line 16 def return_to_requires_liftgate @return_to_requires_liftgate end |
#return_to_state ⇒ Object
Returns the value of attribute return_to_state.
16 17 18 |
# File 'app/services/shipping/base.rb', line 16 def return_to_state @return_to_state end |
#return_to_zip ⇒ Object
Returns the value of attribute return_to_zip.
16 17 18 |
# File 'app/services/shipping/base.rb', line 16 def return_to_zip @return_to_zip end |
#rl_carriers_api_key ⇒ Object
Returns the value of attribute rl_carriers_api_key.
16 17 18 |
# File 'app/services/shipping/base.rb', line 16 def rl_carriers_api_key @rl_carriers_api_key end |
#rl_carriers_shipping_url ⇒ Object
Returns the value of attribute rl_carriers_shipping_url.
16 17 18 |
# File 'app/services/shipping/base.rb', line 16 def rl_carriers_shipping_url @rl_carriers_shipping_url end |
#saturday_delivery ⇒ Object
Returns the value of attribute saturday_delivery.
16 17 18 |
# File 'app/services/shipping/base.rb', line 16 def saturday_delivery @saturday_delivery end |
#sender_address ⇒ Object
Returns the value of attribute sender_address.
16 17 18 |
# File 'app/services/shipping/base.rb', line 16 def sender_address @sender_address end |
#sender_address2 ⇒ Object
Returns the value of attribute sender_address2.
16 17 18 |
# File 'app/services/shipping/base.rb', line 16 def sender_address2 @sender_address2 end |
#sender_address3 ⇒ Object
Returns the value of attribute sender_address3.
16 17 18 |
# File 'app/services/shipping/base.rb', line 16 def sender_address3 @sender_address3 end |
#sender_address_residential ⇒ Object
Returns the value of attribute sender_address_residential.
16 17 18 |
# File 'app/services/shipping/base.rb', line 16 def sender_address_residential @sender_address_residential end |
#sender_attention_name ⇒ Object
Returns the value of attribute sender_attention_name.
16 17 18 |
# File 'app/services/shipping/base.rb', line 16 def sender_attention_name @sender_attention_name end |
#sender_city ⇒ Object
Returns the value of attribute sender_city.
16 17 18 |
# File 'app/services/shipping/base.rb', line 16 def sender_city @sender_city end |
#sender_company ⇒ Object
Returns the value of attribute sender_company.
16 17 18 |
# File 'app/services/shipping/base.rb', line 16 def sender_company @sender_company end |
#sender_country ⇒ Object
Returns the value of attribute sender_country.
16 17 18 |
# File 'app/services/shipping/base.rb', line 16 def sender_country @sender_country end |
#sender_email ⇒ Object
Returns the value of attribute sender_email.
16 17 18 |
# File 'app/services/shipping/base.rb', line 16 def sender_email @sender_email end |
#sender_has_loading_dock ⇒ Object
Returns the value of attribute sender_has_loading_dock.
16 17 18 |
# File 'app/services/shipping/base.rb', line 16 def sender_has_loading_dock @sender_has_loading_dock end |
#sender_is_construction_site ⇒ Object
Returns the value of attribute sender_is_construction_site.
16 17 18 |
# File 'app/services/shipping/base.rb', line 16 def sender_is_construction_site @sender_is_construction_site end |
#sender_is_trade_show ⇒ Object
Returns the value of attribute sender_is_trade_show.
16 17 18 |
# File 'app/services/shipping/base.rb', line 16 def sender_is_trade_show @sender_is_trade_show end |
#sender_limited_access ⇒ Object
Returns the value of attribute sender_limited_access.
16 17 18 |
# File 'app/services/shipping/base.rb', line 16 def sender_limited_access @sender_limited_access end |
#sender_name ⇒ Object
Returns the value of attribute sender_name.
16 17 18 |
# File 'app/services/shipping/base.rb', line 16 def sender_name @sender_name end |
#sender_phone ⇒ Object
Returns the value of attribute sender_phone.
16 17 18 |
# File 'app/services/shipping/base.rb', line 16 def sender_phone @sender_phone end |
#sender_requires_appointment ⇒ Object
Returns the value of attribute sender_requires_appointment.
16 17 18 |
# File 'app/services/shipping/base.rb', line 16 def sender_requires_appointment @sender_requires_appointment end |
#sender_requires_inside_delivery ⇒ Object
Returns the value of attribute sender_requires_inside_delivery.
16 17 18 |
# File 'app/services/shipping/base.rb', line 16 def sender_requires_inside_delivery @sender_requires_inside_delivery end |
#sender_requires_liftgate ⇒ Object
Returns the value of attribute sender_requires_liftgate.
16 17 18 |
# File 'app/services/shipping/base.rb', line 16 def sender_requires_liftgate @sender_requires_liftgate end |
#sender_state ⇒ Object
Returns the value of attribute sender_state.
16 17 18 |
# File 'app/services/shipping/base.rb', line 16 def sender_state @sender_state end |
#sender_tax_identification_number ⇒ Object
Returns the value of attribute sender_tax_identification_number.
16 17 18 |
# File 'app/services/shipping/base.rb', line 16 def sender_tax_identification_number @sender_tax_identification_number end |
#sender_zip ⇒ Object
Returns the value of attribute sender_zip.
16 17 18 |
# File 'app/services/shipping/base.rb', line 16 def sender_zip @sender_zip end |
#service_code ⇒ Object
Returns the value of attribute service_code.
16 17 18 |
# File 'app/services/shipping/base.rb', line 16 def service_code @service_code end |
#service_type ⇒ Object
Returns the value of attribute service_type.
16 17 18 |
# File 'app/services/shipping/base.rb', line 16 def service_type @service_type end |
#services ⇒ Object (readonly)
Returns the value of attribute services.
14 15 16 |
# File 'app/services/shipping/base.rb', line 14 def services @services end |
#ship_date ⇒ Object
Returns the value of attribute ship_date.
16 17 18 |
# File 'app/services/shipping/base.rb', line 16 def ship_date @ship_date end |
#shipengine_api_key ⇒ Object
Returns the value of attribute shipengine_api_key.
16 17 18 |
# File 'app/services/shipping/base.rb', line 16 def shipengine_api_key @shipengine_api_key end |
#shipengine_canadapost_account_id ⇒ Object
Returns the value of attribute shipengine_canadapost_account_id.
16 17 18 |
# File 'app/services/shipping/base.rb', line 16 def shipengine_canadapost_account_id @shipengine_canadapost_account_id end |
#shipengine_canadapost_parent_account_number ⇒ Object
Returns the value of attribute shipengine_canadapost_parent_account_number.
16 17 18 |
# File 'app/services/shipping/base.rb', line 16 def shipengine_canadapost_parent_account_number @shipengine_canadapost_parent_account_number end |
#shipengine_canpar_account_id ⇒ Object
Returns the value of attribute shipengine_canpar_account_id.
16 17 18 |
# File 'app/services/shipping/base.rb', line 16 def shipengine_canpar_account_id @shipengine_canpar_account_id end |
#shipengine_dhl_express_account_id ⇒ Object
Returns the value of attribute shipengine_dhl_express_account_id.
16 17 18 |
# File 'app/services/shipping/base.rb', line 16 def shipengine_dhl_express_account_id @shipengine_dhl_express_account_id end |
#shipengine_fed_ex_account_id ⇒ Object
Returns the value of attribute shipengine_fed_ex_account_id.
16 17 18 |
# File 'app/services/shipping/base.rb', line 16 def shipengine_fed_ex_account_id @shipengine_fed_ex_account_id end |
#shipengine_fed_ex_ca_account_id ⇒ Object
Returns the value of attribute shipengine_fed_ex_ca_account_id.
16 17 18 |
# File 'app/services/shipping/base.rb', line 16 def shipengine_fed_ex_ca_account_id @shipengine_fed_ex_ca_account_id end |
#shipengine_purolator_account_id ⇒ Object
Returns the value of attribute shipengine_purolator_account_id.
16 17 18 |
# File 'app/services/shipping/base.rb', line 16 def shipengine_purolator_account_id @shipengine_purolator_account_id end |
#shipengine_ups_account_id ⇒ Object
Returns the value of attribute shipengine_ups_account_id.
16 17 18 |
# File 'app/services/shipping/base.rb', line 16 def shipengine_ups_account_id @shipengine_ups_account_id end |
#shipengine_ups_ca_account_id ⇒ Object
Returns the value of attribute shipengine_ups_ca_account_id.
16 17 18 |
# File 'app/services/shipping/base.rb', line 16 def shipengine_ups_ca_account_id @shipengine_ups_ca_account_id end |
#shipengine_usps_account_id ⇒ Object
Returns the value of attribute shipengine_usps_account_id.
16 17 18 |
# File 'app/services/shipping/base.rb', line 16 def shipengine_usps_account_id @shipengine_usps_account_id end |
#shipper_address ⇒ Object
Returns the value of attribute shipper_address.
16 17 18 |
# File 'app/services/shipping/base.rb', line 16 def shipper_address @shipper_address end |
#shipper_address2 ⇒ Object
Returns the value of attribute shipper_address2.
16 17 18 |
# File 'app/services/shipping/base.rb', line 16 def shipper_address2 @shipper_address2 end |
#shipper_address3 ⇒ Object
Returns the value of attribute shipper_address3.
16 17 18 |
# File 'app/services/shipping/base.rb', line 16 def shipper_address3 @shipper_address3 end |
#shipper_address_residential ⇒ Object
Returns the value of attribute shipper_address_residential.
16 17 18 |
# File 'app/services/shipping/base.rb', line 16 def shipper_address_residential @shipper_address_residential end |
#shipper_attention_name ⇒ Object
Returns the value of attribute shipper_attention_name.
16 17 18 |
# File 'app/services/shipping/base.rb', line 16 def shipper_attention_name @shipper_attention_name end |
#shipper_city ⇒ Object
Returns the value of attribute shipper_city.
16 17 18 |
# File 'app/services/shipping/base.rb', line 16 def shipper_city @shipper_city end |
#shipper_company ⇒ Object
Returns the value of attribute shipper_company.
16 17 18 |
# File 'app/services/shipping/base.rb', line 16 def shipper_company @shipper_company end |
#shipper_country ⇒ Object
Returns the value of attribute shipper_country.
16 17 18 |
# File 'app/services/shipping/base.rb', line 16 def shipper_country @shipper_country end |
#shipper_email ⇒ Object
Returns the value of attribute shipper_email.
16 17 18 |
# File 'app/services/shipping/base.rb', line 16 def shipper_email @shipper_email end |
#shipper_has_loading_dock ⇒ Object
Returns the value of attribute shipper_has_loading_dock.
16 17 18 |
# File 'app/services/shipping/base.rb', line 16 def shipper_has_loading_dock @shipper_has_loading_dock end |
#shipper_is_construction_site ⇒ Object
Returns the value of attribute shipper_is_construction_site.
16 17 18 |
# File 'app/services/shipping/base.rb', line 16 def shipper_is_construction_site @shipper_is_construction_site end |
#shipper_is_trade_show ⇒ Object
Returns the value of attribute shipper_is_trade_show.
16 17 18 |
# File 'app/services/shipping/base.rb', line 16 def shipper_is_trade_show @shipper_is_trade_show end |
#shipper_limited_access ⇒ Object
Returns the value of attribute shipper_limited_access.
16 17 18 |
# File 'app/services/shipping/base.rb', line 16 def shipper_limited_access @shipper_limited_access end |
#shipper_name ⇒ Object
Returns the value of attribute shipper_name.
16 17 18 |
# File 'app/services/shipping/base.rb', line 16 def shipper_name @shipper_name end |
#shipper_phone ⇒ Object
Returns the value of attribute shipper_phone.
16 17 18 |
# File 'app/services/shipping/base.rb', line 16 def shipper_phone @shipper_phone end |
#shipper_requires_appointment ⇒ Object
Returns the value of attribute shipper_requires_appointment.
16 17 18 |
# File 'app/services/shipping/base.rb', line 16 def shipper_requires_appointment @shipper_requires_appointment end |
#shipper_requires_inside_delivery ⇒ Object
Returns the value of attribute shipper_requires_inside_delivery.
16 17 18 |
# File 'app/services/shipping/base.rb', line 16 def shipper_requires_inside_delivery @shipper_requires_inside_delivery end |
#shipper_requires_liftgate ⇒ Object
Returns the value of attribute shipper_requires_liftgate.
16 17 18 |
# File 'app/services/shipping/base.rb', line 16 def shipper_requires_liftgate @shipper_requires_liftgate end |
#shipper_state ⇒ Object
Returns the value of attribute shipper_state.
16 17 18 |
# File 'app/services/shipping/base.rb', line 16 def shipper_state @shipper_state end |
#shipper_zip ⇒ Object
Returns the value of attribute shipper_zip.
16 17 18 |
# File 'app/services/shipping/base.rb', line 16 def shipper_zip @shipper_zip end |
#signature_confirmation ⇒ Object
Returns the value of attribute signature_confirmation.
16 17 18 |
# File 'app/services/shipping/base.rb', line 16 def signature_confirmation @signature_confirmation end |
#skip_png_download ⇒ Object
Returns the value of attribute skip_png_download.
16 17 18 |
# File 'app/services/shipping/base.rb', line 16 def skip_png_download @skip_png_download end |
#skip_rate_test ⇒ Object
Returns the value of attribute skip_rate_test.
16 17 18 |
# File 'app/services/shipping/base.rb', line 16 def skip_rate_test @skip_rate_test end |
#special_instructions ⇒ Object
Returns the value of attribute special_instructions.
16 17 18 |
# File 'app/services/shipping/base.rb', line 16 def special_instructions @special_instructions end |
#state ⇒ Object
Returns the value of attribute state.
16 17 18 |
# File 'app/services/shipping/base.rb', line 16 def state @state end |
#tax_identification_number ⇒ Object
Returns the value of attribute tax_identification_number.
16 17 18 |
# File 'app/services/shipping/base.rb', line 16 def tax_identification_number @tax_identification_number end |
#time_in_transit ⇒ Object
Returns the value of attribute time_in_transit.
16 17 18 |
# File 'app/services/shipping/base.rb', line 16 def time_in_transit @time_in_transit end |
#total_shipment_weight ⇒ Object
Returns the value of attribute total_shipment_weight.
16 17 18 |
# File 'app/services/shipping/base.rb', line 16 def total_shipment_weight @total_shipment_weight end |
#transaction_type ⇒ Object
Returns the value of attribute transaction_type.
16 17 18 |
# File 'app/services/shipping/base.rb', line 16 def transaction_type @transaction_type end |
#weight ⇒ Object
Returns the value of attribute weight.
16 17 18 |
# File 'app/services/shipping/base.rb', line 16 def weight @weight end |
#weight_units ⇒ Object
Returns the value of attribute weight_units.
16 17 18 |
# File 'app/services/shipping/base.rb', line 16 def weight_units @weight_units end |
#zip ⇒ Object
Returns the value of attribute zip.
16 17 18 |
# File 'app/services/shipping/base.rb', line 16 def zip @zip end |
Class Method Details
.state_from_zip(zip) ⇒ Object
109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 |
# File 'app/services/shipping/base.rb', line 109 def self.state_from_zip(zip) zip = zip.to_i { (99_500...99_929) => 'AK', (35_000...36_999) => 'AL', (71_600...72_999) => 'AR', (75_502...75_505) => 'AR', (85_000...86_599) => 'AZ', (90_000...96_199) => 'CA', (80_000...81_699) => 'CO', (6000...6999) => 'CT', (20_000...20_099) => 'DC', (20_200...20_599) => 'DC', (19_700...19_999) => 'DE', (32_000...33_999) => 'FL', (34_100...34_999) => 'FL', (30_000...31_999) => 'GA', (96_700...96_798) => 'HI', (96_800...96_899) => 'HI', (50_000...52_999) => 'IA', (83_200...83_899) => 'ID', (60_000...62_999) => 'IL', (46_000...47_999) => 'IN', (66_000...67_999) => 'KS', (40_000...42_799) => 'KY', (45_275...45_275) => 'KY', (70_000...71_499) => 'LA', (71_749...71_749) => 'LA', (1000...2799) => 'MA', (20_331...20_331) => 'MD', (20_600...21_999) => 'MD', (3801...3801) => 'ME', (3804...3804) => 'ME', (3900...4999) => 'ME', (48_000...49_999) => 'MI', (55_000...56_799) => 'MN', (63_000...65_899) => 'MO', (38_600...39_799) => 'MS', (59_000...59_999) => 'MT', (27_000...28_999) => 'NC', (58_000...58_899) => 'ND', (68_000...69_399) => 'NE', (3000...3803) => 'NH', (3809...3899) => 'NH', (7000...8999) => 'NJ', (87_000...88_499) => 'NM', (89_000...89_899) => 'NV', (400...599) => 'NY', (6390...6390) => 'NY', (9000...14_999) => 'NY', (43_000...45_999) => 'OH', (73_000...73_199) => 'OK', (73_400...74_999) => 'OK', (97_000...97_999) => 'OR', (15_000...19_699) => 'PA', (2800...2999) => 'RI', (6379...6379) => 'RI', (29_000...29_999) => 'SC', (57_000...57_799) => 'SD', (37_000...38_599) => 'TN', (72_395...72_395) => 'TN', (73_300...73_399) => 'TX', (73_949...73_949) => 'TX', (75_000...79_999) => 'TX', (88_501...88_599) => 'TX', (84_000...84_799) => 'UT', (20_105...20_199) => 'VA', (20_301...20_301) => 'VA', (20_370...20_370) => 'VA', (22_000...24_699) => 'VA', (5000...5999) => 'VT', (98_000...99_499) => 'WA', (49_936...49_936) => 'WI', (53_000...54_999) => 'WI', (24_700...26_899) => 'WV', (82_000...83_199) => 'WY' }.each do |range, state| return state if range.include? zip end raise ShippingError, "Invalid zip code: #{zip}" end |
Instance Method Details
#fedex ⇒ Object
Initializes an instance of Shipping::FedEx with the same instance variables as the base object
90 91 92 |
# File 'app/services/shipping/base.rb', line 90 def fedex FedEx.new prepare_vars end |
#purolator ⇒ Object
Initializes an instance of Shipping::Purolator with the same instance variables as the base object
105 106 107 |
# File 'app/services/shipping/base.rb', line 105 def purolator Purolator.new prepare_vars end |
#ups ⇒ Object
Initializes an instance of Shipping::Ups with the same instance variables as the base object
95 96 97 |
# File 'app/services/shipping/base.rb', line 95 def ups Ups.new prepare_vars end |
#ups_freight ⇒ Object
Initializes an instance of Shipping::UpsFreight with the same instance variables as the base object
100 101 102 |
# File 'app/services/shipping/base.rb', line 100 def ups_freight UpsFreight.new prepare_vars end |