Class: CommandTower::Clients::SerializedRequest

Inherits:
Data
  • Object
show all
Defined in:
app/services/command_tower/clients/serialized_request.rb

Overview

Pure serializer output for endpoint request assembly. Not a Hash — keeps the client framework on typed value objects.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Attribute Details

#bodyObject (readonly)

Returns the value of attribute body

Returns:

  • (Object)

    the current value of body



7
8
9
# File 'app/services/command_tower/clients/serialized_request.rb', line 7

def body
  @body
end

#headersObject (readonly)

Returns the value of attribute headers

Returns:

  • (Object)

    the current value of headers



7
8
9
# File 'app/services/command_tower/clients/serialized_request.rb', line 7

def headers
  @headers
end

#queryObject (readonly)

Returns the value of attribute query

Returns:

  • (Object)

    the current value of query



7
8
9
# File 'app/services/command_tower/clients/serialized_request.rb', line 7

def query
  @query
end

Class Method Details

.build(query: {}, body: nil, headers: {}) ⇒ Object



8
9
10
11
12
13
14
# File 'app/services/command_tower/clients/serialized_request.rb', line 8

def self.build(query: {}, body: nil, headers: {})
  new(
    query: query.to_h,
    body: body,
    headers: headers.to_h
  )
end