Method: Merge::Accounting::AccountIntegration.validate_raw
- Defined in:
- lib/merge_ruby_client/accounting/types/account_integration.rb
.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.
133 134 135 136 137 138 139 140 141 142 143 |
# File 'lib/merge_ruby_client/accounting/types/account_integration.rb', line 133 def self.validate_raw(obj:) obj.name.is_a?(String) != false || raise("Passed value for field obj.name is not the expected type, validation failed.") obj.categories&.is_a?(Array) != false || raise("Passed value for field obj.categories is not the expected type, validation failed.") obj.image&.is_a?(String) != false || raise("Passed value for field obj.image is not the expected type, validation failed.") obj.square_image&.is_a?(String) != false || raise("Passed value for field obj.square_image is not the expected type, validation failed.") obj.color&.is_a?(String) != false || raise("Passed value for field obj.color is not the expected type, validation failed.") obj.slug&.is_a?(String) != false || raise("Passed value for field obj.slug is not the expected type, validation failed.") obj.api_endpoints_to_documentation_urls&.is_a?(Hash) != false || raise("Passed value for field obj.api_endpoints_to_documentation_urls is not the expected type, validation failed.") obj.webhook_setup_guide_url&.is_a?(String) != false || raise("Passed value for field obj.webhook_setup_guide_url is not the expected type, validation failed.") obj.category_beta_status&.is_a?(Hash) != false || raise("Passed value for field obj.category_beta_status is not the expected type, validation failed.") end |