@prefix odrl: <http://www.w3.org/ns/odrl/2/> .
@prefix dct: <http://purl.org/dc/terms/> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .

# What wunderfacts offers, as ODRL. Served at /offer.ttl by OfferServlet, which fills in the
# configured order-webid as odrl:assigner. Relative IRIs resolve against wherever it is served from. SLA
# figures have no ODRL left operand and are stated in dct:description only.

<#free> a odrl:Offer ;
    odrl:uid <#free> ;
    dct:title "Free tier"@en ;
    dct:description "1 request/minute, best-effort (SLA > 50%, may return 503)."@en ;
    odrl:assigner <https://aharth.solidcommunity.net/profile/card#me> ;
    odrl:permission [
        odrl:target <https://wunderfacts.com/> ;
        odrl:action odrl:use ;
        odrl:constraint [
            odrl:leftOperand odrl:count ;
            odrl:operator odrl:lteq ;
            odrl:rightOperand 1
        ] , [
            odrl:leftOperand odrl:timeInterval ;
            odrl:operator odrl:eq ;
            odrl:rightOperand "PT1M"^^xsd:duration
        ]
    ] .

<#credits-100> a odrl:Offer ;
    odrl:uid <#credits-100> ;
    dct:title "100 credits"@en ;
    dct:description "No rate limit, SLA > 90%. 1 credit per successful request. EUR 1 per 100 credits."@en ;
    odrl:assigner <https://aharth.solidcommunity.net/profile/card#me> ;
    odrl:permission [
        odrl:target <https://wunderfacts.com/> ;
        odrl:action odrl:use ;
        odrl:constraint [
            odrl:leftOperand odrl:count ;
            odrl:operator odrl:lteq ;
            odrl:rightOperand 100
        ] ;
        odrl:duty [
            odrl:action odrl:compensate ;
            odrl:constraint [
                odrl:leftOperand odrl:payAmount ;
                odrl:operator odrl:eq ;
                odrl:rightOperand "1.00"^^xsd:decimal ;
                odrl:unit <http://dbpedia.org/resource/Euro>
            ]
        ]
    ] .
