Class: HubSpotSDK::Resources::Crm::PropertiesValidations
- Inherits:
-
Object
- Object
- HubSpotSDK::Resources::Crm::PropertiesValidations
- Defined in:
- lib/hubspot_sdk/resources/crm/properties_validations.rb
Instance Method Summary collapse
-
#get_by_object_type_id(object_type_id, request_options: {}) ⇒ HubSpotSDK::Models::Crm::CollectionResponsePublicPropertyValidationRuleMapNoPaging
Read all properties with validation rules for a given object.
-
#get_by_object_type_id_and_property_name(property_name, object_type_id:, request_options: {}) ⇒ HubSpotSDK::Models::Crm::CollectionResponsePublicPropertyValidationRuleNoPaging
Read a property’s validation rules identified by propertyName.
-
#get_by_object_type_id_property_name_and_rule_type(rule_type, object_type_id:, property_name:, request_options: {}) ⇒ HubSpotSDK::Models::Crm::PublicPropertyValidationRule
Retrieve a specific validation rule for a property identified by its name and rule type.
-
#initialize(client:) ⇒ PropertiesValidations
constructor
private
A new instance of PropertiesValidations.
-
#update_by_object_type_id_property_name_and_rule_type(rule_type, object_type_id:, property_name:, rule_arguments:, should_apply_normalization: nil, request_options: {}) ⇒ nil
Some parameter documentations has been truncated, see Models::Crm::PropertiesValidationUpdateByObjectTypeIDPropertyNameAndRuleTypeParams for more details.
Constructor Details
#initialize(client:) ⇒ PropertiesValidations
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Returns a new instance of PropertiesValidations.
143 144 145 |
# File 'lib/hubspot_sdk/resources/crm/properties_validations.rb', line 143 def initialize(client:) @client = client end |
Instance Method Details
#get_by_object_type_id(object_type_id, request_options: {}) ⇒ HubSpotSDK::Models::Crm::CollectionResponsePublicPropertyValidationRuleMapNoPaging
Read all properties with validation rules for a given object.
17 18 19 20 21 22 23 24 |
# File 'lib/hubspot_sdk/resources/crm/properties_validations.rb', line 17 def get_by_object_type_id(object_type_id, params = {}) @client.request( method: :get, path: ["crm/property-validations/2026-03/%1$s", object_type_id], model: HubSpotSDK::Crm::CollectionResponsePublicPropertyValidationRuleMapNoPaging, options: params[:request_options] ) end |
#get_by_object_type_id_and_property_name(property_name, object_type_id:, request_options: {}) ⇒ HubSpotSDK::Models::Crm::CollectionResponsePublicPropertyValidationRuleNoPaging
Read a property’s validation rules identified by propertyName.
37 38 39 40 41 42 43 44 45 46 47 48 49 50 |
# File 'lib/hubspot_sdk/resources/crm/properties_validations.rb', line 37 def get_by_object_type_id_and_property_name(property_name, params) parsed, = HubSpotSDK::Crm::PropertiesValidationGetByObjectTypeIDAndPropertyNameParams.dump_request(params) object_type_id = parsed.delete(:object_type_id) do raise ArgumentError.new("missing required path argument #{_1}") end @client.request( method: :get, path: ["crm/property-validations/2026-03/%1$s/%2$s", object_type_id, property_name], model: HubSpotSDK::Crm::CollectionResponsePublicPropertyValidationRuleNoPaging, options: ) end |
#get_by_object_type_id_property_name_and_rule_type(rule_type, object_type_id:, property_name:, request_options: {}) ⇒ HubSpotSDK::Models::Crm::PublicPropertyValidationRule
Retrieve a specific validation rule for a property identified by its name and rule type.
65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 |
# File 'lib/hubspot_sdk/resources/crm/properties_validations.rb', line 65 def get_by_object_type_id_property_name_and_rule_type(rule_type, params) parsed, = HubSpotSDK::Crm::PropertiesValidationGetByObjectTypeIDPropertyNameAndRuleTypeParams.dump_request(params) object_type_id = parsed.delete(:object_type_id) do raise ArgumentError.new("missing required path argument #{_1}") end property_name = parsed.delete(:property_name) do raise ArgumentError.new("missing required path argument #{_1}") end @client.request( method: :get, path: [ "crm/property-validations/2026-03/%1$s/%2$s/rule-type/%3$s", object_type_id, property_name, rule_type ], model: HubSpotSDK::Crm::PublicPropertyValidationRule, options: ) end |
#update_by_object_type_id_property_name_and_rule_type(rule_type, object_type_id:, property_name:, rule_arguments:, should_apply_normalization: nil, request_options: {}) ⇒ nil
Some parameter documentations has been truncated, see Models::Crm::PropertiesValidationUpdateByObjectTypeIDPropertyNameAndRuleTypeParams for more details.
Update a specific validation rule for a property identified by its name and rule type.
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 |
# File 'lib/hubspot_sdk/resources/crm/properties_validations.rb', line 113 def update_by_object_type_id_property_name_and_rule_type(rule_type, params) parsed, = HubSpotSDK::Crm::PropertiesValidationUpdateByObjectTypeIDPropertyNameAndRuleTypeParams.dump_request( params ) object_type_id = parsed.delete(:object_type_id) do raise ArgumentError.new("missing required path argument #{_1}") end property_name = parsed.delete(:property_name) do raise ArgumentError.new("missing required path argument #{_1}") end @client.request( method: :put, path: [ "crm/property-validations/2026-03/%1$s/%2$s/rule-type/%3$s", object_type_id, property_name, rule_type ], body: parsed, model: NilClass, options: ) end |