Class: Eddy::TransactionSets::TS846::TS846

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

Overview

Transaction Set Summary:

  • Id: 846
  • Name: Inventory Inquiry/Advice
  • Functional Group: IB

Constant Summary collapse

ID =
"846".freeze
NAME =
"Inventory Inquiry/Advice".freeze
FUNCTIONAL_GROUP =
"IB".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:



17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
# File 'lib/definitions/transaction_sets/manual/846/846.rb', line 17

def initialize(store)
  @bia = Eddy::Segments::BIA.new(store)
  @cur = Eddy::Segments::CUR.new(store)
  @dtm = Eddy::Segments::DTM.new(store)
  @ref = Eddy::Segments::REF.new(store)
  @per = Eddy::Segments::PER.new(store)
  @l_n1 = Eddy::TransactionSets::TS846::Loops::N1::Base.new(store)
  @l_lin = Eddy::TransactionSets::TS846::Loops::LIN::Base.new(store)
  @ctt = Eddy::Segments::CTT.new(store)
  super(
    store,
    @bia,
    @cur,
    @dtm,
    @ref,
    @per,
    @l_n1,
    @l_lin,
    @ctt,
  )
end

Instance Method Details

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

Segment Summary:

  • Id: BIA
  • Name: Beginning Segment for Inventory Inquiry/Advice
  • Purpose: To indicate the beginning of an Inventory Inquiry/Advice Transaction Set

Yield Parameters:

Returns:



43
44
45
46
# File 'lib/definitions/transaction_sets/manual/846/846.rb', line 43

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



114
115
116
117
# File 'lib/definitions/transaction_sets/manual/846/846.rb', line 114

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

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

Segment Summary:

  • Id: CUR
  • Name: Currency
  • Purpose: To specify the currency (dollars, pounds, francs, etc.) used in a transaction

Yield Parameters:

Returns:



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

def CUR()
  yield(@cur) if block_given?
  return @cur
end

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

Segment Summary:

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

Yield Parameters:

Returns:



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

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

#L_LIN {|| ... } ⇒ void

This method returns an undefined value.

Loop Summary:

  • Repeat: 10000
  • Components:
    • LIN
    • PID
    • DTM
    • CTP
    • REF
    • SDQ
    • SLN (loop)
    • QTY (loop)
    • N1 (loop)


101
102
103
104
105
106
107
108
# File 'lib/definitions/transaction_sets/manual/846/846.rb', line 101

def L_LIN(&block)
  if block_given?
    @l_lin.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: 5
  • Components:
    • N1
    • N2
    • N3
    • N4
    • REF
    • PER


88
89
90
91
92
93
94
95
# File 'lib/definitions/transaction_sets/manual/846/846.rb', line 88

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

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

Segment Summary:

  • Id: PER
  • Name: Administrative Communications Contact
  • Purpose: To identify a person or office to whom administrative communications should be directed

Yield Parameters:

Returns:



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

def PER()
  yield(@per) if block_given?
  return @per
end

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

Segment Summary:

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

Yield Parameters:

Returns:



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

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