The London Perl and Raku Workshop takes place on 26th Oct 2024. If your company depends on Perl, please consider sponsoring and/or attending.

NAME

PayProp::API::Public::Client::Request::Tags - Tags module.

SYNOPSIS

        my $Tags = PayProp::API::Public::Client::Request::Tags->new(
                domain => 'API_DOMAIN.com',                                         # Required: API domain.
                authorization => C<PayProp::API::Public::Client::Authorization::*>, # Required: Instance of an authorization module.
        );

DESCRIPTION

Implementation for creating, retrieving, updating and deleting (CRUD) tags via API. This module is intended to be accessed via instance of PayProp::API::Public::Client.

METHODS

list_p(\%args)

Issues a HTTP GET request to PayProp API /tags endpoint. It takes an optional HASHREF of query parameters.

See "QUERY PARAMETERS" for a list of expected parameters.

        $Tags
                ->list_p({ params => {...} })
                ->then( sub {
                        my ( \@tags ) = @_;
                        ...;
                } )
                ->catch( sub {
                        my ( $Exception ) = @_;
                        ...;
                } )
                ->wait
        ;

Returns a list of PayProp::API::Public::Client::Response::Tag objects on success or PayProp::API::Public::Client::Exception::Response on error.

create_p(\%args)

Issues a HTTP POST request to PayProp API /tags endpoint.

See "REQUEST BODY FIELDS" for a list of expected request body fields.

        $Tags
                ->create_p({ content => {...} })
                ->then( sub {
                        my ( $ResponseTag ) = @_;
                        ...;
                } )
                ->catch( sub {
                        my ( $Exception ) = @_;
                        ...;
                } )
                ->wait
        ;

Returns PayProp::API::Public::Client::Response::Tag on success or PayProp::API::Public::Client::Exception::Response on error.

Issues a HTTP POST request to PayProp API /tags endpoint.

See "REQUEST BODY FIELDS" for a list of expected request body fields and "PATH PARAMETERS" for a list of expected parameters.

        $Tags
                ->link_entities_p({ path_params => { ... }, content => {...} })
                ->then( sub {
                        my ( \@tags ) = @_;
                        ...;
                } )
                ->catch( sub {
                        my ( $Exception ) = @_;
                        ...;
                } )
                ->wait
        ;

Returns a list of PayProp::API::Public::Client::Response::Tag objects on success or PayProp::API::Public::Client::Exception::Response on error.

list_tagged_entities_p(\%args)

Issues a HTTP GET request to PayProp API /tags endpoint.

See "QUERY PARAMETERS" and "PATH PARAMETERS" for a list of expected parameters.

        $Tags
                ->link_entities_p({ params => { ... }, path_params => {...} })
                ->then( sub {
                        my ( \@tags ) = @_;
                        ...;
                } )
                ->catch( sub {
                        my ( $Exception ) = @_;
                        ...;
                } )
                ->wait
        ;

Returns a list of PayProp::API::Public::Client::Response::Tag objects on success or PayProp::API::Public::Client::Exception::Response on error.

update_p(\%args)

Issues a HTTP PUT request to PayProp API /tags endpoint.

See "REQUEST BODY FIELDS" for a list of expected request body fields and "PATH PARAMETERS" for a list of expected parameters.

        $Tags
                ->update_p({ path_params => {...}, content => {...} })
                ->then( sub {
                        my ( $ResponseTag ) = @_;
                        ...;
                } )
                ->catch( sub {
                        my ( $Exception ) = @_;
                        ...;
                } )
                ->wait
        ;

Returns a PayProp::API::Public::Client::Response::Tag object on success or PayProp::API::Public::Client::Exception::Response on error.

delete_p(\%args)

Issues a HTTP DELETE request to PayProp API /tags endpoint.

See "PATH PARAMETERS" for a list of expected parameters.

        $Tags
                ->delete_p({ path_params => {...} })
                ->then( sub {
                        my ( $json_response ) = @_;
                        ...;
                } )
                ->catch( sub {
                        my ( $Exception ) = @_;
                        ...;
                } )
                ->wait
        ;

Returns a JSON response with a message key on success or PayProp::API::Public::Client::Exception::Response on error.

Issues a HTTP DELETE request to PayProp API /tags endpoint.

See "QUERY PARAMETERS" and "PATH PARAMETERS" for a list of expected parameters.

        $Tags
                ->delete_entity_link_p({ params => { ... }, path_params => {...} })
                ->then( sub {
                        my ( $json_response ) = @_;
                        ...;
                } )
                ->catch( sub {
                        my ( $Exception ) = @_;
                        ...;
                } )
                ->wait
        ;

Returns a JSON response with a message key on success or PayProp::API::Public::Client::Exception::Response on error.

REQUEST BODY FIELDS

name

string [1..50] Tag name.

QUERY PARAMETERS

name

string [1..50] Tag name.

external_id

string [1..32] characters /^[a-zA-Z0-9]+$/ Tag external ID.

entity_type

Enum: "property" "beneficiary" "property" Tagged entity type.

entity_id

string [1..32] characters /^[a-zA-Z0-9]+$/ Tagged entity's external ID.

PATH PARAMETERS

external_id

string [1..32] characters /^[a-zA-Z0-9]+$/ External ID of tag.

AUTHOR

Yanga Kandeni <yangak@cpan.org>

Valters Skrupskis <malishew@cpan.org>

COPYRIGHT

Copyright 2023- PayProp

LICENSE

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

If you would like to contribute documentation or file a bug report then please raise an issue / pull request:

https://github.com/Humanstate/api-client-public-module