@@ -19,6 +19,15 @@ class InboundParsingApi
19
19
def initialize ( api_client = ApiClient . default )
20
20
@api_client = api_client
21
21
end
22
+
23
+ # Set custom user_agent if explicitly passed in api
24
+ # default will still remain Swagger-Codegen/#{VERSION}/ruby
25
+ def setUserAgent ( user_agent )
26
+ @user_agent = user_agent
27
+ if user_agent . is_a? ( String ) && user_agent . downcase . start_with? ( 'sendinblue_' )
28
+ @api_client . default_headers [ 'User-Agent' ] = @user_agent
29
+ end
30
+ end
22
31
# Retrieve inbound attachment with download token.
23
32
# This endpoint will retrieve inbound attachment with download token.
24
33
# @param download_token Token to fetch a particular attachment
@@ -38,14 +47,6 @@ def get_inbound_email_attachment_with_http_info(download_token, opts = {})
38
47
if @api_client . config . debugging
39
48
@api_client . config . logger . debug 'Calling API: InboundParsingApi.get_inbound_email_attachment ...'
40
49
end
41
-
42
- # Set custom user_agent if explicitly passed in api
43
- # default will still remain Swagger-Codegen/#{VERSION}/ruby
44
- def setUserAgent ( user_agent )
45
- @user_agent = user_agent
46
- if user_agent . is_a? ( String ) && user_agent . downcase . start_with? ( 'sendinblue_' )
47
- @api_client . default_headers [ 'User-Agent' ] = @user_agent
48
- end
49
50
# verify the required parameter 'download_token' is set
50
51
if @api_client . config . client_side_validation && download_token . nil?
51
52
fail ArgumentError , "Missing the required parameter 'download_token' when calling InboundParsingApi.get_inbound_email_attachment"
0 commit comments