class DocuSign_Click::DisplaySettings
Attributes
Public Class Methods
Attribute mapping from ruby-style variable name to JSON key.
# File lib/docusign_click/models/display_settings.rb, line 71 def self.attribute_map { :'action_button_alignment' => :'actionButtonAlignment', :'allow_client_only' => :'allowClientOnly', :'allowed_hosts' => :'allowedHosts', :'brand_id' => :'brandId', :'consent_button_text' => :'consentButtonText', :'consent_text' => :'consentText', :'decline_button_text' => :'declineButtonText', :'display_name' => :'displayName', :'document_display' => :'documentDisplay', :'downloadable' => :'downloadable', :'format' => :'format', :'has_decline_button' => :'hasDeclineButton', :'host_origin' => :'hostOrigin', :'must_read' => :'mustRead', :'must_view' => :'mustView', :'record_decline_responses' => :'recordDeclineResponses', :'require_accept' => :'requireAccept', :'send_to_email' => :'sendToEmail' } end
Initializes the object @param [Hash] attributes Model attributes in the form of hash
# File lib/docusign_click/models/display_settings.rb, line 120 def initialize(attributes = {}) return unless attributes.is_a?(Hash) # convert string to symbol for hash key attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v } if attributes.has_key?(:'actionButtonAlignment') self.action_button_alignment = attributes[:'actionButtonAlignment'] end if attributes.has_key?(:'allowClientOnly') self.allow_client_only = attributes[:'allowClientOnly'] end if attributes.has_key?(:'allowedHosts') if (value = attributes[:'allowedHosts']).is_a?(Array) self.allowed_hosts = value end end if attributes.has_key?(:'brandId') self.brand_id = attributes[:'brandId'] end if attributes.has_key?(:'consentButtonText') self.consent_button_text = attributes[:'consentButtonText'] end if attributes.has_key?(:'consentText') self.consent_text = attributes[:'consentText'] end if attributes.has_key?(:'declineButtonText') self.decline_button_text = attributes[:'declineButtonText'] end if attributes.has_key?(:'displayName') self.display_name = attributes[:'displayName'] end if attributes.has_key?(:'documentDisplay') self.document_display = attributes[:'documentDisplay'] end if attributes.has_key?(:'downloadable') self.downloadable = attributes[:'downloadable'] end if attributes.has_key?(:'format') self.format = attributes[:'format'] end if attributes.has_key?(:'hasDeclineButton') self.has_decline_button = attributes[:'hasDeclineButton'] end if attributes.has_key?(:'hostOrigin') self.host_origin = attributes[:'hostOrigin'] end if attributes.has_key?(:'mustRead') self.must_read = attributes[:'mustRead'] end if attributes.has_key?(:'mustView') self.must_view = attributes[:'mustView'] end if attributes.has_key?(:'recordDeclineResponses') self.record_decline_responses = attributes[:'recordDeclineResponses'] end if attributes.has_key?(:'requireAccept') self.require_accept = attributes[:'requireAccept'] end if attributes.has_key?(:'sendToEmail') self.send_to_email = attributes[:'sendToEmail'] end end
Attribute type mapping.
# File lib/docusign_click/models/display_settings.rb, line 95 def self.swagger_types { :'action_button_alignment' => :'String', :'allow_client_only' => :'BOOLEAN', :'allowed_hosts' => :'Array<String>', :'brand_id' => :'String', :'consent_button_text' => :'String', :'consent_text' => :'String', :'decline_button_text' => :'String', :'display_name' => :'String', :'document_display' => :'String', :'downloadable' => :'BOOLEAN', :'format' => :'String', :'has_decline_button' => :'BOOLEAN', :'host_origin' => :'String', :'must_read' => :'BOOLEAN', :'must_view' => :'BOOLEAN', :'record_decline_responses' => :'BOOLEAN', :'require_accept' => :'BOOLEAN', :'send_to_email' => :'BOOLEAN' } end
Public Instance Methods
Checks equality by comparing each attribute. @param [Object] Object to be compared
# File lib/docusign_click/models/display_settings.rb, line 216 def ==(o) return true if self.equal?(o) self.class == o.class && action_button_alignment == o.action_button_alignment && allow_client_only == o.allow_client_only && allowed_hosts == o.allowed_hosts && brand_id == o.brand_id && consent_button_text == o.consent_button_text && consent_text == o.consent_text && decline_button_text == o.decline_button_text && display_name == o.display_name && document_display == o.document_display && downloadable == o.downloadable && format == o.format && has_decline_button == o.has_decline_button && host_origin == o.host_origin && must_read == o.must_read && must_view == o.must_view && record_decline_responses == o.record_decline_responses && require_accept == o.require_accept && send_to_email == o.send_to_email end
Deserializes the data based on type @param string type Data type @param string value Value to be deserialized @return [Object] Deserialized data
# File lib/docusign_click/models/display_settings.rb, line 275 def _deserialize(type, value) case type.to_sym when :DateTime DateTime.parse(value) when :Date Date.parse(value) when :String value.to_s when :Integer value.to_i when :Float value.to_f when :BOOLEAN if value.to_s =~ /\A(true|t|yes|y|1)\z/i true else false end when :Object # generic object (usually a Hash), return directly value when /\AArray<(?<inner_type>.+)>\z/ inner_type = Regexp.last_match[:inner_type] value.map { |v| _deserialize(inner_type, v) } when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/ k_type = Regexp.last_match[:k_type] v_type = Regexp.last_match[:v_type] {}.tap do |hash| value.each do |k, v| hash[_deserialize(k_type, k)] = _deserialize(v_type, v) end end else # model temp_model = DocuSign_Click.const_get(type).new temp_model.build_from_hash(value) end end
Outputs non-array value in the form of hash For object, use to_hash. Otherwise, just return the value @param [Object] value Any valid value @return [Hash] Returns the value in the form of hash
# File lib/docusign_click/models/display_settings.rb, line 341 def _to_hash(value) if value.is_a?(Array) value.compact.map { |v| _to_hash(v) } elsif value.is_a?(Hash) {}.tap do |hash| value.each { |k, v| hash[k] = _to_hash(v) } end elsif value.respond_to? :to_hash value.to_hash else value end end
Builds the object from hash @param [Hash] attributes Model attributes in the form of hash @return [Object] Returns the model itself
# File lib/docusign_click/models/display_settings.rb, line 254 def build_from_hash(attributes) return nil unless attributes.is_a?(Hash) self.class.swagger_types.each_pair do |key, type| if type =~ /\AArray<(.*)>/i # check to ensure the input is an array given that the attribute # is documented as an array but the input is not if attributes[self.class.attribute_map[key]].is_a?(Array) self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) end elsif !attributes[self.class.attribute_map[key]].nil? self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) end # or else data not found in attributes(hash), not an issue as the data can be optional end self end
@see the `==` method @param [Object] Object to be compared
# File lib/docusign_click/models/display_settings.rb, line 241 def eql?(o) self == o end
Calculates hash code according to all attributes. @return [Fixnum] Hash code
# File lib/docusign_click/models/display_settings.rb, line 247 def hash [action_button_alignment, allow_client_only, allowed_hosts, brand_id, consent_button_text, consent_text, decline_button_text, display_name, document_display, downloadable, format, has_decline_button, host_origin, must_read, must_view, record_decline_responses, require_accept, send_to_email].hash end
Show invalid properties with the reasons. Usually used together with valid? @return Array for valid properties with the reasons
# File lib/docusign_click/models/display_settings.rb, line 203 def list_invalid_properties invalid_properties = Array.new invalid_properties end
Returns the object in the form of hash @return [Hash] Returns the object in the form of hash
# File lib/docusign_click/models/display_settings.rb, line 327 def to_hash hash = {} self.class.attribute_map.each_pair do |attr, param| value = self.send(attr) next if value.nil? hash[param] = _to_hash(value) end hash end
Returns the string representation of the object @return [String] String presentation of the object
# File lib/docusign_click/models/display_settings.rb, line 315 def to_s to_hash.to_s end
Check to see if the all the properties in the model are valid @return true if the model is valid
# File lib/docusign_click/models/display_settings.rb, line 210 def valid? true end