Closed andsimakov closed 3 months ago
The readme is wrong... from_json
returns an object with the values set. It should be:
account = Account.from_json(
{
"AccountType": "Accounts Receivable",
"Name": "MyJobs"
}
)
account.save(qb=client)
I added a test for from_json and updated the readme. Changes will go out in the next release.
Readme example updated in 0.9.8
I'm trying the library and going through the manual from README.md. It looks cumbersome to fill in fields of an objects one by one:
What if I have a dozen of them and even nested objects? Instead manual suggests to use
.from_json()
:but the saving attempt fails saying
Name
is not specified.account.__dict__
returns those fields as empty. The doc example does not work.Executing it step by step:
causes the failure during the saving attempt: