trinsic_api 2.1.1.pre.alpha1 → 2.2.0.pre.alpha1

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 (94) hide show
  1. checksums.yaml +4 -4
  2. data/docs/AppleWalletInput.md +18 -0
  3. data/docs/AttachmentsApi.md +1 -1
  4. data/docs/{CreateAdvancedProviderSessionRequest.md → CreateDirectProviderSessionRequest.md} +5 -3
  5. data/docs/{CreateAdvancedProviderSessionResponse.md → CreateDirectProviderSessionResponse.md} +2 -2
  6. data/docs/CreateHostedProviderSessionRequest.md +3 -1
  7. data/docs/CreateMdlExchangeRequest.md +32 -0
  8. data/docs/CreateMdlExchangeResponse.md +22 -0
  9. data/docs/CreateWidgetSessionRequest.md +3 -1
  10. data/docs/ExternalMdlFieldData.md +20 -0
  11. data/docs/FinalizeMdlExchangeRequest.md +24 -0
  12. data/docs/FinalizeMdlExchangeResponse.md +24 -0
  13. data/docs/GetAttachmentRequest.md +3 -1
  14. data/docs/GoogleWalletInput.md +18 -0
  15. data/docs/IdentityData.md +2 -0
  16. data/docs/{IndonesiaDukcapilBiometricMatchInput.md → IndonesiaDukcapilMatchInput.md} +3 -3
  17. data/docs/Match.md +20 -0
  18. data/docs/MatchData.md +36 -0
  19. data/docs/MdlApi.md +151 -0
  20. data/docs/MdlCertificateData.md +26 -0
  21. data/docs/MdlExchangeMechanism.md +15 -0
  22. data/docs/MdlFieldDataType.md +15 -0
  23. data/docs/MdlIdentityData.md +22 -0
  24. data/docs/NetworkApi.md +21 -18
  25. data/docs/ProviderContract.md +7 -5
  26. data/docs/ProviderInput.md +6 -2
  27. data/docs/RecommendRequest.md +2 -0
  28. data/docs/SessionsApi.md +103 -27
  29. data/docs/SubmitNativeChallengeResponseRequest.md +20 -0
  30. data/docs/SubmitNativeChallengeResponseResponse.md +18 -0
  31. data/lib/trinsic_api/api/mdl_api.rb +150 -0
  32. data/lib/trinsic_api/api/network_api.rb +22 -14
  33. data/lib/trinsic_api/api/sessions_api.rb +99 -23
  34. data/lib/trinsic_api/models/apple_wallet_input.rb +244 -0
  35. data/lib/trinsic_api/models/{create_advanced_provider_session_request.rb → create_direct_provider_session_request.rb} +32 -5
  36. data/lib/trinsic_api/models/{create_advanced_provider_session_response.rb → create_direct_provider_session_response.rb} +3 -3
  37. data/lib/trinsic_api/models/create_hosted_provider_session_request.rb +29 -2
  38. data/lib/trinsic_api/models/create_mdl_exchange_request.rb +404 -0
  39. data/lib/trinsic_api/models/create_mdl_exchange_response.rb +292 -0
  40. data/lib/trinsic_api/models/create_widget_session_request.rb +29 -2
  41. data/lib/trinsic_api/models/external_mdl_field_data.rb +287 -0
  42. data/lib/trinsic_api/models/finalize_mdl_exchange_request.rb +319 -0
  43. data/lib/trinsic_api/models/finalize_mdl_exchange_response.rb +287 -0
  44. data/lib/trinsic_api/models/get_attachment_request.rb +31 -4
  45. data/lib/trinsic_api/models/google_wallet_input.rb +244 -0
  46. data/lib/trinsic_api/models/identity_data.rb +11 -1
  47. data/lib/trinsic_api/models/{indonesia_dukcapil_biometric_match_input.rb → indonesia_dukcapil_match_input.rb} +4 -4
  48. data/lib/trinsic_api/models/integration_capability.rb +2 -1
  49. data/lib/trinsic_api/models/integration_launch_method.rb +2 -1
  50. data/lib/trinsic_api/models/integration_step.rb +1 -1
  51. data/lib/trinsic_api/models/match.rb +231 -0
  52. data/lib/trinsic_api/models/match_data.rb +311 -0
  53. data/lib/trinsic_api/models/mdl_certificate_data.rb +346 -0
  54. data/lib/trinsic_api/models/mdl_exchange_mechanism.rb +40 -0
  55. data/lib/trinsic_api/models/mdl_field_data_type.rb +43 -0
  56. data/lib/trinsic_api/models/mdl_identity_data.rb +294 -0
  57. data/lib/trinsic_api/models/provider_contract.rb +33 -6
  58. data/lib/trinsic_api/models/provider_input.rb +31 -9
  59. data/lib/trinsic_api/models/recommend_request.rb +28 -1
  60. data/lib/trinsic_api/models/result_collection_method.rb +2 -1
  61. data/lib/trinsic_api/models/session_error_code.rb +3 -1
  62. data/lib/trinsic_api/models/submit_native_challenge_response_request.rb +283 -0
  63. data/lib/trinsic_api/models/submit_native_challenge_response_response.rb +238 -0
  64. data/lib/trinsic_api/version.rb +1 -1
  65. data/lib/trinsic_api.rb +19 -3
  66. data/spec/api/mdl_api_spec.rb +59 -0
  67. data/spec/api/network_api_spec.rb +3 -3
  68. data/spec/api/sessions_api_spec.rb +21 -7
  69. data/spec/models/apple_wallet_input_spec.rb +36 -0
  70. data/spec/models/{create_advanced_provider_session_request_spec.rb → create_direct_provider_session_request_spec.rb} +12 -6
  71. data/spec/models/{create_advanced_provider_session_response_spec.rb → create_direct_provider_session_response_spec.rb} +6 -6
  72. data/spec/models/create_hosted_provider_session_request_spec.rb +6 -0
  73. data/spec/models/create_mdl_exchange_request_spec.rb +78 -0
  74. data/spec/models/create_mdl_exchange_response_spec.rb +48 -0
  75. data/spec/models/create_widget_session_request_spec.rb +6 -0
  76. data/spec/models/external_mdl_field_data_spec.rb +42 -0
  77. data/spec/models/finalize_mdl_exchange_request_spec.rb +54 -0
  78. data/spec/models/finalize_mdl_exchange_response_spec.rb +54 -0
  79. data/spec/models/get_attachment_request_spec.rb +6 -0
  80. data/spec/models/google_wallet_input_spec.rb +36 -0
  81. data/spec/models/identity_data_spec.rb +6 -0
  82. data/spec/models/{indonesia_dukcapil_biometric_match_input_spec.rb → indonesia_dukcapil_match_input_spec.rb} +6 -6
  83. data/spec/models/match_data_spec.rb +90 -0
  84. data/spec/models/match_spec.rb +42 -0
  85. data/spec/models/mdl_certificate_data_spec.rb +60 -0
  86. data/spec/models/mdl_exchange_mechanism_spec.rb +30 -0
  87. data/spec/models/mdl_field_data_type_spec.rb +30 -0
  88. data/spec/models/mdl_identity_data_spec.rb +48 -0
  89. data/spec/models/provider_contract_spec.rb +6 -0
  90. data/spec/models/provider_input_spec.rb +13 -1
  91. data/spec/models/recommend_request_spec.rb +6 -0
  92. data/spec/models/submit_native_challenge_response_request_spec.rb +42 -0
  93. data/spec/models/submit_native_challenge_response_response_spec.rb +36 -0
  94. metadata +130 -66
