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

Net::API::Stripe::Number - A Number Object

SYNOPSIS

        my $num = Net::API::Stripe::Number( 2000 );
        print( $num->format_money( 0, '¥' ), "\n" );
        ## Resulting in ¥2,000

Or

        ## For France standard
        my $num = Net::API::Stripe::Number( 2000, 
        {
        thousand => '.',
        decimal => ',',
        precision => 2,
        symbol => '€',
        });
        print( $num->format_money(), "\n" );
        ## Will produce: €2.000,00

VERSION

    0.2

DESCRIPTION

This is a convenient wrapper around Number::Format object. It does not inherit, but still you can use all of the Number::Format method directly from here thanks to AUTOLOAD.

CONSTRUCTOR

new( Number, %ARG )

Given a number this creates a new Net::API::Stripe objects.

METHODS

as_string

This returns the original number

format

This calls Number::Format::format_number method passing it the original number and any extra arguments.

For details of what arguments to provide, check the Number::Format documentation.

format_money

This calls Number::Format::format_price method passing it the original number and any extra arguments.

For details of what arguments to provide, check the Number::Format documentation.

HISTORY

v0.1

Initial version

AUTHOR

Jacques Deguest <jack@deguest.jp>

SEE ALSO

Number::Format

COPYRIGHT & LICENSE

Copyright (c) 2019-2020 DEGUEST Pte. Ltd.

You can use, copy, modify and redistribute this package and associated files under the same terms as Perl itself.