Class: KlaviyoAPI::TextMessagingApi
- Inherits:
-
Object
- Object
- KlaviyoAPI::TextMessagingApi
- Defined in:
- lib/klaviyo-api-sdk/api/text_messaging_api.rb
Instance Attribute Summary collapse
-
#api_client ⇒ Object
Returns the value of attribute api_client.
Instance Method Summary collapse
-
#create_text_messaging_configuration(text_messaging_configuration_create_query, opts = {}) ⇒ Hash<String, Object>
Create Text Messaging Configuration Create the SMS account for the calling company.
Rate limits:
Burst:1/s<br>Steady:15/mScopes:sender-config:writeOpenAPI Spec. -
#create_text_messaging_configuration_with_http_info(text_messaging_configuration_create_query, opts = {}) ⇒ Array<(Hash<String, Object>, Integer, Hash)>
Create Text Messaging Configuration Create the SMS account for the calling company.<br><br>Rate limits:<br>Burst: `1/s`<br>Steady: `15/m` Scopes: `sender-config:write` OpenAPI Spec.
-
#create_text_messaging_sender(text_messaging_sender_create_query, opts = {}) ⇒ Hash<String, Object>
Create Text Messaging Sender Create a sender and submit its initial registration.
-
#create_text_messaging_sender_registration(text_messaging_sender_registration_create_query, opts = {}) ⇒ Hash<String, Object>
Create Text Messaging Sender Registration Submit a new registration for an existing sender (resubmission).
Rate limits:
Burst:1/s<br>Steady:15/mScopes:sender-config:writeOpenAPI Spec. -
#create_text_messaging_sender_registration_with_http_info(text_messaging_sender_registration_create_query, opts = {}) ⇒ Array<(Hash<String, Object>, Integer, Hash)>
Create Text Messaging Sender Registration Submit a new registration for an existing sender (resubmission).<br><br>Rate limits:<br>Burst: `1/s`<br>Steady: `15/m` Scopes: `sender-config:write` OpenAPI Spec.
-
#create_text_messaging_sender_with_http_info(text_messaging_sender_create_query, opts = {}) ⇒ Array<(Hash<String, Object>, Integer, Hash)>
Create Text Messaging Sender Create a sender and submit its initial registration.
-
#get_messaging_sender_registration_for_text_messaging_sender(id, opts = {}) ⇒ Hash<String, Object>
(also: #get_text_messaging_sender_messaging_sender_registration)
Get Messaging Sender Registration for Text Messaging Sender Return the most-recent registration for the given sender.
Rate limits:
Burst:3/s<br>Steady:60/mScopes:sender-config:readOpenAPI Spec. -
#get_messaging_sender_registration_for_text_messaging_sender_with_http_info(id, opts = {}) ⇒ Array<(Hash<String, Object>, Integer, Hash)>
(also: #get_text_messaging_sender_messaging_sender_registration_with_http_info)
Get Messaging Sender Registration for Text Messaging Sender Return the most-recent registration for the given sender.<br><br>Rate limits:<br>Burst: `3/s`<br>Steady: `60/m` Scopes: `sender-config:read` OpenAPI Spec.
-
#get_messaging_sender_registration_id_for_text_messaging_sender(id, opts = {}) ⇒ Hash<String, Object>
(also: #get_text_messaging_sender_relationships_messaging_sender_registration)
Get Messaging Sender Registration ID for Text Messaging Sender Return the most-recent registration for the given sender.
Rate limits:
Burst:3/s<br>Steady:60/mScopes:sender-config:readOpenAPI Spec. -
#get_messaging_sender_registration_id_for_text_messaging_sender_with_http_info(id, opts = {}) ⇒ Array<(Hash<String, Object>, Integer, Hash)>
(also: #get_text_messaging_sender_relationships_messaging_sender_registration_with_http_info)
Get Messaging Sender Registration ID for Text Messaging Sender Return the most-recent registration for the given sender.<br><br>Rate limits:<br>Burst: `3/s`<br>Steady: `60/m` Scopes: `sender-config:read` OpenAPI Spec.
-
#get_text_messaging_configuration(id, opts = {}) ⇒ Hash<String, Object>
Get Text Messaging Configuration Retrieve the SMS account for the calling company.
Rate limits:
Burst:3/s<br>Steady:60/mScopes:sender-config:readOpenAPI Spec. -
#get_text_messaging_configuration_with_http_info(id, opts = {}) ⇒ Array<(Hash<String, Object>, Integer, Hash)>
Get Text Messaging Configuration Retrieve the SMS account for the calling company.<br><br>Rate limits:<br>Burst: `3/s`<br>Steady: `60/m` Scopes: `sender-config:read` OpenAPI Spec.
-
#get_text_messaging_sender(id, opts = {}) ⇒ Hash<String, Object>
Get Text Messaging Sender Retrieve a single text-messaging sender by ID.
Rate limits:
Burst:3/s<br>Steady:60/mScopes:sender-config:readOpenAPI Spec. -
#get_text_messaging_sender_registration(id, opts = {}) ⇒ Hash<String, Object>
Get Text Messaging Sender Registration Retrieve a sender registration by ID.
Rate limits:
Burst:3/s<br>Steady:60/mScopes:sender-config:readOpenAPI Spec. -
#get_text_messaging_sender_registration_with_http_info(id, opts = {}) ⇒ Array<(Hash<String, Object>, Integer, Hash)>
Get Text Messaging Sender Registration Retrieve a sender registration by ID.<br><br>Rate limits:<br>Burst: `3/s`<br>Steady: `60/m` Scopes: `sender-config:read` OpenAPI Spec.
-
#get_text_messaging_sender_with_http_info(id, opts = {}) ⇒ Array<(Hash<String, Object>, Integer, Hash)>
Get Text Messaging Sender Retrieve a single text-messaging sender by ID.<br><br>Rate limits:<br>Burst: `3/s`<br>Steady: `60/m` Scopes: `sender-config:read` OpenAPI Spec.
-
#get_text_messaging_senders(opts = {}) ⇒ Hash<String, Object>
Get Text Messaging Senders List the calling company's text-messaging senders.
Rate limits:
Burst:3/s<br>Steady:60/mScopes:sender-config:readOpenAPI Spec. -
#get_text_messaging_senders_with_http_info(opts = {}) ⇒ Array<(Hash<String, Object>, Integer, Hash)>
Get Text Messaging Senders List the calling company's text-messaging senders.<br><br>Rate limits:<br>Burst: `3/s`<br>Steady: `60/m` Scopes: `sender-config:read` OpenAPI Spec.
-
#initialize(api_client = ApiClient.default) ⇒ TextMessagingApi
constructor
A new instance of TextMessagingApi.
Constructor Details
#initialize(api_client = ApiClient.default) ⇒ TextMessagingApi
Returns a new instance of TextMessagingApi.
18 19 20 |
# File 'lib/klaviyo-api-sdk/api/text_messaging_api.rb', line 18 def initialize(api_client = ApiClient.default) @api_client = api_client end |
Instance Attribute Details
#api_client ⇒ Object
Returns the value of attribute api_client.
16 17 18 |
# File 'lib/klaviyo-api-sdk/api/text_messaging_api.rb', line 16 def api_client @api_client end |
Instance Method Details
#create_text_messaging_configuration(text_messaging_configuration_create_query, opts = {}) ⇒ Hash<String, Object>
Create Text Messaging Configuration
Create the SMS account for the calling company.
Rate limits:
Burst: 1/s<br>Steady: 15/m Scopes: sender-config:write OpenAPI Spec
27 28 29 30 |
# File 'lib/klaviyo-api-sdk/api/text_messaging_api.rb', line 27 def create_text_messaging_configuration(text_messaging_configuration_create_query, opts = {}) data, _status_code, _headers = create_text_messaging_configuration_with_http_info(text_messaging_configuration_create_query, opts) data end |
#create_text_messaging_configuration_with_http_info(text_messaging_configuration_create_query, opts = {}) ⇒ Array<(Hash<String, Object>, Integer, Hash)>
Create Text Messaging Configuration Create the SMS account for the calling company.<br><br>Rate limits:<br>Burst: `1/s`<br>Steady: `15/m` Scopes: `sender-config:write` OpenAPI Spec
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 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 |
# File 'lib/klaviyo-api-sdk/api/text_messaging_api.rb', line 38 def create_text_messaging_configuration_with_http_info(text_messaging_configuration_create_query, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: TextMessagingApi.create_text_messaging_configuration ...' end # verify the required parameter 'text_messaging_configuration_create_query' is set if @api_client.config.client_side_validation && text_messaging_configuration_create_query.nil? fail ArgumentError, "Missing the required parameter 'text_messaging_configuration_create_query' when calling TextMessagingApi.create_text_messaging_configuration" end allowable_values = ["created_at", "id", "opt_out_language", "org_prefix", "status", "updated_at"] if @api_client.config.client_side_validation && opts[:'fields_text_messaging_configuration'] && !opts[:'fields_text_messaging_configuration'].all? { |item| allowable_values.include?(item) } fail ArgumentError, "invalid value for \"fields_text_messaging_configuration\", must include one of #{allowable_values}" end # resource path local_var_path = '/api/text-messaging-configurations' # query parameters query_params = opts[:query_params] || {} query_params[:'fields[text-messaging-configuration]'] = @api_client.build_collection_param(opts[:'fields_text_messaging_configuration'], :csv) if !opts[:'fields_text_messaging_configuration'].nil? # header parameters header_params = opts[:header_params] || {} # klaviyo api revision header_params['revision'] = ENV['KLAVIYO_API_REVISION'] || ENV['API_REVISION'] || "2026-10-15" # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/vnd.api+json']) # HTTP header 'Content-Type' content_type = @api_client.select_header_content_type(['application/vnd.api+json']) if !content_type.nil? header_params['Content-Type'] = content_type end # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] || @api_client.object_to_http_body(text_messaging_configuration_create_query) # return_type return_type = opts[:debug_return_type] || 'Hash<String, Object>' # auth_names auth_names = opts[:debug_auth_names] || ['Klaviyo-API-Key', 'OAuth'] = opts.merge( :operation => :"TextMessagingApi.create_text_messaging_configuration", :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: TextMessagingApi#create_text_messaging_configuration\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#create_text_messaging_sender(text_messaging_sender_create_query, opts = {}) ⇒ Hash<String, Object>
Create Text Messaging Sender
Create a sender and submit its initial registration. A toll-free number is provisioned in all supported regions (US + CA), so the response is the sender for the requested country and the sibling-region sender also appears in list/retrieve.
Rate limits:
Burst: 1/s<br>Steady: 15/m Scopes: sender-config:write OpenAPI Spec
106 107 108 109 |
# File 'lib/klaviyo-api-sdk/api/text_messaging_api.rb', line 106 def create_text_messaging_sender(text_messaging_sender_create_query, opts = {}) data, _status_code, _headers = create_text_messaging_sender_with_http_info(text_messaging_sender_create_query, opts) data end |
#create_text_messaging_sender_registration(text_messaging_sender_registration_create_query, opts = {}) ⇒ Hash<String, Object>
Create Text Messaging Sender Registration
Submit a new registration for an existing sender (resubmission).
Rate limits:
Burst: 1/s<br>Steady: 15/m Scopes: sender-config:write OpenAPI Spec
197 198 199 200 |
# File 'lib/klaviyo-api-sdk/api/text_messaging_api.rb', line 197 def create_text_messaging_sender_registration(text_messaging_sender_registration_create_query, opts = {}) data, _status_code, _headers = create_text_messaging_sender_registration_with_http_info(text_messaging_sender_registration_create_query, opts) data end |
#create_text_messaging_sender_registration_with_http_info(text_messaging_sender_registration_create_query, opts = {}) ⇒ Array<(Hash<String, Object>, Integer, Hash)>
Create Text Messaging Sender Registration Submit a new registration for an existing sender (resubmission).<br><br>Rate limits:<br>Burst: `1/s`<br>Steady: `15/m` Scopes: `sender-config:write` OpenAPI Spec
210 211 212 213 214 215 216 217 218 219 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 268 269 270 271 272 273 274 275 276 277 278 |
# File 'lib/klaviyo-api-sdk/api/text_messaging_api.rb', line 210 def create_text_messaging_sender_registration_with_http_info(text_messaging_sender_registration_create_query, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: TextMessagingApi.create_text_messaging_sender_registration ...' end # verify the required parameter 'text_messaging_sender_registration_create_query' is set if @api_client.config.client_side_validation && text_messaging_sender_registration_create_query.nil? fail ArgumentError, "Missing the required parameter 'text_messaging_sender_registration_create_query' when calling TextMessagingApi.create_text_messaging_sender_registration" end allowable_values = ["created_at", "decided_at", "failures", "id", "status", "submitted_at", "updated_at"] if @api_client.config.client_side_validation && opts[:'fields_text_messaging_sender_registration'] && !opts[:'fields_text_messaging_sender_registration'].all? { |item| allowable_values.include?(item) } fail ArgumentError, "invalid value for \"fields_text_messaging_sender_registration\", must include one of #{allowable_values}" end allowable_values = ["created_at", "forwarding_number", "id", "sender_details", "sender_details.country", "sender_identifier", "sender_type", "status"] if @api_client.config.client_side_validation && opts[:'fields_text_messaging_sender'] && !opts[:'fields_text_messaging_sender'].all? { |item| allowable_values.include?(item) } fail ArgumentError, "invalid value for \"fields_text_messaging_sender\", must include one of #{allowable_values}" end allowable_values = ["text-messaging-sender"] if @api_client.config.client_side_validation && opts[:'include'] && !opts[:'include'].all? { |item| allowable_values.include?(item) } fail ArgumentError, "invalid value for \"include\", must include one of #{allowable_values}" end # resource path local_var_path = '/api/text-messaging-sender-registrations' # query parameters query_params = opts[:query_params] || {} query_params[:'fields[text-messaging-sender-registration]'] = @api_client.build_collection_param(opts[:'fields_text_messaging_sender_registration'], :csv) if !opts[:'fields_text_messaging_sender_registration'].nil? query_params[:'fields[text-messaging-sender]'] = @api_client.build_collection_param(opts[:'fields_text_messaging_sender'], :csv) if !opts[:'fields_text_messaging_sender'].nil? query_params[:'include'] = @api_client.build_collection_param(opts[:'include'], :csv) if !opts[:'include'].nil? # header parameters header_params = opts[:header_params] || {} # klaviyo api revision header_params['revision'] = ENV['KLAVIYO_API_REVISION'] || ENV['API_REVISION'] || "2026-10-15" # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/vnd.api+json']) # HTTP header 'Content-Type' content_type = @api_client.select_header_content_type(['application/vnd.api+json']) if !content_type.nil? header_params['Content-Type'] = content_type end # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] || @api_client.object_to_http_body(text_messaging_sender_registration_create_query) # return_type return_type = opts[:debug_return_type] || 'Hash<String, Object>' # auth_names auth_names = opts[:debug_auth_names] || ['Klaviyo-API-Key', 'OAuth'] = opts.merge( :operation => :"TextMessagingApi.create_text_messaging_sender_registration", :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: TextMessagingApi#create_text_messaging_sender_registration\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#create_text_messaging_sender_with_http_info(text_messaging_sender_create_query, opts = {}) ⇒ Array<(Hash<String, Object>, Integer, Hash)>
Create Text Messaging Sender Create a sender and submit its initial registration. A toll-free number is provisioned in all supported regions (US + CA), so the response is the sender for the requested country and the sibling-region sender also appears in list/retrieve.<br><br>Rate limits:<br>Burst: `1/s`<br>Steady: `15/m` Scopes: `sender-config:write` OpenAPI Spec
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 145 146 147 148 149 150 151 152 153 154 155 156 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 |
# File 'lib/klaviyo-api-sdk/api/text_messaging_api.rb', line 119 def create_text_messaging_sender_with_http_info(text_messaging_sender_create_query, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: TextMessagingApi.create_text_messaging_sender ...' end # verify the required parameter 'text_messaging_sender_create_query' is set if @api_client.config.client_side_validation && text_messaging_sender_create_query.nil? fail ArgumentError, "Missing the required parameter 'text_messaging_sender_create_query' when calling TextMessagingApi.create_text_messaging_sender" end allowable_values = ["created_at", "decided_at", "failures", "id", "status", "submitted_at", "updated_at"] if @api_client.config.client_side_validation && opts[:'fields_text_messaging_sender_registration'] && !opts[:'fields_text_messaging_sender_registration'].all? { |item| allowable_values.include?(item) } fail ArgumentError, "invalid value for \"fields_text_messaging_sender_registration\", must include one of #{allowable_values}" end allowable_values = ["created_at", "forwarding_number", "id", "sender_details", "sender_details.country", "sender_identifier", "sender_type", "status"] if @api_client.config.client_side_validation && opts[:'fields_text_messaging_sender'] && !opts[:'fields_text_messaging_sender'].all? { |item| allowable_values.include?(item) } fail ArgumentError, "invalid value for \"fields_text_messaging_sender\", must include one of #{allowable_values}" end allowable_values = ["text-messaging-sender-registration"] if @api_client.config.client_side_validation && opts[:'include'] && !opts[:'include'].all? { |item| allowable_values.include?(item) } fail ArgumentError, "invalid value for \"include\", must include one of #{allowable_values}" end # resource path local_var_path = '/api/text-messaging-senders' # query parameters query_params = opts[:query_params] || {} query_params[:'fields[text-messaging-sender-registration]'] = @api_client.build_collection_param(opts[:'fields_text_messaging_sender_registration'], :csv) if !opts[:'fields_text_messaging_sender_registration'].nil? query_params[:'fields[text-messaging-sender]'] = @api_client.build_collection_param(opts[:'fields_text_messaging_sender'], :csv) if !opts[:'fields_text_messaging_sender'].nil? query_params[:'include'] = @api_client.build_collection_param(opts[:'include'], :csv) if !opts[:'include'].nil? # header parameters header_params = opts[:header_params] || {} # klaviyo api revision header_params['revision'] = ENV['KLAVIYO_API_REVISION'] || ENV['API_REVISION'] || "2026-10-15" # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/vnd.api+json']) # HTTP header 'Content-Type' content_type = @api_client.select_header_content_type(['application/vnd.api+json']) if !content_type.nil? header_params['Content-Type'] = content_type end # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] || @api_client.object_to_http_body(text_messaging_sender_create_query) # return_type return_type = opts[:debug_return_type] || 'Hash<String, Object>' # auth_names auth_names = opts[:debug_auth_names] || ['Klaviyo-API-Key', 'OAuth'] = opts.merge( :operation => :"TextMessagingApi.create_text_messaging_sender", :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: TextMessagingApi#create_text_messaging_sender\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#get_messaging_sender_registration_for_text_messaging_sender(id, opts = {}) ⇒ Hash<String, Object> Also known as: get_text_messaging_sender_messaging_sender_registration
Get Messaging Sender Registration for Text Messaging Sender
Return the most-recent registration for the given sender.
Rate limits:
Burst: 3/s<br>Steady: 60/m Scopes: sender-config:read OpenAPI Spec
286 287 288 289 |
# File 'lib/klaviyo-api-sdk/api/text_messaging_api.rb', line 286 def get_messaging_sender_registration_for_text_messaging_sender(id, opts = {}) data, _status_code, _headers = get_messaging_sender_registration_for_text_messaging_sender_with_http_info(id, opts) data end |
#get_messaging_sender_registration_for_text_messaging_sender_with_http_info(id, opts = {}) ⇒ Array<(Hash<String, Object>, Integer, Hash)> Also known as: get_text_messaging_sender_messaging_sender_registration_with_http_info
Get Messaging Sender Registration for Text Messaging Sender Return the most-recent registration for the given sender.<br><br>Rate limits:<br>Burst: `3/s`<br>Steady: `60/m` Scopes: `sender-config:read` OpenAPI Spec
300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 |
# File 'lib/klaviyo-api-sdk/api/text_messaging_api.rb', line 300 def get_messaging_sender_registration_for_text_messaging_sender_with_http_info(id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: TextMessagingApi.get_messaging_sender_registration_for_text_messaging_sender ...' end # verify the required parameter 'id' is set if @api_client.config.client_side_validation && id.nil? fail ArgumentError, "Missing the required parameter 'id' when calling TextMessagingApi.get_messaging_sender_registration_for_text_messaging_sender" end allowable_values = ["created_at", "decided_at", "failures", "id", "status", "submitted_at", "updated_at"] if @api_client.config.client_side_validation && opts[:'fields_text_messaging_sender_registration'] && !opts[:'fields_text_messaging_sender_registration'].all? { |item| allowable_values.include?(item) } fail ArgumentError, "invalid value for \"fields_text_messaging_sender_registration\", must include one of #{allowable_values}" end # resource path local_var_path = '/api/text-messaging-senders/{id}/text-messaging-sender-registration'.sub('{' + 'id' + '}', CGI.escape(id.to_s)) # query parameters query_params = opts[:query_params] || {} query_params[:'fields[text-messaging-sender-registration]'] = @api_client.build_collection_param(opts[:'fields_text_messaging_sender_registration'], :csv) if !opts[:'fields_text_messaging_sender_registration'].nil? # header parameters header_params = opts[:header_params] || {} # klaviyo api revision header_params['revision'] = ENV['KLAVIYO_API_REVISION'] || ENV['API_REVISION'] || "2026-10-15" # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/vnd.api+json']) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'Hash<String, Object>' # auth_names auth_names = opts[:debug_auth_names] || ['Klaviyo-API-Key', 'OAuth'] = opts.merge( :operation => :"TextMessagingApi.get_messaging_sender_registration_for_text_messaging_sender", :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: TextMessagingApi#get_messaging_sender_registration_for_text_messaging_sender\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#get_messaging_sender_registration_id_for_text_messaging_sender(id, opts = {}) ⇒ Hash<String, Object> Also known as: get_text_messaging_sender_relationships_messaging_sender_registration
Get Messaging Sender Registration ID for Text Messaging Sender
Return the most-recent registration for the given sender.
Rate limits:
Burst: 3/s<br>Steady: 60/m Scopes: sender-config:read OpenAPI Spec
363 364 365 366 |
# File 'lib/klaviyo-api-sdk/api/text_messaging_api.rb', line 363 def get_messaging_sender_registration_id_for_text_messaging_sender(id, opts = {}) data, _status_code, _headers = get_messaging_sender_registration_id_for_text_messaging_sender_with_http_info(id, opts) data end |
#get_messaging_sender_registration_id_for_text_messaging_sender_with_http_info(id, opts = {}) ⇒ Array<(Hash<String, Object>, Integer, Hash)> Also known as: get_text_messaging_sender_relationships_messaging_sender_registration_with_http_info
Get Messaging Sender Registration ID for Text Messaging Sender Return the most-recent registration for the given sender.<br><br>Rate limits:<br>Burst: `3/s`<br>Steady: `60/m` Scopes: `sender-config:read` OpenAPI Spec
376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 |
# File 'lib/klaviyo-api-sdk/api/text_messaging_api.rb', line 376 def get_messaging_sender_registration_id_for_text_messaging_sender_with_http_info(id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: TextMessagingApi.get_messaging_sender_registration_id_for_text_messaging_sender ...' end # verify the required parameter 'id' is set if @api_client.config.client_side_validation && id.nil? fail ArgumentError, "Missing the required parameter 'id' when calling TextMessagingApi.get_messaging_sender_registration_id_for_text_messaging_sender" end # resource path local_var_path = '/api/text-messaging-senders/{id}/relationships/text-messaging-sender-registration'.sub('{' + 'id' + '}', CGI.escape(id.to_s)) # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # klaviyo api revision header_params['revision'] = ENV['KLAVIYO_API_REVISION'] || ENV['API_REVISION'] || "2026-10-15" # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/vnd.api+json']) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'Hash<String, Object>' # auth_names auth_names = opts[:debug_auth_names] || ['Klaviyo-API-Key', 'OAuth'] = opts.merge( :operation => :"TextMessagingApi.get_messaging_sender_registration_id_for_text_messaging_sender", :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: TextMessagingApi#get_messaging_sender_registration_id_for_text_messaging_sender\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#get_text_messaging_configuration(id, opts = {}) ⇒ Hash<String, Object>
Get Text Messaging Configuration
Retrieve the SMS account for the calling company.
Rate limits:
Burst: 3/s<br>Steady: 60/m Scopes: sender-config:read OpenAPI Spec
435 436 437 438 |
# File 'lib/klaviyo-api-sdk/api/text_messaging_api.rb', line 435 def get_text_messaging_configuration(id, opts = {}) data, _status_code, _headers = get_text_messaging_configuration_with_http_info(id, opts) data end |
#get_text_messaging_configuration_with_http_info(id, opts = {}) ⇒ Array<(Hash<String, Object>, Integer, Hash)>
Get Text Messaging Configuration Retrieve the SMS account for the calling company.<br><br>Rate limits:<br>Burst: `3/s`<br>Steady: `60/m` Scopes: `sender-config:read` OpenAPI Spec
446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 |
# File 'lib/klaviyo-api-sdk/api/text_messaging_api.rb', line 446 def get_text_messaging_configuration_with_http_info(id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: TextMessagingApi.get_text_messaging_configuration ...' end # verify the required parameter 'id' is set if @api_client.config.client_side_validation && id.nil? fail ArgumentError, "Missing the required parameter 'id' when calling TextMessagingApi.get_text_messaging_configuration" end allowable_values = ["created_at", "id", "opt_out_language", "org_prefix", "status", "updated_at"] if @api_client.config.client_side_validation && opts[:'fields_text_messaging_configuration'] && !opts[:'fields_text_messaging_configuration'].all? { |item| allowable_values.include?(item) } fail ArgumentError, "invalid value for \"fields_text_messaging_configuration\", must include one of #{allowable_values}" end # resource path local_var_path = '/api/text-messaging-configurations/{id}'.sub('{' + 'id' + '}', CGI.escape(id.to_s)) # query parameters query_params = opts[:query_params] || {} query_params[:'fields[text-messaging-configuration]'] = @api_client.build_collection_param(opts[:'fields_text_messaging_configuration'], :csv) if !opts[:'fields_text_messaging_configuration'].nil? # header parameters header_params = opts[:header_params] || {} # klaviyo api revision header_params['revision'] = ENV['KLAVIYO_API_REVISION'] || ENV['API_REVISION'] || "2026-10-15" # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/vnd.api+json']) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'Hash<String, Object>' # auth_names auth_names = opts[:debug_auth_names] || ['Klaviyo-API-Key', 'OAuth'] = opts.merge( :operation => :"TextMessagingApi.get_text_messaging_configuration", :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: TextMessagingApi#get_text_messaging_configuration\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#get_text_messaging_sender(id, opts = {}) ⇒ Hash<String, Object>
Get Text Messaging Sender
Retrieve a single text-messaging sender by ID.
Rate limits:
Burst: 3/s<br>Steady: 60/m Scopes: sender-config:read OpenAPI Spec
509 510 511 512 |
# File 'lib/klaviyo-api-sdk/api/text_messaging_api.rb', line 509 def get_text_messaging_sender(id, opts = {}) data, _status_code, _headers = get_text_messaging_sender_with_http_info(id, opts) data end |
#get_text_messaging_sender_registration(id, opts = {}) ⇒ Hash<String, Object>
Get Text Messaging Sender Registration
Retrieve a sender registration by ID.
Rate limits:
Burst: 3/s<br>Steady: 60/m Scopes: sender-config:read OpenAPI Spec
595 596 597 598 |
# File 'lib/klaviyo-api-sdk/api/text_messaging_api.rb', line 595 def get_text_messaging_sender_registration(id, opts = {}) data, _status_code, _headers = get_text_messaging_sender_registration_with_http_info(id, opts) data end |
#get_text_messaging_sender_registration_with_http_info(id, opts = {}) ⇒ Array<(Hash<String, Object>, Integer, Hash)>
Get Text Messaging Sender Registration Retrieve a sender registration by ID.<br><br>Rate limits:<br>Burst: `3/s`<br>Steady: `60/m` Scopes: `sender-config:read` OpenAPI Spec
608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 |
# File 'lib/klaviyo-api-sdk/api/text_messaging_api.rb', line 608 def get_text_messaging_sender_registration_with_http_info(id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: TextMessagingApi.get_text_messaging_sender_registration ...' end # verify the required parameter 'id' is set if @api_client.config.client_side_validation && id.nil? fail ArgumentError, "Missing the required parameter 'id' when calling TextMessagingApi.get_text_messaging_sender_registration" end allowable_values = ["created_at", "decided_at", "failures", "id", "status", "submitted_at", "updated_at"] if @api_client.config.client_side_validation && opts[:'fields_text_messaging_sender_registration'] && !opts[:'fields_text_messaging_sender_registration'].all? { |item| allowable_values.include?(item) } fail ArgumentError, "invalid value for \"fields_text_messaging_sender_registration\", must include one of #{allowable_values}" end allowable_values = ["created_at", "forwarding_number", "id", "sender_details", "sender_details.country", "sender_identifier", "sender_type", "status"] if @api_client.config.client_side_validation && opts[:'fields_text_messaging_sender'] && !opts[:'fields_text_messaging_sender'].all? { |item| allowable_values.include?(item) } fail ArgumentError, "invalid value for \"fields_text_messaging_sender\", must include one of #{allowable_values}" end allowable_values = ["text-messaging-sender"] if @api_client.config.client_side_validation && opts[:'include'] && !opts[:'include'].all? { |item| allowable_values.include?(item) } fail ArgumentError, "invalid value for \"include\", must include one of #{allowable_values}" end # resource path local_var_path = '/api/text-messaging-sender-registrations/{id}'.sub('{' + 'id' + '}', CGI.escape(id.to_s)) # query parameters query_params = opts[:query_params] || {} query_params[:'fields[text-messaging-sender-registration]'] = @api_client.build_collection_param(opts[:'fields_text_messaging_sender_registration'], :csv) if !opts[:'fields_text_messaging_sender_registration'].nil? query_params[:'fields[text-messaging-sender]'] = @api_client.build_collection_param(opts[:'fields_text_messaging_sender'], :csv) if !opts[:'fields_text_messaging_sender'].nil? query_params[:'include'] = @api_client.build_collection_param(opts[:'include'], :csv) if !opts[:'include'].nil? # header parameters header_params = opts[:header_params] || {} # klaviyo api revision header_params['revision'] = ENV['KLAVIYO_API_REVISION'] || ENV['API_REVISION'] || "2026-10-15" # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/vnd.api+json']) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'Hash<String, Object>' # auth_names auth_names = opts[:debug_auth_names] || ['Klaviyo-API-Key', 'OAuth'] = opts.merge( :operation => :"TextMessagingApi.get_text_messaging_sender_registration", :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: TextMessagingApi#get_text_messaging_sender_registration\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#get_text_messaging_sender_with_http_info(id, opts = {}) ⇒ Array<(Hash<String, Object>, Integer, Hash)>
Get Text Messaging Sender Retrieve a single text-messaging sender by ID.<br><br>Rate limits:<br>Burst: `3/s`<br>Steady: `60/m` Scopes: `sender-config:read` OpenAPI Spec
522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 |
# File 'lib/klaviyo-api-sdk/api/text_messaging_api.rb', line 522 def get_text_messaging_sender_with_http_info(id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: TextMessagingApi.get_text_messaging_sender ...' end # verify the required parameter 'id' is set if @api_client.config.client_side_validation && id.nil? fail ArgumentError, "Missing the required parameter 'id' when calling TextMessagingApi.get_text_messaging_sender" end allowable_values = ["created_at", "decided_at", "failures", "id", "status", "submitted_at", "updated_at"] if @api_client.config.client_side_validation && opts[:'fields_text_messaging_sender_registration'] && !opts[:'fields_text_messaging_sender_registration'].all? { |item| allowable_values.include?(item) } fail ArgumentError, "invalid value for \"fields_text_messaging_sender_registration\", must include one of #{allowable_values}" end allowable_values = ["created_at", "forwarding_number", "id", "sender_details", "sender_details.country", "sender_identifier", "sender_type", "status"] if @api_client.config.client_side_validation && opts[:'fields_text_messaging_sender'] && !opts[:'fields_text_messaging_sender'].all? { |item| allowable_values.include?(item) } fail ArgumentError, "invalid value for \"fields_text_messaging_sender\", must include one of #{allowable_values}" end allowable_values = ["text-messaging-sender-registration"] if @api_client.config.client_side_validation && opts[:'include'] && !opts[:'include'].all? { |item| allowable_values.include?(item) } fail ArgumentError, "invalid value for \"include\", must include one of #{allowable_values}" end # resource path local_var_path = '/api/text-messaging-senders/{id}'.sub('{' + 'id' + '}', CGI.escape(id.to_s)) # query parameters query_params = opts[:query_params] || {} query_params[:'fields[text-messaging-sender-registration]'] = @api_client.build_collection_param(opts[:'fields_text_messaging_sender_registration'], :csv) if !opts[:'fields_text_messaging_sender_registration'].nil? query_params[:'fields[text-messaging-sender]'] = @api_client.build_collection_param(opts[:'fields_text_messaging_sender'], :csv) if !opts[:'fields_text_messaging_sender'].nil? query_params[:'include'] = @api_client.build_collection_param(opts[:'include'], :csv) if !opts[:'include'].nil? # header parameters header_params = opts[:header_params] || {} # klaviyo api revision header_params['revision'] = ENV['KLAVIYO_API_REVISION'] || ENV['API_REVISION'] || "2026-10-15" # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/vnd.api+json']) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'Hash<String, Object>' # auth_names auth_names = opts[:debug_auth_names] || ['Klaviyo-API-Key', 'OAuth'] = opts.merge( :operation => :"TextMessagingApi.get_text_messaging_sender", :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: TextMessagingApi#get_text_messaging_sender\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#get_text_messaging_senders(opts = {}) ⇒ Hash<String, Object>
Get Text Messaging Senders
List the calling company's text-messaging senders.
Rate limits:
Burst: 3/s<br>Steady: 60/m Scopes: sender-config:read OpenAPI Spec
683 684 685 686 |
# File 'lib/klaviyo-api-sdk/api/text_messaging_api.rb', line 683 def get_text_messaging_senders(opts = {}) data, _status_code, _headers = get_text_messaging_senders_with_http_info(opts) data end |
#get_text_messaging_senders_with_http_info(opts = {}) ⇒ Array<(Hash<String, Object>, Integer, Hash)>
Get Text Messaging Senders List the calling company's text-messaging senders.<br><br>Rate limits:<br>Burst: `3/s`<br>Steady: `60/m` Scopes: `sender-config:read` OpenAPI Spec
698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 |
# File 'lib/klaviyo-api-sdk/api/text_messaging_api.rb', line 698 def get_text_messaging_senders_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: TextMessagingApi.get_text_messaging_senders ...' end allowable_values = ["created_at", "decided_at", "failures", "id", "status", "submitted_at", "updated_at"] if @api_client.config.client_side_validation && opts[:'fields_text_messaging_sender_registration'] && !opts[:'fields_text_messaging_sender_registration'].all? { |item| allowable_values.include?(item) } fail ArgumentError, "invalid value for \"fields_text_messaging_sender_registration\", must include one of #{allowable_values}" end allowable_values = ["created_at", "forwarding_number", "id", "sender_details", "sender_details.country", "sender_identifier", "sender_type", "status"] if @api_client.config.client_side_validation && opts[:'fields_text_messaging_sender'] && !opts[:'fields_text_messaging_sender'].all? { |item| allowable_values.include?(item) } fail ArgumentError, "invalid value for \"fields_text_messaging_sender\", must include one of #{allowable_values}" end allowable_values = ["text-messaging-sender-registration"] if @api_client.config.client_side_validation && opts[:'include'] && !opts[:'include'].all? { |item| allowable_values.include?(item) } fail ArgumentError, "invalid value for \"include\", must include one of #{allowable_values}" end if @api_client.config.client_side_validation && !opts[:'page_size'].nil? && opts[:'page_size'] > 20 fail ArgumentError, 'invalid value for "opts[:"page_size"]" when calling TextMessagingApi.get_text_messaging_senders, must be smaller than or equal to 20.' end if @api_client.config.client_side_validation && !opts[:'page_size'].nil? && opts[:'page_size'] < 1 fail ArgumentError, 'invalid value for "opts[:"page_size"]" when calling TextMessagingApi.get_text_messaging_senders, must be greater than or equal to 1.' end allowable_values = ["created_at", "-created_at"] 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 = '/api/text-messaging-senders' # query parameters query_params = opts[:query_params] || {} query_params[:'fields[text-messaging-sender-registration]'] = @api_client.build_collection_param(opts[:'fields_text_messaging_sender_registration'], :csv) if !opts[:'fields_text_messaging_sender_registration'].nil? query_params[:'fields[text-messaging-sender]'] = @api_client.build_collection_param(opts[:'fields_text_messaging_sender'], :csv) if !opts[:'fields_text_messaging_sender'].nil? query_params[:'include'] = @api_client.build_collection_param(opts[:'include'], :csv) if !opts[:'include'].nil? query_params[:'page[cursor]'] = opts[:'page_cursor'] if !opts[:'page_cursor'].nil? query_params[:'page[size]'] = opts[:'page_size'] if !opts[:'page_size'].nil? query_params[:'sort'] = opts[:'sort'] if !opts[:'sort'].nil? # header parameters header_params = opts[:header_params] || {} # klaviyo api revision header_params['revision'] = ENV['KLAVIYO_API_REVISION'] || ENV['API_REVISION'] || "2026-10-15" # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/vnd.api+json']) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'Hash<String, Object>' # auth_names auth_names = opts[:debug_auth_names] || ['Klaviyo-API-Key', 'OAuth'] = opts.merge( :operation => :"TextMessagingApi.get_text_messaging_senders", :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: TextMessagingApi#get_text_messaging_senders\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |