Safe Navigation Operator (&) not working on Stripe::Account
Closed this issue · 0 comments
dejoma commented
Describe the bug
stripe_account = Stripe::Account.retrieve('acct_****')
stripe_account&.individual # undefined method `individual' for #<Stripe::Account:0xe178 id=acct_***>
stripe_account.try(:individual) # nil
To Reproduce
stripe_account = Stripe::Account.retrieve('acct_****')
stripe_account&.individual # undefined method `individual' for #<Stripe::Account:0xe178 id=acct_***>
stripe_account.try(:individual) # nil
Expected behavior
stripe_account = Stripe::Account.retrieve('acct_****')
stripe_account&.individual # nil
stripe_account.try(:individual) # nil
Code snippets
stripe_account = Stripe::Account.retrieve('acct_****')
stripe_account&.individual # undefined method `individual' for #<Stripe::Account:0xe178 id=acct_***>
stripe_account.try(:individual) # nil
OS
macOS
Language version
Ruby 3.1.3
Library version
8.0.0
API version
2020-03-02
Additional context
No response