Skip to content

Instantly share code, notes, and snippets.

@alexpchin
Created August 24, 2023 08:40
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save alexpchin/23569420fd8fdce1d710a1a025d448e7 to your computer and use it in GitHub Desktop.
Save alexpchin/23569420fd8fdce1d710a1a025d448e7 to your computer and use it in GitHub Desktop.
Example of populatePaymentPlan Group
{
"name": "A Payment Plan Group",
"plans": [
{
"name": "Monthly",
"invoices": [
{
"due_date": "2023-08-04T00:00:00.000Z",
"period_start": "2023-08-04T00:00:00.000Z",
"period_end": "2024-09-14T23:59:59.999Z",
"amount": 14315.07,
"pcm": 1000,
"line_items": [
{
"start_date": "2023-08-04T00:00:00.000Z",
"end_date": "2023-08-04T00:00:00.000Z",
"amount": 1000,
"is_whole_month": false,
"month": "N/A",
"payment_type": "deposit"
},
{
"start_date": "2023-08-04T00:00:00.000Z",
"end_date": "2023-08-31T23:59:59.999Z",
"amount": 887.67,
"is_whole_month": false,
"month": "Pro Rata from 4 to 31 of August",
"payment_type": "rent"
},
{
"start_date": "2023-09-01T00:00:00.000Z",
"end_date": "2023-09-30T23:59:59.999Z",
"amount": 1000,
"is_whole_month": true,
"month": "September",
"payment_type": "rent"
},
{
"start_date": "2023-10-01T00:00:00.000Z",
"end_date": "2023-10-31T23:59:59.999Z",
"amount": 1000,
"is_whole_month": true,
"month": "October",
"payment_type": "rent"
},
{
"start_date": "2023-11-01T00:00:00.000Z",
"end_date": "2023-11-30T23:59:59.999Z",
"amount": 1000,
"is_whole_month": true,
"month": "November",
"payment_type": "rent"
},
{
"start_date": "2023-12-01T00:00:00.000Z",
"end_date": "2023-12-31T23:59:59.999Z",
"amount": 1000,
"is_whole_month": true,
"month": "December",
"payment_type": "rent"
},
{
"start_date": "2024-01-01T00:00:00.000Z",
"end_date": "2024-01-31T23:59:59.999Z",
"amount": 1000,
"is_whole_month": true,
"month": "January",
"payment_type": "rent"
},
{
"start_date": "2024-02-01T00:00:00.000Z",
"end_date": "2024-02-29T23:59:59.999Z",
"amount": 1000,
"is_whole_month": true,
"month": "February",
"payment_type": "rent"
},
{
"start_date": "2024-03-01T00:00:00.000Z",
"end_date": "2024-03-31T23:59:59.999Z",
"amount": 1000,
"is_whole_month": true,
"month": "March",
"payment_type": "rent"
},
{
"start_date": "2024-04-01T00:00:00.000Z",
"end_date": "2024-04-30T23:59:59.999Z",
"amount": 1000,
"is_whole_month": true,
"month": "April",
"payment_type": "rent"
},
{
"start_date": "2024-05-01T00:00:00.000Z",
"end_date": "2024-05-31T23:59:59.999Z",
"amount": 1000,
"is_whole_month": true,
"month": "May",
"payment_type": "rent"
},
{
"start_date": "2024-06-01T00:00:00.000Z",
"end_date": "2024-06-30T23:59:59.999Z",
"amount": 1000,
"is_whole_month": true,
"month": "June",
"payment_type": "rent"
},
{
"start_date": "2024-07-01T00:00:00.000Z",
"end_date": "2024-07-31T23:59:59.999Z",
"amount": 1000,
"is_whole_month": true,
"month": "July",
"payment_type": "rent"
},
{
"start_date": "2024-08-01T00:00:00.000Z",
"end_date": "2024-08-31T23:59:59.999Z",
"amount": 1000,
"is_whole_month": true,
"month": "August",
"payment_type": "rent"
},
{
"start_date": "2024-09-01T00:00:00.000Z",
"end_date": "2024-09-14T23:59:59.999Z",
"amount": 427.4,
"is_whole_month": false,
"month": "Pro Rata from 1 to 14 of September",
"payment_type": "rent"
}
]
}
],
"date_created": "2020-01-01T00:00:00.000Z",
"date_modified": "2020-01-01T00:00:00.000Z",
"tenancy_length_in_days": 365,
"number_of_invoices": 1,
"total": 14315.07
},
{
"name": "Quarterly",
"invoices": [
{
"due_date": "2023-08-04T00:00:00.000Z",
"period_start": "2023-08-04T00:00:00.000Z",
"period_end": "2024-09-14T23:59:59.999Z",
"amount": 14315.07,
"pcm": 1000,
"line_items": [
{
"start_date": "2023-08-04T00:00:00.000Z",
"end_date": "2023-08-04T00:00:00.000Z",
"amount": 1000,
"is_whole_month": false,
"month": "N/A",
"payment_type": "deposit"
},
{
"start_date": "2023-08-04T00:00:00.000Z",
"end_date": "2023-08-31T23:59:59.999Z",
"amount": 887.67,
"is_whole_month": false,
"month": "Pro Rata from 4 to 31 of August",
"payment_type": "rent"
},
{
"start_date": "2023-09-01T00:00:00.000Z",
"end_date": "2023-09-30T23:59:59.999Z",
"amount": 1000,
"is_whole_month": true,
"month": "September",
"payment_type": "rent"
},
{
"start_date": "2023-10-01T00:00:00.000Z",
"end_date": "2023-10-31T23:59:59.999Z",
"amount": 1000,
"is_whole_month": true,
"month": "October",
"payment_type": "rent"
},
{
"start_date": "2023-11-01T00:00:00.000Z",
"end_date": "2023-11-30T23:59:59.999Z",
"amount": 1000,
"is_whole_month": true,
"month": "November",
"payment_type": "rent"
},
{
"start_date": "2023-12-01T00:00:00.000Z",
"end_date": "2023-12-31T23:59:59.999Z",
"amount": 1000,
"is_whole_month": true,
"month": "December",
"payment_type": "rent"
},
{
"start_date": "2024-01-01T00:00:00.000Z",
"end_date": "2024-01-31T23:59:59.999Z",
"amount": 1000,
"is_whole_month": true,
"month": "January",
"payment_type": "rent"
},
{
"start_date": "2024-02-01T00:00:00.000Z",
"end_date": "2024-02-29T23:59:59.999Z",
"amount": 1000,
"is_whole_month": true,
"month": "February",
"payment_type": "rent"
},
{
"start_date": "2024-03-01T00:00:00.000Z",
"end_date": "2024-03-31T23:59:59.999Z",
"amount": 1000,
"is_whole_month": true,
"month": "March",
"payment_type": "rent"
},
{
"start_date": "2024-04-01T00:00:00.000Z",
"end_date": "2024-04-30T23:59:59.999Z",
"amount": 1000,
"is_whole_month": true,
"month": "April",
"payment_type": "rent"
},
{
"start_date": "2024-05-01T00:00:00.000Z",
"end_date": "2024-05-31T23:59:59.999Z",
"amount": 1000,
"is_whole_month": true,
"month": "May",
"payment_type": "rent"
},
{
"start_date": "2024-06-01T00:00:00.000Z",
"end_date": "2024-06-30T23:59:59.999Z",
"amount": 1000,
"is_whole_month": true,
"month": "June",
"payment_type": "rent"
},
{
"start_date": "2024-07-01T00:00:00.000Z",
"end_date": "2024-07-31T23:59:59.999Z",
"amount": 1000,
"is_whole_month": true,
"month": "July",
"payment_type": "rent"
},
{
"start_date": "2024-08-01T00:00:00.000Z",
"end_date": "2024-08-31T23:59:59.999Z",
"amount": 1000,
"is_whole_month": true,
"month": "August",
"payment_type": "rent"
},
{
"start_date": "2024-09-01T00:00:00.000Z",
"end_date": "2024-09-14T23:59:59.999Z",
"amount": 427.4,
"is_whole_month": false,
"month": "Pro Rata from 1 to 14 of September",
"payment_type": "rent"
}
]
}
],
"date_created": "2020-01-01T00:00:00.000Z",
"date_modified": "2020-01-01T00:00:00.000Z",
"tenancy_length_in_days": 365,
"number_of_invoices": 1,
"total": 14315.07
},
{
"name": "Upfront",
"invoices": [
{
"due_date": "2023-08-04T00:00:00.000Z",
"period_start": "2023-08-04T00:00:00.000Z",
"period_end": "2024-09-14T23:59:59.999Z",
"amount": 14315.07,
"pcm": 1000,
"line_items": [
{
"start_date": "2023-08-04T00:00:00.000Z",
"end_date": "2023-08-04T00:00:00.000Z",
"amount": 1000,
"is_whole_month": false,
"month": "N/A",
"payment_type": "deposit"
},
{
"start_date": "2023-08-04T00:00:00.000Z",
"end_date": "2023-08-31T23:59:59.999Z",
"amount": 887.67,
"is_whole_month": false,
"month": "Pro Rata from 4 to 31 of August",
"payment_type": "rent"
},
{
"start_date": "2023-09-01T00:00:00.000Z",
"end_date": "2023-09-30T23:59:59.999Z",
"amount": 1000,
"is_whole_month": true,
"month": "September",
"payment_type": "rent"
},
{
"start_date": "2023-10-01T00:00:00.000Z",
"end_date": "2023-10-31T23:59:59.999Z",
"amount": 1000,
"is_whole_month": true,
"month": "October",
"payment_type": "rent"
},
{
"start_date": "2023-11-01T00:00:00.000Z",
"end_date": "2023-11-30T23:59:59.999Z",
"amount": 1000,
"is_whole_month": true,
"month": "November",
"payment_type": "rent"
},
{
"start_date": "2023-12-01T00:00:00.000Z",
"end_date": "2023-12-31T23:59:59.999Z",
"amount": 1000,
"is_whole_month": true,
"month": "December",
"payment_type": "rent"
},
{
"start_date": "2024-01-01T00:00:00.000Z",
"end_date": "2024-01-31T23:59:59.999Z",
"amount": 1000,
"is_whole_month": true,
"month": "January",
"payment_type": "rent"
},
{
"start_date": "2024-02-01T00:00:00.000Z",
"end_date": "2024-02-29T23:59:59.999Z",
"amount": 1000,
"is_whole_month": true,
"month": "February",
"payment_type": "rent"
},
{
"start_date": "2024-03-01T00:00:00.000Z",
"end_date": "2024-03-31T23:59:59.999Z",
"amount": 1000,
"is_whole_month": true,
"month": "March",
"payment_type": "rent"
},
{
"start_date": "2024-04-01T00:00:00.000Z",
"end_date": "2024-04-30T23:59:59.999Z",
"amount": 1000,
"is_whole_month": true,
"month": "April",
"payment_type": "rent"
},
{
"start_date": "2024-05-01T00:00:00.000Z",
"end_date": "2024-05-31T23:59:59.999Z",
"amount": 1000,
"is_whole_month": true,
"month": "May",
"payment_type": "rent"
},
{
"start_date": "2024-06-01T00:00:00.000Z",
"end_date": "2024-06-30T23:59:59.999Z",
"amount": 1000,
"is_whole_month": true,
"month": "June",
"payment_type": "rent"
},
{
"start_date": "2024-07-01T00:00:00.000Z",
"end_date": "2024-07-31T23:59:59.999Z",
"amount": 1000,
"is_whole_month": true,
"month": "July",
"payment_type": "rent"
},
{
"start_date": "2024-08-01T00:00:00.000Z",
"end_date": "2024-08-31T23:59:59.999Z",
"amount": 1000,
"is_whole_month": true,
"month": "August",
"payment_type": "rent"
},
{
"start_date": "2024-09-01T00:00:00.000Z",
"end_date": "2024-09-14T23:59:59.999Z",
"amount": 427.4,
"is_whole_month": false,
"month": "Pro Rata from 1 to 14 of September",
"payment_type": "rent"
}
]
}
],
"date_created": "2020-01-01T00:00:00.000Z",
"date_modified": "2020-01-01T00:00:00.000Z",
"tenancy_length_in_days": 365,
"number_of_invoices": 1,
"total": 14315.07
}
],
"date_created": "2020-01-01T00:00:00.000Z",
"date_modified": "2020-01-01T00:00:00.000Z"
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment