| line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
|
1
|
|
|
|
|
|
|
##---------------------------------------------------------------------------- |
|
2
|
|
|
|
|
|
|
## Stripe API - ~/lib/Net/API/Stripe/Order/Return.pm |
|
3
|
|
|
|
|
|
|
## Version v0.100.0 |
|
4
|
|
|
|
|
|
|
## Copyright(c) 2019 DEGUEST Pte. Ltd. |
|
5
|
|
|
|
|
|
|
## Author: Jacques Deguest <jack@deguest.jp> |
|
6
|
|
|
|
|
|
|
## Created 2019/11/02 |
|
7
|
|
|
|
|
|
|
## Modified 2020/05/15 |
|
8
|
|
|
|
|
|
|
## |
|
9
|
|
|
|
|
|
|
##---------------------------------------------------------------------------- |
|
10
|
|
|
|
|
|
|
## https://stripe.com/docs/api/order_returns/object |
|
11
|
|
|
|
|
|
|
BEGIN |
|
12
|
|
|
|
|
|
|
{ |
|
13
|
|
|
|
|
|
|
use strict; |
|
14
|
1
|
|
|
1
|
|
1006
|
use warnings; |
|
|
1
|
|
|
|
|
2
|
|
|
|
1
|
|
|
|
|
32
|
|
|
15
|
1
|
|
|
1
|
|
5
|
use parent qw( Net::API::Stripe::Generic ); |
|
|
1
|
|
|
|
|
2
|
|
|
|
1
|
|
|
|
|
29
|
|
|
16
|
1
|
|
|
1
|
|
5
|
use vars qw( $VERSION ); |
|
|
1
|
|
|
|
|
2
|
|
|
|
1
|
|
|
|
|
5
|
|
|
17
|
1
|
|
|
1
|
|
66
|
our( $VERSION ) = 'v0.100.0'; |
|
|
1
|
|
|
|
|
2
|
|
|
|
1
|
|
|
|
|
46
|
|
|
18
|
1
|
|
|
1
|
|
54
|
}; |
|
19
|
|
|
|
|
|
|
|
|
20
|
|
|
|
|
|
|
use strict; |
|
21
|
1
|
|
|
1
|
|
7
|
use warnings; |
|
|
1
|
|
|
|
|
2
|
|
|
|
1
|
|
|
|
|
20
|
|
|
22
|
1
|
|
|
1
|
|
4
|
|
|
|
1
|
|
|
|
|
14
|
|
|
|
1
|
|
|
|
|
256
|
|
|
23
|
|
|
|
|
|
|
|
|
24
|
0
|
|
|
0
|
1
|
|
|
|
25
|
|
|
|
|
|
|
|
|
26
|
0
|
|
|
0
|
1
|
|
|
|
27
|
|
|
|
|
|
|
|
|
28
|
0
|
|
|
0
|
1
|
|
# Array of Net::API::Stripe::Order::Item |
|
29
|
|
|
|
|
|
|
|
|
30
|
0
|
|
|
0
|
1
|
|
|
|
31
|
|
|
|
|
|
|
|
|
32
|
0
|
|
|
0
|
1
|
|
|
|
33
|
|
|
|
|
|
|
1; |
|
34
|
|
|
|
|
|
|
|
|
35
|
0
|
|
|
0
|
1
|
|
|
|
36
|
|
|
|
|
|
|
=encoding utf8 |
|
37
|
0
|
|
|
0
|
1
|
|
|
|
38
|
|
|
|
|
|
|
=head1 NAME |
|
39
|
0
|
|
|
0
|
1
|
|
|
|
40
|
|
|
|
|
|
|
Net::API::Stripe::Order::Return - A Stripe Order Return Object |
|
41
|
0
|
|
|
0
|
1
|
|
|
|
42
|
|
|
|
|
|
|
=head1 SYNOPSIS |
|
43
|
|
|
|
|
|
|
|
|
44
|
|
|
|
|
|
|
my $return = $stripe->return({ |
|
45
|
|
|
|
|
|
|
amount => 2000, |
|
46
|
|
|
|
|
|
|
currency => 'jpy', |
|
47
|
|
|
|
|
|
|
items => [ $item_object1, $item_object2 ], |
|
48
|
|
|
|
|
|
|
order => $order_object, |
|
49
|
|
|
|
|
|
|
refund => undef, |
|
50
|
|
|
|
|
|
|
}); |
|
51
|
|
|
|
|
|
|
|
|
52
|
|
|
|
|
|
|
See documentation in L<Net::API::Stripe> for example to make api calls to Stripe to create those objects. |
|
53
|
|
|
|
|
|
|
|
|
54
|
|
|
|
|
|
|
=head1 VERSION |
|
55
|
|
|
|
|
|
|
|
|
56
|
|
|
|
|
|
|
v0.100.0 |
|
57
|
|
|
|
|
|
|
|
|
58
|
|
|
|
|
|
|
=head1 DESCRIPTION |
|
59
|
|
|
|
|
|
|
|
|
60
|
|
|
|
|
|
|
A return represents the full or partial return of a number of order items (L<https://stripe.com/docs/api/order_returns#order_items>). Returns always belong to an order, and may optionally contain a refund. |
|
61
|
|
|
|
|
|
|
|
|
62
|
|
|
|
|
|
|
=head1 CONSTRUCTOR |
|
63
|
|
|
|
|
|
|
|
|
64
|
|
|
|
|
|
|
=head2 new( %ARG ) |
|
65
|
|
|
|
|
|
|
|
|
66
|
|
|
|
|
|
|
Creates a new L<Net::API::Stripe::Order::Return> object. |
|
67
|
|
|
|
|
|
|
|
|
68
|
|
|
|
|
|
|
=head1 METHODS |
|
69
|
|
|
|
|
|
|
|
|
70
|
|
|
|
|
|
|
=head2 id string |
|
71
|
|
|
|
|
|
|
|
|
72
|
|
|
|
|
|
|
Unique identifier for the object. |
|
73
|
|
|
|
|
|
|
|
|
74
|
|
|
|
|
|
|
=head2 object string, value is "order_return" |
|
75
|
|
|
|
|
|
|
|
|
76
|
|
|
|
|
|
|
String representing the object’s type. Objects of the same type share the same value. |
|
77
|
|
|
|
|
|
|
|
|
78
|
|
|
|
|
|
|
=head2 amount integer |
|
79
|
|
|
|
|
|
|
|
|
80
|
|
|
|
|
|
|
A positive integer in the smallest currency unit (that is, 100 cents for $1.00, or 1 for ¥1, Japanese Yen being a zero-decimal currency) representing the total amount for the returned line item. |
|
81
|
|
|
|
|
|
|
|
|
82
|
|
|
|
|
|
|
=head2 created timestamp |
|
83
|
|
|
|
|
|
|
|
|
84
|
|
|
|
|
|
|
Time at which the object was created. Measured in seconds since the Unix epoch. |
|
85
|
|
|
|
|
|
|
|
|
86
|
|
|
|
|
|
|
=head2 currency currency |
|
87
|
|
|
|
|
|
|
|
|
88
|
|
|
|
|
|
|
Three-letter ISO currency code, in lowercase. Must be a supported currency. |
|
89
|
|
|
|
|
|
|
|
|
90
|
|
|
|
|
|
|
=head2 items array of hashes |
|
91
|
|
|
|
|
|
|
|
|
92
|
|
|
|
|
|
|
The items included in this order return. |
|
93
|
|
|
|
|
|
|
|
|
94
|
|
|
|
|
|
|
This is an array of L<Net::API::Stripe::Order::Item> objects. |
|
95
|
|
|
|
|
|
|
|
|
96
|
|
|
|
|
|
|
=head2 livemode boolean |
|
97
|
|
|
|
|
|
|
|
|
98
|
|
|
|
|
|
|
Has the value true if the object exists in live mode or the value false if the object exists in test mode. |
|
99
|
|
|
|
|
|
|
|
|
100
|
|
|
|
|
|
|
=head2 order string (expandable) |
|
101
|
|
|
|
|
|
|
|
|
102
|
|
|
|
|
|
|
The order that this return includes items from. |
|
103
|
|
|
|
|
|
|
|
|
104
|
|
|
|
|
|
|
When expanded, this is a L<Net::API::Stripe::Order> object. |
|
105
|
|
|
|
|
|
|
|
|
106
|
|
|
|
|
|
|
=head2 refund string (expandable) |
|
107
|
|
|
|
|
|
|
|
|
108
|
|
|
|
|
|
|
The ID of the refund issued for this return. |
|
109
|
|
|
|
|
|
|
|
|
110
|
|
|
|
|
|
|
When expanded, this is a L<Net::API::Stripe::Refund> object. |
|
111
|
|
|
|
|
|
|
|
|
112
|
|
|
|
|
|
|
=head1 API SAMPLE |
|
113
|
|
|
|
|
|
|
|
|
114
|
|
|
|
|
|
|
{ |
|
115
|
|
|
|
|
|
|
"id": "orret_fake123456789", |
|
116
|
|
|
|
|
|
|
"object": "order_return", |
|
117
|
|
|
|
|
|
|
"amount": 1500, |
|
118
|
|
|
|
|
|
|
"created": 1571480456, |
|
119
|
|
|
|
|
|
|
"currency": "jpy", |
|
120
|
|
|
|
|
|
|
"items": [ |
|
121
|
|
|
|
|
|
|
{ |
|
122
|
|
|
|
|
|
|
"object": "order_item", |
|
123
|
|
|
|
|
|
|
"amount": 1500, |
|
124
|
|
|
|
|
|
|
"currency": "jpy", |
|
125
|
|
|
|
|
|
|
"description": "Provider, Inc investor yearly membership", |
|
126
|
|
|
|
|
|
|
"parent": "sk_fake123456789", |
|
127
|
|
|
|
|
|
|
"quantity": null, |
|
128
|
|
|
|
|
|
|
"type": "sku" |
|
129
|
|
|
|
|
|
|
} |
|
130
|
|
|
|
|
|
|
], |
|
131
|
|
|
|
|
|
|
"livemode": false, |
|
132
|
|
|
|
|
|
|
"order": "or_fake123456789", |
|
133
|
|
|
|
|
|
|
"refund": "re_fake123456789" |
|
134
|
|
|
|
|
|
|
} |
|
135
|
|
|
|
|
|
|
|
|
136
|
|
|
|
|
|
|
=head1 HISTORY |
|
137
|
|
|
|
|
|
|
|
|
138
|
|
|
|
|
|
|
=head2 v0.1 |
|
139
|
|
|
|
|
|
|
|
|
140
|
|
|
|
|
|
|
Initial version |
|
141
|
|
|
|
|
|
|
|
|
142
|
|
|
|
|
|
|
=head1 AUTHOR |
|
143
|
|
|
|
|
|
|
|
|
144
|
|
|
|
|
|
|
Jacques Deguest E<lt>F<jack@deguest.jp>E<gt> |
|
145
|
|
|
|
|
|
|
|
|
146
|
|
|
|
|
|
|
=head1 SEE ALSO |
|
147
|
|
|
|
|
|
|
|
|
148
|
|
|
|
|
|
|
Stripe API documentation: |
|
149
|
|
|
|
|
|
|
|
|
150
|
|
|
|
|
|
|
L<https://stripe.com/docs/api/order_returns> |
|
151
|
|
|
|
|
|
|
|
|
152
|
|
|
|
|
|
|
=head1 COPYRIGHT & LICENSE |
|
153
|
|
|
|
|
|
|
|
|
154
|
|
|
|
|
|
|
Copyright (c) 2019-2020 DEGUEST Pte. Ltd. |
|
155
|
|
|
|
|
|
|
|
|
156
|
|
|
|
|
|
|
You can use, copy, modify and redistribute this package and associated |
|
157
|
|
|
|
|
|
|
files under the same terms as Perl itself. |
|
158
|
|
|
|
|
|
|
|
|
159
|
|
|
|
|
|
|
=cut |