Class: PayLane::API

Inherits:
Object
  • Object
show all
Defined in:
lib/paylane/api.rb

Instance Method Summary collapse

Constructor Details

#initialize(client) ⇒ API

Returns a new instance of API.



6
7
8
# File 'lib/paylane/api.rb', line 6

def initialize(client)
  @client = client
end

Instance Method Details

#capture_sale(params) ⇒ Object



15
16
17
18
# File 'lib/paylane/api.rb', line 15

def capture_sale(params)
  response = request(:captureSale, params)
  Response.new(response[:capture_sale_response][:response])
end

#check_sales(params) ⇒ Object



40
41
42
43
# File 'lib/paylane/api.rb', line 40

def check_sales(params)
  response = request(:checkSales, params, 'check_sales_params')
  Response.new(response[:check_sales_response][:check_sales_response])
end

#close_sale_authorization(params) ⇒ Object



20
21
22
23
# File 'lib/paylane/api.rb', line 20

def close_sale_authorization(params)
  response = request(:closeSaleAuthorization, params)
  Response.new(response[:close_sale_authorization_response][:response])
end

#get_sale_result(params) ⇒ Object



35
36
37
38
# File 'lib/paylane/api.rb', line 35

def get_sale_result(params)
  response = request(:getSaleResult, params)
  Response.new(response[:get_sale_result_response][:response])
end

#multi_sale(params) ⇒ Object



10
11
12
13
# File 'lib/paylane/api.rb', line 10

def multi_sale(params)
  response = request(:multiSale, params, 'multi_sale_params')
  Response.new(response[:multi_sale_response][:response])
end

#refund(params) ⇒ Object



25
26
27
28
# File 'lib/paylane/api.rb', line 25

def refund(params)
  response = request(:refund, params)
  Response.new(response[:refund_response][:response])
end

#resale(params) ⇒ Object



30
31
32
33
# File 'lib/paylane/api.rb', line 30

def resale(params)
  response = request(:resale, params)
  Response.new(response[:resale_response][:response])
end