Class: Endicia::Request
- Inherits:
-
Object
- Object
- Endicia::Request
- Includes:
- HTTParty
- Defined in:
- lib/endicia_ruby/request.rb
Constant Summary collapse
- ENDICIA_API_HOSTS =
{ test: 'https://www.envmgr.com', sandbox: 'https://elstestserver.endicia.com', production: 'https://LabelServer.Endicia.com', }
Instance Method Summary collapse
-
#initialize(options = {}) ⇒ Request
constructor
Pass a hash of options with: { credentials: { AccountID: ‘2500334’, RequesterID: ‘lxxx’, PassPhrase: ‘endicia.com’, }, environment: ‘test’ # or ‘production’ or ‘sandbox’ }.
Constructor Details
#initialize(options = {}) ⇒ Request
Pass a hash of options with: {
credentials: {
AccountID: '2500334',
RequesterID: 'lxxx',
PassPhrase: 'endicia.com',
},
environment: 'test' # or 'production' or 'sandbox'
}
Or if using Rails, create an endicia.yml in Rails.root/config/ in this format: development: &development
credentials:
AccountID: youraccountid
RequesterID: lxxx
PassPhrase: endicia.com
environment: sandbox
test:
<<: *development
staging:
<<: *development
production:
credentials:
AccountID: youraccountid
RequesterID: lsfx
PassPhrase: yourpassword
environment: production
If both an endicia.yml file is present and a hash of options is passed, any values in the hash take precedence
61 62 63 |
# File 'lib/endicia_ruby/request.rb', line 61 def initialize( = {}) @options = .deep_merge() end |