You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Assuming at least 1 location is present in the environment under test
client=Square::Client.new(token: ENV.fetch('SQUARE_ACCESS_TOKEN'),base_url: Square::Environment::SANDBOX)location_id=client.locations.list.locations.first.idorder=client.orders.create(idempotency_key: SecureRandom.uuid,order: {location_id: }).order# this SHOULD do nothing.client.orders.update(order_id: order.id,idempotency_key: SecureRandom.uuid,order: {})
Expectation
No-op, no exception raised
Observation
Exception gets raised, because location_id is serialized as an empty hash
Square::Errors::ClientError: {"errors": [{"code": "EXPECTED_STRING","detail": "Expected a string value (line 1, character 25)","field": "order.location_id","category": "INVALID_REQUEST_ERROR"}]} (Square::Errors::ClientError)
Notes
This applies to all attributes that are not passed in, not just location_id - e.g. line item quantities is the other attribute tripping our system.
Activity
[-]Sparse Updates Serializing Msising Values Incorrectly[/-][+]Sparse Updates Serializing Missing Values Incorrectly[/+]cwetherly commentedon Oct 21, 2026
Taking a look
cwetherly commentedon Oct 21, 2026
Ok reproduced, working on a fix
Nathan-Heller commentedon Oct 30, 2026
this can be closed, the issue is resolved. thanks again @cwetherly