Coder Social home page Coder Social logo

Comments (5)

johnnyh-tactics avatar johnnyh-tactics commented on August 12, 2024 2

Thanks! I just confirmed that this works as I hoped for both the CarrierAccount and ScanForm situations.

from easypost-csharp.

johnnyh-tactics avatar johnnyh-tactics commented on August 12, 2024 1

Awesome, thanks! I actually just encountered another similar situation when passing a list of shipments to Client.ScanForm.Create, so making the broad change to all API models should solve that for me as well. I'll check back after the next release.

from easypost-csharp.

nwithan8 avatar nwithan8 commented on August 12, 2024

Hello again! Thanks for letting us know; we'll have to discuss the best way to proceed. We made Id internally-set only to avoid users accidentally modifying it, but it seems we've encountered an edge-case here. We'll let you know what we come up with!

from easypost-csharp.

nwithan8 avatar nwithan8 commented on August 12, 2024

Hey @johnnyh-tactics , wanted to keep you updated.

After discussing internally, we decided that our locking down of the Id property was an over-reach, so we will be making the setter for the Id of any API object public.

Once done, you'll be able to accomplish your API call with something along the lines of:

var order = await client.Order.Create(
    new EasyPost.Parameters.Order.Create
    {
        CarrierAccounts = new List<CarrierAccount>
        {
            new CarrierAccount
            {
                Id = "ca_1",
            },
            new CarrierAccount
            {
               Id = "ca_2",
            },
        },
    });

This will be available in the next release.

Thanks for bringing this to our attention!

from easypost-csharp.

nwithan8 avatar nwithan8 commented on August 12, 2024

Hey @johnnyh-tactics , sorry for the delay. This has been added and released in v5.4.0:
https://github.com/EasyPost/easypost-csharp/releases/tag/v5.4.0
https://www.nuget.org/packages/EasyPost-Official/5.4.0

Please let us know if anything else comes up!

from easypost-csharp.

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.