Module: MangoPay::HTTPCalls::Create::ClassMethods

Defined in:
lib/mangopay/http_calls.rb

Instance Method Summary collapse

Instance Method Details

#create(params, id = nil, idempotency_key = nil) ⇒ Object



6
7
8
9
10
11
12
13
14
# File 'lib/mangopay/http_calls.rb', line 6

def create(params, id = nil, idempotency_key = nil)
  # LEGACY SUPPORT FOR OLD SIGNATURE: def create(*id, params)
  if !params.is_a?(Hash) && id.is_a?(Hash)
    temp = params
    params = id
    id = temp
  end
  MangoPay.request(:post, url(id), params, {}, idempotency_key)
end