Class: BudgeaClient::ConnectorSource
- Inherits:
-
Object
- Object
- BudgeaClient::ConnectorSource
- Defined in:
- lib/budgea_client/models/connector_source.rb
Instance Attribute Summary collapse
-
#auth_mechanism ⇒ Object
Authentication mechanism to use.
-
#available_auth_mechanisms ⇒ Object
Returns the value of attribute available_auth_mechanisms.
-
#available_transfer_mechanisms ⇒ Object
Returns the value of attribute available_transfer_mechanisms.
-
#capabilities ⇒ Object
Returns the value of attribute capabilities.
-
#disabled ⇒ Object
This source is not used to synchronize the connection.
-
#fallback ⇒ Object
Name of the source this fallback is for.
-
#id ⇒ Object
ID of the connector source.
-
#id_connector ⇒ Object
ID of the connector.
-
#id_weboob ⇒ Object
Returns the value of attribute id_weboob.
-
#name ⇒ Object
Name of the source.
-
#priority ⇒ Object
The source priority order for the synchronization.
-
#transfer_execution_date_types ⇒ Object
Returns the value of attribute transfer_execution_date_types.
-
#transfer_execution_frequencies ⇒ Object
Returns the value of attribute transfer_execution_frequencies.
-
#transfer_validate_mechanism ⇒ Object
Returns the value of attribute transfer_validate_mechanism.
-
#urls ⇒ Object
Returns the value of attribute urls.
Class Method Summary collapse
-
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
-
.swagger_types ⇒ Object
Attribute type mapping.
Instance Method Summary collapse
-
#==(o) ⇒ Object
Checks equality by comparing each attribute.
-
#_deserialize(type, value) ⇒ Object
Deserializes the data based on type.
-
#_to_hash(value) ⇒ Hash
Outputs non-array value in the form of hash For object, use to_hash.
-
#build_from_hash(attributes) ⇒ Object
Builds the object from hash.
- #eql?(o) ⇒ Boolean
-
#hash ⇒ Fixnum
Calculates hash code according to all attributes.
-
#initialize(attributes = {}) ⇒ ConnectorSource
constructor
Initializes the object.
-
#list_invalid_properties ⇒ Object
Show invalid properties with the reasons.
-
#to_body ⇒ Hash
to_body is an alias to to_hash (backward compatibility).
-
#to_hash ⇒ Hash
Returns the object in the form of hash.
-
#to_s ⇒ String
Returns the string representation of the object.
-
#valid? ⇒ Boolean
Check to see if the all the properties in the model are valid.
Constructor Details
#initialize(attributes = {}) ⇒ ConnectorSource
Initializes the object
98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 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 171 172 173 174 175 |
# File 'lib/budgea_client/models/connector_source.rb', line 98 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?(:'id') self.id = attributes[:'id'] end if attributes.has_key?(:'id_connector') self.id_connector = attributes[:'id_connector'] end if attributes.has_key?(:'name') self.name = attributes[:'name'] end if attributes.has_key?(:'id_weboob') self.id_weboob = attributes[:'id_weboob'] end if attributes.has_key?(:'auth_mechanism') self.auth_mechanism = attributes[:'auth_mechanism'] end if attributes.has_key?(:'fallback') self.fallback = attributes[:'fallback'] end if attributes.has_key?(:'disabled') self.disabled = attributes[:'disabled'] end if attributes.has_key?(:'priority') self.priority = attributes[:'priority'] end if attributes.has_key?(:'capabilities') if (value = attributes[:'capabilities']).is_a?(Array) self.capabilities = value end end if attributes.has_key?(:'available_auth_mechanisms') if (value = attributes[:'available_auth_mechanisms']).is_a?(Array) self.available_auth_mechanisms = value end end if attributes.has_key?(:'urls') if (value = attributes[:'urls']).is_a?(Array) self.urls = value end end if attributes.has_key?(:'available_transfer_mechanisms') if (value = attributes[:'available_transfer_mechanisms']).is_a?(Array) self.available_transfer_mechanisms = value end end if attributes.has_key?(:'transfer_validate_mechanism') self.transfer_validate_mechanism = attributes[:'transfer_validate_mechanism'] end if attributes.has_key?(:'transfer_execution_date_types') if (value = attributes[:'transfer_execution_date_types']).is_a?(Array) self.transfer_execution_date_types = value end end if attributes.has_key?(:'transfer_execution_frequencies') if (value = attributes[:'transfer_execution_frequencies']).is_a?(Array) self.transfer_execution_frequencies = value end end end |
Instance Attribute Details
#auth_mechanism ⇒ Object
Authentication mechanism to use
29 30 31 |
# File 'lib/budgea_client/models/connector_source.rb', line 29 def auth_mechanism @auth_mechanism end |
#available_auth_mechanisms ⇒ Object
Returns the value of attribute available_auth_mechanisms.
42 43 44 |
# File 'lib/budgea_client/models/connector_source.rb', line 42 def available_auth_mechanisms @available_auth_mechanisms end |
#available_transfer_mechanisms ⇒ Object
Returns the value of attribute available_transfer_mechanisms.
46 47 48 |
# File 'lib/budgea_client/models/connector_source.rb', line 46 def available_transfer_mechanisms @available_transfer_mechanisms end |
#capabilities ⇒ Object
Returns the value of attribute capabilities.
40 41 42 |
# File 'lib/budgea_client/models/connector_source.rb', line 40 def capabilities @capabilities end |
#disabled ⇒ Object
This source is not used to synchronize the connection
35 36 37 |
# File 'lib/budgea_client/models/connector_source.rb', line 35 def disabled @disabled end |
#fallback ⇒ Object
Name of the source this fallback is for
32 33 34 |
# File 'lib/budgea_client/models/connector_source.rb', line 32 def fallback @fallback end |
#id ⇒ Object
ID of the connector source
18 19 20 |
# File 'lib/budgea_client/models/connector_source.rb', line 18 def id @id end |
#id_connector ⇒ Object
ID of the connector
21 22 23 |
# File 'lib/budgea_client/models/connector_source.rb', line 21 def id_connector @id_connector end |
#id_weboob ⇒ Object
Returns the value of attribute id_weboob.
26 27 28 |
# File 'lib/budgea_client/models/connector_source.rb', line 26 def id_weboob @id_weboob end |
#name ⇒ Object
Name of the source
24 25 26 |
# File 'lib/budgea_client/models/connector_source.rb', line 24 def name @name end |
#priority ⇒ Object
The source priority order for the synchronization
38 39 40 |
# File 'lib/budgea_client/models/connector_source.rb', line 38 def priority @priority end |
#transfer_execution_date_types ⇒ Object
Returns the value of attribute transfer_execution_date_types.
50 51 52 |
# File 'lib/budgea_client/models/connector_source.rb', line 50 def transfer_execution_date_types @transfer_execution_date_types end |
#transfer_execution_frequencies ⇒ Object
Returns the value of attribute transfer_execution_frequencies.
52 53 54 |
# File 'lib/budgea_client/models/connector_source.rb', line 52 def transfer_execution_frequencies @transfer_execution_frequencies end |
#transfer_validate_mechanism ⇒ Object
Returns the value of attribute transfer_validate_mechanism.
48 49 50 |
# File 'lib/budgea_client/models/connector_source.rb', line 48 def transfer_validate_mechanism @transfer_validate_mechanism end |
#urls ⇒ Object
Returns the value of attribute urls.
44 45 46 |
# File 'lib/budgea_client/models/connector_source.rb', line 44 def urls @urls end |
Class Method Details
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 |
# File 'lib/budgea_client/models/connector_source.rb', line 55 def self.attribute_map { :'id' => :'id', :'id_connector' => :'id_connector', :'name' => :'name', :'id_weboob' => :'id_weboob', :'auth_mechanism' => :'auth_mechanism', :'fallback' => :'fallback', :'disabled' => :'disabled', :'priority' => :'priority', :'capabilities' => :'capabilities', :'available_auth_mechanisms' => :'available_auth_mechanisms', :'urls' => :'urls', :'available_transfer_mechanisms' => :'available_transfer_mechanisms', :'transfer_validate_mechanism' => :'transfer_validate_mechanism', :'transfer_execution_date_types' => :'transfer_execution_date_types', :'transfer_execution_frequencies' => :'transfer_execution_frequencies' } end |
.swagger_types ⇒ Object
Attribute type mapping.
76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 |
# File 'lib/budgea_client/models/connector_source.rb', line 76 def self.swagger_types { :'id' => :'Integer', :'id_connector' => :'Integer', :'name' => :'String', :'id_weboob' => :'String', :'auth_mechanism' => :'String', :'fallback' => :'String', :'disabled' => :'DateTime', :'priority' => :'Integer', :'capabilities' => :'Array<String>', :'available_auth_mechanisms' => :'Array<String>', :'urls' => :'Array<String>', :'available_transfer_mechanisms' => :'Array<String>', :'transfer_validate_mechanism' => :'String', :'transfer_execution_date_types' => :'Array<String>', :'transfer_execution_frequencies' => :'Array<String>' } end |
Instance Method Details
#==(o) ⇒ Object
Checks equality by comparing each attribute.
212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 |
# File 'lib/budgea_client/models/connector_source.rb', line 212 def ==(o) return true if self.equal?(o) self.class == o.class && id == o.id && id_connector == o.id_connector && name == o.name && id_weboob == o.id_weboob && auth_mechanism == o.auth_mechanism && fallback == o.fallback && disabled == o.disabled && priority == o.priority && capabilities == o.capabilities && available_auth_mechanisms == o.available_auth_mechanisms && urls == o.urls && available_transfer_mechanisms == o.available_transfer_mechanisms && transfer_validate_mechanism == o.transfer_validate_mechanism && transfer_execution_date_types == o.transfer_execution_date_types && transfer_execution_frequencies == o.transfer_execution_frequencies end |
#_deserialize(type, value) ⇒ Object
Deserializes the data based on type
268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 |
# File 'lib/budgea_client/models/connector_source.rb', line 268 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 = BudgeaClient.const_get(type).new temp_model.build_from_hash(value) end end |
#_to_hash(value) ⇒ Hash
Outputs non-array value in the form of hash For object, use to_hash. Otherwise, just return the value
334 335 336 337 338 339 340 341 342 343 344 345 346 |
# File 'lib/budgea_client/models/connector_source.rb', line 334 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 |
#build_from_hash(attributes) ⇒ Object
Builds the object from hash
247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 |
# File 'lib/budgea_client/models/connector_source.rb', line 247 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 |
#eql?(o) ⇒ Boolean
234 235 236 |
# File 'lib/budgea_client/models/connector_source.rb', line 234 def eql?(o) self == o end |
#hash ⇒ Fixnum
Calculates hash code according to all attributes.
240 241 242 |
# File 'lib/budgea_client/models/connector_source.rb', line 240 def hash [id, id_connector, name, id_weboob, auth_mechanism, fallback, disabled, priority, capabilities, available_auth_mechanisms, urls, available_transfer_mechanisms, transfer_validate_mechanism, transfer_execution_date_types, transfer_execution_frequencies].hash end |
#list_invalid_properties ⇒ Object
Show invalid properties with the reasons. Usually used together with valid?
179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 |
# File 'lib/budgea_client/models/connector_source.rb', line 179 def list_invalid_properties invalid_properties = Array.new if @id.nil? invalid_properties.push('invalid value for "id", id cannot be nil.') end if @id_connector.nil? invalid_properties.push('invalid value for "id_connector", id_connector cannot be nil.') end if @name.nil? invalid_properties.push('invalid value for "name", name cannot be nil.') end if @id_weboob.nil? invalid_properties.push('invalid value for "id_weboob", id_weboob cannot be nil.') end invalid_properties end |
#to_body ⇒ Hash
to_body is an alias to to_hash (backward compatibility)
314 315 316 |
# File 'lib/budgea_client/models/connector_source.rb', line 314 def to_body to_hash end |
#to_hash ⇒ Hash
Returns the object in the form of hash
320 321 322 323 324 325 326 327 328 |
# File 'lib/budgea_client/models/connector_source.rb', line 320 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 |
#to_s ⇒ String
Returns the string representation of the object
308 309 310 |
# File 'lib/budgea_client/models/connector_source.rb', line 308 def to_s to_hash.to_s end |
#valid? ⇒ Boolean
Check to see if the all the properties in the model are valid
202 203 204 205 206 207 208 |
# File 'lib/budgea_client/models/connector_source.rb', line 202 def valid? return false if @id.nil? return false if @id_connector.nil? return false if @name.nil? return false if @id_weboob.nil? true end |