class Pinnacle::Company

def self.from_json(json_object:)

Returns:
  • (Pinnacle::Company) -

Parameters:
  • json_object (String) --
def self.from_json(json_object:)
  struct = JSON.parse(json_object, object_class: OpenStruct)
  parsed_json = JSON.parse(json_object)
  id = parsed_json["id"]
  created_at = (DateTime.parse(parsed_json["createdAt"]) unless parsed_json["createdAt"].nil?)
  name = parsed_json["name"]
  category = parsed_json["category"]
  address = parsed_json["address"]
  ein = parsed_json["ein"]
  description = parsed_json["description"]
  brand_color = parsed_json["brandColor"]
  logo_url = parsed_json["logoUrl"]
  hero_url = parsed_json["heroUrl"]
  primary_website_url = parsed_json["primaryWebsiteUrl"]
  primary_website_label = parsed_json["primaryWebsiteLabel"]
  primary_phone = parsed_json["primaryPhone"]
  primary_phone_label = parsed_json["primaryPhoneLabel"]
  primary_email = parsed_json["primaryEmail"]
  primary_email_label = parsed_json["primaryEmailLabel"]
  privacy_policy_url = parsed_json["privacyPolicyUrl"]
  tos_url = parsed_json["tosUrl"]
  poc_name = parsed_json["pocName"]
  poc_title = parsed_json["pocTitle"]
  poc_email = parsed_json["pocEmail"]
  opt_in = parsed_json["optIn"]
  opt_out = parsed_json["optOut"]
  opt_out_keywords = parsed_json["optOutKeywords"]
  agent_use_case = parsed_json["agentUseCase"]
  expected_agent_responses = parsed_json["expectedAgentResponses"]
  test_numbers = parsed_json["testNumbers"]
  status = parsed_json["status"]
  additional_websites = parsed_json["additionalWebsites"]&.map do |item|
    item = item.to_json
    Pinnacle::CompanyAdditionalWebsitesItem.from_json(json_object: item)
  end
  additional_emails = parsed_json["additionalEmails"]&.map do |item|
    item = item.to_json
    Pinnacle::CompanyAdditionalEmailsItem.from_json(json_object: item)
  end
  additional_phone_numbers = parsed_json["additionalPhoneNumbers"]&.map do |item|
    item = item.to_json
    Pinnacle::CompanyAdditionalPhoneNumbersItem.from_json(json_object: item)
  end
  new(
    id: id,
    created_at: created_at,
    name: name,
    category: category,
    address: address,
    ein: ein,
    description: description,
    brand_color: brand_color,
    logo_url: logo_url,
    hero_url: hero_url,
    primary_website_url: primary_website_url,
    primary_website_label: primary_website_label,
    primary_phone: primary_phone,
    primary_phone_label: primary_phone_label,
    primary_email: primary_email,
    primary_email_label: primary_email_label,
    privacy_policy_url: privacy_policy_url,
    tos_url: tos_url,
    poc_name: poc_name,
    poc_title: poc_title,
    poc_email: poc_email,
    opt_in: opt_in,
    opt_out: opt_out,
    opt_out_keywords: opt_out_keywords,
    agent_use_case: agent_use_case,
    expected_agent_responses: expected_agent_responses,
    test_numbers: test_numbers,
    status: status,
    additional_websites: additional_websites,
    additional_emails: additional_emails,
    additional_phone_numbers: additional_phone_numbers,
    additional_properties: struct
  )
end

def self.validate_raw(obj:)

Returns:
  • (Void) -

Parameters:
  • obj (Object) --
