Class: Inttegro::APIResponse

Inherits:
T::Struct
  • Object
show all
Extended by:
T::Sig
Defined in:
lib/inttegro/api_response.rb

Overview

Decoded SDK value plus response-only HTTP metadata.

Instance Method Summary collapse

Instance Method Details

#request_id ⇒ Object



19
20
21
# File 'lib/inttegro/api_response.rb', line 19

def request_id
  header("x-request-id")
end

#retry_after ⇒ Object



24
25
26
# File 'lib/inttegro/api_response.rb', line 24

def retry_after
  header("retry-after")
end

#with_data(data) ⇒ Object



29
30
31
# File 'lib/inttegro/api_response.rb', line 29

def with_data(data)
  APIResponse.new(data: data, status: status, headers: headers, meta: meta)
end