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!