blib/lib/VM/EC2/DB/Reserved/RecurringCharge.pm untested

filter: Statementstmt 0.0% 0 / 16 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 0.0% 0 / 7 Podpod 0.0% 0 / 4 totaltotal 0.0% 0 / 27 CC 1 SCAR 6.9
CC
1
Cov
0%
valid_fields
2.0
amount
2.0
frequency
2.0
CRAP 2.0
1 package VM::EC2::DB::Reserved::RecurringCharge;
2  
3 =head1 NAME
4  
5 VM::EC2::DB::Reserved::RecurringCharge - An RDS Database Reserved Instance Recurring Charge
6  
7 =head1 SYNOPSIS
8  
9 use VM::EC2;
10 $ec2 = VM::EC2->new(...);
11 @i = $ec2->describe_reserved_db_instances;
12 print $_->RecurringCharges,"\n" foreach grep { $_->State eq 'active' } @i;
13  
14 =head1 DESCRIPTION
15  
16 This object represents a recurring charge from an RDS Reserved DB Instance or an
17 RDS Reserved DB Instance Offering.
18  
19 =head1 STRING OVERLOADING
20  
21 In string context, this object returns a string containing the recurring charge
22 amount and frequency.
23  
24 =head1 SEE ALSO
25  
26 L<VM::EC2>
27 L<VM::EC2::Generic>
28 L<VM::EC2::DB::Instance>
29  
30 =head1 AUTHOR
31  
32 Lance Kinley E<lt>lkinley@loyaltymethods.comE<gt>.
33  
34 Copyright (c) 2013 Loyalty Methods, Inc.
35  
36 This package and its accompanying libraries is free software; you can
37 redistribute it and/or modify it under the terms of the GPL (either
38 version 1, or at your option, any later version) or the Artistic
39 License 2.0. Refer to LICENSE for the full license text. In addition,
40 please see DISCLAIMER.txt for disclaimers of warranty.
41  
42 =cut
43  
44 use strict;
45 use base 'VM::EC2::Generic';
46  
47 use overload '""' => sub { shift->as_string },
48 fallback => 1;
49  
50 sub valid_fields {
51 my $self = shift;
52 return qw(RecurringChargeAmount RecurringChargeFrequency);
53 }
54  
55 sub amount { shift->RecurringChargeAmount }
56  
57 sub frequency { shift->RecurringChargeFrequency }
58  
59 sub as_string {
60 my $self = shift;
61 return $self->RecurringChargeAmount . '/' . $self->RecurringChargeFrequency;
62 }
63  
64 1;