QBO - Error while quering TaxRate with QB V3 API - quickbooks

I get an error while querying TaxeRate from QBO using QB API V3.
Here is my request:
String query = "Select * FROM TaxRate ";
List<? extends IEntity> result = service.executeQuery(query).getEntities();
below is what i get in return
Some other Exception in SDK or network happened: org.codehaus.jackson.map.JsonMappingException: Can not construct instance of com.intuit.ipp.data.SpecialTaxTypeEnum from String value 'NO_TAX': value not one of declared Enum instance names
at [Source: N/A; line: -1, column: -1] (through reference chain: com.intuit.ipp.data.TaxRate["SpecialTaxType"])
Can someone help me?
Thank you.

There is a server side change (Addition of a new Enum value) which is causing this devkit break. A newer version of devkit with latest changes (XSD) will be released soon. That will resolve the issue.
As a temporary workaround, you can try to call this without using devkit. Sample V3 call (using dev-defined) - https://gist.github.com/IntuitDeveloperRelations/0913b4c224de758fde0a
Update
This change might get rollbacked from the server side soon. In that case, current devkit will work as it is.

Related

CloudTable.Execute not working in API

I just moved a function from an MVC App to an MVC API App, and for some reason it all works except CloudTable.Execute.
Code:
try
{
CloudStorageAccount storageAccount = new CloudStorageAccount(new Microsoft.WindowsAzure.Storage.Auth.StorageCredentials(
"accountName",
"key"), true);
CloudTableClient cloudTableClient = storageAccount.CreateCloudTableClient();
CloudTable table = cloudTableClient.GetTableReference("SkypeUsers");
table.CreateIfNotExistsAsync();
TableOperation retrieveOperation = TableOperation.Retrieve<WorkUser>("Skype", skypeid);
TableResult retrievedResult = table.Execute(retrieveOperation); //Does not work
retrievedSkypeId = ((WorkUser)retrievedResult.Result).RowKey;
}
catch (Exception ex)
{
}
Error:
Error CS1061 'CloudTable' does not contain a definition for 'Execute' and no
extension method 'Execute' accepting a first argument of type 'CloudTable' could
be found (are you missing a using directive or an assembly reference?)
The reference to Microsoft.WindowsAzure.Storage is the same version I use in my App. Ive tried cleaning and re-building. Not sure what the issue is.
EDIT:
Print of my only Execute-options:
I am targeting .NET Core & using assembly Microsoft.WindowsAzure.Storage, Version=9.2.0.0.
The ExecuteQuery does not exist within CloudTable for this version.
This might be your case as well.
Use:
table.ExecuteQuerySegmentedAsync(query, null).Result;
The ExecuteQuery sync is still available for .NET Framework version however for NET Standard use ExecuteQuerySegmentedAsync instead.
Error CS1061 'CloudTable' does not contain a definition for 'Execute' and no extension method 'Execute' accepting a first argument of type 'CloudTable' could be found (are you missing a using directive or an assembly reference?)
CloudTable.Execute Method (TableOperation, TableRequestOptions, OperationContext) accepts a TableOperation object as the first argument, and according to the code you provide, we could find you indeed pass a TableOperation object to Execute method, it should not return the error. Please try to install the latest version Microsoft Azure Storage Client Library for .NET to your project (the code works fine with WindowsAzure.Storage v8.0.0 on my side) and test if same issue will appear. You could also tell us the version of WindowsAzure.Storage you are using now, and then we will test the code with that version.
Besides, please try to use TableQuery to generate a query and call CloudTable.ExecuteQuery method to retrieve the entity.
TableQuery<WorkUser> query = new TableQuery<WorkUser>().Where(
TableQuery.CombineFilters(
TableQuery.GenerateFilterCondition("PartitionKey", QueryComparisons.Equal, "Skype"),
TableOperators.And,
TableQuery.GenerateFilterCondition("RowKey", QueryComparisons.Equal, skypeid)));
retrievedSkypeId = table.ExecuteQuery(query).FirstOrDefault().RowKey;

CSOM 2013 error: Unable to cast object of type 'System.Collections.Generic.Dictionary

