Module: ClientSuccess::Schema::Client

Defined in:
lib/client_success/schema/client/create.rb,
lib/client_success/schema/client/update.rb

Constant Summary collapse

Create =

TODO: upgrade dry types to use latest schema functions

Types::Hash.schema(
  name:                           Types::Strict::String,
  site_url:                       Types::Strict::String,
  zip:                            Types::Strict::String,
  status_id:                      Types::Coercible::Int,
  inception_date:                 Types::Strict::String, # TODO
  created_by_employee_id:         Types::Coercible::Int,
  linkedin_url:                   Types::Strict::String,
  managed_by_employee_id:         Types::Coercible::Int,
  active:                         Types::Strict::Bool,
  active_client_success_cycle_id: Types::Coercible::Int,
  zendesk_id:                     Types::Coercible::String,
  desk_id:                        Types::Coercible::String,
  freshdesk_id:                   Types::Coercible::String,
  jira_id:                        Types::Coercible::String,
  terminated_date:                Types::Strict::String, # TODO
  assigned_sales_rep:             Types::Coercible::Int,
  salesforce_account_id:          Types::Coercible::String,
  usage_id:                       Types::Coercible::String,
  street:                         Types::Strict::String,
  state:                          Types::Strict::String,
  country:                        Types::Strict::String,
  city:                           Types::Strict::String,
  external_id:                    Types::Coercible::String
)
Update =

TODO: upgrade dry types to use latest schema functions

Types::Hash.schema(
  external_id:                    Types::Coercible::String,
  name:                           Types::Strict::String,
  site_url:                       Types::Strict::String,
  client_segment_id:              Types::Coercible::Int,
  zip:                            Types::Strict::String,
  modified_by_employee_id:        Types::Coercible::Int,
  status_id:                      Types::Coercible::Int,
  inception_date:                 Types::Strict::String, # TODO
  created_by_employee:            Types::Coercible::Int,
  linkedin_url:                   Types::Strict::String,
  managed_by_employee_id:         Types::Coercible::Int,
  active:                         Types::Strict::Bool,
  success_score:                  Types::Strict::Int,
  active_client_success_cycle_id: Types::Coercible::Int,
  crm_customer_id:                Types::Coercible::String,
  crm_customer_url:               Types::Strict::String,
  zendesk_id:                     Types::Coercible::String,
  desk_id:                        Types::Coercible::String,
  freshdesk_id:                   Types::Coercible::String,
  uservoice_id:                   Types::Coercible::String,
  assigned_sales_rep:             Types::Strict::String,
  custom_field_values:            Types::Strict::Array.default([]), # TODO
  success_cycle_id:               Types::Coercible::Int,
  salesforce_account_id:          Types::Coercible::String,
  jira_id:                        Types::Coercible::String,
  nps_score:                      Types::Strict::Int
)