Development discussions around Shopify APIs
I am getting a list of orders from a site. As a result, I get Orders[x].
In Orders[1].refunds[0].transactions[0].receips.charges there is an item called balance_transaction. In one order this item is a string, and in another order, this item is an object with child properties. In both cases the transaction is exactly the same type. I was using 2020-10 API, and just changed to 2021-01 API, and I am still crashing when attempting to convert this field.
Has anyone else seen this type of discrepency? I am pretty much clueless as to how to proceed!
subset of code from order 1:
"charge": {
"id": "ch_1IvSX1L7pdTqbdGY4BkUFj6r",
"object": "charge",
"amount": 4742,
"application_fee": "fee_1IvSXAL7pdTqbdGYlYAm7gYj",
"balance_transaction": "txn_1IvSXAL7pdTqbdGYjqUbBd59",
subset of code from order 2:
"charge": {
"id": "ch_1J0rJFL7pdTqbdGYfAr80Bqv",
"object": "charge",
"amount": 8154,
"application_fee": "fee_1J0rJGL7pdTqbdGYOPfa8kNp",
"balance_transaction": {
"id": "txn_1J0rJGL7pdTqbdGYc0Q5WfJY",
"object": "balance_transaction",
"exchange_rate": null
},
User | RANK |
---|---|
16 | |
7 | |
5 | |
5 | |
5 |
Learn these 5 things I had to learn the hard way with starting and running my own business
By Kitana Jan 27, 2023Would you love to unleash the unbridled power of the Google Shopping Channel into your sho...
By Gabe Jan 6, 2023How can you turn a hobby into a career? That’s what Emmanuel did while working as a wa...
By Skye Dec 30, 2022