I'm using this code to loop columns of a SharePoint 2013 List.
currentContext.Load(currentList.Fields);
currentContext.ExecuteQuery();
foreach (Field f in currentList.Fields) {
}
No problem with normal columns. But, when I arrive to a lookup column I have this error:
"Unable to cast object of type
'System.Collections.Generic.Dictionary`2[System.String,System.Object]'
to type 'Microsoft.SharePoint.Client.Field'."
I found for example this discussion
This issue came when we were working with TaxonomyFieldValue fields. For us changing references was not an option. This helped:
TaxonomyItem dummy = new TaxonomyItem(web.Context, null);
It will force program to load adequate libraries forcing correct type in runtime.
I had this same issue and updating the references fixed it for me. This question helped me figure it out.
I went from version 14 of "Microsoft.SharePoint.Client" and "Microsoft.SharePoint.Client.Runtime" to version 16 and no longer had the error.
Latest client download

Troubleshoot the SqlProgrammabilityProvider

I can't seem to get the SqlProgrammabilityProvider to work even in the most basic configuration. With this code
type TestDb = SqlProgrammabilityProvider<testConn>
let db = TestDb()
I get the design/compile-time error "The value or constructor 'TestDb' is not defined"
testConn is a literal string that is working fine with the SqlCommandProvider in the same project.
I'm using VS 2015, FSharp.Data.SqlClient 1.7.5, and I've tried targeting .NET 4.5.2 and 4.6.
Are there known issues or limitations with this? If not, how could I troubleshoot it?
After getting a type for SqlProgrammabilityProvider upon a specific connection you should tie it to as many as you like, but of the concrete following options: Sql Server function, stored procedure, or table.
Like in:
type TestDb = SqlProgrammabilityProvider<testConn>
type Datatable = TestDb.dbo.Tables.MyDataTable
or
use cmd = TestDB.dbo.MyStoredProcedure()
cmd.Execute(Param1="xyzzy")
You may peek at use cases at https://github.com/fsprojects/FSharp.Data.SqlClient/tree/master/src/SqlClient.Tests

BreezeSharp client and the TimeSpan issue

We're unable to re-hydrate the Breeze# client object which has TimeSpan? properties and if prop value is not null
BreezeServer returns the TimeSpan in the ISO 8601 format (eq. "PT8H") but as TimeSpan.Parse() expects different format [ws][-]{ d | [d.]hh:mm[:ss[.ff]] }[ws] a System.FormatException is thrown ("String was not recognized as a valid TimeSpan") in the Breeze.Sharp.JsonEntityConverter while parsing objects.
Is this a known issue? IS there any workaround for it?
Ok, this was a bug and has been fixed in the lastest version on the breeze.sharp GitHub repo, it will also go out in the next release, probably sometime next week. Please confirm whether or not it corrects your issue.

Update Complex Fields Using Jira Rest Client 1.1-m02

Hello I'm trying to update some complex fields such as Issue Type or Status using Jira Rest Client Library for Java and I'm having some trouble. This is what I've got so far:
Issue issue = client.getIssueClient().getIssue(issueKey, null);
client.getIssueClient().update(
issue,
ImmutableList.of(new FieldInput(IssueFieldId.ISSUE_TYPE_FIELD,
issue.getIssueType())), null);
As you can see I'm only trying to update the issue type using it's own type (just to test it), however I get an Exception:
Exception in thread "main" com.atlassian.jira.rest.client.RestClientException:
org.codehaus.jettison.json.JSONException: Cannot generate value - unknown type for me:
class com.atlassian.jira.rest.client.domain.BasicIssueType
Am I missing something, is there any documentation for this library that I missed?
I managed to achieve what I was trying to do:
Issue issue = client.getIssueClient().getIssue(issueKey, null);
client.getIssueClient().update(
issue,
ImmutableList.of(new FieldInput(IssueFieldId.ISSUE_TYPE_FIELD,
ComplexIssueInputFieldValue.with("id", id))), null);
This will change the type of the issue, hope this will help anyone else who encounters this problem.

Resources