class DearInventory::TestResponse

Attributes

request[R]
response[R]

Public Class Methods

new(request:, body:, num_previous_records: 0) click to toggle source
# File lib/dear_inventory/test_response.rb, line 22
def initialize(request:, body:, num_previous_records: 0)
  @request = T.let(request, DearInventory::Models::Request)
  @num_previous_records = T.let(num_previous_records, Integer)

  @fields = T.let(nil, T.nilable(T::Array[Symbol]))
  @http_status = T.let(nil, T.nilable(Integer))
  @load_full_record = T.let(nil, T.nilable(T::Boolean))
  @num_records_paged = T.let(nil, T.nilable(Integer))
  @uri = T.let(nil, T.nilable(String))

  raise_error unless success?

  @model = T.let(@request.model.new(body), DearInventory::Model)
  assign_values
end

Public Instance Methods

http_status() click to toggle source
# File lib/dear_inventory/test_response.rb, line 40
def http_status
  200
end