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

Regru::API::Bill - REG.API v2 invoice management

VERSION

version 0.049

DESCRIPTION

REG.API invoices management section.

ATTRIBUTES

namespace

Always returns the name of category: bill. For internal uses only.

REG.API METHODS

nop

For testing purposes. Scope: everyone. Typical usage:

$resp = $client->bill->nop(
    bill_id => 12345,
);

# or
$resp = $client->bill->nop(
    bills => [ 12345, 12346 ],
);

Returns payment status for requested invoice or error code (in some cases).

More info at Invoice management: nop.

get_not_payed

Obtains a list of unpaid invoices. Scope: clients. Typical usage:

$resp = $client->bill->get_not_payed(
    limit => 10, offset => 40,
);

Returns a list of unpaind invoices if any.

More info at Invoice management: get_not_payed.

get_for_period

Obtains a list of invoices for the defined period. Scope: partners. Typical usage:

$resp = $client->bill->get_for_period(
    limit      => 5,
    start_date => '1917-10-26',
    end_date   => '1917-10-07',
);

Returns a list of invoices at given period if any.

More info at Invoice management: get_for_period

change_pay_type

This one allows to change payment method for selected invoice(s). Scope: clients. Typical usage:

$resp = $client->bill->change_pay_type(
    bills    => [ 12345, 12346 ],
    pay_type => 'prepay',
    currency => 'USD',
);

Returns a list of invoices with payment information and status.

More info at Invoice management: change_pay_type

delete

Allows to delete unpaid invoices. Scope: clients. Typical usage:

$resp = $client->bill->delete(
    bills => [ 12345, 12346, 12347 ],
);

Returns a list of invoices which requested to delete and its status.

More info at Invoice management: delete

CAVEATS

Bear in mind that might be errors during API requests. You should always check API call status. See Common error codes.

SEE ALSO

Regru::API

Regru::API::Role::Client

REG.API Invoice management

REG.API Common error codes

BUGS

Please report any bugs or feature requests on the bugtracker website https://github.com/regru/regru-api-perl/issues

When submitting a bug or request, please include a test-file or a patch to an existing test-file that illustrates the bug or desired feature.

AUTHORS

  • Polina Shubina <shubina@reg.ru>

  • Anton Gerasimov <a.gerasimov@reg.ru>

COPYRIGHT AND LICENSE

This software is copyright (c) 2013 by REG.RU LLC.

This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.