lib/WebService/Braintree/_/UnknownPaymentMethod.pm

filter: Statementstmt 94.7% 18 / 19 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 80.0% 4 / 5 Podpod 100% 1 / 1 totaltotal 92.0% 23 / 25 CC 1 SCAR 1.8
CC
1
Cov
95%
image_url
2.0
BEGIN
1.0
BEGIN
1.0
CRAP 1.2
« lib/WebService/Braintree/_/Transaction/AndroidPayDetail.pm ↑ Summary lib/WebService/Braintree/Result.pm »
1 # vim: sw=4 ts=4 ft=perl
2  
3 package WebService::Braintree::_::UnknownPaymentMethod;
4 22 $WebService::Braintree::_::UnknownPaymentMethod::VERSION = '1.7';
5 22 ▶use 5.010_001;
Subroutine BEGIN: called CC=1 SCAR=0.0
6 22 ▶use strictures 1;
Subroutine BEGIN: called CC=1 SCAR=0.0
7  
8 =head1 NAME
9  
10 WebService::Braintree::_::UnknownPaymentMethod
11  
12 =head1 PURPOSE
13  
14 This class represents an unknown payment method.
15  
16 This class will only be created as part of a L<response|WebService::Braintree::Result> or L<error response|WebService::Braintree::ErrorResult>. Specifically,
17 this class will only be created if Braintree responds with a payment method this
18 SDK does not know how to handle.
19  
20 Because this SDK does not know how to handle this, the class will have very
21 limited functionality relative to the other payment methods.
22  
23 =cut
24  
25 22 ▶use Moo;
Subroutine BEGIN: called CC=1 SCAR=0.0
26 22 ▶use MooX::Aliases;
Subroutine BEGIN: called CC=1 SCAR=0.0
27  
28 22 extends 'WebService::Braintree::_';
29  
30 =head2 customer_id()
31  
32 This returns the account's customer's ID.
33  
34 =cut
35  
36 22 has customer_id => (
37 is => 'ro',
38 );
39  
40 =head2 default()
41  
42 This returns if this account is default.
43  
44 C<< is_default() >> is an alias for this attribute.
45  
46 =cut
47  
48 22 has default => (
49 is => 'ro',
50 alias => 'is_default',
51 );
52  
53 =head2 token()
54  
55 This returns the account's token.
56  
57 =cut
58  
59 22 has token => (
60 is => 'ro',
61 );
62  
63 # There is some code in the Ruby SDK that walks nested attributes.
64 # It's unclear if that code is needed here.
65 # nested_attributes = attributes[attributes.keys.first]
66 # set_instance_variables_from_hash(nested_attributes)
67  
68 =head1 METHODS
69  
70 =cut
71  
72 =head2 image_url()
73  
74 This returns the "unknown payment methods" image URL. This is a URL provided
75 by and hosted by Braintree.
76  
77 =cut
78  
79 0 ▶sub image_url {
Subroutine image_url: not called CC=1 SCAR=6.9
Pod documented
80 0 "https://assets.braintreegateway.com/payment_method_logo/unknown.png";
81 }
82  
83 22 __PACKAGE__->meta->make_immutable;
84  
85 22 1;
86 __END__
« lib/WebService/Braintree/_/Transaction/AndroidPayDetail.pm ↑ Summary lib/WebService/Braintree/Result.pm »