Class: Clerk::Resources::SingularResource

Inherits:
Object
  • Object
show all
Defined in:
lib/clerk/resources/singular_resource.rb

Instance Method Summary collapse

Constructor Details

#initialize(client, resource_path) ⇒ SingularResource

Returns a new instance of SingularResource.



4
5
6
7
# File 'lib/clerk/resources/singular_resource.rb', line 4

def initialize(client, resource_path)
  @client = client
  @resource_path = resource_path
end

Instance Method Details

#update(changes = {}) ⇒ Object



9
10
11
# File 'lib/clerk/resources/singular_resource.rb', line 9

def update(changes = {})
  @client.request(:patch, @resource_path, body: changes)
end