How to avoid posting duplicate sales receipt in Quickbooks desktop version using Data service? - quickbooks

I am posting Sales Rceipts from my application to QuickBooks Desktop using Data Service. My Invoice numbers are unique and i am posting them as a SalesReceipt DocNumner. I just wanted to check if the same DocNumber is already present in QuickBooks wittout querying all the QB Sales Receipts.
Is there any way to do it?
-Bharat

'DocNumber' is not an unique key and it is not mentioned in the following docs as a filter attribute. So, you have to query all the QB SalesReceipts.
for (QBSalesReceipt salesReceipt : qbSalesReceipt.findAll(context,i, 100)) {
System.out.println("Doc Number - " + salesReceipt.getHeader().getDocNumber());
}
IPP Docs - https://developer.intuit.com/docs/0025_quickbooksapi/0050_data_services/v2/0500_quickbooks_windows/0600_object_reference/salesreceipt#Retrieving_SalesReceipts_Using_a_Query_Filter

Related

Send message to self-Chat in Microsoft Teams using Graph API

I'm trying to send a message to my self-Chat in Microsoft Teams through a Graph API call but can't find the ID of this specific chat. For the record, this type of chat was introduced to Teams in June, 2022.
By reading the Graph API documentation, it's possible to list all chats available for a specific user using the following API call (in this case, myself):
[GET] https://graph.microsoft.com/beta/me/chats/
Yet, I can't seem to find my self-chat in there. The chat itself is already created since I wrote messages in it but it doesn't appear in the call response.
I've tried to filter the results by most recent results, by filtering on my own name or by filtering by ChatType, but it was still missing.
Is anyone aware of a way to get the ID of a user self-chat in Microsoft Teams?
Thanks!
Self chat is a special kind, You can use this endpoint to communicate with it:
https://graph.microsoft.com/v1.0/me/chats/48:notes/messages
Hope that helps :)
Answering harrywyn's question regarding the pop up notification, you can set it as unread the same as any chat like this:
EndPoint = f'https://graph.microsoft.com/v1.0/chats/48:notes/markChatUnreadForUser'
update_chat = {
"user": {
"id" : uid,
"tenantId": TENANT_ID
}
}
resp = requests.post(EndPoint, headers=headers, verify=False, json=update_chat)

How to receive the verify data from bank in Core

I'm using this code to receive the verify data from bank API (Persian bank)
saleReferenceId = long.Parse(queryString["SaleReferenceId"].ToString());
saleOrderId = long.Parse(queryString["SaleOrderId"].ToString());
resultCode_bpPayRequest = queryString["ResCode"].ToString();
But After the user has paid the amount the SaleRefrenceId and other fields are empty. I wanna know how to receive these fields from bank API?
I used to receive it in asp.net.mvc by
Request.param["saleReferenceId"]
But know, I don't know how to take it in ASP.netcore
Plz help me with

How we can create employee pay cheques using qbfc?

I am using below code snippet to create cheques for employees using qbfc :
ICheckAdd chkAddQuery = requestMsgSet.AppendCheckAddRq();
chkAddQuery.AccountRef.FullName.SetValue("1001 - Bank (Test Account)");
chkAddQuery.IsToBePrinted.SetValue(true);
chkAddQuery.TxnDate.SetValue(DateTime.Now);
chkAddQuery.PayeeEntityRef.FullName.SetValue("Test Employee");
IExpenseLineAdd expAdd = chkAddQuery.ExpenseLineAddList.Append();
expAdd.AccountRef.FullName.SetValue("1001 - Bank (Test Account)");
expAdd.Amount.SetValue(1500.00);
But somehow these are coming under Non-Payroll transactions and not under Pay Cheques in quickbooks, so need help in how we can can create employee pay cheques in quickbooks ?
After following up with William on Intuit Developer Network i found that qbfc cannot be used to generate employee pay checks
https://help.developer.intuit.com/s/question/0D50f00004sugPACAY/how-we-can-create-employee-pay-cheques-using-qbfc

