Class: MailSlurpClient::ConsentControllerApi
- Inherits:
-
Object
- Object
- MailSlurpClient::ConsentControllerApi
- Defined in:
- lib/mailslurp_client/api/consent_controller_api.rb
Instance Attribute Summary collapse
-
#api_client ⇒ Object
Returns the value of attribute api_client.
Instance Method Summary collapse
- #check_sending_consent_for_email_address(email_address, opts = {}) ⇒ OptInSendingConsentDto
-
#check_sending_consent_for_email_address_with_http_info(email_address, opts = {}) ⇒ Array<(OptInSendingConsentDto, Integer, Hash)>
OptInSendingConsentDto data, response status code and response headers.
- #get_opt_in_identities(opts = {}) ⇒ PageOptInIdentityProjection
-
#get_opt_in_identities_with_http_info(opts = {}) ⇒ Array<(PageOptInIdentityProjection, Integer, Hash)>
PageOptInIdentityProjection data, response status code and response headers.
-
#initialize(api_client = ApiClient.default) ⇒ ConsentControllerApi
constructor
A new instance of ConsentControllerApi.
- #revoke_opt_in_consent_for_email_address(email_address, opts = {}) ⇒ OptInSendingConsentDto
-
#revoke_opt_in_consent_for_email_address_with_http_info(email_address, opts = {}) ⇒ Array<(OptInSendingConsentDto, Integer, Hash)>
OptInSendingConsentDto data, response status code and response headers.
-
#send_opt_in_consent_for_email_address(opt_in_consent_options, opts = {}) ⇒ OptInConsentSendResult
Send a verification code to a user once they have explicitly submitted their email address Send double-opt in consent for an email address.
-
#send_opt_in_consent_for_email_address_with_http_info(opt_in_consent_options, opts = {}) ⇒ Array<(OptInConsentSendResult, Integer, Hash)>
Send a verification code to a user once they have explicitly submitted their email address Send double-opt in consent for an email address.
Constructor Details
#initialize(api_client = ApiClient.default) ⇒ ConsentControllerApi
Returns a new instance of ConsentControllerApi.
19 20 21 |
# File 'lib/mailslurp_client/api/consent_controller_api.rb', line 19 def initialize(api_client = ApiClient.default) @api_client = api_client end |
Instance Attribute Details
#api_client ⇒ Object
Returns the value of attribute api_client.
17 18 19 |
# File 'lib/mailslurp_client/api/consent_controller_api.rb', line 17 def api_client @api_client end |
Instance Method Details
#check_sending_consent_for_email_address(email_address, opts = {}) ⇒ OptInSendingConsentDto
25 26 27 28 |
# File 'lib/mailslurp_client/api/consent_controller_api.rb', line 25 def (email_address, opts = {}) data, _status_code, _headers = (email_address, opts) data end |
#check_sending_consent_for_email_address_with_http_info(email_address, opts = {}) ⇒ Array<(OptInSendingConsentDto, Integer, Hash)>
Returns OptInSendingConsentDto data, response status code and response headers.
33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 |
# File 'lib/mailslurp_client/api/consent_controller_api.rb', line 33 def (email_address, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: ConsentControllerApi.check_sending_consent_for_email_address ...' end # verify the required parameter 'email_address' is set if @api_client.config.client_side_validation && email_address.nil? fail ArgumentError, "Missing the required parameter 'email_address' when calling ConsentControllerApi.check_sending_consent_for_email_address" end # resource path local_var_path = '/consent/opt-in/sending-consent' # query parameters query_params = opts[:query_params] || {} query_params[:'emailAddress'] = email_address # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['*/*']) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:body] # return_type return_type = opts[:return_type] || 'OptInSendingConsentDto' # auth_names auth_names = opts[:auth_names] || ['API_KEY'] = opts.merge( :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: ConsentControllerApi#check_sending_consent_for_email_address\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#get_opt_in_identities(opts = {}) ⇒ PageOptInIdentityProjection
86 87 88 89 |
# File 'lib/mailslurp_client/api/consent_controller_api.rb', line 86 def get_opt_in_identities(opts = {}) data, _status_code, _headers = get_opt_in_identities_with_http_info(opts) data end |
#get_opt_in_identities_with_http_info(opts = {}) ⇒ Array<(PageOptInIdentityProjection, Integer, Hash)>
Returns PageOptInIdentityProjection data, response status code and response headers.
96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 |
# File 'lib/mailslurp_client/api/consent_controller_api.rb', line 96 def get_opt_in_identities_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: ConsentControllerApi.get_opt_in_identities ...' end allowable_values = ["ASC", "DESC"] if @api_client.config.client_side_validation && opts[:'sort'] && !allowable_values.include?(opts[:'sort']) fail ArgumentError, "invalid value for \"sort\", must be one of #{allowable_values}" end # resource path local_var_path = '/consent/opt-in' # query parameters query_params = opts[:query_params] || {} query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil? query_params[:'size'] = opts[:'size'] if !opts[:'size'].nil? query_params[:'sort'] = opts[:'sort'] if !opts[:'sort'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['*/*']) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:body] # return_type return_type = opts[:return_type] || 'PageOptInIdentityProjection' # auth_names auth_names = opts[:auth_names] || ['API_KEY'] = opts.merge( :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: ConsentControllerApi#get_opt_in_identities\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#revoke_opt_in_consent_for_email_address(email_address, opts = {}) ⇒ OptInSendingConsentDto
149 150 151 152 |
# File 'lib/mailslurp_client/api/consent_controller_api.rb', line 149 def (email_address, opts = {}) data, _status_code, _headers = (email_address, opts) data end |
#revoke_opt_in_consent_for_email_address_with_http_info(email_address, opts = {}) ⇒ Array<(OptInSendingConsentDto, Integer, Hash)>
Returns OptInSendingConsentDto data, response status code and response headers.
157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 |
# File 'lib/mailslurp_client/api/consent_controller_api.rb', line 157 def (email_address, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: ConsentControllerApi.revoke_opt_in_consent_for_email_address ...' end # verify the required parameter 'email_address' is set if @api_client.config.client_side_validation && email_address.nil? fail ArgumentError, "Missing the required parameter 'email_address' when calling ConsentControllerApi.revoke_opt_in_consent_for_email_address" end # resource path local_var_path = '/consent/opt-in' # query parameters query_params = opts[:query_params] || {} query_params[:'emailAddress'] = email_address # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['*/*']) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:body] # return_type return_type = opts[:return_type] || 'OptInSendingConsentDto' # auth_names auth_names = opts[:auth_names] || ['API_KEY'] = opts.merge( :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: ConsentControllerApi#revoke_opt_in_consent_for_email_address\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#send_opt_in_consent_for_email_address(opt_in_consent_options, opts = {}) ⇒ OptInConsentSendResult
Send a verification code to a user once they have explicitly submitted their email address Send double-opt in consent for an email address
210 211 212 213 |
# File 'lib/mailslurp_client/api/consent_controller_api.rb', line 210 def (, opts = {}) data, _status_code, _headers = (, opts) data end |
#send_opt_in_consent_for_email_address_with_http_info(opt_in_consent_options, opts = {}) ⇒ Array<(OptInConsentSendResult, Integer, Hash)>
Send a verification code to a user once they have explicitly submitted their email address Send double-opt in consent for an email address
220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 |
# File 'lib/mailslurp_client/api/consent_controller_api.rb', line 220 def (, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: ConsentControllerApi.send_opt_in_consent_for_email_address ...' end # verify the required parameter 'opt_in_consent_options' is set if @api_client.config.client_side_validation && .nil? fail ArgumentError, "Missing the required parameter 'opt_in_consent_options' when calling ConsentControllerApi.send_opt_in_consent_for_email_address" end # resource path local_var_path = '/consent/opt-in/send' # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['*/*']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:body] || @api_client.object_to_http_body() # return_type return_type = opts[:return_type] || 'OptInConsentSendResult' # auth_names auth_names = opts[:auth_names] || ['API_KEY'] = opts.merge( :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:POST, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: ConsentControllerApi#send_opt_in_consent_for_email_address\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |