Class: Pdf::Label::LetterShip

Inherits:
BaseService
  • Object
show all
Includes:
Base
Defined in:
app/services/pdf/label/letter_ship.rb

Overview

Service object: letter ship.

Defined Under Namespace

Classes: Result

Constant Summary

Constants included from Base

Base::FONT, Base::NIMBUS_SANS_PATH, Base::NIMBUS_SANS_PATH_BOLD, Base::WY_LOGO_PATH

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.callObject



11
12
13
# File 'app/services/pdf/label/letter_ship.rb', line 11

def self.call(...)
  new.call(...)
end

Instance Method Details

#call(shipment, ship_label_tmp_path, dropoff_url: nil) ⇒ Object



15
16
17
18
19
20
# File 'app/services/pdf/label/letter_ship.rb', line 15

def call(shipment, ship_label_tmp_path, dropoff_url: nil)
  @shipment            = shipment
  @ship_label_tmp_path = ship_label_tmp_path
  @dropoff_url         = dropoff_url
  Result.new(pdf: generate_pdf)
end