Class: Deliveries::Couriers::MondialRelay::Address
- Inherits:
-
Address
- Object
- Address
- Deliveries::Couriers::MondialRelay::Address
show all
- Defined in:
- lib/deliveries/couriers/mondial_relay/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
Instance Method Details
#city ⇒ Object
13
14
15
|
# File 'lib/deliveries/couriers/mondial_relay/address.rb', line 13
def city
I18n.transliterate(@city.to_s).gsub(/[^A-Z_\-' ]/i, '').upcase.truncate(25, omission: '')
end
|
#country ⇒ Object
17
18
19
|
# File 'lib/deliveries/couriers/mondial_relay/address.rb', line 17
def country
@country.to_s.upcase
end
|
#email ⇒ Object
25
26
27
|
# File 'lib/deliveries/couriers/mondial_relay/address.rb', line 25
def email
format_email
end
|
#name ⇒ Object
5
6
7
|
# File 'lib/deliveries/couriers/mondial_relay/address.rb', line 5
def name
I18n.transliterate(@name.to_s).gsub(%r{[^0-9A-Z_\-'., /]}i, '').upcase.truncate(32, omission: '')
end
|
#phone ⇒ Object
21
22
23
|
# File 'lib/deliveries/couriers/mondial_relay/address.rb', line 21
def phone
format_international_phone
end
|
#street ⇒ Object
9
10
11
|
# File 'lib/deliveries/couriers/mondial_relay/address.rb', line 9
def street
I18n.transliterate(@street.to_s).gsub(%r{[^0-9A-Z_\-'., /]}i, '').upcase.truncate(32, omission: '')
end
|