Class: Invoicing::CreateInvoiceFromDelivery::Result

Inherits:
Data
  • Object
show all
Defined in:
app/services/invoicing/create_invoice_from_delivery.rb

Overview

Service object: result.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(invoice_created: nil, invoice: nil, messages: []) ⇒ Result

Returns a new instance of Result.



31
# File 'app/services/invoicing/create_invoice_from_delivery.rb', line 31

def initialize(invoice_created: nil, invoice: nil, messages: []) = super

Instance Attribute Details

#invoiceObject (readonly)

Returns the value of attribute invoice

Returns:

  • (Object)

    the current value of invoice



30
31
32
# File 'app/services/invoicing/create_invoice_from_delivery.rb', line 30

def invoice
  @invoice
end

#invoice_createdObject (readonly)

Returns the value of attribute invoice_created

Returns:

  • (Object)

    the current value of invoice_created



30
31
32
# File 'app/services/invoicing/create_invoice_from_delivery.rb', line 30

def invoice_created
  @invoice_created
end

#messagesObject (readonly)

Returns the value of attribute messages

Returns:

  • (Object)

    the current value of messages



30
31
32
# File 'app/services/invoicing/create_invoice_from_delivery.rb', line 30

def messages
  @messages
end

Instance Method Details

#invoice_created?Boolean

Returns:

  • (Boolean)


32
# File 'app/services/invoicing/create_invoice_from_delivery.rb', line 32

def invoice_created? = invoice_created