Business-Monzo

 view release on metacpan or  search on metacpan

META.json  view on Meta::CPAN

      "runtime" : {
         "requires" : {
            "Carp" : "0",
            "Data::Currency" : "0.06",
            "DateTime" : "1.26",
            "DateTime::Format::DateParse" : "0.05",
            "Locale::Currency::Format" : "1.35",
            "Mojolicious" : "6.62",
            "Moo" : "2.001001",
            "Throwable" : "0.200011",
            "Try::Tiny" : "0.22",
            "Types::Standard" : "1.000005",
            "perl" : "5.010001"
         }
      },
      "test" : {
         "requires" : {
            "Test::Deep" : "0.112",
            "Test::Exception" : "0.32",
            "Test::MockObject" : "1.20140408",
            "Test::Most" : "0.31"

META.yml  view on Meta::CPAN

    - inc
requires:
  Carp: '0'
  Data::Currency: '0.06'
  DateTime: '1.26'
  DateTime::Format::DateParse: '0.05'
  Locale::Currency::Format: '1.35'
  Mojolicious: '6.62'
  Moo: '2.001001'
  Throwable: '0.200011'
  Try::Tiny: '0.22'
  Types::Standard: '1.000005'
  perl: '5.010001'
resources:
  bugtracker: https://github.com/leejo/business-monzo/issues
  homepage: https://metacpan.org/module/Business::Monzo
  license: http://dev.perl.org/licenses/
  repository: https://github.com/leejo/business-monzo
version: '0.13'
x_repository:
  type: git

Makefile.PL  view on Meta::CPAN

    NAME             => 'Business::Monzo',
    VERSION_FROM     => 'lib/Business/Monzo.pm',
    AUTHOR           => 'Lee Johnson <leejo@cpan.org>',
    LICENSE          => 'perl',
    MIN_PERL_VERSION => '5.10.1',
    PREREQ_PM => {
        'Moo'                  => 2.001001,
        'Carp'                 => 0, # Carp was first released with perl 5
        'Throwable'            => 0.200011,
        'Mojolicious'          => 6.62,
        'Try::Tiny'            => 0.22,
        'Types::Standard'      => 1.000005,
        'Data::Currency'       => 0.06000,
        'DateTime'             => 1.26,
        'DateTime::Format::DateParse' => 0.05,
        'Locale::Currency::Format' => 1.35,
    },
    TEST_REQUIRES => {
        'Test::Most'       => 0.31,
        'Test::Deep'       => 0.112,
        'Test::Exception'  => 0.32,

bin/monzo_transactions  view on Meta::CPAN

#!perl

use strict;
use warnings;
use feature qw/ say /;

use Data::Dumper;
use DateTime;
use Try::Tiny;

use Business::Monzo;

$ENV{MONZO_DEBUG} = shift;

my $monzo = Business::Monzo->new(
	token => $ENV{MONZOJO_TOKEN}
);

# get the last three month's transactions, but limit to 5

lib/Business/Monzo/Resource.pm  view on Meta::CPAN


=cut

use strict;
use warnings;

use Moo;
use Carp qw/ confess carp /;
use Mojo::JSON qw/ encode_json /;
use Scalar::Util qw/ blessed /;
use Try::Tiny;

=head1 ATTRIBUTES

The Resource class has the following attributes (with their type).

    client (Business::Monzo::Client) - REQUIRED
    url (Str)
    url_no_id (Str)

=cut

t/business/monzo/exception.t  view on Meta::CPAN

#!perl

use strict;
use warnings;

use Test::Most;
use Test::Exception;
use Try::Tiny;

use_ok( 'Business::Monzo::Exception' );

throws_ok(
    sub { Business::Monzo::Exception->throw },
    qr/Missing required arguments: message/,
    '->throw requires a message',
);

throws_ok(

t/business/monzo/exception.t  view on Meta::CPAN

is( $@->code,'400',' ... code available' );
is( $@->response,'400 Bad Request',' ... response available' );

try {
    Business::Monzo::Exception->throw(
        message => 'Boo!'
    );
}
catch {
    isa_ok( $_,'Business::Monzo::Exception' );
    is( $_->message,'Boo!','Try::Tiny catches exceptions' );
};

done_testing();

# vim: ts=4:sw=4:et



( run in 0.462 second using v1.01-cache-2.11-cpan-05444aca049 )