| line | stmt | bran | cond | sub | pod | time | code | 
| 1 |  |  |  |  |  |  | ##---------------------------------------------------------------------------- | 
| 2 |  |  |  |  |  |  | ## Stripe API - ~/lib/Net/API/Stripe/Cash/Transaction.pm | 
| 3 |  |  |  |  |  |  | ## Version v0.1.0 | 
| 4 |  |  |  |  |  |  | ## Copyright(c) 2022 DEGUEST Pte. Ltd. | 
| 5 |  |  |  |  |  |  | ## Author: Jacques Deguest <jack@deguest.jp> | 
| 6 |  |  |  |  |  |  | ## Created 2022/07/06 | 
| 7 |  |  |  |  |  |  | ## Modified 2022/07/06 | 
| 8 |  |  |  |  |  |  | ## All rights reserved | 
| 9 |  |  |  |  |  |  | ## | 
| 10 |  |  |  |  |  |  | ## This program is free software; you can redistribute  it  and/or  modify  it | 
| 11 |  |  |  |  |  |  | ## under the same terms as Perl itself. | 
| 12 |  |  |  |  |  |  | ##---------------------------------------------------------------------------- | 
| 13 |  |  |  |  |  |  | BEGIN | 
| 14 |  |  |  |  |  |  | { | 
| 15 |  |  |  |  |  |  | use strict; | 
| 16 | 2 |  |  | 2 |  | 24061412 | use warnings; | 
|  | 2 |  |  |  |  | 17 |  | 
|  | 2 |  |  |  |  | 67 |  | 
| 17 | 2 |  |  | 2 |  | 13 | use parent qw( Net::API::Stripe::Generic ); | 
|  | 2 |  |  |  |  | 4 |  | 
|  | 2 |  |  |  |  | 58 |  | 
| 18 | 2 |  |  | 2 |  | 11 | use vars qw( $VERSION ); | 
|  | 2 |  |  |  |  | 4 |  | 
|  | 2 |  |  |  |  | 11 |  | 
| 19 | 2 |  |  | 2 |  | 141 | our $VERSION = 'v0.1.0'; | 
|  | 2 |  |  |  |  | 4 |  | 
|  | 2 |  |  |  |  | 107 |  | 
| 20 | 2 |  |  | 2 |  | 39 | }; | 
| 21 |  |  |  |  |  |  |  | 
| 22 |  |  |  |  |  |  | use strict; | 
| 23 | 2 |  |  | 2 |  | 11 | use warnings; | 
|  | 2 |  |  |  |  | 4 |  | 
|  | 2 |  |  |  |  | 37 |  | 
| 24 | 2 |  |  | 2 |  | 9 |  | 
|  | 2 |  |  |  |  | 3 |  | 
|  | 2 |  |  |  |  | 671 |  | 
| 25 |  |  |  |  |  |  |  | 
| 26 | 0 |  |  | 0 | 1 |  |  | 
| 27 |  |  |  |  |  |  | { | 
| 28 | 0 |  |  | 0 | 1 |  | return( shift->_set_get_class( 'settings', | 
| 29 |  |  |  |  |  |  | { | 
| 30 |  |  |  |  |  |  | payment_intent => { type => 'scalar_or_object', package => 'Net::API::Stripe::Payment::Intent' }, | 
| 31 |  |  |  |  |  |  | }, @_ ) ); | 
| 32 | 0 |  |  | 0 | 1 |  | } | 
| 33 |  |  |  |  |  |  |  | 
| 34 |  |  |  |  |  |  |  | 
| 35 |  |  |  |  |  |  |  | 
| 36 |  |  |  |  |  |  |  | 
| 37 |  |  |  |  |  |  |  | 
| 38 | 0 |  |  | 0 | 1 |  | { | 
| 39 |  |  |  |  |  |  | return( shift->_set_get_class( 'funded', | 
| 40 | 0 |  |  | 0 | 1 |  | { | 
| 41 |  |  |  |  |  |  | bank_transfer => { type => 'class', definition => | 
| 42 | 0 |  |  | 0 | 1 |  | { | 
| 43 |  |  |  |  |  |  | eu_bank_transfer => { type => 'class', definition => | 
| 44 | 0 |  |  | 0 | 1 |  | { | 
| 45 |  |  |  |  |  |  | bic => { type => 'string' }, | 
| 46 |  |  |  |  |  |  | iban_last4 => { type => 'string' }, | 
| 47 |  |  |  |  |  |  | sender_name => { type => 'string' }, | 
| 48 | 0 |  |  | 0 | 1 |  | }}, | 
| 49 |  |  |  |  |  |  | reference => { type => 'string' }, | 
| 50 |  |  |  |  |  |  | type => { type => 'string' }, | 
| 51 |  |  |  |  |  |  | }}, | 
| 52 |  |  |  |  |  |  | }, @_ ) ); | 
| 53 |  |  |  |  |  |  | } | 
| 54 |  |  |  |  |  |  |  | 
| 55 |  |  |  |  |  |  |  | 
| 56 |  |  |  |  |  |  |  | 
| 57 |  |  |  |  |  |  | { | 
| 58 |  |  |  |  |  |  | return( shift->_set_get_class( 'refunded_from_payment', | 
| 59 |  |  |  |  |  |  | { | 
| 60 |  |  |  |  |  |  | refund => { type => 'scalar_or_object', package => 'Net::API::Stripe::Refund' }, | 
| 61 |  |  |  |  |  |  | }, @_ ) ); | 
| 62 |  |  |  |  |  |  | } | 
| 63 |  |  |  |  |  |  |  | 
| 64 | 0 |  |  | 0 | 1 |  |  | 
| 65 |  |  |  |  |  |  | { | 
| 66 | 0 |  |  | 0 | 1 |  | return( shift->_set_get_class( 'unapplied_from_payment', | 
| 67 |  |  |  |  |  |  | { | 
| 68 |  |  |  |  |  |  | payment_intent => { type => 'scalar_or_object', package => 'Net::API::Stripe::Payment::Intent' }, | 
| 69 |  |  |  |  |  |  | }, @_ ) ); | 
| 70 | 0 |  |  | 0 | 1 |  | } | 
| 71 |  |  |  |  |  |  |  | 
| 72 |  |  |  |  |  |  | 1; | 
| 73 |  |  |  |  |  |  | # NOTE: POD | 
| 74 |  |  |  |  |  |  |  | 
| 75 |  |  |  |  |  |  | =encoding utf-8 | 
| 76 | 0 |  |  | 0 | 1 |  |  | 
| 77 |  |  |  |  |  |  | =head1 NAME | 
| 78 |  |  |  |  |  |  |  | 
| 79 |  |  |  |  |  |  | Net::API::Stripe::Cash::Transaction - Stripe API | 
| 80 | 0 |  |  | 0 | 1 |  |  | 
| 81 |  |  |  |  |  |  | =head1 SYNOPSIS | 
| 82 |  |  |  |  |  |  |  | 
| 83 |  |  |  |  |  |  | use Net::API::Stripe::Cash::Transaction; | 
| 84 |  |  |  |  |  |  | my $this = Net::API::Stripe::Cash::Transaction->new || die( Net::API::Stripe::Cash::Transaction->error, "\n" ); | 
| 85 |  |  |  |  |  |  |  | 
| 86 |  |  |  |  |  |  | =head1 VERSION | 
| 87 |  |  |  |  |  |  |  | 
| 88 |  |  |  |  |  |  | v0.1.0 | 
| 89 |  |  |  |  |  |  |  | 
| 90 |  |  |  |  |  |  | =head1 DESCRIPTION | 
| 91 |  |  |  |  |  |  |  | 
| 92 |  |  |  |  |  |  | =head1 METHODS | 
| 93 |  |  |  |  |  |  |  | 
| 94 |  |  |  |  |  |  | =head2 id | 
| 95 |  |  |  |  |  |  |  | 
| 96 |  |  |  |  |  |  | String | 
| 97 |  |  |  |  |  |  |  | 
| 98 |  |  |  |  |  |  | Unique identifier for the object. | 
| 99 |  |  |  |  |  |  |  | 
| 100 |  |  |  |  |  |  | Object string, value is "customer_cash_balance_transaction" | 
| 101 |  |  |  |  |  |  |  | 
| 102 |  |  |  |  |  |  | String representing the object’s type. Objects of the same type share the same value. | 
| 103 |  |  |  |  |  |  |  | 
| 104 |  |  |  |  |  |  | =head2 applied_to_payment | 
| 105 |  |  |  |  |  |  |  | 
| 106 |  |  |  |  |  |  | Hash | 
| 107 |  |  |  |  |  |  |  | 
| 108 |  |  |  |  |  |  | If this is a type=applied_to_payment transaction, contains information about how funds were applied. | 
| 109 |  |  |  |  |  |  |  | 
| 110 |  |  |  |  |  |  | =over 4 | 
| 111 |  |  |  |  |  |  |  | 
| 112 |  |  |  |  |  |  | =item * C<payment_intent> | 
| 113 |  |  |  |  |  |  |  | 
| 114 |  |  |  |  |  |  | String | 
| 115 |  |  |  |  |  |  |  | 
| 116 |  |  |  |  |  |  | Expandable | 
| 117 |  |  |  |  |  |  |  | 
| 118 |  |  |  |  |  |  | The Payment Intent that funds were applied to. | 
| 119 |  |  |  |  |  |  |  | 
| 120 |  |  |  |  |  |  | =back | 
| 121 |  |  |  |  |  |  |  | 
| 122 |  |  |  |  |  |  | =head2 created timestamp | 
| 123 |  |  |  |  |  |  |  | 
| 124 |  |  |  |  |  |  | Time at which the object was created. Measured in seconds since the Unix epoch. | 
| 125 |  |  |  |  |  |  |  | 
| 126 |  |  |  |  |  |  | =head2 currency string | 
| 127 |  |  |  |  |  |  |  | 
| 128 |  |  |  |  |  |  | Three-letter ISO currency code, in lowercase. Must be a supported currency. | 
| 129 |  |  |  |  |  |  |  | 
| 130 |  |  |  |  |  |  | =head2 customer string | 
| 131 |  |  |  |  |  |  |  | 
| 132 |  |  |  |  |  |  | Expandable | 
| 133 |  |  |  |  |  |  |  | 
| 134 |  |  |  |  |  |  | The customer whose available cash balance changed as a result of this transaction. | 
| 135 |  |  |  |  |  |  |  | 
| 136 |  |  |  |  |  |  | =head2 ending_balance integer | 
| 137 |  |  |  |  |  |  |  | 
| 138 |  |  |  |  |  |  | The total available cash balance for the specified currency after this transaction was applied. Represented in the smallest currency unit. | 
| 139 |  |  |  |  |  |  |  | 
| 140 |  |  |  |  |  |  | =head2 funded | 
| 141 |  |  |  |  |  |  |  | 
| 142 |  |  |  |  |  |  | Hash | 
| 143 |  |  |  |  |  |  |  | 
| 144 |  |  |  |  |  |  | If this is a type=funded transaction, contains information about the funding. | 
| 145 |  |  |  |  |  |  |  | 
| 146 |  |  |  |  |  |  | =over 4 | 
| 147 |  |  |  |  |  |  |  | 
| 148 |  |  |  |  |  |  | =item * C<bank_transfer> | 
| 149 |  |  |  |  |  |  |  | 
| 150 |  |  |  |  |  |  | Hash | 
| 151 |  |  |  |  |  |  |  | 
| 152 |  |  |  |  |  |  | Information about the bank transfer that funded the customer’s cash balance. | 
| 153 |  |  |  |  |  |  |  | 
| 154 |  |  |  |  |  |  | =over 8 | 
| 155 |  |  |  |  |  |  |  | 
| 156 |  |  |  |  |  |  | =item * C<eu_bank_transfer> | 
| 157 |  |  |  |  |  |  |  | 
| 158 |  |  |  |  |  |  | Hash | 
| 159 |  |  |  |  |  |  |  | 
| 160 |  |  |  |  |  |  | EU-specific details of the bank transfer. | 
| 161 |  |  |  |  |  |  |  | 
| 162 |  |  |  |  |  |  | =over 12 | 
| 163 |  |  |  |  |  |  |  | 
| 164 |  |  |  |  |  |  | =item * C<bic> | 
| 165 |  |  |  |  |  |  |  | 
| 166 |  |  |  |  |  |  | String | 
| 167 |  |  |  |  |  |  |  | 
| 168 |  |  |  |  |  |  | The BIC of the bank of the sender of the funding. | 
| 169 |  |  |  |  |  |  |  | 
| 170 |  |  |  |  |  |  | =item * C<iban_last4> | 
| 171 |  |  |  |  |  |  |  | 
| 172 |  |  |  |  |  |  | String | 
| 173 |  |  |  |  |  |  |  | 
| 174 |  |  |  |  |  |  | The last 4 digits of the IBAN of the sender of the funding. | 
| 175 |  |  |  |  |  |  |  | 
| 176 |  |  |  |  |  |  | =item * C<sender_name> | 
| 177 |  |  |  |  |  |  |  | 
| 178 |  |  |  |  |  |  | String | 
| 179 |  |  |  |  |  |  |  | 
| 180 |  |  |  |  |  |  | The full name of the sender, as supplied by the sending bank. | 
| 181 |  |  |  |  |  |  |  | 
| 182 |  |  |  |  |  |  | =back | 
| 183 |  |  |  |  |  |  |  | 
| 184 |  |  |  |  |  |  | =item * C<reference> | 
| 185 |  |  |  |  |  |  |  | 
| 186 |  |  |  |  |  |  | String | 
| 187 |  |  |  |  |  |  |  | 
| 188 |  |  |  |  |  |  | The user-supplied reference field on the bank transfer. | 
| 189 |  |  |  |  |  |  |  | 
| 190 |  |  |  |  |  |  | =item * C<type> | 
| 191 |  |  |  |  |  |  |  | 
| 192 |  |  |  |  |  |  | String | 
| 193 |  |  |  |  |  |  |  | 
| 194 |  |  |  |  |  |  | The funding method type used to fund the customer balance. Permitted values include: us_bank_account, eu_bank_account, id_bank_account, gb_bank_account, jp_bank_account, mx_bank_account, eu_bank_transfer, gb_bank_transfer, id_bank_transfer, jp_bank_transfer, mx_bank_transfer, or us_bank_transfer. | 
| 195 |  |  |  |  |  |  |  | 
| 196 |  |  |  |  |  |  | =back | 
| 197 |  |  |  |  |  |  |  | 
| 198 |  |  |  |  |  |  | =back | 
| 199 |  |  |  |  |  |  |  | 
| 200 |  |  |  |  |  |  | =head2 livemode boolean | 
| 201 |  |  |  |  |  |  |  | 
| 202 |  |  |  |  |  |  | Has the value true if the object exists in live mode or the value false if the object exists in test mode. | 
| 203 |  |  |  |  |  |  |  | 
| 204 |  |  |  |  |  |  | =head2 net_amount integer | 
| 205 |  |  |  |  |  |  |  | 
| 206 |  |  |  |  |  |  | The amount by which the cash balance changed, represented in the smallest currency unit. A positive value represents funds being added to the cash balance, a negative value represents funds being removed from the cash balance. | 
| 207 |  |  |  |  |  |  |  | 
| 208 |  |  |  |  |  |  | =head2 refunded_from_payment | 
| 209 |  |  |  |  |  |  |  | 
| 210 |  |  |  |  |  |  | Hash | 
| 211 |  |  |  |  |  |  |  | 
| 212 |  |  |  |  |  |  | If this is a type=refunded_from_payment transaction, contains information about the source of the refund. | 
| 213 |  |  |  |  |  |  |  | 
| 214 |  |  |  |  |  |  | =over 4 | 
| 215 |  |  |  |  |  |  |  | 
| 216 |  |  |  |  |  |  | =item * C<refund> | 
| 217 |  |  |  |  |  |  |  | 
| 218 |  |  |  |  |  |  | String. Expandable | 
| 219 |  |  |  |  |  |  |  | 
| 220 |  |  |  |  |  |  | The Refund that moved these funds into the customer’s cash balance. | 
| 221 |  |  |  |  |  |  |  | 
| 222 |  |  |  |  |  |  | =back | 
| 223 |  |  |  |  |  |  |  | 
| 224 |  |  |  |  |  |  | =head2 type string | 
| 225 |  |  |  |  |  |  |  | 
| 226 |  |  |  |  |  |  | The type of the cash balance transaction. One of adjustment, applied_to_invoice, credit_note, initial, invoice_too_large, invoice_too_small, migration, unspent_receiver_credit, or unapplied_from_invoice. New types may be added in future. See Customer Balances to learn more about these types. | 
| 227 |  |  |  |  |  |  |  | 
| 228 |  |  |  |  |  |  | =head2 unapplied_from_payment | 
| 229 |  |  |  |  |  |  |  | 
| 230 |  |  |  |  |  |  | Hash | 
| 231 |  |  |  |  |  |  |  | 
| 232 |  |  |  |  |  |  | If this is a type=unapplied_from_payment transaction, contains information about how funds were unapplied. | 
| 233 |  |  |  |  |  |  |  | 
| 234 |  |  |  |  |  |  | =over 4 | 
| 235 |  |  |  |  |  |  |  | 
| 236 |  |  |  |  |  |  | =item * C<payment_intent> | 
| 237 |  |  |  |  |  |  |  | 
| 238 |  |  |  |  |  |  | String. Expandable | 
| 239 |  |  |  |  |  |  |  | 
| 240 |  |  |  |  |  |  | The Payment Intent that funds were unapplied from. | 
| 241 |  |  |  |  |  |  |  | 
| 242 |  |  |  |  |  |  | =back | 
| 243 |  |  |  |  |  |  |  | 
| 244 |  |  |  |  |  |  | =head1 API SAMPLE | 
| 245 |  |  |  |  |  |  |  | 
| 246 |  |  |  |  |  |  | { | 
| 247 |  |  |  |  |  |  | "id": "ccsbtxn_1LIVZqCeyNCl6fY2APWGE8ro", | 
| 248 |  |  |  |  |  |  | "object": "customer_cash_balance_transaction", | 
| 249 |  |  |  |  |  |  | "created": 1657103726, | 
| 250 |  |  |  |  |  |  | "currency": "jpy", | 
| 251 |  |  |  |  |  |  | "customer": "cus_AODr7KhjWjH7Yk", | 
| 252 |  |  |  |  |  |  | "ending_balance": 10000, | 
| 253 |  |  |  |  |  |  | "funded": { | 
| 254 |  |  |  |  |  |  | "bank_transfer": { | 
| 255 |  |  |  |  |  |  | "reference": null, | 
| 256 |  |  |  |  |  |  | "type": "jp_bank_transfer" | 
| 257 |  |  |  |  |  |  | } | 
| 258 |  |  |  |  |  |  | }, | 
| 259 |  |  |  |  |  |  | "livemode": false, | 
| 260 |  |  |  |  |  |  | "net_amount": 5000, | 
| 261 |  |  |  |  |  |  | "type": "funded" | 
| 262 |  |  |  |  |  |  | } | 
| 263 |  |  |  |  |  |  | =head1 AUTHOR | 
| 264 |  |  |  |  |  |  |  | 
| 265 |  |  |  |  |  |  | Jacques Deguest E<lt>F<jack@deguest.jp>E<gt> | 
| 266 |  |  |  |  |  |  |  | 
| 267 |  |  |  |  |  |  | =head1 SEE ALSO | 
| 268 |  |  |  |  |  |  |  | 
| 269 |  |  |  |  |  |  | Stripe API documentation: | 
| 270 |  |  |  |  |  |  |  | 
| 271 |  |  |  |  |  |  | L<https://stripe.com/docs/api/cash_balance_transactions/object> | 
| 272 |  |  |  |  |  |  |  | 
| 273 |  |  |  |  |  |  | =head1 COPYRIGHT & LICENSE | 
| 274 |  |  |  |  |  |  |  | 
| 275 |  |  |  |  |  |  | Copyright(c) 2022 DEGUEST Pte. Ltd. | 
| 276 |  |  |  |  |  |  |  | 
| 277 |  |  |  |  |  |  | All rights reserved | 
| 278 |  |  |  |  |  |  | This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself. | 
| 279 |  |  |  |  |  |  |  | 
| 280 |  |  |  |  |  |  | =cut |