Class: Eddy::TransactionSets::TS856::Loops::HL_Item::Repeat

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

Overview

Loop Summary:

  • Repeat: 1
  • Components:
    • HL
    • LIN
    • SN1
    • SLN (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:



28
29
30
31
32
33
34
35
36
37
38
39
40
# File 'lib/definitions/transaction_sets/manual/856/loops/hl_item.rb', line 28

def initialize(store)
  @hl = Eddy::Segments::HL.new(store)
  @lin = Eddy::Segments::LIN.new(store)
  @sn1 = Eddy::Segments::SN1.new(store)
  @l_sln = Eddy::TransactionSets::TS856::Loops::SLN::Base.new(store)
  super(
    store,
    @hl,
    @lin,
    @sn1,
    @l_sln,
  )
end

Instance Method Details

#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:



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

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

#L_SLN {|| ... } ⇒ void

This method returns an undefined value.

Loop Summary:

  • Repeat: 1000
  • Components:
    • SLN


73
74
75
76
77
78
79
80
# File 'lib/definitions/transaction_sets/manual/856/loops/hl_item.rb', line 73

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

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

Segment Summary:

  • Id: LIN
  • Name: Item Identification
  • Purpose: To specify basic item identification data.

Yield Parameters:

Returns:



55
56
57
58
# File 'lib/definitions/transaction_sets/manual/856/loops/hl_item.rb', line 55

def LIN()
  yield(@lin) if block_given?
  return @lin
end

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

Segment Summary:

  • Id: SN1
  • Name: Item Detail (Shipment)
  • Purpose: To specify line-item detail relative to shipment.

Yield Parameters:

Returns:



64
65
66
67
# File 'lib/definitions/transaction_sets/manual/856/loops/hl_item.rb', line 64

def SN1()
  yield(@sn1) if block_given?
  return @sn1
end