Skip to content

Latest commit

 

History

History
130 lines (94 loc) · 4.57 KB

File metadata and controls

130 lines (94 loc) · 4.57 KB

liveagent_api.InvoicesApi

All URIs are relative to http://localhost/api/v3

Method HTTP request Description
dowload_invoice POST /invoices/{invoiceNumber}/_download Download invoice
get_invoices GET /invoices/ Invoice list

dowload_invoice

file dowload_invoice(invoice_number)

Download invoice

Download invoice

Example

import time
import liveagent_api
from liveagent_api.rest import ApiException
from pprint import pprint

# Configure OAuth2 access token for authorization: privileges
liveagent_api.configuration.access_token = 'YOUR_ACCESS_TOKEN'
# Configure API key authorization: apikey
liveagent_api.configuration.api_key['apikey'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. BEARER) for API key, if needed
# liveagent_api.configuration.api_key_prefix['apikey'] = 'BEARER'

# create an instance of the API class
api_instance = liveagent_api.InvoicesApi()
invoice_number = 'invoice_number_example' # str | 

try: 
    # Download invoice
    api_response = api_instance.dowload_invoice(invoice_number)
    pprint(api_response)
except ApiException as e:
    print "Exception when calling InvoicesApi->dowload_invoice: %s\n" % e

Parameters

Name Type Description Notes
invoice_number str

Return type

file

Authorization

privileges, apikey

HTTP request headers

  • Content-Type: application/json
  • Accept: application/pdf

[Back to top] [Back to API list] [Back to Model list] [Back to README]

get_invoices

list[Invoice] get_invoices(page=page, per_page=per_page, sort_dir=sort_dir, sort_field=sort_field, filters=filters, _from=_from, to=to)

Invoice list

Invoices list

Example

import time
import liveagent_api
from liveagent_api.rest import ApiException
from pprint import pprint

# Configure OAuth2 access token for authorization: privileges
liveagent_api.configuration.access_token = 'YOUR_ACCESS_TOKEN'
# Configure API key authorization: apikey
liveagent_api.configuration.api_key['apikey'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. BEARER) for API key, if needed
# liveagent_api.configuration.api_key_prefix['apikey'] = 'BEARER'

# create an instance of the API class
api_instance = liveagent_api.InvoicesApi()
page = 1 # int | Page to display. Not used if _from is defined. (optional) (default to 1)
per_page = 10 # int | Results per page. Used only if _page is used. (optional) (default to 10)
sort_dir = 'ASC' # str | Sorting direction ASC or DESC (optional) (default to ASC)
sort_field = 'sort_field_example' # str | Sorting field (optional)
filters = 'filters_example' # str | Filters (json object {column:value, ...}) (optional)
_from = 0 # int | Result set start. Takes precedence over _page. (optional) (default to 0)
to = 0 # int | Result set end. Used only if _from is used. (optional) (default to 0)

try: 
    # Invoice list
    api_response = api_instance.get_invoices(page=page, per_page=per_page, sort_dir=sort_dir, sort_field=sort_field, filters=filters, _from=_from, to=to)
    pprint(api_response)
except ApiException as e:
    print "Exception when calling InvoicesApi->get_invoices: %s\n" % e

Parameters

Name Type Description Notes
page int Page to display. Not used if _from is defined. [optional] [default to 1]
per_page int Results per page. Used only if _page is used. [optional] [default to 10]
sort_dir str Sorting direction ASC or DESC [optional] [default to ASC]
sort_field str Sorting field [optional]
filters str Filters (json object {column:value, ...}) [optional]
_from int Result set start. Takes precedence over _page. [optional] [default to 0]
to int Result set end. Used only if _from is used. [optional] [default to 0]

Return type

list[Invoice]

Authorization

privileges, apikey

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]