---
name: "Business::Edifact::Message"
section: "3pm"
platform: "linux"
package: "libbusiness-edifact-interchange-perl"
version: "0.07-4"
release: "Debian 13 (Trixie)"
platforms: ["linux"]
url: "https://new.carta.tech/Business::Edifact::Message"
---

# Business::Edifact::Message(3pm)

Class that models Edifact Messages

## NAME

Business::Edifact::Message - Class that models Edifact Messages

## VERSION

Version 0.07

## SYNOPSIS

Parses an individual Edifact message Message objects are instantiated by Business::Edifact::Interchange and an array of them is returned in its messages function\
    `$interchange`-\>parse($incoming);\
    my `$m_array` = `$interchange`-\>**messages()**;\
    for my `$msg` (@{$m\_array}) {\
       ...retrieve message data\
    }

## SUBROUTINES/METHODS

### new

Called by Business::Edifact::Interchange to instantiate a new Message object. The caller passes the header fields with the  reference number identifier and message type

### add\_segment

Process the next data segment

### type

return the message's type e.g. 'QUOTES' or 'ORDERS'

### function

Returns the message's function field May be 'original' or 'retransmission'

### message\_code

Returns 3 character message code from the BGM message

### currency\_code

### reference\_number

### date\_of\_message

### items

return the list of lineitems

### handle\_bgm

### handle\_dtm

NB DTM can occur in different segment groups

### handle\_pat

### handle\_rff

### handle\_cux

### handle\_nad

### handle\_lin

### handle\_pia

### handle\_imd

### handle\_qty

### handle\_gir

### handle\_moa

### handle\_tax

### handle\_alc

### handle\_rte

### handle\_loc

### handle\_pri

### handle\_uns

### handle\_cnt

### handle\_ftx

### handle\_pcd

### clear\_item\_flags

```
 clear flags at start of new item or summary
```

## AUTHOR

Colin Campbell, `"<colinsc@cpan.org>"`

## BUGS

Please report any bugs or feature requests to `"bug-edifact-interchange at rt.cpan.org"`, or through the web interface at \<http://rt.cpan.org/NoAuth/ReportBug.html?Queue=Business-Edifact-Interchange\>.  I will be notified, and then you'll automatically be notified of progress on your bug as I make changes.

## SUPPORT

You can find documentation for this module with the perldoc command.

```
    perldoc Business::Edifact::Message
```

## ACKNOWLEDGEMENTS

## LICENSE AND COPYRIGHT

Copyright 2011-2014 Colin Campbell.

This program is free software; you can redistribute it and/or modify it under the terms of either: the GNU General Public License as published by the Free Software Foundation; or the Artistic License.

See http://dev.perl.org/licenses/ for more information.