@@ -21,23 +21,29 @@ module TrinsicApi
21
21
  end
22
22
  # List Provider Contracts
23
23
  # List the contracts for all Providers available to your App. If your App is in test mode, this call will only return Providers available in test mode. If your App is not in test mode, this call will only return Providers available in production.
24
+ # @param verification_profile_id [String]
24
25
  # @param [Hash] opts the optional parameters
25
26
  # @return [ListProviderContractsResponse]
26
- def list_provider_contracts(opts = {})
27
- data, _status_code, _headers = list_provider_contracts_with_http_info(opts)
27
+ def list_provider_contracts(verification_profile_id, opts = {})
28
+ data, _status_code, _headers = list_provider_contracts_with_http_info(verification_profile_id, opts)
28
29
  data
29
30
  end
30
31
 
31
32
  # List Provider Contracts
32
33
  # List the contracts for all Providers available to your App. If your App is in test mode, this call will only return Providers available in test mode. If your App is not in test mode, this call will only return Providers available in production.
34
+ # @param verification_profile_id [String]
33
35
  # @param [Hash] opts the optional parameters
34
36
  # @return [Array<(ListProviderContractsResponse, Integer, Hash)>] ListProviderContractsResponse data, response status code and response headers
35
- def list_provider_contracts_with_http_info(opts = {})
37
+ def list_provider_contracts_with_http_info(verification_profile_id, opts = {})
36
38
  if @api_client.config.debugging
37
39
  @api_client.config.logger.debug 'Calling API: NetworkApi.list_provider_contracts ...'
38
40
  end
41
+ # verify the required parameter 'verification_profile_id' is set
42
+ if @api_client.config.client_side_validation && verification_profile_id.nil?
43
+ fail ArgumentError, "Missing the required parameter 'verification_profile_id' when calling NetworkApi.list_provider_contracts"
44
+ end
39
45
  # resource path
40
- local_var_path = '/api/v1/network/providers/contracts'
46
+ local_var_path = '/api/v1/network/{verificationProfileId}/providers/contracts'.sub('{' + 'verificationProfileId' + '}', CGI.escape(verification_profile_id.to_s))
41
47
 
42
48
  # query parameters
43
49
  query_params = opts[:query_params] || {}
@@ -76,27 +82,29 @@ module TrinsicApi
76
82
  return data, status_code, headers
77
83
  end
78
84
 
79
- # List Providers
80
- # List all identity providers available for use
85
+ # @param verification_profile_id [String]
81
86
  # @param [Hash] opts the optional parameters
82
- # @option opts [String] :health Filter providers by health status. Valid values: \&quot;online\&quot;, \&quot;offline\&quot;, \&quot;all\&quot;. Defaults to \&quot;all\&quot;.
87
+ # @option opts [String] :health
83
88
  # @return [ListProvidersResponse]
84
- def list_providers(opts = {})
85
- data, _status_code, _headers = list_providers_with_http_info(opts)
89
+ def list_providers(verification_profile_id, opts = {})
90
+ data, _status_code, _headers = list_providers_with_http_info(verification_profile_id, opts)
86
91
  data
87
92
  end
88
93
 
89
- # List Providers
90
- # List all identity providers available for use
94
+ # @param verification_profile_id [String]
91
95
  # @param [Hash] opts the optional parameters
92
- # @option opts [String] :health Filter providers by health status. Valid values: \&quot;online\&quot;, \&quot;offline\&quot;, \&quot;all\&quot;. Defaults to \&quot;all\&quot;.
96
+ # @option opts [String] :health
93
97
  # @return [Array<(ListProvidersResponse, Integer, Hash)>] ListProvidersResponse data, response status code and response headers
94
- def list_providers_with_http_info(opts = {})
98
+ def list_providers_with_http_info(verification_profile_id, opts = {})
95
99
  if @api_client.config.debugging
96
100
  @api_client.config.logger.debug 'Calling API: NetworkApi.list_providers ...'
97
101
  end
102
+ # verify the required parameter 'verification_profile_id' is set
103
+ if @api_client.config.client_side_validation && verification_profile_id.nil?
104
+ fail ArgumentError, "Missing the required parameter 'verification_profile_id' when calling NetworkApi.list_providers"
105
+ end
98
106
  # resource path
99
- local_var_path = '/api/v1/network/providers'
107
+ local_var_path = '/api/v1/network/{verificationProfileId}/providers'.sub('{' + 'verificationProfileId' + '}', CGI.escape(verification_profile_id.to_s))
100
108
 
101
109
  # query parameters
102
110
  query_params = opts[:query_params] || {}
@@ -82,27 +82,27 @@ module TrinsicApi
82
82
  return data, status_code, headers
83
83
  end
84
84
 
85
- # Create Advanced Provider Session
85
+ # Create Direct Provider Session
86
86
  # Verify a user's identity with a specific provider, handling additional user interaction in your own UI. Signal which kinds of user interactions your UI can handle using the `Capabilities` field. If `FallbackToHostedUi` is `true`, Trinsic's hosted UI will automatically be invoked to handle any capabilities you do not support.
87
87
  # @param [Hash] opts the optional parameters
88
- # @option opts [CreateAdvancedProviderSessionRequest] :create_advanced_provider_session_request
89
- # @return [CreateAdvancedProviderSessionResponse]
90
- def create_advanced_provider_session(opts = {})
91
- data, _status_code, _headers = create_advanced_provider_session_with_http_info(opts)
88
+ # @option opts [CreateDirectProviderSessionRequest] :create_direct_provider_session_request
89
+ # @return [CreateDirectProviderSessionResponse]
90
+ def create_direct_provider_session(opts = {})
91
+ data, _status_code, _headers = create_direct_provider_session_with_http_info(opts)
92
92
  data
93
93
  end
94
94
 
95
- # Create Advanced Provider Session
95
+ # Create Direct Provider Session
96
96
  # Verify a user&#39;s identity with a specific provider, handling additional user interaction in your own UI. Signal which kinds of user interactions your UI can handle using the &#x60;Capabilities&#x60; field. If &#x60;FallbackToHostedUi&#x60; is &#x60;true&#x60;, Trinsic&#39;s hosted UI will automatically be invoked to handle any capabilities you do not support.
97
97
  # @param [Hash] opts the optional parameters
98
- # @option opts [CreateAdvancedProviderSessionRequest] :create_advanced_provider_session_request
99
- # @return [Array<(CreateAdvancedProviderSessionResponse, Integer, Hash)>] CreateAdvancedProviderSessionResponse data, response status code and response headers
100
- def create_advanced_provider_session_with_http_info(opts = {})
98
+ # @option opts [CreateDirectProviderSessionRequest] :create_direct_provider_session_request
99
+ # @return [Array<(CreateDirectProviderSessionResponse, Integer, Hash)>] CreateDirectProviderSessionResponse data, response status code and response headers
100
+ def create_direct_provider_session_with_http_info(opts = {})
101
101
  if @api_client.config.debugging
102
- @api_client.config.logger.debug 'Calling API: SessionsApi.create_advanced_provider_session ...'
102
+ @api_client.config.logger.debug 'Calling API: SessionsApi.create_direct_provider_session ...'
103
103
  end
104
104
  # resource path
105
- local_var_path = '/api/v1/sessions/provider/advanced'
105
+ local_var_path = '/api/v1/sessions/provider/direct'
106
106
 
107
107
  # query parameters
108
108
  query_params = opts[:query_params] || {}
@@ -121,16 +121,16 @@ module TrinsicApi
121
121
  form_params = opts[:form_params] || {}
122
122
 
123
123
  # http body (model)
124
- post_body = opts[:debug_body] || @api_client.object_to_http_body(opts[:'create_advanced_provider_session_request'])
124
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(opts[:'create_direct_provider_session_request'])
125
125
 
126
126
  # return_type
127
- return_type = opts[:debug_return_type] || 'CreateAdvancedProviderSessionResponse'
127
+ return_type = opts[:debug_return_type] || 'CreateDirectProviderSessionResponse'
128
128
 
129
129
  # auth_names
130
130
  auth_names = opts[:debug_auth_names] || ['Bearer']
131
131
 
132
132
  new_options = opts.merge(
133
- :operation => :"SessionsApi.create_advanced_provider_session",
133
+ :operation => :"SessionsApi.create_direct_provider_session",
134
134
  :header_params => header_params,
135
135
  :query_params => query_params,
136
136
  :form_params => form_params,
@@ -141,7 +141,7 @@ module TrinsicApi
141
141
 
142
142
  data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
143
143
  if @api_client.config.debugging
144
- @api_client.config.logger.debug "API called: SessionsApi#create_advanced_provider_session\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
144
+ @api_client.config.logger.debug "API called: SessionsApi#create_direct_provider_session\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
145
145
  end
146
146
  return data, status_code, headers
147
147
  end
@@ -406,30 +406,36 @@ module TrinsicApi
406
406
  end
407
407
 
408
408
  # List Sessions
409
- # List Sessions created by your account
409
+ # List Sessions created for a specific Verification Profile
410
+ # @param verification_profile_id [String]
410
411
  # @param [Hash] opts the optional parameters
411
412
  # @option opts [SessionOrdering] :order_by The field by which sessions should be ordered
412
413
  # @option opts [OrderDirection] :order_direction
413
414
  # @option opts [Integer] :page_size The number of items to return per page -- must be between &#x60;1&#x60; and &#x60;50&#x60;
414
415
  # @option opts [Integer] :page The page number to return -- starts at &#x60;1&#x60;
415
416
  # @return [ListSessionsResponse]
416
- def list_sessions(opts = {})
417
- data, _status_code, _headers = list_sessions_with_http_info(opts)
417
+ def list_sessions(verification_profile_id, opts = {})
418
+ data, _status_code, _headers = list_sessions_with_http_info(verification_profile_id, opts)
418
419
  data
419
420
  end
420
421
 
421
422
  # List Sessions
422
- # List Sessions created by your account
423
+ # List Sessions created for a specific Verification Profile
424
+ # @param verification_profile_id [String]
423
425
  # @param [Hash] opts the optional parameters
424
426
  # @option opts [SessionOrdering] :order_by The field by which sessions should be ordered
425
427
  # @option opts [OrderDirection] :order_direction
426
428
  # @option opts [Integer] :page_size The number of items to return per page -- must be between &#x60;1&#x60; and &#x60;50&#x60;
427
429
  # @option opts [Integer] :page The page number to return -- starts at &#x60;1&#x60;
428
430
  # @return [Array<(ListSessionsResponse, Integer, Hash)>] ListSessionsResponse data, response status code and response headers
429
- def list_sessions_with_http_info(opts = {})
431
+ def list_sessions_with_http_info(verification_profile_id, opts = {})
430
432
  if @api_client.config.debugging
431
433
  @api_client.config.logger.debug 'Calling API: SessionsApi.list_sessions ...'
432
434
  end
435
+ # verify the required parameter 'verification_profile_id' is set
436
+ if @api_client.config.client_side_validation && verification_profile_id.nil?
437
+ fail ArgumentError, "Missing the required parameter 'verification_profile_id' when calling SessionsApi.list_sessions"
438
+ end
433
439
  if @api_client.config.client_side_validation && !opts[:'page_size'].nil? && opts[:'page_size'] > 50
434
440
  fail ArgumentError, 'invalid value for "opts[:"page_size"]" when calling SessionsApi.list_sessions, must be smaller than or equal to 50.'
435
441
  end
@@ -447,7 +453,7 @@ module TrinsicApi
447
453
  end
448
454
 
449
455
  # resource path
450
- local_var_path = '/api/v1/sessions/list'
456
+ local_var_path = '/api/v1/verification-profiles/{verificationProfileId}/sessions'.sub('{' + 'verificationProfileId' + '}', CGI.escape(verification_profile_id.to_s))
451
457
 
452
458
  # query parameters
453
459
  query_params = opts[:query_params] || {}
@@ -554,7 +560,7 @@ module TrinsicApi
554
560
  end
555
561
 
556
562
  # Refresh Step Content
557
- # Refreshes the content of a Step for an Advanced Provider Session.
563
+ # Refreshes the content of a Step for a Direct Provider Session.
558
564
  # @param acceptance_session_id [String]
559
565
  # @param [Hash] opts the optional parameters
560
566
  # @option opts [RefreshStepContentRequest] :refresh_step_content_request
@@ -565,7 +571,7 @@ module TrinsicApi
565
571
  end
566
572
 
567
573
  # Refresh Step Content
568
- # Refreshes the content of a Step for an Advanced Provider Session.
574
+ # Refreshes the content of a Step for a Direct Provider Session.
569
575
  # @param acceptance_session_id [String]
570
576
  # @param [Hash] opts the optional parameters
571
577
  # @option opts [RefreshStepContentRequest] :refresh_step_content_request
@@ -622,5 +628,75 @@ module TrinsicApi
622
628
  end
623
629
  return data, status_code, headers
624
630
  end
631
+
632
+ # Submit Native Challenge Response
633
+ # Submits the response from a Native Challenge (e.g., mDL exchange via DC API) and processes the results.
634
+ # @param acceptance_session_id [String]
635
+ # @param [Hash] opts the optional parameters
636
+ # @option opts [SubmitNativeChallengeResponseRequest] :submit_native_challenge_response_request
637
+ # @return [SubmitNativeChallengeResponseResponse]
638
+ def submit_native_challenge_response(acceptance_session_id, opts = {})
639
+ data, _status_code, _headers = submit_native_challenge_response_with_http_info(acceptance_session_id, opts)
640
+ data
641
+ end
642
+
643
+ # Submit Native Challenge Response
644
+ # Submits the response from a Native Challenge (e.g., mDL exchange via DC API) and processes the results.
645
+ # @param acceptance_session_id [String]
646
+ # @param [Hash] opts the optional parameters
647
+ # @option opts [SubmitNativeChallengeResponseRequest] :submit_native_challenge_response_request
648
+ # @return [Array<(SubmitNativeChallengeResponseResponse, Integer, Hash)>] SubmitNativeChallengeResponseResponse data, response status code and response headers
649
+ def submit_native_challenge_response_with_http_info(acceptance_session_id, opts = {})
650
+ if @api_client.config.debugging
651
+ @api_client.config.logger.debug 'Calling API: SessionsApi.submit_native_challenge_response ...'
652
+ end
653
+ # verify the required parameter 'acceptance_session_id' is set
654
+ if @api_client.config.client_side_validation && acceptance_session_id.nil?
655
+ fail ArgumentError, "Missing the required parameter 'acceptance_session_id' when calling SessionsApi.submit_native_challenge_response"
656
+ end
657
+ # resource path
658
+ local_var_path = '/api/v1/sessions/{acceptanceSessionId}/native-challenge/submit'.sub('{' + 'acceptanceSessionId' + '}', CGI.escape(acceptance_session_id.to_s))
659
+
660
+ # query parameters
661
+ query_params = opts[:query_params] || {}
662
+
663
+ # header parameters
664
+ header_params = opts[:header_params] || {}
665
+ # HTTP header 'Accept' (if needed)
666
+ header_params['Accept'] = @api_client.select_header_accept(['text/plain', 'application/json', 'text/json', 'application/problem+json']) unless header_params['Accept']
667
+ # HTTP header 'Content-Type'
668
+ content_type = @api_client.select_header_content_type(['application/json', 'text/json', 'application/*+json'])
669
+ if !content_type.nil?
670
+ header_params['Content-Type'] = content_type
671
+ end
672
+
673
+ # form parameters
674
+ form_params = opts[:form_params] || {}
675
+
676
+ # http body (model)
677
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(opts[:'submit_native_challenge_response_request'])
678
+
679
+ # return_type
680
+ return_type = opts[:debug_return_type] || 'SubmitNativeChallengeResponseResponse'
681
+
682
+ # auth_names
683
+ auth_names = opts[:debug_auth_names] || ['Bearer']
684
+
685
+ new_options = opts.merge(
686
+ :operation => :"SessionsApi.submit_native_challenge_response",
687
+ :header_params => header_params,
688
+ :query_params => query_params,
689
+ :form_params => form_params,
690
+ :body => post_body,
691
+ :auth_names => auth_names,
692
+ :return_type => return_type
693
+ )
694
+
695
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
696
+ if @api_client.config.debugging
697
+ @api_client.config.logger.debug "API called: SessionsApi#submit_native_challenge_response\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
698
+ end
699
+ return data, status_code, headers
700
+ end
625
701
  end
626
702
  end
@@ -0,0 +1,244 @@
1
+ =begin
2
+ #Trinsic API
3
+
4
+ #No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
5
+
6
+ The version of the OpenAPI document: v1
7
+
8
+ Generated by: https://openapi-generator.tech
9
+ Generator version: 7.13.0
10
+
11
+ =end
12
+
13
+ require 'date'
14
+ require 'time'
15
+
16
+ module TrinsicApi
17
+ class AppleWalletInput
18
+ # The exchange mechanism to use for this Apple Wallet verification. Use `DigitalCredentialsApi` for Digital Credentials API on web, or `NativeApp` for a native iOS app.
19
+ attr_accessor :exchange_mechanism
20
+
21
+ class EnumAttributeValidator
22
+ attr_reader :datatype
23
+ attr_reader :allowable_values
24
+
25
+ def initialize(datatype, allowable_values)
26
+ @allowable_values = allowable_values.map do |value|
27
+ case datatype.to_s
28
+ when /Integer/i
29
+ value.to_i
30
+ when /Float/i
31
+ value.to_f
32
+ else
33
+ value
34
+ end
35
+ end
36
+ end
37
+
38
+ def valid?(value)
39
+ !value || allowable_values.include?(value)
40
+ end
41
+ end
42
+
43
+ # Attribute mapping from ruby-style variable name to JSON key.
44
+ def self.attribute_map
45
+ {
46
+ :'exchange_mechanism' => :'exchangeMechanism'
47
+ }
48
+ end
49
+
50
+ # Returns attribute mapping this model knows about
51
+ def self.acceptable_attribute_map
52
+ attribute_map
53
+ end
54
+
55
+ # Returns all the JSON keys this model knows about
56
+ def self.acceptable_attributes
57
+ acceptable_attribute_map.values
58
+ end
59
+
60
+ # Attribute type mapping.
61
+ def self.openapi_types
62
+ {
63
+ :'exchange_mechanism' => :'MdlExchangeMechanism'
64
+ }
65
+ end
66
+
67
+ # List of attributes with nullable: true
68
+ def self.openapi_nullable
69
+ Set.new([
70
+ :'exchange_mechanism'
71
+ ])
72
+ end
73
+
74
+ # Initializes the object
75
+ # @param [Hash] attributes Model attributes in the form of hash
76
+ def initialize(attributes = {})
77
+ if (!attributes.is_a?(Hash))
78
+ fail ArgumentError, "The input argument (attributes) must be a hash in `TrinsicApi::AppleWalletInput` initialize method"
79
+ end
80
+
81
+ # check to see if the attribute exists and convert string to symbol for hash key
82
+ acceptable_attribute_map = self.class.acceptable_attribute_map
83
+ attributes = attributes.each_with_object({}) { |(k, v), h|
84
+ if (!acceptable_attribute_map.key?(k.to_sym))
85
+ fail ArgumentError, "`#{k}` is not a valid attribute in `TrinsicApi::AppleWalletInput`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
86
+ end
87
+ h[k.to_sym] = v
88
+ }
89
+
90
+ if attributes.key?(:'exchange_mechanism')
91
+ self.exchange_mechanism = attributes[:'exchange_mechanism']
92
+ end
93
+ end
94
+
95
+ # Show invalid properties with the reasons. Usually used together with valid?
96
+ # @return Array for valid properties with the reasons
97
+ def list_invalid_properties
98
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
99
+ invalid_properties = Array.new
100
+ invalid_properties
101
+ end
102
+
103
+ # Check to see if the all the properties in the model are valid
104
+ # @return true if the model is valid
105
+ def valid?
106
+ warn '[DEPRECATED] the `valid?` method is obsolete'
107
+ true
108
+ end
109
+
110
+ # Checks equality by comparing each attribute.
111
+ # @param [Object] Object to be compared
112
+ def ==(o)
113
+ return true if self.equal?(o)
114
+ self.class == o.class &&
115
+ exchange_mechanism == o.exchange_mechanism
116
+ end
117
+
118
+ # @see the `==` method
119
+ # @param [Object] Object to be compared
120
+ def eql?(o)
121
+ self == o
122
+ end
123
+
124
+ # Calculates hash code according to all attributes.
125
+ # @return [Integer] Hash code
126
+ def hash
127
+ [exchange_mechanism].hash
128
+ end
129
+
130
+ # Builds the object from hash
131
+ # @param [Hash] attributes Model attributes in the form of hash
132
+ # @return [Object] Returns the model itself
133
+ def self.build_from_hash(attributes)
134
+ return nil unless attributes.is_a?(Hash)
135
+ attributes = attributes.transform_keys(&:to_sym)
136
+ transformed_hash = {}
137
+ openapi_types.each_pair do |key, type|
138
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
139
+ transformed_hash["#{key}"] = nil
140
+ elsif type =~ /\AArray<(.*)>/i
141
+ # check to ensure the input is an array given that the attribute
142
+ # is documented as an array but the input is not
143
+ if attributes[attribute_map[key]].is_a?(Array)
144
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
145
+ end
146
+ elsif !attributes[attribute_map[key]].nil?
147
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
148
+ end
149
+ end
150
+ new(transformed_hash)
151
+ end
152
+
153
+ # Deserializes the data based on type
154
+ # @param string type Data type
155
+ # @param string value Value to be deserialized
156
+ # @return [Object] Deserialized data
157
+ def self._deserialize(type, value)
158
+ case type.to_sym
159
+ when :Time
160
+ Time.parse(value)
161
+ when :Date
162
+ Date.parse(value)
163
+ when :String
164
+ value.to_s
165
+ when :Integer
166
+ value.to_i
167
+ when :Float
168
+ value.to_f
169
+ when :Boolean
170
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
171
+ true
172
+ else
173
+ false
174
+ end
175
+ when :Object
176
+ # generic object (usually a Hash), return directly
177
+ value
178
+ when /\AArray<(?<inner_type>.+)>\z/
179
+ inner_type = Regexp.last_match[:inner_type]
180
+ value.map { |v| _deserialize(inner_type, v) }
181
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
182
+ k_type = Regexp.last_match[:k_type]
183
+ v_type = Regexp.last_match[:v_type]
184
+ {}.tap do |hash|
185
+ value.each do |k, v|
186
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
187
+ end
188
+ end
189
+ else # model
190
+ # models (e.g. Pet) or oneOf
191
+ klass = TrinsicApi.const_get(type)
192
+ klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
193
+ end
194
+ end
195
+
196
+ # Returns the string representation of the object
197
+ # @return [String] String presentation of the object
198
+ def to_s
199
+ to_hash.to_s
200
+ end
201
+
202
+ # to_body is an alias to to_hash (backward compatibility)
203
+ # @return [Hash] Returns the object in the form of hash
204
+ def to_body
205
+ to_hash
206
+ end
207
+
208
+ # Returns the object in the form of hash
209
+ # @return [Hash] Returns the object in the form of hash
210
+ def to_hash
211
+ hash = {}
212
+ self.class.attribute_map.each_pair do |attr, param|
213
+ value = self.send(attr)
214
+ if value.nil?
215
+ is_nullable = self.class.openapi_nullable.include?(attr)
216
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
217
+ end
218
+
219
+ hash[param] = _to_hash(value)
220
+ end
221
+ hash
222
+ end
223
+
224
+ # Outputs non-array value in the form of hash
225
+ # For object, use to_hash. Otherwise, just return the value
226
+ # @param [Object] value Any valid value
227
+ # @return [Hash] Returns the value in the form of hash
228
+ def _to_hash(value)
229
+ if value.is_a?(Array)
230
+ value.compact.map { |v| _to_hash(v) }
231
+ elsif value.is_a?(Hash)
232
+ {}.tap do |hash|
233
+ value.each { |k, v| hash[k] = _to_hash(v) }
234
+ end
235
+ elsif value.respond_to? :to_hash
236
+ value.to_hash
237
+ else
238
+ value
239
+ end
240
+ end
241
+
242
+ end
243
+
244
+ end
@@ -14,14 +14,17 @@ require 'date'
14
14
  require 'time'
15
15
 
16
16
  module TrinsicApi
17
- class CreateAdvancedProviderSessionRequest
17
+ class CreateDirectProviderSessionRequest
18
18
  # The ID of the provider to launch
19
19
  attr_accessor :provider
20
20
 
21
+ # The ID of the Verification Profile to use for this session.
22
+ attr_accessor :verification_profile_id
23
+
21
24
  # The Redirect URL to which the user should be sent after the session is complete. This field is required for providers which employ a redirect-based flow.
22
25
  attr_accessor :redirect_url
23
26
 
24
- # The list of capabilities your integration supports. Capabilities are the core of Trinsic's whitelabel-with-optional-fallback offering. Most capabilities align with either an `IntegrationLaunchMethod` or an `IntegrationCollectionMethod`. The exception being refresh content to support updating the content of the launch method. For example, to support a basic redirect-based flow, you must include the `LaunchRedirect` and `CaptureRedirect` capabilities. To support a mobile deeplink / polling flow, you must include the `DeeplinkToMobile` and `PollForResults` capabilities. If `FallbackToHostedUi` is `true`, Trinsic will automatically fall back to a Trinsic-hosted UI to cover any gaps in your integration's capabilities. If `FallbackToHostedUi` is `false`, gaps in your integration's capabilities will result in an error during Session creation. Read more on how to integrate at <a href=\"https://docs.trinsic.id/docs/advanced-provider-sessions\">the guide on Advanced Provider Sessions</a>
27
+ # The list of capabilities your integration supports. Capabilities are the core of Trinsic's whitelabel-with-optional-fallback offering. Most capabilities align with either an `IntegrationLaunchMethod` or an `IntegrationCollectionMethod`. The exception being refresh content to support updating the content of the launch method. For example, to support a basic redirect-based flow, you must include the `LaunchRedirect` and `CaptureRedirect` capabilities. To support a mobile deeplink / polling flow, you must include the `DeeplinkToMobile` and `PollForResults` capabilities. If `FallbackToHostedUi` is `true`, Trinsic will automatically fall back to a Trinsic-hosted UI to cover any gaps in your integration's capabilities. If `FallbackToHostedUi` is `false`, gaps in your integration's capabilities will result in an error during Session creation. Read more on how to integrate at <a href=\"https://docs.trinsic.id/docs/direct-provider-sessions\">the guide on Direct Provider Sessions</a>
25
28
  attr_accessor :capabilities
26
29
 
27
30
  # Whether the session should fall back to a Trinsic-hosted UI in certain instances. Specifically, fallback will occur if any of the following are true: - You attempted to launch a provider which requires a capability you did not express support for - In this case, Trinsic's hosted UI will perform the necessary capability - You attempted to launch a provider which requires input, and the input was either not provided or incomplete - In this case, Trinsic's hosted UI will collect the necessary input from the user If fallback occurs, the session's NextStep will always be LaunchBrowser, and the CollectionMethod will always be CaptureRedirect. If this field is set to `true`, you must also: 1. Set the `RedirectUrl` field to a non-empty value 2. Include the `LaunchBrowser` and `CaptureRedirect` capabilities in the `Capabilities` field
@@ -34,6 +37,7 @@ module TrinsicApi
34
37
  def self.attribute_map
35
38
  {
36
39
  :'provider' => :'provider',
40
+ :'verification_profile_id' => :'verificationProfileId',
37
41
  :'redirect_url' => :'redirectUrl',
38
42
  :'capabilities' => :'capabilities',
39
43
  :'fallback_to_hosted_ui' => :'fallbackToHostedUI',
@@ -55,6 +59,7 @@ module TrinsicApi
55
59
  def self.openapi_types
56
60
  {
57
61
  :'provider' => :'String',
62
+ :'verification_profile_id' => :'String',
58
63
  :'redirect_url' => :'String',
59
64
  :'capabilities' => :'Array<IntegrationCapability>',
60
65
  :'fallback_to_hosted_ui' => :'Boolean',
@@ -75,14 +80,14 @@ module TrinsicApi
75
80
  # @param [Hash] attributes Model attributes in the form of hash
76
81
  def initialize(attributes = {})
77
82
  if (!attributes.is_a?(Hash))
78
- fail ArgumentError, "The input argument (attributes) must be a hash in `TrinsicApi::CreateAdvancedProviderSessionRequest` initialize method"
83
+ fail ArgumentError, "The input argument (attributes) must be a hash in `TrinsicApi::CreateDirectProviderSessionRequest` initialize method"
79
84
  end
80
85
 
81
86
  # check to see if the attribute exists and convert string to symbol for hash key
82
87
  acceptable_attribute_map = self.class.acceptable_attribute_map
83
88
  attributes = attributes.each_with_object({}) { |(k, v), h|
84
89
  if (!acceptable_attribute_map.key?(k.to_sym))
85
- fail ArgumentError, "`#{k}` is not a valid attribute in `TrinsicApi::CreateAdvancedProviderSessionRequest`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
90
+ fail ArgumentError, "`#{k}` is not a valid attribute in `TrinsicApi::CreateDirectProviderSessionRequest`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
86
91
  end
87
92
  h[k.to_sym] = v
88
93
  }
@@ -93,6 +98,12 @@ module TrinsicApi
93
98
  self.provider = nil
94
99
  end
95
100
 
101
+ if attributes.key?(:'verification_profile_id')
102
+ self.verification_profile_id = attributes[:'verification_profile_id']
103
+ else
104
+ self.verification_profile_id = nil
105
+ end
106
+
96
107
  if attributes.key?(:'redirect_url')
97
108
  self.redirect_url = attributes[:'redirect_url']
98
109
  end
@@ -127,6 +138,10 @@ module TrinsicApi
127
138
  invalid_properties.push('invalid value for "provider", the character length must be great than or equal to 1.')
128
139
  end
129
140
 
141
+ if @verification_profile_id.nil?
142
+ invalid_properties.push('invalid value for "verification_profile_id", verification_profile_id cannot be nil.')
143
+ end
144
+
130
145
  if @capabilities.nil?
131
146
  invalid_properties.push('invalid value for "capabilities", capabilities cannot be nil.')
132
147
  end
@@ -144,6 +159,7 @@ module TrinsicApi
144
159
  warn '[DEPRECATED] the `valid?` method is obsolete'
145
160
  return false if @provider.nil?
146
161
  return false if @provider.to_s.length < 1
162
+ return false if @verification_profile_id.nil?
147
163
  return false if @capabilities.nil?
148
164
  return false if @capabilities.length < 1
149
165
  true
@@ -163,6 +179,16 @@ module TrinsicApi
163
179
  @provider = provider
164
180
  end
165
181
 
182
+ # Custom attribute writer method with validation
183
+ # @param [Object] verification_profile_id Value to be assigned
184
+ def verification_profile_id=(verification_profile_id)
185
+ if verification_profile_id.nil?
186
+ fail ArgumentError, 'verification_profile_id cannot be nil'
187
+ end
188
+
189
+ @verification_profile_id = verification_profile_id
190
+ end
191
+
166
192
  # Custom attribute writer method with validation
167
193
  # @param [Object] capabilities Value to be assigned
168
194
  def capabilities=(capabilities)
@@ -183,6 +209,7 @@ module TrinsicApi
183
209
  return true if self.equal?(o)
184
210
  self.class == o.class &&
185
211
  provider == o.provider &&
212
+ verification_profile_id == o.verification_profile_id &&
186
213
  redirect_url == o.redirect_url &&
187
214
  capabilities == o.capabilities &&
188
215
  fallback_to_hosted_ui == o.fallback_to_hosted_ui &&
@@ -198,7 +225,7 @@ module TrinsicApi
198
225
  # Calculates hash code according to all attributes.
199
226
  # @return [Integer] Hash code
200
227
  def hash
201
- [provider, redirect_url, capabilities, fallback_to_hosted_ui, provider_input].hash
228
+ [provider, verification_profile_id, redirect_url, capabilities, fallback_to_hosted_ui, provider_input].hash
202
229
  end
203
230
 
204
231
  # Builds the object from hash