- Timestamp:
- 11 Mar 2015, 09:17:36 (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.ikoba/branches/uli-payments/src/waeup/ikoba/payments/interfaces.py
r12725 r12726 163 163 164 164 165 class IPaymentItem(Interface): 166 """Something to sell. 167 """ 168 item_id = schema.TextLine( 169 title=u'Payment Item ID', 170 required=True, 171 ) 172 173 title = schema.TextLine( 174 title=u'Title', 175 description=u'A short title of the good sold.', 176 required=True, 177 default=u'Unnamed' 178 ) 179 180 amount = schema.Decimal( 181 title=u'Amount', 182 description=u'Total amount, includung any taxes, fees, etc.', 183 required=True, 184 default=decimal.Decimal('0.00'), 185 ) 186 187 165 188 class IPayable(Interface): 166 189 """Something that can be payed. … … 169 192 objects into something with a standarized interfaces for use with 170 193 payments. 194 195 While currency is important to tell about the amount currency, the 196 total amount is computed on-demand from payment items. 171 197 """ 172 198 payable_id = schema.TextLine( … … 186 212 ) 187 213 188 189 class IPaymentItem(Interface): 190 """Something to sell. 191 """ 192 item_id = schema.TextLine( 193 title=u'Payment Item ID', 194 required=True, 195 ) 196 197 title = schema.TextLine( 198 title=u'Title', 199 description=u'A short title of the good sold.', 200 required=True, 201 default=u'Unnamed' 202 ) 203 204 amount = schema.Decimal( 205 title=u'Amount', 206 description=u'Total amount, includung any taxes, fees, etc.', 207 required=True, 208 default=decimal.Decimal('0.00'), 214 currency = schema.Choice( 215 title=u'Currency', 216 source=ISO_4217_CURRENCIES_VOCAB, 217 required=True, 218 default='USD', 219 readonly=True, 220 ) 221 222 payment_items = schema.Tuple( 223 title=u'Tuple of IPaymentItems.', 224 value_type=schema.Object( 225 title=u'Payment Item', 226 schema=IPaymentItem, 227 ), 228 required=False, 229 default=(), 230 readonly=True, 209 231 ) 210 232
Note: See TracChangeset for help on using the changeset viewer.