| line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
|
1
|
|
|
|
|
|
|
package Business::SiteCatalyst::Company; |
|
2
|
|
|
|
|
|
|
|
|
3
|
17
|
|
|
17
|
|
37343
|
use strict; |
|
|
17
|
|
|
|
|
34
|
|
|
|
17
|
|
|
|
|
617
|
|
|
4
|
17
|
|
|
17
|
|
96
|
use warnings; |
|
|
17
|
|
|
|
|
31
|
|
|
|
17
|
|
|
|
|
574
|
|
|
5
|
|
|
|
|
|
|
|
|
6
|
17
|
|
|
17
|
|
90
|
use Carp; |
|
|
17
|
|
|
|
|
32
|
|
|
|
17
|
|
|
|
|
1155
|
|
|
7
|
17
|
|
|
17
|
|
100
|
use Data::Dumper; |
|
|
17
|
|
|
|
|
32
|
|
|
|
17
|
|
|
|
|
918
|
|
|
8
|
17
|
|
|
17
|
|
4916
|
use Data::Validate::Type; |
|
|
17
|
|
|
|
|
51206
|
|
|
|
17
|
|
|
|
|
19271
|
|
|
9
|
|
|
|
|
|
|
|
|
10
|
|
|
|
|
|
|
|
|
11
|
|
|
|
|
|
|
=head1 NAME |
|
12
|
|
|
|
|
|
|
|
|
13
|
|
|
|
|
|
|
Business::SiteCatalyst::Company - Interface to Adobe Omniture SiteCatalyst's REST API 'Company' module. |
|
14
|
|
|
|
|
|
|
|
|
15
|
|
|
|
|
|
|
|
|
16
|
|
|
|
|
|
|
=head1 VERSION |
|
17
|
|
|
|
|
|
|
|
|
18
|
|
|
|
|
|
|
Version 1.2.2 |
|
19
|
|
|
|
|
|
|
|
|
20
|
|
|
|
|
|
|
=cut |
|
21
|
|
|
|
|
|
|
|
|
22
|
|
|
|
|
|
|
our $VERSION = '1.2.2'; |
|
23
|
|
|
|
|
|
|
|
|
24
|
|
|
|
|
|
|
|
|
25
|
|
|
|
|
|
|
=head1 SYNOPSIS |
|
26
|
|
|
|
|
|
|
|
|
27
|
|
|
|
|
|
|
This module allows you to interact with Adobe (formerly Omniture) SiteCatalyst, |
|
28
|
|
|
|
|
|
|
a web analytics service. It encapsulates all the communications with the API |
|
29
|
|
|
|
|
|
|
provided by Adobe SiteCatalyst to offer a Perl interface for managing reports, |
|
30
|
|
|
|
|
|
|
pulling company-specific SiteCatalyst data (ex: token usage), uploading SAINT |
|
31
|
|
|
|
|
|
|
data (feature not implemented yet), etc. |
|
32
|
|
|
|
|
|
|
|
|
33
|
|
|
|
|
|
|
Please note that you will need to have purchased the Adobe SiteCatalyst product, |
|
34
|
|
|
|
|
|
|
and have web services enabled within your account first in order to obtain a web |
|
35
|
|
|
|
|
|
|
services shared secret, as well as agree with the Terms and Conditions for using |
|
36
|
|
|
|
|
|
|
the API. |
|
37
|
|
|
|
|
|
|
|
|
38
|
|
|
|
|
|
|
See SiteCatalyst API Explorer at |
|
39
|
|
|
|
|
|
|
https://developer.omniture.com/en_US/get-started/api-explorer |
|
40
|
|
|
|
|
|
|
for 'Company' module documentation |
|
41
|
|
|
|
|
|
|
|
|
42
|
|
|
|
|
|
|
|
|
43
|
|
|
|
|
|
|
use Business::SiteCatalyst; |
|
44
|
|
|
|
|
|
|
|
|
45
|
|
|
|
|
|
|
# Create an object to communicate with Adobe SiteCatalyst |
|
46
|
|
|
|
|
|
|
my $site_catalyst = Business::SiteCatalyst->new( |
|
47
|
|
|
|
|
|
|
username => 'dummyusername', |
|
48
|
|
|
|
|
|
|
shared_secret => 'dummysecret', |
|
49
|
|
|
|
|
|
|
api_subdomain => 'api|api2', #optional; default value='api' |
|
50
|
|
|
|
|
|
|
); |
|
51
|
|
|
|
|
|
|
|
|
52
|
|
|
|
|
|
|
my $company = $site_catalyst->instantiate_company(); |
|
53
|
|
|
|
|
|
|
|
|
54
|
|
|
|
|
|
|
my $token_data = $company->get_token_usage(); |
|
55
|
|
|
|
|
|
|
|
|
56
|
|
|
|
|
|
|
my $tokens_left = $company->get_token_count(); |
|
57
|
|
|
|
|
|
|
|
|
58
|
|
|
|
|
|
|
my $report_suites = $company->get_report_suites(); |
|
59
|
|
|
|
|
|
|
|
|
60
|
|
|
|
|
|
|
my $tracking_server = $company->get_tracking_server(); |
|
61
|
|
|
|
|
|
|
|
|
62
|
|
|
|
|
|
|
my $endpoint = $company->get_endpoint( company => $company ); |
|
63
|
|
|
|
|
|
|
|
|
64
|
|
|
|
|
|
|
my $queue_list = $company->get_queue(); |
|
65
|
|
|
|
|
|
|
|
|
66
|
|
|
|
|
|
|
my $success = $company->cancel_queue_item( queue_id => $queue_item_id ); |
|
67
|
|
|
|
|
|
|
|
|
68
|
|
|
|
|
|
|
my $version_list = $company->get_version_access(); |
|
69
|
|
|
|
|
|
|
|
|
70
|
|
|
|
|
|
|
=head1 METHODS |
|
71
|
|
|
|
|
|
|
|
|
72
|
|
|
|
|
|
|
=head2 new() |
|
73
|
|
|
|
|
|
|
|
|
74
|
|
|
|
|
|
|
Create a new Business::SiteCatalyst::Company object, which |
|
75
|
|
|
|
|
|
|
will allow retrieval of SiteCatalyst company-specific info. |
|
76
|
|
|
|
|
|
|
|
|
77
|
|
|
|
|
|
|
NOTE: -This should not be called directly-. Instead, use |
|
78
|
|
|
|
|
|
|
Cinstantiate_company()>. |
|
79
|
|
|
|
|
|
|
|
|
80
|
|
|
|
|
|
|
my $company = Business::SiteCatalyst::Company->new( |
|
81
|
|
|
|
|
|
|
$site_catalyst, |
|
82
|
|
|
|
|
|
|
); |
|
83
|
|
|
|
|
|
|
|
|
84
|
|
|
|
|
|
|
Parameters: none |
|
85
|
|
|
|
|
|
|
|
|
86
|
|
|
|
|
|
|
=cut |
|
87
|
|
|
|
|
|
|
|
|
88
|
|
|
|
|
|
|
sub new |
|
89
|
|
|
|
|
|
|
{ |
|
90
|
1
|
|
|
1
|
1
|
4
|
my ( $class, $site_catalyst, %args ) = @_; |
|
91
|
|
|
|
|
|
|
|
|
92
|
|
|
|
|
|
|
# Check for mandatory parameters |
|
93
|
1
|
50
|
|
|
|
9
|
Data::Validate::Type::is_instance( $site_catalyst, class => 'Business::SiteCatalyst') |
|
94
|
|
|
|
|
|
|
|| croak "First argument must be a Business::SiteCatalyst object"; |
|
95
|
|
|
|
|
|
|
|
|
96
|
|
|
|
|
|
|
# Create the object |
|
97
|
1
|
|
|
|
|
33
|
my $self = bless( |
|
98
|
|
|
|
|
|
|
{ |
|
99
|
|
|
|
|
|
|
site_catalyst => $site_catalyst, |
|
100
|
|
|
|
|
|
|
}, |
|
101
|
|
|
|
|
|
|
$class, |
|
102
|
|
|
|
|
|
|
); |
|
103
|
|
|
|
|
|
|
|
|
104
|
1
|
|
|
|
|
4
|
return $self; |
|
105
|
|
|
|
|
|
|
} |
|
106
|
|
|
|
|
|
|
|
|
107
|
|
|
|
|
|
|
|
|
108
|
|
|
|
|
|
|
=head2 get_token_count() |
|
109
|
|
|
|
|
|
|
|
|
110
|
|
|
|
|
|
|
Determine the number of tokens left for your company. You are alloted |
|
111
|
|
|
|
|
|
|
10,000 tokens per month. |
|
112
|
|
|
|
|
|
|
|
|
113
|
|
|
|
|
|
|
my $tokens_left = $company->get_token_count(); |
|
114
|
|
|
|
|
|
|
|
|
115
|
|
|
|
|
|
|
|
|
116
|
|
|
|
|
|
|
=cut |
|
117
|
|
|
|
|
|
|
|
|
118
|
|
|
|
|
|
|
sub get_token_count |
|
119
|
|
|
|
|
|
|
{ |
|
120
|
0
|
|
|
0
|
1
|
|
my ( $self, %args ) = @_; |
|
121
|
|
|
|
|
|
|
|
|
122
|
0
|
|
|
|
|
|
my $site_catalyst = $self->get_site_catalyst(); |
|
123
|
|
|
|
|
|
|
|
|
124
|
0
|
|
|
|
|
|
my $response = $site_catalyst->send_request( |
|
125
|
|
|
|
|
|
|
method => 'Company.GetTokenCount', |
|
126
|
|
|
|
|
|
|
data => {'' => []} |
|
127
|
|
|
|
|
|
|
); |
|
128
|
|
|
|
|
|
|
|
|
129
|
0
|
0
|
|
|
|
|
if ( !defined($response) ) |
|
130
|
|
|
|
|
|
|
{ |
|
131
|
0
|
|
|
|
|
|
croak "Fatal error. No response."; |
|
132
|
|
|
|
|
|
|
} |
|
133
|
|
|
|
|
|
|
|
|
134
|
0
|
|
|
|
|
|
return $response; |
|
135
|
|
|
|
|
|
|
} |
|
136
|
|
|
|
|
|
|
|
|
137
|
|
|
|
|
|
|
|
|
138
|
|
|
|
|
|
|
|
|
139
|
|
|
|
|
|
|
=head2 get_token_usage() |
|
140
|
|
|
|
|
|
|
|
|
141
|
|
|
|
|
|
|
Information about the company's token usage for the current calendar month, |
|
142
|
|
|
|
|
|
|
broken down by user account. |
|
143
|
|
|
|
|
|
|
|
|
144
|
|
|
|
|
|
|
my $token_data = $company->get_token_usage(); |
|
145
|
|
|
|
|
|
|
|
|
146
|
|
|
|
|
|
|
|
|
147
|
|
|
|
|
|
|
=cut |
|
148
|
|
|
|
|
|
|
|
|
149
|
|
|
|
|
|
|
sub get_token_usage |
|
150
|
|
|
|
|
|
|
{ |
|
151
|
0
|
|
|
0
|
1
|
|
my ( $self, %args ) = @_; |
|
152
|
|
|
|
|
|
|
|
|
153
|
0
|
|
|
|
|
|
my $site_catalyst = $self->get_site_catalyst(); |
|
154
|
|
|
|
|
|
|
|
|
155
|
0
|
|
|
|
|
|
my $response = $site_catalyst->send_request( |
|
156
|
|
|
|
|
|
|
method => 'Company.GetTokenUsage', |
|
157
|
|
|
|
|
|
|
data => {'' => []} |
|
158
|
|
|
|
|
|
|
); |
|
159
|
|
|
|
|
|
|
|
|
160
|
0
|
0
|
|
|
|
|
if ( !defined($response) ) |
|
161
|
|
|
|
|
|
|
{ |
|
162
|
0
|
|
|
|
|
|
croak "Fatal error. No response."; |
|
163
|
|
|
|
|
|
|
} |
|
164
|
|
|
|
|
|
|
|
|
165
|
0
|
|
|
|
|
|
return $response; |
|
166
|
|
|
|
|
|
|
} |
|
167
|
|
|
|
|
|
|
|
|
168
|
|
|
|
|
|
|
|
|
169
|
|
|
|
|
|
|
=head2 get_site_catalyst() |
|
170
|
|
|
|
|
|
|
|
|
171
|
|
|
|
|
|
|
Get Business::SiteCatalyst object used when creating the current object. |
|
172
|
|
|
|
|
|
|
|
|
173
|
|
|
|
|
|
|
my $site_catalyst = $report->get_site_catalyst(); |
|
174
|
|
|
|
|
|
|
|
|
175
|
|
|
|
|
|
|
=cut |
|
176
|
|
|
|
|
|
|
|
|
177
|
|
|
|
|
|
|
sub get_site_catalyst |
|
178
|
|
|
|
|
|
|
{ |
|
179
|
0
|
|
|
0
|
1
|
|
my ( $self ) = @_; |
|
180
|
|
|
|
|
|
|
|
|
181
|
0
|
|
|
|
|
|
return $self->{'site_catalyst'}; |
|
182
|
|
|
|
|
|
|
} |
|
183
|
|
|
|
|
|
|
|
|
184
|
|
|
|
|
|
|
|
|
185
|
|
|
|
|
|
|
|
|
186
|
|
|
|
|
|
|
=head2 get_report_suites() |
|
187
|
|
|
|
|
|
|
|
|
188
|
|
|
|
|
|
|
Information about the company's report suites configured in SiteCatalyst. |
|
189
|
|
|
|
|
|
|
|
|
190
|
|
|
|
|
|
|
my $report_suites = $company->get_report_suites(); |
|
191
|
|
|
|
|
|
|
|
|
192
|
|
|
|
|
|
|
|
|
193
|
|
|
|
|
|
|
=cut |
|
194
|
|
|
|
|
|
|
|
|
195
|
|
|
|
|
|
|
sub get_report_suites |
|
196
|
|
|
|
|
|
|
{ |
|
197
|
0
|
|
|
0
|
1
|
|
my ( $self, %args ) = @_; |
|
198
|
|
|
|
|
|
|
|
|
199
|
0
|
|
|
|
|
|
my $site_catalyst = $self->get_site_catalyst(); |
|
200
|
|
|
|
|
|
|
|
|
201
|
0
|
|
|
|
|
|
my $response = $site_catalyst->send_request( |
|
202
|
|
|
|
|
|
|
method => 'Company.GetReportSuites', |
|
203
|
|
|
|
|
|
|
data => {'' => []} |
|
204
|
|
|
|
|
|
|
); |
|
205
|
|
|
|
|
|
|
|
|
206
|
0
|
0
|
0
|
|
|
|
if ( !defined($response) || !defined($response->{'report_suites'}) ) |
|
207
|
|
|
|
|
|
|
{ |
|
208
|
0
|
|
|
|
|
|
croak "Fatal error. No response or 'report_suites' missing from response."; |
|
209
|
|
|
|
|
|
|
} |
|
210
|
|
|
|
|
|
|
|
|
211
|
0
|
|
|
|
|
|
return $response->{'report_suites'}; |
|
212
|
|
|
|
|
|
|
} |
|
213
|
|
|
|
|
|
|
|
|
214
|
|
|
|
|
|
|
|
|
215
|
|
|
|
|
|
|
=head2 get_tracking_server() |
|
216
|
|
|
|
|
|
|
|
|
217
|
|
|
|
|
|
|
Returns the tracking server and namespace for the specified report suite. |
|
218
|
|
|
|
|
|
|
If report suite is not specified, 'report_suite_id' in SiteCatalystConfig |
|
219
|
|
|
|
|
|
|
(if one exists) will be used. |
|
220
|
|
|
|
|
|
|
|
|
221
|
|
|
|
|
|
|
my $tracking_server = $company->get_tracking_server(); |
|
222
|
|
|
|
|
|
|
my $tracking_server = $company->get_tracking_server( |
|
223
|
|
|
|
|
|
|
report_suite_id => $report_suite_id |
|
224
|
|
|
|
|
|
|
); |
|
225
|
|
|
|
|
|
|
|
|
226
|
|
|
|
|
|
|
Optional parameters: |
|
227
|
|
|
|
|
|
|
|
|
228
|
|
|
|
|
|
|
=over 4 |
|
229
|
|
|
|
|
|
|
|
|
230
|
|
|
|
|
|
|
=item * report_suite_id |
|
231
|
|
|
|
|
|
|
|
|
232
|
|
|
|
|
|
|
The Report Suite ID you want to pull data from. |
|
233
|
|
|
|
|
|
|
|
|
234
|
|
|
|
|
|
|
=back |
|
235
|
|
|
|
|
|
|
|
|
236
|
|
|
|
|
|
|
=cut |
|
237
|
|
|
|
|
|
|
|
|
238
|
|
|
|
|
|
|
sub get_tracking_server |
|
239
|
|
|
|
|
|
|
{ |
|
240
|
0
|
|
|
0
|
1
|
|
my ( $self, %args ) = @_; |
|
241
|
|
|
|
|
|
|
|
|
242
|
|
|
|
|
|
|
# If report suite was not specified as an argument, try to use value from config |
|
243
|
0
|
0
|
0
|
|
|
|
if ( !defined $args{'report_suite_id'} || $args{'report_suite_id'} eq '' ) |
|
244
|
|
|
|
|
|
|
{ |
|
245
|
0
|
|
|
|
|
|
require SiteCatalystConfig; |
|
246
|
0
|
|
|
|
|
|
my $config = SiteCatalystConfig->new(); |
|
247
|
|
|
|
|
|
|
|
|
248
|
0
|
0
|
0
|
|
|
|
if ( defined( $config ) && $config->{'report_suite_id'} ne '' ) |
|
249
|
|
|
|
|
|
|
{ |
|
250
|
0
|
|
|
|
|
|
$args{'report_suite_id'} = $config->{'report_suite_id'}; |
|
251
|
|
|
|
|
|
|
} |
|
252
|
|
|
|
|
|
|
else |
|
253
|
|
|
|
|
|
|
{ |
|
254
|
0
|
0
|
0
|
|
|
|
croak "Argument 'report_suite_id' is required because 'report_suite_id' is not specified in SiteCatalystConfig.pm" |
|
255
|
|
|
|
|
|
|
if !defined( $args{'report_suite_id'} ) || ( $args{'report_suite_id'} eq '' ); |
|
256
|
|
|
|
|
|
|
} |
|
257
|
|
|
|
|
|
|
} |
|
258
|
|
|
|
|
|
|
|
|
259
|
0
|
|
|
|
|
|
my $site_catalyst = $self->get_site_catalyst(); |
|
260
|
|
|
|
|
|
|
|
|
261
|
0
|
|
|
|
|
|
my $response = $site_catalyst->send_request( |
|
262
|
|
|
|
|
|
|
method => 'Company.GetTrackingServer', |
|
263
|
|
|
|
|
|
|
data => { 'rsid' => $args{'report_suite_id'} } |
|
264
|
|
|
|
|
|
|
); |
|
265
|
|
|
|
|
|
|
|
|
266
|
0
|
0
|
0
|
|
|
|
if ( !defined($response) || !defined($response->{'tracking_server'}) ) |
|
267
|
|
|
|
|
|
|
{ |
|
268
|
0
|
|
|
|
|
|
croak "Fatal error. No response or missing tracking_server in response"; |
|
269
|
|
|
|
|
|
|
} |
|
270
|
|
|
|
|
|
|
|
|
271
|
0
|
|
|
|
|
|
return $response->{'tracking_server'}; |
|
272
|
|
|
|
|
|
|
} |
|
273
|
|
|
|
|
|
|
|
|
274
|
|
|
|
|
|
|
|
|
275
|
|
|
|
|
|
|
=head2 get_endpoint() |
|
276
|
|
|
|
|
|
|
|
|
277
|
|
|
|
|
|
|
Retrieves the endpoint (API URL) for the specified company. |
|
278
|
|
|
|
|
|
|
NOTE: You can specify any company, not just your own. |
|
279
|
|
|
|
|
|
|
|
|
280
|
|
|
|
|
|
|
my $endpoint = $company->get_endpoint( company => $company ); |
|
281
|
|
|
|
|
|
|
|
|
282
|
|
|
|
|
|
|
Parameters: |
|
283
|
|
|
|
|
|
|
|
|
284
|
|
|
|
|
|
|
=over 4 |
|
285
|
|
|
|
|
|
|
|
|
286
|
|
|
|
|
|
|
=item * company |
|
287
|
|
|
|
|
|
|
|
|
288
|
|
|
|
|
|
|
The company whose endpoint you want to retrieve. |
|
289
|
|
|
|
|
|
|
|
|
290
|
|
|
|
|
|
|
=back |
|
291
|
|
|
|
|
|
|
|
|
292
|
|
|
|
|
|
|
=cut |
|
293
|
|
|
|
|
|
|
|
|
294
|
|
|
|
|
|
|
sub get_endpoint |
|
295
|
|
|
|
|
|
|
{ |
|
296
|
0
|
|
|
0
|
1
|
|
my ( $self, %args ) = @_; |
|
297
|
|
|
|
|
|
|
|
|
298
|
0
|
0
|
0
|
|
|
|
croak "Argument 'company' is required" |
|
299
|
|
|
|
|
|
|
if !defined( $args{'company'} ) || ( $args{'company'} eq '' ); |
|
300
|
|
|
|
|
|
|
|
|
301
|
0
|
|
|
|
|
|
my $site_catalyst = $self->get_site_catalyst(); |
|
302
|
|
|
|
|
|
|
|
|
303
|
0
|
|
|
|
|
|
my $response = $site_catalyst->send_request( |
|
304
|
|
|
|
|
|
|
method => 'Company.GetEndpoint', |
|
305
|
|
|
|
|
|
|
data => { 'company' => $args{'company'} } |
|
306
|
|
|
|
|
|
|
); |
|
307
|
|
|
|
|
|
|
|
|
308
|
0
|
0
|
|
|
|
|
if ( !defined($response) ) |
|
309
|
|
|
|
|
|
|
{ |
|
310
|
0
|
|
|
|
|
|
croak "Fatal error. No response."; |
|
311
|
|
|
|
|
|
|
} |
|
312
|
|
|
|
|
|
|
|
|
313
|
0
|
|
|
|
|
|
return $response; |
|
314
|
|
|
|
|
|
|
} |
|
315
|
|
|
|
|
|
|
|
|
316
|
|
|
|
|
|
|
|
|
317
|
|
|
|
|
|
|
=head2 get_queue() |
|
318
|
|
|
|
|
|
|
|
|
319
|
|
|
|
|
|
|
Returns queued items that are pending approval for the requesting company. |
|
320
|
|
|
|
|
|
|
|
|
321
|
|
|
|
|
|
|
my $queue_list = $company->get_queue(); |
|
322
|
|
|
|
|
|
|
|
|
323
|
|
|
|
|
|
|
|
|
324
|
|
|
|
|
|
|
=cut |
|
325
|
|
|
|
|
|
|
|
|
326
|
|
|
|
|
|
|
sub get_queue |
|
327
|
|
|
|
|
|
|
{ |
|
328
|
0
|
|
|
0
|
1
|
|
my ( $self, %args ) = @_; |
|
329
|
|
|
|
|
|
|
|
|
330
|
0
|
|
|
|
|
|
my $site_catalyst = $self->get_site_catalyst(); |
|
331
|
|
|
|
|
|
|
|
|
332
|
0
|
|
|
|
|
|
my $response = $site_catalyst->send_request( |
|
333
|
|
|
|
|
|
|
method => 'Company.GetQueue', |
|
334
|
|
|
|
|
|
|
data => {'' => []} |
|
335
|
|
|
|
|
|
|
); |
|
336
|
|
|
|
|
|
|
|
|
337
|
0
|
0
|
|
|
|
|
if ( !defined($response) ) |
|
338
|
|
|
|
|
|
|
{ |
|
339
|
0
|
|
|
|
|
|
croak "Fatal error. No response."; |
|
340
|
|
|
|
|
|
|
} |
|
341
|
|
|
|
|
|
|
|
|
342
|
0
|
|
|
|
|
|
return $response; |
|
343
|
|
|
|
|
|
|
} |
|
344
|
|
|
|
|
|
|
|
|
345
|
|
|
|
|
|
|
|
|
346
|
|
|
|
|
|
|
=head2 cancel_queue_item() |
|
347
|
|
|
|
|
|
|
|
|
348
|
|
|
|
|
|
|
Cancel a pending (queued) action that has yet to be approved. |
|
349
|
|
|
|
|
|
|
|
|
350
|
|
|
|
|
|
|
my $success = $company->cancel_queue_item( queue_id => $queue_item_id ); |
|
351
|
|
|
|
|
|
|
|
|
352
|
|
|
|
|
|
|
Parameters: |
|
353
|
|
|
|
|
|
|
|
|
354
|
|
|
|
|
|
|
=over 4 |
|
355
|
|
|
|
|
|
|
|
|
356
|
|
|
|
|
|
|
=item * queue_id |
|
357
|
|
|
|
|
|
|
|
|
358
|
|
|
|
|
|
|
The numeric identifier of the pending item you wish to cancel. |
|
359
|
|
|
|
|
|
|
|
|
360
|
|
|
|
|
|
|
=back |
|
361
|
|
|
|
|
|
|
|
|
362
|
|
|
|
|
|
|
=cut |
|
363
|
|
|
|
|
|
|
|
|
364
|
|
|
|
|
|
|
sub cancel_queue_item |
|
365
|
|
|
|
|
|
|
{ |
|
366
|
0
|
|
|
0
|
1
|
|
my ( $self, %args ) = @_; |
|
367
|
|
|
|
|
|
|
|
|
368
|
0
|
0
|
0
|
|
|
|
croak "Argument 'queue_id' is required" |
|
369
|
|
|
|
|
|
|
if !defined( $args{'queue_id'} ) || ( $args{'queue_id'} eq '' ); |
|
370
|
|
|
|
|
|
|
|
|
371
|
0
|
|
|
|
|
|
my $site_catalyst = $self->get_site_catalyst(); |
|
372
|
|
|
|
|
|
|
|
|
373
|
0
|
|
|
|
|
|
my $response = $site_catalyst->send_request( |
|
374
|
|
|
|
|
|
|
method => 'Company.CancelQueueItem', |
|
375
|
|
|
|
|
|
|
data => { 'qid' => $args{'queue_id'} } |
|
376
|
|
|
|
|
|
|
); |
|
377
|
|
|
|
|
|
|
|
|
378
|
0
|
0
|
|
|
|
|
if ( !defined($response) ) |
|
379
|
|
|
|
|
|
|
{ |
|
380
|
0
|
|
|
|
|
|
croak "Fatal error. No response."; |
|
381
|
|
|
|
|
|
|
} |
|
382
|
|
|
|
|
|
|
|
|
383
|
0
|
0
|
|
|
|
|
return $response eq 'true' ? 1 : 0; |
|
384
|
|
|
|
|
|
|
} |
|
385
|
|
|
|
|
|
|
|
|
386
|
|
|
|
|
|
|
|
|
387
|
|
|
|
|
|
|
=head2 get_version_access() |
|
388
|
|
|
|
|
|
|
|
|
389
|
|
|
|
|
|
|
Information about the version of various Adobe services you have access to. |
|
390
|
|
|
|
|
|
|
|
|
391
|
|
|
|
|
|
|
my $version_list = $company->get_version_access(); |
|
392
|
|
|
|
|
|
|
|
|
393
|
|
|
|
|
|
|
|
|
394
|
|
|
|
|
|
|
=cut |
|
395
|
|
|
|
|
|
|
|
|
396
|
|
|
|
|
|
|
sub get_version_access |
|
397
|
|
|
|
|
|
|
{ |
|
398
|
0
|
|
|
0
|
1
|
|
my ( $self, %args ) = @_; |
|
399
|
|
|
|
|
|
|
|
|
400
|
0
|
|
|
|
|
|
my $site_catalyst = $self->get_site_catalyst(); |
|
401
|
|
|
|
|
|
|
|
|
402
|
0
|
|
|
|
|
|
my $response = $site_catalyst->send_request( |
|
403
|
|
|
|
|
|
|
method => 'Company.GetVersionAccess', |
|
404
|
|
|
|
|
|
|
data => {'' => []} |
|
405
|
|
|
|
|
|
|
); |
|
406
|
|
|
|
|
|
|
|
|
407
|
0
|
0
|
|
|
|
|
if ( !defined($response) ) |
|
408
|
|
|
|
|
|
|
{ |
|
409
|
0
|
|
|
|
|
|
croak "Fatal error. No response."; |
|
410
|
|
|
|
|
|
|
} |
|
411
|
|
|
|
|
|
|
|
|
412
|
0
|
|
|
|
|
|
return $response; |
|
413
|
|
|
|
|
|
|
} |
|
414
|
|
|
|
|
|
|
|
|
415
|
|
|
|
|
|
|
|
|
416
|
|
|
|
|
|
|
=head1 AUTHOR |
|
417
|
|
|
|
|
|
|
|
|
418
|
|
|
|
|
|
|
Jennifer Pinkham, C<< >>. |
|
419
|
|
|
|
|
|
|
|
|
420
|
|
|
|
|
|
|
|
|
421
|
|
|
|
|
|
|
=head1 BUGS |
|
422
|
|
|
|
|
|
|
|
|
423
|
|
|
|
|
|
|
Please report any bugs or feature requests to C, |
|
424
|
|
|
|
|
|
|
or through the web interface at L. |
|
425
|
|
|
|
|
|
|
I will be notified, and then you'll automatically be notified of progress on |
|
426
|
|
|
|
|
|
|
your bug as I make changes. |
|
427
|
|
|
|
|
|
|
|
|
428
|
|
|
|
|
|
|
|
|
429
|
|
|
|
|
|
|
=head1 SUPPORT |
|
430
|
|
|
|
|
|
|
|
|
431
|
|
|
|
|
|
|
You can find documentation for this module with the perldoc command. |
|
432
|
|
|
|
|
|
|
|
|
433
|
|
|
|
|
|
|
perldoc Business::SiteCatalyst::Company |
|
434
|
|
|
|
|
|
|
|
|
435
|
|
|
|
|
|
|
|
|
436
|
|
|
|
|
|
|
You can also look for information at: |
|
437
|
|
|
|
|
|
|
|
|
438
|
|
|
|
|
|
|
=over 4 |
|
439
|
|
|
|
|
|
|
|
|
440
|
|
|
|
|
|
|
=item * RT: CPAN's request tracker |
|
441
|
|
|
|
|
|
|
|
|
442
|
|
|
|
|
|
|
L |
|
443
|
|
|
|
|
|
|
|
|
444
|
|
|
|
|
|
|
=item * AnnoCPAN: Annotated CPAN documentation |
|
445
|
|
|
|
|
|
|
|
|
446
|
|
|
|
|
|
|
L |
|
447
|
|
|
|
|
|
|
|
|
448
|
|
|
|
|
|
|
=item * CPAN Ratings |
|
449
|
|
|
|
|
|
|
|
|
450
|
|
|
|
|
|
|
L |
|
451
|
|
|
|
|
|
|
|
|
452
|
|
|
|
|
|
|
=item * Search CPAN |
|
453
|
|
|
|
|
|
|
|
|
454
|
|
|
|
|
|
|
L |
|
455
|
|
|
|
|
|
|
|
|
456
|
|
|
|
|
|
|
=back |
|
457
|
|
|
|
|
|
|
|
|
458
|
|
|
|
|
|
|
|
|
459
|
|
|
|
|
|
|
=head1 ACKNOWLEDGEMENTS |
|
460
|
|
|
|
|
|
|
|
|
461
|
|
|
|
|
|
|
Thanks to ThinkGeek (L) and its corporate overlords |
|
462
|
|
|
|
|
|
|
at Geeknet (L), for footing the bill while I write |
|
463
|
|
|
|
|
|
|
code for them! Special thanks for technical help from fellow ThinkGeek CPAN |
|
464
|
|
|
|
|
|
|
author Guillaume Aubert L |
|
465
|
|
|
|
|
|
|
|
|
466
|
|
|
|
|
|
|
|
|
467
|
|
|
|
|
|
|
=head1 COPYRIGHT & LICENSE |
|
468
|
|
|
|
|
|
|
|
|
469
|
|
|
|
|
|
|
Copyright 2013 Jennifer Pinkham. |
|
470
|
|
|
|
|
|
|
|
|
471
|
|
|
|
|
|
|
This program is free software; you can redistribute it and/or modify it |
|
472
|
|
|
|
|
|
|
under the terms of the Artistic License. |
|
473
|
|
|
|
|
|
|
|
|
474
|
|
|
|
|
|
|
See http://dev.perl.org/licenses/ for more information. |
|
475
|
|
|
|
|
|
|
|
|
476
|
|
|
|
|
|
|
=cut |
|
477
|
|
|
|
|
|
|
|
|
478
|
|
|
|
|
|
|
1; |