Ejemplo n.º 1
0
class ProjectBreakdown(Resource):
    """
    Project breakdown resource contains information regarding
    billing group project breakdown costs.
    """
    href = HrefField(read_only=True)
    analysis_spending = CompoundField(Price, read_only=True)
    task_breakdown = CompoundListField(TaskBreakdown, read_only=True)

    def __str__(self):
        return f'<ProjectBreakdown: href={self.href}>'
Ejemplo n.º 2
0
class BillingGroupBreakdown(Resource):
    """
    Central resource for managing billing group breakdowns.
    """
    _URL = {'get': '/billing/groups/{id}/breakdown'}

    href = HrefField()
    project_breakdown = CompoundListField(ProjectBreakdown, read_only=True)
    total_spending = CompoundField(Price, read_only=True)

    @staticmethod
    def __str__():
        return six.text_type('<BillingGroupBreakdown>')
class ExecutionDetails(Resource):
    """
    Task execution details.
    """
    href = HrefField()
    start_time = DateTimeField(read_only=True)
    end_time = DateTimeField(read_only=True)
    status = StringField(read_only=True)
    message = StringField(read_only=True)
    jobs = CompoundListField(Job, read_only=True)

    @staticmethod
    def __str__():
        return six.text_type('<Execution Details>')