PtsV2CreateOrderPost201Response is missing the id field from API response
まだ誰も着手していません。
評価
調査の方向性
PtsV2CreateOrderPost201Response モデルを見つけ、既存のフィールドがどのようにシリアライズされ、公開されているかを確認します。Create Order レスポンスとドキュメント化された JSON のマッピングを確認し、その後、order id がモデルの public accessor から利用でき、後続の authorization flow をサポートできることを検証します。
索引モデルが issue の本文から書いたものです。
説明
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; }
- 主要言語
- Java
- スター
- 29
- フォーク
- 50
- 平均マージ
- 28分
- マージ済み PR(30日)
- 1
コントリビューションガイド
このリポジトリのコントリビューションガイドは索引されていません
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
CyberSource/cybersource-rest-client-java のほかの issue
-
難易度 4/5 3〜5日 初心者へのやさしさ 45/100
CyberSource/cybersource-rest-client-java#241 · リアクション 1 件 ·
-
難易度 4/5 3〜5日 初心者へのやさしさ 45/100
-
難易度 3/5 1〜2日 初心者へのやさしさ 42/100
CyberSource/cybersource-rest-client-java#235 · コメント 1 件 ·
-
難易度 3/5 1〜2日 初心者へのやさしさ 35/100
-
難易度 2/5 1〜3時間 初心者へのやさしさ 35/100
CyberSource/cybersource-rest-client-java#218 · コメント 1 件 ·
CyberSource/cybersource-rest-client-java の issue をすべて見る
似ている issue
-
documentation
難易度 2/5 1〜3時間 初心者へのやさしさ 65/100
inu-appcenter/memorIN-backend#288 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 65/100
-
frontend maui-pilot pilot-ask question
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
-
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
-
area/plugin
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
kestra-io/plugin-kestra#190 ·