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
The PG constant in XeroRuby::Accounting::CountryCode::PG is not being defined, causing API failures for organizations with 'PG' set as their country code. Error: Invalid ENUM value PG for class #CountryCode
This appears to be caused by a conflict when using the pg gem, which already defines a PG constant module. As a result, the conditional assignment PG ||= "PG".freeze does not behave as expected.
Given that these classes are OpenAPI generated, there may be other approaches to resolve the issue, though possible solutions could be:
Use a more explicit namespace for the constant assignment, e.g., CountryCode::PG ||= "PG".freeze.
Remove the conditional and explicitly assign all string constant values in the class.
Thanks in advance!
The text was updated successfully, but these errors were encountered:
The PG constant in
XeroRuby::Accounting::CountryCode::PG
is not being defined, causing API failures for organizations with 'PG' set as their country code. Error:Invalid ENUM value PG for class #CountryCode
This appears to be caused by a conflict when using the pg gem, which already defines a PG constant module. As a result, the conditional assignment
PG ||= "PG".freeze
does not behave as expected.Given that these classes are OpenAPI generated, there may be other approaches to resolve the issue, though possible solutions could be:
CountryCode::PG ||= "PG".freeze
.Thanks in advance!
The text was updated successfully, but these errors were encountered: