Class: Merge::Hris::AccountDetails
- Inherits:
-
Object
- Object
- Merge::Hris::AccountDetails
- Defined in:
- lib/merge_ruby_client/hris/types/account_details.rb
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::Hris::CategoryEnum readonly
- #end_user_email_address ⇒ String readonly
- #end_user_organization_name ⇒ String readonly
- #end_user_origin_id ⇒ String readonly
- #id ⇒ String readonly
- #integration ⇒ String readonly
- #integration_slug ⇒ String readonly
-
#is_duplicate ⇒ Boolean
readonly
Whether a Production Linked Account’s credentials match another existing Production Linked Account.
- #status ⇒ String readonly
- #webhook_listener_url ⇒ String readonly
Class Method Summary collapse
-
.from_json(json_object:) ⇒ Merge::Hris::AccountDetails
Deserialize a JSON object to an instance of AccountDetails.
-
.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: OMIT, integration: OMIT, integration_slug: OMIT, category: OMIT, end_user_origin_id: OMIT, end_user_organization_name: OMIT, end_user_email_address: OMIT, status: OMIT, webhook_listener_url: OMIT, is_duplicate: OMIT, account_type: OMIT, additional_properties: nil) ⇒ Merge::Hris::AccountDetails constructor
-
#to_json(*_args) ⇒ String
Serialize an instance of AccountDetails to a JSON object.
Constructor Details
#initialize(id: OMIT, integration: OMIT, integration_slug: OMIT, category: OMIT, end_user_origin_id: OMIT, end_user_organization_name: OMIT, end_user_email_address: OMIT, status: OMIT, webhook_listener_url: OMIT, is_duplicate: OMIT, account_type: OMIT, additional_properties: nil) ⇒ Merge::Hris::AccountDetails
59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 |
# File 'lib/merge_ruby_client/hris/types/account_details.rb', line 59 def initialize(id: OMIT, integration: OMIT, integration_slug: OMIT, category: OMIT, end_user_origin_id: OMIT, end_user_organization_name: OMIT, end_user_email_address: OMIT, status: OMIT, webhook_listener_url: OMIT, is_duplicate: OMIT, account_type: OMIT, additional_properties: nil) @id = id if id != OMIT @integration = integration if integration != OMIT @integration_slug = integration_slug if integration_slug != OMIT @category = category if category != OMIT @end_user_origin_id = end_user_origin_id if end_user_origin_id != OMIT @end_user_organization_name = end_user_organization_name if end_user_organization_name != OMIT @end_user_email_address = end_user_email_address if end_user_email_address != OMIT @status = status if status != OMIT @webhook_listener_url = webhook_listener_url if webhook_listener_url != OMIT @is_duplicate = is_duplicate if is_duplicate != OMIT @account_type = account_type if account_type != OMIT @additional_properties = additional_properties @_field_set = { "id": id, "integration": integration, "integration_slug": integration_slug, "category": category, "end_user_origin_id": end_user_origin_id, "end_user_organization_name": end_user_organization_name, "end_user_email_address": end_user_email_address, "status": status, "webhook_listener_url": webhook_listener_url, "is_duplicate": is_duplicate, "account_type": account_type }.reject do |_k, v| v == OMIT end end |
Instance Attribute Details
#account_type ⇒ String (readonly)
34 35 36 |
# File 'lib/merge_ruby_client/hris/types/account_details.rb', line 34 def account_type @account_type end |
#additional_properties ⇒ OpenStruct (readonly)
Returns Additional properties unmapped to the current class definition.
36 37 38 |
# File 'lib/merge_ruby_client/hris/types/account_details.rb', line 36 def additional_properties @additional_properties end |
#category ⇒ Merge::Hris::CategoryEnum (readonly)
17 18 19 |
# File 'lib/merge_ruby_client/hris/types/account_details.rb', line 17 def category @category end |
#end_user_email_address ⇒ String (readonly)
23 24 25 |
# File 'lib/merge_ruby_client/hris/types/account_details.rb', line 23 def end_user_email_address @end_user_email_address end |
#end_user_organization_name ⇒ String (readonly)
21 22 23 |
# File 'lib/merge_ruby_client/hris/types/account_details.rb', line 21 def end_user_organization_name @end_user_organization_name end |
#end_user_origin_id ⇒ String (readonly)
19 20 21 |
# File 'lib/merge_ruby_client/hris/types/account_details.rb', line 19 def end_user_origin_id @end_user_origin_id end |
#id ⇒ String (readonly)
11 12 13 |
# File 'lib/merge_ruby_client/hris/types/account_details.rb', line 11 def id @id end |
#integration ⇒ String (readonly)
13 14 15 |
# File 'lib/merge_ruby_client/hris/types/account_details.rb', line 13 def integration @integration end |
#integration_slug ⇒ String (readonly)
15 16 17 |
# File 'lib/merge_ruby_client/hris/types/account_details.rb', line 15 def integration_slug @integration_slug 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.
32 33 34 |
# File 'lib/merge_ruby_client/hris/types/account_details.rb', line 32 def is_duplicate @is_duplicate end |
#status ⇒ String (readonly)
25 26 27 |
# File 'lib/merge_ruby_client/hris/types/account_details.rb', line 25 def status @status end |
#webhook_listener_url ⇒ String (readonly)
27 28 29 |
# File 'lib/merge_ruby_client/hris/types/account_details.rb', line 27 def webhook_listener_url @webhook_listener_url end |
Class Method Details
.from_json(json_object:) ⇒ Merge::Hris::AccountDetails
Deserialize a JSON object to an instance of AccountDetails
94 95 96 97 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 |
# File 'lib/merge_ruby_client/hris/types/account_details.rb', line 94 def self.from_json(json_object:) struct = JSON.parse(json_object, object_class: OpenStruct) parsed_json = JSON.parse(json_object) id = parsed_json["id"] integration = parsed_json["integration"] integration_slug = parsed_json["integration_slug"] category = parsed_json["category"] 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"] status = parsed_json["status"] webhook_listener_url = parsed_json["webhook_listener_url"] is_duplicate = parsed_json["is_duplicate"] account_type = parsed_json["account_type"] new( id: id, integration: integration, integration_slug: integration_slug, category: category, end_user_origin_id: end_user_origin_id, end_user_organization_name: end_user_organization_name, end_user_email_address: end_user_email_address, status: status, webhook_listener_url: webhook_listener_url, is_duplicate: is_duplicate, 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.
137 138 139 140 141 142 143 144 145 146 147 148 149 |
# File 'lib/merge_ruby_client/hris/types/account_details.rb', line 137 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.integration&.is_a?(String) != false || raise("Passed value for field obj.integration is not the expected type, validation failed.") obj.integration_slug&.is_a?(String) != false || raise("Passed value for field obj.integration_slug is not the expected type, validation failed.") obj.category&.is_a?(Merge::Hris::CategoryEnum) != false || raise("Passed value for field obj.category 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.status&.is_a?(String) != false || raise("Passed value for field obj.status 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.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 AccountDetails to a JSON object
127 128 129 |
# File 'lib/merge_ruby_client/hris/types/account_details.rb', line 127 def to_json(*_args) @_field_set&.to_json end |