| line | stmt | bran | cond | sub | pod | time | code | 
| 1 |  |  |  |  |  |  | ##---------------------------------------------------------------------------- | 
| 2 |  |  |  |  |  |  | ## Stripe API - ~/lib/Net/API/Stripe/Issuing/Card/AuthorizationsControl/SpendingLimit.pm | 
| 3 |  |  |  |  |  |  | ## Version v0.100.0 | 
| 4 |  |  |  |  |  |  | ## Copyright(c) 2019 DEGUEST Pte. Ltd. | 
| 5 |  |  |  |  |  |  | ## Author: Jacques Deguest <@sitael.tokyo.deguest.jp> | 
| 6 |  |  |  |  |  |  | ## Created 2019/11/02 | 
| 7 |  |  |  |  |  |  | ## Modified 2020/05/15 | 
| 8 |  |  |  |  |  |  | ## | 
| 9 |  |  |  |  |  |  | ##---------------------------------------------------------------------------- | 
| 10 |  |  |  |  |  |  | package Net::API::Stripe::Issuing::Card::AuthorizationsControl::SpendingLimit; | 
| 11 |  |  |  |  |  |  | BEGIN | 
| 12 |  |  |  |  |  |  | { | 
| 13 | 1 |  |  | 1 |  | 883 | use strict; | 
|  | 1 |  |  |  |  | 3 |  | 
|  | 1 |  |  |  |  | 29 |  | 
| 14 | 1 |  |  | 1 |  | 5 | use parent qw( Net::API::Stripe::Generic ); | 
|  | 1 |  |  |  |  | 1 |  | 
|  | 1 |  |  |  |  | 20 |  | 
| 15 | 1 |  |  | 1 |  | 132 | our( $VERSION ) = 'v0.100.0'; | 
| 16 |  |  |  |  |  |  | }; | 
| 17 |  |  |  |  |  |  |  | 
| 18 | 0 |  |  | 0 | 1 |  | sub amount { return( shift->_set_get_number( 'amount', @_ ) ); } | 
| 19 |  |  |  |  |  |  |  | 
| 20 | 0 |  |  | 0 | 1 |  | sub categories { return( shift->_set_get_array( 'categories', @_ ) ); } | 
| 21 |  |  |  |  |  |  |  | 
| 22 | 0 |  |  | 0 | 1 |  | sub interval { return( shift->_set_get_scalar( 'interval', @_ ) ); } | 
| 23 |  |  |  |  |  |  |  | 
| 24 |  |  |  |  |  |  | 1; | 
| 25 |  |  |  |  |  |  |  | 
| 26 |  |  |  |  |  |  | __END__ | 
| 27 |  |  |  |  |  |  |  | 
| 28 |  |  |  |  |  |  | =encoding utf8 | 
| 29 |  |  |  |  |  |  |  | 
| 30 |  |  |  |  |  |  | =head1 NAME | 
| 31 |  |  |  |  |  |  |  | 
| 32 |  |  |  |  |  |  | Net::API::Stripe::Issuing::Card::AuthorizationsControl::SpendingLimit - A Stripe Card Spending Limit Object | 
| 33 |  |  |  |  |  |  |  | 
| 34 |  |  |  |  |  |  | =head1 SYNOPSIS | 
| 35 |  |  |  |  |  |  |  | 
| 36 |  |  |  |  |  |  | my $limit = $stripe->card_holder->authorization_controls->spending_limits([ | 
| 37 |  |  |  |  |  |  | { | 
| 38 |  |  |  |  |  |  | amount => 2000000, | 
| 39 |  |  |  |  |  |  | categories => '', | 
| 40 |  |  |  |  |  |  | interval => 'monthly', | 
| 41 |  |  |  |  |  |  | }, | 
| 42 |  |  |  |  |  |  | { | 
| 43 |  |  |  |  |  |  | amount => 200000, | 
| 44 |  |  |  |  |  |  | categories => '', | 
| 45 |  |  |  |  |  |  | interval => 'weekly', | 
| 46 |  |  |  |  |  |  | }, | 
| 47 |  |  |  |  |  |  | ]); | 
| 48 |  |  |  |  |  |  |  | 
| 49 |  |  |  |  |  |  | =head1 VERSION | 
| 50 |  |  |  |  |  |  |  | 
| 51 |  |  |  |  |  |  | v0.100.0 | 
| 52 |  |  |  |  |  |  |  | 
| 53 |  |  |  |  |  |  | =head1 DESCRIPTION | 
| 54 |  |  |  |  |  |  |  | 
| 55 |  |  |  |  |  |  | Limit the spending with rules based on time intervals and categories. | 
| 56 |  |  |  |  |  |  |  | 
| 57 |  |  |  |  |  |  | This is instantiated by method B<spending_limits> in module L<Net::API::Stripe::Issuing::Card::Holder> | 
| 58 |  |  |  |  |  |  |  | 
| 59 |  |  |  |  |  |  | =head1 CONSTRUCTOR | 
| 60 |  |  |  |  |  |  |  | 
| 61 |  |  |  |  |  |  | =over 4 | 
| 62 |  |  |  |  |  |  |  | 
| 63 |  |  |  |  |  |  | =item B<new>( %ARG ) | 
| 64 |  |  |  |  |  |  |  | 
| 65 |  |  |  |  |  |  | Creates a new L<Net::API::Stripe::Issuing::Card::AuthorizationsControl::SpendingLimit> object. | 
| 66 |  |  |  |  |  |  | It may also take an hash like arguments, that also are method of the same name. | 
| 67 |  |  |  |  |  |  |  | 
| 68 |  |  |  |  |  |  | =back | 
| 69 |  |  |  |  |  |  |  | 
| 70 |  |  |  |  |  |  | =head1 METHODS | 
| 71 |  |  |  |  |  |  |  | 
| 72 |  |  |  |  |  |  | =over 4 | 
| 73 |  |  |  |  |  |  |  | 
| 74 |  |  |  |  |  |  | =item B<amount> positive integer | 
| 75 |  |  |  |  |  |  |  | 
| 76 |  |  |  |  |  |  | Maximum amount allowed to spend per time interval. | 
| 77 |  |  |  |  |  |  |  | 
| 78 |  |  |  |  |  |  | =item B<categories> array | 
| 79 |  |  |  |  |  |  |  | 
| 80 |  |  |  |  |  |  | Array of strings containing categories on which to apply the spending limit. Leave this blank to limit all charges. | 
| 81 |  |  |  |  |  |  |  | 
| 82 |  |  |  |  |  |  | =item B<interval> string | 
| 83 |  |  |  |  |  |  |  | 
| 84 |  |  |  |  |  |  | The time interval with which to apply this spending limit towards. Allowed values are per_authorization, daily, weekly, monthly, yearly, or all_time. | 
| 85 |  |  |  |  |  |  |  | 
| 86 |  |  |  |  |  |  | =back | 
| 87 |  |  |  |  |  |  |  | 
| 88 |  |  |  |  |  |  | =head1 API SAMPLE | 
| 89 |  |  |  |  |  |  |  | 
| 90 |  |  |  |  |  |  | { | 
| 91 |  |  |  |  |  |  | "id": "ich_fake123456789", | 
| 92 |  |  |  |  |  |  | "object": "issuing.cardholder", | 
| 93 |  |  |  |  |  |  | "authorization_controls": { | 
| 94 |  |  |  |  |  |  | "allowed_categories": [], | 
| 95 |  |  |  |  |  |  | "blocked_categories": [], | 
| 96 |  |  |  |  |  |  | "spending_limits": [], | 
| 97 |  |  |  |  |  |  | "spending_limits_currency": null | 
| 98 |  |  |  |  |  |  | }, | 
| 99 |  |  |  |  |  |  | "billing": { | 
| 100 |  |  |  |  |  |  | "address": { | 
| 101 |  |  |  |  |  |  | "city": "Beverly Hills", | 
| 102 |  |  |  |  |  |  | "country": "US", | 
| 103 |  |  |  |  |  |  | "line1": "123 Fake St", | 
| 104 |  |  |  |  |  |  | "line2": "Apt 3", | 
| 105 |  |  |  |  |  |  | "postal_code": "90210", | 
| 106 |  |  |  |  |  |  | "state": "CA" | 
| 107 |  |  |  |  |  |  | }, | 
| 108 |  |  |  |  |  |  | "name": "Jenny Rosen" | 
| 109 |  |  |  |  |  |  | }, | 
| 110 |  |  |  |  |  |  | "company": null, | 
| 111 |  |  |  |  |  |  | "created": 1540111055, | 
| 112 |  |  |  |  |  |  | "email": "jenny@example.com", | 
| 113 |  |  |  |  |  |  | "individual": null, | 
| 114 |  |  |  |  |  |  | "is_default": false, | 
| 115 |  |  |  |  |  |  | "livemode": false, | 
| 116 |  |  |  |  |  |  | "metadata": {}, | 
| 117 |  |  |  |  |  |  | "name": "Jenny Rosen", | 
| 118 |  |  |  |  |  |  | "phone_number": "+18008675309", | 
| 119 |  |  |  |  |  |  | "requirements": { | 
| 120 |  |  |  |  |  |  | "disabled_reason": null, | 
| 121 |  |  |  |  |  |  | "past_due": [] | 
| 122 |  |  |  |  |  |  | }, | 
| 123 |  |  |  |  |  |  | "status": "active", | 
| 124 |  |  |  |  |  |  | "type": "individual" | 
| 125 |  |  |  |  |  |  | } | 
| 126 |  |  |  |  |  |  |  | 
| 127 |  |  |  |  |  |  | =head1 HISTORY | 
| 128 |  |  |  |  |  |  |  | 
| 129 |  |  |  |  |  |  | =head2 v0.1 | 
| 130 |  |  |  |  |  |  |  | 
| 131 |  |  |  |  |  |  | Initial version | 
| 132 |  |  |  |  |  |  |  | 
| 133 |  |  |  |  |  |  | =head1 AUTHOR | 
| 134 |  |  |  |  |  |  |  | 
| 135 |  |  |  |  |  |  | Jacques Deguest E<lt>F<jack@deguest.jp>E<gt> | 
| 136 |  |  |  |  |  |  |  | 
| 137 |  |  |  |  |  |  | =head1 SEE ALSO | 
| 138 |  |  |  |  |  |  |  | 
| 139 |  |  |  |  |  |  | Stripe API documentation: | 
| 140 |  |  |  |  |  |  |  | 
| 141 |  |  |  |  |  |  | L<https://stripe.com/docs/api/issuing/cardholders/object> | 
| 142 |  |  |  |  |  |  |  | 
| 143 |  |  |  |  |  |  | =head1 COPYRIGHT & LICENSE | 
| 144 |  |  |  |  |  |  |  | 
| 145 |  |  |  |  |  |  | Copyright (c) 2019-2020 DEGUEST Pte. Ltd. | 
| 146 |  |  |  |  |  |  |  | 
| 147 |  |  |  |  |  |  | You can use, copy, modify and redistribute this package and associated | 
| 148 |  |  |  |  |  |  | files under the same terms as Perl itself. | 
| 149 |  |  |  |  |  |  |  | 
| 150 |  |  |  |  |  |  | =cut |