Faker/Plugin/PaymentVendor.pm

filter: Statementstmt 100% 17 / 17 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 6 / 6 Podpod 50.0% 1 / 2 totaltotal 96.0% 24 / 25 CC 1 SCAR 0.0
CC
1
Cov
100%
BEGIN
1.0
BEGIN
1.0
BEGIN
1.0
CRAP 1.0
« Faker/Plugin/PaymentCardVisa.pm ↑ Summary Faker/Plugin/SoftwareAuthor.pm »
1 package Faker::Plugin::PaymentVendor;
2  
3 2 ▶use 5.018;
Subroutine BEGIN: called CC=1 SCAR=0.0
4  
5 2 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
6 2 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
7  
8 2 ▶use Venus::Class 'base';
Subroutine BEGIN: called CC=1 SCAR=0.0
9  
10 2 base 'Faker::Plugin';
11  
12 # VERSION
13  
14 2 our $VERSION = '1.19';
15  
16 # METHODS
17  
18 6 ▶sub execute {
Subroutine execute: called CC=1 SCAR=0.0
Pod documented
19 6 my ($self, $data) = @_;
20  
21 6 return $self->faker->random->select(data_for_payment_vendor());
22 }
23  
24 6 ▶sub data_for_payment_vendor {
Subroutine data_for_payment_vendor: called CC=1 SCAR=0.0
Pod undocumented
25 6 state $payment_vendor = [
26 'Visa',
27 'Visa',
28 'Visa',
29 'Visa',
30 'Visa',
31 'MasterCard',
32 'MasterCard',
33 'MasterCard',
34 'MasterCard',
35 'MasterCard',
36 'American Express',
37 'Discover Card',
38 ]
39 }
40  
41 2 1;
42  
43  
44  
45 =head1 NAME
46  
47 Faker::Plugin::PaymentVendor - Payment Vendor
48  
49 =cut
50  
51 =head1 ABSTRACT
52  
53 Payment Vendor for Faker
54  
55 =cut
56  
57 =head1 VERSION
58  
59 1.19
60  
61 =cut
62  
63 =head1 SYNOPSIS
64  
65 package main;
66  
67 use Faker::Plugin::PaymentVendor;
68  
69 my $plugin = Faker::Plugin::PaymentVendor->new;
70  
71 # bless(..., "Faker::Plugin::PaymentVendor")
72  
73 =cut
74  
75 =head1 DESCRIPTION
76  
77 This package provides methods for generating fake data for payment vendor.
78  
79 =encoding utf8
80  
81 =cut
82  
83 =head1 INHERITS
84  
85 This package inherits behaviors from:
86  
87 L<Faker::Plugin>
88  
89 =cut
90  
91 =head1 METHODS
92  
93 This package provides the following methods:
94  
95 =cut
96  
97 =head2 execute
98  
99 execute(HashRef $data) (Str)
100  
101 The execute method returns a returns a random fake payment vendor.
102  
103 I<Since C<1.10>>
104  
105 =over 4
106  
107 =item execute example 1
108  
109 package main;
110  
111 use Faker::Plugin::PaymentVendor;
112  
113 my $plugin = Faker::Plugin::PaymentVendor->new;
114  
115 # bless(..., "Faker::Plugin::PaymentVendor")
116  
117 # my $result = $plugin->execute;
118  
119 # "Visa";
120  
121 # my $result = $plugin->execute;
122  
123 # "MasterCard";
124  
125 # my $result = $plugin->execute;
126  
127 # "American Express";
128  
129 =back
130  
131 =cut
132  
133 =head2 new
134  
135 new(HashRef $data) (Plugin)
136  
137 The new method returns a new instance of the class.
138  
139 I<Since C<1.10>>
140  
141 =over 4
142  
143 =item new example 1
144  
145 package main;
146  
147 use Faker::Plugin::PaymentVendor;
148  
149 my $plugin = Faker::Plugin::PaymentVendor->new;
150  
151 # bless(..., "Faker::Plugin::PaymentVendor")
152  
153 =back
154  
155 =cut
156  
157 =head1 AUTHORS
158  
159 Awncorp, C<awncorp@cpan.org>
160  
161 =cut
162  
163 =head1 LICENSE
164  
165 Copyright (C) 2000, Al Newkirk.
166  
167 This program is free software, you can redistribute it and/or modify it under
168 the terms of the Apache license version 2.0.
169  
170 =cut
« Faker/Plugin/PaymentCardVisa.pm ↑ Summary Faker/Plugin/SoftwareAuthor.pm »