Module: FatZebra::APIOperation::Void::ClassMethods

Defined in:
lib/fat_zebra/api_operation/void.rb

Instance Method Summary collapse

Instance Method Details

#void(id, params = {}, options = {}) ⇒ FatZebra::Object

Void an API Resource and validate params for the API

Parameters:

  • id (String)

    for the request

  • params (Hash) (defaults to: {})

    for the request

  • Additional (Hash)

    options for the request

Returns:

  • (FatZebra::Object)

    response from the API



19
20
21
22
23
24
25
26
27
28
# File 'lib/fat_zebra/api_operation/void.rb', line 19

def void(id, params = {}, options = {})
  valid!(params, :void) if respond_to?(:valid!)

  params = {
    id: id
  }.merge(params)

  response = request(:post, "#{resource_path}/void", params, options)
  initialize_from(response)
end