class Pinnacle::CompanyAdditionalEmailsItem
def self.from_json(json_object:)
-
(Pinnacle::CompanyAdditionalEmailsItem)
-
Parameters:
-
json_object
(String
) --
def self.from_json(json_object:) struct = JSON.parse(json_object, object_class: OpenStruct) parsed_json = JSON.parse(json_object) email = parsed_json["email"] label = parsed_json["label"] new( email: email, label: label, additional_properties: struct ) end
def self.validate_raw(obj:)
-
(Void)
-
Parameters:
-
obj
(Object
) --
def self.validate_raw(obj:) obj.email&.is_a?(String) != false || raise("Passed value for field obj.email is not the expected type, validation failed.") obj.label&.is_a?(String) != false || raise("Passed value for field obj.label is not the expected type, validation failed.") end
def initialize(email: OMIT, label: OMIT, additional_properties: nil)
-
(Pinnacle::CompanyAdditionalEmailsItem)
-
Parameters:
-
additional_properties
(OpenStruct
) -- Additional properties unmapped to the current class definition -
label
(String
) -- The label for the additional email address -
email
(String
) -- The additional email address
def initialize(email: OMIT, label: OMIT, additional_properties: nil) @email = email if email != OMIT @label = label if label != OMIT @additional_properties = additional_properties @_field_set = { "email": email, "label": label }.reject do |_k, v| v == OMIT end end
def to_json(*_args)
-
(String)
-
def to_json(*_args) @_field_set&.to_json end