Class: Eddy::TransactionSets::TS855::TS

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

Overview

Transaction Set Summary:

  • Id: 855
  • Name: Purchase Order Acknowledgement
  • Functional Group: PR

Constant Summary collapse

ID =
"855".freeze
NAME =
"Purchase Order Acknowledgement".freeze
FUNCTIONAL_GROUP =
"PR".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/855/855.rb', line 18

def initialize(store)
  @bak = Eddy::Segments::BAK.new(store)
  @l_n1 = Eddy::TransactionSets::TS855::Loops::N1::Base.new(store)
  @l_po1 = Eddy::TransactionSets::TS855::Loops::PO1::Base.new(store)
  @ctt = Eddy::Segments::CTT.new(store)
  super(
    store,
    @bak,
    @l_n1,
    @l_po1,
    @ctt,
  )
end

Instance Method Details

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

Segment Summary:

  • Id: BAK
  • Name: Beginning Segment for Purchase Order Acknowledgment
  • Purpose: To indicate the beginning of the Purchase Order Acknowledgment Transaction Set and transmit identifying numbers and date.

Yield Parameters:

Returns:



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

def BAK()
  yield(@bak) if block_given?
  return @bak
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:



71
72
73
74
# File 'lib/definitions/transaction_sets/manual/855/855.rb', line 71

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

#L_N1 {|| ... } ⇒ void

This method returns an undefined value.

Loop Summary:

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


45
46
47
48
49
50
51
52
# File 'lib/definitions/transaction_sets/manual/855/855.rb', line 45

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

#L_PO1 {|| ... } ⇒ void

This method returns an undefined value.

Loop Summary:

  • Repeat: 100,000
  • Components:
    • PO1
    • PID (loop)
    • ACK (loop)


58
59
60
61
62
63
64
65
# File 'lib/definitions/transaction_sets/manual/855/855.rb', line 58

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