Group
Extension

Matches 10

Business-GoCardless ( L/LE/LEEJO/Business-GoCardless-0.44.tar.gz, LEEJO, 2024; MetaCPAN )
Business-GoCardless/README.pod ( view source; MetaCPAN )
 ) = @_;

    return Business::GoCardless::Webhook->new(
        client => $self->client,
        json   => $data,
    );
}

sub _generic_find_obj {
    my ( $self,$id,$class,$sub_key ) = @_;
    $cla
Business-GoCardless ( L/LE/LEEJO/Business-GoCardless-0.44.tar.gz, LEEJO, 2024; MetaCPAN )
Business-GoCardless/lib/Business/GoCardless/Webhook/V2.pm ( view source; MetaCPAN )
GoCardless::Utils';

use JSON ();
use Business::GoCardless::Client;
use Business::GoCardless::Exception;
use Business::GoCardless::Webhook::Event;

=head1 ATTRIBUTES

    json
    signature
    has_le

    }

=head2 json

Allows you to set the json data sent to you in the webhook:

    $Webhook->json( $json_data )

Will throw a L<Business::GoCardless::Exception> exception if the json fails to
parse

has json => (
	is       => 'rw',
    required => 1,
    trigger  => sub {
        my ( $self,$json ) = @_;

        # defensive decoding
		my $params;
		eval { $params = JSON->new->decode( $json ) };
Business-GoCardless ( L/LE/LEEJO/Business-GoCardless-0.44.tar.gz, LEEJO, 2024; MetaCPAN )
Business-GoCardless/lib/Business/GoCardless/Webhook.pm ( view source; MetaCPAN )
ngs;

use Moo;
extends 'Business::GoCardless::Resource';
with 'Business::GoCardless::Utils';

use JSON ();
use Business::GoCardless::Exception;

=head1 ATTRIBUTES

    resource_type
    action

=cut

 webhook

=head2 json

Allows you to set the json data sent to you in the webhook:

	$Webhook->json( $json_data )

Will throw a L<Business::GoCardless::Exception> exception if the json fails to
parse 

has json => (
	is       => 'rw',
    required => 1,
    trigger  => sub {
        my ( $self,$json ) = @_;

        # defensive decoding
		my $params;
		eval { $params = JSON->new->decode( $json ) };
Business-GoCardless ( L/LE/LEEJO/Business-GoCardless-0.44.tar.gz, LEEJO, 2024; MetaCPAN )
Business-GoCardless/lib/Business/GoCardless/Merchant.pm ( view source; MetaCPAN )
> $class,
        client  => $self->client,
        links   => $links,
        info    => $info ? JSON->new->decode( $info ) : {},
        objects => \@objects,
    );
}

=head1 AUTHOR

Lee Johnson - 
Business-GoCardless ( L/LE/LEEJO/Business-GoCardless-0.44.tar.gz, LEEJO, 2024; MetaCPAN )
Business-GoCardless/lib/Business/GoCardless/Resource.pm ( view source; MetaCPAN )
ut extend it instead.

=cut

use strict;
use warnings;

use Moo;
use Carp qw/ carp confess /;
use JSON ();

=head1 ATTRIBUTES

=head2 endpoint

The gocardless API endpoint that corresponds to the reso
 the object.

    my %data = $Bill->to_hash;

=head2 to_json

Returns a json string representation of the object.

    my $json = $Bill->to_json;

=cut

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

    my %h
ash = %{ $self };
    delete( $hash{client} );
    return %hash;
}

sub to_json {
    my ( $self ) = @_;
    return JSON->new->canonical->encode( { $self->to_hash } );
}

=head1 AUTHOR

Lee Johnson - 
Business-GoCardless ( L/LE/LEEJO/Business-GoCardless-0.44.tar.gz, LEEJO, 2024; MetaCPAN )
Business-GoCardless/lib/Business/GoCardless/Client.pm ( view source; MetaCPAN )
onfess /;
use POSIX qw/ strftime /;
use MIME::Base64 qw/ encode_base64 /;
use LWP::UserAgent;
use JSON ();

=head1 ATTRIBUTES

=head2 token

Your gocardless API token, this attribute is required.

=he
eq->header( 'Authorization' => "Basic $credentials" );
    $req->header( 'Accept' => 'application/json' );

    $req->content_type( 'application/x-www-form-urlencoded' );
    $req->content( $self->nor
header( 'Authorization' => "Bearer " . $self->token );
    $req->header( 'Accept' => 'application/json' );

    if ( $self->api_version > 1 ) {
        # pegged to a specific version for this library 
Business-GoCardless ( L/LE/LEEJO/Business-GoCardless-0.44.tar.gz, LEEJO, 2024; MetaCPAN )
Business-GoCardless/lib/Business/GoCardless/Exception.pm ( view source; MetaCPAN )
ut

use strict;
use warnings;

use Moo;
use JSON ();
use Carp qw/ cluck /;

with 'Throwable';

=head1 ATTRIBUTES

=head2 message

The error message, if JSON is passed this will be coerced to a string.
code.

=head2 response

The error response, generally the HTTP response.

=cut

# plain string or JSON
has message => (
    is       => 'ro',
    required => 1,
    coerce   => sub {
        my ( $mes
       # defensive decoding
            eval { $message = JSON->new->decode( $message ) };
            $@ && do { return "Failed to parse JSON response ($message): $@"; };

            if ( ref( $mess
Business-GoCardless ( L/LE/LEEJO/Business-GoCardless-0.44.tar.gz, LEEJO, 2024; MetaCPAN )
Business-GoCardless/lib/Business/GoCardless/Paginator.pm ( view source; MetaCPAN )
 a list.

=cut

use strict;
use warnings;

use Moo;
extends 'Business::GoCardless::Resource';
use JSON ();

use Business::GoCardless::Bill;
use Business::GoCardless::PreAuthorization;
use Business::Go
            # defensive decoding
            eval { $info = JSON->new->decode( $info ) };
            $@ && do { return "Failed to parse JSON response ($info): $@"; };
        }
        return $info;
Business-GoCardless ( L/LE/LEEJO/Business-GoCardless-0.44.tar.gz, LEEJO, 2024; MetaCPAN )
Business-GoCardless/lib/Business/GoCardless/Pro.pm ( view source; MetaCPAN )
ts( %filter );

    # on any resource object:
    my %data = $Payment->to_hash;
    my $json = $Payment->to_json;

=head1 PAGINATION

Any methods marked as B<pager> have a dual interface, when called 
ect from the data sent to you via a
GoCardless webhook:

    my $Webhook = $GoCardless->webhook( $json_data,$signature );

Note that GoCardless may continue to send old style webhooks even after you h
    => $self->client,
        json       => $data,
        # load ordering handled by setting _signature rather than signature
        # signature will be set in the json trigger
        _signature =>
Business-GoCardless ( L/LE/LEEJO/Business-GoCardless-0.44.tar.gz, LEEJO, 2024; MetaCPAN )
Business-GoCardless/lib/Business/GoCardless.pm ( view source; MetaCPAN )
 ) = @_;

    return Business::GoCardless::Webhook->new(
        client => $self->client,
        json   => $data,
    );
}

sub _generic_find_obj {
    my ( $self,$id,$class,$sub_key ) = @_;
    $cla

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