Class: FriendlyShipping::Services::UpsFreight::GenerateDocumentOptionsHash

Inherits:
Object
  • Object
show all
Defined in:
lib/friendly_shipping/services/ups_freight/generate_document_options_hash.rb

Class Method Summary collapse

Class Method Details

.call(document_options:) ⇒ Object



7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
# File 'lib/friendly_shipping/services/ups_freight/generate_document_options_hash.rb', line 7

def self.call(document_options:)
  {
    Type: {
      Code: document_options.document_type_code
    },
    LabelsPerPage: document_options.labels_per_page,
    Format: {
      Code: document_options.format_code
    },
    PrintFormat: {
      Code: document_options.thermal_code,
    },
    PrintSize: {
      Length: document_options.length,
      Width: document_options.width,
    }
  }
end