Intuit.Ipp.Data.Qbo.CustomerQuery query with & in the name - intuit-partner-platform

How do you use Intuit.Ipp.Data.Qbo.CustomerQuery to query a name like:
Tom & Jerry's
This case has 2 special characters that are causing the query to fail. One being & and the other being '. I've tried to use Uri.EscapeDataString and it doesn't work. Any advice?

The SDK does not encode the ampersand correctly, so you will need to use DevDefined and deserialize the response with the SDK. Code sample: https://gist.github.com/IntuitDeveloperRelations/6024616

you would need to xml encode the string.
thanks
Jarred

Related

how to replace < and in paylaod after data weave transform

I am trying to replace an xml from variable got from data weave into another data weave xml but I am getting xml with special chars as below, when the variable is replaced in the transform instead of getting '<' .
<pol:convictionCode>AC24</pol:convictionCode>
<pol:date>28012019</pol:date>
<pol:banLength>00</pol:banLength>
I am trying as below code but its not correct, getting error (org.mule.api.MessagingException: Execution of the expression).I also need to replace 
 with ''. Not sure how to replace both of them in one go. Highly appreciate any help.
payload.replaceAll("\\<","<")

What does this xpath function mean?

I'm trying to decode the URL characters such as "&amp" to "&", I found the code works in PostgreSQL - Replace HTML Entities
. The code is (xpath('/z/text()', ('<z>' || 'AT&T' || '</z>')::xml))[1] as output.
I try to understand this code and read the document of it, but the only thing I found is the explanation of xpath(xpath, xml [, nsarray]). I'm a freshman on PostgreSQL, and I know the /z/ is like a tag. But what is the "||","1" means? why should it use '/z/text()'.
If there have some links about that, it will very helpful. Thanks a lot.

Multiples document s types refinementfilters

i am using rest api search to get documents with certain extensions types.
I am having this code:
&refinementfilters=or'(fileExtension:equals("aspx"),fileExtension:equals("wmv"))'
The whole code is:
https://myUrl/_api/search/query?selectproperties='Path,Url,Title,Size,IsDocument,PictureUrl,LastModifiedTime'&querytext='wildlife'&refinementfilters= '(fileExtension:equals("aspx"))'
i would like to use rest api refinementfilters fileExtension using or, but the syntax with the OR condition doesn' t work, can you halp me point out
where the problem can be ?
Cheers
To apply multiple filters via refinementfilters property, replace
refinementfilters='(fileExtension:equals("aspx"))'
with
refinementfilters='fileExtension:or("aspx","wmv")'
Example
/_api/search/query?selectproperties='Path,Url,Title,Size,IsDocument,PictureUrl,LastModifiedTime'&querytext='*'&refinementfilters= 'fileExtension:or("docx","pdf")'
As far as general syntax, the quotes for the OR are in the wrong place:
Original version:
&refinementfilters=or'(fileExtension:equals("aspx"),fileExtension:equals("wmv"))'
Corrected version:
&refinementfilters='or(fileExtension:equals("aspx"),fileExtension:equals("wmv"))'

Fiddler AutoResponder - Regular Expression to ignore timestamp in URL

I just start to use fiddler in my project for debug purpose, but haven't figure out how to handle following case with autoresponder :(
I need replace the timestamp in the request url then point to the my personal path, like
from http://www.test.com/static/20140828/js/test.js
to http://www.test.com/static/mycode/js/test.js,
while the timestamp "20140828" changing frequently so I hope can have a rule can match and handle this kind replacement automatically, without update the timestamp every time.
I tried the regex but not found the solution for this case. Any suggestions would be appreciated. Thanks.
You're right that you need to use a regular expression; you haven't said what expression you tried.
You'll probably want to use something like:
MatchText REGEX:^.*test\.com/static/\d+/(.*)$
ActionText http://www.test.com/static/mycode/$1

Gatling Transforming Variables

Following some good feedback on previous issue:
Gatling-tool Extracting cookie data
I have a post request in my gatling simulation which looks like the following:
.post("/checkout/onepage/form_key/${formkey}")
The variable ${formkey} is populated from a cookie value using:
.check(headerRegex("Set-Cookie","CACHED_FRONT_FORM_KEY=(.*)").saveAs("formkey"))
This appears to work correctly, however I now have an issue with:
java.net.URISyntaxException: Illegal character in path at index 90
Obviously I need to escape the special characters in the variable, but I'm unsure of how best to do this.
Gatling does provide a transform function:
https://github.com/excilys/gatling/wiki/Checks#wiki-transforming
I'm hoping I can use this to escape the characters. Any ideas would be greatly appreciated.
Yes, query paremeter parts must be URLEncoded.
In Gatling 1, transform takes a String and returns a String, so you would have something like:
.transform(rawCookieValue => java.net.URLEncoder.encode(rawCookieValue, "UTF-8"))