PtsV2CreateOrderPost201Response is missing the id field from API response
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 2/5
- Tempo stimato
- 1-3 ore
- Idoneità per principianti
- 58/100
Direzione di ricerca
Individua il modello PtsV2CreateOrderPost201Response e verifica come vengono serializzati ed esposti i suoi campi esistenti. Conferma la corrispondenza della risposta Create Order con il JSON documentato, quindi verifica che l’id dell’ordine sia disponibile tramite l’accessor pubblico del modello e possa supportare il successivo flusso di autorizzazione.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Here's a ready-to-use GitHub issue text:
Title: PtsV2CreateOrderPost201Response is missing the id field from API response
Body:
Bug Description
The PtsV2CreateOrderPost201Response model class is missing the id field,
even though the CyberSource API returns it in the JSON response.
This completely blocks the order-to-authorization flow, since the id returned
by the Create Order endpoint is required to perform the subsequent authorization call.
Steps to Reproduce
- Call the Create Order API (
POST /pts/v2/orders) - Receive a
201response from the API - Try to access the
idfield fromPtsV2CreateOrderPost201Response - Field returns
nulldespite being present in the raw JSON response
Expected Behavior
PtsV2CreateOrderPost201Response.getId() should return the order id
provided in the API response.
Actual Behavior
PtsV2CreateOrderPost201Response has no getId() method and no id field mapped.
The raw JSON response clearly contains the field:
{
"id": "XXXXXXXXXXXX",
"submitTimeUtc": "...",
"status": "PENDING",
...
}
But the SDK model does not deserialize it, resulting in a null value.
Impact
Critical — Without the id, it is impossible to proceed with the
authorization API call, making the full order flow non-functional.
Workaround
Manually parsing the raw response body using peekBody() and Gson
to extract the id before the SDK consumes the response:
String rawJson = response.peekBody(Long.MAX_VALUE).string();
JsonObject jsonObject = JsonParser.parseString(rawJson).getAsJsonObject();
String orderId = jsonObject.get("id").getAsString();
- **SDK Version: All
Add the missing id field to PtsV2CreateOrderPost201Response:
@SerializedName("id")
@JsonProperty("id")
private String id;
public String getId() { return id; }
public void setId(String id) { this.id = id; }
- Lingua principale
- Java
- Stelle
- 29
- Fork
- 50
- Merge medio
- 28m
- PR unite (30g)
- 1
Guida per i contributori
Nessuna guida per i contributori indicizzata per questo repository
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di CyberSource/cybersource-rest-client-java
-
Difficoltà 4/5 3-5 giorni Idoneità per principianti 45/100
CyberSource/cybersource-rest-client-java#241 · 1 reazione ·
-
Difficoltà 4/5 3-5 giorni Idoneità per principianti 45/100
-
Difficoltà 3/5 1-2 giorni Idoneità per principianti 42/100
CyberSource/cybersource-rest-client-java#235 · 1 commento ·
-
Difficoltà 3/5 1-2 giorni Idoneità per principianti 35/100
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 35/100
CyberSource/cybersource-rest-client-java#218 · 1 commento ·
Tutte le issue di CyberSource/cybersource-rest-client-java
Issue simili
-
Bug Java Platform: Java
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
getsentry/sentry-java#6138 · 1 commento ·
-
bug needs triage p2
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
GoogleCloudPlatform/DataflowTemplates#4273 · 1 commento ·
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
-
bug needs triage
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100