Class: AdaptivePay::RefundRequest

Inherits:
Request
  • Object
show all
Defined in:
lib/adaptive_pay/refund_request.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from Request

attribute, attribute_names, #format_attribute, #perform, #read_attribute, #serialize, #write_attribute

Constructor Details

#initialize(&block) ⇒ RefundRequest

Returns a new instance of RefundRequest.



21
22
23
24
# File 'lib/adaptive_pay/refund_request.rb', line 21

def initialize(&block)
  @recipients = []
  super
end

Instance Attribute Details

#recipientsObject (readonly)

Returns the value of attribute recipients.



12
13
14
# File 'lib/adaptive_pay/refund_request.rb', line 12

def recipients
  @recipients
end

Class Method Details

.endpointObject



8
9
10
# File 'lib/adaptive_pay/refund_request.rb', line 8

def self.endpoint
  "Refund"
end

.response_typeObject



4
5
6
# File 'lib/adaptive_pay/refund_request.rb', line 4

def self.response_type
  :refund
end

Instance Method Details

#add_recipient(recipient_options) ⇒ Object



26
27
28
29
30
31
32
# File 'lib/adaptive_pay/refund_request.rb', line 26

def add_recipient(recipient_options)
  if recipient_options.is_a?(AdaptivePay::Recipient)
    @recipients << recipient_options
  else
    @recipients << AdaptivePay::Recipient.new(recipient_options)
  end
end