# -*- coding: utf-8 -*- # $Id$ # # Copyright (C) 2014 Uli Fouquet & Henrik Bettermann # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA # from waeup.ikoba.interfaces import MessageFactory as _ from waeup.ikoba.interfaces import SimpleIkobaVocabulary #: The currencies accepted by PayPal. #: The entries represent: #: ( title (i18nized), domestic_only, decimals_allowed) #: #: If `domestic_only` is True, then this currency is supported as a #: payment currency and a currency balance for in-country PayPal #: accounts only. #: #: If `decimals_allowed` is *not* True, then you cannot pass amounts #: with decimals. #: #: Status of 2014-12-11 CURRENCIES = { 'AUD': (_(u'Australian dollar'), False, True), 'BRL': (_(u'Brazilian real'), True, True), 'CAD': (_(u'Canadian dollar'), False, True), 'CHF': (_(u'Swiss franc'), False, True), 'CZK': (_(u'Czech koruna'), False, True), 'DKK': (_(u'Danish krone'), False, True), 'EUR': (_(u'Euro'), False, True), 'GBP': (_(u'Pound sterling'), False, True), 'HKD': (_(u'Hong Kong dollar'), False, True), 'HUF': (_(u'Hungarian forint'), False, True), 'ILS': (_(u'Israeli new shekel'), False, True), 'JPY': (_(u'Japanese yen'), False, False), 'MXN': (_(u'Mexican peso'), False, True), 'MYR': (_(u'Malaysian ringgit'), True, True), 'NOK': (_(u'Norwegian krone'), False, True), 'NZD': (_(u'New Zealand dollar'), False, True), 'PHP': (_(u'Philippine peso'), False, True), 'PLN': (_(u'Polish złoty'), False, True), 'SEK': (_(u'Swedish krona'), False, True), 'SGD': (_(u'Singapore dollar'), False, True), 'THB': (_(u'Thai baht'), False, True), 'TRY': (_(u'Turkish lira'), True, True), 'TWD': (_(u'New Taiwan dollar'), False, False), 'USD': (_(u'United States dollar'), False, True) } #: A vocabulary of paypal supported currencies CURRENCIES_VOCAB = SimpleIkobaVocabulary( *[(val[0], key) for key, val in CURRENCIES.items()])