Access Exchange Calendar with Exchange Web Services

I want to build a client where I can display events in a given Exchange Calendar.
I read about ActiveSync and Exchange Web Services, and apparently Exchange Web Services is the way to access the calendars, however, I cannot find any documentation on how to go about fetching the data (i.e. how to authenticate with the Exchange server, how to retrieve the data (through HTTP POST requests?), and so on).
Am I on the right track or am I missing a different API that is used to access an Exchange calendar? I would prefer, if I didn't have to use Apple's Event Kit since that would require the user to sync his account with the iOS device first.
EWS is the way to go. You can read any user's calendar (presuming you have credentials or impersonation authority), and can also subscribe to notifications when a calendar changes. EWS can be accessed from .NET apps, Java, and other languages. Of course the easiest way to go would be using C# and the EWS Managed API, but there are a lot of alternatives outside the Windows world. You can start here, but you'll probably want to search for you specific technology. There's a lot of info out there.
In JAVA EWS api , i used below code:
public static void getAllMeetings() throws Exception {
try {
SimpleDateFormat formatter = new SimpleDateFormat("yyyy-MM-dd");
Date startDate = formatter.parse("2016-01-01 00:00:00");
SearchFilter filter = new SearchFilter.IsGreaterThanOrEqualTo(ItemSchema.LastModifiedTime,startDate);
FindItemsResults<Item> findResults = service.findItems(WellKnownFolderName.Calendar, filter, new ItemView(1000));
System.out.println("|------------------> meetings count = " + findResults.getTotalCount());
for (Item item : findResults.getItems())
{
Appointment appt = (Appointment)item;
//appt.setStartTimeZone();
System.out.println("TimeZone====="+appt.getTimeZone());
System.out.println("SUBJECT====="+appt.getSubject());
System.out.println("Location========"+appt.getLocation());
System.out.println("Start Time========"+appt.getStart());
System.out.println("End Time========"+appt.getEnd());
System.out.println("Email Address========"+ appt.getOrganizer().getAddress());
System.out.println("Last Modified Time========"+appt.getLastModifiedTime());
System.out.println("Last Modified Time========"+appt.getLastModifiedName());
System.out.println("*************************************************\n");
}
} catch (Exception exp) {
exp.printStackTrace();
}
}
I can get all meeting schedules.

api for zip +4 from an address

