Sha256: 5816bb840d0bf85f40ad56b4066706a55117814fdfc1eaecd60e522674dbf9e5
Contents?: true
Size: 960 Bytes
Versions: 1
Compression:
Stored size: 960 Bytes
Contents
require 'savon' require "timbradocfdi/version" require "timbradocfdi/registroemisor" require "timbradocfdi/timbracfdi" require "timbradocfdi/obtienecfdi" require "timbradocfdi/cancelacfdi" require "timbradocfdi/results" 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.1 | lib/timbradocfdi.rb |