Class: Redex::Request::QueryRequest
- Inherits:
-
BaseRequest
- Object
- BaseRequest
- Redex::Request::QueryRequest
- Defined in:
- lib/redex/request/query_request.rb
Instance Attribute Summary collapse
-
#order_id ⇒ Object
Returns the value of attribute order_id.
-
#transaction_id ⇒ Object
Returns the value of attribute transaction_id.
Instance Method Summary collapse
-
#initialize(params = {}) ⇒ QueryRequest
constructor
A new instance of QueryRequest.
- #sanitized_fields ⇒ Object
Methods inherited from BaseRequest
#authorization_params, client, #result, #sanitize
Constructor Details
#initialize(params = {}) ⇒ QueryRequest
Returns a new instance of QueryRequest.
6 7 8 9 |
# File 'lib/redex/request/query_request.rb', line 6 def initialize(params = {}) @order_id = params[:order_id] @transaction_id = params[:transaction_id] end |
Instance Attribute Details
#order_id ⇒ Object
Returns the value of attribute order_id.
4 5 6 |
# File 'lib/redex/request/query_request.rb', line 4 def order_id @order_id end |
#transaction_id ⇒ Object
Returns the value of attribute transaction_id.
4 5 6 |
# File 'lib/redex/request/query_request.rb', line 4 def transaction_id @transaction_id end |
Instance Method Details
#sanitized_fields ⇒ Object
11 12 13 14 15 16 |
# File 'lib/redex/request/query_request.rb', line 11 def sanitized_fields { NumPedido: sanitize(:order_id), Tid: sanitize(:transaction_id), }.merge().sort.to_h.select { |k, v| !v.to_s.empty? } end |