Sha256: 2ac41118355f704e13a2dd4c87bbb8d00d46185dd11a6c6ba9b9317837c9ed5e
Contents?: true
Size: 950 Bytes
Versions: 1
Compression:
Stored size: 950 Bytes
Contents
require 'savon' require "timbradocfdi/version" require "timbradocfdi/results" require "timbradocfdi/register_emisor" require "timbradocfdi/stamping" require "timbradocfdi/obtain" require "timbradocfdi/cancel" module Timbradocfdi class Generator BASE_URI = "http://201.175.12.89/serviciointegracionpruebas/Timbrado.asmx?wsdl" ## # Attributo accesible (lectura y escritura) attr_accessor :user, :client ## # Se inicializa la clase con un usuario y su respectivo cliente con el soap def initialize(user) @client = Savon.client(wsdl: BASE_URI) @user = user end ## # Read certificate and encode to base64 def file_reader(path) raw = File.read(path) Base64.encode64(raw) end ## # Method for generate HTTP Request post def request(function, options = {}) operation = function.intern @client.call(operation, message: options) end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
timbradocfdi-0.0.2 | lib/timbradocfdi.rb |