Giter VIP home page Giter VIP logo

Comments (5)

jondmcelroy avatar jondmcelroy commented on August 19, 2024

The line parameter function does not add it to the line item model, but to a 'parameter' field in the line item model.

I also needed this functionality, made a PR here: #58

from avatax-rest-v2-php-sdk.

han8909227 avatar han8909227 commented on August 19, 2024

Hi @antwaanvh @jondmcelroy
The parameter field in the TransactionLineItemModel does not have unlimited option or storage for custom data, for a full list of option please call the ListParameter API. https://developer.avalara.com/api-reference/avatax/rest/v2/models/LineItemModel%20%3E%20Parameters/

If you would like to store custom data tie to each transaction/line item you should consider using the reference fields listed here: https://developer.avalara.com/avatax/dev-guide/customizing-transaction/using-reference-fields/

Thank you for raising the question, and let me know if this approach is not what you are looking for.
Han from Avalara

from avatax-rest-v2-php-sdk.

jondmcelroy avatar jondmcelroy commented on August 19, 2024

@han8909227
I believe that he is referring to the number field on the line item:
https://developer.avalara.com/api-reference/avatax/rest/v2/models/LineItemModel/

Its only custom in thinking towards the SDK which forces it to an auto-incremented number behind the scenes.

from avatax-rest-v2-php-sdk.

han8909227 avatar han8909227 commented on August 19, 2024

Hi @jondmcelroy @antwaanvh
So in that case, the transactionBuilder is only meant to build out a transactionModel for you. In case of the transactionLineModel you would actually have to construct the model, which you can include a custom "number" property for your own reference. And add the transactionLineMode to your transactionModel through the transactionBuilder method withLineItem()

I hope this helps,
Han

from avatax-rest-v2-php-sdk.

antwaanh avatar antwaanh commented on August 19, 2024

Thanks @jondmcelroy for clearing that up!
@han8909227 I saw that in the source code and went with that approach, thanks! 🎉

from avatax-rest-v2-php-sdk.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.