« Business/CyberSource/Role/Currency.pm
↑ Summary
Business/CyberSource/Role/MerchantReferenceCode.pm »
| 1 | package Business::CyberSource::Role::ForeignCurrency; | ||
| 2 | 22 | ▶ | use strict; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 3 | 22 | ▶ | use warnings; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 4 | 22 | ▶ | use namespace::autoclean; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 5 | |||
| 6 | 22 | our $VERSION = '0.010008'; # VERSION | |
| 7 | |||
| 8 | 22 | ▶ | use Moose::Role; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 9 | 22 | ▶ | use MooseX::RemoteHelper; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 10 | |||
| 11 | 22 | ▶ | use MooseX::SetOnce 0.200001; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 12 | |||
| 13 | 22 | ▶ | use MooseX::Types::Locale::Currency qw( CurrencyCode ); |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 14 | 22 | ▶ | use MooseX::Types::Common::Numeric qw( PositiveOrZeroNum ); |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 15 | |||
| 16 | 22 | has foreign_currency => ( | |
| 17 | isa => CurrencyCode, | ||
| 18 | remote_name => 'foreignCurrency', | ||
| 19 | predicate => 'has_foreign_currency', | ||
| 20 | traits => ['SetOnce'], | ||
| 21 | is => 'rw', | ||
| 22 | ); | ||
| 23 | |||
| 24 | 22 | has foreign_amount => ( | |
| 25 | isa => PositiveOrZeroNum, | ||
| 26 | remote_name => 'foreignAmount', | ||
| 27 | predicate => 'has_foreign_amount', | ||
| 28 | traits => ['SetOnce'], | ||
| 29 | is => 'rw', | ||
| 30 | ); | ||
| 31 | |||
| 32 | 22 | has exchange_rate => ( | |
| 33 | isa => PositiveOrZeroNum, | ||
| 34 | remote_name => 'exchangeRate', | ||
| 35 | predicate => 'has_exchange_rate', | ||
| 36 | traits => ['SetOnce'], | ||
| 37 | is => 'rw', | ||
| 38 | ); | ||
| 39 | |||
| 40 | 22 | has exchange_rate_timestamp => ( | |
| 41 | isa => 'Str', | ||
| 42 | remote_name => 'exchangeRateTimeStamp', | ||
| 43 | predicate => 'has_exchange_rate_timestamp', | ||
| 44 | traits => ['SetOnce'], | ||
| 45 | is => 'rw', | ||
| 46 | ); | ||
| 47 | |||
| 48 | 22 | 1; | |
| 49 | |||
| 50 | # ABSTRACT: Role to apply to requests and responses that require currency | ||
| 51 | |||
| 52 | __END__ | ||