Class: SigepWeb::PostageCardStatus
- Inherits:
-
WebServiceInterfaceApi
- Object
- WebServiceInterfaceApi
- SigepWeb::PostageCardStatus
- Defined in:
- lib/sigep_web/postage_card_status.rb
Instance Method Summary collapse
-
#initialize(options = {}) ⇒ PostageCardStatus
constructor
A new instance of PostageCardStatus.
- #request ⇒ Object
Methods inherited from WebServiceInterfaceApi
Constructor Details
#initialize(options = {}) ⇒ PostageCardStatus
Returns a new instance of PostageCardStatus.
3 4 5 6 |
# File 'lib/sigep_web/postage_card_status.rb', line 3 def initialize( = {}) @postage_number_card = [:postage_number_card] super() end |
Instance Method Details
#request ⇒ Object
8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 |
# File 'lib/sigep_web/postage_card_status.rb', line 8 def request authenticate = SigepWeb.configuration.authenticate begin response = process(:get_status_cartao_postagem, { numeroCartaoPostagem: @postage_number_card, usuario: authenticate.user, senha: authenticate.password }).to_hash[:get_status_cartao_postagem_response][:return] { success: true, response: response } rescue Savon::SOAPFault => msg { success: false, error: msg } end end |