Class: Unitpost::Resources::ContactFields

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

Instance Method Summary collapse

Methods inherited from Base

#initialize

Constructor Details

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

Instance Method Details

#create(body) ⇒ Object



156
157
158
# File 'lib/unitpost/resources.rb', line 156

def create(body)
  @http.request("POST", "/contact-fields", body: body)
end

#delete(id) ⇒ Object



168
169
170
# File 'lib/unitpost/resources.rb', line 168

def delete(id)
  @http.request("DELETE", "/contact-fields/#{enc(id)}")
end

#get(id) ⇒ Object



160
161
162
# File 'lib/unitpost/resources.rb', line 160

def get(id)
  @http.request("GET", "/contact-fields/#{enc(id)}")
end

#list(limit: nil, after: nil, before: nil) ⇒ Object



148
149
150
# File 'lib/unitpost/resources.rb', line 148

def list(limit: nil, after: nil, before: nil)
  @http.request("GET", "/contact-fields", query: list_params(limit: limit, after: after, before: before))
end

#list_all(**params) ⇒ Object



152
153
154
# File 'lib/unitpost/resources.rb', line 152

def list_all(**params)
  paginate("/contact-fields", params)
end

#rename(id, body) ⇒ Object



172
173
174
# File 'lib/unitpost/resources.rb', line 172

def rename(id, body)
  @http.request("POST", "/contact-fields/#{enc(id)}/rename", body: body)
end

#update(id, body) ⇒ Object



164
165
166
# File 'lib/unitpost/resources.rb', line 164

def update(id, body)
  @http.request("PATCH", "/contact-fields/#{enc(id)}", body: body)
end