« lib/WebService/Braintree/_/ConnectedMerchantStatusTransitioned.pm
↑ Summary
lib/WebService/Braintree/_/Descriptor.pm »
| 1 | # vim: sw=4 ts=4 ft=perl | ||
| 2 | |||
| 3 | package WebService::Braintree::_::CreditCardVerification; | ||
| 4 | 22 | $WebService::Braintree::_::CreditCardVerification::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::_::CreditCardVerification | ||
| 11 | |||
| 12 | =head1 PURPOSE | ||
| 13 | |||
| 14 | This class represents a credit card verification. | ||
| 15 | |||
| 16 | This class will only be created as part of a L<response|WebService::Braintree::Result> or L<error response|WebService::Braintree::ErrorResult>. | ||
| 17 | |||
| 18 | =cut | ||
| 19 | |||
| 20 | 22 | ▶ | use Moo; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 21 | 22 | ▶ | use MooX::Aliases; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 22 | |||
| 23 | 22 | extends 'WebService::Braintree::_'; | |
| 24 | |||
| 25 | 22 | ▶ | use WebService::Braintree::Types qw( |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 26 | Address | ||
| 27 | CreditCard | ||
| 28 | 22 | ); | |
| 29 | |||
| 30 | =head1 ATTRIBUTES | ||
| 31 | |||
| 32 | =cut | ||
| 33 | |||
| 34 | =head2 amount() | ||
| 35 | |||
| 36 | This is the amount for this credit card verification. | ||
| 37 | |||
| 38 | =cut | ||
| 39 | |||
| 40 | # Ruby coerces this to "big_decimal" | ||
| 41 | 22 | has amount => ( | |
| 42 | is => 'ro', | ||
| 43 | ); | ||
| 44 | |||
| 45 | =head2 avs_error_response_code() | ||
| 46 | |||
| 47 | This is the avs error response code for this credit card verification. | ||
| 48 | |||
| 49 | =cut | ||
| 50 | |||
| 51 | 22 | has avs_error_response_code => ( | |
| 52 | is => 'ro', | ||
| 53 | ); | ||
| 54 | |||
| 55 | =head2 avs_postal_code_response_code() | ||
| 56 | |||
| 57 | This is the avs postal code response code for this credit card verification. | ||
| 58 | |||
| 59 | =cut | ||
| 60 | |||
| 61 | 22 | has avs_postal_code_response_code => ( | |
| 62 | is => 'ro', | ||
| 63 | ); | ||
| 64 | |||
| 65 | =head2 avs_street_address_response_code() | ||
| 66 | |||
| 67 | This is the avs street address respons code for this credit card verification. | ||
| 68 | |||
| 69 | =cut | ||
| 70 | |||
| 71 | 22 | has avs_street_address_response_code => ( | |
| 72 | is => 'ro', | ||
| 73 | ); | ||
| 74 | |||
| 75 | =head2 billing() | ||
| 76 | |||
| 77 | This returns the credit card verification's billing address (if it exists). This will be an | ||
| 78 | object of type L<WebService::Braintree::_::Address/>. | ||
| 79 | |||
| 80 | C<< billing_address() >> is an alias to this attribute. | ||
| 81 | |||
| 82 | =cut | ||
| 83 | |||
| 84 | 22 | has billing => ( | |
| 85 | is => 'ro', | ||
| 86 | isa => Address, | ||
| 87 | coerce => 1, | ||
| 88 | alias => 'billing_address', | ||
| 89 | ); | ||
| 90 | |||
| 91 | =head2 created_at() | ||
| 92 | |||
| 93 | This is when this credit card was created. | ||
| 94 | |||
| 95 | =cut | ||
| 96 | |||
| 97 | # Coerce this to Datetime | ||
| 98 | 22 | has created_at => ( | |
| 99 | is => 'ro', | ||
| 100 | ); | ||
| 101 | |||
| 102 | =head2 credit_card() | ||
| 103 | |||
| 104 | This returns the credit card verification's credit card (if it exists). This will be an | ||
| 105 | object of type L<WebService::Braintree::_::CreditCard/>. | ||
| 106 | |||
| 107 | =cut | ||
| 108 | |||
| 109 | 22 | has credit_card => ( | |
| 110 | is => 'ro', | ||
| 111 | isa => CreditCard, | ||
| 112 | coerce => 1, | ||
| 113 | ); | ||
| 114 | |||
| 115 | =head2 currency_iso_code() | ||
| 116 | |||
| 117 | This is the currency ISO code for this credit card verification. | ||
| 118 | |||
| 119 | =cut | ||
| 120 | |||
| 121 | 22 | has currency_iso_code => ( | |
| 122 | is => 'ro', | ||
| 123 | ); | ||
| 124 | |||
| 125 | =head2 cvv_response_code() | ||
| 126 | |||
| 127 | This is the CVV response code for this credit card verification. | ||
| 128 | |||
| 129 | =cut | ||
| 130 | |||
| 131 | 22 | has cvv_response_code => ( | |
| 132 | is => 'ro', | ||
| 133 | ); | ||
| 134 | |||
| 135 | =head2 gateway_rejection_reason() | ||
| 136 | |||
| 137 | This is the gateway rejection reason for this credit card verification. | ||
| 138 | |||
| 139 | =cut | ||
| 140 | |||
| 141 | 22 | has gateway_rejection_reason => ( | |
| 142 | is => 'ro', | ||
| 143 | ); | ||
| 144 | |||
| 145 | =head2 id() | ||
| 146 | |||
| 147 | This is the id for this credit card verification. | ||
| 148 | |||
| 149 | =cut | ||
| 150 | |||
| 151 | 22 | has id => ( | |
| 152 | is => 'ro', | ||
| 153 | ); | ||
| 154 | |||
| 155 | =head2 merchant_account_id() | ||
| 156 | |||
| 157 | This is the merchant account id for this credit card verification. | ||
| 158 | |||
| 159 | =cut | ||
| 160 | |||
| 161 | 22 | has merchant_account_id => ( | |
| 162 | is => 'ro', | ||
| 163 | ); | ||
| 164 | |||
| 165 | =head2 processor_response_code() | ||
| 166 | |||
| 167 | This is the processor response code for this credit card verification. | ||
| 168 | |||
| 169 | =cut | ||
| 170 | |||
| 171 | 22 | has processor_response_code => ( | |
| 172 | is => 'ro', | ||
| 173 | ); | ||
| 174 | |||
| 175 | =head2 processor_response_text() | ||
| 176 | |||
| 177 | This is the processor response text for this credit card verification. | ||
| 178 | |||
| 179 | =cut | ||
| 180 | |||
| 181 | 22 | has processor_response_text => ( | |
| 182 | is => 'ro', | ||
| 183 | ); | ||
| 184 | |||
| 185 | =head2 risk_data() | ||
| 186 | |||
| 187 | This is the risk data for this credit card verification. | ||
| 188 | |||
| 189 | =cut | ||
| 190 | |||
| 191 | 22 | has risk_data => ( | |
| 192 | is => 'ro', | ||
| 193 | ); | ||
| 194 | |||
| 195 | =head2 status() | ||
| 196 | |||
| 197 | This is the status for this credit card verification. | ||
| 198 | |||
| 199 | =cut | ||
| 200 | |||
| 201 | 22 | has status => ( | |
| 202 | is => 'ro', | ||
| 203 | ); | ||
| 204 | |||
| 205 | =head2 updated_at() | ||
| 206 | |||
| 207 | This is when this credit card was last updated. If it has never been updated, | ||
| 208 | then this should equal the L</created_at> date. | ||
| 209 | |||
| 210 | =cut | ||
| 211 | |||
| 212 | # Coerce this to Datetime | ||
| 213 | 22 | has updated_at => ( | |
| 214 | is => 'ro', | ||
| 215 | ); | ||
| 216 | |||
| 217 | 22 | __PACKAGE__->meta->make_immutable; | |
| 218 | |||
| 219 | 22 | 1; | |
| 220 | __END__ | ||