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

SDK has no mapped field "id" from transactions #75

Open
KaduAmaral opened this issue Nov 30, 2023 · 3 comments
Open

SDK has no mapped field "id" from transactions #75

KaduAmaral opened this issue Nov 30, 2023 · 3 comments

Comments

@KaduAmaral
Copy link

The transaction ID field does not exists on Transaction class of SDK:

image

image

image

@wendel-stark
Copy link

Hi Kadu!

I would like to check if the object that you trying to obtain the ID is correct. When you try to get information after a query, for example, it's necessary to iterate an array. You can see an example in our test files of how we get the ID: https://github.com/starkbank/sdk-php/blob/master/tests/transaction.php

The ID it's not necessary in the constructor.

If you have any more questions, please do not hesitate to ask.

@KaduAmaral
Copy link
Author

Yeah, the field is coming when I run the code, but I'm saying that my IDE/Editor thinks this property does not exists and paint red the line as if my code is wrong.

image

Can you put this property on Transaction class?

@wendel-stark
Copy link

Hi Kadu!

It's not an issue for him not to be named within the class because, due to dynamic creation, PHP can identify and use the parameter. It's not a problem that should affect functionality, and if you have any doubts about how to access the ID, check other resources within the library for examples, like this one:

image

However, I appreciate the feedback, and we will make a change in the SDKs, adding the ID to all resources, not just within the Transaction.

Once we make the change, I'll notify you here. Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants