blib/lib/Paws/MarketplaceEntitlement.pm untested

filter: Statementstmt 0.0% 0 / 38 Branchbran 0.0% 0 / 4 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 0.0% 0 / 9 Podpod 0.0% 0 / 8 totaltotal 0.0% 0 / 59 CC 3 SCAR 15.5
CC
3
Cov
0%
GetAllEntitlements
12.0
service
2.0
signing_name
2.0
CRAP 4.7
1 package Paws::MarketplaceEntitlement;
2 use Moose;
3 sub service { 'entitlement.marketplace' }
4 sub signing_name { 'aws-marketplace' }
5 sub version { '2017-01-11' }
6 sub target_prefix { 'AWSMPEntitlementService' }
7 sub json_version { "1.1" }
8 has max_attempts => (is => 'ro', isa => 'Int', default => 5);
9 has retry => (is => 'ro', isa => 'HashRef', default => sub {
10 { base => 'rand', type => 'exponential', growth_factor => 2 }
11 });
12 has retriables => (is => 'ro', isa => 'ArrayRef', default => sub { [
13 ] });
14  
15 with 'Paws::API::Caller', 'Paws::API::EndpointResolver', 'Paws::Net::V4Signature', 'Paws::Net::JsonCaller';
16  
17
18 sub GetEntitlements {
19 my $self = shift;
20 my $call_object = $self->new_with_coercions('Paws::MarketplaceEntitlement::GetEntitlements', @_);
21 return $self->caller->do_call($self, $call_object);
22 }
23
24 sub GetAllEntitlements {
25 my $self = shift;
26  
27 my $callback = shift @_ if (ref($_[0]) eq 'CODE');
28 my $result = $self->GetEntitlements(@_);
29 my $next_result = $result;
30  
31 if (not defined $callback) {
32 while ($next_result->NextToken) {
33 $next_result = $self->GetEntitlements(@_, NextToken => $next_result->NextToken);
34 push @{ $result->Entitlements }, @{ $next_result->Entitlements };
35 }
36 return $result;
37 } else {
38 while ($result->NextToken) {
39 $callback->($_ => 'Entitlements') foreach (@{ $result->Entitlements });
40 $result = $self->GetEntitlements(@_, NextToken => $result->NextToken);
41 }
42 $callback->($_ => 'Entitlements') foreach (@{ $result->Entitlements });
43 }
44  
45 return undef
46 }
47  
48  
49 sub operations { qw/GetEntitlements / }
50  
51 1;
52  
53 ### main pod documentation begin ###
54  
55 =head1 NAME
56  
57 Paws::MarketplaceEntitlement - Perl Interface to AWS AWS Marketplace Entitlement Service
58  
59 =head1 SYNOPSIS
60  
61 use Paws;
62  
63 my $obj = Paws->service('MarketplaceEntitlement');
64 my $res = $obj->Method(
65 Arg1 => $val1,
66 Arg2 => [ 'V1', 'V2' ],
67 # if Arg3 is an object, the HashRef will be used as arguments to the constructor
68 # of the arguments type
69 Arg3 => { Att1 => 'Val1' },
70 # if Arg4 is an array of objects, the HashRefs will be passed as arguments to
71 # the constructor of the arguments type
72 Arg4 => [ { Att1 => 'Val1' }, { Att1 => 'Val2' } ],
73 );
74  
75 =head1 DESCRIPTION
76  
77 AWS Marketplace Entitlement Service
78  
79 This reference provides descriptions of the AWS Marketplace Entitlement
80 Service API.
81  
82 AWS Marketplace Entitlement Service is used to determine the
83 entitlement of a customer to a given product. An entitlement represents
84 capacity in a product owned by the customer. For example, a customer
85 might own some number of users or seats in an SaaS application or some
86 amount of data capacity in a multi-tenant database.
87  
88 B<Getting Entitlement Records>
89  
90 =over
91  
92 =item *
93  
94 I<GetEntitlements>- Gets the entitlements for a Marketplace product.
95  
96 =back
97  
98  
99 For the AWS API documentation, see L<https://docs.aws.amazon.com/marketplaceentitlement/latest/APIReference/Welcome.html>
100  
101  
102 =head1 METHODS
103  
104 =head2 GetEntitlements
105  
106 =over
107  
108 =item ProductCode => Str
109  
110 =item [Filter => L<Paws::MarketplaceEntitlement::GetEntitlementFilters>]
111  
112 =item [MaxResults => Int]
113  
114 =item [NextToken => Str]
115  
116  
117 =back
118  
119 Each argument is described in detail in: L<Paws::MarketplaceEntitlement::GetEntitlements>
120  
121 Returns: a L<Paws::MarketplaceEntitlement::GetEntitlementsResult> instance
122  
123 GetEntitlements retrieves entitlement values for a given product. The
124 results can be filtered based on customer identifier or product
125 dimensions.
126  
127  
128  
129  
130 =head1 PAGINATORS
131  
132 Paginator methods are helpers that repetively call methods that return partial results
133  
134 =head2 GetAllEntitlements(sub { },ProductCode => Str, [Filter => L<Paws::MarketplaceEntitlement::GetEntitlementFilters>, MaxResults => Int, NextToken => Str])
135  
136 =head2 GetAllEntitlements(ProductCode => Str, [Filter => L<Paws::MarketplaceEntitlement::GetEntitlementFilters>, MaxResults => Int, NextToken => Str])
137  
138  
139 If passed a sub as first parameter, it will call the sub for each element found in :
140  
141 - Entitlements, passing the object as the first parameter, and the string 'Entitlements' as the second parameter
142  
143 If not, it will return a a L<Paws::MarketplaceEntitlement::GetEntitlementsResult> instance with all the C<param>s; from all the responses. Please take into account that this mode can potentially consume vasts ammounts of memory.
144  
145  
146  
147  
148  
149 =head1 SEE ALSO
150  
151 This service class forms part of L<Paws>
152  
153 =head1 BUGS and CONTRIBUTIONS
154  
155 The source code is located here: L<https://github.com/pplu/aws-sdk-perl>
156  
157 Please report bugs to: L<https://github.com/pplu/aws-sdk-perl/issues>
158  
159 =cut
160