Class: Oyi::Acceptance

Inherits:
Object
  • Object
show all
Defined in:
lib/oyi/acceptance.rb

Overview

Accept fund from yoru customers

Class Method Summary collapse

Class Method Details

.create_invoice(params) ⇒ Object

Create a payment checkout URL with addtional details for invoicing



13
14
15
# File 'lib/oyi/acceptance.rb', line 13

def create_invoice(params)
  Client.request http_method: :post, endpoint: '/api/payment-checkout/create-invoice', params: params
end

.delete(params) ⇒ Object

Delete a payment/invoice link



23
24
25
# File 'lib/oyi/acceptance.rb', line 23

def delete(params)
  Client.request http_method: :delete, endpoint: "/api/payment-checkout/#{params[:payment_link_id_or_partner_tx_id]}"
end

.get(params) ⇒ Object

Get the details of a payment/invoice link



28
29
30
# File 'lib/oyi/acceptance.rb', line 28

def get(params)
  Client.request http_method: :get, endpoint: "/api/payment-checkout/#{params[:payment_link_id_or_partner_tx_id]}"
end

.payment_checkout(params) ⇒ Object

Create a payment checkout URL



8
9
10
# File 'lib/oyi/acceptance.rb', line 8

def payment_checkout(params)
  Client.request http_method: :post, endpoint: '/api/payment-checkout/create-v2', params: params
end

.status(params) ⇒ Object

Get the status of a transaction



18
19
20
# File 'lib/oyi/acceptance.rb', line 18

def status(params)
  Client.request http_method: :get, endpoint: "/api/payment-checkout/status?#{URI.encode_www_form(params)}"
end