NAME
PayProp::API::Public::Client::Request::Entity::Invoice - Invoice entity module.
SYNOPSIS
my $Invoice = PayProp::API::Public::Client::Request::Entity::Invoice->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 and updating (CRU) invoice entity results via API.
This module is intended to be accessed via instance of C<PayProp::API::Public::Client>.
METHODS
list_p(\%params)
Issues a C<HTTP GET> request to PayProp API C</entity/invoice> endpoint. It takes an optional C<HASHREF> of parameters.
See L</"QUERY PARAMETERS"> for a list of expected parameters.
$Invoice
->list_p({ ... })
->then( sub {
my ( $ResponseInvoice ) = @_;
...;
See L<PayProp::API::Public::Client::Response::Entity::Invoice>.
} )
->catch( sub {
my ( $Exception ) = @_;
...;
See L<PayProp::API::Public::Client::Exception::Response>.
} )
->wait
;
create_p(\%content)
Issues a C<HTTP POST> request to PayProp API C</entity/invoice> endpoint.
See L</"REQUEST BODY FIELDS"> for a list of expected request body fields.
$Invoice
->create_p({ ... })
->then( sub {
my ( $ResponseInvoice ) = @_;
...;
See L<PayProp::API::Public::Client::Response::Entity::Invoice>.
} )
->catch( sub {
my ( $Exception ) = @_;
...;
See L<PayProp::API::Public::Client::Exception::Response>.
} )
->wait
;
update_p(\%params, \%content)
Issues a C<HTTP PUT> request to PayProp API C</entity/invoice> endpoint.
See L</"REQUEST BODY FIELDS"> for a list of expected request body fields, L</"QUERY PARAMETERS"> and L</"PATH PARAMETERS"> for a list of expected parameters.
$Invoice
->update_p({ ... })
-->then( sub {
my ( $ResponseInvoice ) = @_;
...;
See L<PayProp::API::Public::Client::Response::Entity::Invoice>.
} )
->catch( sub {
my ( $Exception ) = @_;
...;
See L<PayProp::API::Public::Client::Exception::Response>.
} )
->wait
;
REQUEST BODY FIELDS
amount
B<number>
Invoice amount. C<required>
category_id
B<string> C<[10..32] characters /^[a-zA-Z0-9]+$/>
Invoice category external ID. C<required>
customer_id
B<string> C<[1..50] characters /^[a-zA-Z0-9]+$/>
The customer ID is a unique, case-sensitive value per API consumer. The value can be used to retrieve and update the entity. Providing C<null> on update will remove the customer ID associated with the entity. Please note that currently, this functionality is marked as experimental; we strongly recommend keeping track of PayProp entity C<external_id> along with your C<customer_id>.
description
B<string> C<<= 255 characters>
Invoice description.
end_date
B<date>
Invoice end date.
frequency
B<string>
Enum: "O" "W" "2W" "4W" "M" "2M" "Q" "6M" "A"
Invoice frequency. C<required>
has_invoice_period
B<boolean>
Available for reoccurring invoices
has_tax
B<boolean>
is_direct_debit
B<boolean>
payment_day
B<number>
C<[1..31]> C<required>
property_id
B<string> C<[1..32] characters /^[a-zA-Z0-9]+$/>
External ID of invoice property. C<required>
start_date
B<date>
Invoice start date.
tenant_id
B<string> C<[1..32] characters /^[a-zA-Z0-9]+$/>
External ID of invoice tenant. C<required>
QUERY PARAMETERS
is_customer_id
B<boolean>
Lookup entity based on given customer ID by overriding route C<external_id>.
PATH PARAMETERS
external_id
B<string> C<[1..32] characters /^[a-zA-Z0-9]+$/>
External ID of invoice. C<required> for L</"list_p(\%params)"> and L</"update_p(\%params, \%content)">.
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>