Class: ZATCA::QRCodeExtractor
- Inherits:
-
Object
- Object
- ZATCA::QRCodeExtractor
- Defined in:
- lib/zatca/qr_code_extractor.rb
Instance Attribute Summary collapse
-
#invoice_base64 ⇒ Object
readonly
Returns the value of attribute invoice_base64.
Instance Method Summary collapse
- #extract ⇒ Object
-
#initialize(invoice_base64:) ⇒ QRCodeExtractor
constructor
A new instance of QRCodeExtractor.
Constructor Details
#initialize(invoice_base64:) ⇒ QRCodeExtractor
Returns a new instance of QRCodeExtractor.
7 8 9 |
# File 'lib/zatca/qr_code_extractor.rb', line 7 def initialize(invoice_base64:) @invoice_base64 = invoice_base64 end |
Instance Attribute Details
#invoice_base64 ⇒ Object (readonly)
Returns the value of attribute invoice_base64.
5 6 7 |
# File 'lib/zatca/qr_code_extractor.rb', line 5 def invoice_base64 @invoice_base64 end |
Instance Method Details
#extract ⇒ Object
11 12 13 14 |
# File 'lib/zatca/qr_code_extractor.rb', line 11 def extract xml_invoice = Base64.strict_decode64(invoice_base64) extract_qr_code_base64_from_xml(xml_invoice) end |