late-sdk 0.0.600 → 0.0.601

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: ec73b4f69f301ed34eaa3000d129bc20ead93d2d8230752b25d7f7f7172cbad5
4
- data.tar.gz: efe97319229425bfb1186e4828ac40a7352104df31f096d7679a3f255e3ac6da
3
+ metadata.gz: 370af23549131aa6bf98edc57f1fa3371c6d161822ddbc2a3e62b343c5556e86
4
+ data.tar.gz: 6537dc82a43d5795d2bfbb99905a39bbf7bf3057fdd261fbb7dc894962a65aad
5
5
  SHA512:
6
- metadata.gz: 021c71c3bc1bbc9787247334886496e4df786e3155e5a180ffdef606ae3f59fc16051295ee6c8e312964ca0a0d711eac55f234cdf9be42f1300fb79f97c5641a
7
- data.tar.gz: 0b4468a425e29f8c65bf94b16dbc9d1f14fff907123a4a9f8bbc45cbd78af4fa23f2b8dd2da59db5cfc663e34177e2aa8c7b4227e00db2b25d3beddd88746434
6
+ metadata.gz: 1cc5ec2513503e1fb1dd511b4f27908bb50a0d811098877147337691b3851f589b66bc3debfdb651c112dad53e3ca12fa1f8e99c85160baa03a0b371c2e2382f
7
+ data.tar.gz: 30112525b28ae2519a4a9e21364cebe3c6c9ff67d6acedfb27af4b3d29e47bc3d89d6612c1e907fe1c065391b35c0c180ecaff2dfb8ef8cd56bab7988153e5e4
data/README.md CHANGED
@@ -86,10 +86,12 @@ Class | Method | HTTP request | Description
86
86
  *Zernio::AccountsApi* | [**get_account_health**](docs/AccountsApi.md#get_account_health) | **GET** /v1/accounts/{accountId}/health | Check account health
87
87
  *Zernio::AccountsApi* | [**get_all_accounts_health**](docs/AccountsApi.md#get_all_accounts_health) | **GET** /v1/accounts/health | Check accounts health
88
88
  *Zernio::AccountsApi* | [**get_follower_stats**](docs/AccountsApi.md#get_follower_stats) | **GET** /v1/accounts/follower-stats | Get follower stats
89
+ *Zernio::AccountsApi* | [**get_slack_settings**](docs/AccountsApi.md#get_slack_settings) | **GET** /v1/accounts/{accountId}/slack-settings | Get Slack account settings
89
90
  *Zernio::AccountsApi* | [**get_tik_tok_creator_info**](docs/AccountsApi.md#get_tik_tok_creator_info) | **GET** /v1/accounts/{accountId}/tiktok/creator-info | Get TikTok creator info
90
91
  *Zernio::AccountsApi* | [**list_accounts**](docs/AccountsApi.md#list_accounts) | **GET** /v1/accounts | List accounts
91
92
  *Zernio::AccountsApi* | [**move_account_to_profile**](docs/AccountsApi.md#move_account_to_profile) | **PATCH** /v1/accounts/{accountId} | Move account to another profile
92
93
  *Zernio::AccountsApi* | [**update_account**](docs/AccountsApi.md#update_account) | **PUT** /v1/accounts/{accountId} | Update account
94
+ *Zernio::AccountsApi* | [**update_slack_settings**](docs/AccountsApi.md#update_slack_settings) | **PATCH** /v1/accounts/{accountId}/slack-settings | Update Slack account settings
93
95
  *Zernio::AdAccountsApi* | [**get_ad_account_finance**](docs/AdAccountsApi.md#get_ad_account_finance) | **GET** /v1/ads/accounts/finance | Ad account finances
94
96
  *Zernio::AdAccountsApi* | [**get_ad_comments**](docs/AdAccountsApi.md#get_ad_comments) | **GET** /v1/ads/{adId}/comments | List comments on an ad
95
97
  *Zernio::AdAccountsApi* | [**get_ads_activity_log**](docs/AdAccountsApi.md#get_ads_activity_log) | **GET** /v1/ads/activity | Ad account change / audit log
@@ -1221,6 +1223,8 @@ Class | Method | HTTP request | Description
1221
1223
  - [Zernio::GetSequence200ResponseSequence](docs/GetSequence200ResponseSequence.md)
1222
1224
  - [Zernio::GetSequence200ResponseSequenceStepsInner](docs/GetSequence200ResponseSequenceStepsInner.md)
1223
1225
  - [Zernio::GetSequence200ResponseSequenceStepsInnerTemplate](docs/GetSequence200ResponseSequenceStepsInnerTemplate.md)
1226
+ - [Zernio::GetSlackSettings200Response](docs/GetSlackSettings200Response.md)
1227
+ - [Zernio::GetSlackSettings200ResponseAccount](docs/GetSlackSettings200ResponseAccount.md)
1224
1228
  - [Zernio::GetSmsRegistration200Response](docs/GetSmsRegistration200Response.md)
1225
1229
  - [Zernio::GetSmsRegistration200ResponseCampaignContent](docs/GetSmsRegistration200ResponseCampaignContent.md)
1226
1230
  - [Zernio::GetSmsUsage200Response](docs/GetSmsUsage200Response.md)
@@ -1937,6 +1941,7 @@ Class | Method | HTTP request | Description
1937
1941
  - [Zernio::UpdateSequenceRequest](docs/UpdateSequenceRequest.md)
1938
1942
  - [Zernio::UpdateSequenceRequestStepsInner](docs/UpdateSequenceRequestStepsInner.md)
1939
1943
  - [Zernio::UpdateSequenceRequestStepsInnerTemplate](docs/UpdateSequenceRequestStepsInnerTemplate.md)
1944
+ - [Zernio::UpdateSlackSettingsRequest](docs/UpdateSlackSettingsRequest.md)
1940
1945
  - [Zernio::UpdateTrackingTagRequest](docs/UpdateTrackingTagRequest.md)
1941
1946
  - [Zernio::UpdateWebhookSettings200Response](docs/UpdateWebhookSettings200Response.md)
1942
1947
  - [Zernio::UpdateWebhookSettingsRequest](docs/UpdateWebhookSettingsRequest.md)
data/docs/AccountsApi.md CHANGED
@@ -8,10 +8,12 @@ All URIs are relative to *https://zernio.com/api*
8
8
  | [**get_account_health**](AccountsApi.md#get_account_health) | **GET** /v1/accounts/{accountId}/health | Check account health |
9
9
  | [**get_all_accounts_health**](AccountsApi.md#get_all_accounts_health) | **GET** /v1/accounts/health | Check accounts health |
10
10
  | [**get_follower_stats**](AccountsApi.md#get_follower_stats) | **GET** /v1/accounts/follower-stats | Get follower stats |
11
+ | [**get_slack_settings**](AccountsApi.md#get_slack_settings) | **GET** /v1/accounts/{accountId}/slack-settings | Get Slack account settings |
11
12
  | [**get_tik_tok_creator_info**](AccountsApi.md#get_tik_tok_creator_info) | **GET** /v1/accounts/{accountId}/tiktok/creator-info | Get TikTok creator info |
12
13
  | [**list_accounts**](AccountsApi.md#list_accounts) | **GET** /v1/accounts | List accounts |
13
14
  | [**move_account_to_profile**](AccountsApi.md#move_account_to_profile) | **PATCH** /v1/accounts/{accountId} | Move account to another profile |
14
15
  | [**update_account**](AccountsApi.md#update_account) | **PUT** /v1/accounts/{accountId} | Update account |
16
+ | [**update_slack_settings**](AccountsApi.md#update_slack_settings) | **PATCH** /v1/accounts/{accountId}/slack-settings | Update Slack account settings |
15
17
 
16
18
 
17
19
  ## delete_account
@@ -306,6 +308,75 @@ end
306
308
  - **Accept**: application/json
307
309
 
308
310
 
311
+ ## get_slack_settings
312
+
313
+ > <GetSlackSettings200Response> get_slack_settings(account_id)
314
+
315
+ Get Slack account settings
316
+
317
+ Returns the connected Slack channel details and the default message identity (name and avatar shown as the author on every post, with Slack's APP badge). The identity applies to messages only; the app's own Slack profile is global and cannot be changed per workspace.
318
+
319
+ ### Examples
320
+
321
+ ```ruby
322
+ require 'time'
323
+ require 'zernio-sdk'
324
+ # setup authorization
325
+ Zernio.configure do |config|
326
+ # Configure Bearer authorization (JWT): bearerAuth
327
+ config.access_token = 'YOUR_BEARER_TOKEN'
328
+ end
329
+
330
+ api_instance = Zernio::AccountsApi.new
331
+ account_id = 'account_id_example' # String |
332
+
333
+ begin
334
+ # Get Slack account settings
335
+ result = api_instance.get_slack_settings(account_id)
336
+ p result
337
+ rescue Zernio::ApiError => e
338
+ puts "Error when calling AccountsApi->get_slack_settings: #{e}"
339
+ end
340
+ ```
341
+
342
+ #### Using the get_slack_settings_with_http_info variant
343
+
344
+ This returns an Array which contains the response data, status code and headers.
345
+
346
+ > <Array(<GetSlackSettings200Response>, Integer, Hash)> get_slack_settings_with_http_info(account_id)
347
+
348
+ ```ruby
349
+ begin
350
+ # Get Slack account settings
351
+ data, status_code, headers = api_instance.get_slack_settings_with_http_info(account_id)
352
+ p status_code # => 2xx
353
+ p headers # => { ... }
354
+ p data # => <GetSlackSettings200Response>
355
+ rescue Zernio::ApiError => e
356
+ puts "Error when calling AccountsApi->get_slack_settings_with_http_info: #{e}"
357
+ end
358
+ ```
359
+
360
+ ### Parameters
361
+
362
+ | Name | Type | Description | Notes |
363
+ | ---- | ---- | ----------- | ----- |
364
+ | **account_id** | **String** | | |
365
+
366
+ ### Return type
367
+
368
+ [**GetSlackSettings200Response**](GetSlackSettings200Response.md)
369
+
370
+ ### Authorization
371
+
372
+ [bearerAuth](../README.md#bearerAuth)
373
+
374
+ ### HTTP request headers
375
+
376
+ - **Content-Type**: Not defined
377
+ - **Accept**: application/json
378
+
379
+
309
380
  ## get_tik_tok_creator_info
310
381
 
311
382
  > <GetTikTokCreatorInfo200Response> get_tik_tok_creator_info(account_id, opts)
@@ -601,3 +672,73 @@ end
601
672
  - **Content-Type**: application/json
602
673
  - **Accept**: application/json
603
674
 
675
+
676
+ ## update_slack_settings
677
+
678
+ > update_slack_settings(account_id, update_slack_settings_request)
679
+
680
+ Update Slack account settings
681
+
682
+ Set or clear the default message identity for this channel. Empty string clears a field; per-post platformSpecificData.username/iconUrl still override these defaults.
683
+
684
+ ### Examples
685
+
686
+ ```ruby
687
+ require 'time'
688
+ require 'zernio-sdk'
689
+ # setup authorization
690
+ Zernio.configure do |config|
691
+ # Configure Bearer authorization (JWT): bearerAuth
692
+ config.access_token = 'YOUR_BEARER_TOKEN'
693
+ end
694
+
695
+ api_instance = Zernio::AccountsApi.new
696
+ account_id = 'account_id_example' # String |
697
+ update_slack_settings_request = Zernio::UpdateSlackSettingsRequest.new # UpdateSlackSettingsRequest |
698
+
699
+ begin
700
+ # Update Slack account settings
701
+ api_instance.update_slack_settings(account_id, update_slack_settings_request)
702
+ rescue Zernio::ApiError => e
703
+ puts "Error when calling AccountsApi->update_slack_settings: #{e}"
704
+ end
705
+ ```
706
+
707
+ #### Using the update_slack_settings_with_http_info variant
708
+
709
+ This returns an Array which contains the response data (`nil` in this case), status code and headers.
710
+
711
+ > <Array(nil, Integer, Hash)> update_slack_settings_with_http_info(account_id, update_slack_settings_request)
712
+
713
+ ```ruby
714
+ begin
715
+ # Update Slack account settings
716
+ data, status_code, headers = api_instance.update_slack_settings_with_http_info(account_id, update_slack_settings_request)
717
+ p status_code # => 2xx
718
+ p headers # => { ... }
719
+ p data # => nil
720
+ rescue Zernio::ApiError => e
721
+ puts "Error when calling AccountsApi->update_slack_settings_with_http_info: #{e}"
722
+ end
723
+ ```
724
+
725
+ ### Parameters
726
+
727
+ | Name | Type | Description | Notes |
728
+ | ---- | ---- | ----------- | ----- |
729
+ | **account_id** | **String** | | |
730
+ | **update_slack_settings_request** | [**UpdateSlackSettingsRequest**](UpdateSlackSettingsRequest.md) | | |
731
+
732
+ ### Return type
733
+
734
+ nil (empty response body)
735
+
736
+ ### Authorization
737
+
738
+ [bearerAuth](../README.md#bearerAuth)
739
+
740
+ ### HTTP request headers
741
+
742
+ - **Content-Type**: application/json
743
+ - **Accept**: application/json
744
+
@@ -0,0 +1,18 @@
1
+ # Zernio::GetSlackSettings200Response
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **account** | [**GetSlackSettings200ResponseAccount**](GetSlackSettings200ResponseAccount.md) | | [optional] |
8
+
9
+ ## Example
10
+
11
+ ```ruby
12
+ require 'zernio-sdk'
13
+
14
+ instance = Zernio::GetSlackSettings200Response.new(
15
+ account: null
16
+ )
17
+ ```
18
+
@@ -0,0 +1,36 @@
1
+ # Zernio::GetSlackSettings200ResponseAccount
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **_id** | **String** | | [optional] |
8
+ | **platform** | **String** | | [optional] |
9
+ | **display_name** | **String** | | [optional] |
10
+ | **channel_id** | **String** | | [optional] |
11
+ | **channel_name** | **String** | | [optional] |
12
+ | **channel_type** | **String** | public or private | [optional] |
13
+ | **team_id** | **String** | | [optional] |
14
+ | **team_name** | **String** | | [optional] |
15
+ | **default_username** | **String** | | [optional] |
16
+ | **default_icon_url** | **String** | | [optional] |
17
+
18
+ ## Example
19
+
20
+ ```ruby
21
+ require 'zernio-sdk'
22
+
23
+ instance = Zernio::GetSlackSettings200ResponseAccount.new(
24
+ _id: null,
25
+ platform: slack,
26
+ display_name: null,
27
+ channel_id: null,
28
+ channel_name: null,
29
+ channel_type: null,
30
+ team_id: null,
31
+ team_name: null,
32
+ default_username: null,
33
+ default_icon_url: null
34
+ )
35
+ ```
36
+
@@ -0,0 +1,20 @@
1
+ # Zernio::UpdateSlackSettingsRequest
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **default_username** | **String** | Author name shown on posts. Empty string clears it. | [optional] |
8
+ | **default_icon_url** | **String** | Author avatar image URL. Empty string clears it. | [optional] |
9
+
10
+ ## Example
11
+
12
+ ```ruby
13
+ require 'zernio-sdk'
14
+
15
+ instance = Zernio::UpdateSlackSettingsRequest.new(
16
+ default_username: null,
17
+ default_icon_url: null
18
+ )
19
+ ```
20
+
@@ -295,6 +295,69 @@ module Zernio
295
295
  return data, status_code, headers
296
296
  end
297
297
 
298
+ # Get Slack account settings
299
+ # Returns the connected Slack channel details and the default message identity (name and avatar shown as the author on every post, with Slack's APP badge). The identity applies to messages only; the app's own Slack profile is global and cannot be changed per workspace.
300
+ # @param account_id [String]
301
+ # @param [Hash] opts the optional parameters
302
+ # @return [GetSlackSettings200Response]
303
+ def get_slack_settings(account_id, opts = {})
304
+ data, _status_code, _headers = get_slack_settings_with_http_info(account_id, opts)
305
+ data
306
+ end
307
+
308
+ # Get Slack account settings
309
+ # Returns the connected Slack channel details and the default message identity (name and avatar shown as the author on every post, with Slack&#39;s APP badge). The identity applies to messages only; the app&#39;s own Slack profile is global and cannot be changed per workspace.
310
+ # @param account_id [String]
311
+ # @param [Hash] opts the optional parameters
312
+ # @return [Array<(GetSlackSettings200Response, Integer, Hash)>] GetSlackSettings200Response data, response status code and response headers
313
+ def get_slack_settings_with_http_info(account_id, opts = {})
314
+ if @api_client.config.debugging
315
+ @api_client.config.logger.debug 'Calling API: AccountsApi.get_slack_settings ...'
316
+ end
317
+ # verify the required parameter 'account_id' is set
318
+ if @api_client.config.client_side_validation && account_id.nil?
319
+ fail ArgumentError, "Missing the required parameter 'account_id' when calling AccountsApi.get_slack_settings"
320
+ end
321
+ # resource path
322
+ local_var_path = '/v1/accounts/{accountId}/slack-settings'.sub('{' + 'accountId' + '}', CGI.escape(account_id.to_s))
323
+
324
+ # query parameters
325
+ query_params = opts[:query_params] || {}
326
+
327
+ # header parameters
328
+ header_params = opts[:header_params] || {}
329
+ # HTTP header 'Accept' (if needed)
330
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
331
+
332
+ # form parameters
333
+ form_params = opts[:form_params] || {}
334
+
335
+ # http body (model)
336
+ post_body = opts[:debug_body]
337
+
338
+ # return_type
339
+ return_type = opts[:debug_return_type] || 'GetSlackSettings200Response'
340
+
341
+ # auth_names
342
+ auth_names = opts[:debug_auth_names] || ['bearerAuth']
343
+
344
+ new_options = opts.merge(
345
+ :operation => :"AccountsApi.get_slack_settings",
346
+ :header_params => header_params,
347
+ :query_params => query_params,
348
+ :form_params => form_params,
349
+ :body => post_body,
350
+ :auth_names => auth_names,
351
+ :return_type => return_type
352
+ )
353
+
354
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
355
+ if @api_client.config.debugging
356
+ @api_client.config.logger.debug "API called: AccountsApi#get_slack_settings\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
357
+ end
358
+ return data, status_code, headers
359
+ end
360
+
298
361
  # Get TikTok creator info
299
362
  # Returns TikTok creator details, available privacy levels, posting limits, and commercial content options for a specific TikTok account. Only works with TikTok accounts.
300
363
  # @param account_id [String] The TikTok account ID
@@ -603,5 +666,79 @@ module Zernio
603
666
  end
604
667
  return data, status_code, headers
605
668
  end
669
+
670
+ # Update Slack account settings
671
+ # Set or clear the default message identity for this channel. Empty string clears a field; per-post platformSpecificData.username/iconUrl still override these defaults.
672
+ # @param account_id [String]
673
+ # @param update_slack_settings_request [UpdateSlackSettingsRequest]
674
+ # @param [Hash] opts the optional parameters
675
+ # @return [nil]
676
+ def update_slack_settings(account_id, update_slack_settings_request, opts = {})
677
+ update_slack_settings_with_http_info(account_id, update_slack_settings_request, opts)
678
+ nil
679
+ end
680
+
681
+ # Update Slack account settings
682
+ # Set or clear the default message identity for this channel. Empty string clears a field; per-post platformSpecificData.username/iconUrl still override these defaults.
683
+ # @param account_id [String]
684
+ # @param update_slack_settings_request [UpdateSlackSettingsRequest]
685
+ # @param [Hash] opts the optional parameters
686
+ # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
687
+ def update_slack_settings_with_http_info(account_id, update_slack_settings_request, opts = {})
688
+ if @api_client.config.debugging
689
+ @api_client.config.logger.debug 'Calling API: AccountsApi.update_slack_settings ...'
690
+ end
691
+ # verify the required parameter 'account_id' is set
692
+ if @api_client.config.client_side_validation && account_id.nil?
693
+ fail ArgumentError, "Missing the required parameter 'account_id' when calling AccountsApi.update_slack_settings"
694
+ end
695
+ # verify the required parameter 'update_slack_settings_request' is set
696
+ if @api_client.config.client_side_validation && update_slack_settings_request.nil?
697
+ fail ArgumentError, "Missing the required parameter 'update_slack_settings_request' when calling AccountsApi.update_slack_settings"
698
+ end
699
+ # resource path
700
+ local_var_path = '/v1/accounts/{accountId}/slack-settings'.sub('{' + 'accountId' + '}', CGI.escape(account_id.to_s))
701
+
702
+ # query parameters
703
+ query_params = opts[:query_params] || {}
704
+
705
+ # header parameters
706
+ header_params = opts[:header_params] || {}
707
+ # HTTP header 'Accept' (if needed)
708
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
709
+ # HTTP header 'Content-Type'
710
+ content_type = @api_client.select_header_content_type(['application/json'])
711
+ if !content_type.nil?
712
+ header_params['Content-Type'] = content_type
713
+ end
714
+
715
+ # form parameters
716
+ form_params = opts[:form_params] || {}
717
+
718
+ # http body (model)
719
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(update_slack_settings_request)
720
+
721
+ # return_type
722
+ return_type = opts[:debug_return_type]
723
+
724
+ # auth_names
725
+ auth_names = opts[:debug_auth_names] || ['bearerAuth']
726
+
727
+ new_options = opts.merge(
728
+ :operation => :"AccountsApi.update_slack_settings",
729
+ :header_params => header_params,
730
+ :query_params => query_params,
731
+ :form_params => form_params,
732
+ :body => post_body,
733
+ :auth_names => auth_names,
734
+ :return_type => return_type
735
+ )
736
+
737
+ data, status_code, headers = @api_client.call_api(:PATCH, local_var_path, new_options)
738
+ if @api_client.config.debugging
739
+ @api_client.config.logger.debug "API called: AccountsApi#update_slack_settings\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
740
+ end
741
+ return data, status_code, headers
742
+ end
606
743
  end
607
744
  end
@@ -0,0 +1,147 @@
1
+ =begin
2
+ #Zernio API
3
+
4
+ #API reference for Zernio. Authenticate with a Bearer API key. Base URL: https://zernio.com/api
5
+
6
+ The version of the OpenAPI document: 1.0.4
7
+ Contact: support@zernio.com
8
+ Generated by: https://openapi-generator.tech
9
+ Generator version: 7.19.0
10
+
11
+ =end
12
+
13
+ require 'date'
14
+ require 'time'
15
+
16
+ module Zernio
17
+ class GetSlackSettings200Response < ApiModelBase
18
+ attr_accessor :account
19
+
20
+ # Attribute mapping from ruby-style variable name to JSON key.
21
+ def self.attribute_map
22
+ {
23
+ :'account' => :'account'
24
+ }
25
+ end
26
+
27
+ # Returns attribute mapping this model knows about
28
+ def self.acceptable_attribute_map
29
+ attribute_map
30
+ end
31
+
32
+ # Returns all the JSON keys this model knows about
33
+ def self.acceptable_attributes
34
+ acceptable_attribute_map.values
35
+ end
36
+
37
+ # Attribute type mapping.
38
+ def self.openapi_types
39
+ {
40
+ :'account' => :'GetSlackSettings200ResponseAccount'
41
+ }
42
+ end
43
+
44
+ # List of attributes with nullable: true
45
+ def self.openapi_nullable
46
+ Set.new([
47
+ ])
48
+ end
49
+
50
+ # Initializes the object
51
+ # @param [Hash] attributes Model attributes in the form of hash
52
+ def initialize(attributes = {})
53
+ if (!attributes.is_a?(Hash))
54
+ fail ArgumentError, "The input argument (attributes) must be a hash in `Zernio::GetSlackSettings200Response` initialize method"
55
+ end
56
+
57
+ # check to see if the attribute exists and convert string to symbol for hash key
58
+ acceptable_attribute_map = self.class.acceptable_attribute_map
59
+ attributes = attributes.each_with_object({}) { |(k, v), h|
60
+ if (!acceptable_attribute_map.key?(k.to_sym))
61
+ fail ArgumentError, "`#{k}` is not a valid attribute in `Zernio::GetSlackSettings200Response`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
62
+ end
63
+ h[k.to_sym] = v
64
+ }
65
+
66
+ if attributes.key?(:'account')
67
+ self.account = attributes[:'account']
68
+ end
69
+ end
70
+
71
+ # Show invalid properties with the reasons. Usually used together with valid?
72
+ # @return Array for valid properties with the reasons
73
+ def list_invalid_properties
74
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
75
+ invalid_properties = Array.new
76
+ invalid_properties
77
+ end
78
+
79
+ # Check to see if the all the properties in the model are valid
80
+ # @return true if the model is valid
81
+ def valid?
82
+ warn '[DEPRECATED] the `valid?` method is obsolete'
83
+ true
84
+ end
85
+
86
+ # Checks equality by comparing each attribute.
87
+ # @param [Object] Object to be compared
88
+ def ==(o)
89
+ return true if self.equal?(o)
90
+ self.class == o.class &&
91
+ account == o.account
92
+ end
93
+
94
+ # @see the `==` method
95
+ # @param [Object] Object to be compared
96
+ def eql?(o)
97
+ self == o
98
+ end
99
+
100
+ # Calculates hash code according to all attributes.
101
+ # @return [Integer] Hash code
102
+ def hash
103
+ [account].hash
104
+ end
105
+
106
+ # Builds the object from hash
107
+ # @param [Hash] attributes Model attributes in the form of hash
108
+ # @return [Object] Returns the model itself
109
+ def self.build_from_hash(attributes)
110
+ return nil unless attributes.is_a?(Hash)
111
+ attributes = attributes.transform_keys(&:to_sym)
112
+ transformed_hash = {}
113
+ openapi_types.each_pair do |key, type|
114
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
115
+ transformed_hash["#{key}"] = nil
116
+ elsif type =~ /\AArray<(.*)>/i
117
+ # check to ensure the input is an array given that the attribute
118
+ # is documented as an array but the input is not
119
+ if attributes[attribute_map[key]].is_a?(Array)
120
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
121
+ end
122
+ elsif !attributes[attribute_map[key]].nil?
123
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
124
+ end
125
+ end
126
+ new(transformed_hash)
127
+ end
128
+
129
+ # Returns the object in the form of hash
130
+ # @return [Hash] Returns the object in the form of hash
131
+ def to_hash
132
+ hash = {}
133
+ self.class.attribute_map.each_pair do |attr, param|
134
+ value = self.send(attr)
135
+ if value.nil?
136
+ is_nullable = self.class.openapi_nullable.include?(attr)
137
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
138
+ end
139
+
140
+ hash[param] = _to_hash(value)
141
+ end
142
+ hash
143
+ end
144
+
145
+ end
146
+
147
+ end