Class: Paymaster::Refund

Inherits:
BaseRequest show all
Defined in:
lib/paymaster/refund.rb

Defined Under Namespace

Classes: Response

Instance Attribute Summary collapse

Attributes inherited from BaseRequest

#client

Instance Method Summary collapse

Methods inherited from BaseRequest

#initialize, #perform, #sign

Constructor Details

This class inherits a constructor from Paymaster::BaseRequest

Instance Attribute Details

#paymaster_idObject

Returns the value of attribute paymaster_id.



8
9
10
# File 'lib/paymaster/refund.rb', line 8

def paymaster_id
  @paymaster_id
end

#refund_amountObject

Returns the value of attribute refund_amount.



11
12
13
# File 'lib/paymaster/refund.rb', line 11

def refund_amount
  @refund_amount
end

#refund_idObject

Returns the value of attribute refund_id.



9
10
11
# File 'lib/paymaster/refund.rb', line 9

def refund_id
  @refund_id
end

#totalObject

Returns the value of attribute total.



10
11
12
# File 'lib/paymaster/refund.rb', line 10

def total
  @total
end

Instance Method Details

#endpointObject



13
14
15
# File 'lib/paymaster/refund.rb', line 13

def endpoint
  "https://api.paymaster.ua/merchants/refund"
end

#paramsObject



17
18
19
20
21
22
23
24
25
26
# File 'lib/paymaster/refund.rb', line 17

def params
  {
    LMI_MERCHANT_ID: client.merchant_id,
    LMI_SYS_PAYMENT_NO: paymaster_id,
    RefundId: refund_id,
    ActionAmount: total,
    RefundAmount: refund_amount,
    LMI_HASH: "",
  }.compact
end