Method: Dropbox::Sign::SubSigningOptions#initialize
- Defined in:
- lib/dropbox-sign/models/sub_signing_options.rb
#initialize(attributes = {}) ⇒ SubSigningOptions
Initializes the object
129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 |
# File 'lib/dropbox-sign/models/sub_signing_options.rb', line 129 def initialize(attributes = {}) if (!attributes.is_a?(Hash)) fail ArgumentError, "The input argument (attributes) must be a hash in `Dropbox::Sign::SubSigningOptions` initialize method" end # check to see if the attribute exists and convert string to symbol for hash key acceptable_attribute_map = self.class.acceptable_attribute_map attributes = attributes.each_with_object({}) { |(k, v), h| if (!self.class.merged_attributes.key?(k.to_sym)) fail ArgumentError, "`#{k}` is not a valid attribute in `Dropbox::Sign::SubSigningOptions`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect end h[k.to_sym] = v } if attributes.key?(:'default_type') self.default_type = attributes[:'default_type'] end if attributes.key?(:'draw') self.draw = attributes[:'draw'] else self.draw = false end if attributes.key?(:'phone') self.phone = attributes[:'phone'] else self.phone = false end if attributes.key?(:'type') self.type = attributes[:'type'] else self.type = false end if attributes.key?(:'upload') self.upload = attributes[:'upload'] else self.upload = false end end |