NAME
Business::CAMT::Message - base class for messages
SYNOPSIS
my $camt = Business::CAMT->new(...);
my $msg = $camt->read(...);
my $msg = $camt->create(...);
$msg->write('file.xml');
print $msg->toPerl;
open my $fh, '>:raw', 'msg.json' and $fh->print($msg->toJSON);
DESCRIPTION
This module is the base class for objects which are able to interpret the CAMT messages.
METHODS
Constructors
- $class->fromData(%options)
-
This method accepts the same
%optionsas new(). All options passed in are passed to that constructor. - $class->new(%options)
-
The data (probably read from a file) is wrapped into this class. When
dataisundef, thenundefwill be returned.-Option --Default camt <required> data <required> set <required> version <required>
Accessors
Other
- $obj->toJSON(%options)
-
Returns JSON raw text (bytes, not characters) for the data. You may save this to a file (explicitly use encoding ":raw"), or write it to a database. The keys get sorted, to ensure a reproducable result for regression tests.
-Option --Default settings {pretty => 1, canonical => 1} - $obj->toPerl()
-
Convert the HASH into Perl code, using Data::Dumper. This is useful, because you do not want to include the hidden object attributes in your output: this method hides that administration.
- $obj->write($file, %options)
-
All
%optionsare passed to Business::CAMT::write().» example: for write
$msg->write($file); $camt->write($file, $msg); # same
SEE ALSO
This module is part of Business-CAMT version 0.14, built on November 06, 2025. Website: http://perl.overmeer.net/CPAN/
LICENSE
For contributors see file ChangeLog.
This software is copyright (c) 2024-2025 by Mark Overmeer.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.
1 POD Error
The following errors were encountered while parsing the POD:
- Around line 32:
Deleting unknown formatting code N<>