def self.validate_raw(obj:)
  obj.id&.is_a?(Integer) != false || raise("Passed value for field obj.id is not the expected type, validation failed.")
  obj.created_at&.is_a?(DateTime) != false || raise("Passed value for field obj.created_at is not the expected type, validation failed.")
  obj.name&.is_a?(String) != false || raise("Passed value for field obj.name is not the expected type, validation failed.")
  obj.category&.is_a?(Pinnacle::CompanyCategory) != false || raise("Passed value for field obj.category is not the expected type, validation failed.")
  obj.address&.is_a?(String) != false || raise("Passed value for field obj.address is not the expected type, validation failed.")
  obj.ein&.is_a?(String) != false || raise("Passed value for field obj.ein is not the expected type, validation failed.")
  obj.description&.is_a?(String) != false || raise("Passed value for field obj.description is not the expected type, validation failed.")
  obj.brand_color&.is_a?(String) != false || raise("Passed value for field obj.brand_color is not the expected type, validation failed.")
  obj.logo_url&.is_a?(String) != false || raise("Passed value for field obj.logo_url is not the expected type, validation failed.")
  obj.hero_url&.is_a?(String) != false || raise("Passed value for field obj.hero_url is not the expected type, validation failed.")
  obj.primary_website_url&.is_a?(String) != false || raise("Passed value for field obj.primary_website_url is not the expected type, validation failed.")
  obj.primary_website_label&.is_a?(String) != false || raise("Passed value for field obj.primary_website_label is not the expected type, validation failed.")
  obj.primary_phone&.is_a?(String) != false || raise("Passed value for field obj.primary_phone is not the expected type, validation failed.")
  obj.primary_phone_label&.is_a?(String) != false || raise("Passed value for field obj.primary_phone_label is not the expected type, validation failed.")
  obj.primary_email&.is_a?(String) != false || raise("Passed value for field obj.primary_email is not the expected type, validation failed.")
  obj.primary_email_label&.is_a?(String) != false || raise("Passed value for field obj.primary_email_label is not the expected type, validation failed.")
  obj.privacy_policy_url&.is_a?(String) != false || raise("Passed value for field obj.privacy_policy_url is not the expected type, validation failed.")
  obj.tos_url&.is_a?(String) != false || raise("Passed value for field obj.tos_url is not the expected type, validation failed.")
  obj.poc_name&.is_a?(String) != false || raise("Passed value for field obj.poc_name is not the expected type, validation failed.")
  obj.poc_title&.is_a?(String) != false || raise("Passed value for field obj.poc_title is not the expected type, validation failed.")
  obj.poc_email&.is_a?(String) != false || raise("Passed value for field obj.poc_email is not the expected type, validation failed.")
  obj.opt_in&.is_a?(String) != false || raise("Passed value for field obj.opt_in is not the expected type, validation failed.")
  obj.opt_out&.is_a?(String) != false || raise("Passed value for field obj.opt_out is not the expected type, validation failed.")
  obj.opt_out_keywords&.is_a?(Array) != false || raise("Passed value for field obj.opt_out_keywords is not the expected type, validation failed.")
  obj.agent_use_case&.is_a?(String) != false || raise("Passed value for field obj.agent_use_case is not the expected type, validation failed.")
  obj.expected_agent_responses&.is_a?(String) != false || raise("Passed value for field obj.expected_agent_responses is not the expected type, validation failed.")
  obj.test_numbers&.is_a?(Array) != false || raise("Passed value for field obj.test_numbers is not the expected type, validation failed.")
  obj.status&.is_a?(String) != false || raise("Passed value for field obj.status is not the expected type, validation failed.")
  obj.additional_websites&.is_a?(Array) != false || raise("Passed value for field obj.additional_websites is not the expected type, validation failed.")
  obj.additional_emails&.is_a?(Array) != false || raise("Passed value for field obj.additional_emails is not the expected type, validation failed.")
  obj.additional_phone_numbers&.is_a?(Array) != false || raise("Passed value for field obj.additional_phone_numbers is not the expected type, validation failed.")
end

