[12550] | 1 | # -*- coding: utf-8 -*- |
---|
[12198] | 2 | # $Id$ |
---|
| 3 | # |
---|
| 4 | # Copyright (C) 2014 Uli Fouquet & Henrik Bettermann |
---|
| 5 | # This program is free software; you can redistribute it and/or modify |
---|
| 6 | # it under the terms of the GNU General Public License as published by |
---|
| 7 | # the Free Software Foundation; either version 2 of the License, or |
---|
| 8 | # (at your option) any later version. |
---|
| 9 | # |
---|
| 10 | # This program is distributed in the hope that it will be useful, |
---|
| 11 | # but WITHOUT ANY WARRANTY; without even the implied warranty of |
---|
| 12 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
---|
| 13 | # GNU General Public License for more details. |
---|
| 14 | # |
---|
| 15 | # You should have received a copy of the GNU General Public License |
---|
| 16 | # along with this program; if not, write to the Free Software |
---|
| 17 | # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
---|
| 18 | # |
---|
| 19 | from waeup.ikoba.interfaces import MessageFactory as _ |
---|
| 20 | from waeup.ikoba.interfaces import SimpleIkobaVocabulary |
---|
| 21 | |
---|
| 22 | #: The currencies accepted by PayPal. |
---|
| 23 | #: The entries represent: |
---|
| 24 | #: ( title (i18nized), domestic_only, decimals_allowed) |
---|
| 25 | #: |
---|
| 26 | #: If `domestic_only` is True, then this currency is supported as a |
---|
| 27 | #: payment currency and a currency balance for in-country PayPal |
---|
| 28 | #: accounts only. |
---|
| 29 | #: |
---|
| 30 | #: If `decimals_allowed` is *not* True, then you cannot pass amounts |
---|
| 31 | #: with decimals. |
---|
| 32 | #: |
---|
| 33 | #: Status of 2014-12-11 |
---|
| 34 | CURRENCIES = { |
---|
| 35 | 'AUD': (_(u'Australian dollar'), False, True), |
---|
| 36 | 'BRL': (_(u'Brazilian real'), True, True), |
---|
| 37 | 'CAD': (_(u'Canadian dollar'), False, True), |
---|
| 38 | 'CHF': (_(u'Swiss franc'), False, True), |
---|
| 39 | 'CZK': (_(u'Czech koruna'), False, True), |
---|
| 40 | 'DKK': (_(u'Danish krone'), False, True), |
---|
| 41 | 'EUR': (_(u'Euro'), False, True), |
---|
| 42 | 'GBP': (_(u'Pound sterling'), False, True), |
---|
| 43 | 'HKD': (_(u'Hong Kong dollar'), False, True), |
---|
| 44 | 'HUF': (_(u'Hungarian forint'), False, True), |
---|
| 45 | 'ILS': (_(u'Israeli new shekel'), False, True), |
---|
| 46 | 'JPY': (_(u'Japanese yen'), False, False), |
---|
| 47 | 'MXN': (_(u'Mexican peso'), False, True), |
---|
| 48 | 'MYR': (_(u'Malaysian ringgit'), True, True), |
---|
| 49 | 'NOK': (_(u'Norwegian krone'), False, True), |
---|
| 50 | 'NZD': (_(u'New Zealand dollar'), False, True), |
---|
| 51 | 'PHP': (_(u'Philippine peso'), False, True), |
---|
[12550] | 52 | 'PLN': (_(u'Polish złoty'), False, True), |
---|
[12198] | 53 | 'SEK': (_(u'Swedish krona'), False, True), |
---|
| 54 | 'SGD': (_(u'Singapore dollar'), False, True), |
---|
| 55 | 'THB': (_(u'Thai baht'), False, True), |
---|
| 56 | 'TRY': (_(u'Turkish lira'), True, True), |
---|
| 57 | 'TWD': (_(u'New Taiwan dollar'), False, False), |
---|
| 58 | 'USD': (_(u'United States dollar'), False, True) |
---|
| 59 | } |
---|
| 60 | |
---|
| 61 | |
---|
| 62 | #: A vocabulary of paypal supported currencies |
---|
| 63 | CURRENCIES_VOCAB = SimpleIkobaVocabulary( |
---|
| 64 | *[(val[0], key) for key, val in CURRENCIES.items()]) |
---|