Class: Tikkie::Api::Clients::Refunds

Inherits:
Base
  • Object
show all
Defined in:
lib/tikkie/api/clients/refunds.rb

Overview

Refund endpoint at Tikkie.

Instance Attribute Summary

Attributes inherited from Base

#config

Instance Method Summary collapse

Methods inherited from Base

#initialize

Constructor Details

This class inherits a constructor from Tikkie::Api::Clients::Base

Instance Method Details

#create(payment_request_token, payment_token, attributes = {}, options = {}) ⇒ Object



13
14
15
16
# File 'lib/tikkie/api/clients/refunds.rb', line 13

def create(payment_request_token, payment_token, attributes = {}, options = {})
  payment = Tikkie::Api::Resources::Refund.new(config, options.merge(payment_request_token: payment_request_token, payment_token: payment_token))
  payment.save(attributes)
end

#get(payment_request_token, payment_token, refund_token, options = {}) ⇒ Object



8
9
10
11
# File 'lib/tikkie/api/clients/refunds.rb', line 8

def get(payment_request_token, payment_token, refund_token, options = {})
  payment = Tikkie::Api::Resources::Refund.new(config, options.merge(payment_request_token: payment_request_token, payment_token: payment_token, refund_token: refund_token))
  payment.load
end