Skip to content

Instantly share code, notes, and snippets.

@bartboy011
Created February 23, 2018 17:00
Show Gist options
  • Save bartboy011/6ae5fff6bfcb31e73d055d9a3cb7a6e3 to your computer and use it in GitHub Desktop.
Save bartboy011/6ae5fff6bfcb31e73d055d9a3cb7a6e3 to your computer and use it in GitHub Desktop.
{
"customer": {
"first_name": "",
"last_name": "",
"email": ""
},
"purchase": {
"type": "" // ticket, pass, etc
"tickets": [ // can also be null in the event of a season purchase
{
"performance_date": "01/01/2018 15:00:00+6:00" // standard date time
"type": "General Admission", // whatever the user named it in Dime
"price_type": "Pay What You Can", // etc
"visibility": "Public"
"requires_code": true // standard booleans
"code": "" // or null if not needed
"quantity": 2 // amount of this type purchased
"unit_price": 8.00 // hard set price or amount chosen to pay per ticket
"total_price": 16.00 // unit * quantity
"is_season_pass": false // I don't have a season pass set up so I'm guessing at how this would best work
"season_pass_name": null,
"remaining_tickets": 32 // amount of tickets left of this type for this performance
},
{} // repeated as needed for additional types if they exist. Also, there may be additional values needed to handle season passes purchases
],
"passes": [ // again, don't know what's in here so populate this as you will
],
"donation": 10.00, // alternatively, these can all be in cents, so 1000. This is a good way to avoid float math problems
"subtotal": 26.00,
"fees": 1.50 // this is wrong math, whatever
"total": 34.50,
"purchase_date": "01/01/2018 15:00:00+6:00" // date of actual purchase, not the date for the tickets
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment