Class: Eddy::TransactionSets::TS850::Loops::PO1::Repeat

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

Overview

Loop Summary:

  • Repeat: 100000
  • Components:
    • PO1
    • CTP (loop)
    • PID (loop)
    • SAC (loop)
    • TXI
    • N9 (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:



30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
# File 'lib/definitions/transaction_sets/manual/850/loops/po1.rb', line 30

def initialize(store)
  @po1 = Eddy::Segments::PO1.new(store)
  @l_ctp = Eddy::TransactionSets::TS850::Loops::CTP::Base.new(store)
  @l_pid = Eddy::TransactionSets::TS850::Loops::PID::Base.new(store)
  @l_sac = Eddy::TransactionSets::TS850::Loops::SAC::Base.new(store)
  @txi = Eddy::Segments::TXI.new(store)
  @l_n9 = Eddy::TransactionSets::TS850::Loops::N9::Base.new(store)
  super(
    store,
    @po1,
    @l_ctp,
    @l_pid,
    @l_sac,
    @txi,
    @l_n9,
  )
end

Instance Method Details

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

Segment Summary:

  • Id: CTP
  • Name: Pricing Information
  • Purpose: To specify pricing information.

Yield Parameters:

Returns:



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

def CTP()
  yield(@ctp) if block_given?
  return @ctp
end

#L_N9 {|| ... } ⇒ void

This method returns an undefined value.

Loop Summary:

  • Repeat: 1000
  • Components:
    • N9
    • MTX


105
106
107
108
109
110
111
112
# File 'lib/definitions/transaction_sets/manual/850/loops/po1.rb', line 105

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

#L_PID {|| ... } ⇒ void

This method returns an undefined value.

Loop Summary:

  • Repeat: 1000
  • Components:
    • PID


70
71
72
73
74
75
76
77
# File 'lib/definitions/transaction_sets/manual/850/loops/po1.rb', line 70

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

#L_SAC {|| ... } ⇒ void

This method returns an undefined value.

Loop Summary:

  • Repeat: 25
  • Components:
    • SAC


83
84
85
86
87
88
89
90
# File 'lib/definitions/transaction_sets/manual/850/loops/po1.rb', line 83

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

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

Segment Summary:

  • Id: PO1
  • Name: Baseline Item Data
  • Purpose: To specify basic and most frequently used line item data

Yield Parameters:

Returns:



52
53
54
55
# File 'lib/definitions/transaction_sets/manual/850/loops/po1.rb', line 52

def PO1()
  yield(@po1) if block_given?
  return @po1
end

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

Segment Summary:

  • Id: TXI
  • Name: Tax Information
  • Purpose: To specify tax information.

Yield Parameters:

Returns:



96
97
98
99
# File 'lib/definitions/transaction_sets/manual/850/loops/po1.rb', line 96

def TXI()
  yield(@txi) if block_given?
  return @txi
end