Class: Search::DeliveryTextPresenter

Inherits:
DeliveryPresenter
  • Object
show all
Defined in:
app/presenters/search/delivery_text_presenter.rb

Overview

Plain-text variant of DeliveryPresenter for exports and
other non-HTML renderings.

Instance Method Summary collapse

Instance Method Details

Customer full name with customer number as plain text.

Returns:

  • (String)


23
24
25
# File 'app/presenters/search/delivery_text_presenter.rb', line 23

def customer_link
  "#{r.customer_full_name} (CN#{r.customer_id})"
end

Delivery number (DE<id>) as plain text.

Returns:

  • (String)


9
10
11
# File 'app/presenters/search/delivery_text_presenter.rb', line 9

def delivery_link
  "DE#{r.id}"
end

Order reference number as plain text.

Returns:

  • (String)


16
17
18
# File 'app/presenters/search/delivery_text_presenter.rb', line 16

def order_link
  r.order_reference_number
end