NAME

PayProp::API::Public::Client::Request::Export::Beneficiaries - Beneficiary export module.

SYNOPSIS

my $Export = $Client->export;
my $beneficiaries_export = $Export->beneficiaries;

$beneficiaries_export
	->list_p({...})
	->then( sub {
		my ( $beneficiaries ) = @_;
		...;
	} )
	->wait
;

DESCRIPTION

Implementation for retrieving beneficiary export results via API. This module is intended to be accessed via instance of PayProp::API::Public::Client.

ATTRIBUTES

PayProp::API::Public::Client::Request::Export::Beneficiaries implements the following attributes.

url

An abstraction of the API endpoint receiving the request(s). It is dependant on the API_DOMAIN.com given.

METHODS

list_p(\%args)

Issues a HTTP GET request to PayProp API /export/beneficiaries endpoint. It takes an optional hashref of query parameters. See "QUERY PARAMETERS" for a list of available parameters.

$beneficiaries_export
	->list_p({ params => {...} })
	->then( sub {
		my ( \@beneficiaries ) = @_;
		...;
	} )
	->wait
;

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

QUERY PARAMETERS

rows

integer Restrict rows returned.

$beneficiaries_export
	->list_p({ params => { rows => 1 } })
	->then( sub {
		my ( \@beneficiaries ) = @_;
		...;
	} )
	->wait
;

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

page

integer Return given page number.

$beneficiaries_export
	->list_p({ params => { page => 1 } })
	->then( sub {
		my ( \@beneficiaries ) = @_;
		...;
	} )
	->wait
;

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

owners

boolean Return only Beneficiaries that are owners.

$beneficiaries_export
	->list_p({ params => { owners => true } })
	->then( sub {
		my ( \@beneficiaries ) = @_;
		...;
	} )
	->wait
;

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

search_by

Array of string Items Enum: business_name, first_name, last_name, email_address

To be used with "search_value".

$beneficiaries_export
	->list_p(
		{
			params => {
				search_value => 'Mike',
				search_by => ['first_name', 'business_name'],
			},
		}
	)
	->then( sub {
		my ( \@beneficiaries ) = @_;
		...;
	} )
	->wait
;

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

search_value

string [3..50] characters To be used with "search_by".

$beneficiaries_export
	->list_p(
		{
			params => {
				search_by => [...],
				search_value => 'Mike',
			},
		}
	)
	->then( sub {
		my ( \@beneficiaries ) = @_;
		...;
	} )
	->wait
;

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

external_id

string <= 32 characters External ID of beneficiary.

$beneficiaries_export
	->list_p({ params => { external_id => 'ABCD1234' } })
	->then( sub {
		my ( \@beneficiaries ) = @_;
		...;
	} )
	->wait
;

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

bank_account_number

string <= 32 characters /^[a-zA-Z0-9]+$/ Filter beneficiaries by bank account number.

$beneficiaries_export
	->list_p({ params => { bank_account_number => 'ab123' } })
	->then( sub {
		my ( \@beneficiaries ) = @_;
		...;
	} )
	->wait
;

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

bank_branch_code

string <= 32 characters /^[a-zA-Z0-9]+$/ Filter beneficiaries by bank branch code.

$beneficiaries_export
	->list_p({ params => { bank_branch_code => 'ab123' } })
	->then( sub {
		my ( \@beneficiaries ) = @_;
		...;
	} )
	->wait
;

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

is_archived

boolean Return only beneficiaries that have been archived. Defaults to false.

$beneficiaries_export
	->list_p({ params => { is_archived => true } })
	->then( sub {
		my ( \@beneficiaries ) = @_;
		...;
	} )
	->wait
;

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

customer_id

string <= 50 characters Lookup entities based on customer_id.

$beneficiaries_export
	->list_p({ params => { customer_id => 'ABC123' } })
	->then( sub {
		my ( \@beneficiaries ) = @_;
		...;
	} )
	->wait
;

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

customer_reference

string <= 50 characters Customer reference of beneficiary.

$beneficiaries_export
	->list_p({ params => { customer_reference => 'ABC123' } })
	->then( sub {
		my ( \@beneficiaries ) = @_;
		...;
	} )
	->wait
;

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

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