Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

PtsV2CreateOrderPost201Response is missing the id field from API response

オープン
#237 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

評価

難易度
2/5
見積もり時間
1〜3時間
初心者へのやさしさ
58/100
issue の種類
バグ
明瞭さ
明確に書かれている
活発さ
停滞
技術スタック
java
領域
api

調査の方向性

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

  1. Call the Create Order API (POST /pts/v2/orders)
  2. Receive a 201 response from the API
  3. Try to access the id field from PtsV2CreateOrderPost201Response
  4. Field returns null despite 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

コントリビューションガイド

このリポジトリのコントリビューションガイドは索引されていません

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

CyberSource/cybersource-rest-client-java のほかの issue

CyberSource/cybersource-rest-client-java の issue をすべて見る

似ている issue

Java の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。