Why is Amazon's Vendor Central API not giving POs changed on a certain date? - api

I'm using Amazon's Vendor Central API to find all purchase orders changed on a given date. The API runs fine, but it seems to be excluding some results. Can someone tell me what I'm missing?
Example:
I want to know of any POs changed on 12/10. I know PO 8ZTZJAZD was changed on that date because if I search for the specific PO I get a changed date of 12/10:
However, when I run the API for any POs on 12/10, I don't get any results:
Why does a record clearly changed on 12/10 not coming up when I ask for all records changed after 12/10 12 a.m. and before 12/10 11:59 p.m.?

As of March 2021, the whole vendor central/direct fulfillment API system is extremely delicate and riddled with bugs, this is unfortunately just something you'll have to deal with using business logic.

Related

How to manually test a data retention requirement in a search functionality?

Say, data needs to be kept for 2years. Then all data that were created 2years + 1day ago should not be displayed and be deleted from the server. How do you manually test that?
I’m new to testing and I can’t think of any other ways. Also, we cannot do automation due to time constraints.
You can create the data with backdating of more than two years in the database and can test, if it is being deleted or not automatically, In other ways ,you can change the current business date from the database and can test it
For the data retention functionality a manual tester needs to remember the search data so that the tester can perform the test cases for the search retention feature.
By Taking an example of a social networking app , being a manual tester you need to remember all the users that you searched for recently.
To check the time period of retention you can take the help from the backend developer so that they can change the time period (from like one year to 10 min) for testing purpose.
Even if you delete the search history and then you start typing the already entered search result the related result should pop on the first location of the search result. Data retention policies concern what data should be stored or archived, where that should happen, and for exactly how long. Once the retention time period for a particular data set expires, it can be deleted or moved as historical data to secondary or tertiary storage, depending on the requirement
Let’s us understand with an example, that we have below data in our database table based on past search made by users. Now with the help of this table, you can perform this testing with minimum effort and optimum result. We have Current Date as - ‘2022-03-10’ and Status column states that data is available / not available in database, where Visible means available, while Expired means deleted from table.

Search Keyword
Search On Date
Search Expiry Date
Status
sport
2022-03-05
2024-03-04
Visible
cricket news
2020-03-10
2022-03-09
Expired - Deleted
holy books
2020-03-11
2022-03-10
Visible
dance
2020-03-12
2022-03-11
Visible

Report of actuals entered by date

