Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix supperfouls fields error bunq/sdk_python#77 #91

Merged
merged 15 commits into from
May 7, 2018

Conversation

OGKevin
Copy link
Contributor

@OGKevin OGKevin commented Apr 13, 2018

References #77

@OGKevin OGKevin added this to the 0.13.5 milestone Apr 13, 2018
@OGKevin OGKevin self-assigned this Apr 13, 2018
@OGKevin OGKevin added this to To do in 1.0.0 - SDK via automation Apr 13, 2018
Copy link
Contributor Author

@OGKevin OGKevin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Mostly magic values and formatting.

@@ -31,16 +30,11 @@ def deserialize(cls, cls_target, obj_raw):

model_ = super()._deserialize_default(cls_target, obj_raw)

if isinstance(model_, core.AnchoredObjectInterface) and model_.is_all_field_none():
if isinstance(model_,
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Funny formatting.

@@ -62,6 +56,11 @@ def _get_object_class(cls, class_name):
:rtype: core.BunqModel
"""

class_name = class_name.lstrip('_')
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Magic.

@@ -166,6 +166,10 @@ def _determine_monetary_account_id(cls, monetary_account_id=None):

return monetary_account_id

@classmethod
def _remove_field_for_request(cls, json_str: str):
return json_str.replace('__field_for_request', '').replace('_field_for_request', '')
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

magic.

from bunq.sdk.model.generated.endpoint import Payment
from bunq.sdk.model.generated.endpoint import PaymentChat
from bunq.sdk.model.generated.object_ import Amount
from bunq.sdk.model.generated.object_ import Amount, Pointer
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

split.

from bunq.sdk.model.generated.endpoint import ChatMessageText
from typing import List

from bunq.sdk.model.generated.endpoint import ChatMessageText, PaymentBatch, \
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

split


all_payment: List[Payment] = []

while len(all_payment) < 10:
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

magic

while len(all_payment) < 10:
all_payment.append(
Payment(
Amount('0.01', 'EUR'),
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

magic values.

all_payment.append(
Payment(
Amount('0.01', 'EUR'),
Pointer('EMAIL', 'bravo@bunq.com'),
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

magic ❇️

Payment(
Amount('0.01', 'EUR'),
Pointer('EMAIL', 'bravo@bunq.com'),
'Python sdk payment batch test.'
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@bunq bunq deleted a comment Apr 13, 2018
@bunq bunq deleted a comment Apr 13, 2018
@bunq bunq deleted a comment Apr 13, 2018
@bunq bunq deleted a comment Apr 13, 2018
@bunq bunq deleted a comment Apr 13, 2018
@bunq bunq deleted a comment Apr 13, 2018
@bunq bunq deleted a comment Apr 13, 2018
@bunq bunq deleted a comment Apr 13, 2018
@bunq bunq deleted a comment Apr 13, 2018
@OGKevin OGKevin moved this from To do to open PR in 1.0.0 - SDK Apr 29, 2018
@OGKevin
Copy link
Contributor Author

OGKevin commented May 1, 2018

@JordyHeemskerk please 👀

@bunq bunq deleted a comment May 1, 2018
@bunq bunq deleted a comment May 1, 2018
@bunq bunq deleted a comment May 7, 2018
@OGKevin OGKevin merged commit 7f2ac9c into develop May 7, 2018
1.0.0 - SDK automation moved this from open PR to merged May 7, 2018
@OGKevin OGKevin deleted the fix_supperfouls_fields_error_bunq/sdk_python#77 branch May 7, 2018 15:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
No open projects
1.0.0 - SDK
  
merged
Development

Successfully merging this pull request may close these issues.

None yet

2 participants