File tree Expand file tree Collapse file tree 3 files changed +14
-1
lines changed
lib/lithic/internal/transport
rbi/lithic/internal/transport
sig/lithic/internal/transport Expand file tree Collapse file tree 3 files changed +14
-1
lines changed Original file line number Diff line number Diff line change @@ -201,7 +201,8 @@ def initialize(
201201 self . class ::PLATFORM_HEADERS ,
202202 {
203203 "accept" => "application/json" ,
204- "content-type" => "application/json"
204+ "content-type" => "application/json" ,
205+ "user-agent" => user_agent
205206 } ,
206207 headers
207208 )
@@ -219,6 +220,11 @@ def initialize(
219220 # @return [Hash{String=>String}]
220221 private def auth_headers = { }
221222
223+ # @api private
224+ #
225+ # @return [String]
226+ private def user_agent = "#{ self . class . name } /Ruby #{ Lithic ::VERSION } "
227+
222228 # @api private
223229 #
224230 # @return [String]
Original file line number Diff line number Diff line change @@ -176,6 +176,11 @@ module Lithic
176176 private def auth_headers
177177 end
178178
179+ # @api private
180+ sig { returns ( String ) }
181+ private def user_agent
182+ end
183+
179184 # @api private
180185 sig { returns ( String ) }
181186 private def generate_idempotency_key
Original file line number Diff line number Diff line change @@ -87,6 +87,8 @@ module Lithic
8787
8888 private def auth_headers : -> ::Hash[String, String]
8989
90+ private def user_agent : -> String
91+
9092 private def generate_idempotency_key : -> String
9193
9294 private def build_request : (
You can’t perform that action at this time.
0 commit comments