API-MailboxOrg

 view release on metacpan or  search on metacpan

lib/API/MailboxOrg/API/Invoice.pm  view on Meta::CPAN

package API::MailboxOrg::API::Invoice;

# ABSTRACT: MailboxOrg::API::Invoice

# ---
# This class is auto-generated by bin/get_mailbox_api.pl
# ---

use v5.24;

use strict;
use warnings;

use Moo;
use Types::Standard qw(Enum Str Int InstanceOf ArrayRef);
use API::MailboxOrg::Types qw(HashRefRestricted Boolean);
use Params::ValidationCompiler qw(validation_for);

extends 'API::MailboxOrg::APIBase';

with 'MooX::Singleton';

use feature 'signatures';
no warnings 'experimental::signatures';

our $VERSION = '1.0.2'; # VERSION

my %validators = (
    'get' => validation_for(
        params => {
            token => { type => Str, optional => 0 },

        },
    ),
    'list' => validation_for(
        params => {
            account => { type => Str, optional => 0 },

        },
    ),

);


sub get ($self, %params) {
    my $validator = $validators{'get'};
    %params       = $validator->(%params) if $validator;

    my %opt = ();

    return $self->_request( 'account.invoice.get', \%params, \%opt );
}

sub list ($self, %params) {
    my $validator = $validators{'list'};
    %params       = $validator->(%params) if $validator;

    my %opt = (needs_auth => 1);

    return $self->_request( 'account.invoice.list', \%params, \%opt );
}


1;

__END__

=pod

=encoding UTF-8

=head1 NAME

API::MailboxOrg::API::Invoice - MailboxOrg::API::Invoice

=head1 VERSION

version 1.0.2

=head1 SYNOPSIS

    use API::MailboxOrg;



( run in 0.983 second using v1.01-cache-2.11-cpan-39bf76dae61 )