Class: LemonWay::Form

Inherits:
Object
  • Object
show all
Defined in:
lib/lemon_way/form.rb

Class Method Summary collapse

Class Method Details

.create(params = {}) ⇒ Object



8
9
10
11
# File 'lib/lemon_way/form.rb', line 8

def create(params = {})
  params[:optId] = params.delete(:id) || LemonWay::Generators::Id.generate(length: 60)
  LemonWay.client.send_request('CreatePaymentForm', '1.0', params)
end

.disable(params = {}) ⇒ Object



18
19
20
21
# File 'lib/lemon_way/form.rb', line 18

def disable(params = {})
  params[:formId] = params.delete(:id)
  LemonWay.client.send_request('DisablePaymentForm', '1.0', params)
end

.get(params = {}) ⇒ Object



13
14
15
16
# File 'lib/lemon_way/form.rb', line 13

def get(params = {})
  params[:formId] = params.delete(:id)
  LemonWay.client.send_request('GetCompletedPaymentForm', '1.0', params)
end