Class: Ticketbai::Operations::Annulment
- Inherits:
-
Ticketbai::Operation
- Object
- Ticketbai::Operation
- Ticketbai::Operations::Annulment
- Defined in:
- lib/ticketbai/operations/annulment.rb
Constant Summary collapse
- OPERATION_NAME =
:annulment
- ATTRIBUTES =
%i[issuing_company_nif issuing_company_name invoice_serial invoice_number invoice_date].freeze
Instance Attribute Summary
Attributes inherited from Ticketbai::Operation
Instance Method Summary collapse
- #build_document ⇒ Object
-
#initialize(**args) ⇒ Annulment
constructor
A new instance of Annulment.
Methods inherited from Ticketbai::Operation
Constructor Details
#initialize(**args) ⇒ Annulment
Returns a new instance of Annulment.
18 19 20 |
# File 'lib/ticketbai/operations/annulment.rb', line 18 def initialize(**args) super(args) end |
Instance Method Details
#build_document ⇒ Object
22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 |
# File 'lib/ticketbai/operations/annulment.rb', line 22 def build_document @issuer = Ticketbai::Nodes::Issuer.new(issuing_company_nif: @issuing_company_nif, issuing_company_name: @issuing_company_name) @invoice_header = Ticketbai::Nodes::InvoiceHeader.new( invoice_serial: @invoice_serial, invoice_number: @invoice_number, invoice_date: @invoice_date ) @software = Ticketbai::Nodes::Software.new Ticketbai::Documents::Annulment.new( issuer: @issuer, invoice_header: @invoice_header, software: @software ).create end |