| 1 | # vim: sw=4 ts=4 ft=perl | ||
| 2 | |||
| 3 | package WebService::Braintree::_::Dispute; | ||
| 4 | 22 | $WebService::Braintree::_::Dispute::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::_::Dispute | ||
| 11 | |||
| 12 | =head1 PURPOSE | ||
| 13 | |||
| 14 | This class represents a dispute. | ||
| 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 | 22 | extends 'WebService::Braintree::_'; | |
| 23 | |||
| 24 | 22 | ▶ | use Types::Standard qw(ArrayRef); |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 25 | 22 | ▶ | use WebService::Braintree::Types qw( |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 26 | Dispute_Evidence | ||
| 27 | Dispute_HistoryEvent | ||
| 28 | Dispute_Transaction | ||
| 29 | Dispute_TransactionDetails | ||
| 30 | 22 | ); | |
| 31 | |||
| 32 | =head1 ATTRIBUTES | ||
| 33 | |||
| 34 | =cut | ||
| 35 | |||
| 36 | =head2 amount() | ||
| 37 | |||
| 38 | This returns the dispute's amount. | ||
| 39 | |||
| 40 | =cut | ||
| 41 | |||
| 42 | # Coerce this to "big_decimal" | ||
| 43 | 22 | has amount => ( | |
| 44 | is => 'ro', | ||
| 45 | ); | ||
| 46 | |||
| 47 | =head2 amount_disputed() | ||
| 48 | |||
| 49 | This returns the dispute's amount disputed. | ||
| 50 | |||
| 51 | =cut | ||
| 52 | |||
| 53 | # Coerce this to "big_decimal" | ||
| 54 | 22 | has amount_disputed => ( | |
| 55 | is => 'ro', | ||
| 56 | ); | ||
| 57 | |||
| 58 | =head2 amount_won() | ||
| 59 | |||
| 60 | This returns the dispute's amount won. | ||
| 61 | |||
| 62 | =cut | ||
| 63 | |||
| 64 | # Coerce this to "big_decimal" | ||
| 65 | 22 | has amount_won => ( | |
| 66 | is => 'ro', | ||
| 67 | ); | ||
| 68 | |||
| 69 | =head2 case_number() | ||
| 70 | |||
| 71 | This returns the dispute's case number. | ||
| 72 | |||
| 73 | =cut | ||
| 74 | |||
| 75 | 22 | has case_number => ( | |
| 76 | is => 'ro', | ||
| 77 | ); | ||
| 78 | |||
| 79 | =head2 created_at() | ||
| 80 | |||
| 81 | This returns when this dispute was created. | ||
| 82 | |||
| 83 | =cut | ||
| 84 | |||
| 85 | 22 | has created_at => ( | |
| 86 | is => 'ro', | ||
| 87 | ); | ||
| 88 | |||
| 89 | =head2 currency_iso_code() | ||
| 90 | |||
| 91 | This returns the dispute's currency ISO code. | ||
| 92 | |||
| 93 | =cut | ||
| 94 | |||
| 95 | 22 | has currency_iso_code => ( | |
| 96 | is => 'ro', | ||
| 97 | ); | ||
| 98 | |||
| 99 | =head2 date_opened() | ||
| 100 | |||
| 101 | This returns when this dispute was opened. | ||
| 102 | |||
| 103 | =cut | ||
| 104 | |||
| 105 | # Coerce this to DateTime | ||
| 106 | 22 | has date_opened => ( | |
| 107 | is => 'ro', | ||
| 108 | ); | ||
| 109 | |||
| 110 | =head2 date_won() | ||
| 111 | |||
| 112 | This returns when this dispute was won. | ||
| 113 | |||
| 114 | =cut | ||
| 115 | |||
| 116 | # Coerce this to DateTime | ||
| 117 | 22 | has date_won => ( | |
| 118 | is => 'ro', | ||
| 119 | ); | ||
| 120 | |||
| 121 | =head2 evidence() | ||
| 122 | |||
| 123 | This returns the dispute's evidence (if it exists). This will be an | ||
| 124 | arrayref of L<WebService::Braintree::_::Dispute::Evidence/>. | ||
| 125 | |||
| 126 | =cut | ||
| 127 | |||
| 128 | 22 | has evidence => ( | |
| 129 | is => 'ro', | ||
| 130 | isa => ArrayRef[Dispute_Evidence], | ||
| 131 | coerce => 1, | ||
| 132 | ); | ||
| 133 | |||
| 134 | =head2 forwarded_comments() | ||
| 135 | |||
| 136 | This returns the dispute's forwarded comments. | ||
| 137 | |||
| 138 | =cut | ||
| 139 | |||
| 140 | 22 | has forwarded_comments => ( | |
| 141 | is => 'ro', | ||
| 142 | ); | ||
| 143 | |||
| 144 | =head2 id() | ||
| 145 | |||
| 146 | This returns the dispute's ID. | ||
| 147 | |||
| 148 | =cut | ||
| 149 | |||
| 150 | 22 | has id => ( | |
| 151 | is => 'ro', | ||
| 152 | ); | ||
| 153 | |||
| 154 | =head2 kind() | ||
| 155 | |||
| 156 | This returns the dispute's kind. | ||
| 157 | |||
| 158 | =cut | ||
| 159 | |||
| 160 | 22 | has kind => ( | |
| 161 | is => 'ro', | ||
| 162 | ); | ||
| 163 | |||
| 164 | =head2 merchant_account_id() | ||
| 165 | |||
| 166 | This returns the dispute's merchant account ID. | ||
| 167 | |||
| 168 | =cut | ||
| 169 | |||
| 170 | 22 | has merchant_account_id => ( | |
| 171 | is => 'ro', | ||
| 172 | ); | ||
| 173 | |||
| 174 | =head2 original_dispute_id() | ||
| 175 | |||
| 176 | This returns the dispute's original dispute ID. | ||
| 177 | |||
| 178 | =cut | ||
| 179 | |||
| 180 | 22 | has original_dispute_id => ( | |
| 181 | is => 'ro', | ||
| 182 | ); | ||
| 183 | |||
| 184 | =head2 processor_comments() | ||
| 185 | |||
| 186 | This returns the dispute's processor comments. | ||
| 187 | |||
| 188 | =cut | ||
| 189 | |||
| 190 | 22 | has processor_comments => ( | |
| 191 | is => 'ro', | ||
| 192 | ); | ||
| 193 | |||
| 194 | =head2 reason() | ||
| 195 | |||
| 196 | This returns the dispute's reason. | ||
| 197 | |||
| 198 | =cut | ||
| 199 | |||
| 200 | 22 | has reason => ( | |
| 201 | is => 'ro', | ||
| 202 | ); | ||
| 203 | |||
| 204 | =head2 reason_code() | ||
| 205 | |||
| 206 | This returns the dispute's reason code. | ||
| 207 | |||
| 208 | =cut | ||
| 209 | |||
| 210 | 22 | has reason_code => ( | |
| 211 | is => 'ro', | ||
| 212 | ); | ||
| 213 | |||
| 214 | =head2 reason_description() | ||
| 215 | |||
| 216 | This returns the dispute's reason description. | ||
| 217 | |||
| 218 | =cut | ||
| 219 | |||
| 220 | 22 | has reason_description => ( | |
| 221 | is => 'ro', | ||
| 222 | ); | ||
| 223 | |||
| 224 | =head2 received_date() | ||
| 225 | |||
| 226 | This returns when this dispute was received. | ||
| 227 | |||
| 228 | =cut | ||
| 229 | |||
| 230 | # Coerce this to DateTime | ||
| 231 | 22 | has received_date => ( | |
| 232 | is => 'ro', | ||
| 233 | ); | ||
| 234 | |||
| 235 | =head2 reference_number() | ||
| 236 | |||
| 237 | This returns the dispute's reference number. | ||
| 238 | |||
| 239 | =cut | ||
| 240 | |||
| 241 | 22 | has reference_number => ( | |
| 242 | is => 'ro', | ||
| 243 | ); | ||
| 244 | |||
| 245 | =head2 reply_by_date() | ||
| 246 | |||
| 247 | This returns when this dispute must be replied to. | ||
| 248 | |||
| 249 | =cut | ||
| 250 | |||
| 251 | # Coerce this to DateTime | ||
| 252 | 22 | has reply_by_date => ( | |
| 253 | is => 'ro', | ||
| 254 | ); | ||
| 255 | |||
| 256 | =head2 status() | ||
| 257 | |||
| 258 | This returns the dispute's status. | ||
| 259 | |||
| 260 | =cut | ||
| 261 | |||
| 262 | 22 | has status => ( | |
| 263 | is => 'ro', | ||
| 264 | ); | ||
| 265 | |||
| 266 | =head2 status_history() | ||
| 267 | |||
| 268 | This returns the dispute's status history. This will be an | ||
| 269 | arrayref of L<WebService::Braintree::_::Dispute::Evidence/>. | ||
| 270 | |||
| 271 | =cut | ||
| 272 | |||
| 273 | 22 | has status_history => ( | |
| 274 | is => 'ro', | ||
| 275 | isa => ArrayRef[Dispute_HistoryEvent], | ||
| 276 | coerce => 1, | ||
| 277 | ); | ||
| 278 | |||
| 279 | =head2 transaction() | ||
| 280 | |||
| 281 | This returns the dispute's transaction. This will be an | ||
| 282 | object of type L<WebService::Braintree::_::Dispute::Transaction/>. | ||
| 283 | |||
| 284 | =cut | ||
| 285 | |||
| 286 | 22 | has transaction => ( | |
| 287 | is => 'ro', | ||
| 288 | isa => Dispute_Transaction, | ||
| 289 | coerce => 1, | ||
| 290 | ); | ||
| 291 | |||
| 292 | =head2 transaction_details() | ||
| 293 | |||
| 294 | This returns the dispute's transaction details. This will be an | ||
| 295 | object of type L<WebService::Braintree::_::Dispute::TransactionDetails/>. | ||
| 296 | |||
| 297 | =cut | ||
| 298 | |||
| 299 | 22 | has transaction_details => ( | |
| 300 | is => 'ro', | ||
| 301 | isa => Dispute_TransactionDetails, | ||
| 302 | coerce => 1, | ||
| 303 | ); | ||
| 304 | |||
| 305 | =head2 updated_at() | ||
| 306 | |||
| 307 | This returns when this dispute was last updated. | ||
| 308 | |||
| 309 | =cut | ||
| 310 | |||
| 311 | 22 | has updated_at => ( | |
| 312 | is => 'ro', | ||
| 313 | ); | ||
| 314 | |||
| 315 | 22 | __PACKAGE__->meta->make_immutable; | |
| 316 | |||
| 317 | 22 | 1; | |
| 318 | __END__ | ||