Class: HighLevel::Resources::CustomFields

Inherits:
Base
  • Object
show all
Defined in:
lib/high_level/resources/custom_fields.rb

Instance Method Summary collapse

Methods inherited from Base

#initialize

Constructor Details

This class inherits a constructor from HighLevel::Resources::Base

Instance Method Details

#create_custom_field(body:, **_opts) ⇒ Object

Create Custom Field

<div>

  <p> Create Custom Field </p>
  <div>
    <span style= "display: inline-block;
                width: 25px; height: 25px;
                background-color: yellow;
                color: black;
                font-weight: bold;
                font-size: 24px;
                text-align: center;
                line-height: 22px;
                border: 2px solid black;
                border-radius: 10%;
                margin-right: 10px;">
                !
      </span>
      <span>
        <strong>
        Only supports Custom Objects and Company (Business) today. Will be extended to other Standard Objects in the future.
        </strong>
      </span>
  </div>
</div>


270
271
272
273
274
275
276
277
# File 'lib/high_level/resources/custom_fields.rb', line 270

def create_custom_field(body:, **_opts)
  request(
    method: :post,
    path: "/custom-fields/",
    security: ["bearer"],
    body: body
  )
end

#create_custom_field_folder(body:, **_opts) ⇒ Object

Create Custom Field Folder

<div>

  <p> Create Custom Field Folder </p>
  <div>
    <span style= "display: inline-block;
                width: 25px; height: 25px;
                background-color: yellow;
                color: black;
                font-weight: bold;
                font-size: 24px;
                text-align: center;
                line-height: 22px;
                border: 2px solid black;
                border-radius: 10%;
                margin-right: 10px;">
                !
      </span>
      <span>
        <strong>
        Only supports Custom Objects and Company (Business) today. Will be extended to other Standard Objects in the future.
        </strong>
      </span>
  </div>
</div>


168
169
170
171
172
173
174
175
# File 'lib/high_level/resources/custom_fields.rb', line 168

def create_custom_field_folder(body:, **_opts)
  request(
    method: :post,
    path: "/custom-fields/folder",
    security: ["bearer"],
    body: body
  )
end

#delete_custom_field(id:, **_opts) ⇒ Object

Delete Custom Field By Id

<div>

  <p> Delete Custom Field By Id </p>
  <div>
    <span style= "display: inline-block;
                width: 25px; height: 25px;
                background-color: yellow;
                color: black;
                font-weight: bold;
                font-size: 24px;
                text-align: center;
                line-height: 22px;
                border: 2px solid black;
                border-radius: 10%;
                margin-right: 10px;">
                !
      </span>
      <span>
        <strong>
        Only supports Custom Objects and Company (Business) today. Will be extended to other Standard Objects in the future.
        </strong>
      </span>
  </div>
</div>


101
102
103
104
105
106
107
# File 'lib/high_level/resources/custom_fields.rb', line 101

def delete_custom_field(id:, **_opts)
  request(
    method: :delete,
    path: "/custom-fields/#{id}",
    security: ["bearer"]
  )
end

#delete_custom_field_folder(id:, location_id: nil, **_opts) ⇒ Object

Delete Custom Field Folder

<div>

  <p> Create Custom Field Folder </p>
  <div>
    <span style= "display: inline-block;
                width: 25px; height: 25px;
                background-color: yellow;
                color: black;
                font-weight: bold;
                font-size: 24px;
                text-align: center;
                line-height: 22px;
                border: 2px solid black;
                border-radius: 10%;
                margin-right: 10px;">
                !
      </span>
      <span>
        <strong>
        Only supports Custom Objects and Company (Business) today. Will be extended to other Standard Objects in the future.
        </strong>
      </span>
  </div>
</div>


236
237
238
239
240
241
242
243
# File 'lib/high_level/resources/custom_fields.rb', line 236

def delete_custom_field_folder(id:, location_id: nil, **_opts)
  request(
    method: :delete,
    path: "/custom-fields/folder/#{id}",
    security: ["bearer"],
    params: { "locationId" => location_id }.compact
  )
