Class: Merge::Ats::AccountDetailsAndActions
- Inherits:
-
Object
- Object
- Merge::Ats::AccountDetailsAndActions
- Defined in:
- lib/merge_ruby_client/ats/types/account_details_and_actions.rb
Overview
# The LinkedAccount Object
### Description
The `LinkedAccount` object is used to represent an end user's link with a
specific integration.
### Usage Example
View a list of your organization's `LinkedAccount` objects.
Constant Summary collapse
- OMIT =
Object.new
Instance Attribute Summary collapse
- #account_type ⇒ String readonly
-
#additional_properties ⇒ OpenStruct
readonly
Additional properties unmapped to the current class definition.
- #category ⇒ Merge::Ats::CategoryEnum readonly
- #end_user_email_address ⇒ String readonly
- #end_user_organization_name ⇒ String readonly
- #end_user_origin_id ⇒ String readonly
- #id ⇒ String readonly
- #integration ⇒ Merge::Ats::AccountDetailsAndActionsIntegration readonly
-
#is_duplicate ⇒ Boolean
readonly
Whether a Production Linked Account’s credentials match another existing Production Linked Account.
- #status ⇒ Merge::Ats::AccountDetailsAndActionsStatusEnum readonly
- #status_detail ⇒ String readonly
-
#subdomain ⇒ String
readonly
The tenant or domain the customer has provided access to.
- #webhook_listener_url ⇒ String readonly
Class Method Summary collapse
-
.from_json(json_object:) ⇒ Merge::Ats::AccountDetailsAndActions
Deserialize a JSON object to an instance of AccountDetailsAndActions.
-
.validate_raw(obj:) ⇒ Void
Leveraged for Union-type generation, validate_raw attempts to parse the given hash and check each fields type against the current object’s property definitions.
Instance Method Summary collapse
- #initialize(id:, status:, end_user_organization_name:, end_user_email_address:, webhook_listener_url:, account_type:, category: OMIT, status_detail: OMIT, end_user_origin_id: OMIT, subdomain: OMIT, is_duplicate: OMIT, integration: OMIT, additional_properties: nil) ⇒ Merge::Ats::AccountDetailsAndActions constructor
-
#to_json(*_args) ⇒ String
Serialize an instance of AccountDetailsAndActions to a JSON object.
Constructor Details
#initialize(id:, status:, end_user_organization_name:, end_user_email_address:, webhook_listener_url:, account_type:, category: OMIT, status_detail: OMIT, end_user_origin_id: OMIT, subdomain: OMIT, is_duplicate: OMIT, integration: OMIT, additional_properties: nil) ⇒ Merge::Ats::AccountDetailsAndActions
70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 |
# File 'lib/merge_ruby_client/ats/types/account_details_and_actions.rb', line 70 def initialize(id:, status:, end_user_organization_name:, end_user_email_address:, webhook_listener_url:, account_type:, category: OMIT, status_detail: OMIT, end_user_origin_id: OMIT, subdomain: OMIT, is_duplicate: OMIT, integration: OMIT, additional_properties: nil) @id = id @category = category if category != OMIT @status = status @status_detail = status_detail if status_detail != OMIT @end_user_origin_id = end_user_origin_id if end_user_origin_id != OMIT @end_user_organization_name = end_user_organization_name @end_user_email_address = end_user_email_address @subdomain = subdomain if subdomain != OMIT @webhook_listener_url = webhook_listener_url @is_duplicate = is_duplicate if is_duplicate != OMIT @integration = integration if integration != OMIT @account_type = account_type @additional_properties = additional_properties @_field_set = { "id": id, "category": category, "status": status, "status_detail": status_detail, "end_user_origin_id": end_user_origin_id, "end_user_organization_name": end_user_organization_name, "end_user_email_address": end_user_email_address, "subdomain": subdomain, "webhook_listener_url": webhook_listener_url, "is_duplicate": is_duplicate, "integration": integration, "account_type": account_type }.reject do |_k, v| v == OMIT end end |
Instance Attribute Details
#account_type ⇒ String (readonly)
44 45 46 |
# File 'lib/merge_ruby_client/ats/types/account_details_and_actions.rb', line 44 def account_type @account_type end |
#additional_properties ⇒ OpenStruct (readonly)
Returns Additional properties unmapped to the current class definition.
46 47 48 |
# File 'lib/merge_ruby_client/ats/types/account_details_and_actions.rb', line 46 def additional_properties @additional_properties end |
#category ⇒ Merge::Ats::CategoryEnum (readonly)
21 22 23 |
# File 'lib/merge_ruby_client/ats/types/account_details_and_actions.rb', line 21 def category @category end |
#end_user_email_address ⇒ String (readonly)
31 32 33 |
# File 'lib/merge_ruby_client/ats/types/account_details_and_actions.rb', line 31 def end_user_email_address @end_user_email_address end |
#end_user_organization_name ⇒ String (readonly)
29 30 31 |
# File 'lib/merge_ruby_client/ats/types/account_details_and_actions.rb', line 29 def end_user_organization_name @end_user_organization_name end |
#end_user_origin_id ⇒ String (readonly)
27 28 29 |
# File 'lib/merge_ruby_client/ats/types/account_details_and_actions.rb', line 27 def end_user_origin_id @end_user_origin_id end |
#id ⇒ String (readonly)
19 20 21 |
# File 'lib/merge_ruby_client/ats/types/account_details_and_actions.rb', line 19 def id @id end |
#integration ⇒ Merge::Ats::AccountDetailsAndActionsIntegration (readonly)
42 43 44 |
# File 'lib/merge_ruby_client/ats/types/account_details_and_actions.rb', line 42 def integration @integration end |
#is_duplicate ⇒ Boolean (readonly)
Returns Whether a Production Linked Account’s credentials match another existing Production Linked Account. This field is ‘null` for Test Linked Accounts, incomplete Production Linked Accounts, and ignored duplicate Production Linked Account sets.
40 41 42 |
# File 'lib/merge_ruby_client/ats/types/account_details_and_actions.rb', line 40 def is_duplicate @is_duplicate end |
#status ⇒ Merge::Ats::AccountDetailsAndActionsStatusEnum (readonly)
23 24 25 |
# File 'lib/merge_ruby_client/ats/types/account_details_and_actions.rb', line 23 def status @status end |
#status_detail ⇒ String (readonly)
25 26 27 |
# File 'lib/merge_ruby_client/ats/types/account_details_and_actions.rb', line 25 def status_detail @status_detail end |
#subdomain ⇒ String (readonly)
Returns The tenant or domain the customer has provided access to.
33 34 35 |
# File 'lib/merge_ruby_client/ats/types/account_details_and_actions.rb', line 33 def subdomain @subdomain end |
#webhook_listener_url ⇒ String (readonly)
35 36 37 |
# File 'lib/merge_ruby_client/ats/types/account_details_and_actions.rb', line 35 def webhook_listener_url @webhook_listener_url end |
Class Method Details
.from_json(json_object:) ⇒ Merge::Ats::AccountDetailsAndActions
Deserialize a JSON object to an instance of AccountDetailsAndActions
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 |
# File 'lib/merge_ruby_client/ats/types/account_details_and_actions.rb', line 107 def self.from_json(json_object:) struct = JSON.parse(json_object, object_class: OpenStruct) parsed_json = JSON.parse(json_object) id = parsed_json["id"] category = parsed_json["category"] status = parsed_json["status"] status_detail = parsed_json["status_detail"] end_user_origin_id = parsed_json["end_user_origin_id"] end_user_organization_name = parsed_json["end_user_organization_name"] end_user_email_address = parsed_json["end_user_email_address"] subdomain = parsed_json["subdomain"] webhook_listener_url = parsed_json["webhook_listener_url"] is_duplicate = parsed_json["is_duplicate"] if parsed_json["integration"].nil? integration = nil else integration = parsed_json["integration"].to_json integration = Merge::Ats::AccountDetailsAndActionsIntegration.from_json(json_object: integration) end account_type = parsed_json["account_type"] new( id: id, category: category, status: status, status_detail: status_detail, end_user_origin_id: end_user_origin_id, end_user_organization_name: end_user_organization_name, end_user_email_address: end_user_email_address, subdomain: subdomain, webhook_listener_url: webhook_listener_url, is_duplicate: is_duplicate, integration: integration, account_type: account_type, additional_properties: struct ) end |
.validate_raw(obj:) ⇒ Void
Leveraged for Union-type generation, validate_raw attempts to parse the given
hash and check each fields type against the current object's property
definitions.
157 158 159 160 161 162 163 164 165 166 167 168 169 170 |
# File 'lib/merge_ruby_client/ats/types/account_details_and_actions.rb', line 157 def self.validate_raw(obj:) obj.id.is_a?(String) != false || raise("Passed value for field obj.id is not the expected type, validation failed.") obj.category&.is_a?(Merge::Ats::CategoryEnum) != false || raise("Passed value for field obj.category is not the expected type, validation failed.") obj.status.is_a?(Merge::Ats::AccountDetailsAndActionsStatusEnum) != false || raise("Passed value for field obj.status is not the expected type, validation failed.") obj.status_detail&.is_a?(String) != false || raise("Passed value for field obj.status_detail is not the expected type, validation failed.") obj.end_user_origin_id&.is_a?(String) != false || raise("Passed value for field obj.end_user_origin_id is not the expected type, validation failed.") obj.end_user_organization_name.is_a?(String) != false || raise("Passed value for field obj.end_user_organization_name is not the expected type, validation failed.") obj.end_user_email_address.is_a?(String) != false || raise("Passed value for field obj.end_user_email_address is not the expected type, validation failed.") obj.subdomain&.is_a?(String) != false || raise("Passed value for field obj.subdomain is not the expected type, validation failed.") obj.webhook_listener_url.is_a?(String) != false || raise("Passed value for field obj.webhook_listener_url is not the expected type, validation failed.") obj.is_duplicate&.is_a?(Boolean) != false || raise("Passed value for field obj.is_duplicate is not the expected type, validation failed.") obj.integration.nil? || Merge::Ats::AccountDetailsAndActionsIntegration.validate_raw(obj: obj.integration) obj.account_type.is_a?(String) != false || raise("Passed value for field obj.account_type is not the expected type, validation failed.") end |
Instance Method Details
#to_json(*_args) ⇒ String
Serialize an instance of AccountDetailsAndActions to a JSON object
147 148 149 |
# File 'lib/merge_ruby_client/ats/types/account_details_and_actions.rb', line 147 def to_json(*_args) @_field_set&.to_json end |