We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Using xeroizer 3.0.1 with Rails 6.1.4
I am trying to use the BankAccount model as part of creating BankTransactions. In the documentation it states to use:
bank_account = xero.Account.first(:where => {:type => 'BANK'})
Which works but it returns an instance of the Account class as follows:
#<Xeroizer::Record::Account :account_id: "7018f80e-5d4e-4323-8c98-2beed1e9c437", :name: "ACCOUNT NAME", :status: "ACTIVE", :type: "BANK", :tax_type: "NONE", :class: "ASSET", :enable_payments_to_account: false, :show_in_expense_claims: false, :bank_account_number: "20202020304050", :currency_code: "GBP", :reporting_code: "ASS", :reporting_code_name: "Assets", :updated_date_utc: 2022-11-03 14:08:18 UTC>
However when you then create a new BankTransaction using the following:
contact = xero.Contact.first xero_spend = xero.BankTransaction.build(:date => '01/01/2022', :contact => contact, :bank_account => bank_account, :type => "SPEND")
It returns an error:
Xeroizer::AssociationTypeMismatch: Xeroizer::Record::BankAccount expected, got Xeroizer::Record::Account
As such I have tried running the following instead:
bank_account = xero.BankAccount.first
But this returns the following error:
NoMethodError: undefined method `BankAccount' for #Xeroizer::OAuth2Application:0x00005605707e8990
Is there something I need to do to enable querying the BankAccount model directly?
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Using xeroizer 3.0.1 with Rails 6.1.4
I am trying to use the BankAccount model as part of creating BankTransactions. In the documentation it states to use:
bank_account = xero.Account.first(:where => {:type => 'BANK'})
Which works but it returns an instance of the Account class as follows:
#<Xeroizer::Record::Account :account_id: "7018f80e-5d4e-4323-8c98-2beed1e9c437", :name: "ACCOUNT NAME", :status: "ACTIVE", :type: "BANK", :tax_type: "NONE", :class: "ASSET", :enable_payments_to_account: false, :show_in_expense_claims: false, :bank_account_number: "20202020304050", :currency_code: "GBP", :reporting_code: "ASS", :reporting_code_name: "Assets", :updated_date_utc: 2022-11-03 14:08:18 UTC>
However when you then create a new BankTransaction using the following:
contact = xero.Contact.first
xero_spend = xero.BankTransaction.build(:date => '01/01/2022', :contact => contact, :bank_account => bank_account, :type => "SPEND")
It returns an error:
Xeroizer::AssociationTypeMismatch: Xeroizer::Record::BankAccount expected, got Xeroizer::Record::Account
As such I have tried running the following instead:
bank_account = xero.BankAccount.first
But this returns the following error:
NoMethodError: undefined method `BankAccount' for #Xeroizer::OAuth2Application:0x00005605707e8990
Is there something I need to do to enable querying the BankAccount model directly?
The text was updated successfully, but these errors were encountered: