{% extends "passerelle/manage/service_view.html" %}
{% load i18n passerelle %}

{% block endpoints %}
  <h4>{% trans "Family related" %}</h4>
  <ul class="endpoints">
    {% url "generic-endpoint" connector="teamnet-axel" slug=object.slug endpoint="ping" as endpoint_ping %}
    <li class="get-method"><div class="description"><span class="description--label">{% trans 'Check WSDL availability:' %}</span> <a class="example-url" href="{{ endpoint_ping }}">{{ endpoint_ping }}</a>[?debug]</div></li>

    {% url "generic-endpoint" connector="teamnet-axel" slug=object.slug endpoint="auth" as endpoint_auth %}
    <li class="get-method"><div class="description"><span class="description--label">{% trans 'Authentication:' %}</span> <a class="example-url" href="{{ endpoint_auth }}?login=foo&password=bar">{{ endpoint_auth }}?login=foo&password=bar</a></div></li>

    {% url "generic-endpoint" connector="teamnet-axel" slug=object.slug endpoint="family" rest="link/" as endpoint_link %}
    <li class="get-method"><div class="description"><span class="description--label">{% trans 'Link:' %}</span> <a class="example-url" href="{{ endpoint_link }}?NameID=...&login=foo&password=bar">{{ endpoint_link }}?NameID=...&login=foo&password=bar</a></div></li>

    {% url "generic-endpoint" connector="teamnet-axel" slug=object.slug endpoint="family" rest="unlink/" as endpoint_unlink %}
    <li class="get-method"><div class="description"><span class="description--label">{% trans 'Unlink:' %}</span> <a class="example-url" href="{{ endpoint_unlink }}?NameID=...">{{ endpoint_unlink }}?NameID=...</a></div></li>

    {% url "generic-endpoint" connector="teamnet-axel" slug=object.slug endpoint="family" rest="" as endpoint_family %}
    <li class="get-method"><div class="description"><span class="description--label">{% trans 'Get all family informations:' %}</span> <a class="example-url" href="{{ endpoint_family }}?NameID">{{ endpoint_family }}?NameID=...</a></div></li>

    {% url "generic-endpoint" connector="teamnet-axel" slug=object.slug endpoint="family" rest="adults/" as endpoint_family %}
    <li class="get-method"><div class="description"><span class="description--label">{% trans 'Get family adults informations:' %}</span> <a class="example-url" href="{{ endpoint_family }}?NameID">{{ endpoint_family }}?NameID=...</a></div></li>
    {% url "generic-endpoint" connector="teamnet-axel" slug=object.slug endpoint="family" rest="children/" as endpoint_family %}
    <li class="get-method"><div class="description"><span class="description--label">{% trans 'Get family children informations:' %}</span> <a class="example-url" href="{{ endpoint_family }}?NameID">{{ endpoint_family }}?NameID=...</a></div></li>
  </ul>

  <h4>{% trans "Invoices related" %}</h4>
  <ul class="endpoints">
    <li class="get-method"><div class="description"><span class="description--label">{% trans 'Get invoice history list:' %}</span>
      {% url "generic-endpoint" connector="teamnet-axel" slug=object.slug endpoint="regie"  rest="42/invoices/history/" as invoices_history_url %}
      <a class="example-url" href="{{ invoices_history_url }}?NameID"> {{ invoices_history_url }}?NameID=...</a>
      <em>42</em> {% trans 'is regie identifier' %}
    </div>
    </li>

    <li class="get-method"><div class="description"><span class="description--label">{% trans 'Get invoice list:' %}</span>
      {% url "generic-endpoint" connector="teamnet-axel" slug=object.slug endpoint="regie" rest="42/invoices/" as invoices_url %}
      <a class="example-url" href="{{ invoices_url }}?NameID"> {{ invoices_url }}?NameID=...  </a>
      <em>42</em> {% trans 'is regie identifier' %}
    </div>
    </li>

    <li class="get-method"><div class="description"><span class="description--label">{% trans 'Show invoice details:' %}</span>
      {% url "generic-endpoint" connector="teamnet-axel" slug=object.slug endpoint="regie" rest="42/invoices/2345-20150916/" as invoice_details_url %}
      <a class="example-url" href="{{ invoice_details_url }}"> {{ site_base_uri }}{{ invoice_details_url }} </a>
      <em>42</em> {% trans 'is regie identifier' %},
      <em>2345</em> {% trans 'is family identifier' %},
      <em>20150916</em> {% trans 'is invoice identifier' %}
    </div>
    </li>

    <li class="get-method"><div class="description"><span class="description--label">{% trans 'Get invoice pdf:' %}</span>
      {% url "generic-endpoint" connector="teamnet-axel" slug=object.slug endpoint="regie" rest="42/invoices/2345-20150916/pdf/" as invoice_download_url %}
      <a class="example-url" href="{{ invoice_download_url }}"> {{ site_base_uri }}{{ invoice_download_url }} </a>
    </div>
    </li>

    <li class="post-method"><div class="description"><span class="description--label">{% trans 'Pay invoice:' %}</span>
      {% url "generic-endpoint" connector="teamnet-axel" slug=object.slug endpoint="regie" rest="42/invoices/2345-20150916/pay/" as payment_url %}
      <a class="example-url" href="{{ payment_url }}"> {{ site_base_uri }}{{ payment_url }}?NameID=...  </a>
    </div>
    </li>
  </ul>
{% endblock %}
