# Path: apiwrapper/endpoints/controller.py
# class Controller:
# 
#     def __init__(self, api_client):
#         self.annual_overview = AnnualOverview(api_client)
#         self.attachment_public = AttachmentPublic(api_client)
#         self.attachment_tab = AttachmentTab(api_client)
#         self.avatar = Avatar(api_client)
#         self.card = Card(api_client)
#         self.cash_register = CashRegister(api_client)
#         self.cash_register_tab = CashRegisterTab(api_client)
#         self.certificate_pinned = CertificatePinned(api_client)
#         self.chat_conversation = ChatConversation(api_client)
#         self.credential_password_ip = CredentialPasswordIp(api_client)
#         self.customer_statement = CustomerStatement(api_client)
#         self.device = Device(api_client)
#         self.device_server = DeviceServer(api_client)
#         self.draft_payment = DraftPayment(api_client)
#         self.draft_invite = DraftShareInviteBank(api_client)
#         self.installation = Installation(api_client)
#         self.invoice = Invoice(api_client)
#         self.master_card_action = MasterCardAction(api_client)
#         self.monetary_account = MonetaryAccount(api_client)
#         self.payment = Payment(api_client)
#         self.permitted_ip = PermittedIp(api_client)
#         self.request_inquiry = RequestInquiry(api_client)
#         self.schedule = Schedule(api_client)
#         self.scheduled_payment = ScheduledPayment(api_client)
#         self.server_public_key = ServerPublicKey(api_client)
#         self.session_server = SessionServer(api_client)
#         self.share_inquiry = ShareInviteBankInquiry(api_client)
#         self.share_response = ShareInviteBankResponse(api_client)
#         self.tab_attachment = TabAttachment(api_client)
#         self.tab_usage = TabUsage(api_client)
#         self.user = User(api_client)


import base64
import copy
import json
import uuid
import requests
from cryptography.exceptions import InvalidSignature
from cryptography.hazmat.backends import default_backend
from cryptography.hazmat.primitives import hashes, serialization
from cryptography.hazmat.primitives.asymmetric import padding
from apiwrapper.endpoints.controller import Controller as EndpointController




class ApiClient:
    """Handles the communication with the Bunq API

    Can send HTTP requests and verify the response
    """

    __version_api = 1
    __agent_name = "complete-bunq-api-test"
    __agent_version = '0.1.0'
    _uri_production = "https://api.bunq.com/v%d" % __version_api
    _uri_sandbox = "https://sandbox.public.api.bunq.com/v%d" % __version_api

    __variables = ['installation_id', 'installation_token', 'api_key',
                   'server_token', 'server_pubkey', 'session_token']

    def __init__(self, privkey, use_sandbox=True, **kwargs):
        self.privkey = privkey
        self._uri = self._uri_sandbox if use_sandbox else self._uri_production
        self._handle_kwargs(kwargs)


# Path: apiwrapper/endpoints/controller.py
# class Controller:
# 
#     def __init__(self, api_client):
#         self.annual_overview = AnnualOverview(api_client)
#         self.attachment_public = AttachmentPublic(api_client)
#         self.attachment_tab = AttachmentTab(api_client)
#         self.avatar = Avatar(api_client)
#         self.card = Card(api_client)
#         self.cash_register = CashRegister(api_client)
#         self.cash_register_tab = CashRegisterTab(api_client)
#         self.certificate_pinned = CertificatePinned(api_client)
#         self.chat_conversation = ChatConversation(api_client)
#         self.credential_password_ip = CredentialPasswordIp(api_client)
#         self.customer_statement = CustomerStatement(api_client)
#         self.device = Device(api_client)
#         self.device_server = DeviceServer(api_client)
#         self.draft_payment = DraftPayment(api_client)
#         self.draft_invite = DraftShareInviteBank(api_client)
#         self.installation = Installation(api_client)
#         self.invoice = Invoice(api_client)
#         self.master_card_action = MasterCardAction(api_client)
#         self.monetary_account = MonetaryAccount(api_client)
#         self.payment = Payment(api_client)
#         self.permitted_ip = PermittedIp(api_client)
#         self.request_inquiry = RequestInquiry(api_client)
#         self.schedule = Schedule(api_client)
#         self.scheduled_payment = ScheduledPayment(api_client)
#         self.server_public_key = ServerPublicKey(api_client)
#         self.session_server = SessionServer(api_client)
#         self.share_inquiry = ShareInviteBankInquiry(api_client)
#         self.share_response = ShareInviteBankResponse(api_client)
#         self.tab_attachment = TabAttachment(api_client)
#         self.tab_usage = TabUsage(api_client)
#         self.user = User(api_client)


# Path: apiwrapper/clients/api_client.py
import base64
import copy
import json
import uuid
import requests
from cryptography.exceptions import InvalidSignature
from cryptography.hazmat.backends import default_backend
from cryptography.hazmat.primitives import hashes, serialization
from cryptography.hazmat.primitives.asymmetric import padding
from apiwrapper.endpoints.controller import Controller as EndpointController





class ApiClient:
    """Handles the communication with the Bunq API

    Can send HTTP requests and verify the response
    """

    __version_api = 1
    __agent_name = "complete-bunq-api-test"
    __agent_version = '0.1.0'
    _uri_production = "https://api.bunq.com/v%d" % __version_api
    _uri_sandbox = "https://sandbox.public.api.bunq.com/v%d" % __version_api

    __variables = ['installation_id', 'installation_token', 'api_key',
                   'server_token', 'server_pubkey', 'session_token']

    def __init__(self, privkey, use_sandbox=True, **kwargs):
        self.privkey = privkey
        self._uri = self._uri_sandbox if use_sandbox else self._uri_production
        self._handle_kwargs(kwargs)


        self.__endpoint_controller = EndpointController(self)