fastpixapi 1.1.2 → 1.1.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (47) hide show
  1. checksums.yaml +4 -4
  2. data/lib/crystalline/metadata_fields.rb +56 -48
  3. data/lib/crystalline/types.rb +3 -3
  4. data/lib/crystalline.rb +4 -5
  5. data/lib/fastpix_client/dimensions.rb +51 -58
  6. data/lib/fastpix_client/drm_configurations.rb +49 -56
  7. data/lib/fastpix_client/errors.rb +35 -24
  8. data/lib/fastpix_client/fastpixapi.rb +2 -4
  9. data/lib/fastpix_client/in_video_ai_features.rb +100 -160
  10. data/lib/fastpix_client/input_video.rb +66 -74
  11. data/lib/fastpix_client/live_playback.rb +82 -99
  12. data/lib/fastpix_client/manage_live_stream.rb +136 -252
  13. data/lib/fastpix_client/manage_videos.rb +228 -543
  14. data/lib/fastpix_client/metrics.rb +76 -120
  15. data/lib/fastpix_client/models/components/createlivestreamresponsedto.rb +10 -18
  16. data/lib/fastpix_client/models/components/createmediarequest.rb +9 -18
  17. data/lib/fastpix_client/models/components/getallmediaresponse.rb +13 -29
  18. data/lib/fastpix_client/models/components/getcreatelivestreamresponsedto.rb +9 -20
  19. data/lib/fastpix_client/models/components/getmediaresponse.rb +13 -29
  20. data/lib/fastpix_client/models/components/live_media_clips.rb +9 -21
  21. data/lib/fastpix_client/models/components/media.rb +11 -26
  22. data/lib/fastpix_client/models/components/patchresponsedata.rb +9 -18
  23. data/lib/fastpix_client/models/components/sourceaccessmedia.rb +11 -26
  24. data/lib/fastpix_client/models/components/update_media.rb +11 -26
  25. data/lib/fastpix_client/models/components/views.rb +51 -124
  26. data/lib/fastpix_client/models/errors/empty_response_error.rb +15 -0
  27. data/lib/fastpix_client/models/errors.rb +1 -0
  28. data/lib/fastpix_client/models/operations/push_media_settings.rb +9 -20
  29. data/lib/fastpix_client/playback.rb +122 -213
  30. data/lib/fastpix_client/playlist.rb +150 -296
  31. data/lib/fastpix_client/sdk_hooks/registration.rb +2 -2
  32. data/lib/fastpix_client/sdk_hooks/types.rb +4 -0
  33. data/lib/fastpix_client/sdkconfiguration.rb +3 -3
  34. data/lib/fastpix_client/signing_keys.rb +76 -120
  35. data/lib/fastpix_client/simulcast_stream.rb +97 -141
  36. data/lib/fastpix_client/start_live_stream.rb +51 -33
  37. data/lib/fastpix_client/utils/forms.rb +97 -101
  38. data/lib/fastpix_client/utils/headers.rb +44 -34
  39. data/lib/fastpix_client/utils/query_params.rb +39 -29
  40. data/lib/fastpix_client/utils/request_bodies.rb +4 -8
  41. data/lib/fastpix_client/utils/security.rb +30 -18
  42. data/lib/fastpix_client/utils/url.rb +83 -60
  43. data/lib/fastpix_client/utils/utils.rb +19 -37
  44. data/lib/fastpix_client/views.rb +66 -90
  45. data/lib/fastpixapi.rb +10 -10
  46. data/lib/openssl_patch.rb +24 -24
  47. metadata +3 -2
@@ -18,10 +18,10 @@ module FastpixClient
18
18
 
19
19
  sig do
20
20
  params(
21
- hooks: Hooks
21
+ _hooks: Hooks
22
22
  ).void
23
23
  end
24
- def self.init_hooks(hooks)
24
+ def self.init_hooks(_hooks)
25
25
  # example_hook = ExampleHook.new
26
26
 
27
27
  # hooks.register_sdk_init_hook example_hook
@@ -107,6 +107,7 @@ module FastpixClient
107
107
 
108
108
  sig { overridable.params(config: SDKConfiguration).returns(SDKConfiguration) }
109
109
  def sdk_init(config:)
110
+ _ = config
110
111
  Kernel.raise NotImplementedError.new
111
112
  end
112
113
  end
@@ -123,6 +124,7 @@ module FastpixClient
123
124
  ).returns(Faraday::Request)
124
125
  end
125
126
  def before_request(hook_ctx:, request:)
127
+ _ = [hook_ctx, request]
126
128
  Kernel.raise NotImplementedError.new
