Class: Courier::RequestOptions

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

Overview

Additional options for request-specific configuration when calling APIs via the SDK.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(authorization_token: nil, additional_headers: nil, additional_query_parameters: nil, additional_body_parameters: nil, timeout_in_seconds: nil) ⇒ RequestOptions

Parameters:

  • authorization_token (String) (defaults to: nil)
  • additional_headers (Hash{String => Object}) (defaults to: nil)
  • additional_query_parameters (Hash{String => Object}) (defaults to: nil)
  • additional_body_parameters (Hash{String => Object}) (defaults to: nil)
  • timeout_in_seconds (Long) (defaults to: nil)


75
76
77
78
79
80
81
82
83
84
85
86
87
# File 'lib/requests.rb', line 75

def initialize(authorization_token: nil, additional_headers: nil, additional_query_parameters: nil,
               additional_body_parameters: nil, timeout_in_seconds: nil)
  # @type [String]
  @authorization_token = authorization_token
  # @type [Hash{String => Object}]
  @additional_headers = additional_headers
  # @type [Hash{String => Object}]
  @additional_query_parameters = additional_query_parameters
  # @type [Hash{String => Object}]
  @additional_body_parameters = additional_body_parameters
  # @type [Long]
  @timeout_in_seconds = timeout_in_seconds
end

Instance Attribute Details

#additional_body_parametersObject (readonly)

Returns the value of attribute additional_body_parameters.



66
67
68
# File 'lib/requests.rb', line 66

def additional_body_parameters
  @additional_body_parameters
end

#additional_headersObject (readonly)

Returns the value of attribute additional_headers.



66
67
68
# File 'lib/requests.rb', line 66

def additional_headers
  @additional_headers
end

#additional_query_parametersObject (readonly)

Returns the value of attribute additional_query_parameters.



66
67
68
# File 'lib/requests.rb', line 66

def additional_query_parameters
  @additional_query_parameters
end

#authorization_tokenObject (readonly)

Returns the value of attribute authorization_token.



66
67
68
# File 'lib/requests.rb', line 66

def authorization_token
  @authorization_token
end

#timeout_in_secondsObject (readonly)

Returns the value of attribute timeout_in_seconds.



66
67
68
# File 'lib/requests.rb', line 66

def timeout_in_seconds
  @timeout_in_seconds
end