Module: Paymill::Operations::Create::ClassMethods

Defined in:
lib/paymill/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/paymill/operations/create.rb', line 8

def create(attributes)
  response = Paymill.request(:post, "#{self.name.split("::").last.downcase}s", attributes)
  self.new(response["data"])
end