Class: Redex::Request::CancelRequest

Inherits:
BaseRequest show all
Defined in:
lib/redex/request/cancel_request.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from BaseRequest

#authorization_params, client, #result, #sanitize

Constructor Details

#initialize(params = {}) ⇒ CancelRequest

Returns a new instance of CancelRequest.



6
7
8
9
10
11
# File 'lib/redex/request/cancel_request.rb', line 6

def initialize(params = {})
				@transaction_date = params[:transaction_date]
				@credit_card_authorization_id = params[:credit_card_authorization_id]
				@sequential_id = params[:sequential_id]
				@transaction_id = params[:transaction_id]
end

Instance Attribute Details

#credit_card_authorization_idObject

Returns the value of attribute credit_card_authorization_id.



4
5
6
# File 'lib/redex/request/cancel_request.rb', line 4

def credit_card_authorization_id
  @credit_card_authorization_id
end

#sequential_idObject

Returns the value of attribute sequential_id.



4
5
6
# File 'lib/redex/request/cancel_request.rb', line 4

def sequential_id
  @sequential_id
end

#transaction_dateObject

Returns the value of attribute transaction_date.



4
5
6
# File 'lib/redex/request/cancel_request.rb', line 4

def transaction_date
  @transaction_date
end

#transaction_idObject

Returns the value of attribute transaction_id.



4
5
6
# File 'lib/redex/request/cancel_request.rb', line 4

def transaction_id
  @transaction_id
end

Instance Method Details

#sanitized_fieldsObject



13
14
15
16
17
18
19
20
# File 'lib/redex/request/cancel_request.rb', line 13

def sanitized_fields
	{
		Data: sanitize(:transaction_date),
		NumAutor: sanitize(:credit_card_authorization_id),
		NumSqn: sanitize(:sequential_id),
		Tid: sanitize(:transaction_id)
	}.merge(authorization_params).sort.to_h.select { |k, v| !v.to_s.empty?  }
end