127
129
  end
128
130
  end
@@ -139,6 +141,7 @@ module FastpixClient
139
141
  ).returns(Faraday::Response)
140
142
  end
141
143
  def after_success(hook_ctx:, response:)
144
+ _ = [hook_ctx, response]
142
145
  Kernel.raise NotImplementedError.new
143
146
  end
144
147
  end
@@ -156,6 +159,7 @@ module FastpixClient
156
159
  ).returns(T.nilable(Faraday::Response))
157
160
  end
158
161
  def after_error(error:, hook_ctx:, response:)
162
+ _ = [error, hook_ctx, response]
159
163
  Kernel.raise NotImplementedError.new
160
164
  end
161
165
  end
@@ -83,7 +83,7 @@ module FastpixClient
83
83
  @server_url = server_url
84
84
  @timeout = (timeout_ms.to_f / 1000) unless timeout_ms.nil?
85
85
  @server_idx = server_idx.nil? ? 0 : server_idx
86
- raise StandardError, "Invalid server index #{server_idx}" if @server_idx.negative? || @server_idx >= SERVERS.length
86
+ raise ArgumentError, "Invalid server index #{server_idx}" if @server_idx.negative? || @server_idx >= SERVERS.length
87
87
  if !security_source.nil?
88
88
  @security_source = security_source
89
89
  elsif !security.nil?
@@ -91,9 +91,9 @@ module FastpixClient
91
91
  end
92
92
  @language = 'ruby'
93
93
  @openapi_doc_version = '1.0.0'
94
- @sdk_version = '1.1.2'
94
+ @sdk_version = '1.1.3'
95
95
  @gen_version = '2.801.0'
96
- @user_agent = 'fastpixapi-ruby 1.1.2'
96
+ @user_agent = 'fastpixapi-ruby 1.1.3'
97
97
  end
98
98
 
99
99
  sig { returns([String, T::Hash[Symbol, String]]) }
@@ -14,6 +14,42 @@ module FastpixClient
14
14
  extend T::Sig
15
15
  class SigningKeys
16
16
  extend T::Sig
17
+
18
+ API_ERROR_OCCURRED = 'API error occurred'
19
+ CONTENT_TYPE_HEADER = 'Content-Type'
20
+ CONTENT_TYPE_JSON = 'application/json'
21
+ DEFAULT_CONTENT_TYPE = 'application/octet-stream'
22
+ UNKNOWN_CONTENT_TYPE_ERROR = 'Unknown content type received'
23
+ USER_AGENT_HEADER = 'user-agent'
24
+
25
+ # Applies the SDK after-request hooks and ensures a usable response is present.
26
+ sig { params(http_response: T.nilable(Faraday::Response), error: T.nilable(StandardError), hook_ctx: SDKHooks::HookContext).returns(Faraday::Response) }
27
+ def apply_after_request_hooks(http_response, error, hook_ctx)
28
+ if http_response.nil? || Utils.error_status?(http_response.status)
29
+ http_response = @sdk_configuration.hooks.after_error(
30
+ error: error,
31
+ hook_ctx: SDKHooks::AfterErrorHookContext.new(
32
+ hook_ctx: hook_ctx
33
+ ),
34
+ response: http_response
35
+ )
36
+ else
37
+ http_response = @sdk_configuration.hooks.after_success(
38
+ hook_ctx: SDKHooks::AfterSuccessHookContext.new(
39
+ hook_ctx: hook_ctx
40
+ ),
41
+ response: http_response
42
+ )
43
+ end
44
+
45
+ if http_response.nil?
46
+ raise error unless error.nil?
47
+ raise ::FastpixClient::Models::Errors::EmptyResponseError, 'no response'
48
+ end
49
+
50
+ http_response
51
+ end
52
+ private :apply_after_request_hooks
17
53
 
18
54
  # Operations involving signing keys
19
55
 
@@ -74,8 +110,8 @@ module FastpixClient
74
110
  url = "#{base_url}/iam/signing-keys"
75
111
  headers = {}
76
112
  headers = T.cast(headers, T::Hash[String, String])
77
- headers['Accept'] = 'application/json'
78
- headers['user-agent'] = @sdk_configuration.user_agent
113
+ headers['Accept'] = CONTENT_TYPE_JSON
114
+ headers[USER_AGENT_HEADER] = @sdk_configuration.user_agent
79
115
 
80
116
  security = @sdk_configuration.security_source&.call
81
117
 
@@ -113,32 +149,12 @@ module FastpixClient
113
149
  rescue StandardError => e
