Skip to content

Instantly share code, notes, and snippets.

@jnacier
Last active February 17, 2021 12:25
Show Gist options
  • Select an option

  • Save jnacier/7884284e416cc27bbfb24c30010ff45b to your computer and use it in GitHub Desktop.

Select an option

Save jnacier/7884284e416cc27bbfb24c30010ff45b to your computer and use it in GitHub Desktop.
Object Models
/**
@Object Account --> To be umbrella object linking users and company
*/
{
"id": "string", //
"name": "string", //
"recurlyAccountId": "string",
"stripeAccountId": "string"
}
/**
@Object User
*/
{
"id": "string", //
"email": "string", //
"firstName": "string",
"lastName": "string",
"companyId": "string", // RK Company.Id
}
/**
@Object Company
*/
{
"id": "string",
"accountID": "string", // RK Account.Id
"name": "string",
"legalCode": "string",
"industry": "string", // Probably for Hubspot
"phone": "string",
"billingAddress" : {
"street1": "string",
"street2": "string",
"postalCode": "string",
"state": "string",
"city": "string",
"country": "string"
},
"taxNumber": "string", // VAT
"hubspotId": "string", // Ext Ref --> Should probably be de-couple through "External Services" abstraction module
"solutions": "Array<AccountSolution>", //
}
/**
@Object AccountSolution implements SolutionInterface
*/
{
"solutionKey": "string", // Ref to global solution const list
"subscriptionID": "string",
"name": "string", //
"config": {
// add stuff
}
}
/**
@Object Subscription
*/
{
"id": "string", //
"name": "string", //
"companyId": "string", //
"subscriptionId": "string", // Ext Ref Recurly Subscription ID
"status": "enum{Active,Inactive,Unpaid}", //
"statusDate": "datetime", //
"canceled": "bool", //
"cancelDate": "datetime", //
"updateDate": "datetime", //
"solutions": "Array<AccountSolution>", //
}
/**
@Object Audit --> WIP
*/
{
"id": "string", //
"eventDate": "datetime", //
"eventObject": "string", //
"before": "Object", //
"after": "Object", //
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment