API-Stripe

 view release on metacpan or  search on metacpan

README.mkdn  view on Meta::CPAN

8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
# SYNOPSIS
 
    use API::Stripe;
 
    my $stripe = API::Stripe->new(
        username   => 'USERNAME',
        identifier => 'APPLICATION NAME',
    );
 
    $stripe->debug(1);
    $stripe->fatal(1);
 
    my $charge = $stripe->charges('ch_163Gh12CVMZwIkvc');
    my $results = $charge->fetch;
 
    # after some introspection
 
    $charge->update( ... );
 
# DESCRIPTION

README.mkdn  view on Meta::CPAN

42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
The identifier attribute should be set to a string that identifies your app.
 
## username
 
    $stripe->username;
    $stripe->username('USERNAME');
 
The username attribute should be set to an API key associated with your account.
 
## debug
 
    $stripe->debug;
    $stripe->debug(1);
 
The debug attribute if true prints HTTP requests and responses to standard out.
 
## fatal
 
    $stripe->fatal;
    $stripe->fatal(1);
 
The fatal attribute if true promotes 4xx and 5xx server response codes to
exceptions, a [API::Client::Exception](https://metacpan.org/pod/API::Client::Exception) object.
 
## retries

lib/API/Stripe.pm  view on Meta::CPAN

75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
    $headers->header('Content-Type' => $content);
 
    return $self;
 
}
 
method resource (@segments) {
 
    # build new resource instance
    my $instance = __PACKAGE__->new(
        debug      => $self->debug,
        fatal      => $self->fatal,
        retries    => $self->retries,
        timeout    => $self->timeout,
        user_agent => $self->user_agent,
        identifier => $self->identifier,
        username   => $self->username,
        version    => $self->version,
    );
 
    # resource locator

lib/API/Stripe.pm  view on Meta::CPAN

121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
=head1 SYNOPSIS
 
    use API::Stripe;
 
    my $stripe = API::Stripe->new(
        username   => 'USERNAME',
        identifier => 'APPLICATION NAME',
    );
 
    $stripe->debug(1);
    $stripe->fatal(1);
 
    my $charge = $stripe->charges('ch_163Gh12CVMZwIkvc');
    my $results = $charge->fetch;
 
    # after some introspection
 
    $charge->update( ... );
 
=head1 DESCRIPTION

lib/API/Stripe.pm  view on Meta::CPAN

155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
The identifier attribute should be set to a string that identifies your app.
 
=head2 username
 
    $stripe->username;
    $stripe->username('USERNAME');
 
The username attribute should be set to an API key associated with your account.
 
=head2 debug
 
    $stripe->debug;
    $stripe->debug(1);
 
The debug attribute if true prints HTTP requests and responses to standard out.
 
=head2 fatal
 
    $stripe->fatal;
    $stripe->fatal(1);
 
The fatal attribute if true promotes 4xx and 5xx server response codes to
exceptions, a L<API::Client::Exception> object.
 
=head2 retries



( run in 2.172 seconds using v1.01-cache-2.11-cpan-87723dcf8b7 )