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
When making an ARBGetSubscriptionRequest using the ruby client, an empty array [] is getting returned for a user's arbTransactions. Submitting this same exact request using CURL, however, we were able to confirm that there were in fact arbTransactions present in the response.
After further investigation, we learned that the ruby client wasn't returning an array literal but an ARBTransactionList instead that appeared to be an array literal [] because it inherits from Array. This caused a lot of confusion.
Because this class essentially just defines getter and setter methods to ultimately retrieve a list of ArbTransaction objects, there doesn't seem to be any functionality from Array that ARBTransactionList needs. We've verified that this works without the inheritance. One possible solution we've identified is to simply remove the Array inheritance.
We were going to submit a PR, but according to the Contributing docs, it seems that PRs can't be merged for response classes since they're auto-generated.
Is it possible to have this auto-generated code not inherit from Array or is there another more feasible solution you propose?
Thanks!
The text was updated successfully, but these errors were encountered:
+1 for confusion factor as well. I cannot get the transactions from the returned subscription object even though they are present in the response. Has anyone found a workaround for this that does not involve me editing the gem? Any alternative solutions? Thanks!
Problem
When making an
ARBGetSubscriptionRequest
using the ruby client, an empty array[]
is getting returned for a user'sarbTransactions
. Submitting this same exact request using CURL, however, we were able to confirm that there were in factarbTransactions
present in the response.After further investigation, we learned that the ruby client wasn't returning an array literal but an
ARBTransactionList
instead that appeared to be an array literal[]
because it inherits fromArray
. This caused a lot of confusion.It turns out this is because the auto-generated
ARBTransactionList
class inauthorize_net/api/schema.rb
unnecessarily inherits fromArray
.A solution
Because this class essentially just defines getter and setter methods to ultimately retrieve a list of
ArbTransaction
objects, there doesn't seem to be any functionality fromArray
thatARBTransactionList
needs. We've verified that this works without the inheritance. One possible solution we've identified is to simply remove the Array inheritance.We were going to submit a PR, but according to the Contributing docs, it seems that PRs can't be merged for response classes since they're auto-generated.
Is it possible to have this auto-generated code not inherit from
Array
or is there another more feasible solution you propose?Thanks!
The text was updated successfully, but these errors were encountered: