Ignore:
Timestamp:
11 Mar 2015, 17:08:34 (10 years ago)
Author:
uli
Message:

Restructure things a bit.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • main/waeup.ikoba/branches/uli-payments/src/waeup/ikoba/payments/interfaces.py

    r12726 r12734  
    2020from zope import schema
    2121from zope.component import getUtilitiesFor
    22 from zope.container.interfaces import IContainer
    23 from zope.container.constraints import contains
    2422from zope.interface import Interface, Attribute
    2523from waeup.ikoba.interfaces import (
     
    8886        )
    8987
    90     def create_payment(payer, payment_item_list, payee):
     88    def create_payment(payer, payable, payee):
    9189        """Create a payment.
    9290
    9391        For all parameters we expect an object, that implements
    94         `IPayer`, `IPaymentItem`, or `IPayee` respectively. If not,
     92        `IPayer`, `IPayable`, or `IPayee` respectively. If not,
    9593        then the given objects must be at least adaptable to the
    9694        respective interface.
     
    106104
    107105        May result in (None, None).
     106        """
     107
     108    def store(payment):
     109        """Store `payment` in site.
    108110        """
    109111
     
    232234
    233235
    234 class IPayment(IContainer, IIkobaObject):
     236class IPayment(IIkobaObject):
    235237    """A base representation of payments.
    236238
     
    256258    we mark the payment 'failed'.
    257259    """
    258     contains(IPaymentItem)
    259 
    260260    payment_id = schema.TextLine(
    261261        title=u'Payment Identifier',
    262262        default=None,
     263        required=True,
     264        )
     265
     266    title = schema.TextLine(
     267        title=u'Payment description.',
     268        default=u'',
    263269        required=True,
    264270        )
     
    333339        """
    334340
    335     def add_payment_item(item):
    336         """Payments contain payment items.
    337 
    338         Add one
    339         """
    340 
    341341
    342342class IPayer(Interface):
Note: See TracChangeset for help on using the changeset viewer.