lib/imis/api.rb in usps-imis-api-0.2.0 vs lib/imis/api.rb in usps-imis-api-0.2.1
- old
+ new
@@ -3,10 +3,11 @@
module Imis
class Api
AUTHENTICATION_PATH = 'Token'
API_PATH = 'api'
QUERY_PATH = 'api/Query'
+ PANELS = Struct.new(:vsc)
attr_reader :token, :token_expiration, :imis_id
def initialize(skip_authentication: false)
authenticate unless skip_authentication
@@ -100,9 +101,15 @@
JSON.parse(result.body)
end
def mapper
@mapper ||= Mapper.new(self)
+ end
+
+ def panels
+ @panels ||= PANELS.new(
+ Panel::Vsc.new(self)
+ )
end
def update(data)
mapper.update(data)
end