Module: USPS
- Defined in:
- lib/usps.rb,
lib/usps/test.rb,
lib/usps/client.rb,
lib/usps/errors.rb,
lib/usps/configuration.rb
Defined Under Namespace
Modules: Request, Response
Classes: Address, AddressNotFoundError, AuthorizationError, Client, Configuration, Error, InvalidCityError, InvalidImageTypeError, InvalidStateError, MultipleAddressError, Test, ValidationError
Class Attribute Summary collapse
Class Method Summary
collapse
Class Attribute Details
.config ⇒ Object
24
25
26
|
# File 'lib/usps.rb', line 24
def config
@config ||= Configuration.new
end
|
Class Method Details
.client ⇒ Object
16
17
18
|
# File 'lib/usps.rb', line 16
def client
@client ||= Client.new
end
|
28
29
30
|
# File 'lib/usps.rb', line 28
def configure(&block)
block.call(self.config)
end
|
.get_city_and_state_for_zip(zip) ⇒ Object
.testing=(val) ⇒ Object
20
21
22
|
# File 'lib/usps.rb', line 20
def testing=(val)
config.testing = val
end
|
.username ⇒ Object
37
38
39
|
# File 'lib/usps.rb', line 37
def username
config.username
end
|
.username=(user) ⇒ Object
These two methods are currently here for backwards compatability
33
34
35
|
# File 'lib/usps.rb', line 33
def username=(user)
config.username = user
end
|