I need to pull out a report of the actuals that is being entered by each person in my team date-wise in the time span which I am allowed to specify. Its basically not for any accounting purposes but just to monitor the effort entered by each user on a day.
The closest thing I have found based on my preliminary search is the Weekly Actuals custom report(https://help.rallydev.com/weekly-actuals-report).
But it doesn't show the date-wise information. Is there any app already developed for my requirement or should I need to tweak the weekly actuals report?
Note: Not interested to install the time-tracker module since most of the users in my organization are used to tracking effort through actuals.
Rally LookbackAPI will give you historic data. You may write an app using shapshot store intended to retrieve data from the Lookback API.
Here is a LookbackAPI endpoint that returns snapshots where Actuals were updated:
https://rally1.rallydev.com/analytics/v2.0/service/rally/workspace/111/artifact/snapshot/query.js?find={"Project":222,"_TypeHierarchy":"Task","_PreviousValues.Actuals":{$exists: true},_ValidFrom:{$gte: "2014-05-01T00:00:00.000Z",$lt: "2014-05-13T00:00:00.000Z"}}&fields=["_UnformattedID","Actuals","_PreviousValues.Actuals","_ValidFrom","_ValidTo"]
and an example of the returned result:
Results: [
{
_ValidFrom: "2014-05-12T17:08:27.598Z",
_ValidTo: "9999-01-01T00:00:00.000Z",
_UnformattedID: 157,
Actuals: 4,
_PreviousValues: {
Actuals: 0
}
}
]
where _ValidFrom: "2014-05-12T17:08:27.598Z" indicates the time when the snapshot was created - the Actuals was updated. Since this was the last change to Actuals on this task TA157, the _ValidTo is set to infinity. The result shows both the updated value (4) and previous value (0) of Actuals.
To try this endpoint make sure to change 111 and 222 with valid ObjectIDs of your workspace and project respectively.
There is a similar question about ToDo answered in this post.
It is possible to get some historic data by parsing revision history via Web Services API and looking for CreationDate on a revision where Actuals update was recorded. See 'side note' in this post. But this is expensive and inefficient.
Weekly Actuals is a legacy app based on AppSDK1. AppSDK1 cannot access LookbackAPI.

ebay getOrders API

I am building a .net service to getOrders from ebay. my service runs fine, however I dont know how should I handle data.
For example I am using CreateTimeTo and CreateTimeFrom Filter to return orders from past 24 hours. I save them into my database, now some orders return no Address info.
My question is, Whats the best way to hadnle/update already imported orders into my database. Say for example order imported into my system wa without shiping info, and customer completed shipping info after a week, how would I update that order in my system?
Thanks
I would definitely use modtimefrom modtimeto filter. Ih this way you can get all order that have been modiefied in last "x interval". This way you will get either new orders and modified (checkout complete - paid - shipped) and so on. My favourite filter anyway is NumberOfDays. This one acts as ModTimeFrom/ModTimeTo but is way more simple and you don't have to deal with dates.
An order without address means buyer has not completed checkout (no payment selected so no shipping address as well yet).
Once buyer completes checkout or order is mark as paid the entire address will be avaible.
You can get buyer default address shipping by using call GetSellerTransaction
I hope i understood your question and to be helpful.

SQL Filtering based on Calculated Time Slots

Im making a simple booking system for our projectors at work.
Here is the scenario. Each projectors can have its availability set to quarter hour segments throughout the entire day. i.e projector 1 is available between 8:15am - 1:45pm and 3pm-5:15pm each day (can also be changed to have different availabilities set for each day). A projector can be booked for anytime time segment during the day as long as it is available. So ive got that setup in my sql database (with my asp.net mvc front end).
The question i have is what is the best way to search on this scenario. i.e. UserA comes in and says find me the projectors that are available this friday between 12pm-3pm. Im struggling to write an efficient sql query that will filter this. My best option so far is to pull back all projectors and than programatically work out if they are available and not booked between this time. It works but it is incredibly inefficient. I stumbled an idea of using a temp table generated by a stored proc that can than be filtered but it isnt quite there.
Has anyone got any ideas how i could approach this?
Thanks in advance
I would probably have a table called ProjectorReservations which contained a start time and end time (amongst other fields you might care about i.e. who is renting the projector).
Searching a projector would look something like this:
SELECT projectorName
FROM Projectors
WHERE NOT EXISTS
(SELECT 1 FROM ProjectorReservations
WHERE Projectors.projectorName = ProjectorReservations.projectorName
AND (ProjectorReservations.startTime < {end_time}
OR ProjectorReservations.endTime > {start_time}))
That pretty much checks to make sure no reservations start before the one you are looking for ends and vice versa. Obviously you will need to swap in your fields accordingly but that should give you the general idea

Credit card expiration dates - Inclusive or exclusive?

Say you've got a credit card number with an expiration date of 05/08 - i.e. May 2008.
Does that mean the card expires on the morning of the 1st of May 2008, or the night of the 31st of May 2008?
It took me a couple of minutes to find a site that I could source for this.
The card is valid until the last day of the month indicated, after the last [sic]1
day of the next month; the card cannot be used to make a purchase if the
merchant attempts to obtain an authorization.
- Source
Also, while looking this up, I found an interesting article on Microsoft's website using an example like this, exec summary: Access 2000 for a month/year defaults to the first day of the month, here's how to override that to calculate the end of the month like you'd want for a credit card.
Additionally, this page has everything you ever wanted to know about credit cards.
This is assumed to be a typo and that it should read "..., after the first day of the next month; ..."
If you are writing a site which takes credit card numbers for payment:
You should probably be as permissive as possible, so that if it does expire, you allow the credit card company to catch it. So, allow it until the last second of the last day of the month.
Don't write your own credit card processing code. If^H^HWhen you write a bug, someone will lose real money. We all make mistakes, just don't make decisions that turn your mistakes into catastrophes.
Have a look on one of your own credit cards. It'll have some text like EXPIRES END or VALID THRU above the date. So the card expires at the end of the given month.
In my experience, it has expired at the end of that month. That is based on the fact that I can use it during that month, and that month is when my bank sends a new one.
According to Visa's "Card Acceptance and Chargeback Management Guidelines for Visa Merchants"; "Good Thru" (or "Valid Thru") Date is the expiration date of the card:
A card is valid through the last day of the month shown, (e .g ., if
the Good Thru date is 03/12,the card is valid through March 31, 2012
and expires on April 1, 2012 .)
It is located below the embossed account number. If the current transaction date is after the "Good Thru" date, the card has expired.
I process a lot of credit card transaction at work, and I can tell you that the expiry date is inclusive.
Also, I agree with Gorgapor. Don't write your own processing code. They are some good tools out there for credit card processing. Here we have been using Monetra for 3 years and it does a pretty decent job at it.
lots of big companies dont even use your expiration date anymore because it causes auto-renewal of payments to be lost when cards are issued with new expiration dates and the same account number. This has been a huge problem in the service industry, so these companies have cornered the card issuers into processing payments w/o expiration dates to avoid this pitfall. Not many people know about this yet, so not all companies use this practice.
How do time zones factor in this analysis. Does a card expire in New York before California? Does it depend on the billing or shipping addresses?
I had a Automated Billing setup online and the credit card said it say good Thru 10/09, but the card was rejected the first week in October and again the next week. Each time it was rejected it cost me a $10 fee. Don't assume it good thru the end of the month if you have automatic billing setup.
In your example a credit card is expired on 6/2008.
Without knowing what you are doing I cannot say definitively you should not be validating ahead of time but be aware that sometimes business rules defy all logic.
For example, where I used to work they often did not process a card at all or would continue on transaction failure simply so they could contact the customer and get a different card.