Can';t使用quickbooks ruby gem在quickbooks中创建类对象
我想为Quickbooks创建帐户对象。但是,当我尝试时:Can';t使用quickbooks ruby gem在quickbooks中创建类对象,ruby,quickbooks,Ruby,Quickbooks,我想为Quickbooks创建帐户对象。但是,当我尝试时: service.create(account_object) 它返回错误: Quickbooks::InvalidModelException: Classification is not included in the list 我尝试输入一个默认值(),但它返回相同的错误。帐户中的分类将类似于负债、收入、费用或资产等 转到此URL 查看AccountType部分=>子属性 它有所有分类和帐户类型的列表,我们可以在创建帐户时使用这
service.create(account_object)
它返回错误:
Quickbooks::InvalidModelException: Classification is not included in the list
我尝试输入一个默认值(),但它返回相同的错误。帐户中的分类将类似于负债、收入、费用或资产等 转到此URL 查看AccountType部分=>子属性 它有所有分类和帐户类型的列表,我们可以在创建帐户时使用这些列表 您可以使用下面的示例代码创建帐户
begin
oauth_client = OAuth::AccessToken.new($qb_oauth_consumer, token, secret)
service = Quickbooks::Service::Account.new(:access_token => oauth_client, :company_id => realm_id)
new_account = Quickbooks::Model::Account.new(:name => 'Undeposited money', :account_type => 'Other Current Asset', :classification => 'Asset' )
create_acccount = service.create(new_account)
rescue Exception => e
# e.message will show response of quickbooks for you request
puts e.message
# e.message.inspect will show logs
puts e.backtrace.inspect
end