class Pinnacle::CompanyContact
def self.from_json(json_object:)
-
(Pinnacle::CompanyContact)
-
Parameters:
-
json_object
(String
) --
def self.from_json(json_object:) struct = JSON.parse(json_object, object_class: OpenStruct) parsed_json = JSON.parse(json_object) 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"] new( 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, additional_properties: struct ) end
def self.validate_raw(obj:)
-
(Void)
-
Parameters:
-
obj
(Object
) --
def self.validate_raw(obj:) 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.") end
def initialize(primary_website_url:, primary_website_label:, primary_phone:, primary_phone_label:, primary_email:,
-
(Pinnacle::CompanyContact)
-
Parameters:
-
additional_properties
(OpenStruct
) -- Additional properties unmapped to the current class definition -
tos_url
(String
) -- URL of the terms of service. -
privacy_policy_url
(String
) -- URL of the privacy policy. -
primary_email_label
(String
) -- Label for the primary email address. -
primary_email
(String
) -- Primary email address. -
primary_phone_label
(String
) -- Label for the primary phone number. -
primary_phone
(String
) -- Primary phone number in international format. -
primary_website_label
(String
) -- Label for the primary website. -
primary_website_url
(String
) -- Primary website URL.
def initialize(primary_website_url:, primary_website_label:, primary_phone:, primary_phone_label:, primary_email:, primary_email_label:, privacy_policy_url:, tos_url:, additional_properties: nil) @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 @additional_properties = additional_properties @_field_set = { "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 } end
def to_json(*_args)
-
(String)
-
def to_json(*_args) @_field_set&.to_json end