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

Iam going to check tripletex api docs, but customer addresses are not shown by this integration #4

Open
peon501 opened this issue Aug 30, 2018 · 2 comments

Comments

@peon501
Copy link

peon501 commented Aug 30, 2018

I'am going to check tripletex api docs, but customer addresses are not shown by this integration or it is in other place. :)

@kentdahl
Copy link

Looks to me like the customer addresses are not included in the customer response, only their IDs are. Perhaps they need to be explicitly stated as expanding fields in call to the API?

At any rate, it seems if you fetch the address by ID you'll get access to it.

>>> $customer->getPhysicalAddress()
=> zaporylie\Tripletex\Model\Address\Address {#4214}
>>> $customer->getPhysicalAddress()->getId()
=> 25407804
>>> $a = $app->address()->getAddress(25407804)
=> zaporylie\Tripletex\Model\Address\ResponseAddressWrapper {#4215}
>>> $a->getValue()
=> zaporylie\Tripletex\Model\Address\Address {#3897}
>>> $a->getValue()->getPostalCode()
=> "1453"

@kentdahl
Copy link

Quick testing show that if the fields attribute is given, you get the address as excepted:

'*,physicalAddress(*,country)'

However, the code here doesn't pass the fields argument along. Putting whatever helps me get further into the develop branch on my fork here:

@zaporylie ; let me know if you have some preference on how to submit PRs for things like this. TIA.

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