Class: Eddy::TransactionSets::TS856::TS

Inherits:
Models::TransactionSet show all
Defined in:
lib/definitions/transaction_sets/manual/856/856.rb

Overview

Transaction Set Summary:

  • Id: 856
  • Name: Ship Notice/Manifest (Advance Ship Notice)
  • Functional Group: SH

Constant Summary collapse

ID =
"856".freeze
NAME =
"Ship Notice/Manifest (Advance Ship Notice)".freeze
FUNCTIONAL_GROUP =
"SH".freeze

Instance Attribute Summary

Attributes inherited from Models::TransactionSet

#components, #control_number, #store

Instance Method Summary collapse

Methods inherited from Models::TransactionSet

#add_envelope, #all_components, #functional_group, functional_group, id, #id, #name, name, #number_of_included_segments, #render

Constructor Details

#initialize(store) ⇒ void

Parameters:



18
19
20
21
22
23
24
25
26
27
28
29
30
# File 'lib/definitions/transaction_sets/manual/856/856.rb', line 18

def initialize(store)
  @bsn = Eddy::Segments::BSN.new(store)
  @dtm = Eddy::Segments::DTM.new(store)
  @hl_shipment = Eddy::TransactionSets::TS856::Loops::HL_Shipment::Base.new(store)
  @ctt = Eddy::Segments::CTT.new(store)
  super(
    store,
    @bsn,
    @dtm,
    @hl_shipment,
    @ctt,
  )
end

Instance Method Details

#BSN {|| ... } ⇒ Eddy::Segments::BSN

Segment Summary:

  • Id: BSN
  • Name: Beginning Segment for Ship Notice
  • Purpose: To transmit identifying numbers, dates, and other basic data relating to the transaction set.

Yield Parameters:

Returns:



36
37
38
39
# File 'lib/definitions/transaction_sets/manual/856/856.rb', line 36

def BSN()
  yield(@bsn) if block_given?
  return @bsn
end

#CTT {|| ... } ⇒ Eddy::Segments::CTT

Segment Summary:

  • Id: CTT
  • Name: Transaction Totals
  • Purpose: To transmit a hash total for a specific element in the transaction set

Yield Parameters:

Returns:



67
68
69
70
# File 'lib/definitions/transaction_sets/manual/856/856.rb', line 67

def CTT()
  yield(@ctt) if block_given?
  return @ctt
end

#DTM {|| ... } ⇒ Eddy::Segments::DTM

Segment Summary:

  • Id: DTM
  • Name: Date/Time Reference
  • Purpose: To specify pertinent dates and times.

Yield Parameters:

Returns:



45
46
47
48
# File 'lib/definitions/transaction_sets/manual/856/856.rb', line 45

def DTM()
  yield(@dtm) if block_given?
  return @dtm
end

#HL_SHIPMENT {|| ... } ⇒ void

This method returns an undefined value.

Loop Summary:

  • Repeat: 200000
  • Components:
    • HL
    • TD1
    • TD5
    • REF
    • DTM
    • N1 (loop)
    • HL_ORDER (loop)
    • HL_TARE (loop)
    • HL_ITEM (loop)


54
55
56
57
58
59
60
61
# File 'lib/definitions/transaction_sets/manual/856/856.rb', line 54

def HL_SHIPMENT(&block)
  if block_given?
    @hl_shipment.repeat(&block)
  else
    raise Eddy::Errors::Error, "No block given in loop iteration"
  end
  return nil
end