mapping one_time_invoices to its owning entity
Is it possible to map a one_time_invoice to a detail in an account.
I realize there is an invoice id. But unfortunatelly I get the whole client information including all his invoices returned, when creating a one time invoice through the API with help from the expectedbehavior/cheddargetter_client_ruby gem.
From my point of view I cannot define for certain which invoice
is the one I just created.
Is it the last entered one? But what if two invoices where created
simultaneously? Will both be in the return hash?
thanks for the help
Christian
Discussions are closed to public comments.
If you need help with Cheddar please
start a new discussion.
Keyboard shortcuts
Generic
? | Show this help |
---|---|
ESC | Blurs the current field |
Comment Form
r | Focus the comment reply box |
---|---|
^ + ↩ | Submit the comment |
You can use Command ⌘
instead of Control ^
on Mac
Support Staff 1 Posted by Marc Guyer on 08 Jun, 2011 02:54 PM
Invoices have a "type". Normal recurring invoices are type=subscription. One-time invoices are type=one-time. That should help with duplicates. Does that answer your question?
2 Posted by c.stadach on 08 Jun, 2011 02:56 PM
But what if there are more than one one_time_invoice.
In this case the type is not an identifying attribute
Support Staff 3 Posted by Marc Guyer on 08 Jun, 2011 03:46 PM
I suppose it's still possible to have more than one one-time invoice at the same moment. Just playing devil's advocate: what would be the consequences if it did happen?
4 Posted by c.stadach on 08 Jun, 2011 04:07 PM
the problem is, I need to mark a position as paid.
And I don't want to mark it before the transaction is approved.
Lets say two one_time_invoices have been made at "the same time".
Both get a return hash with all invoices (I assume both of those hashes have both invoices within them), the newest invoice is not marked approved.
How do I know which one of the two positions I can mark as paid?
Support Staff 5 Posted by Marc Guyer on 08 Jun, 2011 09:08 PM
Hmm... If an invoice is declined, it is not recorded -- a declined error message is returned.
What are you using for the charge code? Is it somehow related to your "position"?
6 Posted by c.stadach on 10 Jun, 2011 02:49 PM
It seems like that is the only way to properly map the invoices to the applied position.
thanks for your help
c.stadach closed this discussion on 10 Jun, 2011 02:49 PM.