taxjar / taxjar-magento2-extension

Magento 2 Sales Tax Extension by TaxJar
http://www.taxjar.com/guides/integrations/magento2/
Open Software License 3.0
22 stars 30 forks source link

refactor: Transaction child classes with request setter methods #298

Closed sethobey closed 2 years ago

sethobey commented 2 years ago

Context

Closes #294

Although the Order::build method is public and we are able to modify the return value with a plugin/interceptor, the class's $request attribute is protected and set within Order::build, so any modification to the return result in an after plugin has no effect on the API request body.

Description

Adds public request body setter method to Transaction child classes.

Performance

N/A

Testing

Tested syncing order and validated solution to issue #294 with additional after plugin to modify transaction details.

Versions