diff --git a/MYMETA.json b/MYMETA.json index 54883b8..bcdc871 100644 --- a/MYMETA.json +++ b/MYMETA.json @@ -19,7 +19,12 @@ "DBD::Mock" : "0", "DBD::Pg" : "0", "DBI" : "0", - "Mojolicious" : "0" + "DateTime" : "0", + "DateTime::Format::Pg" : "0", + "Mojolicious" : "0", + "Test::MockModule" : "0", + "Test::MockObject" : "0", + "Test::Most" : "0" } } }, diff --git a/lib/Peace.pm b/lib/Peace.pm index bd62782..70c5cbd 100644 --- a/lib/Peace.pm +++ b/lib/Peace.pm @@ -22,3 +22,20 @@ sub startup { $r->post('/users')->to('user#post'); } 1; + +=encoding utf8 + +=head1 NAME + +Peace - Onlie GNU/Linux flatpak apps store. + +=head1 SYNOPSIS + + ./peace + +=head1 DESCRIPTION + +Peace is the server backend for flatstore a shop +to be able to sell or buy flatpak applications. + +=cut diff --git a/lib/Peace/DB.pm b/lib/Peace/DB.pm index 9936dbf..a1dbf91 100644 --- a/lib/Peace/DB.pm +++ b/lib/Peace/DB.pm @@ -156,3 +156,45 @@ EOF return $value; } 1; + +=encoding utf8 + +=head1 NAME + +Peace::DB - Database handler generator for the Peace shop. + +=head1 SYNOPSIS + + my $config = + $self->plugin( + JSONConfig => { + file => "$home/.config/peace/peace.conf" + } + ); + my $dbh = Peace::DB->dbh( config => $config ); + +=head1 DESCRIPTION + +This module helps to recover a database handle and runs +the migrations automatically when doing so. + +=head1 FUNCTIONS + +Peace::DB implements the following functions: + +=head2 dbh + +Recovers a database handle, requires the config of the app as +its parameter. + + my $dbh = Peace::DB->dbh( config => $config ); + +=head2 run_migrations + +Runs the migrations manually. + + Peace::DB->run_migrations($dbh); + +=head1 SEE ALSO + +L, L diff --git a/lib/Peace/Model/Customer.pm b/lib/Peace/Model/Customer.pm index 6f966c9..880bc05 100644 --- a/lib/Peace/Model/Customer.pm +++ b/lib/Peace/Model/Customer.pm @@ -84,3 +84,71 @@ use DateTime; } } 1; +=encoding utf8 + +=head1 NAME + +Peace::Model::Customer - The customer object representation + +=head1 SYNOPSIS + + my $customer = Peace::Model::Customer->new( + secret_bcrypt => $secret_bcrypt + ); + +=head1 DESCRIPTION + +Describes a customer of Peace capable of buy applications. + +=head1 INSTANCE METHODS + +Peace::Model::Customer implements the following instance methods: + +=head2 new + + my $customer = Peace::Model::Customer->new( + uuid => $uuid, # optional + date_creation => $date_creation, # optional + secret_bcrypt => $secret_bcrypt, + stripe_id => $stripe_id, # optional + ); + +Instances a new Peace::Model::Customer. + +=head1 METHODS + +Peace::Model::Customer implements the following methods: + +=head2 uuid + + my $uuid = $customer->uuid; + + $customer->uuid($uuid); + +Allows to retrive and set the customer uuid. + +=head2 date_creation + + my $date_creation = $customer->date_creation; + + $customer->date_creation($date_creation); + +Allows to retrive and set the customer date_creation. + +=head2 secret_bcrypt + + my $secret_bcrypt = $customer->secret_bcrypt; + + $customer->secret_bcrypt($secret_bcrypt); + +Allows to retrive and set the customer secret_bcrypt. + +=head2 stripe_id + + my $stripe_id = $customer->stripe_id; + + $customer->stripe_id($stripe_id); + +=head1 SEE ALSO + +L