Module: Signnow::Operations::Create::ClassMethods

Defined in:
lib/signnow/operations/create.rb

Instance Method Summary collapse

Instance Method Details

#create(attributes) ⇒ Object

Creates a new object

Parameters:

  • attributes (Hash)

    The attributes of the created object



8
9
10
11
# File 'lib/signnow/operations/create.rb', line 8

def create(attributes)
  response = Signnow.request(:post, nil, api_create_url, attributes, options_for_create)
  self.new(response)
end

#options_for_createHash

Options for create overwrite this in the model if the api is not well named

Returns:

  • (Hash)


25
26
27
# File 'lib/signnow/operations/create.rb', line 25

def options_for_create
  { auth_type: :basic }
end