Skip to content

Instantly share code, notes, and snippets.

@kenelliott
Created January 21, 2014 21:05
Show Gist options
  • Save kenelliott/8548371 to your computer and use it in GitHub Desktop.
Save kenelliott/8548371 to your computer and use it in GitHub Desktop.

##Subscriber List

http://employee-portal.dev/#/ui/subs_list

In a single-account / multi-subscriber scenerio, the UI would require these object formats.

{ 
	accounts: [
		{
			id: 1, 
			company_id: 1,
			account_number: 1234,
			primary_subscriber_id: 1,
			subscriber_ids: [1],
			comment_ids: [1],
			activity_ids: [1],
			created_at: "2013-10-17T15:28:44.000-04:00",
			updated_at: "2013-10-17T15:28:44.000-04:00",
			archived_at: "2013-10-17T15:28:44.000-04:00"
		}
	],
	subscribers: [
		{
			id: 1,
			first_name: "Totes",
			last_name: "MaGotes",
			email: "totes@magotes.com",
			password: "5f4dcc3b5aa765d61d8327deb882cf99",
			line_ids: [1],
			primary_line_id: 1,
			address_ids: [1],
			primary_address_id: 1,
			comment_ids: [2],
			order_ids: [1]
			activity_ids: [2],
			archived: false,
			created_at: "2013-10-17T15:28:44.000-04:00",
			updated_at: "2013-10-17T15:28:44.000-04:00",
			archived_at: "2013-10-17T15:28:44.000-04:00"
		}
	],
	addresses: [
		{
			id: 1,
			line1: "123 Sesame Street",
			line2: "Apt #203",
			city: "New York",
			state: "New York",
			zip_code: "10026",
			activity_ids: [3],
			archived: false,
			created_at: "2013-10-17T15:28:44.000-04:00",
			updated_at: "2013-10-17T15:28:44.000-04:00",
			archived_at: "2013-10-17T15:28:44.000-04:00"
		}
	]
}

Notes:

  • Lines are tied to subscribers, not accounts. Accessible through subscriber list.
  • Account information is part of the primary subscriber. (ie. firstName, lastName)
  • Subscribers have a primary address. (ie. zipCode)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment