polygon-io / client-jvm

The official JVM client library SDK, written in Kotlin, for accessing the Polygon REST and WebSocket API.
49 stars 33 forks source link

Typo in SerialName Annotation for balanceSheet in FinancialForms #206

Closed sebatyler closed 2 months ago

sebatyler commented 2 months ago

Description

I have encountered a typo in the SerialName annotation for the balanceSheet field in the FinancialForms data class. The typo is balance_sheel instead of the correct spelling balance_sheet.

Affected Code

@Serializable
@ExperimentalAPI
data class FinancialForms(
    @SerialName("balance_sheel") val balanceSheet: FinancialForm? = null,
    @SerialName("cash_flow_statement") val cashFlowStatement: FinancialForm? = null,
    @SerialName("compreshensive_income") val comprehensiveIncome: FinancialForm? = null,
    @SerialName("income_statement") val incomeStatement: FinancialForm? = null,
)

Suggested Correction

The SerialName annotation for balanceSheet should be corrected to:

@SerialName("balance_sheet") val balanceSheet: FinancialForm? = null,

Impact

Due to this typo, the balanceSheet field is always null during deserialization, as the field name in the JSON does not match the expected name. This issue can cause data inconsistency and make it difficult to correctly access the balance sheet information.

justinpolygon commented 2 months ago

Thanks for finding this @sebatyler and submitted a PR!