Class: Fiscalizer::SecurityCodeGenerator

Inherits:
Object
  • Object
show all
Defined in:
lib/fiscalizer/services/security_code_generator.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(invoice, private_key) ⇒ SecurityCodeGenerator

Returns a new instance of SecurityCodeGenerator.



3
4
5
6
# File 'lib/fiscalizer/services/security_code_generator.rb', line 3

def initialize(invoice, private_key)
  @invoice = invoice
  @private_key = private_key
end

Instance Attribute Details

#invoiceObject (readonly)

Returns the value of attribute invoice.



8
9
10
# File 'lib/fiscalizer/services/security_code_generator.rb', line 8

def invoice
  @invoice
end

#private_keyObject (readonly)

Returns the value of attribute private_key.



8
9
10
# File 'lib/fiscalizer/services/security_code_generator.rb', line 8

def private_key
  @private_key
end

Instance Method Details

#callObject



10
11
12
# File 'lib/fiscalizer/services/security_code_generator.rb', line 10

def call
  invoice.security_code = md5_digest
end