| 1 | ##---------------------------------------------------------------------------- | ||
| 2 | ## Stripe API - ~/lib/Net/API/Stripe/Shipping.pm | ||
| 3 | ## Version v0.100.1 | ||
| 4 | ## Copyright(c) 2020 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::Shipping; | ||
| 11 | BEGIN | ||
| 12 | { | ||
| 13 | 1 | ▶ | use strict; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 14 | 1 | ▶ | use parent qw( Net::API::Stripe::Generic ); |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 15 | 1 | ▶ | our( $VERSION ) = 'v0.100.1'; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 16 | }; | ||
| 17 | |||
| 18 | 0 | ▶ | sub address { return( shift->_set_get_object( 'address', 'Net::API::Stripe::Address', @_ ) ); } |
|
Subroutine
address: not called CC=1 SCAR=6.9
Pod
documented
| |||
| 19 | |||
| 20 | 0 | ▶ | sub carrier { return( shift->_set_get_scalar( 'carrier', @_ ) ); } |
|
Subroutine
carrier: not called CC=1 SCAR=6.9
Pod
documented
| |||
| 21 | |||
| 22 | 0 | ▶ | sub eta { return( shift->_set_get_datetime( 'eta', @_ ) ); } |
|
Subroutine
eta: not called CC=1 SCAR=6.9
Pod
documented
| |||
| 23 | |||
| 24 | 0 | ▶ | sub name { return( shift->_set_get_scalar( 'name', @_ ) ); } |
|
Subroutine
name: not called CC=1 SCAR=6.9
Pod
documented
| |||
| 25 | |||
| 26 | 0 | ▶ | sub phone { return( shift->_set_get_scalar( 'phone', @_ ) ); } |
|
Subroutine
phone: not called CC=1 SCAR=6.9
Pod
documented
| |||
| 27 | |||
| 28 | 0 | ▶ | sub service { return( shift->_set_get_scalar( 'service', @_ ) ); } |
|
Subroutine
service: not called CC=1 SCAR=6.9
Pod
documented
| |||
| 29 | |||
| 30 | 0 | ▶ | sub status { return( shift->_set_get_scalar( 'status', @_ ) ); } |
|
Subroutine
status: not called CC=1 SCAR=6.9
Pod
documented
| |||
| 31 | |||
| 32 | 0 | ▶ | sub tracking_number { return( shift->_set_get_scalar( 'tracking_number', @_ ) ); } |
|
Subroutine
tracking_number: not called CC=1 SCAR=6.9
Pod
documented
| |||
| 33 | |||
| 34 | 0 | ▶ | sub tracking_url { return( shift->_set_get_uri( 'tracking_url', @_ ) ); } |
|
Subroutine
tracking_url: not called CC=1 SCAR=6.9
Pod
documented
| |||
| 35 | |||
| 36 | 0 | ▶ | sub type { return( shift->_set_get_scalar( 'type', @_ ) ); } |
|
Subroutine
type: not called CC=1 SCAR=6.9
Pod
documented
| |||
| 37 | |||
| 38 | 1 | 1; | |
| 39 | |||
| 40 | __END__ | ||
| 41 | |||
| 42 | =encoding utf8 | ||
| 43 | |||
| 44 | =head1 NAME | ||
| 45 | |||
| 46 | Net::API::Stripe::Shipping - A Stripe Shipping Object | ||
| 47 | |||
| 48 | =head1 SYNOPSIS | ||
| 49 | |||
| 50 | my $shipping = $stripe->shipping({ | ||
| 51 | address => $address_object, | ||
| 52 | carrier => 'DHL', | ||
| 53 | eta => '2020-04-12T08:00:00', | ||
| 54 | name => 'John Doe', | ||
| 55 | phone => '+81-(0)90-1234-5678', | ||
| 56 | service => 'express', | ||
| 57 | status => 'pending', | ||
| 58 | tracking_number => 1234567890, | ||
| 59 | tracking_url => 'https://track.example.com/1234567890', | ||
| 60 | type => 'individual', | ||
| 61 | }); | ||
| 62 | |||
| 63 | =head1 VERSION | ||
| 64 | |||
| 65 | v0.100.1 | ||
| 66 | |||
| 67 | =head1 DESCRIPTION | ||
| 68 | |||
| 69 | Where and how things will be shipped. | ||
| 70 | |||
| 71 | This is inherited by: L<Net::API::Stripe::Charge::Shipping>, L<Net::API::Stripe::Customer::Shipping>, L<Net::API::Stripe::Issuing::Card::Shipping>, L<Net::API::Stripe::Order::Shipping>, C<Net::API::Stripe::>, C<Net::API::Stripe::> | ||
| 72 | |||
| 73 | =head1 CONSTRUCTOR | ||
| 74 | |||
| 75 | =over 4 | ||
| 76 | |||
| 77 | =item B<new>( %ARG ) | ||
| 78 | |||
| 79 | Creates a new L<Net::API::Stripe::Shipping> object. | ||
| 80 | It may also take an hash like arguments, that also are method of the same name. | ||
| 81 | |||
| 82 | =back | ||
| 83 | |||
| 84 | =head1 METHODS | ||
| 85 | |||
| 86 | =over 4 | ||
| 87 | |||
| 88 | =item B<address> hash | ||
| 89 | |||
| 90 | Shipping address. | ||
| 91 | |||
| 92 | This is a L<Net::API::Stripe::Address> object, if any. | ||
| 93 | |||
| 94 | =item B<carrier> string | ||
| 95 | |||
| 96 | The delivery service that shipped a physical product, such as Fedex, UPS, USPS, etc. | ||
| 97 | |||
| 98 | =item B<eta> timestamp | ||
| 99 | |||
| 100 | A unix timestamp representing a best estimate of when the card will be delivered. | ||
| 101 | |||
| 102 | =item B<name> string | ||
| 103 | |||
| 104 | Recipient name. | ||
| 105 | |||
| 106 | =item B<phone> string | ||
| 107 | |||
| 108 | Recipient phone (including extension). | ||
| 109 | |||
| 110 | =item B<service> string | ||
| 111 | |||
| 112 | Shipment service, such as standard or express. Possible enum values | ||
| 113 | |||
| 114 | =over 8 | ||
| 115 | |||
| 116 | =item I<standard> | ||
| 117 | |||
| 118 | Cards arrive in 2-6 business days. | ||
| 119 | |||
| 120 | =item I<express> | ||
| 121 | |||
| 122 | Cards arrive in 2 business days. | ||
| 123 | |||
| 124 | =item I<priority> | ||
| 125 | |||
| 126 | Cards arrive in 1 business day. | ||
| 127 | |||
| 128 | =back | ||
| 129 | |||
| 130 | =item B<status> string | ||
| 131 | |||
| 132 | The delivery status of the card. One of pending, shipped, delivered, returned, failure, or canceled. | ||
| 133 | |||
| 134 | =item B<tracking_number> string | ||
| 135 | |||
| 136 | A tracking number for a card shipment. This is a C<URI> object. | ||
| 137 | |||
| 138 | =item B<tracking_url> string | ||
| 139 | |||
| 140 | A link to the shipping carrier’s site where you can view detailed information about a card shipment. | ||
| 141 | |||
| 142 | This returns a L<URI> object. | ||
| 143 | |||
| 144 | =item B<type> string | ||
| 145 | |||
| 146 | One of bulk or individual. Bulk shipments will be grouped and mailed together, while individual ones will not. | ||
| 147 | |||
| 148 | =back | ||
| 149 | |||
| 150 | =head1 API SAMPLE | ||
| 151 | |||
| 152 | { | ||
| 153 | "id": "ic_fake123456789", | ||
| 154 | "object": "issuing.card", | ||
| 155 | "authorization_controls": { | ||
| 156 | "allowed_categories": null, | ||
| 157 | "blocked_categories": null, | ||
| 158 | "currency": "usd", | ||
| 159 | "max_amount": 10000, | ||
| 160 | "max_approvals": 1, | ||
| 161 | "spending_limits": [], | ||
| 162 | "spending_limits_currency": null | ||
| 163 | }, | ||
| 164 | "brand": "Visa", | ||
| 165 | "cardholder": { | ||
| 166 | "id": "ich_fake123456789", | ||
| 167 | "object": "issuing.cardholder", | ||
| 168 | "authorization_controls": { | ||
| 169 | "allowed_categories": [], | ||
| 170 | "blocked_categories": [], | ||
| 171 | "spending_limits": [], | ||
| 172 | "spending_limits_currency": null | ||
| 173 | }, | ||
| 174 | "billing": { | ||
| 175 | "address": { | ||
| 176 | "city": "Beverly Hills", | ||
| 177 | "country": "US", | ||
| 178 | "line1": "123 Fake St", | ||
| 179 | "line2": "Apt 3", | ||
| 180 | "postal_code": "90210", | ||
| 181 | "state": "CA" | ||
| 182 | }, | ||
| 183 | "name": "Jenny Rosen" | ||
| 184 | }, | ||
| 185 | "company": null, | ||
| 186 | "created": 1540111055, | ||
| 187 | "email": "jenny@example.com", | ||
| 188 | "individual": null, | ||
| 189 | "is_default": false, | ||
| 190 | "livemode": false, | ||
| 191 | "metadata": {}, | ||
| 192 | "name": "Jenny Rosen", | ||
| 193 | "phone_number": "+18008675309", | ||
| 194 | "requirements": { | ||
| 195 | "disabled_reason": null, | ||
| 196 | "past_due": [] | ||
| 197 | }, | ||
| 198 | "status": "active", | ||
| 199 | "type": "individual" | ||
| 200 | }, | ||
| 201 | "created": 1571652525, | ||
| 202 | "currency": "usd", | ||
| 203 | "exp_month": 8, | ||
| 204 | "exp_year": 2020, | ||
| 205 | "last4": "4242", | ||
| 206 | "livemode": false, | ||
| 207 | "metadata": {}, | ||
| 208 | "name": "Jenny Rosen", | ||
| 209 | "pin": null, | ||
| 210 | "replacement_for": null, | ||
| 211 | "replacement_reason": null, | ||
| 212 | "shipping": null, | ||
| 213 | "status": "active", | ||
| 214 | "type": "physical" | ||
| 215 | } | ||
| 216 | |||
| 217 | =head1 HISTORY | ||
| 218 | |||
| 219 | =head2 v0.100.0 | ||
| 220 | |||
| 221 | Initial version | ||
| 222 | |||
| 223 | =head1 AUTHOR | ||
| 224 | |||
| 225 | Jacques Deguest E<lt>F<jack@deguest.jp>E<gt> | ||
| 226 | |||
| 227 | =head1 SEE ALSO | ||
| 228 | |||
| 229 | Stripe API documentation: | ||
| 230 | |||
| 231 | L<https://stripe.com/docs/api/issuing/cards/object> | ||
| 232 | |||
| 233 | =head1 COPYRIGHT & LICENSE | ||
| 234 | |||
| 235 | Copyright (c) 2020-2020 DEGUEST Pte. Ltd. | ||
| 236 | |||
| 237 | You can use, copy, modify and redistribute this package and associated | ||
| 238 | files under the same terms as Perl itself. | ||
| 239 | |||
| 240 | =cut | ||