end

#get_custom_field_by_id(id:, **_opts) ⇒ Object

Get Custom Field / Folder By Id

<div>

  <p> Get Custom Field / Folder By Id.</p>
  <div>
    <span style= "display: inline-block;
                width: 25px; height: 25px;
                background-color: yellow;
                color: black;
                font-weight: bold;
                font-size: 24px;
                text-align: center;
                line-height: 22px;
                border: 2px solid black;
                border-radius: 10%;
                margin-right: 10px;">
                !
      </span>
      <span>
        <strong>
        Only supports Custom Objects and Company (Business) today. Will be extended to other Standard Objects in the future.
        </strong>
      </span>
  </div>
</div>


34
35
36
37
38
39
40
# File 'lib/high_level/resources/custom_fields.rb', line 34

def get_custom_field_by_id(id:, **_opts)
  request(
    method: :get,
    path: "/custom-fields/#{id}",
    security: ["bearer"]
  )
end

#get_custom_fields_by_object_key(object_key:, location_id: nil, **_opts) ⇒ Object

Get Custom Fields By Object Key

<div>

  <p> Get Custom Fields By Object Key</p>
  <div>
    <span style= "display: inline-block;
                width: 25px; height: 25px;
                background-color: yellow;
                color: black;
                font-weight: bold;
                font-size: 24px;
                text-align: center;
                line-height: 22px;
                border: 2px solid black;
                border-radius: 10%;
                margin-right: 10px;">
                !
      </span>
      <span>
        <strong>
        Only supports Custom Objects and Company (Business) today. Will be extended to other Standard Objects in the future.
        </strong>
      </span>
  </div>
</div>


134
135
136
137
138
139
140
141
# File 'lib/high_level/resources/custom_fields.rb', line 134

def get_custom_fields_by_object_key(object_key:, location_id: nil, **_opts)
  request(
    method: :get,
    path: "/custom-fields/object-key/#{object_key}",
    security: ["bearer"],
    params: { "locationId" => location_id }.compact
  )
end

#update_custom_field(id:, body:, **_opts) ⇒ Object

Update Custom Field By Id

<div>

  <p> Update Custom Field By Id </p>
  <div>
    <span style= "display: inline-block;
                width: 25px; height: 25px;
                background-color: yellow;
                color: black;
                font-weight: bold;
                font-size: 24px;
                text-align: center;
                line-height: 22px;
                border: 2px solid black;
                border-radius: 10%;
                margin-right: 10px;">
                !
      </span>
      <span>
        <strong>
        Only supports Custom Objects and Company (Business) today. Will be extended to other Standard Objects in the future.
        </strong>
      </span>
  </div>
</div>


67
68
69
70
71
72
73
74
# File 'lib/high_level/resources/custom_fields.rb', line 67

def update_custom_field(id:, body:, **_opts)
  request(
    method: :put,
    path: "/custom-fields/#{id}",
    security: ["bearer"],
    body: body
  )
end

#update_custom_field_folder(id:, body:, **_opts) ⇒ Object

Update Custom Field Folder Name

<div>

  <p> Create Custom Field Folder </p>
  <div>
    <span style= "display: inline-block;
                width: 25px; height: 25px;
                background-color: yellow;
                color: black;
                font-weight: bold;
                font-size: 24px;
                text-align: center;
                line-height: 22px;
                border: 2px solid black;
                border-radius: 10%;
                margin-right: 10px;">
                !
      </span>
      <span>
        <strong>
        Only supports Custom Objects and Company (Business) today. Will be extended to other Standard Objects in the future.
        </strong>
      </span>
  </div>
</div>


202
203
204
205
206
207
208
209
# File 'lib/high_level/resources/custom_fields.rb', line 202

def update_custom_field_folder(id:, body:, **_opts)
  request(
    method: :put,
    path: "/custom-fields/folder/#{id}",
    security: ["bearer"],
    body: body
  )
end