fixing schemas and states
This commit is contained in:
parent
e058e2491f
commit
3bb7482876
|
@ -456,16 +456,14 @@ class CancelReservation(Organize):
|
|||
__doc__ = m.CancelReservation.__doc__
|
||||
|
||||
|
||||
class Confirm(ActionWithMultipleDevices):
|
||||
__doc__ = m.Confirm.__doc__
|
||||
trade = NestedOn('Trade', dump_only=True)
|
||||
user = NestedOn('User', dump_only=True)
|
||||
|
||||
|
||||
class Trade(ActionWithMultipleDevices):
|
||||
__doc__ = m.Trade.__doc__
|
||||
accepted_by_from = Boolean(missing=False, description=m.Trade.accepted_by_from.comment)
|
||||
accepted_by_to = Boolean(missing=False, description=m.Trade.accepted_by_to.comment)
|
||||
confirm_transfer = Boolean(missing=False, description=m.Trade.confirm_transfer.comment)
|
||||
offer = NestedOn('Offer', dump_only=True)
|
||||
|
||||
|
||||
class Offer(ActionWithMultipleDevices):
|
||||
__doc__ = m.Offer.__doc__
|
||||
document_id = SanitizedStr(validate=Length(max=STR_SIZE), data_key='documentID', required=False)
|
||||
date = DateTime(data_key='date', required=False)
|
||||
price = Float(required=False, data_key='price')
|
||||
|
|
|
@ -23,7 +23,6 @@ class Trading(State):
|
|||
"""Trading states.
|
||||
|
||||
:cvar Reserved: The device has been reserved.
|
||||
:cvar Offer: The devices has been offered for to do a Trade.
|
||||
:cvar Trade: The devices has been changed of owner.
|
||||
:cvar Cancelled: The device has been cancelled.
|
||||
:cvar Sold: The device has been sold.
|
||||
|
@ -35,7 +34,6 @@ class Trading(State):
|
|||
from the facility. It does not mean end-of-life.
|
||||
"""
|
||||
Reserved = e.Reserve
|
||||
Offer = e.Offer
|
||||
Trade = e.Trade
|
||||
Cancelled = e.CancelTrade
|
||||
Sold = e.Sell
|
||||
|
|
Reference in New Issue