code
string
signature
string
docstring
string
loss_without_docstring
float64
loss_with_docstring
float64
factor
float64
return cls._get_media_files( packager=Packager(), media_packages=getattr(cls, 'js_packages', {}), media_type='js', extra_files=extra_files)
def _get_js_files(cls, extra_files)
Return all JavaScript files from the Media class. Args: extra_files (list): The contents of the Media class's original :py:attr:`js` attribute, if one was provided. Returns: list: The JavaScript files to return for the :py:attr:`js` attribute.
7.508848
7.866187
0.954573
source_files = list(extra_files) if (not settings.PIPELINE_ENABLED and settings.PIPELINE_COLLECTOR_ENABLED): default_collector.collect() for media_package in media_packages: package = packager.package_for(media_type, media_package) if settings.PIPELINE_ENABLED: source_files.append( staticfiles_storage.url(package.output_filename)) else: source_files += packager.compile(package.paths) return source_files
def _get_media_files(cls, packager, media_packages, media_type, extra_files)
Return source or output media files for a list of packages. This will go through the media files belonging to the provided list of packages referenced in a Media class and return the output files (if Pipeline is enabled) or the source files (if not enabled). Args: packager (pipeline.packager.Packager): The packager responsible for media compilation for this type of package. media_packages (list of unicode): The list of media packages referenced in Media to compile or return. extra_files (list of unicode): The list of extra files to include in the result. This would be the list stored in the Media class's original :py:attr:`css` or :py:attr:`js` attributes. Returns: list: The list of media files for the given packages.
4.203054
4.689618
0.896247
if settings.PIPELINE_ENABLED: return self.render_compressed_output(package, package_name, package_type) else: return self.render_compressed_sources(package, package_name, package_type)
def render_compressed(self, package, package_name, package_type)
Render HTML for the package. If ``PIPELINE_ENABLED`` is ``True``, this will render the package's output file (using :py:meth:`render_compressed_output`). Otherwise, this will render the package's source files (using :py:meth:`render_compressed_sources`). Subclasses can override this method to provide custom behavior for determining what to render.
3.574362
2.075757
1.721956
method = getattr(self, 'render_{0}'.format(package_type)) return method(package, package.output_filename)
def render_compressed_output(self, package, package_name, package_type)
Render HTML for using the package's output file. Subclasses can override this method to provide custom behavior for rendering the output file.
5.657824
6.214034
0.910491
if settings.PIPELINE_COLLECTOR_ENABLED: default_collector.collect(self.request) packager = Packager() method = getattr(self, 'render_individual_{0}'.format(package_type)) try: paths = packager.compile(package.paths) except CompilerError as e: if settings.SHOW_ERRORS_INLINE: method = getattr(self, 'render_error_{0}'.format( package_type)) return method(package_name, e) else: raise templates = packager.pack_templates(package) return method(package, paths, templates=templates)
def render_compressed_sources(self, package, package_name, package_type)
Render HTML for using the package's list of source files. Each source file will first be collected, if ``PIPELINE_COLLECTOR_ENABLED`` is ``True``. If there are any errors compiling any of the source files, an ``SHOW_ERRORS_INLINE`` is ``True``, those errors will be shown at the top of the page. Subclasses can override this method to provide custom behavior for rendering the source files.
5.448308
4.293128
1.269076
matches = [] for elem in chain(settings.STYLESHEETS.values(), settings.JAVASCRIPT.values()): if normpath(elem['output_filename']) == normpath(path): match = safe_join(settings.PIPELINE_ROOT, path) if not all: return match matches.append(match) return matches
def find(self, path, all=False)
Looks for files in PIPELINE.STYLESHEETS and PIPELINE.JAVASCRIPT
5.338218
3.970541
1.344456
try: start, _, extn = path.rsplit('.', 2) except ValueError: return [] path = '.'.join((start, extn)) return find(path, all=all) or []
def find(self, path, all=False)
Work out the uncached name of the file and look that up instead
4.948295
5.059475
0.978025
return self._request( self._METHOD_POST, uri_relative, request_bytes, {}, custom_headers )
def post(self, uri_relative, request_bytes, custom_headers)
:type uri_relative: str :type request_bytes: bytes :type custom_headers: dict[str, str] :return: BunqResponseRaw
4.16305
6.502729
0.6402
uri_relative_with_params = self._append_params_to_uri(uri_relative, params) if uri_relative not in self._URIS_NOT_REQUIRING_ACTIVE_SESSION: if self._api_context.ensure_session_active(): from bunq.sdk.context import BunqContext BunqContext.update_api_context(self._api_context) all_headers = self._get_all_headers( method, uri_relative_with_params, request_bytes, custom_headers ) response = requests.request( method, self._get_uri_full(uri_relative_with_params), data=request_bytes, headers=all_headers, proxies={self._FIELD_PROXY_HTTPS: self._api_context.proxy_url}, ) self._assert_response_success(response) if self._api_context.installation_context is not None: security.validate_response( self._api_context.installation_context.public_key_server, response.status_code, response.content, response.headers ) return self._create_bunq_response_raw(response)
def _request(self, method, uri_relative, request_bytes, params, custom_headers)
:type method: str :type uri_relative: str :type request_bytes: bytes :type params: dict[str, str] :type custom_headers: dict[str, str] :return: BunqResponseRaw
3.315323
3.160004
1.049152
if params: return uri + cls._DELIMITER_URL_QUERY + urlencode(params) return uri
def _append_params_to_uri(cls, uri, params)
:type uri: str :type params: dict[str, str] :rtype: str
7.052382
6.184634
1.140307
headers = self._get_default_headers() headers.update(custom_headers) if self._api_context.token is not None: headers[self.HEADER_AUTHENTICATION] = self._api_context.token headers[self.HEADER_SIGNATURE] = security.sign_request( self._api_context.installation_context.private_key_client, method, endpoint, request_bytes, headers ) return headers
def _get_all_headers(self, method, endpoint, request_bytes, custom_headers)
:type method: str :type endpoint: str :type request_bytes: bytes :type custom_headers: dict[str, str] :rtype: dict[str, str]
3.396586
3.399809
0.999052
return { cls.HEADER_USER_AGENT: cls._USER_AGENT_BUNQ, cls.HEADER_REQUEST_ID: cls._generate_random_request_id(), cls.HEADER_GEOLOCATION: cls._GEOLOCATION_ZERO, cls.HEADER_LANGUAGE: cls._LANGUAGE_EN_US, cls.HEADER_REGION: cls._REGION_NL_NL, cls.HEADER_CACHE_CONTROL: cls._CACHE_CONTROL_NONE, }
def _get_default_headers(cls)
:rtype: dict[str, str]
3.565744
3.25826
1.094371
if response.status_code != self._STATUS_CODE_OK: raise ExceptionFactory.create_exception_for_response( response.status_code, self._fetch_all_error_message(response), self._fetch_response_id(response) )
def _assert_response_success(self, response)
:type response: requests.Response :rtype: None :raise ApiException: When the response is not successful.
5.271695
4.931258
1.069037
response_content_string = response.content.decode() try: error_dict = converter.json_to_class(dict, response_content_string) return self._fetch_error_descriptions(error_dict) except ValueError: return [response_content_string]
def _fetch_all_error_message(self, response)
:type response: requests.Response :rtype: list[str]
5.104571
4.535414
1.125492
error_descriptions = [] for error in error_dict[self._FIELD_ERROR]: description = error[self._FIELD_ERROR_DESCRIPTION] error_descriptions.append(description) return error_descriptions
def _fetch_error_descriptions(self, error_dict)
:type error_dict: dict[str, list[dict[str, str]] :rtype: list[str]
3.007684
2.618644
1.148566
headers = response.headers if self.HEADER_RESPONSE_ID_UPPER_CASED in headers: return headers[self.HEADER_RESPONSE_ID_UPPER_CASED] if self.HEADER_RESPONSE_ID_LOWER_CASED in headers: return headers[self.HEADER_RESPONSE_ID_LOWER_CASED] return self._ERROR_COULD_NOT_DETERMINE_RESPONSE_ID_HEADER;
def _fetch_response_id(self, response)
:type response: requests.Response :rtype: str
2.973562
2.82911
1.051059
return self._request( self._METHOD_PUT, uri_relative, request_bytes, {}, custom_headers )
def put(self, uri_relative, request_bytes, custom_headers)
:type uri_relative: str :type request_bytes: bytes :type custom_headers: dict[str, str] :rtype: BunqResponseRaw
4.714499
5.306654
0.888413
return self._request( self._METHOD_GET, uri_relative, self._BYTES_EMPTY, params, custom_headers )
def get(self, uri_relative, params, custom_headers)
:type uri_relative: str :type params: dict[str, str] :type custom_headers: dict[str, str] :rtype: BunqResponseRaw
5.142602
7.110743
0.723216
return self._request( self._METHOD_DELETE, uri_relative, self._BYTES_EMPTY, {}, custom_headers )
def delete(self, uri_relative, custom_headers)
:type uri_relative: str :type custom_headers: dict[str, str] :rtype: BunqResponseRaw
7.303112
8.17593
0.893245
return cls( bunq_response.value, bunq_response.headers, bunq_response.pagination )
def cast_from_bunq_response(cls, bunq_response)
:type bunq_response: BunqResponse
6.568253
4.30933
1.524193
self.assert_has_previous_page() params = {self.PARAM_OLDER_ID: str(self.older_id)} self._add_count_to_params_if_needed(params) return params
def url_params_previous_page(self)
:rtype: dict[str, str]
8.802317
6.754216
1.303233
if self.count is not None: params[self.PARAM_COUNT] = str(self.count)
def _add_count_to_params_if_needed(self, params)
:type params: dict[str, str] :rtype: None
4.224006
3.716661
1.136506
self.assert_has_next_page() params = {self.PARAM_NEWER_ID: str(self._next_id)} self._add_count_to_params_if_needed(params) return params
def url_params_next_page(self)
:rtype: dict[str, str]
8.004841
5.867649
1.364233
if self._id_ is not None: return False if self._created is not None: return False if self._updated is not None: return False if self._contract_date_start is not None: return False if self._contract_date_end is not None: return False if self._contract_version is not None: return False if self._subscription_type is not None: return False if self._subscription_type_downgrade is not None: return False if self._status is not None: return False if self._sub_status is not None: return False return True
def is_all_field_none(self)
:rtype: bool
2.339024
2.193727
1.066233
if self._limit_monetary_account is not None: return False if self._limit_monetary_account_remaining is not None: return False if self._limit_card_debit_maestro is not None: return False if self._limit_card_debit_mastercard is not None: return False if self._limit_card_debit_wildcard is not None: return False if self._limit_card_debit_replacement is not None: return False if self._limit_invite_user_premium_limited is not None: return False if self._limit_amount_monthly is not None: return False if self._spent_amount_monthly is not None: return False return True
def is_all_field_none(self)
:rtype: bool
3.19815
3.095811
1.033057
if custom_headers is None: custom_headers = {} api_client = client.ApiClient(cls._get_api_context()) endpoint_url = cls._ENDPOINT_URL_LISTING.format( cls._determine_user_id(), invoice_id) response_raw = api_client.get(endpoint_url, {}, custom_headers) return BunqResponseBytes.cast_from_bunq_response( client.BunqResponse(response_raw.body_bytes, response_raw.headers) )
def list(cls, invoice_id, custom_headers=None)
:type user_id: int :type invoice_id: int :type custom_headers: dict[str, str]|None :rtype: BunqResponseBytes
3.462361
2.584194
1.339822
if self._id_ is not None: return False if self._created is not None: return False if self._updated is not None: return False if self._invoice_date is not None: return False if self._invoice_number is not None: return False if self._status is not None: return False if self._group is not None: return False if self._total_vat_inclusive is not None: return False if self._total_vat_exclusive is not None: return False if self._total_vat is not None: return False if self._alias is not None: return False if self._address is not None: return False if self._counterparty_alias is not None: return False if self._counterparty_address is not None: return False if self._chamber_of_commerce_number is not None: return False if self._vat_number is not None: return False if self._request_reference_split_the_bill is not None: return False return True
def is_all_field_none(self)
:rtype: bool
2.211049
2.124228
1.040872
if custom_headers is None: custom_headers = {} api_client = client.ApiClient(cls._get_api_context()) endpoint_url = cls._ENDPOINT_URL_CREATE.format(cls._determine_user_id(), cls._determine_monetary_account_id( monetary_account_id)) response_raw = api_client.post(endpoint_url, request_bytes, custom_headers) return BunqResponseInt.cast_from_bunq_response( cls._process_for_id(response_raw) )
def create(cls, request_bytes, monetary_account_id=None, custom_headers=None)
Create a new monetary account attachment. Create a POST request with a payload that contains the binary representation of the file, without any JSON wrapping. Make sure you define the MIME type (i.e. image/jpeg) in the Content-Type header. You are required to provide a description of the attachment using the X-Bunq-Attachment-Description header. :type user_id: int :type monetary_account_id: int :type custom_headers: dict[str, str]|None :rtype: BunqResponseInt
2.445534
2.282081
1.071625
if custom_headers is None: custom_headers = {} api_client = client.ApiClient(cls._get_api_context()) endpoint_url = cls._ENDPOINT_URL_CREATE response_raw = api_client.post(endpoint_url, request_bytes, custom_headers) return BunqResponseStr.cast_from_bunq_response( cls._process_for_uuid(response_raw) )
def create(cls, request_bytes, custom_headers=None)
Create a new public attachment. Create a POST request with a payload that contains a binary representation of the file, without any JSON wrapping. Make sure you define the MIME type (i.e. image/jpeg, or image/png) in the Content-Type header. You are required to provide a description of the attachment using the X-Bunq-Attachment-Description header. :type custom_headers: dict[str, str]|None :rtype: BunqResponseStr
3.43914
3.116451
1.103544
if custom_headers is None: custom_headers = {} api_client = client.ApiClient(cls._get_api_context()) endpoint_url = cls._ENDPOINT_URL_READ.format(attachment_public_uuid) response_raw = api_client.get(endpoint_url, {}, custom_headers) return BunqResponseAttachmentPublic.cast_from_bunq_response( cls._from_json(response_raw, cls._OBJECT_TYPE_GET) )
def get(cls, attachment_public_uuid, custom_headers=None)
Get a specific attachment's metadata through its UUID. The Content-Type header of the response will describe the MIME type of the attachment file. :type api_context: context.ApiContext :type attachment_public_uuid: str :type custom_headers: dict[str, str]|None :rtype: BunqResponseAttachmentPublic
3.032084
2.418664
1.25362
if self._uuid is not None: return False if self._created is not None: return False if self._updated is not None: return False if self._attachment is not None: return False return True
def is_all_field_none(self)
:rtype: bool
3.302238
2.826962
1.168122
if self._id_ is not None: return False if self._created is not None: return False if self._updated is not None: return False if self._attachment is not None: return False return True
def is_all_field_none(self)
:rtype: bool
3.348649
2.795526
1.19786
if custom_headers is None: custom_headers = {} api_client = client.ApiClient(cls._get_api_context()) endpoint_url = cls._ENDPOINT_URL_READ.format(tab_uuid, tab_attachment_tab_id) response_raw = api_client.get(endpoint_url, {}, custom_headers) return BunqResponseTabAttachmentTab.cast_from_bunq_response( cls._from_json(response_raw, cls._OBJECT_TYPE_GET) )
def get(cls, tab_uuid, tab_attachment_tab_id, custom_headers=None)
Get a specific attachment. The header of the response contains the content-type of the attachment. :type api_context: context.ApiContext :type tab_uuid: str :type tab_attachment_tab_id: int :type custom_headers: dict[str, str]|None :rtype: BunqResponseTabAttachmentTab
3.170393
2.60318
1.217892
if custom_headers is None: custom_headers = {} request_map = { cls.FIELD_ATTACHMENT_PUBLIC_UUID: attachment_public_uuid } request_map_string = converter.class_to_json(request_map) request_map_string = cls._remove_field_for_request(request_map_string) api_client = client.ApiClient(cls._get_api_context()) request_bytes = request_map_string.encode() endpoint_url = cls._ENDPOINT_URL_CREATE response_raw = api_client.post(endpoint_url, request_bytes, custom_headers) return BunqResponseStr.cast_from_bunq_response( cls._process_for_uuid(response_raw) )
def create(cls, attachment_public_uuid, custom_headers=None)
:param attachment_public_uuid: The public UUID of the public attachment from which an avatar image must be created. :type attachment_public_uuid: str :type custom_headers: dict[str, str]|None :rtype: BunqResponseStr
2.687698
2.284994
1.176239
if custom_headers is None: custom_headers = {} api_client = client.ApiClient(cls._get_api_context()) endpoint_url = cls._ENDPOINT_URL_READ.format(avatar_uuid) response_raw = api_client.get(endpoint_url, {}, custom_headers) return BunqResponseAvatar.cast_from_bunq_response( cls._from_json(response_raw, cls._OBJECT_TYPE_GET) )
def get(cls, avatar_uuid, custom_headers=None)
:type api_context: context.ApiContext :type avatar_uuid: str :type custom_headers: dict[str, str]|None :rtype: BunqResponseAvatar
2.986989
2.233638
1.337275
if self._user_alias is not None: return False if self._alias is not None: return False if self._counterparty_alias is not None: return False if self._status is not None: return False if self._sub_status is not None: return False if self._time_start_desired is not None: return False if self._time_start_actual is not None: return False if self._time_end is not None: return False if self._attachment is not None: return False return True
def is_all_field_none(self)
:rtype: bool
2.547248
2.355648
1.081337
if custom_headers is None: custom_headers = {} request_map = { cls.FIELD_AMOUNT: amount, cls.FIELD_COUNTERPARTY_ALIAS: counterparty_alias, cls.FIELD_DESCRIPTION: description, cls.FIELD_ATTACHMENT: attachment, cls.FIELD_MERCHANT_REFERENCE: merchant_reference, cls.FIELD_ALLOW_BUNQTO: allow_bunqto } request_map_string = converter.class_to_json(request_map) request_map_string = cls._remove_field_for_request(request_map_string) api_client = client.ApiClient(cls._get_api_context()) request_bytes = request_map_string.encode() endpoint_url = cls._ENDPOINT_URL_CREATE.format(cls._determine_user_id(), cls._determine_monetary_account_id( monetary_account_id)) response_raw = api_client.post(endpoint_url, request_bytes, custom_headers) return BunqResponseInt.cast_from_bunq_response( cls._process_for_id(response_raw) )
def create(cls, amount, counterparty_alias, description, monetary_account_id=None, attachment=None, merchant_reference=None, allow_bunqto=None, custom_headers=None)
Create a new Payment. :type user_id: int :type monetary_account_id: int :param amount: The Amount to transfer with the Payment. Must be bigger than 0 and smaller than the MonetaryAccount's balance. :type amount: object_.Amount :param counterparty_alias: The Alias of the party we are transferring the money to. Can be an Alias of type EMAIL or PHONE_NUMBER (for bunq MonetaryAccounts or bunq.to payments) or IBAN (for external bank account). :type counterparty_alias: object_.Pointer :param description: The description for the Payment. Maximum 140 characters for Payments to external IBANs, 9000 characters for Payments to only other bunq MonetaryAccounts. Field is required but can be an empty string. :type description: str :param attachment: The Attachments to attach to the Payment. :type attachment: list[object_.AttachmentMonetaryAccountPayment] :param merchant_reference: Optional data to be included with the Payment specific to the merchant. :type merchant_reference: str :param allow_bunqto: Whether or not sending a bunq.to payment is allowed. :type allow_bunqto: bool :type custom_headers: dict[str, str]|None :rtype: BunqResponseInt
1.717145
1.681152
1.02141
if self._id_ is not None: return False if self._created is not None: return False if self._updated is not None: return False if self._monetary_account_id is not None: return False if self._amount is not None: return False if self._alias is not None: return False if self._counterparty_alias is not None: return False if self._description is not None: return False if self._type_ is not None: return False if self._sub_type is not None: return False if self._bunqto_status is not None: return False if self._bunqto_sub_status is not None: return False if self._bunqto_share_url is not None: return False if self._bunqto_expiry is not None: return False if self._bunqto_time_responded is not None: return False if self._attachment is not None: return False if self._merchant_reference is not None: return False if self._batch_id is not None: return False if self._scheduled_id is not None: return False if self._address_shipping is not None: return False if self._address_billing is not None: return False if self._geolocation is not None: return False if self._allow_chat is not None: return False if self._request_reference_split_the_bill is not None: return False if self._balance_after_mutation is not None: return False return True
def is_all_field_none(self)
:rtype: bool
2.368261
2.311308
1.024641
if self._id_ is not None: return False if self._created is not None: return False if self._updated is not None: return False if self._bunqme_fundraiser_profile is not None: return False if self._payments is not None: return False return True
def is_all_field_none(self)
:rtype: bool
3.835218
3.353489
1.14365
if self._color is not None: return False if self._alias is not None: return False if self._description is not None: return False if self._attachment is not None: return False if self._pointer is not None: return False if self._status is not None: return False if self._redirect_url is not None: return False return True
def is_all_field_none(self)
:rtype: bool
2.806972
2.519776
1.113977
if self._id_ is not None: return False if self._created is not None: return False if self._updated is not None: return False if self._time_expiry is not None: return False if self._monetary_account_id is not None: return False if self._status is not None: return False if self._bunqme_tab_share_url is not None: return False if self._bunqme_tab_entry is not None: return False if self._result_inquiries is not None: return False return True
def is_all_field_none(self)
:rtype: bool
3.337696
3.116761
1.070886
if self._uuid is not None: return False if self._amount_inquired is not None: return False if self._alias is not None: return False if self._description is not None: return False if self._status is not None: return False if self._redirect_url is not None: return False if self._merchant_available is not None: return False return True
def is_all_field_none(self)
:rtype: bool
3.111387
2.880468
1.080167
if custom_headers is None: custom_headers = {} request_map = { cls.FIELD_CARDS: cards } request_map_string = converter.class_to_json(request_map) request_map_string = cls._remove_field_for_request(request_map_string) api_client = client.ApiClient(cls._get_api_context()) request_bytes = request_map_string.encode() endpoint_url = cls._ENDPOINT_URL_CREATE.format(cls._determine_user_id()) response_raw = api_client.post(endpoint_url, request_bytes, custom_headers) return BunqResponseCardBatch.cast_from_bunq_response( cls._from_json(response_raw, cls._OBJECT_TYPE_POST) )
def create(cls, cards, custom_headers=None)
:type user_id: int :param cards: The cards that need to be updated. :type cards: list[object_.CardBatchEntry] :type custom_headers: dict[str, str]|None :rtype: BunqResponseCardBatch
2.890969
2.219917
1.302287
if custom_headers is None: custom_headers = {} request_map = { cls.FIELD_SECOND_LINE: second_line, cls.FIELD_NAME_ON_CARD: name_on_card, cls.FIELD_ALIAS: alias, cls.FIELD_TYPE: type_, cls.FIELD_PIN_CODE_ASSIGNMENT: pin_code_assignment, cls.FIELD_MONETARY_ACCOUNT_ID_FALLBACK: monetary_account_id_fallback } request_map_string = converter.class_to_json(request_map) request_map_string = cls._remove_field_for_request(request_map_string) api_client = client.ApiClient(cls._get_api_context()) request_bytes = request_map_string.encode() request_bytes = security.encrypt(cls._get_api_context(), request_bytes, custom_headers) endpoint_url = cls._ENDPOINT_URL_CREATE.format(cls._determine_user_id()) response_raw = api_client.post(endpoint_url, request_bytes, custom_headers) return BunqResponseCardDebit.cast_from_bunq_response( cls._from_json(response_raw, cls._OBJECT_TYPE_POST) )
def create(cls, second_line, name_on_card, alias=None, type_=None, pin_code_assignment=None, monetary_account_id_fallback=None, custom_headers=None)
Create a new debit card request. :type user_id: int :param second_line: The second line of text on the card, used as name/description for it. It can contain at most 17 characters and it can be empty. :type second_line: str :param name_on_card: The user's name as it will be on the card. Check 'card-name' for the available card names for a user. :type name_on_card: str :param alias: The pointer to the monetary account that will be connected at first with the card. Its IBAN code is also the one that will be printed on the card itself. The pointer must be of type IBAN. :type alias: object_.Pointer :param type_: The type of card to order. Can be MAESTRO or MASTERCARD. :type type_: str :param pin_code_assignment: Array of Types, PINs, account IDs assigned to the card. :type pin_code_assignment: list[object_.CardPinAssignment] :param monetary_account_id_fallback: ID of the MA to be used as fallback for this card if insufficient balance. Fallback account is removed if not supplied. :type monetary_account_id_fallback: int :type custom_headers: dict[str, str]|None :rtype: BunqResponseCardDebit
2.035714
1.83621
1.10865
if self._id_ is not None: return False if self._created is not None: return False if self._updated is not None: return False if self._public_uuid is not None: return False if self._type_ is not None: return False if self._sub_type is not None: return False if self._second_line is not None: return False if self._name_on_card is not None: return False if self._primary_account_number_four_digit is not None: return False if self._status is not None: return False if self._order_status is not None: return False if self._expiry_date is not None: return False if self._limit is not None: return False if self._country_permission is not None: return False if self._label_monetary_account_ordered is not None: return False if self._label_monetary_account_current is not None: return False if self._alias is not None: return False if self._pin_code_assignment is not None: return False if self._monetary_account_id_fallback is not None: return False if self._country is not None: return False return True
def is_all_field_none(self)
:rtype: bool
2.685368
2.617204
1.026045
if custom_headers is None: custom_headers = {} request_map = { cls.FIELD_TYPE: type_ } request_map_string = converter.class_to_json(request_map) request_map_string = cls._remove_field_for_request(request_map_string) api_client = client.ApiClient(cls._get_api_context()) request_bytes = request_map_string.encode() request_bytes = security.encrypt(cls._get_api_context(), request_bytes, custom_headers) endpoint_url = cls._ENDPOINT_URL_CREATE.format(cls._determine_user_id(), card_id) response_raw = api_client.post(endpoint_url, request_bytes, custom_headers) return BunqResponseInt.cast_from_bunq_response( cls._process_for_id(response_raw) )
def create(cls, card_id, type_=None, custom_headers=None)
Generate a new CVC2 code for a card. :type user_id: int :type card_id: int :param type_: The type of generated cvc2. Can be STATIC or GENERATED. :type type_: str :type custom_headers: dict[str, str]|None :rtype: BunqResponseInt
2.771904
2.259144
1.226971
if custom_headers is None: custom_headers = {} api_client = client.ApiClient(cls._get_api_context()) request_map = { cls.FIELD_TYPE: type_ } request_map_string = converter.class_to_json(request_map) request_map_string = cls._remove_field_for_request(request_map_string) request_bytes = request_map_string.encode() request_bytes = security.encrypt(cls._get_api_context(), request_bytes, custom_headers) endpoint_url = cls._ENDPOINT_URL_UPDATE.format(cls._determine_user_id(), card_id, card_generated_cvc2_id) response_raw = api_client.put(endpoint_url, request_bytes, custom_headers) return BunqResponseInt.cast_from_bunq_response( cls._process_for_id(response_raw) )
def update(cls, card_id, card_generated_cvc2_id, type_=None, custom_headers=None)
:type user_id: int :type card_id: int :type card_generated_cvc2_id: int :param type_: The type of generated cvc2. Can be STATIC or GENERATED. :type type_: str :type custom_headers: dict[str, str]|None :rtype: BunqResponseInt
2.820237
2.319977
1.215632
if self._id_ is not None: return False if self._created is not None: return False if self._updated is not None: return False if self._type_ is not None: return False if self._cvc2 is not None: return False if self._status is not None: return False if self._expiry_time is not None: return False return True
def is_all_field_none(self)
:rtype: bool
2.787189
2.508126
1.111264
if custom_headers is None: custom_headers = {} request_map = { cls.FIELD_NAME_ON_CARD: name_on_card, cls.FIELD_PIN_CODE: pin_code, cls.FIELD_SECOND_LINE: second_line } request_map_string = converter.class_to_json(request_map) request_map_string = cls._remove_field_for_request(request_map_string) api_client = client.ApiClient(cls._get_api_context()) request_bytes = request_map_string.encode() request_bytes = security.encrypt(cls._get_api_context(), request_bytes, custom_headers) endpoint_url = cls._ENDPOINT_URL_CREATE.format(cls._determine_user_id(), card_id) response_raw = api_client.post(endpoint_url, request_bytes, custom_headers) return BunqResponseInt.cast_from_bunq_response( cls._process_for_id(response_raw) )
def create(cls, card_id, name_on_card=None, pin_code=None, second_line=None, custom_headers=None)
Request a card replacement. :type user_id: int :type card_id: int :param name_on_card: The user's name as it will be on the card. Check 'card-name' for the available card names for a user. :type name_on_card: str :param pin_code: The plaintext pin code. Requests require encryption to be enabled. :type pin_code: str :param second_line: The second line on the card. :type second_line: str :type custom_headers: dict[str, str]|None :rtype: BunqResponseInt
2.319067
1.986008
1.167702
if custom_headers is None: custom_headers = {} api_client = client.ApiClient(cls._get_api_context()) endpoint_url = cls._ENDPOINT_URL_READ.format(cls._determine_user_id(), card_id) response_raw = api_client.get(endpoint_url, {}, custom_headers) return BunqResponseCard.cast_from_bunq_response( cls._from_json(response_raw, cls._OBJECT_TYPE_GET) )
def get(cls, card_id, custom_headers=None)
Return the details of a specific card. :type api_context: context.ApiContext :type user_id: int :type card_id: int :type custom_headers: dict[str, str]|None :rtype: BunqResponseCard
3.284832
2.462605
1.333885
if self._id_ is not None: return False if self._created is not None: return False if self._updated is not None: return False if self._status is not None: return False if self._cash_register is not None: return False if self._tab_object is not None: return False return True
def is_all_field_none(self)
:rtype: bool
3.161773
2.79484
1.13129
if custom_headers is None: custom_headers = {} request_map = { cls.FIELD_NAME: name, cls.FIELD_STATUS: status, cls.FIELD_AVATAR_UUID: avatar_uuid, cls.FIELD_LOCATION: location, cls.FIELD_NOTIFICATION_FILTERS: notification_filters, cls.FIELD_TAB_TEXT_WAITING_SCREEN: tab_text_waiting_screen } request_map_string = converter.class_to_json(request_map) request_map_string = cls._remove_field_for_request(request_map_string) api_client = client.ApiClient(cls._get_api_context()) request_bytes = request_map_string.encode() endpoint_url = cls._ENDPOINT_URL_CREATE.format(cls._determine_user_id(), cls._determine_monetary_account_id( monetary_account_id)) response_raw = api_client.post(endpoint_url, request_bytes, custom_headers) return BunqResponseInt.cast_from_bunq_response( cls._process_for_id(response_raw) )
def create(cls, name, status, avatar_uuid, monetary_account_id=None, location=None, notification_filters=None, tab_text_waiting_screen=None, custom_headers=None)
Create a new CashRegister. Only an UserCompany can create a CashRegisters. They need to be created with status PENDING_APPROVAL, an bunq admin has to approve your CashRegister before you can use it. In the sandbox testing environment an CashRegister will be automatically approved immediately after creation. :type user_id: int :type monetary_account_id: int :param name: The name of the CashRegister. Must be unique for this MonetaryAccount. :type name: str :param status: The status of the CashRegister. Can only be created or updated with PENDING_APPROVAL or CLOSED. :type status: str :param avatar_uuid: The UUID of the avatar of the CashRegister. Use the calls /attachment-public and /avatar to create a new Avatar and get its UUID. :type avatar_uuid: str :param location: The geolocation of the CashRegister. :type location: object_.Geolocation :param notification_filters: The types of notifications that will result in a push notification or URL callback for this CashRegister. :type notification_filters: list[object_.NotificationFilter] :param tab_text_waiting_screen: The tab text for waiting screen of CashRegister. :type tab_text_waiting_screen: list[object_.TabTextWaitingScreen] :type custom_headers: dict[str, str]|None :rtype: BunqResponseInt
1.822998
1.649286
1.105326
if self._id_ is not None: return False if self._created is not None: return False if self._updated is not None: return False if self._name is not None: return False if self._status is not None: return False if self._avatar is not None: return False if self._location is not None: return False if self._notification_filters is not None: return False if self._tab_text_waiting_screen is not None: return False return True
def is_all_field_none(self)
:rtype: bool
2.971649
2.733741
1.087027
if self._TabUsageSingle is not None: return self._TabUsageSingle if self._TabUsageMultiple is not None: return self._TabUsageMultiple raise exception.BunqException(self._ERROR_NULL_FIELDS)
def get_referenced_object(self)
:rtype: core.BunqModel :raise: BunqException
8.024981
6.491405
1.236247
if self._uuid is not None: return False if self._created is not None: return False if self._updated is not None: return False if self._merchant_reference is not None: return False if self._description is not None: return False if self._status is not None: return False if self._amount_total is not None: return False if self._amount_paid is not None: return False if self._qr_code_token is not None: return False if self._tab_url is not None: return False if self._visibility is not None: return False if self._minimum_age is not None: return False if self._require_address is not None: return False if self._redirect_url is not None: return False if self._expiration is not None: return False if self._alias is not None: return False if self._cash_register_location is not None: return False if self._tab_item is not None: return False if self._tab_attachment is not None: return False return True
def is_all_field_none(self)
:rtype: bool
2.319907
2.239822
1.035755
if self._id_ is not None: return False if self._description is not None: return False if self._ean_code is not None: return False if self._avatar_attachment is not None: return False if self._tab_attachment is not None: return False if self._quantity is not None: return False if self._amount is not None: return False return True
def is_all_field_none(self)
:rtype: bool
3.102584
2.776655
1.117382
if custom_headers is None: custom_headers = {} api_client = client.ApiClient(cls._get_api_context()) request_map = { cls.FIELD_STATUS: status, cls.FIELD_AMOUNT_TOTAL: amount_total, cls.FIELD_VISIBILITY: visibility, cls.FIELD_EXPIRATION: expiration, cls.FIELD_TAB_ATTACHMENT: tab_attachment } request_map_string = converter.class_to_json(request_map) request_map_string = cls._remove_field_for_request(request_map_string) request_bytes = request_map_string.encode() endpoint_url = cls._ENDPOINT_URL_UPDATE.format(cls._determine_user_id(), cls._determine_monetary_account_id( monetary_account_id), cash_register_id, tab_usage_multiple_uuid) response_raw = api_client.put(endpoint_url, request_bytes, custom_headers) return BunqResponseStr.cast_from_bunq_response( cls._process_for_uuid(response_raw) )
def update(cls, cash_register_id, tab_usage_multiple_uuid, monetary_account_id=None, status=None, amount_total=None, visibility=None, expiration=None, tab_attachment=None, custom_headers=None)
Modify a specific TabUsageMultiple. You can change the amount_total, status and visibility. Once you change the status to PAYABLE the TabUsageMultiple will expire after a year (default). If you've created any TabItems for a Tab the sum of the amounts of these items must be equal to the total_amount of the Tab when you change its status to PAYABLE. :type user_id: int :type monetary_account_id: int :type cash_register_id: int :type tab_usage_multiple_uuid: str :param status: The status of the TabUsageMultiple. On creation the status must be set to OPEN. You can change the status from OPEN to PAYABLE. If the TabUsageMultiple gets paid the status will remain PAYABLE. :type status: str :param amount_total: The total amount of the Tab. Must be a positive amount. As long as the tab has the status OPEN you can change the total amount. This amount is not affected by the amounts of the TabItems. However, if you've created any TabItems for a Tab the sum of the amounts of these items must be equal to the total_amount of the Tab when you change its status to PAYABLE :type amount_total: object_.Amount :param visibility: The visibility of a Tab. A Tab can be visible trough NearPay, the QR code of the CashRegister and its own QR code. :type visibility: object_.TabVisibility :param expiration: The moment when this Tab expires. Can be at most 365 days into the future. :type expiration: str :param tab_attachment: An array of attachments that describe the tab. Uploaded through the POST /user/{userid}/attachment-tab endpoint. :type tab_attachment: list[object_.BunqId] :type custom_headers: dict[str, str]|None :rtype: BunqResponseStr
2.105884
2.014869
1.045172
if custom_headers is None: custom_headers = {} request_map = { cls.FIELD_DESCRIPTION: description, cls.FIELD_SECRET: secret, cls.FIELD_PERMITTED_IPS: permitted_ips } request_map_string = converter.class_to_json(request_map) request_map_string = cls._remove_field_for_request(request_map_string) api_client = client.ApiClient(cls._get_api_context()) request_bytes = request_map_string.encode() endpoint_url = cls._ENDPOINT_URL_CREATE response_raw = api_client.post(endpoint_url, request_bytes, custom_headers) return BunqResponseInt.cast_from_bunq_response( cls._process_for_id(response_raw) )
def create(cls, description, secret, permitted_ips=None, custom_headers=None)
Create a new DeviceServer providing the installation token in the header and signing the request with the private part of the key you used to create the installation. The API Key that you are using will be bound to the IP address of the DeviceServer which you have created.<br/><br/>Using a Wildcard API Key gives you the freedom to make API calls even if the IP address has changed after the POST device-server.<br/><br/>Find out more at this link <a href="https://bunq.com/en/apikey-dynamic-ip" target="_blank">https://bunq.com/en/apikey-dynamic-ip</a>. :param description: The description of the DeviceServer. This is only for your own reference when reading the DeviceServer again. :type description: str :param secret: The API key. You can request an API key in the bunq app. :type secret: str :param permitted_ips: An array of IPs (v4 or v6) this DeviceServer will be able to do calls from. These will be linked to the API key. :type permitted_ips: list[str] :type custom_headers: dict[str, str]|None :rtype: BunqResponseInt
2.369388
2.104936
1.125634
if custom_headers is None: custom_headers = {} api_client = client.ApiClient(cls._get_api_context()) endpoint_url = cls._ENDPOINT_URL_READ.format(device_server_id) response_raw = api_client.get(endpoint_url, {}, custom_headers) return BunqResponseDeviceServer.cast_from_bunq_response( cls._from_json(response_raw, cls._OBJECT_TYPE_GET) )
def get(cls, device_server_id, custom_headers=None)
Get one of your DeviceServers. :type api_context: context.ApiContext :type device_server_id: int :type custom_headers: dict[str, str]|None :rtype: BunqResponseDeviceServer
3.092345
2.549891
1.212736
if self._id_ is not None: return False if self._created is not None: return False if self._updated is not None: return False if self._description is not None: return False if self._ip is not None: return False if self._status is not None: return False return True
def is_all_field_none(self)
:rtype: bool
2.587884
2.288482
1.13083
if custom_headers is None: custom_headers = {} api_client = client.ApiClient(cls._get_api_context()) endpoint_url = cls._ENDPOINT_URL_READ.format(device_id) response_raw = api_client.get(endpoint_url, {}, custom_headers) return BunqResponseDevice.cast_from_bunq_response( cls._from_json(response_raw) )
def get(cls, device_id, custom_headers=None)
Get a single Device. A Device is either a DevicePhone or a DeviceServer. :type api_context: context.ApiContext :type device_id: int :type custom_headers: dict[str, str]|None :rtype: BunqResponseDevice
3.170433
2.529441
1.253412
if self._DeviceServer is not None: return self._DeviceServer raise exception.BunqException(self._ERROR_NULL_FIELDS)
def get_referenced_object(self)
:rtype: core.BunqModel :raise: BunqException
17.57975
13.970719
1.258328
if custom_headers is None: custom_headers = {} request_map = { cls.FIELD_STATUS: status, cls.FIELD_ENTRIES: entries, cls.FIELD_PREVIOUS_UPDATED_TIMESTAMP: previous_updated_timestamp, cls.FIELD_NUMBER_OF_REQUIRED_ACCEPTS: number_of_required_accepts } request_map_string = converter.class_to_json(request_map) request_map_string = cls._remove_field_for_request(request_map_string) api_client = client.ApiClient(cls._get_api_context()) request_bytes = request_map_string.encode() endpoint_url = cls._ENDPOINT_URL_CREATE.format(cls._determine_user_id(), cls._determine_monetary_account_id( monetary_account_id)) response_raw = api_client.post(endpoint_url, request_bytes, custom_headers) return BunqResponseInt.cast_from_bunq_response( cls._process_for_id(response_raw) )
def create(cls, entries, number_of_required_accepts, monetary_account_id=None, status=None, previous_updated_timestamp=None, custom_headers=None)
Create a new DraftPayment. :type user_id: int :type monetary_account_id: int :param entries: The list of entries in the DraftPayment. Each entry will result in a payment when the DraftPayment is accepted. :type entries: list[object_.DraftPaymentEntry] :param number_of_required_accepts: The number of accepts that are required for the draft payment to receive status ACCEPTED. Currently only 1 is valid. :type number_of_required_accepts: int :param status: The status of the DraftPayment. :type status: str :param previous_updated_timestamp: The last updated_timestamp that you received for this DraftPayment. This needs to be provided to prevent race conditions. :type previous_updated_timestamp: str :type custom_headers: dict[str, str]|None :rtype: BunqResponseInt
2.060617
1.841004
1.11929
if self._id_ is not None: return False if self._monetary_account_id is not None: return False if self._user_alias_created is not None: return False if self._responses is not None: return False if self._status is not None: return False if self._type_ is not None: return False if self._entries is not None: return False if self._object_ is not None: return False if self._request_reference_split_the_bill is not None: return False return True
def is_all_field_none(self)
:rtype: bool
3.414454
3.188733
1.070787
if custom_headers is None: custom_headers = {} api_client = client.ApiClient(cls._get_api_context()) request_map = { cls.FIELD_STATUS: status, cls.FIELD_SUB_STATUS: sub_status, cls.FIELD_EXPIRATION: expiration } request_map_string = converter.class_to_json(request_map) request_map_string = cls._remove_field_for_request(request_map_string) request_bytes = request_map_string.encode() endpoint_url = cls._ENDPOINT_URL_UPDATE.format(cls._determine_user_id(), draft_share_invite_api_key_id) response_raw = api_client.put(endpoint_url, request_bytes, custom_headers) return BunqResponseDraftShareInviteApiKey.cast_from_bunq_response( cls._from_json(response_raw, cls._OBJECT_TYPE_PUT) )
def update(cls, draft_share_invite_api_key_id, status=None, sub_status=None, expiration=None, custom_headers=None)
Update a draft share invite. When sending status CANCELLED it is possible to cancel the draft share invite. :type user_id: int :type draft_share_invite_api_key_id: int :param status: The status of the draft share invite. Can be CANCELLED (the user cancels the draft share before it's used). :type status: str :param sub_status: The sub-status of the draft share invite. Can be NONE, ACCEPTED or REJECTED. :type sub_status: str :param expiration: The moment when this draft share invite expires. :type expiration: str :type custom_headers: dict[str, str]|None :rtype: BunqResponseDraftShareInviteApiKey
2.450641
2.127872
1.151686
if self._user_alias_created is not None: return False if self._status is not None: return False if self._sub_status is not None: return False if self._expiration is not None: return False if self._draft_share_url is not None: return False if self._api_key is not None: return False if self._id_ is not None: return False return True
def is_all_field_none(self)
:rtype: bool
3.481817
3.200807
1.087794
if self._user_alias_created is not None: return False if self._status is not None: return False if self._expiration is not None: return False if self._share_invite_bank_response_id is not None: return False if self._draft_share_url is not None: return False if self._draft_share_settings is not None: return False if self._id_ is not None: return False return True
def is_all_field_none(self)
:rtype: bool
4.236854
3.882471
1.091278
if self._id_ is not None: return False if self._created is not None: return False if self._updated is not None: return False if self._action is not None: return False if self._user_id is not None: return False if self._monetary_account_id is not None: return False if self._object_ is not None: return False if self._status is not None: return False return True
def is_all_field_none(self)
:rtype: bool
2.511074
2.297495
1.092962
if self._avatar is not None: return False if self._title is not None: return False if self._sub_title is not None: return False return True
def is_all_field_none(self)
:rtype: bool
4.335737
3.409837
1.271538
if self._monetary_account_id is not None: return False if self._alias is not None: return False if self._counterparty_alias is not None: return False if self._amount_guaranteed is not None: return False if self._amount_requested is not None: return False if self._expiration is not None: return False if self._issuer is not None: return False if self._issuer_name is not None: return False if self._issuer_authentication_url is not None: return False if self._purchase_identifier is not None: return False if self._status is not None: return False if self._status_timestamp is not None: return False if self._transaction_identifier is not None: return False if self._allow_chat is not None: return False return True
def is_all_field_none(self)
:rtype: bool
2.463394
2.375803
1.036868
if self._time_start is not None: return False if self._time_end is not None: return False if self._recurrence_unit is not None: return False if self._recurrence_size is not None: return False if self._status is not None: return False if self._object_ is not None: return False return True
def is_all_field_none(self)
:rtype: bool
2.964125
2.641864
1.121983
if self._state is not None: return False if self._time_start is not None: return False if self._time_end is not None: return False if self._error_message is not None: return False if self._scheduled_object is not None: return False if self._result_object is not None: return False if self._request_reference_split_the_bill is not None: return False return True
def is_all_field_none(self)
:rtype: bool
3.267485
3.062748
1.066848
if self._id_ is not None: return False if self._monetary_account_id is not None: return False if self._card_id is not None: return False if self._amount_local is not None: return False if self._amount_converted is not None: return False if self._amount_billing is not None: return False if self._amount_original_local is not None: return False if self._amount_original_billing is not None: return False if self._amount_fee is not None: return False if self._card_authorisation_id_response is not None: return False if self._decision is not None: return False if self._decision_description is not None: return False if self._decision_description_translated is not None: return False if self._description is not None: return False if self._authorisation_status is not None: return False if self._authorisation_type is not None: return False if self._pan_entry_mode_user is not None: return False if self._settlement_status is not None: return False if self._city is not None: return False if self._alias is not None: return False if self._counterparty_alias is not None: return False if self._label_card is not None: return False if self._token_status is not None: return False if self._reservation_expiry_time is not None: return False if self._applied_limit is not None: return False if self._allow_chat is not None: return False if self._eligible_whitelist_id is not None: return False if self._secure_code_id is not None: return False if self._wallet_provider_id is not None: return False if self._request_reference_split_the_bill is not None: return False return True
def is_all_field_none(self)
:rtype: bool
2.564416
2.509163
1.02202
if custom_headers is None: custom_headers = {} request_map = { cls.FIELD_REQUEST_INQUIRIES: request_inquiries, cls.FIELD_STATUS: status, cls.FIELD_TOTAL_AMOUNT_INQUIRED: total_amount_inquired, cls.FIELD_EVENT_ID: event_id } request_map_string = converter.class_to_json(request_map) request_map_string = cls._remove_field_for_request(request_map_string) api_client = client.ApiClient(cls._get_api_context()) request_bytes = request_map_string.encode() endpoint_url = cls._ENDPOINT_URL_CREATE.format(cls._determine_user_id(), cls._determine_monetary_account_id( monetary_account_id)) response_raw = api_client.post(endpoint_url, request_bytes, custom_headers) return BunqResponseInt.cast_from_bunq_response( cls._process_for_id(response_raw) )
def create(cls, request_inquiries, total_amount_inquired, monetary_account_id=None, status=None, event_id=None, custom_headers=None)
Create a request batch by sending an array of single request objects, that will become part of the batch. :type user_id: int :type monetary_account_id: int :param request_inquiries: The list of request inquiries we want to send in 1 batch. :type request_inquiries: list[RequestInquiry] :param total_amount_inquired: The total amount originally inquired for this batch. :type total_amount_inquired: object_.Amount :param status: The status of the request. :type status: str :param event_id: The ID of the associated event if the request batch was made using 'split the bill'. :type event_id: int :type custom_headers: dict[str, str]|None :rtype: BunqResponseInt
2.006335
1.821448
1.101506
if self._request_inquiries is not None: return False if self._total_amount_inquired is not None: return False if self._reference_split_the_bill is not None: return False return True
def is_all_field_none(self)
:rtype: bool
6.263606
5.549325
1.128715
if custom_headers is None: custom_headers = {} api_client = client.ApiClient(cls._get_api_context()) request_map = { cls.FIELD_STATUS: status } request_map_string = converter.class_to_json(request_map) request_map_string = cls._remove_field_for_request(request_map_string) request_bytes = request_map_string.encode() endpoint_url = cls._ENDPOINT_URL_UPDATE.format(cls._determine_user_id(), cls._determine_monetary_account_id( monetary_account_id), request_inquiry_id) response_raw = api_client.put(endpoint_url, request_bytes, custom_headers) return BunqResponseRequestInquiry.cast_from_bunq_response( cls._from_json(response_raw, cls._OBJECT_TYPE_PUT) )
def update(cls, request_inquiry_id, monetary_account_id=None, status=None, custom_headers=None)
Revoke a request for payment, by updating the status to REVOKED. :type user_id: int :type monetary_account_id: int :type request_inquiry_id: int :param status: The status of the RequestInquiry. Ignored in POST requests but can be used for revoking (cancelling) the RequestInquiry by setting REVOKED with a PUT request. :type status: str :type custom_headers: dict[str, str]|None :rtype: BunqResponseRequestInquiry
2.53446
2.172211
1.166765
if self._id_ is not None: return False if self._created is not None: return False if self._updated is not None: return False if self._time_responded is not None: return False if self._time_expiry is not None: return False if self._monetary_account_id is not None: return False if self._amount_inquired is not None: return False if self._amount_responded is not None: return False if self._user_alias_created is not None: return False if self._user_alias_revoked is not None: return False if self._counterparty_alias is not None: return False if self._description is not None: return False if self._merchant_reference is not None: return False if self._attachment is not None: return False if self._status is not None: return False if self._batch_id is not None: return False if self._scheduled_id is not None: return False if self._minimum_age is not None: return False if self._require_address is not None: return False if self._bunqme_share_url is not None: return False if self._redirect_url is not None: return False if self._address_shipping is not None: return False if self._address_billing is not None: return False if self._geolocation is not None: return False if self._allow_chat is not None: return False if self._reference_split_the_bill is not None: return False return True
def is_all_field_none(self)
:rtype: bool
2.376301
2.316319
1.025895
if custom_headers is None: custom_headers = {} api_client = client.ApiClient(cls._get_api_context()) request_map = { cls.FIELD_AMOUNT_RESPONDED: amount_responded, cls.FIELD_STATUS: status, cls.FIELD_ADDRESS_SHIPPING: address_shipping, cls.FIELD_ADDRESS_BILLING: address_billing } request_map_string = converter.class_to_json(request_map) request_map_string = cls._remove_field_for_request(request_map_string) request_bytes = request_map_string.encode() endpoint_url = cls._ENDPOINT_URL_UPDATE.format(cls._determine_user_id(), cls._determine_monetary_account_id( monetary_account_id), request_response_id) response_raw = api_client.put(endpoint_url, request_bytes, custom_headers) return BunqResponseRequestResponse.cast_from_bunq_response( cls._from_json(response_raw, cls._OBJECT_TYPE_PUT) )
def update(cls, request_response_id, monetary_account_id=None, amount_responded=None, status=None, address_shipping=None, address_billing=None, custom_headers=None)
Update the status to accept or reject the RequestResponse. :type user_id: int :type monetary_account_id: int :type request_response_id: int :param amount_responded: The Amount the user decides to pay. :type amount_responded: object_.Amount :param status: The responding status of the RequestResponse. Can be ACCEPTED or REJECTED. :type status: str :param address_shipping: The shipping Address to return to the user who created the RequestInquiry. Should only be provided if 'require_address' is set to SHIPPING, BILLING_SHIPPING or OPTIONAL. :type address_shipping: object_.Address :param address_billing: The billing Address to return to the user who created the RequestInquiry. Should only be provided if 'require_address' is set to BILLING, BILLING_SHIPPING or OPTIONAL. :type address_billing: object_.Address :type custom_headers: dict[str, str]|None :rtype: BunqResponseRequestResponse
2.227808
1.960466
1.136366
if self._id_ is not None: return False if self._created is not None: return False if self._updated is not None: return False if self._time_responded is not None: return False if self._time_expiry is not None: return False if self._time_refund_requested is not None: return False if self._time_refunded is not None: return False if self._user_refund_requested is not None: return False if self._monetary_account_id is not None: return False if self._amount_inquired is not None: return False if self._amount_responded is not None: return False if self._status is not None: return False if self._description is not None: return False if self._alias is not None: return False if self._counterparty_alias is not None: return False if self._attachment is not None: return False if self._minimum_age is not None: return False if self._require_address is not None: return False if self._geolocation is not None: return False if self._type_ is not None: return False if self._sub_type is not None: return False if self._redirect_url is not None: return False if self._address_billing is not None: return False if self._address_shipping is not None: return False if self._allow_chat is not None: return False if self._credit_scheme_identifier is not None: return False if self._mandate_identifier is not None: return False if self._eligible_whitelist_id is not None: return False if self._request_reference_split_the_bill is not None: return False return True
def is_all_field_none(self)
:rtype: bool
2.35325
2.30599
1.020494
if self._tab is not None: return False if self._payment is not None: return False if self._request_reference_split_the_bill is not None: return False return True
def is_all_field_none(self)
:rtype: bool
6.479206
5.783385
1.120314
if self._id_ is not None: return False if self._monetary_account_paying_id is not None: return False if self._status is not None: return False if self._error_message is not None: return False if self._whitelist is not None: return False if self._object_ is not None: return False if self._request_reference_split_the_bill is not None: return False return True
def is_all_field_none(self)
:rtype: bool
4.036007
3.714268
1.086622
if self._id_ is not None: return False if self._created is not None: return False if self._updated is not None: return False if self._status is not None: return False if self._sub_status is not None: return False if self._type_ is not None: return False if self._counterparty_alias is not None: return False if self._amount_reward is not None: return False return True
def is_all_field_none(self)
:rtype: bool
2.751971
2.538556
1.08407
if custom_headers is None: custom_headers = {} request_map = { cls.FIELD_COUNTER_USER_ALIAS: counter_user_alias, cls.FIELD_DRAFT_SHARE_INVITE_BANK_ID: draft_share_invite_bank_id, cls.FIELD_SHARE_DETAIL: share_detail, cls.FIELD_STATUS: status, cls.FIELD_SHARE_TYPE: share_type, cls.FIELD_START_DATE: start_date, cls.FIELD_END_DATE: end_date } request_map_string = converter.class_to_json(request_map) request_map_string = cls._remove_field_for_request(request_map_string) api_client = client.ApiClient(cls._get_api_context()) request_bytes = request_map_string.encode() endpoint_url = cls._ENDPOINT_URL_CREATE.format(cls._determine_user_id(), cls._determine_monetary_account_id( monetary_account_id)) response_raw = api_client.post(endpoint_url, request_bytes, custom_headers) return BunqResponseInt.cast_from_bunq_response( cls._process_for_id(response_raw) )
def create(cls, counter_user_alias, share_detail, status, monetary_account_id=None, draft_share_invite_bank_id=None, share_type=None, start_date=None, end_date=None, custom_headers=None)
Create a new share inquiry for a monetary account, specifying the permission the other bunq user will have on it. :type user_id: int :type monetary_account_id: int :param counter_user_alias: The pointer of the user to share with. :type counter_user_alias: object_.Pointer :param share_detail: The share details. Only one of these objects may be passed. :type share_detail: object_.ShareDetail :param status: The status of the share. Can be PENDING, REVOKED (the user deletes the share inquiry before it's accepted), ACCEPTED, CANCELLED (the user deletes an active share) or CANCELLATION_PENDING, CANCELLATION_ACCEPTED, CANCELLATION_REJECTED (for canceling mutual connects). :type status: str :param draft_share_invite_bank_id: The id of the draft share invite bank. :type draft_share_invite_bank_id: int :param share_type: The share type, either STANDARD or MUTUAL. :type share_type: str :param start_date: The start date of this share. :type start_date: str :param end_date: The expiration date of this share. :type end_date: str :type custom_headers: dict[str, str]|None :rtype: BunqResponseInt
1.889125
1.645782
1.147859
if custom_headers is None: custom_headers = {} api_client = client.ApiClient(cls._get_api_context()) request_map = { cls.FIELD_SHARE_DETAIL: share_detail, cls.FIELD_STATUS: status, cls.FIELD_START_DATE: start_date, cls.FIELD_END_DATE: end_date } request_map_string = converter.class_to_json(request_map) request_map_string = cls._remove_field_for_request(request_map_string) request_bytes = request_map_string.encode() endpoint_url = cls._ENDPOINT_URL_UPDATE.format(cls._determine_user_id(), cls._determine_monetary_account_id( monetary_account_id), share_invite_bank_inquiry_id) response_raw = api_client.put(endpoint_url, request_bytes, custom_headers) return BunqResponseInt.cast_from_bunq_response( cls._process_for_id(response_raw) )
def update(cls, share_invite_bank_inquiry_id, monetary_account_id=None, share_detail=None, status=None, start_date=None, end_date=None, custom_headers=None)
Update the details of a share. This includes updating status (revoking or cancelling it), granted permission and validity period of this share. :type user_id: int :type monetary_account_id: int :type share_invite_bank_inquiry_id: int :param share_detail: The share details. Only one of these objects may be passed. :type share_detail: object_.ShareDetail :param status: The status of the share. Can be PENDING, REVOKED (the user deletes the share inquiry before it's accepted), ACCEPTED, CANCELLED (the user deletes an active share) or CANCELLATION_PENDING, CANCELLATION_ACCEPTED, CANCELLATION_REJECTED (for canceling mutual connects). :type status: str :param start_date: The start date of this share. :type start_date: str :param end_date: The expiration date of this share. :type end_date: str :type custom_headers: dict[str, str]|None :rtype: BunqResponseInt
2.198963
1.8901
1.163411
if self._alias is not None: return False if self._user_alias_created is not None: return False if self._user_alias_revoked is not None: return False if self._counter_user_alias is not None: return False if self._monetary_account_id is not None: return False if self._draft_share_invite_bank_id is not None: return False if self._share_detail is not None: return False if self._status is not None: return False if self._share_type is not None: return False if self._start_date is not None: return False if self._end_date is not None: return False if self._id_ is not None: return False return True
def is_all_field_none(self)
:rtype: bool
2.662089
2.544413
1.046249
if self._id_ is not None: return False if self._created is not None: return False if self._updated is not None: return False if self._counter_alias is not None: return False if self._user_alias_cancelled is not None: return False if self._monetary_account_id is not None: return False if self._draft_share_invite_bank_id is not None: return False if self._share_detail is not None: return False if self._status is not None: return False if self._share_type is not None: return False if self._start_date is not None: return False if self._end_date is not None: return False if self._description is not None: return False return True
def is_all_field_none(self)
:rtype: bool
2.630567
2.508015
1.048864
if self._monetary_account_id is not None: return False if self._alias is not None: return False if self._counterparty_alias is not None: return False if self._amount_guaranteed is not None: return False if self._amount_requested is not None: return False if self._issuer is not None: return False if self._issuer_authentication_url is not None: return False if self._status is not None: return False if self._error_message is not None: return False if self._transaction_identifier is not None: return False return True
def is_all_field_none(self)
:rtype: bool
2.603569
2.479846
1.049891
if custom_headers is None: custom_headers = {} api_client = client.ApiClient(cls._get_api_context()) endpoint_url = cls._ENDPOINT_URL_READ.format(cls._determine_user_id(), transferwise_quote_id, transferwise_transfer_id) response_raw = api_client.get(endpoint_url, {}, custom_headers) return BunqResponseTransferwiseTransfer.cast_from_bunq_response( cls._from_json(response_raw, cls._OBJECT_TYPE_GET) )
def get(cls, transferwise_quote_id, transferwise_transfer_id, custom_headers=None)
:type api_context: context.ApiContext :type user_id: int :type transferwise_quote_id: int :type transferwise_transfer_id: int :type custom_headers: dict[str, str]|None :rtype: BunqResponseTransferwiseTransfer
2.862662
2.313651
1.237292
if self._alias is not None: return False if self._counterparty_alias is not None: return False if self._status is not None: return False if self._sub_status is not None: return False if self._status_transferwise is not None: return False if self._status_transferwise_issue is not None: return False if self._amount_source is not None: return False if self._amount_target is not None: return False if self._rate is not None: return False if self._reference is not None: return False if self._pay_in_reference is not None: return False if self._time_delivery_estimate is not None: return False if self._quote is not None: return False return True
def is_all_field_none(self)
:rtype: bool
2.659817
2.546406
1.044538
if self._id_ is not None: return False if self._created is not None: return False if self._updated is not None: return False if self._time_expiry is not None: return False if self._quote_id is not None: return False if self._amount_source is not None: return False if self._amount_target is not None: return False if self._amount_fee is not None: return False if self._rate is not None: return False if self._time_delivery_estimate is not None: return False return True
def is_all_field_none(self)
:rtype: bool
2.57584
2.401283
1.072693
if self._id_ is not None: return False if self._created is not None: return False if self._updated is not None: return False if self._year is not None: return False if self._alias_user is not None: return False return True
def is_all_field_none(self)
:rtype: bool
3.383687
2.930938
1.154473
if custom_headers is None: custom_headers = {} request_map = { cls.FIELD_STATEMENT_FORMAT: statement_format, cls.FIELD_DATE_START: date_start, cls.FIELD_DATE_END: date_end, cls.FIELD_REGIONAL_FORMAT: regional_format } request_map_string = converter.class_to_json(request_map) request_map_string = cls._remove_field_for_request(request_map_string) api_client = client.ApiClient(cls._get_api_context()) request_bytes = request_map_string.encode() endpoint_url = cls._ENDPOINT_URL_CREATE.format(cls._determine_user_id(), cls._determine_monetary_account_id( monetary_account_id)) response_raw = api_client.post(endpoint_url, request_bytes, custom_headers) return BunqResponseInt.cast_from_bunq_response( cls._process_for_id(response_raw) )
def create(cls, statement_format, date_start, date_end, monetary_account_id=None, regional_format=None, custom_headers=None)
:type user_id: int :type monetary_account_id: int :param statement_format: The format type of statement. Allowed values: MT940, CSV, PDF. :type statement_format: str :param date_start: The start date for making statements. :type date_start: str :param date_end: The end date for making statements. :type date_end: str :param regional_format: Required for CSV exports. The regional format of the statement, can be UK_US (comma-separated) or EUROPEAN (semicolon-separated). :type regional_format: str :type custom_headers: dict[str, str]|None :rtype: BunqResponseInt
2.067044
1.753175
1.179029
if self._id_ is not None: return False if self._created is not None: return False if self._updated is not None: return False if self._date_start is not None: return False if self._date_end is not None: return False if self._status is not None: return False if self._statement_number is not None: return False if self._statement_format is not None: return False if self._regional_format is not None: return False if self._alias_monetary_account is not None: return False return True
def is_all_field_none(self)
:rtype: bool
2.627391
2.477587
1.060464
if self._id_ is not None: return False if self._created is not None: return False if self._updated is not None: return False if self._avatar is not None: return False if self._currency is not None: return False if self._description is not None: return False if self._daily_limit is not None: return False if self._daily_spent is not None: return False if self._overdraft_limit is not None: return False if self._balance is not None: return False if self._alias is not None: return False if self._public_uuid is not None: return False if self._status is not None: return False if self._sub_status is not None: return False if self._reason is not None: return False if self._reason_description is not None: return False if self._all_co_owner is not None: return False if self._user_id is not None: return False if self._monetary_account_profile is not None: return False if self._notification_filters is not None: return False if self._setting is not None: return False return True
def is_all_field_none(self)
:rtype: bool
2.246356
2.167217
1.036516
if self._MonetaryAccountBank is not None: return self._MonetaryAccountBank if self._MonetaryAccountJoint is not None: return self._MonetaryAccountJoint if self._MonetaryAccountLight is not None: return self._MonetaryAccountLight if self._MonetaryAccountSavings is not None: return self._MonetaryAccountSavings raise exception.BunqException(self._ERROR_NULL_FIELDS)
def get_referenced_object(self)
:rtype: core.BunqModel :raise: BunqException
4.035702
3.15469
1.27927
if self._MonetaryAccountBank is not None: return False if self._MonetaryAccountJoint is not None: return False if self._MonetaryAccountLight is not None: return False if self._MonetaryAccountSavings is not None: return False return True
def is_all_field_none(self)
:rtype: bool
4.489518
3.874072
1.158863
if self._id_ is not None: return False if self._created is not None: return False if self._updated is not None: return False if self._avatar is not None: return False if self._currency is not None: return False if self._description is not None: return False if self._daily_limit is not None: return False if self._daily_spent is not None: return False if self._balance is not None: return False if self._alias is not None: return False if self._public_uuid is not None: return False if self._status is not None: return False if self._sub_status is not None: return False if self._reason is not None: return False if self._reason_description is not None: return False if self._user_id is not None: return False if self._balance_maximum is not None: return False if self._budget_month_used is not None: return False if self._budget_month_maximum is not None: return False if self._budget_year_used is not None: return False if self._budget_year_maximum is not None: return False if self._budget_withdrawal_year_used is not None: return False if self._budget_withdrawal_year_maximum is not None: return False if self._notification_filters is not None: return False if self._setting is not None: return False return True
def is_all_field_none(self)
:rtype: bool
1.950723
1.89744
1.028081
if custom_headers is None: custom_headers = {} api_client = client.ApiClient(cls._get_api_context()) endpoint_url = cls._ENDPOINT_URL_READ.format(cls._determine_user_id(), cls._determine_monetary_account_id( monetary_account_id), switch_service_payment_id, note_attachment_bank_switch_service_netherlands_incoming_payment_id) response_raw = api_client.get(endpoint_url, {}, custom_headers) return BunqResponseNoteAttachmentBankSwitchServiceNetherlandsIncomingPayment.cast_from_bunq_response( cls._from_json(response_raw, cls._OBJECT_TYPE_GET) )
def get(cls, switch_service_payment_id, note_attachment_bank_switch_service_netherlands_incoming_payment_id, monetary_account_id=None, custom_headers=None)
:type api_context: context.ApiContext :type user_id: int :type monetary_account_id: int :type switch_service_payment_id: int :type note_attachment_bank_switch_service_netherlands_incoming_payment_id: int :type custom_headers: dict[str, str]|None :rtype: BunqResponseNoteAttachmentBankSwitchServiceNetherlandsIncomingPayment
2.30604
2.114279
1.090698
if self._id_ is not None: return False if self._created is not None: return False if self._updated is not None: return False if self._label_user_creator is not None: return False if self._content is not None: return False return True
def is_all_field_none(self)
:rtype: bool
3.214003
2.826729
1.137004
if custom_headers is None: custom_headers = {} api_client = client.ApiClient(cls._get_api_context()) endpoint_url = cls._ENDPOINT_URL_READ.format(cls._determine_user_id(), cls._determine_monetary_account_id( monetary_account_id), bunqme_fundraiser_result_id, note_text_bunq_me_fundraiser_result_id) response_raw = api_client.get(endpoint_url, {}, custom_headers) return BunqResponseNoteTextBunqMeFundraiserResult.cast_from_bunq_response( cls._from_json(response_raw, cls._OBJECT_TYPE_GET) )
def get(cls, bunqme_fundraiser_result_id, note_text_bunq_me_fundraiser_result_id, monetary_account_id=None, custom_headers=None)
:type api_context: context.ApiContext :type user_id: int :type monetary_account_id: int :type bunqme_fundraiser_result_id: int :type note_text_bunq_me_fundraiser_result_id: int :type custom_headers: dict[str, str]|None :rtype: BunqResponseNoteTextBunqMeFundraiserResult
2.026674
2.002725
1.011958