| line | stmt | bran | cond | sub | pod | time | code | 
| 1 |  |  |  |  |  |  | ##---------------------------------------------------------------------------- | 
| 2 |  |  |  |  |  |  | ## Stripe API - ~/lib/Net/API/Stripe/Financial/Connections/Account.pm | 
| 3 |  |  |  |  |  |  | ## Version v0.1.0 | 
| 4 |  |  |  |  |  |  | ## Copyright(c) 2022 DEGUEST Pte. Ltd. | 
| 5 |  |  |  |  |  |  | ## Author: Jacques Deguest <jack@deguest.jp> | 
| 6 |  |  |  |  |  |  | ## Created 2022/10/29 | 
| 7 |  |  |  |  |  |  | ## Modified 2022/10/29 | 
| 8 |  |  |  |  |  |  | ## | 
| 9 |  |  |  |  |  |  | ##---------------------------------------------------------------------------- | 
| 10 |  |  |  |  |  |  | package Net::API::Stripe::Financial::Connections::Account; | 
| 11 |  |  |  |  |  |  | BEGIN | 
| 12 |  |  |  |  |  |  | { | 
| 13 | 2 |  |  | 2 |  | 21177769 | use strict; | 
|  | 2 |  |  |  |  | 13 |  | 
|  | 2 |  |  |  |  | 71 |  | 
| 14 | 2 |  |  | 2 |  | 11 | use parent qw( Net::API::Stripe::Generic ); | 
|  | 2 |  |  |  |  | 13 |  | 
|  | 2 |  |  |  |  | 10 |  | 
| 15 | 2 |  |  | 2 |  | 1066 | our( $VERSION ) = 'v0.1.0'; | 
| 16 |  |  |  |  |  |  | }; | 
| 17 |  |  |  |  |  |  |  | 
| 18 | 0 |  |  | 0 | 1 |  | sub id { return( shift->_set_get_scalar( 'id', @_ ) ); } | 
| 19 |  |  |  |  |  |  |  | 
| 20 | 0 |  |  | 0 | 1 |  | sub object { return( shift->_set_get_scalar( 'object', @_ ) ); } | 
| 21 |  |  |  |  |  |  |  | 
| 22 | 0 |  |  | 0 | 1 |  | sub account_holder { return( shift->_set_get_object( 'account_holder', 'Net::API::Stripe::Payment::Source', @_ ) ); } | 
| 23 |  |  |  |  |  |  |  | 
| 24 | 0 |  |  | 0 | 1 |  | sub balance { return( shift->_set_get_class( 'balance', | 
| 25 |  |  |  |  |  |  | { | 
| 26 |  |  |  |  |  |  | as_of   => { type => "datetime" }, | 
| 27 |  |  |  |  |  |  | cash    => { package => "Net::API::Stripe::Balance", type => "object" }, | 
| 28 |  |  |  |  |  |  | credit  => { package => "Net::API::Stripe::Payment::Source", type => "object" }, | 
| 29 |  |  |  |  |  |  | current => { type => "hash" }, | 
| 30 |  |  |  |  |  |  | type    => { type => "scalar" }, | 
| 31 |  |  |  |  |  |  | }, @_ ) ); } | 
| 32 |  |  |  |  |  |  |  | 
| 33 | 0 |  |  | 0 | 1 |  | sub balance_refresh { return( shift->_set_get_class( 'balance_refresh', | 
| 34 |  |  |  |  |  |  | { | 
| 35 |  |  |  |  |  |  | last_attempted_at => { type => "datetime" }, | 
| 36 |  |  |  |  |  |  | status => { type => "scalar" }, | 
| 37 |  |  |  |  |  |  | }, @_ ) ); } | 
| 38 |  |  |  |  |  |  |  | 
| 39 | 0 |  |  | 0 | 1 |  | sub category { return( shift->_set_get_scalar( 'category', @_ ) ); } | 
| 40 |  |  |  |  |  |  |  | 
| 41 | 0 |  |  | 0 | 1 |  | sub created { return( shift->_set_get_datetime( 'created', @_ ) ); } | 
| 42 |  |  |  |  |  |  |  | 
| 43 | 0 |  |  | 0 | 1 |  | sub display_name { return( shift->_set_get_scalar( 'display_name', @_ ) ); } | 
| 44 |  |  |  |  |  |  |  | 
| 45 | 0 |  |  | 0 | 1 |  | sub institution_name { return( shift->_set_get_scalar( 'institution_name', @_ ) ); } | 
| 46 |  |  |  |  |  |  |  | 
| 47 | 0 |  |  | 0 | 1 |  | sub last4 { return( shift->_set_get_scalar( 'last4', @_ ) ); } | 
| 48 |  |  |  |  |  |  |  | 
| 49 | 0 |  |  | 0 | 1 |  | sub livemode { return( shift->_set_get_boolean( 'livemode', @_ ) ); } | 
| 50 |  |  |  |  |  |  |  | 
| 51 | 0 |  |  | 0 | 1 |  | sub ownership { return( shift->_set_get_scalar_or_object( 'ownership', 'Net::API::Stripe::Financial::Connections::AccountOwnership', @_ ) ); } | 
| 52 |  |  |  |  |  |  |  | 
| 53 | 0 |  |  | 0 | 1 |  | sub ownership_refresh { return( shift->_set_get_class( 'ownership_refresh', | 
| 54 |  |  |  |  |  |  | { | 
| 55 |  |  |  |  |  |  | last_attempted_at => { type => "datetime" }, | 
| 56 |  |  |  |  |  |  | status => { type => "scalar" }, | 
| 57 |  |  |  |  |  |  | }, @_ ) ); } | 
| 58 |  |  |  |  |  |  |  | 
| 59 | 0 |  |  | 0 | 1 |  | sub permissions { return( shift->_set_get_array( 'permissions', @_ ) ); } | 
| 60 |  |  |  |  |  |  |  | 
| 61 | 0 |  |  | 0 | 1 |  | sub status { return( shift->_set_get_scalar( 'status', @_ ) ); } | 
| 62 |  |  |  |  |  |  |  | 
| 63 | 0 |  |  | 0 | 1 |  | sub subcategory { return( shift->_set_get_scalar( 'subcategory', @_ ) ); } | 
| 64 |  |  |  |  |  |  |  | 
| 65 | 0 |  |  | 0 | 1 |  | sub supported_payment_method_types { return( shift->_set_get_array( 'supported_payment_method_types', @_ ) ); } | 
| 66 |  |  |  |  |  |  |  | 
| 67 | 0 |  |  | 0 | 1 |  | sub transaction_refresh { return( shift->_set_get_object( 'transaction_refresh', 'Net::API::Stripe::Balance::Transaction', @_ ) ); } | 
| 68 |  |  |  |  |  |  |  | 
| 69 |  |  |  |  |  |  | 1; | 
| 70 |  |  |  |  |  |  | # NOTE: POD | 
| 71 |  |  |  |  |  |  | __END__ | 
| 72 |  |  |  |  |  |  |  | 
| 73 |  |  |  |  |  |  | =encoding utf8 | 
| 74 |  |  |  |  |  |  |  | 
| 75 |  |  |  |  |  |  | =head1 NAME | 
| 76 |  |  |  |  |  |  |  | 
| 77 |  |  |  |  |  |  | Net::API::Stripe::Financial::Connections::Account - The Account object | 
| 78 |  |  |  |  |  |  |  | 
| 79 |  |  |  |  |  |  | =head1 SYNOPSIS | 
| 80 |  |  |  |  |  |  |  | 
| 81 |  |  |  |  |  |  | =head1 VERSION | 
| 82 |  |  |  |  |  |  |  | 
| 83 |  |  |  |  |  |  | v0.1.0 | 
| 84 |  |  |  |  |  |  |  | 
| 85 |  |  |  |  |  |  | =head1 DESCRIPTION | 
| 86 |  |  |  |  |  |  |  | 
| 87 |  |  |  |  |  |  | A Financial Connections Account represents an account that exists outside of Stripe, to which you have been granted some degree of access. | 
| 88 |  |  |  |  |  |  |  | 
| 89 |  |  |  |  |  |  | =head1 METHODS | 
| 90 |  |  |  |  |  |  |  | 
| 91 |  |  |  |  |  |  | =head2 id string | 
| 92 |  |  |  |  |  |  |  | 
| 93 |  |  |  |  |  |  | Unique identifier for the object. | 
| 94 |  |  |  |  |  |  |  | 
| 95 |  |  |  |  |  |  | =head2 object string | 
| 96 |  |  |  |  |  |  |  | 
| 97 |  |  |  |  |  |  | String representing the object's type. Objects of the same type share the same value. | 
| 98 |  |  |  |  |  |  |  | 
| 99 |  |  |  |  |  |  | =head2 account_holder object | 
| 100 |  |  |  |  |  |  |  | 
| 101 |  |  |  |  |  |  | The account holder that this account belongs to. | 
| 102 |  |  |  |  |  |  |  | 
| 103 |  |  |  |  |  |  | This is a L<Net::API::Stripe::Payment::Source> object. | 
| 104 |  |  |  |  |  |  |  | 
| 105 |  |  |  |  |  |  | =head2 balance hash | 
| 106 |  |  |  |  |  |  |  | 
| 107 |  |  |  |  |  |  | The most recent information about the account's balance. | 
| 108 |  |  |  |  |  |  |  | 
| 109 |  |  |  |  |  |  | It has the following properties: | 
| 110 |  |  |  |  |  |  |  | 
| 111 |  |  |  |  |  |  | =over 4 | 
| 112 |  |  |  |  |  |  |  | 
| 113 |  |  |  |  |  |  | =item C<as_of> timestamp | 
| 114 |  |  |  |  |  |  |  | 
| 115 |  |  |  |  |  |  | The time that the external institution calculated this balance. Measured in seconds since the Unix epoch. | 
| 116 |  |  |  |  |  |  |  | 
| 117 |  |  |  |  |  |  | =item C<cash> hash | 
| 118 |  |  |  |  |  |  |  | 
| 119 |  |  |  |  |  |  | Information on a C<cash> balance. Only set if C<balance.type> is C<cash>. | 
| 120 |  |  |  |  |  |  |  | 
| 121 |  |  |  |  |  |  | When expanded, this is a L<Net::API::Stripe::Balance> object. | 
| 122 |  |  |  |  |  |  |  | 
| 123 |  |  |  |  |  |  | =item C<credit> hash | 
| 124 |  |  |  |  |  |  |  | 
| 125 |  |  |  |  |  |  | Information on a C<credit> balance. Only set if C<balance.type> is C<credit>. | 
| 126 |  |  |  |  |  |  |  | 
| 127 |  |  |  |  |  |  | When expanded, this is a L<Net::API::Stripe::Payment::Source> object. | 
| 128 |  |  |  |  |  |  |  | 
| 129 |  |  |  |  |  |  | =item C<current> hash | 
| 130 |  |  |  |  |  |  |  | 
| 131 |  |  |  |  |  |  | The balances owed to (or by) the account holder. | 
| 132 |  |  |  |  |  |  |  | 
| 133 |  |  |  |  |  |  | Each key is a three-letter L<ISO currency code|https://www.iso.org/iso-4217-currency-codes.html>, in lowercase. | 
| 134 |  |  |  |  |  |  |  | 
| 135 |  |  |  |  |  |  | Each value is a integer amount. A positive amount indicates money owed to the account holder. A negative amount indicates money owed by the account holder. | 
| 136 |  |  |  |  |  |  |  | 
| 137 |  |  |  |  |  |  | =item C<type> string | 
| 138 |  |  |  |  |  |  |  | 
| 139 |  |  |  |  |  |  | The C<type> of the balance. An additional hash is included on the balance with a name matching this value. | 
| 140 |  |  |  |  |  |  |  | 
| 141 |  |  |  |  |  |  | =back | 
| 142 |  |  |  |  |  |  |  | 
| 143 |  |  |  |  |  |  | =head2 balance_refresh hash | 
| 144 |  |  |  |  |  |  |  | 
| 145 |  |  |  |  |  |  | The state of the most recent attempt to refresh the account balance. | 
| 146 |  |  |  |  |  |  |  | 
| 147 |  |  |  |  |  |  | It has the following properties: | 
| 148 |  |  |  |  |  |  |  | 
| 149 |  |  |  |  |  |  | =over 4 | 
| 150 |  |  |  |  |  |  |  | 
| 151 |  |  |  |  |  |  | =item C<last_attempted_at> timestamp | 
| 152 |  |  |  |  |  |  |  | 
| 153 |  |  |  |  |  |  | The time at which the last refresh attempt was initiated. Measured in seconds since the Unix epoch. | 
| 154 |  |  |  |  |  |  |  | 
| 155 |  |  |  |  |  |  | =item C<status> string | 
| 156 |  |  |  |  |  |  |  | 
| 157 |  |  |  |  |  |  | The status of the last refresh attempt. | 
| 158 |  |  |  |  |  |  |  | 
| 159 |  |  |  |  |  |  | =back | 
| 160 |  |  |  |  |  |  |  | 
| 161 |  |  |  |  |  |  | =head2 category string | 
| 162 |  |  |  |  |  |  |  | 
| 163 |  |  |  |  |  |  | The type of the account. Account category is further divided in C<subcategory>. | 
| 164 |  |  |  |  |  |  |  | 
| 165 |  |  |  |  |  |  | =head2 created timestamp | 
| 166 |  |  |  |  |  |  |  | 
| 167 |  |  |  |  |  |  | Time at which the object was created. Measured in seconds since the Unix epoch. | 
| 168 |  |  |  |  |  |  |  | 
| 169 |  |  |  |  |  |  | =head2 display_name string | 
| 170 |  |  |  |  |  |  |  | 
| 171 |  |  |  |  |  |  | A human-readable name that has been assigned to this account, either by the account holder or by the institution. | 
| 172 |  |  |  |  |  |  |  | 
| 173 |  |  |  |  |  |  | =head2 institution_name string | 
| 174 |  |  |  |  |  |  |  | 
| 175 |  |  |  |  |  |  | The name of the institution that holds this account. | 
| 176 |  |  |  |  |  |  |  | 
| 177 |  |  |  |  |  |  | =head2 last4 string | 
| 178 |  |  |  |  |  |  |  | 
| 179 |  |  |  |  |  |  | The last 4 digits of the account number. If present, this will be 4 numeric characters. | 
| 180 |  |  |  |  |  |  |  | 
| 181 |  |  |  |  |  |  | =head2 livemode boolean | 
| 182 |  |  |  |  |  |  |  | 
| 183 |  |  |  |  |  |  | Has the value C<true> if the object exists in live mode or the value C<false> if the object exists in test mode. | 
| 184 |  |  |  |  |  |  |  | 
| 185 |  |  |  |  |  |  | =head2 ownership expandable | 
| 186 |  |  |  |  |  |  |  | 
| 187 |  |  |  |  |  |  | The most recent information about the account's owners. | 
| 188 |  |  |  |  |  |  |  | 
| 189 |  |  |  |  |  |  | When expanded this is an L<Net::API::Stripe::Financial::Connections::AccountOwnership> object. | 
| 190 |  |  |  |  |  |  |  | 
| 191 |  |  |  |  |  |  | =head2 ownership_refresh hash | 
| 192 |  |  |  |  |  |  |  | 
| 193 |  |  |  |  |  |  | The state of the most recent attempt to refresh the account owners. | 
| 194 |  |  |  |  |  |  |  | 
| 195 |  |  |  |  |  |  | It has the following properties: | 
| 196 |  |  |  |  |  |  |  | 
| 197 |  |  |  |  |  |  | =over 4 | 
| 198 |  |  |  |  |  |  |  | 
| 199 |  |  |  |  |  |  | =item C<last_attempted_at> timestamp | 
| 200 |  |  |  |  |  |  |  | 
| 201 |  |  |  |  |  |  | The time at which the last refresh attempt was initiated. Measured in seconds since the Unix epoch. | 
| 202 |  |  |  |  |  |  |  | 
| 203 |  |  |  |  |  |  | =item C<status> string | 
| 204 |  |  |  |  |  |  |  | 
| 205 |  |  |  |  |  |  | The status of the last refresh attempt. | 
| 206 |  |  |  |  |  |  |  | 
| 207 |  |  |  |  |  |  | =back | 
| 208 |  |  |  |  |  |  |  | 
| 209 |  |  |  |  |  |  | =head2 permissions array | 
| 210 |  |  |  |  |  |  |  | 
| 211 |  |  |  |  |  |  | The list of permissions granted by this account. | 
| 212 |  |  |  |  |  |  |  | 
| 213 |  |  |  |  |  |  | =head2 status string | 
| 214 |  |  |  |  |  |  |  | 
| 215 |  |  |  |  |  |  | The status of the link to the account. | 
| 216 |  |  |  |  |  |  |  | 
| 217 |  |  |  |  |  |  | =head2 subcategory string | 
| 218 |  |  |  |  |  |  |  | 
| 219 |  |  |  |  |  |  | If C<category> is C<cash>, one of: | 
| 220 |  |  |  |  |  |  |  | 
| 221 |  |  |  |  |  |  | =over 4 | 
| 222 |  |  |  |  |  |  |  | 
| 223 |  |  |  |  |  |  | =item - C<checking> | 
| 224 |  |  |  |  |  |  |  | 
| 225 |  |  |  |  |  |  | =item - C<savings> | 
| 226 |  |  |  |  |  |  |  | 
| 227 |  |  |  |  |  |  | =item - C<other> | 
| 228 |  |  |  |  |  |  |  | 
| 229 |  |  |  |  |  |  | =back | 
| 230 |  |  |  |  |  |  |  | 
| 231 |  |  |  |  |  |  | If C<category> is C<credit>, one of: | 
| 232 |  |  |  |  |  |  |  | 
| 233 |  |  |  |  |  |  | =over 4 | 
| 234 |  |  |  |  |  |  |  | 
| 235 |  |  |  |  |  |  | =item - C<mortgage> | 
| 236 |  |  |  |  |  |  |  | 
| 237 |  |  |  |  |  |  | =item - C<line_of_credit> | 
| 238 |  |  |  |  |  |  |  | 
| 239 |  |  |  |  |  |  | =item - C<credit_card> | 
| 240 |  |  |  |  |  |  |  | 
| 241 |  |  |  |  |  |  | =item - C<other> | 
| 242 |  |  |  |  |  |  |  | 
| 243 |  |  |  |  |  |  | =back | 
| 244 |  |  |  |  |  |  |  | 
| 245 |  |  |  |  |  |  | If C<category> is C<investment> or C<other>, this will be C<other>. | 
| 246 |  |  |  |  |  |  |  | 
| 247 |  |  |  |  |  |  | =head2 supported_payment_method_types array | 
| 248 |  |  |  |  |  |  |  | 
| 249 |  |  |  |  |  |  | The L<PaymentMethod type|https://stripe.com/docs/api/payment_methods/object#payment_method_object-type>(s) that can be created from this account. | 
| 250 |  |  |  |  |  |  |  | 
| 251 |  |  |  |  |  |  | =head2 transaction_refresh object | 
| 252 |  |  |  |  |  |  |  | 
| 253 |  |  |  |  |  |  | The state of the most recent attempt to refresh the account transactions. | 
| 254 |  |  |  |  |  |  |  | 
| 255 |  |  |  |  |  |  | This is a L<Net::API::Stripe::Balance::Transaction> object. | 
| 256 |  |  |  |  |  |  |  | 
| 257 |  |  |  |  |  |  | =head1 API SAMPLE | 
| 258 |  |  |  |  |  |  |  | 
| 259 |  |  |  |  |  |  | [ | 
| 260 |  |  |  |  |  |  | { | 
| 261 |  |  |  |  |  |  | "accountholder" : { | 
| 262 |  |  |  |  |  |  | "customer" : "cus_AJ78ZaALpqgiuZ", | 
| 263 |  |  |  |  |  |  | "type" : "customer" | 
| 264 |  |  |  |  |  |  | }, | 
| 265 |  |  |  |  |  |  | "balance" : null, | 
| 266 |  |  |  |  |  |  | "balance_refresh" : null, | 
| 267 |  |  |  |  |  |  | "category" : "cash", | 
| 268 |  |  |  |  |  |  | "created" : "1662261086", | 
| 269 |  |  |  |  |  |  | "display_name" : "Sample Checking Account", | 
| 270 |  |  |  |  |  |  | "id" : "fca_1Le9F42eZvKYlo2Cboplw3LC", | 
| 271 |  |  |  |  |  |  | "institution_name" : "StripeBank", | 
| 272 |  |  |  |  |  |  | "last4" : "6789", | 
| 273 |  |  |  |  |  |  | "livemode" : 0, | 
| 274 |  |  |  |  |  |  | "object" : "linked_account", | 
| 275 |  |  |  |  |  |  | "ownership" : null, | 
| 276 |  |  |  |  |  |  | "ownership_refresh" : null, | 
| 277 |  |  |  |  |  |  | "permissions" : [], | 
| 278 |  |  |  |  |  |  | "status" : "active", | 
| 279 |  |  |  |  |  |  | "subcategory" : "checking", | 
| 280 |  |  |  |  |  |  | "supported_payment_method_types" : [ | 
| 281 |  |  |  |  |  |  | "us_bank_account" | 
| 282 |  |  |  |  |  |  | ], | 
| 283 |  |  |  |  |  |  | "transaction_refresh" : null | 
| 284 |  |  |  |  |  |  | } | 
| 285 |  |  |  |  |  |  | ] | 
| 286 |  |  |  |  |  |  |  | 
| 287 |  |  |  |  |  |  | =head1 HISTORY | 
| 288 |  |  |  |  |  |  |  | 
| 289 |  |  |  |  |  |  | =head2 v0.1.0 | 
| 290 |  |  |  |  |  |  |  | 
| 291 |  |  |  |  |  |  | Initial version | 
| 292 |  |  |  |  |  |  |  | 
| 293 |  |  |  |  |  |  | =head1 AUTHOR | 
| 294 |  |  |  |  |  |  |  | 
| 295 |  |  |  |  |  |  | Jacques Deguest E<lt>F<jack@deguest.jp>E<gt> | 
| 296 |  |  |  |  |  |  |  | 
| 297 |  |  |  |  |  |  | =head1 SEE ALSO | 
| 298 |  |  |  |  |  |  |  | 
| 299 |  |  |  |  |  |  | L<Stripe API documentation|https://stripe.com/docs/api/financial_connections/accounts> | 
| 300 |  |  |  |  |  |  |  | 
| 301 |  |  |  |  |  |  | =head1 COPYRIGHT & LICENSE | 
| 302 |  |  |  |  |  |  |  | 
| 303 |  |  |  |  |  |  | Copyright (c) 2019-2022 DEGUEST Pte. Ltd. | 
| 304 |  |  |  |  |  |  |  | 
| 305 |  |  |  |  |  |  | You can use, copy, modify and redistribute this package and associated | 
| 306 |  |  |  |  |  |  | files under the same terms as Perl itself. | 
| 307 |  |  |  |  |  |  |  | 
| 308 |  |  |  |  |  |  | =cut |