114
150
  error = e
115
151
  ensure
116
- if http_response.nil? || Utils.error_status?(http_response.status)
117
- http_response = @sdk_configuration.hooks.after_error(
118
- error: error,
119
- hook_ctx: SDKHooks::AfterErrorHookContext.new(
120
- hook_ctx: hook_ctx
121
- ),
122
- response: http_response
123
- )
124
- else
125
- http_response = @sdk_configuration.hooks.after_success(
126
- hook_ctx: SDKHooks::AfterSuccessHookContext.new(
127
- hook_ctx: hook_ctx
128
- ),
129
- response: http_response
130
- )
131
- end
132
-
133
- if http_response.nil?
134
- raise error if !error.nil?
135
- raise 'no response'
136
- end
152
+ http_response = apply_after_request_hooks(http_response, error, hook_ctx)
137
153
  end
138
154
 
139
- content_type = http_response.headers.fetch('Content-Type', 'application/octet-stream')
155
+ content_type = http_response.headers.fetch(CONTENT_TYPE_HEADER, DEFAULT_CONTENT_TYPE)
140
156
  if Utils.match_status_code(http_response.status, ['201'])
141
- if Utils.match_content_type(content_type, 'application/json')
157
+ if Utils.match_content_type(content_type, CONTENT_TYPE_JSON)
142
158
  http_response = @sdk_configuration.hooks.after_success(
143
159
  hook_ctx: SDKHooks::AfterSuccessHookContext.new(
144
160
  hook_ctx: hook_ctx
@@ -156,14 +172,14 @@ module FastpixClient
156
172
 
157
173
  return response
158
174
  else
159
- raise ::FastpixClient::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown content type received'
175
+ raise ::FastpixClient::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), UNKNOWN_CONTENT_TYPE_ERROR
160
176
  end
161
177
  elsif Utils.match_status_code(http_response.status, ['4XX'])
162
- raise ::FastpixClient::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'API error occurred'
178
+ raise ::FastpixClient::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), API_ERROR_OCCURRED
163
179
  elsif Utils.match_status_code(http_response.status, ['5XX'])
164
- raise ::FastpixClient::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'API error occurred'
180
+ raise ::FastpixClient::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), API_ERROR_OCCURRED
165
181
  else
166
- if Utils.match_content_type(content_type, 'application/json')
182
+ if Utils.match_content_type(content_type, CONTENT_TYPE_JSON)
167
183
  http_response = @sdk_configuration.hooks.after_success(
168
184
  hook_ctx: SDKHooks::AfterSuccessHookContext.new(
169
185
  hook_ctx: hook_ctx
@@ -181,7 +197,7 @@ module FastpixClient
181
197
 
182
198
  return response
183
199
  else
184
- raise ::FastpixClient::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown content type received'
200
+ raise ::FastpixClient::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), UNKNOWN_CONTENT_TYPE_ERROR
185
201
  end
186
202
  end
187
203
  end
@@ -221,8 +237,8 @@ module FastpixClient
221
237
  headers = {}
222
238
  headers = T.cast(headers, T::Hash[String, String])
223
239
  query_params = Utils.get_query_params(Models::Operations::ListSigningKeysRequest, request, nil)
224
- headers['Accept'] = 'application/json'
225
- headers['user-agent'] = @sdk_configuration.user_agent
240
+ headers['Accept'] = CONTENT_TYPE_JSON
241
+ headers[USER_AGENT_HEADER] = @sdk_configuration.user_agent
226
242
 
227
243
  security = @sdk_configuration.security_source&.call
228
244
 
@@ -261,32 +277,12 @@ module FastpixClient
261
277
  rescue StandardError => e
262
278
  error = e
263
279
  ensure
264
- if http_response.nil? || Utils.error_status?(http_response.status)
265
- http_response = @sdk_configuration.hooks.after_error(
266
- error: error,
267
- hook_ctx: SDKHooks::AfterErrorHookContext.new(
268
- hook_ctx: hook_ctx
269
- ),
270
- response: http_response
271
- )
272
- else
273
- http_response = @sdk_configuration.hooks.after_success(
274
- hook_ctx: SDKHooks::AfterSuccessHookContext.new(
275
- hook_ctx: hook_ctx
276
- ),
277
- response: http_response
278
- )
279
- end
280
-
281
- if http_response.nil?
282
- raise error if !error.nil?
283
- raise 'no response'
284
- end
280
+ http_response = apply_after_request_hooks(http_response, error, hook_ctx)
285
281
  end
286
282
 
287
- content_type = http_response.headers.fetch('Content-Type', 'application/octet-stream')
283
+ content_type = http_response.headers.fetch(CONTENT_TYPE_HEADER, DEFAULT_CONTENT_TYPE)
288
284
  if Utils.match_status_code(http_response.status, ['200'])
289
- if Utils.match_content_type(content_type, 'application/json')
285
+ if Utils.match_content_type(content_type, CONTENT_TYPE_JSON)
290
286
  http_response = @sdk_configuration.hooks.after_success(
291
287
  hook_ctx: SDKHooks::AfterSuccessHookContext.new(
292
288
  hook_ctx: hook_ctx
@@ -304,14 +300,14 @@ module FastpixClient
304
300
 
305
301
  return response
306
302
  else
307
- raise ::FastpixClient::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown content type received'
303
+ raise ::FastpixClient::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), UNKNOWN_CONTENT_TYPE_ERROR
308
304
  end
309
305
  elsif Utils.match_status_code(http_response.status, ['4XX'])
310
- raise ::FastpixClient::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'API error occurred'
306
+ raise ::FastpixClient::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), API_ERROR_OCCURRED
311
307
  elsif Utils.match_status_code(http_response.status, ['5XX'])
312
- raise ::FastpixClient::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'API error occurred'
308
+ raise ::FastpixClient::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), API_ERROR_OCCURRED
313
309
  else
314
- if Utils.match_content_type(content_type, 'application/json')
310
+ if Utils.match_content_type(content_type, CONTENT_TYPE_JSON)
315
311
  http_response = @sdk_configuration.hooks.after_success(
316
312
  hook_ctx: SDKHooks::AfterSuccessHookContext.new(
317
313
  hook_ctx: hook_ctx
@@ -329,7 +325,7 @@ module FastpixClient
329
325
 
330
326
  return response
331
327
  else
332
- raise ::FastpixClient::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown content type received'
328
+ raise ::FastpixClient::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), UNKNOWN_CONTENT_TYPE_ERROR
333
329
  end
334
330
  end
335
331
  end
@@ -370,8 +366,8 @@ module FastpixClient
370
366
  )
371
367
  headers = {}
372
368
  headers = T.cast(headers, T::Hash[String, String])
373
- headers['Accept'] = 'application/json'
374
- headers['user-agent'] = @sdk_configuration.user_agent
369
+ headers['Accept'] = CONTENT_TYPE_JSON
370
+ headers[USER_AGENT_HEADER] = @sdk_configuration.user_agent
375
371
 
376
372
  security = @sdk_configuration.security_source&.call
377
373
 
@@ -409,32 +405,12 @@ module FastpixClient
409
405
  rescue StandardError => e
410
406
  error = e
411
407
  ensure
412
- if http_response.nil? || Utils.error_status?(http_response.status)
413
- http_response = @sdk_configuration.hooks.after_error(
414
- error: error,
415
- hook_ctx: SDKHooks::AfterErrorHookContext.new(
416
- hook_ctx: hook_ctx
417
- ),
418
- response: http_response
419
- )
420
- else
421
- http_response = @sdk_configuration.hooks.after_success(
422
- hook_ctx: SDKHooks::AfterSuccessHookContext.new(
423
- hook_ctx: hook_ctx
424
- ),
425
- response: http_response
426
- )
427
- end
428
-
429
- if http_response.nil?
430
- raise error if !error.nil?
431
- raise 'no response'
432
- end
408
+ http_response = apply_after_request_hooks(http_response, error, hook_ctx)
433
409
  end
434
410
 
435
- content_type = http_response.headers.fetch('Content-Type', 'application/octet-stream')
411
+ content_type = http_response.headers.fetch(CONTENT_TYPE_HEADER, DEFAULT_CONTENT_TYPE)
436
412
  if Utils.match_status_code(http_response.status, ['200'])
437
- if Utils.match_content_type(content_type, 'application/json')
413
+ if Utils.match_content_type(content_type, CONTENT_TYPE_JSON)
438
414
  http_response = @sdk_configuration.hooks.after_success(
439
415
  hook_ctx: SDKHooks::AfterSuccessHookContext.new(
440
416
  hook_ctx: hook_ctx
@@ -452,14 +428,14 @@ module FastpixClient
452
428
 
453
429
  return response
454
430
  else
455
- raise ::FastpixClient::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown content type received'
431
+ raise ::FastpixClient::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), UNKNOWN_CONTENT_TYPE_ERROR
456
432
  end
457
433
  elsif Utils.match_status_code(http_response.status, ['4XX'])
458
- raise ::FastpixClient::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'API error occurred'
434
+ raise ::FastpixClient::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), API_ERROR_OCCURRED
459
435
  elsif Utils.match_status_code(http_response.status, ['5XX'])
460
- raise ::FastpixClient::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'API error occurred'
436
+ raise ::FastpixClient::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), API_ERROR_OCCURRED
461
437
  else
462
- if Utils.match_content_type(content_type, 'application/json')
438
+ if Utils.match_content_type(content_type, CONTENT_TYPE_JSON)
463
439
  http_response = @sdk_configuration.hooks.after_success(
464
440
  hook_ctx: SDKHooks::AfterSuccessHookContext.new(
465
441
  hook_ctx: hook_ctx
@@ -477,7 +453,7 @@ module FastpixClient
477
453
 
478
454
  return response
479
455
  else
480
- raise ::FastpixClient::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown content type received'
456
+ raise ::FastpixClient::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), UNKNOWN_CONTENT_TYPE_ERROR
481
457
  end
482
458
  end
483
459
  end
@@ -546,8 +522,8 @@ module FastpixClient
546
522
  )
547
523
  headers = {}
548
524
  headers = T.cast(headers, T::Hash[String, String])
549
- headers['Accept'] = 'application/json'
550
- headers['user-agent'] = @sdk_configuration.user_agent
525
+ headers['Accept'] = CONTENT_TYPE_JSON
526
+ headers[USER_AGENT_HEADER] = @sdk_configuration.user_agent
551
527
 
552
528
  security = @sdk_configuration.security_source&.call
553
529
 
@@ -585,32 +561,12 @@ module FastpixClient
585
561
  rescue StandardError => e
586
562
  error = e
587
563
  ensure
588
- if http_response.nil? || Utils.error_status?(http_response.status)
589
- http_response = @sdk_configuration.hooks.after_error(
590
- error: error,
591
- hook_ctx: SDKHooks::AfterErrorHookContext.new(
592
- hook_ctx: hook_ctx
593
- ),
594
- response: http_response
595
- )
596
- else
597
- http_response = @sdk_configuration.hooks.after_success(
598
- hook_ctx: SDKHooks::AfterSuccessHookContext.new(
599
- hook_ctx: hook_ctx
600
- ),
601
- response: http_response
602
- )
603
- end
604
-
605
- if http_response.nil?
606
- raise error if !error.nil?
607
- raise 'no response'
608
- end
564
+ http_response = apply_after_request_hooks(http_response, error, hook_ctx)
609
565
  end
610
566
 
611
- content_type = http_response.headers.fetch('Content-Type', 'application/octet-stream')
567
+ content_type = http_response.headers.fetch(CONTENT_TYPE_HEADER, DEFAULT_CONTENT_TYPE)
612
568
  if Utils.match_status_code(http_response.status, ['200'])
613
- if Utils.match_content_type(content_type, 'application/json')
569
+ if Utils.match_content_type(content_type, CONTENT_TYPE_JSON)
614
570
  http_response = @sdk_configuration.hooks.after_success(
615
571
  hook_ctx: SDKHooks::AfterSuccessHookContext.new(
616
572
  hook_ctx: hook_ctx
@@ -628,14 +584,14 @@ module FastpixClient
628
584
 
629
585
  return response
630
586
  else
631
- raise ::FastpixClient::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown content type received'
587
+ raise ::FastpixClient::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), UNKNOWN_CONTENT_TYPE_ERROR
632
588
  end
633
589
  elsif Utils.match_status_code(http_response.status, ['4XX'])
634
- raise ::FastpixClient::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'API error occurred'
590
+ raise ::FastpixClient::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), API_ERROR_OCCURRED
635
591
  elsif Utils.match_status_code(http_response.status, ['5XX'])
636
- raise ::FastpixClient::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'API error occurred'
592
+ raise ::FastpixClient::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), API_ERROR_OCCURRED
637
593
  else
638
- if Utils.match_content_type(content_type, 'application/json')
594
+ if Utils.match_content_type(content_type, CONTENT_TYPE_JSON)
639
595
  http_response = @sdk_configuration.hooks.after_success(
640
596
  hook_ctx: SDKHooks::AfterSuccessHookContext.new(
641
597
  hook_ctx: hook_ctx
@@ -653,7 +609,7 @@ module FastpixClient
653
609
 
654
610
  return response
655
611
  else
656
- raise ::FastpixClient::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown content type received'
612
+ raise ::FastpixClient::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), UNKNOWN_CONTENT_TYPE_ERROR
657
613
  end
658
614
  end
659
615
  end