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