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