What's the best api/resource to get a zip +4 from an address?
I don't want something that needs to be downloaded and updated from time to time; I want one that's updated automagically.
The goal is to look up state and federal officials without getting "duplicate" positions.
have you tried Google Maps JavaScript API V3
UPDATED:
in responce to your comment
this is easy as count 1, 2 , 3 ;)
take a look at this:
http://maps.google.com/maps/api/geocode/json?address=Winnetka&sensor=false
you need to looking for google map geocoding service! ( Viewport Biasing )
http://code.google.com/intl/it-IT/apis/maps/documentation/geocoding/
example code would be:
using jQuery
$(function() {
$.getJSON("http://maps.google.com/maps/api/geocode/json?address=Winnetka&sensor=false",
function(data) {
var zip_code = data.results[0].long_name;
alert(zip_code);
});
});
Yahoo has a zip + 4 in thier API, limit 5000 request per day.
Yahoo GeoCoding
The USPS has an API for finding/checking zip codes (among other things).
http://www.usps.com/webtools/address.htm
I've used Endicia at past jobs. It is a network HTTP-based API. (I can't remember if it was SOAP or REST.)
Apple provide brilliant facility to get zip+4code from lattitude and longitude with reverse geocoder -
- (void)getPlaceMarkInfo
{
CLLocationCoordinate2D coordinate;
coordinate.latitude = your lattitude;
coordinate.longitude = your longitude;
MKReverseGeocoder *RevGeoCoder = [[MKReverseGeocoder alloc] initWithCoordinate:coordinate];
RevGeoCoder.delegate = self;
[RevGeoCoder start];
}
#pragma mark MKReverseGeocoderDelegate:
- (void)reverseGeocoder:(MKReverseGeocoder *)geocoder didFindPlacemark:(MKPlacemark *)placemark
{
NSLog(#"YOUR STATE IS - %#",[placemark.addressDictionary valueForKey:#"State"]);
NSDictionary *dictAddress = placemark.addressDictionary;
NSString *strZipPlus4Code = [NSString
stringWithFormat:#"%#-%#",[dictAddress valueForKey:#"ZIP"],
[dictAddress valueForKey:#"PostCodeExtension"]];
strStateName = [placemark.addressDictionary valueForKey:#"State"];
}
- (void)reverseGeocoder:(MKReverseGeocoder *)geocoder didFailWithError:(NSError *)error
{
NSLog(#"REVERSE GEOCODER FAILED");
}
Previous answers have included some really good information, most importantly:
USPS API can only be used if you're shipping through USPS (from their terms of service: "User agrees to use the USPS Web site, APIs and USPS data to facilitate USPS shipping transactions only.")
ZIP Codes are adjusted/updated fairly frequently, so it would be important to have the most current data. (More info about how often to re-validate your addresses here)
You also said you want something that doesn't need to be installed and kept updated.
With those qualifications in mind, I would suggest LiveAddress API. It's a cloud-based, automatically updated API that returns, among over 40 other datapoints, ZIP+4 data on your addresses. It can handle thousands of addresses per second, so it's super-fast and easy to use. If you have a list of address you want to work though (rather than one at a time), you might want LiveAddress for Lists, which lets you upload and process a whole list at once.
Disclosure: I work at SmartyStreets, the company that provides LiveAddress.
In reference of Yahoo BOSS GEO Api:
http://yboss.yahooapis.com/geo/placefinder?location=170+South+Market+St.,+San+Jose,+CA
Make a GET request with following authorization HEADER
Example of using OAuth in HTTP Header:
Authorization: OAuth realm="http://yboss.yahooapis.com/",oauth_consumer_key="dj0yJmk9QnFUYVRUSWtRZEhsJmQ9WVdrOVFrYzFja2x4TkdNbWNHbzlNVEExTWpFMk1ESTJNZy0tJnM9Y29uc3VtZXJzZWNyZXQmeD1lNA--",oauth_nonce="ZDQDDVLFCWKCZ0BD",oauth_signature_method="HMAC-SHA1",oauth_timestamp=" 1367827192",oauth_version="1.0",oauth_signature="phP2dNiCmvwpK4M6G%2F85KnnvTXo%3D"
where:
Authentication for BOSS Geo queries requires OAuth information in the HTTP header OR through parameters in the GET request. There are six elements that are required for authorization:
oauth_version=1.0 – The standard of OAuth supported by BOSS Geo.
oauth_timestamp= – The timestamp is expressed in the number of seconds since January 1, 1970 00:00:00 GMT. The timestamp value MUST be a positive integer and MUST be equal to or greater than the timestamp used in previous requests. The timestamp can be reused for up to 5 minutes. Important: After 5 minutes a fresh timestamp must be supplied.
oauth_nonce – is a random string, uniquely generated for all requests for a specific timestamp. This helps verify that a request has never been made before and helps prevent replay attacks when requests are made over a non-secure channel (such as HTTP).
oauth_consumer_key= – obtained from YDN during the BOSS project registration process. This is unique to the developer. Please follow the directions on the displayed key page and copy the entire key from YDN. If you do not copy the entire key, this results in a "Consumer Key rejected" error.
oauth_signature_method=HMAC-SHA1 – (specific algorithm used for BOSS OAuth calls).
oauth_signature – can be generated by an OAuth library. A list of supported OAuth libraries is available here: http://oauth.net/code. Over a dozen languages are supported.
You will get zip+4 code in Response under "postalcode" key.

Resources