Group
Extension

Matches 4

Business-Monzo ( L/LE/LEEJO/Business-Monzo-0.13.tar.gz, LEEJO, 2024; MetaCPAN )
Business-Monzo/monzo_emulator.pl ( view source; MetaCPAN )
#!perl

use strict;
use warnings;

use Mojolicious::Lite;
use Mojo::JSON;

$ENV{MOJO_LOG_LEVEL} = 'debug';

plugin 'OAuth2::Server' => {
    access_token_ttl   => 21600,
    authorize_route    => '/',
  post '/ping/whoami' => sub {
        my ( $c ) = @_;

        $c->render( json => {
            authenticated => Mojo::JSON::true,
            client_id     => $c->oauth->{client},
            user_
,
        } );

    };

    get '/accounts' => sub {
        my ( $c ) = @_;

        $c->render( json => {
            accounts => [
                {
                    id          => "acc_00009237
Business-Monzo ( L/LE/LEEJO/Business-Monzo-0.13.tar.gz, LEEJO, 2024; MetaCPAN )
Business-Monzo/lib/Business/Monzo/Exception.pm ( view source; MetaCPAN )
ta to a file as it may contain
sensitive information such as API key(s).

=cut

# plain string or JSON
has message => (
    is       => 'ro',
    required => 1,
    coerce   => sub {
        my ( $mes
Business-Monzo ( L/LE/LEEJO/Business-Monzo-0.13.tar.gz, LEEJO, 2024; MetaCPAN )
Business-Monzo/lib/Business/Monzo/Client.pm ( view source; MetaCPAN )
nzo::Transaction;
use Business::Monzo::Account;

use Data::Dumper;
use Mojo::UserAgent;
use Mojo::JSON;
use Carp qw/ carp /;

=head1 ATTRIBUTES

=head2 token

Your Monzo access token, this is required
 = (
        'Authorization' => "Bearer " . $self->token,
        'Accept'        => 'application/json',
    );

    if ( $method =~ /POST|PUT|PATCH/i ) {
        $tx = $self->_ua->$method( $path => {
    if ( $res->is_success ) {
        carp( "RES: " . Dumper $res->json )
            if $ENV{MONZO_DEBUG};

        return $res->json;
    }
    else {
        my $error = $res->message;

        car
Business-Monzo ( L/LE/LEEJO/Business-Monzo-0.13.tar.gz, LEEJO, 2024; MetaCPAN )
Business-Monzo/lib/Business/Monzo/Resource.pm ( view source; MetaCPAN )
nstead.

=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 
ash;
}

=head2 as_json

Returns a json string representation of the object.

    my $json = $transaction->as_json;

=cut

sub as_json {
    my ( $self ) = @_;

    return encode_json( { $self->to_hash
 } );
}

# for JSON encoding modules (convert_blessed)
sub TO_JSON { shift->to_hash; }

=head2 get

Returns a new instance of the object populated with the attributes having called
the API

    my $po

Powered by Groonga
Maintained by Kenichi Ishigaki <ishigaki@cpan.org>. If you find anything, submit it on GitHub.