Class: Transbank::Oneclick::Api

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

Constant Summary collapse

ATTRIBUTES =
{
  # init_inscription
  email:        :email,
  response_url: :responseURL,
  username:     :username,

  # finish_inscription
  token: :token,

  # authorize
  amount:     :amount,
  tbk_user:   :tbkUser,
  username:   :username,
  buy_order:  :buyOrder,

  # code_reverse_one_click
  # buyorder: :buyorder,

  # remove_user
  # tbk_user:  :tbkUser,
  # username:  :username
}

Instance Method Summary collapse

Instance Method Details

#authorize(params = {}, opt = {}) ⇒ Object



35
36
37
# File 'lib/transbank/oneclick/api.rb', line 35

def authorize(params = {}, opt = {})
  call :authorize, params, opt
end

#finish_inscription(token, opt = {}) ⇒ Object



31
32
33
# File 'lib/transbank/oneclick/api.rb', line 31

def finish_inscription(token, opt = {})
  call :finishInscription, {token: token}, opt
end

#init_inscription(params = {}, opt = {}) ⇒ Object



27
28
29
# File 'lib/transbank/oneclick/api.rb', line 27

def init_inscription(params = {}, opt = {})
  call :initInscription, params, opt
end

#remove_user(params = {}, opt = {}) ⇒ Object



43
44
45
# File 'lib/transbank/oneclick/api.rb', line 43

def remove_user(params = {}, opt = {})
  call :removeUser, params, opt
end

#reverse(buy_order, opt = {}) ⇒ Object



39
40
41
# File 'lib/transbank/oneclick/api.rb', line 39

def reverse(buy_order, opt = {})
  call :codeReverseOneClick, {buyorder: buy_order}, opt
end