Class: Rafflesia::QueryContract

Inherits:
Object
  • Object
show all
Defined in:
lib/rafflesia/query_contract.rb

Instance Method Summary collapse

Constructor Details

#initialize(client) ⇒ QueryContract

Returns a new instance of QueryContract.



9
10
11
# File 'lib/rafflesia/query_contract.rb', line 9

def initialize(client)
  @client = client
end

Instance Method Details

#get(request_options: {}) ⇒ Rafflesia::EnvelopeQueryContractData

GET /v1/query_contract

Parameters:

  • request_options (Hash) (defaults to: {})

    (see Rafflesia::Types::RequestOptions)

Returns:



16
17
18
19
20
21
22
23
24
25
26
# File 'lib/rafflesia/query_contract.rb', line 16

def get(request_options: {})
  response = @client.request(
    method: :get,
    path: '/v1/query_contract',
    auth: true,
    request_options: request_options
  )
  result = Rafflesia::EnvelopeQueryContractData.new(response.body)
  result.last_response = Rafflesia::Types::ApiResponse.new(http_status: response.code.to_i, http_headers: response.each_header.to_h, request_id: response["x-request-id"])
  result
end