Class: DocuSign_Admin::SubAccountCreateWorker
- Inherits:
-
Object
- Object
- DocuSign_Admin::SubAccountCreateWorker
- Defined in:
- lib/docusign_admin/models/sub_account_create_worker.rb
Defined Under Namespace
Classes: EnumAttributeValidator
Instance Attribute Summary collapse
-
#asset_group_id ⇒ Object
The asset group id the accounts belong to.
-
#asset_group_work_id ⇒ Object
The create account work id.
-
#asset_group_work_type ⇒ Object
The type of asset group work.
-
#attempts ⇒ Object
The number of times the work has been attempted.
-
#create_account_processing_failure_details ⇒ Object
The processing failures if the work is in PendingError/ProcessingError status.
-
#created_by_email ⇒ Object
The email of the creator of the account creation work.
-
#created_by_name ⇒ Object
The name of the initiator of the account creation work.
-
#created_date ⇒ Object
The date the account creation work is initiated.
-
#message ⇒ Object
The message associated with the account creation work.
-
#order_id ⇒ Object
The order id created by the creation work.
-
#status ⇒ Object
The account creation status.
-
#subscription_details ⇒ Object
The subscription info to create the account.
-
#target_account ⇒ Object
The target account being created.
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 = {}) ⇒ SubAccountCreateWorker
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 = {}) ⇒ SubAccountCreateWorker
Initializes the object
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 |
# File 'lib/docusign_admin/models/sub_account_create_worker.rb', line 117 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?(:'targetAccount') self.target_account = attributes[:'targetAccount'] end if attributes.has_key?(:'subscriptionDetails') self.subscription_details = attributes[:'subscriptionDetails'] end if attributes.has_key?(:'assetGroupWorkId') self.asset_group_work_id = attributes[:'assetGroupWorkId'] end if attributes.has_key?(:'assetGroupId') self.asset_group_id = attributes[:'assetGroupId'] end if attributes.has_key?(:'assetGroupWorkType') self.asset_group_work_type = attributes[:'assetGroupWorkType'] end if attributes.has_key?(:'status') self.status = attributes[:'status'] end if attributes.has_key?(:'orderId') self.order_id = attributes[:'orderId'] end if attributes.has_key?(:'attempts') self.attempts = attributes[:'attempts'] end if attributes.has_key?(:'createdDate') self.created_date = attributes[:'createdDate'] end if attributes.has_key?(:'createdByName') self.created_by_name = attributes[:'createdByName'] end if attributes.has_key?(:'createdByEmail') self.created_by_email = attributes[:'createdByEmail'] end if attributes.has_key?(:'message') self. = attributes[:'message'] end if attributes.has_key?(:'createAccountProcessingFailureDetails') self.create_account_processing_failure_details = attributes[:'createAccountProcessingFailureDetails'] end end |
Instance Attribute Details
#asset_group_id ⇒ Object
The asset group id the accounts belong to.
26 27 28 |
# File 'lib/docusign_admin/models/sub_account_create_worker.rb', line 26 def asset_group_id @asset_group_id end |
#asset_group_work_id ⇒ Object
The create account work id.
23 24 25 |
# File 'lib/docusign_admin/models/sub_account_create_worker.rb', line 23 def asset_group_work_id @asset_group_work_id end |
#asset_group_work_type ⇒ Object
The type of asset group work.
29 30 31 |
# File 'lib/docusign_admin/models/sub_account_create_worker.rb', line 29 def asset_group_work_type @asset_group_work_type end |
#attempts ⇒ Object
The number of times the work has been attempted.
38 39 40 |
# File 'lib/docusign_admin/models/sub_account_create_worker.rb', line 38 def attempts @attempts end |
#create_account_processing_failure_details ⇒ Object
The processing failures if the work is in PendingError/ProcessingError status.
53 54 55 |
# File 'lib/docusign_admin/models/sub_account_create_worker.rb', line 53 def create_account_processing_failure_details @create_account_processing_failure_details end |
#created_by_email ⇒ Object
The email of the creator of the account creation work.
47 48 49 |
# File 'lib/docusign_admin/models/sub_account_create_worker.rb', line 47 def created_by_email @created_by_email end |
#created_by_name ⇒ Object
The name of the initiator of the account creation work.
44 45 46 |
# File 'lib/docusign_admin/models/sub_account_create_worker.rb', line 44 def created_by_name @created_by_name end |
#created_date ⇒ Object
The date the account creation work is initiated.
41 42 43 |
# File 'lib/docusign_admin/models/sub_account_create_worker.rb', line 41 def created_date @created_date end |
#message ⇒ Object
The message associated with the account creation work.
50 51 52 |
# File 'lib/docusign_admin/models/sub_account_create_worker.rb', line 50 def @message end |
#order_id ⇒ Object
The order id created by the creation work.
35 36 37 |
# File 'lib/docusign_admin/models/sub_account_create_worker.rb', line 35 def order_id @order_id end |
#status ⇒ Object
The account creation status.
32 33 34 |
# File 'lib/docusign_admin/models/sub_account_create_worker.rb', line 32 def status @status end |
#subscription_details ⇒ Object
The subscription info to create the account
20 21 22 |
# File 'lib/docusign_admin/models/sub_account_create_worker.rb', line 20 def subscription_details @subscription_details end |
#target_account ⇒ Object
The target account being created
17 18 19 |
# File 'lib/docusign_admin/models/sub_account_create_worker.rb', line 17 def target_account @target_account end |
Class Method Details
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 |
# File 'lib/docusign_admin/models/sub_account_create_worker.rb', line 78 def self.attribute_map { :'target_account' => :'targetAccount', :'subscription_details' => :'subscriptionDetails', :'asset_group_work_id' => :'assetGroupWorkId', :'asset_group_id' => :'assetGroupId', :'asset_group_work_type' => :'assetGroupWorkType', :'status' => :'status', :'order_id' => :'orderId', :'attempts' => :'attempts', :'created_date' => :'createdDate', :'created_by_name' => :'createdByName', :'created_by_email' => :'createdByEmail', :'message' => :'message', :'create_account_processing_failure_details' => :'createAccountProcessingFailureDetails' } end |
.swagger_types ⇒ Object
Attribute type mapping.
97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 |
# File 'lib/docusign_admin/models/sub_account_create_worker.rb', line 97 def self.swagger_types { :'target_account' => :'SubAccountCreateTargetAccount', :'subscription_details' => :'SubAccountCreateSubscriptionDetails', :'asset_group_work_id' => :'String', :'asset_group_id' => :'String', :'asset_group_work_type' => :'String', :'status' => :'String', :'order_id' => :'String', :'attempts' => :'Integer', :'created_date' => :'DateTime', :'created_by_name' => :'String', :'created_by_email' => :'String', :'message' => :'String', :'create_account_processing_failure_details' => :'SubAccountErrorDetails' } end |
Instance Method Details
#==(o) ⇒ Object
Checks equality by comparing each attribute.
225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 |
# File 'lib/docusign_admin/models/sub_account_create_worker.rb', line 225 def ==(o) return true if self.equal?(o) self.class == o.class && target_account == o.target_account && subscription_details == o.subscription_details && asset_group_work_id == o.asset_group_work_id && asset_group_id == o.asset_group_id && asset_group_work_type == o.asset_group_work_type && status == o.status && order_id == o.order_id && attempts == o.attempts && created_date == o.created_date && created_by_name == o.created_by_name && created_by_email == o.created_by_email && == o. && create_account_processing_failure_details == o.create_account_processing_failure_details end |
#_deserialize(type, value) ⇒ Object
Deserializes the data based on type
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 305 306 307 308 309 310 311 312 313 314 315 |
# File 'lib/docusign_admin/models/sub_account_create_worker.rb', line 279 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_Admin.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
345 346 347 348 349 350 351 352 353 354 355 356 357 |
# File 'lib/docusign_admin/models/sub_account_create_worker.rb', line 345 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
258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 |
# File 'lib/docusign_admin/models/sub_account_create_worker.rb', line 258 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
245 246 247 |
# File 'lib/docusign_admin/models/sub_account_create_worker.rb', line 245 def eql?(o) self == o end |
#hash ⇒ Fixnum
Calculates hash code according to all attributes.
251 252 253 |
# File 'lib/docusign_admin/models/sub_account_create_worker.rb', line 251 def hash [target_account, subscription_details, asset_group_work_id, asset_group_id, asset_group_work_type, status, order_id, attempts, created_date, created_by_name, created_by_email, , create_account_processing_failure_details].hash end |
#list_invalid_properties ⇒ Object
Show invalid properties with the reasons. Usually used together with valid?
178 179 180 181 182 183 184 185 186 187 188 189 |
# File 'lib/docusign_admin/models/sub_account_create_worker.rb', line 178 def list_invalid_properties invalid_properties = Array.new if @target_account.nil? invalid_properties.push('invalid value for "target_account", target_account cannot be nil.') end if @subscription_details.nil? invalid_properties.push('invalid value for "subscription_details", subscription_details cannot be nil.') end invalid_properties end |
#to_body ⇒ Hash
to_body is an alias to to_hash (backward compatibility)
325 326 327 |
# File 'lib/docusign_admin/models/sub_account_create_worker.rb', line 325 def to_body to_hash end |
#to_hash ⇒ Hash
Returns the object in the form of hash
331 332 333 334 335 336 337 338 339 |
# File 'lib/docusign_admin/models/sub_account_create_worker.rb', line 331 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
319 320 321 |
# File 'lib/docusign_admin/models/sub_account_create_worker.rb', line 319 def to_s to_hash.to_s end |
#valid? ⇒ Boolean
Check to see if the all the properties in the model are valid
193 194 195 196 197 198 199 200 201 |
# File 'lib/docusign_admin/models/sub_account_create_worker.rb', line 193 def valid? return false if @target_account.nil? return false if @subscription_details.nil? asset_group_work_type_validator = EnumAttributeValidator.new('String', ['Undefined', 'GroupAssetFulfillment', 'AccountAssetFulfillment', 'AccountAssetClone', 'AccountAssetCreate', 'SubscriptionSync']) return false unless asset_group_work_type_validator.valid?(@asset_group_work_type) status_validator = EnumAttributeValidator.new('String', ['Undefined', 'Pending', 'Processing', 'ProcessingOnHold', 'PendingError', 'ProcessingError', 'Completed', 'Canceled', 'PermanentFailure']) return false unless status_validator.valid?(@status) true end |