def initialize(id: OMIT, created_at: OMIT, name: OMIT, category: OMIT, address: OMIT, ein: OMIT, description: OMIT,

Returns:
  • (Pinnacle::Company) -

Parameters:
  • additional_properties (OpenStruct) -- Additional properties unmapped to the current class definition
  • additional_phone_numbers (Array) -- A list of additional phone numbers
  • additional_emails (Array) -- A list of additional email addresses
  • additional_websites (Array) -- A list of additional websites
  • status (String) -- The approval status of the company
  • test_numbers (Array) -- A list of test phone numbers
  • expected_agent_responses (String) -- Please provide some example messages that your agent will send.
  • agent_use_case (String) -- Please define what your agent will do.
  • opt_out_keywords (Array) -- Please provide the unique keywords to opt out. Each keyword should not contain
  • opt_out (String) -- Explain how users will opt out of receiving messages.
  • opt_in (String) -- Explain how users will opt in to receive messages.
  • poc_email (String) -- The email address of the point of contact
  • poc_title (String) -- The title of the point of contact
  • poc_name (String) -- The name of the point of contact
  • tos_url (String) -- The URL of the company's terms of service
  • privacy_policy_url (String) -- The URL of the company's privacy policy
  • primary_email_label (String) -- The label for the primary email address
  • primary_email (String) -- The primary email address of the company
  • primary_phone_label (String) -- The label for the primary phone number
  • primary_phone (String) -- The primary phone number of the company
  • primary_website_label (String) -- The label for the primary website URL
  • primary_website_url (String) -- The primary website URL of the company
  • hero_url (String) -- The URL of the company's hero image
  • logo_url (String) -- The URL of the company's logo
  • brand_color (String) -- The brand color of the company
  • description (String) -- A description of the company
  • ein (String) -- The Employer Identification Number (EIN) of the company
  • address (String) -- The address of the company
  • category (Pinnacle::CompanyCategory) -- The category of the company
  • name (String) -- The name of the company
  • created_at (DateTime) -- The date and time when the company was created
  • id (Integer) -- The unique identifier for the company
def initialize(id: OMIT, created_at: OMIT, name: OMIT, category: OMIT, address: OMIT, ein: OMIT, description: OMIT,
               brand_color: OMIT, logo_url: OMIT, hero_url: OMIT, primary_website_url: OMIT, primary_website_label: OMIT, primary_phone: OMIT, primary_phone_label: OMIT, primary_email: OMIT, primary_email_label: OMIT, privacy_policy_url: OMIT, tos_url: OMIT, poc_name: OMIT, poc_title: OMIT, poc_email: OMIT, opt_in: OMIT, opt_out: OMIT, opt_out_keywords: OMIT, agent_use_case: OMIT, expected_agent_responses: OMIT, test_numbers: OMIT, status: OMIT, additional_websites: OMIT, additional_emails: OMIT, additional_phone_numbers: OMIT, additional_properties: nil)
  @id = id if id != OMIT
  @created_at = created_at if created_at != OMIT
  @name = name if name != OMIT
  @category = category if category != OMIT
  @address = address if address != OMIT
  @ein = ein if ein != OMIT
  @description = description if description != OMIT
  @brand_color = brand_color if brand_color != OMIT
  @logo_url = logo_url if logo_url != OMIT
  @hero_url = hero_url if hero_url != OMIT
  @primary_website_url = primary_website_url if primary_website_url != OMIT
  @primary_website_label = primary_website_label if primary_website_label != OMIT
  @primary_phone = primary_phone if primary_phone != OMIT
  @primary_phone_label = primary_phone_label if primary_phone_label != OMIT
  @primary_email = primary_email if primary_email != OMIT
  @primary_email_label = primary_email_label if primary_email_label != OMIT
  @privacy_policy_url = privacy_policy_url if privacy_policy_url != OMIT
  @tos_url = tos_url if tos_url != OMIT
  @poc_name = poc_name if poc_name != OMIT
  @poc_title = poc_title if poc_title != OMIT
  @poc_email = poc_email if poc_email != OMIT
  @opt_in = opt_in if opt_in != OMIT
  @opt_out = opt_out if opt_out != OMIT
  @opt_out_keywords = opt_out_keywords if opt_out_keywords != OMIT
  @agent_use_case = agent_use_case if agent_use_case != OMIT
  @expected_agent_responses = expected_agent_responses if expected_agent_responses != OMIT
  @test_numbers = test_numbers if test_numbers != OMIT
  @status = status if status != OMIT
  @additional_websites = additional_websites if additional_websites != OMIT
  @additional_emails = additional_emails if additional_emails != OMIT
  @additional_phone_numbers = additional_phone_numbers if additional_phone_numbers != OMIT
  @additional_properties = additional_properties
  @_field_set = {
    "id": id,
    "createdAt": created_at,
    "name": name,
    "category": category,
    "address": address,
    "ein": ein,
    "description": description,
    "brandColor": brand_color,
    "logoUrl": logo_url,
    "heroUrl": hero_url,
    "primaryWebsiteUrl": primary_website_url,
    "primaryWebsiteLabel": primary_website_label,
    "primaryPhone": primary_phone,
    "primaryPhoneLabel": primary_phone_label,
    "primaryEmail": primary_email,
    "primaryEmailLabel": primary_email_label,
    "privacyPolicyUrl": privacy_policy_url,
    "tosUrl": tos_url,
    "pocName": poc_name,
    "pocTitle": poc_title,
    "pocEmail": poc_email,
    "optIn": opt_in,
    "optOut": opt_out,
    "optOutKeywords": opt_out_keywords,
    "agentUseCase": agent_use_case,
    "expectedAgentResponses": expected_agent_responses,
    "testNumbers": test_numbers,
    "status": status,
    "additionalWebsites": additional_websites,
    "additionalEmails": additional_emails,
    "additionalPhoneNumbers": additional_phone_numbers
  }.reject do |_k, v|
    v == OMIT
  end
end

def to_json(*_args)

Returns:
  • (String) -
def to_json(*_args)
  @_field_set&.to_json
end