CREATES a single order for object ``oid``, with price set to ``price``
        and validity until ``expires``.
        
        :type oid: ``bigint``
        :param oid:
            Object ID.
        :type price: ``bigint``
        :param price:
            Vingd amount (in cents) the user/buyer shall be charged upon
            successful purchase.
        :type context: ``string``
        :param context:
            Purchase (order-related) context. Retrieved upon purchase
            verification.
        :type expires: ``datetime``/``dict``
        :param expires:
            Order expiry timestamp, absolute (``datetime``) or relative
            (``dict``). Valid keys for relative expiry timestamp dictionary are
            same as keyword arguments for `datetime.timedelta` (``days``,
            ``seconds``, ``minutes``, ``hours``, ``weeks``). Default:
            `Vingd.EXP_ORDER`.
        
        :rtype: ``dict``
        :returns:
            Order dictionary::
            
                order = {
                    'id': <order_id>,
                    'expires': <order_expiry>,
                    'context': <purchase_context>,
                    'object': {
                        'id': <oid>,
                        'price': <amount_in_cents>
                    },
                    'urls': {
                        'redirect': <url_for_failsafe_redirect_purchase_mode>,
                        'popup': <url_for_popup_purchase_mode>
                    }
                }
        
        :raises GeneralException:
        :resource: ``objects/<oid>/orders/``
        :access: authorized users

def create_order(self, oid, price, context=None, expires=None):
        """
        CREATES a single order for object ``oid``, with price set to ``price``
        and validity until ``expires``.
        
        :type oid: ``bigint``
        :param oid:
            Object ID.
        :type price: ``bigint``
        :param price:
            Vingd amount (in cents) the user/buyer shall be charged upon
            successful purchase.
        :type context: ``string``
        :param context:
            Purchase (order-related) context. Retrieved upon purchase
            verification.
        :type expires: ``datetime``/``dict``
        :param expires:
            Order expiry timestamp, absolute (``datetime``) or relative
            (``dict``). Valid keys for relative expiry timestamp dictionary are
            same as keyword arguments for `datetime.timedelta` (``days``,
            ``seconds``, ``minutes``, ``hours``, ``weeks``). Default:
            `Vingd.EXP_ORDER`.
        
        :rtype: ``dict``
        :returns:
            Order dictionary::
            
                order = {
                    'id': <order_id>,
                    'expires': <order_expiry>,
                    'context': <purchase_context>,
                    'object': {
                        'id': <oid>,
                        'price': <amount_in_cents>
                    },
                    'urls': {
                        'redirect': <url_for_failsafe_redirect_purchase_mode>,
                        'popup': <url_for_popup_purchase_mode>
                    }
                }
        
        :raises GeneralException:
        :resource: ``objects/<oid>/orders/``
        :access: authorized users
        """
        expires = absdatetime(expires, default=self.EXP_ORDER)
        orders = self.request(
            'post',
            safeformat('objects/{:int}/orders/', oid),
            json.dumps({
                'price': price,
                'order_expires': expires.isoformat(),
                'context': context
            }))
        orderid = self._extract_id_from_batch_response(orders)
        return {
            'id': orderid,
            'expires': expires,
            'context': context,
            'object': {
                'id': oid,
                'price': price
            },
            'urls': {
                'redirect': urljoin(self.usr_frontend, '/orders/%d/add/' % orderid),
                'popup': urljoin(self.usr_frontend, '/popup/orders/%d/add/' % orderid)
            }
        }