Class: Eddy::TransactionSets::TS856::Loops::HL_Shipment::Repeat

Inherits:
Models::Loop::Repeat show all
Defined in:
lib/definitions/transaction_sets/manual/856/loops/hl_shipment.rb

Overview

Loop Summary:

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

Instance Attribute Summary

Attributes inherited from Models::Loop::Repeat

#components, #store

Instance Method Summary collapse

Methods inherited from Models::Loop::Repeat

#all_contents, #repeat

Constructor Details

#initialize(store) ⇒ void

Parameters:



33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
# File 'lib/definitions/transaction_sets/manual/856/loops/hl_shipment.rb', line 33

def initialize(store)
  @hl = Eddy::Segments::HL.new(store)
  @td1 = Eddy::Segments::TD1.new(store)
  @td5 = Eddy::Segments::TD5.new(store)
  @ref = Eddy::Segments::REF.new(store)
  @dtm = Eddy::Segments::DTM.new(store)
  @l_n1 = Eddy::TransactionSets::TS856::Loops::N1::Base.new(store)
  @hl_order = Eddy::TransactionSets::TS856::Loops::HL_Order::Base.new(store)
  @hl_tare = Eddy::TransactionSets::TS856::Loops::HL_Tare::Base.new(store)
  @hl_item = Eddy::TransactionSets::TS856::Loops::HL_Item::Base.new(store)
  super(
    store,
    @hl,
    @td1,
    @td5,
    @ref,
    @dtm,
    @l_n1,
    @hl_order,
    @hl_tare,
    @hl_item,
  )
end

Instance Method Details

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

Segment Summary:

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

Yield Parameters:

Returns:



97
98
99
100
# File 'lib/definitions/transaction_sets/manual/856/loops/hl_shipment.rb', line 97

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

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

Segment Summary:

  • Id: HL
  • Name: Hierarchical Level
  • Purpose: To identify dependencies among and the content of hierarchically related groups of data segments.

Yield Parameters:

Returns:



61
62
63
64
# File 'lib/definitions/transaction_sets/manual/856/loops/hl_shipment.rb', line 61

def HL()
  yield(@hl) if block_given?
  return @hl
end

#HL_ITEM {|| ... } ⇒ Eddy::TransactionSets::TS856::Loops::HL_Item::Repeat

Loop Summary:

  • Repeat: 1
  • Components:
    • HL
    • LIN
    • SN1
    • SLN (loop)


145
146
147
148
149
150
151
152
# File 'lib/definitions/transaction_sets/manual/856/loops/hl_shipment.rb', line 145

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

#HL_ORDER {|| ... } ⇒ void

This method returns an undefined value.

Loop Summary:

  • Repeat: 1
  • Components:
    • HL
    • PRF


119
120
121
122
123
124
125
126
# File 'lib/definitions/transaction_sets/manual/856/loops/hl_shipment.rb', line 119

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

#HL_TARE {|| ... } ⇒ void

This method returns an undefined value.

Loop Summary:

  • Repeat: 1
  • Components:
    • HL
    • MAN


132
133
134
135
136
137
138
139
# File 'lib/definitions/transaction_sets/manual/856/loops/hl_shipment.rb', line 132

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

#L_N1 {|| ... } ⇒ void

This method returns an undefined value.

Loop Summary:

  • Repeat: 200
  • Components:
    • N1
    • N3
    • N4


106
107
108
109
110
111
112
113
# File 'lib/definitions/transaction_sets/manual/856/loops/hl_shipment.rb', line 106

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

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

Segment Summary:

  • Id: REF
  • Name: Reference Identification
  • Purpose: To specify identifying information.

Yield Parameters:

Returns:



88
89
90
91
# File 'lib/definitions/transaction_sets/manual/856/loops/hl_shipment.rb', line 88

def REF()
  yield(@ref) if block_given?
  return @ref
end

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

Segment Summary:

  • Id: TD1
  • Name: Carrier Details (Quantity and Weight)
  • Purpose: To specify the transportation details relative to commodity, weight, and quantity.

Yield Parameters:

Returns:



70
71
72
73
# File 'lib/definitions/transaction_sets/manual/856/loops/hl_shipment.rb', line 70

def TD1()
  yield(@td1) if block_given?
  return @td1
end

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

Segment Summary:

  • Id: TD5
  • Name: Carrier Details (Routing Sequence/Transit Time)
  • Purpose: To specify the carrier and sequence of routing and provide transit time information.

Yield Parameters:

Returns:



79
80
81
82
# File 'lib/definitions/transaction_sets/manual/856/loops/hl_shipment.rb', line 79

def TD5()
  yield(@td5) if block_given?
  return @td5
end