How to get payment terms data from QuickBooks - quickbooks

I am using COM objects to integrate QuickBooks data to my application. I am able to get paymentmethod using IPaymentMethodRetList.
Like :
IPaymentMethodQuery CustQ = requestSet.AppendPaymentMethodQueryRq();
IMsgSetResponse responseSet = sessionManager.DoRequests(requestSet);
_QBPaymentMethodRet = default(IPaymentMethodRet);
_QBPaymentMethodList = default(IPaymentMethodRetList);
IResponse response = responseSet.ResponseList.GetAt(0);
if ((response.Detail != null))
{
_QBPaymentMethodList = (IPaymentMethodRetList)response.Detail;
if (_QBPaymentMethodList != null)
{ ----------------------------
--------------------
}
But I'm unable to find the interface for payment terms. Which interface do I have to use?

You should refer to the QuickBooks OSR for documentation on this:
https://developer-static.intuit.com/qbSDK-current/Common/newOSR/index.html
Payment Methods in QuickBooks are NOT the same thing as Terms. Payment Methods are actual methods of payment (e.g. Visa, MasterCard, Check, etc.), while Terms are sales terms (e.g. Net 30, Net 60, Due on Receipt, etc.).
If you want Payment Methods then you need to do a PaymentMethodQueryRq. If you want Terms then you need to do a TermsQueryRq.

Related

How to add tokenomics to a ERC20 token?

I have taken different courses and even tho they explain how to make a token I haven't been able to learn how to implement tokenomics.
For example fees for transactions, burning to LP etc...
I leave a link to the openzeppelin standard
Would be great to have some more detailed examples on it.
https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/token/ERC20/ERC20.sol
What you are looking for is to make a custom _transfer() method by overriding the one provided in the OpenZeppelin ERC20 standard.
You can check with the "OXB" (oxbull.tech) token, which implements this type of fee, but basically you just take tokens from the sender before sending them to the receiver, and once you are done charging the fees you can send the remaining tokens to the receiver.
An example would be:
function _transfer(address sender, address recipient, uint256 amount) private {
require(sender != address(0), "BEP20: transfer from the zero address");
require(balanceOf(sender) >= amount, "BEP2': not enough balance");
uint256 tokensToBurn = amount.mul(burningFee).div(100);
amount = amount.sub(tokensToBurn);
balances[sender] = balances[sender].sub(amount);
_burn(sender, tokensToBurn);
balances[recipient] = balances[recipient].add(amount);
}
Options of what you can do are infinite. Hope this is helpful.

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

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.

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

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

Blackberry smartcard reader example

I am writing an app for BlackBerry that utilizes a BlackBerry smartcard reader. There is not much documentation on the subject, so I'd really like if someone could give me starting examples.
Basically, there is one RSA private key on the card plus a certificate (for paired public key). I would like to be able to encrypt/decrypt data and also sign it as well. The final goal would be to establish an mutual-authenticated SSL connection using client certificate contained on the smartcard.
Here is the code I managed to come up with so far:
SmartCardReader btReader = null;
SmartCardReader[] readers = SmartCardReaderFactory.getInstalledReaders();
for (int i = 0; i < readers.length; i++) {
SmartCardReader reader = readers[i];
if (reader.getType().equalsIgnoreCase("bluetooth")) {
btReader = reader;
break;
}
}
SmartCardReaderSession readerSession = reader.openSession();
CryptoSmartCard card = (CryptoSmartCard) readerSession.getSmartCard();
RSACryptoToken token = (RSACryptoToken) card.getCryptoToken("RSA");
This token looks promising - has some nice methods, but with "cryptic" arguments. What to do next?
I think this is what you are looking for:
http://code.google.com/p/seek-for-android/wiki/BTPCSC
You have to implement SmartCardSession methods, also implement RSACryptoToken methods.
With SmartCardSession methods you will be able to communicate with smart card, and with RSACryptoToken methods, you will be able to perform crypto operations.
You have to read also about APDU protocol.

Resources