Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Conflict with PG Constant in XeroRuby::Accounting::CountryCode #326

Open
bertiecroll opened this issue Dec 16, 2024 · 2 comments
Open

Conflict with PG Constant in XeroRuby::Accounting::CountryCode #326

bertiecroll opened this issue Dec 16, 2024 · 2 comments

Comments

@bertiecroll
Copy link

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!

Copy link

PETOSS-684

Copy link

Thanks for raising an issue, a ticket has been created to track your request

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant