line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Business::Fixflo::IssueDraftMedia; |
2
|
|
|
|
|
|
|
|
3
|
|
|
|
|
|
|
=head1 NAME |
4
|
|
|
|
|
|
|
|
5
|
|
|
|
|
|
|
Business::Fixflo::IssueDraftMedia |
6
|
|
|
|
|
|
|
|
7
|
|
|
|
|
|
|
=head1 DESCRIPTION |
8
|
|
|
|
|
|
|
|
9
|
|
|
|
|
|
|
A class for a fixflo issue draft media, extends L |
10
|
|
|
|
|
|
|
|
11
|
|
|
|
|
|
|
=cut |
12
|
|
|
|
|
|
|
|
13
|
16
|
|
|
16
|
|
321
|
use strict; |
|
16
|
|
|
|
|
43
|
|
|
16
|
|
|
|
|
575
|
|
14
|
16
|
|
|
16
|
|
97
|
use warnings; |
|
16
|
|
|
|
|
69
|
|
|
16
|
|
|
|
|
447
|
|
15
|
|
|
|
|
|
|
|
16
|
16
|
|
|
16
|
|
86
|
use Moo; |
|
16
|
|
|
|
|
34
|
|
|
16
|
|
|
|
|
93
|
|
17
|
|
|
|
|
|
|
|
18
|
|
|
|
|
|
|
extends 'Business::Fixflo::Resource'; |
19
|
|
|
|
|
|
|
with 'Business::Fixflo::Utils'; |
20
|
|
|
|
|
|
|
|
21
|
|
|
|
|
|
|
=head1 ATTRIBUTES |
22
|
|
|
|
|
|
|
|
23
|
|
|
|
|
|
|
Id |
24
|
|
|
|
|
|
|
IssueDraftId |
25
|
|
|
|
|
|
|
Url |
26
|
|
|
|
|
|
|
ContentType |
27
|
|
|
|
|
|
|
ShortDesc |
28
|
|
|
|
|
|
|
EncodedByteData |
29
|
|
|
|
|
|
|
|
30
|
|
|
|
|
|
|
=cut |
31
|
|
|
|
|
|
|
|
32
|
|
|
|
|
|
|
has [ qw/ |
33
|
|
|
|
|
|
|
Id |
34
|
|
|
|
|
|
|
IssueDraftId |
35
|
|
|
|
|
|
|
Url |
36
|
|
|
|
|
|
|
ContentType |
37
|
|
|
|
|
|
|
ShortDesc |
38
|
|
|
|
|
|
|
EncodedByteData |
39
|
|
|
|
|
|
|
/ ] => ( |
40
|
|
|
|
|
|
|
is => 'rw', |
41
|
|
|
|
|
|
|
); |
42
|
|
|
|
|
|
|
|
43
|
|
|
|
|
|
|
=head1 Operations on a issue draft media |
44
|
|
|
|
|
|
|
|
45
|
|
|
|
|
|
|
=head2 create |
46
|
|
|
|
|
|
|
|
47
|
|
|
|
|
|
|
Creates an issue draft media in the Fixflo API |
48
|
|
|
|
|
|
|
|
49
|
|
|
|
|
|
|
=head2 download |
50
|
|
|
|
|
|
|
|
51
|
|
|
|
|
|
|
Gets the binary content of the issue draft media. |
52
|
|
|
|
|
|
|
|
53
|
|
|
|
|
|
|
=head2 delete |
54
|
|
|
|
|
|
|
|
55
|
|
|
|
|
|
|
Deletes the issue draft media. |
56
|
|
|
|
|
|
|
|
57
|
|
|
|
|
|
|
=cut |
58
|
|
|
|
|
|
|
|
59
|
|
|
|
|
|
|
sub create { |
60
|
3
|
|
|
3
|
1
|
2166
|
my ( $self,$update ) = @_; |
61
|
|
|
|
|
|
|
|
62
|
|
|
|
|
|
|
$self->SUPER::_create( $update,'IssueDraftMedia',sub { |
63
|
2
|
|
|
2
|
|
4
|
my ( $self ) = @_; |
64
|
|
|
|
|
|
|
|
65
|
2
|
50
|
|
|
|
87
|
$self->Id or $self->Id( undef ); # force null in JSON request |
66
|
|
|
|
|
|
|
|
67
|
2
|
|
|
|
|
8
|
return { $self->to_hash }; |
68
|
3
|
|
|
|
|
24
|
} ); |
69
|
|
|
|
|
|
|
} |
70
|
|
|
|
|
|
|
|
71
|
|
|
|
|
|
|
sub download { |
72
|
1
|
|
|
1
|
1
|
3
|
my ( $self ) = @_; |
73
|
|
|
|
|
|
|
|
74
|
1
|
50
|
|
|
|
5
|
Business::Fixflo::Exception->throw({ |
75
|
|
|
|
|
|
|
message => "Can't download IssueDraftMedia if Id is not set", |
76
|
|
|
|
|
|
|
}) if ! $self->Id; |
77
|
|
|
|
|
|
|
|
78
|
1
|
|
|
|
|
7
|
return $self->client->api_get( 'IssueDraftMedia/' . $self->Id . '/Download' ) |
79
|
|
|
|
|
|
|
} |
80
|
|
|
|
|
|
|
|
81
|
|
|
|
|
|
|
sub delete { |
82
|
1
|
|
|
1
|
1
|
3
|
my ( $self ) = @_; |
83
|
|
|
|
|
|
|
|
84
|
1
|
50
|
|
|
|
5
|
Business::Fixflo::Exception->throw({ |
85
|
|
|
|
|
|
|
message => "Can't delete IssueDraftMedia if Id is not set", |
86
|
|
|
|
|
|
|
}) if ! $self->Id; |
87
|
|
|
|
|
|
|
|
88
|
1
|
|
|
|
|
5
|
my $post_data = { Id => $self->Id }; |
89
|
|
|
|
|
|
|
|
90
|
1
|
|
|
|
|
5
|
return $self->_parse_envelope_data( |
91
|
|
|
|
|
|
|
$self->client->api_post( 'IssueDraftMedia/Delete',$post_data ) |
92
|
|
|
|
|
|
|
); |
93
|
|
|
|
|
|
|
} |
94
|
|
|
|
|
|
|
|
95
|
|
|
|
|
|
|
=head1 AUTHOR |
96
|
|
|
|
|
|
|
|
97
|
|
|
|
|
|
|
Lee Johnson - C |
98
|
|
|
|
|
|
|
|
99
|
|
|
|
|
|
|
This library is free software; you can redistribute it and/or modify it under |
100
|
|
|
|
|
|
|
the same terms as Perl itself. If you would like to contribute documentation, |
101
|
|
|
|
|
|
|
features, bug fixes, or anything else then please raise an issue / pull request: |
102
|
|
|
|
|
|
|
|
103
|
|
|
|
|
|
|
https://github.com/Humanstate/business-fixflo |
104
|
|
|
|
|
|
|
|
105
|
|
|
|
|
|
|
=cut |
106
|
|
|
|
|
|
|
|
107
|
|
|
|
|
|
|
1; |
108
|
|
|
|
|
|
|
|
109
|
|
|
|
|
|
|
# vim: ts=4:sw=4:et |