NAME

Net::Iugu::Subscriptions - Net::Iugu::Subscriptions - Methods to manage subscriptions

VERSION

version 0.000002

SYNOPSIS

Implements the API calls to manage subscriptions of Iugu accounts. It is used by the main module Net::Iugu and shouldn't be instantiated directly.

use Net::Iugu::Subscriptions;

my $subs = Net::Iugu::Subscriptions->new(
    token => 'my_api_token'
);

my $res;

$res = $subs->create( $data );
$res = $subs->read( $subscription_id );
$res = $subs->update( $subscription_id, $data );
$res = $subs->delete( $subscription_id );
$res = $subs->list( $params );
$res = $subs->suspend( $subscription_id );
$res = $subs->activate( $subscription_id );
$res = $subs->change_plan( $subscription_id, $plan_id );
$res = $subs->add_credits( $subscription_id, $amount );
$res = $subs->remove_credits( $subscription_id, $amount );

For a detailed reference of params and return values check the Official Documentation.

METHODS

create( $data )

Inherited from Net::Iugu::CRUD, creates a new subscription.

read( $subscription_id )

Inherited from Net::Iugu::CRUD, returns data of a subscription.

update( $subscription_id, $data )

Inherited from Net::Iugu::CRUD, updates a subscription.

delete( $subscription_id )

Inherited from Net::Iugu::CRUD, removes a subscription.

list( $params )

Inherited from Net::Iugu::CRUD, lists all subscriptions.

suspend( $subscription_id )

Suspends a subscription.

activate( $subscription_id )

Activates a subscription.

change_plan( $subscription_id, $plan_id )

Changes the plan of a subscrption.

add_credits( $subscription_id, $amount )

Adds creditis to a subscription.

remove_credits( $subscription_id, $amount )

Removes credits from a subscription.

AUTHOR

Blabos de Blebe <blabos@cpan.org>

COPYRIGHT AND LICENSE

This software is copyright (c) 2015 by Blabos de Blebe.

This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.