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, ValidationError
Constant Summary
collapse
- VERSION =
'0.1.2'
Class Attribute Summary collapse
Class Method Summary
collapse
Class Attribute Details
.config ⇒ Object
25
26
27
|
# File 'lib/usps.rb', line 25
def config
@config ||= Configuration.new
end
|
Class Method Details
.client ⇒ Object
17
18
19
|
# File 'lib/usps.rb', line 17
def client
@client ||= Client.new
end
|
29
30
31
|
# File 'lib/usps.rb', line 29
def configure(&block)
block.call(self.config)
end
|
.get_city_and_state_for_zip(zip) ⇒ Object
.testing=(val) ⇒ Object
21
22
23
|
# File 'lib/usps.rb', line 21
def testing=(val)
config.testing = val
end
|
.username ⇒ Object
38
39
40
|
# File 'lib/usps.rb', line 38
def username
config.username
end
|
.username=(user) ⇒ Object
These two methods are currently here for backwards compatability
34
35
36
|
# File 'lib/usps.rb', line 34
def username=(user)
config.username = user
end
|