Sha256: 68ebb004d32d2dc5f98f0cab6301b2b79044c00eb295dd4894226b8fba9ff72a
Contents?: true
Size: 741 Bytes
Versions: 2
Compression:
Stored size: 741 Bytes
Contents
module MyMoip class TransparentRequest < Request HTTP_METHOD = :post PATH = "/ws/alpha/EnviarInstrucao/Unica" REQUIRES_AUTH = true def api_call(data, logger = MyMoip.logger) params = { body: data.to_xml, http_method: HTTP_METHOD, requires_auth: REQUIRES_AUTH, path: PATH, logger: logger } super params end def success? @response && @response["EnviarInstrucaoUnicaResponse"]["Resposta"]["Status"] == "Sucesso" rescue NoMethodError => e false end def token @response["EnviarInstrucaoUnicaResponse"]["Resposta"]["Token"] || nil rescue NoMethodError => e nil end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
mymoip-0.2.0 | lib/transparent_request.rb |
mymoip-0.1.0 | lib/transparent_request.rb |