Class: Deliveries::Couriers::CorreosExpress::Address

Inherits:
Address
  • Object
show all
Defined in:
lib/deliveries/couriers/correos_express/address.rb

Constant Summary

Constants inherited from Address

Address::COUNTRY_PHONE_PREFIXES, Address::COUNTRY_TRUNK_PREFIXES

Instance Attribute Summary

Attributes inherited from Address

#address_id, #postcode, #state

Instance Method Summary collapse

Methods inherited from Address

#courierize, #initialize

Constructor Details

This class inherits a constructor from Deliveries::Address

Instance Method Details

#cityObject



13
14
15
# File 'lib/deliveries/couriers/correos_express/address.rb', line 13

def city
  @city.to_s[0, 40]
end

#countryObject



25
26
27
# File 'lib/deliveries/couriers/correos_express/address.rb', line 25

def country
  @country.to_s.upcase
end

#emailObject



21
22
23
# File 'lib/deliveries/couriers/correos_express/address.rb', line 21

def email
  @email.gsub(/\+.+@/, '@').to_s[0, 75]
end

#nameObject



5
6
7
# File 'lib/deliveries/couriers/correos_express/address.rb', line 5

def name
  @name.to_s[0, 40]
end

#phoneObject



17
18
19
# File 'lib/deliveries/couriers/correos_express/address.rb', line 17

def phone
  @phone.to_s[0, 15]
end

#streetObject



9
10
11
# File 'lib/deliveries/couriers/correos_express/address.rb', line 9

def street
  @street.to_s[0, 300]
end