Listing Stripe refunds between dates - stripe-payments

Using the Stripe API, I'm struggling to work out how to list refunds between two dates.
I can list charges between two dates, but as the refund can come at a date significantly after the charge date, it is not good.
Thanks for anyone who can point me in the right direction!

A dictionary with dates is working for me even though the API docs don't show this as an option for Refund.list:
epoch_dict = {'lt': 1496505600, 'gte': 1496502000}
refunds = stripe.Refund.list(limit=100, created=epoch_dict)

I would use the List All Balance History API and pass type: "refund" to only list the refunds and also pass the created hash based on the dates I want to limit my search to and you should get all the balance transactions associated with a refund created between those two dates.

Related

how to display if customer has a single transaction or multiple transactions

I would like to ask a question on how to correctly display single or multiple transactions if a user has more than one purchase from different stores in day. If a user bought once it will display "single" and if the user bought more than once it will display "multiple"
For reference, column F is for determining if the user bought more than once, 0= first transaction and 1= other transactions. If a user has only 0 and no 1s then it is considered single transaction only. I tried using this formula in column H:
=IF(COUNTIF(A$2:A2,A2)=1,
IF(COUNTIFS(A$2:A2,A2,D$2:D2,D2)>1,
OFFSET(A$2,MATCH(A2&D2,$A$2:A2&A2&$D$2:D2,0)-1,1),
MAX(IF($A1:A$2=A2,$F1:F$2))+1))
but, it was not showing the result I want.
If I understand your question correctly, it should be possible to use SUMPRODUCT to accomplish this.
Try: =IF(SUMPRODUCT(--(A:A=A2),--(D:D=D2))>1,"mutiple","single")

How do I check for duplicates in one column in Excel only once duplicates have been identified in a previous column

I've got a table of order data where instalment payments are used in Excel. The first column is the customer's email address and the second is the product they've bought. The third is whether the row is for an initial payment, or for a subsequent instalment payment.
I need to basically identify in the data whether or not any given customer has made instalment payments for a specific product. If they have made instalment payments, that customer will have multiple rows for a specific product. The data looks something like this.
CUSTOMER COURSE PAYMENT TYPE
joe#blogs.com Course 1 First
bill#blogs.com Course 1 First
joe#blogs.com Course 2 First
joe#blogs.com Course 1 Instalment
Basically, the formula would need to identify that whilst Joe has made three payments, only two of them are for the same course and therefore only one of them is an instalment payment. It would return something like 'Yes' in both the first and fourth rows as those rows are linked to the same customer with the same course.
How would I go about doing this? So far, I have only got as far as identifying where the customer has multiple rows, like so:
$A$2:$A$2579=A2
But this only identifies when the user has multiple orders, but doesn't take into account if those orders are for the same course, or what type of payment it is.
What would the formula look like to solve this problem?
Thanks!
You can use e.g. this formula:
=IF( COUNTIFS($A$2:A2,A2,$B$2:B2,B2)=1,"First","Installment")
The key is using relative and absolute references together in order to refer only previous rows, not the whole range.

Relationship between collections in mongodb

How can we do relational update queries in mongodb.
We have the following scenario:
In a bank the deposits of the clients are managed, once a certain
period of time is fulfilled the bank returns the deposit to the
clients plus the accrued interest, a client can have several deposits.
we create the client's collection, with his name, and what he has
available to withdraw, we create the deposit collection, with the
amount, the interest rate, and we join it to the client's model by the
client's id from a clientId field. Every 24 hours the bank updates all
user accounts, if the deposit creation date is less than two years,
the user's interest is updated, if the date is equal to 2 years a new
field is added to the deposit (expired: true), and to the client's
collection in the available field is added, what was already
accumulated, the interest, plus the amount of the deposit. To give a
solution I have tried to obtain all the deposits, I save them in an
object and I go through it with the map property. Inside the map I try
to update the clients that have expired deposits, however, only the
last element that runs through the map is being updated.
What would be the best solution to this problem. I clarify that I am using mongoose and nodejs.

Is there a way to "Expire" items in an Azure Search Index?

In Azure Search is there a mechanism to set an "Expiration Date" on items within the index? I have a need for items to only be in the search index for a pre-defined period of time.
Not at this time. For now, you need to send a delete request to delete an item in an index.
We often refer to this capability as Time to Live. It would be great if you could vote for this feature to help us prioritize it, if you would find it valuable.
http://feedback.azure.com/forums/263029-azure-search/suggestions/6328648-time-to-live-for-data
Liam
As Liam mentions, there isn't at the moment.
One option might be to add an "Expiry" field with a type of Edm.DateTimeOffset into your documents and have all your queries only request documents whose expiry date is greater than the current timestamp.

Bill of materials is possible in Excel?

I use Excel to store information about purchased products and invoices (according ID, Item!, Quantity, Price(per), Date etc.). Every time I have to put the new information about orders into table. For example: I have an order. First I create new rows in table for each order. Then I purchase them and after delivery I can fill the rows. But sometimes I order the same item, but with different price and quantity or I should to order more, since last time was not enough.
Therefore, I want to create a "program" in Excel to organize them and to check the order status, whether task already done or not.
The problem is that I can't use the same cell for different prices. And reorder can be also not sufficient.
Any kind of help is welcome!
P.S.
I can do it in MS Excel?
Do I have to learn maybe MS Access?
Is there any freeware relevant for my purpose?

Resources