Class: Eddy::TransactionSets::TS810::TS

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

Overview

Transaction Set Summary:

  • Id: 810
  • Name: Invoice
  • Functional Group: IN

Constant Summary collapse

ID =
"810".freeze
NAME =
"Invoice".freeze
FUNCTIONAL_GROUP =
"IN".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
31
32
33
34
35
36
37
38
39
40
# File 'lib/definitions/transaction_sets/manual/810/810.rb', line 18

def initialize(store)
  @big = Eddy::Segments::BIG.new(store)
  @ref = Eddy::Segments::REF.new(store)
  @l_n1 = Eddy::TransactionSets::TS810::Loops::N1::Base.new(store)
  @dtm = Eddy::Segments::DTM.new(store)
  @l_it1 = Eddy::TransactionSets::TS810::Loops::IT1::Base.new(store)
  @tds = Eddy::Segments::TDS.new(store)
  @cad = Eddy::Segments::CAD.new(store)
  @l_sac = Eddy::TransactionSets::TS810::Loops::SAC::Base.new(store)
  @ctt = Eddy::Segments::CTT.new(store)
  super(
    store,
    @big,
    @ref,
    @l_n1,
    @dtm,
    @l_it1,
    @tds,
    @cad,
    @l_sac,
    @ctt,
  )
end

Instance Method Details

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

Segment Summary:

  • Id: BIG
  • Name: Beginning Segment for Invoice
  • Purpose: To indicate the beginning of an invoice transaction set and transmit identifying numbers and dates.

Yield Parameters:

Returns:



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

def BIG()
  yield(@big) if block_given?
  return @big
end

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

Segment Summary:

  • Id: CAD
  • Name: Carrier Detail
  • Purpose: To specify transportation details for the transaction.

Yield Parameters:

Returns:



108
109
110
111
# File 'lib/definitions/transaction_sets/manual/810/810.rb', line 108

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



130
131
132
133
# File 'lib/definitions/transaction_sets/manual/810/810.rb', line 130

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

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

Segment Summary:

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

Yield Parameters:

Returns:



77
78
79
80
# File 'lib/definitions/transaction_sets/manual/810/810.rb', line 77

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

#L_IT1 {|| ... } ⇒ void

This method returns an undefined value.

Loop Summary:

  • Repeat: 200,000
  • Components:
    • IT1
    • CTP
    • PID (loop)
    • SAC (loop)


86
87
88
89
90
91
92
93
# File 'lib/definitions/transaction_sets/manual/810/810.rb', line 86

def L_IT1(&block)
  if block_given?
    @l_it1.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


64
65
66
67
68
69
70
71
# File 'lib/definitions/transaction_sets/manual/810/810.rb', line 64

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_SAC {|| ... } ⇒ void

This method returns an undefined value.

Loop Summary:

  • Repeat: 25
  • Components:
    • SAC


117
118
119
120
121
122
123
124
# File 'lib/definitions/transaction_sets/manual/810/810.rb', line 117

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

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

Segment Summary:

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

Yield Parameters:

Returns:



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

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

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

Segment Summary:

  • Id: TDS
  • Name: Total Monetary Value Summary
  • Purpose: To specify the total invoice discounts and amounts.

Yield Parameters:

Returns:



99
100
101
102
# File 'lib/definitions/transaction_sets/manual/810/810.rb', line 99

def TDS()
  yield(@tds) if block_given?
  return @tds
end