GitHub Access Token became invalid

It seems like the GitHub access token used for retrieving details about this repository from GitHub became invalid. This might prevent certain types of inspections from being run (in particular, everything related to pull requests).
Please ask an admin of your repository to re-new the access token on this website.

Issues (51)

besepa/customers.py (1 issue)

1
from besepa import util
2
from besepa.resource import Create, Delete, Find, List, Post, Resource, Update
3
4
5
class Customer(List, Find, Create, Delete, Update, Post):
0 ignored issues
show
Too many ancestors (8/7)
Loading history...
6
    """Customer class wrapping the REST api/1/customers endpoint
7
8
    Usage::
9
10
        >>> customers = Customer.all()
11
12
        >>> customer = Customer.new({})
13
        >>> customer.create()  # return True or False
14
    """
15
    path = "api/1/customers"
16
17
    def create_bank_account(self, attributes):
18
        # /customers/<CUSTOMER-ID>/bank_accounts
19
        return self.post('bank_accounts', attributes)
20
21
    def list_bank_accounts(self):
22
        # /customers/<CUSTOMER-ID>/bank_accounts
23
        endpoint = util.join_url(self.path, str(self['id']), 'bank_accounts')
24
        response = self.api.get(endpoint)
25
        try:
26
            return Resource(response, api=self.api)
27
        except AttributeError:
28
            # To handle the case when response is JSON Array
29
            if isinstance(response, list):
30
                new_resp = [Resource(elem, api=self.api) for elem in response]
31
                return new_resp
32
33
    def create_debit(self, attributes):
34
        # /customers/invoices/<CUSTOMER-ID>/debits
35
        return self.post('debits', attributes)
36
37
38
Customer.convert_resources['bank_accounts'] = Resource
39
Customer.convert_resources['bank_account'] = Resource
40
Customer.convert_resources['mandate'] = Resource
41