SDK/Library version: 2.104.1 but affected code is also on v3
Environment: Sandbox/Production
Language, language version, and OS: Ruby 2.7, Rails 7.0.0.alpha.725f8f4
Issue description
https://github.com/rails/rails/pull/41835 introduced a deprecation warning on TimeWithZone.name. The idea is that in Rails 7.1 TimeWithZone will return "ActiveSupport::TimeWithZone" instead of "Time". However, the this gem currently uses https://github.com/braintree/braintree_ruby/blob/master/lib/braintree/xml/generator.rb#L62 the name to match against Time and triggers this warning. If the deprecation remains and Rails 7.1 removes this method, any Rails application using the Braintree gem and using objects with Time fields will likely begin failing.
I'm thinking we could add a ActiveSupport::TimeWithZone to XML_TYPE_NAMES to prevent this issue but there may be other options here?
General information
Issue description
https://github.com/rails/rails/pull/41835 introduced a deprecation warning on TimeWithZone.name. The idea is that in Rails 7.1 TimeWithZone will return "ActiveSupport::TimeWithZone" instead of "Time". However, the this gem currently uses https://github.com/braintree/braintree_ruby/blob/master/lib/braintree/xml/generator.rb#L62 the name to match against Time and triggers this warning. If the deprecation remains and Rails 7.1 removes this method, any Rails application using the Braintree gem and using objects with Time fields will likely begin failing.
I'm thinking we could add a
ActiveSupport::TimeWithZone
to XML_TYPE_NAMES to prevent this issue but there may be other options here?