Class: Fiscalizer::SecurityCodeGenerator
- Inherits:
-
Object
- Object
- Fiscalizer::SecurityCodeGenerator
- Defined in:
- lib/fiscalizer/services/security_code_generator.rb
Instance Attribute Summary collapse
-
#invoice ⇒ Object
readonly
Returns the value of attribute invoice.
-
#private_key ⇒ Object
readonly
Returns the value of attribute private_key.
Instance Method Summary collapse
- #call ⇒ Object
-
#initialize(invoice, private_key) ⇒ SecurityCodeGenerator
constructor
A new instance of SecurityCodeGenerator.
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
#invoice ⇒ Object (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_key ⇒ Object (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
#call ⇒ Object
10 11 12 |
# File 'lib/fiscalizer/services/security_code_generator.rb', line 10 def call invoice.security_code = md5_digest end |