class Pinnacle::CompanyDetails
def self.from_json(json_object:)
-
(Pinnacle::CompanyDetails)
-
Parameters:
-
json_object
(String
) --
def self.from_json(json_object:) struct = JSON.parse(json_object, object_class: OpenStruct) parsed_json = JSON.parse(json_object) 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"] new( name: name, category: category, address: address, ein: ein, description: description, brand_color: brand_color, logo_url: logo_url, hero_url: hero_url, additional_properties: struct ) end
def self.validate_raw(obj:)
-
(Void)
-
Parameters:
-
obj
(Object
) --
def self.validate_raw(obj:) 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.") end
def initialize(name:, category:, address:, ein:, description:, brand_color:, logo_url:, hero_url:,
-
(Pinnacle::CompanyDetails)
-
Parameters:
-
additional_properties
(OpenStruct
) -- Additional properties unmapped to the current class definition -
hero_url
(String
) -- URL of the company's hero image. -
logo_url
(String
) -- URL of the company logo. -
brand_color
(String
) -- The brand color in hex format, must pass a contrast ratio of at least 4.5:1 with -
description
(String
) -- A description of the company. -
ein
(String
) -- The EIN (Employer Identification Number) 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.
def initialize(name:, category:, address:, ein:, description:, brand_color:, logo_url:, hero_url:, additional_properties: nil) @name = name @category = category @address = address @ein = ein @description = description @brand_color = brand_color @logo_url = logo_url @hero_url = hero_url @additional_properties = additional_properties @_field_set = { "name": name, "category": category, "address": address, "ein": ein, "description": description, "brandColor": brand_color, "logoUrl": logo_url, "heroUrl": hero_url } end
def to_json(*_args)
-
(String)
-
def to_json(*_args) @_field_set&.to_json end