NAME

PayProp::API::Public::Client::Request::Export::Tenants - Tenant export module.

SYNOPSIS

my $Export = $Client->export;
my $tenants_export = $Export->tenants;

$tenants_export
	->list_p({...})
	->then( sub {
		my ( \@tenants ) = @_;
		...;

		See L<PayProp::API::Public::Client::Response::Export::Tenant>.
	} )
	->wait
;

DESCRIPTION

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

ATTRIBUTES

C<PayProp::API::Public::Client::Request::Export::Tenants> 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(\%query_params)

Issues a C<HTTP GET> request to PayProp API C</export/tenants> endpoint. It takes an optional C<HASHREF> of query parameters.

See L</"QUERY PARAMETERS"> for a list of available parameters.

QUERY PARAMETERS

rows

B<integer>
Restrict rows returned.

$tenants_export
	->list_p({ rows => 1 })
	->then( sub {
		my ( \@tenants ) = @_;
		...;

		See L<PayProp::API::Public::Client::Response::Export::Tenant>.
	} )
	->wait
;

page

B<integer>
Return given page number.

$tenants_export
	->list_p({ page => 1 })
	->then( sub {
		my ( \@tenants ) = @_;
		...;

		See L<PayProp::API::Public::Client::Response::Export::Tenant>.
	} )
	->wait
;

search_by

B<Array of string>
Items Enum: C<business_name>, C<first_name>, C<last_name>, C<email_address>

To be used with L</"search_value">.

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

		See L<PayProp::API::Public::Client::Response::Export::Tenant>.
	} )
	->wait
;

search_value

B<string> C<[3..50] characters>
To be used with L</"search_by">.

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

		See L<PayProp::API::Public::Client::Response::Export::Tenant>.
	} )
	->wait
;

external_id

B<string> C<<= 32 characters>
External ID of tenant.

$tenants_export
	->list_p({ external_id => 'ABCD1234' })
	->then( sub {
		my ( \@tenants ) = @_;
		...;

		See L<PayProp::API::Public::Client::Response::Export::Tenant>.
	} )
	->wait
;

property_id

B<string> C<<= 50 characters>
External ID of property.

$tenants_export
	->list_p({ property_id => 'ABCD1234' })
	->then( sub {
		my ( \@tenants ) = @_;
		...;

		See L<PayProp::API::Public::Client::Response::Export::Tenant>.
	} )
	->wait
;

is_archived

B<boolean>
Return only tenants that have been archived. Defaults to C<false>.

$tenants_export
	->list_p({ is_archived => true })
	->then( sub {
		my ( \@tenants ) = @_;
		...;

		See L<PayProp::API::Public::Client::Response::Export::Tenant>.
	} )
	->wait
;

customer_id

B<string> C<<= 50 characters>
Lookup entities based on C<customer_id>.

$tenants_export
	->list_p({ customer_id => 'ABC123' })
	->then( sub {
		my ( \@tenants ) = @_;
		...;

		See L<PayProp::API::Public::Client::Response::Export::Tenant>.
	} )
	->wait
;

customer_reference

B<string> C<<= 50 characters>
Customer reference of tenant.

$tenants_export
	->list_p({ customer_reference => 'ABC123' })
	->then( sub {
		my ( \@tenants ) = @_;
		...;

		See L<PayProp::API::Public::Client::Response::Export::Tenant>.
	} )
	->wait
;

AUTHOR

Yanga Kandeni E<lt>yangak@cpan.orgE<gt>

Valters Skrupskis E<lt>malishew@cpan.orgE<gt>

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:

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