1RT::Client::REST::AttacUhsmeerntC(o3n)tributed Perl DocuRmTe:n:tCaltiieonnt::REST::Attachment(3)
2
3
4

NAME

6       RT::Client::REST::Attachment - attachment object representation.
7

VERSION

9       version 0.56
10

SYNOPSIS

12         my $attachments = $ticket->attachments;
13
14         my $count = $attachments->count;
15         print "There are $count attachments.\n";
16
17         my $iterator = $attachments->get_iterator;
18         while (my $att = &$iterator) {
19             print "Id: ", $att->id, "; Subject: ", $att->subject, "\n";
20         }
21

DESCRIPTION

23       An attachment is a second-class citizen, as it does not exist (at least
24       from the current REST protocol implementation) by itself.  At the
25       moment, it is always associated with a ticket (see parent_id
26       attribute).  Thus, you will rarely retrieve an attachment by itself;
27       instead, you should use "attachments()" method of
28       RT::Client::REST::Ticket object to get an iterator for all attachments
29       for that ticket.
30

ATTRIBUTES

32       id
33         Numeric ID of the attachment.
34
35       creator_id
36         Numeric ID of the user who created the attachment.
37
38       parent_id
39         Numeric ID of the object the attachment is associated with.  This is
40         not a proper attribute of the attachment as specified by REST -- it
41         is simply to store the ID of the RT::Client::REST::Ticket object this
42         attachment belongs to.
43
44       subject
45         Subject of the attachment.
46
47       content_type
48         Content type.
49
50       file_name
51         File name (if any).
52
53       transaction_id
54         Numeric ID of the RT::Client::REST::Transaction object this
55         attachment is associated with.
56
57       message_id
58         Message ID.
59
60       created
61         Time when the attachment was created
62
63       content
64         Actual content of the attachment.
65
66       headers
67         Headers (not parsed), if any.
68
69       parent
70         Parent (not sure what this is yet).
71
72       content_encoding
73         Content encoding, if any.
74

METHODS

76       RT::Client::REST::Attachment is a read-only object, so you cannot
77       "store()" it.  Also, because it is a second-class citizen, you cannot
78       "search()" or "count()" it -- use "attachments()" method provided by
79       RT::Client::REST::Ticket.
80
81       retrieve
82         To retrieve an attachment, attributes id and parent_id must be set.
83

INTERNAL METHODS

85       can
86         Wraps the normal can() call, to exclude unsupported methods from
87         parent.
88
89       rt_type
90         Returns 'attachment'.
91

CREATING ATTACHMENTS

93       Currently RT does not allow creating attachments via their API.
94
95       See <https://rt-wiki.bestpractical.com/wiki/REST#Ticket_Attachment>
96

SEE ALSO

98       RT::Client::REST::Ticket, RT::Client::REST::SearchResult.
99

AUTHORS

101       ·   Abhijit Menon-Sen <ams@wiw.org>
102
103       ·   Dmitri Tikhonov <dtikhonov@yahoo.com>
104
105       ·   Damien "dams" Krotkine <dams@cpan.org>
106
107       ·   Dean Hamstead <dean@bytefoundry.com.au>
108
109       ·   Miquel Ruiz <mruiz@cpan.org>
110
111       ·   JLMARTIN
112
113       ·   SRVSH
114
116       This software is copyright (c) 2018 by Dmitri Tikhonov.
117
118       This is free software; you can redistribute it and/or modify it under
119       the same terms as the Perl 5 programming language system itself.
120
121
122
123perl v5.30.0                      2019-07-26   RT::Client::REST::Attachment(3)
Impressum