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 PayProp::API::Public::Client
.
METHODS
list_p(\%args)
Issues a HTTP GET
request to PayProp API /entity/invoice
endpoint. It takes an optional HASHREF
of query and path parameters.
See "QUERY PARAMETERS" and "PATH PARAMETERS" for a list of expected parameters.
$Invoice
->list_p({ params => {...}, path_params => {...} })
->then( sub {
my ( $ResponseInvoice ) = @_;
...;
} )
->catch( sub {
my ( $Exception ) = @_;
...;
} )
->wait
;
Returns PayProp::API::Public::Client::Response::Entity::Invoice on success or PayProp::API::Public::Client::Exception::Response on error.
create_p(\%args)
Issues a HTTP POST
request to PayProp API /entity/invoice
endpoint.
See "REQUEST BODY FIELDS" for a list of expected request body fields.
$Invoice
->create_p({ content => {...} })
->then( sub {
my ( $ResponseInvoice ) = @_;
...;
} )
->catch( sub {
my ( $Exception ) = @_;
...;
} )
->wait
;
Returns PayProp::API::Public::Client::Response::Entity::Invoice on success or PayProp::API::Public::Client::Exception::Response on error.
update_p(\%args)
Issues a HTTP PUT
request to PayProp API /entity/invoice
endpoint.
See "REQUEST BODY FIELDS" for a list of expected request body fields, "QUERY PARAMETERS" and "PATH PARAMETERS" for a list of expected parameters.
$Invoice
->update_p({ params => {...}, path_params => {...}, content => {...} })
->then( sub {
my ( $ResponseInvoice ) = @_;
...;
} )
->catch( sub {
my ( $Exception ) = @_;
...;
} )
->wait
;
Returns PayProp::API::Public::Client::Response::Entity::Invoice on success or PayProp::API::Public::Client::Exception::Response on error.
REQUEST BODY FIELDS
amount
number Invoice amount. required
category_id
string [10..32] characters /^[a-zA-Z0-9]+$/
Invoice category external ID. required
customer_id
string [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 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 external_id
along with your customer_id
.
description
string <= 255 characters
Invoice description.
end_date
date Invoice end date.
frequency
string Enum: "O"
"W"
"2W"
"4W"
"M"
"2M"
"Q"
"6M"
"A"
Invoice frequency. required
has_invoice_period
boolean Available for reoccurring invoices
has_tax
boolean
is_direct_debit
boolean
payment_day
number [1..31]
required
property_id
string [1..32] characters /^[a-zA-Z0-9]+$/
External ID of invoice property. required
start_date
date Invoice start date.
tenant_id
string [1..32] characters /^[a-zA-Z0-9]+$/
External ID of invoice tenant. required
QUERY PARAMETERS
is_customer_id
boolean Lookup entity based on given customer ID by overriding route external_id
.
PATH PARAMETERS
external_id
string [1..32] characters /^[a-zA-Z0-9]+$/
External ID of invoice. required
for "list_p(\%arsgs)" and "update_p(\%args)".
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: