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::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 PayProp::API::Public::Client.

ATTRIBUTES

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(\%args)

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

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

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

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

QUERY PARAMETERS

rows

integer Restrict rows returned.

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

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

page

integer Return given page number.

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

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

search_by

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

To be used with "search_value".

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

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

search_value

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

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

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

external_id

string <= 32 characters External ID of tenant.

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

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

property_id

string <= 50 characters External ID of property.

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

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

is_archived

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

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

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

customer_id

string <= 50 characters Lookup entities based on customer_id.

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

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

customer_reference

string <= 50 characters Customer reference of tenant.

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

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

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