Business-Stripe-Subscription
view release on metacpan - search on metacpan
view release on metacpan or search on metacpan
lib/Business/Stripe/Subscription.pm view on Meta::CPAN
my $response = $http->delete("https://api.stripe.com/v1/subscriptions/$subscription", $self->_get_header);
if ($response->{'success'}) {
return $response->{'content'}->{'id'} eq $subscription;
}
$self->{'error'} = 'Cancellation failed';
return undef;
}
# Change subscripotion to a different price plan
sub update {
my ($self, $subscription, $plan) = @_;
$self->{'error'} = '';
$self->{'error'} = 'Subscription missing' unless $subscription;
$self->{'error'} = 'Subscription plan missing' unless $plan;
return undef if $self->{'error'};
my $res = $http->post_form("https://api.stripe.com/v1/subscriptions/$subscription", {}, $self->_get_header);
my $payload = decode_json($res->{'content'});
view all matches for this distributionview release on metacpan - search on metacpan
( run in 1.838 second using v1.00-cache-2.02-grep-82fe00e-cpan-4673cadbf75 )