class Fiscalizer
Constants
- VERSION
Attributes
app_cert_path[R]
ca_cert_path[R]
demo[R]
password[R]
timeout[R]
Public Class Methods
new(app_cert_path:, password:, timeout: 3, demo: false, ca_cert_path: nil)
click to toggle source
# File lib/fiscalizer/fiscalizer.rb, line 2 def initialize(app_cert_path:, password:, timeout: 3, demo: false, ca_cert_path: nil) @app_cert_path = app_cert_path @password = password @timeout = timeout @demo = demo @ca_cert_path = ca_cert_path end
Public Instance Methods
echo(message)
click to toggle source
# File lib/fiscalizer/fiscalizer.rb, line 12 def echo(message) echo = Echo.new(message: message) fiscalize(Fiscalizers::Echo, echo) end
fiscalize_invoice(invoice)
click to toggle source
# File lib/fiscalizer/fiscalizer.rb, line 17 def fiscalize_invoice(invoice) fiscalize(Fiscalizers::Invoice, invoice) end
fiscalize_office(office)
click to toggle source
# File lib/fiscalizer/fiscalizer.rb, line 21 def fiscalize_office(office) fiscalize(Fiscalizers::Office, office) end
Private Instance Methods
fiscalize(fiscalizer_class, object_to_fiscalize)
click to toggle source
# File lib/fiscalizer/fiscalizer.rb, line 27 def fiscalize(fiscalizer_class, object_to_fiscalize) fiscalizer_class.new( app_cert_path, password, timeout, demo, ca_cert_path, object_to_fiscalize ).call end