From 0e82c2c8e388fc6dfef3b5609f5e1429a4da7caf Mon Sep 17 00:00:00 2001 From: nagendraSIB Date: Wed, 2 Mar 2022 12:45:34 +0530 Subject: [PATCH 01/10] AP-2022 ruby latest update --- Gemfile | 2 +- README.md | 25 ++- docs/CRMApi.md | 118 +++++++--- docs/CreateSubAccount.md | 1 + docs/MasterAccountApi.md | 57 +++++ docs/RequestContactImport.md | 5 +- docs/SendSmtpEmail.md | 6 +- docs/TaskTypes.md | 10 + lib/sib-api-v3-sdk.rb | 1 + lib/sib-api-v3-sdk/api/crm_api.rb | 90 ++++++-- lib/sib-api-v3-sdk/api/master_account_api.rb | 51 +++++ .../api/transactional_emails_api.rb | 4 +- .../models/create_sub_account.rb | 17 +- .../models/get_email_event_report_events.rb | 4 +- .../models/request_contact_import.rb | 18 +- lib/sib-api-v3-sdk/models/send_smtp_email.rb | 6 +- lib/sib-api-v3-sdk/models/task_types.rb | 206 ++++++++++++++++++ lib/sib-api-v3-sdk/version.rb | 2 +- spec/api/crm_api_spec.rb | 32 ++- spec/api/master_account_api_spec.rb | 11 + spec/models/create_sub_account_spec.rb | 6 + .../get_email_event_report_events_spec.rb | 2 +- spec/models/request_contact_import_spec.rb | 6 + spec/models/task_types_spec.rb | 53 +++++ 24 files changed, 637 insertions(+), 96 deletions(-) create mode 100644 docs/TaskTypes.md create mode 100644 lib/sib-api-v3-sdk/models/task_types.rb create mode 100644 spec/models/task_types_spec.rb diff --git a/Gemfile b/Gemfile index dc92356..f58bec0 100644 --- a/Gemfile +++ b/Gemfile @@ -3,5 +3,5 @@ source 'https://rubygems.org' gemspec group :development, :test do - gem 'rake', '>= 12.3.3' + gem 'rake', '~> 12.3.3' end diff --git a/README.md b/README.md index 6e5822d..1e9e074 100644 --- a/README.md +++ b/README.md @@ -89,18 +89,19 @@ Class | Method | HTTP request | Description *SibApiV3Sdk::AttributesApi* | [**delete_attribute**](docs/AttributesApi.md#delete_attribute) | **DELETE** /contacts/attributes/{attributeCategory}/{attributeName} | Delete an attribute *SibApiV3Sdk::AttributesApi* | [**get_attributes**](docs/AttributesApi.md#get_attributes) | **GET** /contacts/attributes | List all attributes *SibApiV3Sdk::AttributesApi* | [**update_attribute**](docs/AttributesApi.md#update_attribute) | **PUT** /contacts/attributes/{attributeCategory}/{attributeName} | Update contact attribute -*SibApiV3Sdk::CRMApi* | [**crm_files_id_data_get**](docs/CRMApi.md#crm_files_id_data_get) | **GET** /crm/files/{id}/data | Get file data by id. -*SibApiV3Sdk::CRMApi* | [**crm_files_id_delete**](docs/CRMApi.md#crm_files_id_delete) | **DELETE** /crm/files/{id} | Delete file. -*SibApiV3Sdk::CRMApi* | [**crm_files_id_get**](docs/CRMApi.md#crm_files_id_get) | **GET** /crm/files/{id} | Download file by id. -*SibApiV3Sdk::CRMApi* | [**crm_files_post**](docs/CRMApi.md#crm_files_post) | **POST** /crm/files | Upload and create file. -*SibApiV3Sdk::CRMApi* | [**crm_notes_id_delete**](docs/CRMApi.md#crm_notes_id_delete) | **DELETE** /crm/notes/{id} | Delete Note by ID -*SibApiV3Sdk::CRMApi* | [**crm_notes_id_get**](docs/CRMApi.md#crm_notes_id_get) | **GET** /crm/notes/{id} | Get one Note by ID +*SibApiV3Sdk::CRMApi* | [**crm_files_id_data_get**](docs/CRMApi.md#crm_files_id_data_get) | **GET** /crm/files/{id}/data | Get file details +*SibApiV3Sdk::CRMApi* | [**crm_files_id_delete**](docs/CRMApi.md#crm_files_id_delete) | **DELETE** /crm/files/{id} | Delete a file +*SibApiV3Sdk::CRMApi* | [**crm_files_id_get**](docs/CRMApi.md#crm_files_id_get) | **GET** /crm/files/{id} | Download a file +*SibApiV3Sdk::CRMApi* | [**crm_files_post**](docs/CRMApi.md#crm_files_post) | **POST** /crm/files | Upload a file +*SibApiV3Sdk::CRMApi* | [**crm_notes_id_delete**](docs/CRMApi.md#crm_notes_id_delete) | **DELETE** /crm/notes/{id} | Delete a note +*SibApiV3Sdk::CRMApi* | [**crm_notes_id_get**](docs/CRMApi.md#crm_notes_id_get) | **GET** /crm/notes/{id} | Get a note *SibApiV3Sdk::CRMApi* | [**crm_notes_id_patch**](docs/CRMApi.md#crm_notes_id_patch) | **PATCH** /crm/notes/{id} | Update a note -*SibApiV3Sdk::CRMApi* | [**crm_notes_post**](docs/CRMApi.md#crm_notes_post) | **POST** /crm/notes | Create a new Note -*SibApiV3Sdk::CRMApi* | [**crm_tasks_id_delete**](docs/CRMApi.md#crm_tasks_id_delete) | **DELETE** /crm/tasks/{id} | Delete Task by id -*SibApiV3Sdk::CRMApi* | [**crm_tasks_id_get**](docs/CRMApi.md#crm_tasks_id_get) | **GET** /crm/tasks/{id} | Get one Task by ID -*SibApiV3Sdk::CRMApi* | [**crm_tasks_id_patch**](docs/CRMApi.md#crm_tasks_id_patch) | **PATCH** /crm/tasks/{id} | Update partial existing task -*SibApiV3Sdk::CRMApi* | [**crm_tasks_post**](docs/CRMApi.md#crm_tasks_post) | **POST** /crm/tasks | Create a new Task +*SibApiV3Sdk::CRMApi* | [**crm_notes_post**](docs/CRMApi.md#crm_notes_post) | **POST** /crm/notes | Create a note +*SibApiV3Sdk::CRMApi* | [**crm_tasks_id_delete**](docs/CRMApi.md#crm_tasks_id_delete) | **DELETE** /crm/tasks/{id} | Delete a task +*SibApiV3Sdk::CRMApi* | [**crm_tasks_id_get**](docs/CRMApi.md#crm_tasks_id_get) | **GET** /crm/tasks/{id} | Get a task +*SibApiV3Sdk::CRMApi* | [**crm_tasks_id_patch**](docs/CRMApi.md#crm_tasks_id_patch) | **PATCH** /crm/tasks/{id} | Update a task +*SibApiV3Sdk::CRMApi* | [**crm_tasks_post**](docs/CRMApi.md#crm_tasks_post) | **POST** /crm/tasks | Create a task +*SibApiV3Sdk::CRMApi* | [**crm_tasktypes_get**](docs/CRMApi.md#crm_tasktypes_get) | **GET** /crm/tasktypes | Get all task types *SibApiV3Sdk::ContactsApi* | [**add_contact_to_list**](docs/ContactsApi.md#add_contact_to_list) | **POST** /contacts/lists/{listId}/contacts/add | Add existing contacts to a list *SibApiV3Sdk::ContactsApi* | [**create_attribute**](docs/ContactsApi.md#create_attribute) | **POST** /contacts/attributes/{attributeCategory}/{attributeName} | Create contact attribute *SibApiV3Sdk::ContactsApi* | [**create_contact**](docs/ContactsApi.md#create_contact) | **POST** /contacts | Create a contact @@ -161,6 +162,7 @@ Class | Method | HTTP request | Description *SibApiV3Sdk::ListsApi* | [**update_list**](docs/ListsApi.md#update_list) | **PUT** /contacts/lists/{listId} | Update a list *SibApiV3Sdk::MasterAccountApi* | [**corporate_master_account_get**](docs/MasterAccountApi.md#corporate_master_account_get) | **GET** /corporate/masterAccount | Get the details of requested master account *SibApiV3Sdk::MasterAccountApi* | [**corporate_sub_account_get**](docs/MasterAccountApi.md#corporate_sub_account_get) | **GET** /corporate/subAccount | Get the list of all the sub-accounts of the master account. +*SibApiV3Sdk::MasterAccountApi* | [**corporate_sub_account_id_delete**](docs/MasterAccountApi.md#corporate_sub_account_id_delete) | **DELETE** /corporate/subAccount/{id} | Delete a sub-account *SibApiV3Sdk::MasterAccountApi* | [**corporate_sub_account_id_get**](docs/MasterAccountApi.md#corporate_sub_account_id_get) | **GET** /corporate/subAccount/{id} | Get sub-account details *SibApiV3Sdk::MasterAccountApi* | [**corporate_sub_account_id_plan_put**](docs/MasterAccountApi.md#corporate_sub_account_id_plan_put) | **PUT** /corporate/subAccount/{id}/plan | Update sub-account plan *SibApiV3Sdk::MasterAccountApi* | [**corporate_sub_account_post**](docs/MasterAccountApi.md#corporate_sub_account_post) | **POST** /corporate/subAccount | Create a new sub-account under a master account. @@ -429,6 +431,7 @@ Class | Method | HTTP request | Description - [SibApiV3Sdk::SubAccountsResponseSubAccounts](docs/SubAccountsResponseSubAccounts.md) - [SibApiV3Sdk::Task](docs/Task.md) - [SibApiV3Sdk::TaskReminder](docs/TaskReminder.md) + - [SibApiV3Sdk::TaskTypes](docs/TaskTypes.md) - [SibApiV3Sdk::UpdateAttribute](docs/UpdateAttribute.md) - [SibApiV3Sdk::UpdateAttributeEnumeration](docs/UpdateAttributeEnumeration.md) - [SibApiV3Sdk::UpdateBatchContacts](docs/UpdateBatchContacts.md) diff --git a/docs/CRMApi.md b/docs/CRMApi.md index 6cbbcde..30243b6 100644 --- a/docs/CRMApi.md +++ b/docs/CRMApi.md @@ -4,24 +4,25 @@ All URIs are relative to *https://api.sendinblue.com/v3* Method | HTTP request | Description ------------- | ------------- | ------------- -[**crm_files_id_data_get**](CRMApi.md#crm_files_id_data_get) | **GET** /crm/files/{id}/data | Get file data by id. -[**crm_files_id_delete**](CRMApi.md#crm_files_id_delete) | **DELETE** /crm/files/{id} | Delete file. -[**crm_files_id_get**](CRMApi.md#crm_files_id_get) | **GET** /crm/files/{id} | Download file by id. -[**crm_files_post**](CRMApi.md#crm_files_post) | **POST** /crm/files | Upload and create file. -[**crm_notes_id_delete**](CRMApi.md#crm_notes_id_delete) | **DELETE** /crm/notes/{id} | Delete Note by ID -[**crm_notes_id_get**](CRMApi.md#crm_notes_id_get) | **GET** /crm/notes/{id} | Get one Note by ID +[**crm_files_id_data_get**](CRMApi.md#crm_files_id_data_get) | **GET** /crm/files/{id}/data | Get file details +[**crm_files_id_delete**](CRMApi.md#crm_files_id_delete) | **DELETE** /crm/files/{id} | Delete a file +[**crm_files_id_get**](CRMApi.md#crm_files_id_get) | **GET** /crm/files/{id} | Download a file +[**crm_files_post**](CRMApi.md#crm_files_post) | **POST** /crm/files | Upload a file +[**crm_notes_id_delete**](CRMApi.md#crm_notes_id_delete) | **DELETE** /crm/notes/{id} | Delete a note +[**crm_notes_id_get**](CRMApi.md#crm_notes_id_get) | **GET** /crm/notes/{id} | Get a note [**crm_notes_id_patch**](CRMApi.md#crm_notes_id_patch) | **PATCH** /crm/notes/{id} | Update a note -[**crm_notes_post**](CRMApi.md#crm_notes_post) | **POST** /crm/notes | Create a new Note -[**crm_tasks_id_delete**](CRMApi.md#crm_tasks_id_delete) | **DELETE** /crm/tasks/{id} | Delete Task by id -[**crm_tasks_id_get**](CRMApi.md#crm_tasks_id_get) | **GET** /crm/tasks/{id} | Get one Task by ID -[**crm_tasks_id_patch**](CRMApi.md#crm_tasks_id_patch) | **PATCH** /crm/tasks/{id} | Update partial existing task -[**crm_tasks_post**](CRMApi.md#crm_tasks_post) | **POST** /crm/tasks | Create a new Task +[**crm_notes_post**](CRMApi.md#crm_notes_post) | **POST** /crm/notes | Create a note +[**crm_tasks_id_delete**](CRMApi.md#crm_tasks_id_delete) | **DELETE** /crm/tasks/{id} | Delete a task +[**crm_tasks_id_get**](CRMApi.md#crm_tasks_id_get) | **GET** /crm/tasks/{id} | Get a task +[**crm_tasks_id_patch**](CRMApi.md#crm_tasks_id_patch) | **PATCH** /crm/tasks/{id} | Update a task +[**crm_tasks_post**](CRMApi.md#crm_tasks_post) | **POST** /crm/tasks | Create a task +[**crm_tasktypes_get**](CRMApi.md#crm_tasktypes_get) | **GET** /crm/tasktypes | Get all task types # **crm_files_id_data_get** > FileData crm_files_id_data_get(id) -Get file data by id. +Get file details ### Example ```ruby @@ -46,7 +47,7 @@ id = 'id_example' # String | File id to get file data. begin - #Get file data by id. + #Get file details result = api_instance.crm_files_id_data_get(id) p result rescue SibApiV3Sdk::ApiError => e @@ -78,7 +79,7 @@ Name | Type | Description | Notes # **crm_files_id_delete** > crm_files_id_delete(id) -Delete file. +Delete a file ### Example ```ruby @@ -103,7 +104,7 @@ id = 'id_example' # String | File id to delete. begin - #Delete file. + #Delete a file api_instance.crm_files_id_delete(id) rescue SibApiV3Sdk::ApiError => e puts "Exception when calling CRMApi->crm_files_id_delete: #{e}" @@ -134,7 +135,7 @@ nil (empty response body) # **crm_files_id_get** > crm_files_id_get(id) -Download file by id. +Download a file ### Example ```ruby @@ -159,7 +160,7 @@ id = 'id_example' # String | File id to download. begin - #Download file by id. + #Download a file api_instance.crm_files_id_get(id) rescue SibApiV3Sdk::ApiError => e puts "Exception when calling CRMApi->crm_files_id_get: #{e}" @@ -190,7 +191,7 @@ nil (empty response body) # **crm_files_post** > FileData crm_files_post(file, opts) -Upload and create file. +Upload a file ### Example ```ruby @@ -218,7 +219,7 @@ opts = { } begin - #Upload and create file. + #Upload a file result = api_instance.crm_files_post(file, opts) p result rescue SibApiV3Sdk::ApiError => e @@ -251,7 +252,7 @@ Name | Type | Description | Notes # **crm_notes_id_delete** > crm_notes_id_delete(id) -Delete Note by ID +Delete a note ### Example ```ruby @@ -276,7 +277,7 @@ id = 'id_example' # String | Note ID to delete begin - #Delete Note by ID + #Delete a note api_instance.crm_notes_id_delete(id) rescue SibApiV3Sdk::ApiError => e puts "Exception when calling CRMApi->crm_notes_id_delete: #{e}" @@ -307,7 +308,7 @@ nil (empty response body) # **crm_notes_id_get** > Note crm_notes_id_get(id) -Get one Note by ID +Get a note ### Example ```ruby @@ -332,7 +333,7 @@ id = 'id_example' # String | Note ID to get begin - #Get one Note by ID + #Get a note result = api_instance.crm_notes_id_get(id) p result rescue SibApiV3Sdk::ApiError => e @@ -424,7 +425,7 @@ Name | Type | Description | Notes # **crm_notes_post** > Note crm_notes_post(body) -Create a new Note +Create a note ### Example ```ruby @@ -449,7 +450,7 @@ body = SibApiV3Sdk::NoteData.new # NoteData | Note data to create a note. begin - #Create a new Note + #Create a note result = api_instance.crm_notes_post(body) p result rescue SibApiV3Sdk::ApiError => e @@ -481,7 +482,7 @@ Name | Type | Description | Notes # **crm_tasks_id_delete** > crm_tasks_id_delete(id) -Delete Task by id +Delete a task ### Example ```ruby @@ -506,7 +507,7 @@ id = 'id_example' # String | begin - #Delete Task by id + #Delete a task api_instance.crm_tasks_id_delete(id) rescue SibApiV3Sdk::ApiError => e puts "Exception when calling CRMApi->crm_tasks_id_delete: #{e}" @@ -537,7 +538,7 @@ nil (empty response body) # **crm_tasks_id_get** > Task crm_tasks_id_get(id) -Get one Task by ID +Get a task ### Example ```ruby @@ -562,7 +563,7 @@ id = 'id_example' # String | begin - #Get one Task by ID + #Get a task result = api_instance.crm_tasks_id_get(id) p result rescue SibApiV3Sdk::ApiError => e @@ -594,7 +595,7 @@ Name | Type | Description | Notes # **crm_tasks_id_patch** > Task crm_tasks_id_patch(id, body) -Update partial existing task +Update a task ### Example ```ruby @@ -621,7 +622,7 @@ body = SibApiV3Sdk::Body1.new # Body1 | Updated task details. begin - #Update partial existing task + #Update a task result = api_instance.crm_tasks_id_patch(id, body) p result rescue SibApiV3Sdk::ApiError => e @@ -654,7 +655,7 @@ Name | Type | Description | Notes # **crm_tasks_post** > Task crm_tasks_post(body) -Create a new Task +Create a task ### Example ```ruby @@ -679,7 +680,7 @@ body = SibApiV3Sdk::Body.new # Body | Task name. begin - #Create a new Task + #Create a task result = api_instance.crm_tasks_post(body) p result rescue SibApiV3Sdk::ApiError => e @@ -708,3 +709,54 @@ Name | Type | Description | Notes +# **crm_tasktypes_get** +> TaskTypes crm_tasktypes_get + +Get all task types + +### Example +```ruby +# load the gem +require 'sib-api-v3-sdk' +# setup authorization +SibApiV3Sdk.configure do |config| + # Configure API key authorization: api-key + config.api_key['api-key'] = 'YOUR API KEY' + # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil) + #config.api_key_prefix['api-key'] = 'Bearer' + + # Configure API key authorization: partner-key + config.api_key['partner-key'] = 'YOUR API KEY' + # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil) + #config.api_key_prefix['partner-key'] = 'Bearer' +end + +api_instance = SibApiV3Sdk::CRMApi.new + +begin + #Get all task types + result = api_instance.crm_tasktypes_get + p result +rescue SibApiV3Sdk::ApiError => e + puts "Exception when calling CRMApi->crm_tasktypes_get: #{e}" +end +``` + +### Parameters +This endpoint does not need any parameter. + +### Return type + +[**TaskTypes**](TaskTypes.md) + +### Authorization + +[api-key](../README.md#api-key), [partner-key](../README.md#partner-key) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + + diff --git a/docs/CreateSubAccount.md b/docs/CreateSubAccount.md index 2013c1d..23d8971 100644 --- a/docs/CreateSubAccount.md +++ b/docs/CreateSubAccount.md @@ -4,6 +4,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **company_name** | **String** | Name of the organization | +**email** | **String** | Email address for the organization | **language** | **String** | Language for identifying localization information | [optional] **timezone** | **String** | Request timezone of the client | [optional] diff --git a/docs/MasterAccountApi.md b/docs/MasterAccountApi.md index 8414287..42f34f9 100644 --- a/docs/MasterAccountApi.md +++ b/docs/MasterAccountApi.md @@ -6,6 +6,7 @@ Method | HTTP request | Description ------------- | ------------- | ------------- [**corporate_master_account_get**](MasterAccountApi.md#corporate_master_account_get) | **GET** /corporate/masterAccount | Get the details of requested master account [**corporate_sub_account_get**](MasterAccountApi.md#corporate_sub_account_get) | **GET** /corporate/subAccount | Get the list of all the sub-accounts of the master account. +[**corporate_sub_account_id_delete**](MasterAccountApi.md#corporate_sub_account_id_delete) | **DELETE** /corporate/subAccount/{id} | Delete a sub-account [**corporate_sub_account_id_get**](MasterAccountApi.md#corporate_sub_account_id_get) | **GET** /corporate/subAccount/{id} | Get sub-account details [**corporate_sub_account_id_plan_put**](MasterAccountApi.md#corporate_sub_account_id_plan_put) | **PUT** /corporate/subAccount/{id}/plan | Update sub-account plan [**corporate_sub_account_post**](MasterAccountApi.md#corporate_sub_account_post) | **POST** /corporate/subAccount | Create a new sub-account under a master account. @@ -127,6 +128,62 @@ Name | Type | Description | Notes +# **corporate_sub_account_id_delete** +> corporate_sub_account_id_delete(id) + +Delete a sub-account + +### Example +```ruby +# load the gem +require 'sib-api-v3-sdk' +# setup authorization +SibApiV3Sdk.configure do |config| + # Configure API key authorization: api-key + config.api_key['api-key'] = 'YOUR API KEY' + # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil) + #config.api_key_prefix['api-key'] = 'Bearer' + + # Configure API key authorization: partner-key + config.api_key['partner-key'] = 'YOUR API KEY' + # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil) + #config.api_key_prefix['partner-key'] = 'Bearer' +end + +api_instance = SibApiV3Sdk::MasterAccountApi.new + +id = 789 # Integer | Id of the sub-account organization to be deleted + + +begin + #Delete a sub-account + api_instance.corporate_sub_account_id_delete(id) +rescue SibApiV3Sdk::ApiError => e + puts "Exception when calling MasterAccountApi->corporate_sub_account_id_delete: #{e}" +end +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **id** | **Integer**| Id of the sub-account organization to be deleted | + +### Return type + +nil (empty response body) + +### Authorization + +[api-key](../README.md#api-key), [partner-key](../README.md#partner-key) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + + # **corporate_sub_account_id_get** > SubAccountDetailsResponse corporate_sub_account_id_get(id) diff --git a/docs/RequestContactImport.md b/docs/RequestContactImport.md index a3ea879..3e0db47 100644 --- a/docs/RequestContactImport.md +++ b/docs/RequestContactImport.md @@ -3,8 +3,9 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**file_url** | **String** | Mandatory if fileBody is not defined. URL of the file to be imported (no local file). Possible file formats: .txt, .csv | [optional] -**file_body** | **String** | Mandatory if fileUrl is not defined. CSV content to be imported. Use semicolon to separate multiple attributes. Maximum allowed file body size is 10MB . However we recommend a safe limit of around 8 MB to avoid the issues caused due to increase of file body size while parsing. Please use fileUrl instead to import bigger files. | [optional] +**file_url** | **String** | Mandatory if fileBody or jsonBody is not defined. URL of the file to be imported (no local file). Possible file formats: .txt, .csv, .json | [optional] +**file_body** | **String** | Mandatory if fileUrl and jsonBody is not defined. CSV content to be imported. Use semicolon to separate multiple attributes. Maximum allowed file body size is 10MB . However we recommend a safe limit of around 8 MB to avoid the issues caused due to increase of file body size while parsing. Please use fileUrl instead to import bigger files. | [optional] +**json_body** | **Array<Hash<String, Object>>** | **Mandatory if fileUrl and fileBody is not defined.** JSON content to be imported. **Maximum allowed json body size is 10MB** . However we recommend a safe limit of around 8 MB to avoid the issues caused due to increase of json body size while parsing. Please use fileUrl instead to import bigger files. | [optional] **list_ids** | **Array<Integer>** | Mandatory if newList is not defined. Ids of the lists in which the contacts shall be imported. For example, [2, 4, 7]. | [optional] **notify_url** | **String** | URL that will be called once the import process is finished. For reference, https://help.sendinblue.com/hc/en-us/articles/360007666479 | [optional] **new_list** | [**RequestContactImportNewList**](RequestContactImportNewList.md) | | [optional] diff --git a/docs/SendSmtpEmail.md b/docs/SendSmtpEmail.md index 997fe4c..1947609 100644 --- a/docs/SendSmtpEmail.md +++ b/docs/SendSmtpEmail.md @@ -11,11 +11,11 @@ Name | Type | Description | Notes **text_content** | **String** | Plain Text body of the message ( Ignored if 'templateId' is passed ) | [optional] **subject** | **String** | Subject of the message. Mandatory if 'templateId' is not passed | [optional] **reply_to** | [**SendSmtpEmailReplyTo**](SendSmtpEmailReplyTo.md) | | [optional] -**attachment** | [**Array<SendSmtpEmailAttachment>**](SendSmtpEmailAttachment.md) | Pass the absolute URL (no local file) or the base64 content of the attachment along with the attachment name (Mandatory if attachment content is passed). For example, `[{\"url\":\"https://attachment.domain.com/myAttachmentFromUrl.jpg\", \"name\":\"myAttachmentFromUrl.jpg\"}, {\"content\":\"base64 example content\", \"name\":\"myAttachmentFromBase64.jpg\"}]`. Allowed extensions for attachment file: xlsx, xls, ods, docx, docm, doc, csv, pdf, txt, gif, jpg, jpeg, png, tif, tiff, rtf, bmp, cgm, css, shtml, html, htm, zip, xml, ppt, pptx, tar, ez, ics, mobi, msg, pub, eps, odt, mp3, m4a, m4v, wma, ogg, flac, wav, aif, aifc, aiff, mp4, mov, avi, mkv, mpeg, mpg, wmv and pkpass ( If 'templateId' is passed and is in New Template Language format then both attachment url and content are accepted. If template is in Old template Language format, then 'attachment' is ignored ) | [optional] +**attachment** | [**Array<SendSmtpEmailAttachment>**](SendSmtpEmailAttachment.md) | Pass the absolute URL (no local file) or the base64 content of the attachment along with the attachment name (Mandatory if attachment content is passed). For example, `[{\"url\":\"https://attachment.domain.com/myAttachmentFromUrl.jpg\", \"name\":\"myAttachmentFromUrl.jpg\"}, {\"content\":\"base64 example content\", \"name\":\"myAttachmentFromBase64.jpg\"}]`. Allowed extensions for attachment file: xlsx, xls, ods, docx, docm, doc, csv, pdf, txt, gif, jpg, jpeg, png, tif, tiff, rtf, bmp, cgm, css, shtml, html, htm, zip, xml, ppt, pptx, tar, ez, ics, mobi, msg, pub, eps, odt, mp3, m4a, m4v, wma, ogg, flac, wav, aif, aifc, aiff, mp4, mov, avi, mkv, mpeg, mpg, wmv, pkpass and xlsm ( If 'templateId' is passed and is in New Template Language format then both attachment url and content are accepted. If template is in Old template Language format, then 'attachment' is ignored ) | [optional] **headers** | **Object** | Pass the set of custom headers (not the standard headers) that shall be sent along the mail headers in the original email. 'sender.ip' header can be set (only for dedicated ip users) to mention the IP to be used for sending transactional emails. Headers are allowed in `This-Case-Only` (i.e. words separated by hyphen with first letter of each word in capital letter), they will be converted to such case styling if not in this format in the request payload. For example, `{\"sender.ip\":\"1.2.3.4\", \"X-Mailin-custom\":\"some_custom_header\", \"idempotencyKey\":\"abc-123\"}`. | [optional] -**template_id** | **Integer** | Id of the template. Mandatory if messageVersions are passed | [optional] +**template_id** | **Integer** | Id of the template. | [optional] **params** | **Object** | Pass the set of attributes to customize the template. For example, {\"FNAME\":\"Joe\", \"LNAME\":\"Doe\"}. It's considered only if template is in New Template Language format. | [optional] -**message_versions** | [**Array<SendSmtpEmailMessageVersions>**](SendSmtpEmailMessageVersions.md) | You can customize and send out multiple versions of a templateId. Some global parameters such as **to(mandatory), bcc, cc, replyTo, subject** can also be customized specific to each version. Total number of recipients in one API request must not exceed 200. However, you can still pass upto 99 recipients maximum in one message version. The size of individual params in all the messageVersions shall not exceed 100 KB limit and that of cumulative params shall not exceed 1000 KB. This feature is currently in its beta version. You can follow this **step-by-step guide** on how to use **messageVersions** to batch send emails - https://developers.sendinblue.com/docs/batch-send-transactional-emails | [optional] +**message_versions** | [**Array<SendSmtpEmailMessageVersions>**](SendSmtpEmailMessageVersions.md) | You can customize and send out multiple versions of a mail. templateId can be customized only if global parameter contains templateId. htmlContent and textContent can be customized only if any of the two, htmlContent or textContent, is present in global parameters. Some global parameters such as **to(mandatory), bcc, cc, replyTo, subject** can also be customized specific to each version. Total number of recipients in one API request must not exceed 2000. However, you can still pass upto 99 recipients maximum in one message version. The size of individual params in all the messageVersions shall not exceed 100 KB limit and that of cumulative params shall not exceed 1000 KB. You can follow this **step-by-step guide** on how to use **messageVersions** to batch send emails - https://developers.sendinblue.com/docs/batch-send-transactional-emails | [optional] **tags** | **Array<String>** | Tag your emails to find them more easily | [optional] diff --git a/docs/TaskTypes.md b/docs/TaskTypes.md new file mode 100644 index 0000000..d4903da --- /dev/null +++ b/docs/TaskTypes.md @@ -0,0 +1,10 @@ +# SibApiV3Sdk::TaskTypes + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **String** | Id of task type | [optional] +**icon** | **String** | Icon of task type | [optional] +**title** | **String** | Title of task type | [optional] + + diff --git a/lib/sib-api-v3-sdk.rb b/lib/sib-api-v3-sdk.rb index 9f3d185..862ba0b 100644 --- a/lib/sib-api-v3-sdk.rb +++ b/lib/sib-api-v3-sdk.rb @@ -215,6 +215,7 @@ require 'sib-api-v3-sdk/models/sub_accounts_response_sub_accounts' require 'sib-api-v3-sdk/models/task' require 'sib-api-v3-sdk/models/task_reminder' +require 'sib-api-v3-sdk/models/task_types' require 'sib-api-v3-sdk/models/update_attribute' require 'sib-api-v3-sdk/models/update_attribute_enumeration' require 'sib-api-v3-sdk/models/update_batch_contacts' diff --git a/lib/sib-api-v3-sdk/api/crm_api.rb b/lib/sib-api-v3-sdk/api/crm_api.rb index 4c9b95b..b729ee1 100644 --- a/lib/sib-api-v3-sdk/api/crm_api.rb +++ b/lib/sib-api-v3-sdk/api/crm_api.rb @@ -30,7 +30,7 @@ def setUserAgent(user_agent) end - # Get file data by id. + # Get file details. # @param id File id to get file data. # @param [Hash] opts the optional parameters # @return [FileData] @@ -39,7 +39,7 @@ def crm_files_id_data_get(id, opts = {}) data end - # Get file data by id. + # Get file details # @param id File id to get file data. # @param [Hash] opts the optional parameters # @return [Array<(FileData, Fixnum, Hash)>] FileData data, response status code and response headers @@ -82,7 +82,7 @@ def crm_files_id_data_get_with_http_info(id, opts = {}) end return data, status_code, headers end - # Delete file. + # Delete a file # @param id File id to delete. # @param [Hash] opts the optional parameters # @return [nil] @@ -91,7 +91,7 @@ def crm_files_id_delete(id, opts = {}) nil end - # Delete file. + # Delete a file # @param id File id to delete. # @param [Hash] opts the optional parameters # @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers @@ -133,7 +133,7 @@ def crm_files_id_delete_with_http_info(id, opts = {}) end return data, status_code, headers end - # Download file by id. + # Download a file # @param id File id to download. # @param [Hash] opts the optional parameters # @return [nil] @@ -142,7 +142,7 @@ def crm_files_id_get(id, opts = {}) nil end - # Download file by id. + # Download a file # @param id File id to download. # @param [Hash] opts the optional parameters # @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers @@ -184,7 +184,7 @@ def crm_files_id_get_with_http_info(id, opts = {}) end return data, status_code, headers end - # Upload and create file. + # Upload a file # @param file File data to create a file. # @param [Hash] opts the optional parameters # @option opts [Array] :deals_ids Deal ids linked to a file @@ -194,7 +194,7 @@ def crm_files_post(file, opts = {}) data end - # Upload and create file. + # Upload a file # @param file File data to create a file. # @param [Hash] opts the optional parameters # @option opts [Array] :deals_ids Deal ids linked to a file @@ -240,7 +240,7 @@ def crm_files_post_with_http_info(file, opts = {}) end return data, status_code, headers end - # Delete Note by ID + # Delete a note # @param id Note ID to delete # @param [Hash] opts the optional parameters # @return [nil] @@ -249,7 +249,7 @@ def crm_notes_id_delete(id, opts = {}) nil end - # Delete Note by ID + # Delete a note # @param id Note ID to delete # @param [Hash] opts the optional parameters # @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers @@ -291,7 +291,7 @@ def crm_notes_id_delete_with_http_info(id, opts = {}) end return data, status_code, headers end - # Get one Note by ID + # Get a note # @param id Note ID to get # @param [Hash] opts the optional parameters # @return [Note] @@ -300,7 +300,7 @@ def crm_notes_id_get(id, opts = {}) data end - # Get one Note by ID + # Get a note # @param id Note ID to get # @param [Hash] opts the optional parameters # @return [Array<(Note, Fixnum, Hash)>] Note data, response status code and response headers @@ -401,7 +401,7 @@ def crm_notes_id_patch_with_http_info(id, body, opts = {}) end return data, status_code, headers end - # Create a new Note + # Create a note # @param body Note data to create a note. # @param [Hash] opts the optional parameters # @return [Note] @@ -410,7 +410,7 @@ def crm_notes_post(body, opts = {}) data end - # Create a new Note + # Create a note # @param body Note data to create a note. # @param [Hash] opts the optional parameters # @return [Array<(Note, Fixnum, Hash)>] Note data, response status code and response headers @@ -453,7 +453,7 @@ def crm_notes_post_with_http_info(body, opts = {}) end return data, status_code, headers end - # Delete Task by id + # Delete a task # @param id # @param [Hash] opts the optional parameters # @return [nil] @@ -462,7 +462,7 @@ def crm_tasks_id_delete(id, opts = {}) nil end - # Delete Task by id + # Delete a task # @param id # @param [Hash] opts the optional parameters # @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers @@ -504,7 +504,7 @@ def crm_tasks_id_delete_with_http_info(id, opts = {}) end return data, status_code, headers end - # Get one Task by ID + # Get a task # @param id # @param [Hash] opts the optional parameters # @return [Task] @@ -513,7 +513,7 @@ def crm_tasks_id_get(id, opts = {}) data end - # Get one Task by ID + # Get a task # @param id # @param [Hash] opts the optional parameters # @return [Array<(Task, Fixnum, Hash)>] Task data, response status code and response headers @@ -556,7 +556,7 @@ def crm_tasks_id_get_with_http_info(id, opts = {}) end return data, status_code, headers end - # Update partial existing task + # Update a task # @param id # @param body Updated task details. # @param [Hash] opts the optional parameters @@ -566,7 +566,7 @@ def crm_tasks_id_patch(id, body, opts = {}) data end - # Update partial existing task + # Update a task # @param id # @param body Updated task details. # @param [Hash] opts the optional parameters @@ -614,7 +614,7 @@ def crm_tasks_id_patch_with_http_info(id, body, opts = {}) end return data, status_code, headers end - # Create a new Task + # Create a task # @param body Task name. # @param [Hash] opts the optional parameters # @return [Task] @@ -623,7 +623,7 @@ def crm_tasks_post(body, opts = {}) data end - # Create a new Task + # Create a task # @param body Task name. # @param [Hash] opts the optional parameters # @return [Array<(Task, Fixnum, Hash)>] Task data, response status code and response headers @@ -666,5 +666,51 @@ def crm_tasks_post_with_http_info(body, opts = {}) end return data, status_code, headers end + # Get all task types + # @param [Hash] opts the optional parameters + # @return [TaskTypes] + def crm_tasktypes_get(opts = {}) + data, _status_code, _headers = crm_tasktypes_get_with_http_info(opts) + data + end + + # Get all task types + # @param [Hash] opts the optional parameters + # @return [Array<(TaskTypes, Fixnum, Hash)>] TaskTypes data, response status code and response headers + def crm_tasktypes_get_with_http_info(opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: CRMApi.crm_tasktypes_get ...' + end + # resource path + local_var_path = '/crm/tasktypes' + + # query parameters + query_params = {} + + # header parameters + header_params = {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) + # HTTP header 'Content-Type' + header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) + + # form parameters + form_params = {} + + # http body (model) + post_body = nil + auth_names = ['api-key', 'partner-key'] + data, status_code, headers = @api_client.call_api(:GET, local_var_path, + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => 'TaskTypes') + if @api_client.config.debugging + @api_client.config.logger.debug "API called: CRMApi#crm_tasktypes_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end end end diff --git a/lib/sib-api-v3-sdk/api/master_account_api.rb b/lib/sib-api-v3-sdk/api/master_account_api.rb index 1f95120..343c60a 100644 --- a/lib/sib-api-v3-sdk/api/master_account_api.rb +++ b/lib/sib-api-v3-sdk/api/master_account_api.rb @@ -140,6 +140,57 @@ def corporate_sub_account_get_with_http_info(offset, limit, opts = {}) end return data, status_code, headers end + # Delete a sub-account + # @param id Id of the sub-account organization to be deleted + # @param [Hash] opts the optional parameters + # @return [nil] + def corporate_sub_account_id_delete(id, opts = {}) + corporate_sub_account_id_delete_with_http_info(id, opts) + nil + end + + # Delete a sub-account + # @param id Id of the sub-account organization to be deleted + # @param [Hash] opts the optional parameters + # @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers + def corporate_sub_account_id_delete_with_http_info(id, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: MasterAccountApi.corporate_sub_account_id_delete ...' + 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 MasterAccountApi.corporate_sub_account_id_delete" + end + # resource path + local_var_path = '/corporate/subAccount/{id}'.sub('{' + 'id' + '}', id.to_s) + + # query parameters + query_params = {} + + # header parameters + header_params = {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) + # HTTP header 'Content-Type' + header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) + + # form parameters + form_params = {} + + # http body (model) + post_body = nil + auth_names = ['api-key', 'partner-key'] + data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: MasterAccountApi#corporate_sub_account_id_delete\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end # Get sub-account details # This endpoint will provide the details of specified sub-account organization # @param id Id of the sub-account organization diff --git a/lib/sib-api-v3-sdk/api/transactional_emails_api.rb b/lib/sib-api-v3-sdk/api/transactional_emails_api.rb index c4e64ce..879daf1 100644 --- a/lib/sib-api-v3-sdk/api/transactional_emails_api.rb +++ b/lib/sib-api-v3-sdk/api/transactional_emails_api.rb @@ -438,8 +438,8 @@ def get_email_event_report_with_http_info(opts = {}) fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling TransactionalEmailsApi.get_email_event_report, must be smaller than or equal to 100.' end - if @api_client.config.client_side_validation && opts[:'event'] && !['bounces', 'hardBounces', 'softBounces', 'delivered', 'spam', 'requests', 'opened', 'clicks', 'invalid', 'deferred', 'blocked', 'unsubscribed', 'error'].include?(opts[:'event']) - fail ArgumentError, 'invalid value for "event", must be one of bounces, hardBounces, softBounces, delivered, spam, requests, opened, clicks, invalid, deferred, blocked, unsubscribed, error' + if @api_client.config.client_side_validation && opts[:'event'] && !['bounces', 'hardBounces', 'softBounces', 'delivered', 'spam', 'requests', 'opened', 'clicks', 'invalid', 'deferred', 'blocked', 'unsubscribed', 'error', 'loadedByProxy'].include?(opts[:'event']) + fail ArgumentError, 'invalid value for "event", must be one of bounces, hardBounces, softBounces, delivered, spam, requests, opened, clicks, invalid, deferred, blocked, unsubscribed, error, loadedByProxy' end if @api_client.config.client_side_validation && opts[:'sort'] && !['asc', 'desc'].include?(opts[:'sort']) fail ArgumentError, 'invalid value for "sort", must be one of asc, desc' diff --git a/lib/sib-api-v3-sdk/models/create_sub_account.rb b/lib/sib-api-v3-sdk/models/create_sub_account.rb index f51f2cb..287fd51 100644 --- a/lib/sib-api-v3-sdk/models/create_sub_account.rb +++ b/lib/sib-api-v3-sdk/models/create_sub_account.rb @@ -17,6 +17,9 @@ class CreateSubAccount # Name of the organization attr_accessor :company_name + # Email address for the organization + attr_accessor :email + # Language for identifying localization information attr_accessor :language @@ -49,6 +52,7 @@ def valid?(value) def self.attribute_map { :'company_name' => :'companyName', + :'email' => :'email', :'language' => :'language', :'timezone' => :'timezone' } @@ -58,6 +62,7 @@ def self.attribute_map def self.swagger_types { :'company_name' => :'String', + :'email' => :'String', :'language' => :'String', :'timezone' => :'String' } @@ -75,6 +80,10 @@ def initialize(attributes = {}) self.company_name = attributes[:'companyName'] end + if attributes.has_key?(:'email') + self.email = attributes[:'email'] + end + if attributes.has_key?(:'language') self.language = attributes[:'language'] end @@ -92,6 +101,10 @@ def list_invalid_properties invalid_properties.push('invalid value for "company_name", company_name cannot be nil.') end + if @email.nil? + invalid_properties.push('invalid value for "email", email cannot be nil.') + end + invalid_properties end @@ -99,6 +112,7 @@ def list_invalid_properties # @return true if the model is valid def valid? return false if @company_name.nil? + return false if @email.nil? language_validator = EnumAttributeValidator.new('String', ['en', 'fr', 'it', 'es', 'pt', 'de']) return false unless language_validator.valid?(@language) true @@ -120,6 +134,7 @@ def ==(o) return true if self.equal?(o) self.class == o.class && company_name == o.company_name && + email == o.email && language == o.language && timezone == o.timezone end @@ -133,7 +148,7 @@ def eql?(o) # Calculates hash code according to all attributes. # @return [Fixnum] Hash code def hash - [company_name, language, timezone].hash + [company_name, email, language, timezone].hash end # Builds the object from hash diff --git a/lib/sib-api-v3-sdk/models/get_email_event_report_events.rb b/lib/sib-api-v3-sdk/models/get_email_event_report_events.rb index 3f55de4..47c614a 100644 --- a/lib/sib-api-v3-sdk/models/get_email_event_report_events.rb +++ b/lib/sib-api-v3-sdk/models/get_email_event_report_events.rb @@ -186,7 +186,7 @@ def valid? return false if @date.nil? return false if @message_id.nil? return false if @event.nil? - event_validator = EnumAttributeValidator.new('String', ['bounces', 'hardBounces', 'softBounces', 'delivered', 'spam', 'requests', 'opened', 'clicks', 'invalid', 'deferred', 'blocked', 'unsubscribed', 'error']) + event_validator = EnumAttributeValidator.new('String', ['bounces', 'hardBounces', 'softBounces', 'delivered', 'spam', 'requests', 'opened', 'clicks', 'invalid', 'deferred', 'blocked', 'unsubscribed', 'error', 'loadedByProxy']) return false unless event_validator.valid?(@event) true end @@ -194,7 +194,7 @@ def valid? # Custom attribute writer method checking allowed values (enum). # @param [Object] event Object to be assigned def event=(event) - validator = EnumAttributeValidator.new('String', ['bounces', 'hardBounces', 'softBounces', 'delivered', 'spam', 'requests', 'opened', 'clicks', 'invalid', 'deferred', 'blocked', 'unsubscribed', 'error']) + validator = EnumAttributeValidator.new('String', ['bounces', 'hardBounces', 'softBounces', 'delivered', 'spam', 'requests', 'opened', 'clicks', 'invalid', 'deferred', 'blocked', 'unsubscribed', 'error', 'loadedByProxy']) unless validator.valid?(event) fail ArgumentError, 'invalid value for "event", must be one of #{validator.allowable_values}.' end diff --git a/lib/sib-api-v3-sdk/models/request_contact_import.rb b/lib/sib-api-v3-sdk/models/request_contact_import.rb index ac3d031..82a269e 100644 --- a/lib/sib-api-v3-sdk/models/request_contact_import.rb +++ b/lib/sib-api-v3-sdk/models/request_contact_import.rb @@ -14,12 +14,15 @@ module SibApiV3Sdk class RequestContactImport - # Mandatory if fileBody is not defined. URL of the file to be imported (no local file). Possible file formats: .txt, .csv + # Mandatory if fileBody or jsonBody is not defined. URL of the file to be imported (no local file). Possible file formats: .txt, .csv, .json attr_accessor :file_url - # Mandatory if fileUrl is not defined. CSV content to be imported. Use semicolon to separate multiple attributes. Maximum allowed file body size is 10MB . However we recommend a safe limit of around 8 MB to avoid the issues caused due to increase of file body size while parsing. Please use fileUrl instead to import bigger files. + # Mandatory if fileUrl and jsonBody is not defined. CSV content to be imported. Use semicolon to separate multiple attributes. Maximum allowed file body size is 10MB . However we recommend a safe limit of around 8 MB to avoid the issues caused due to increase of file body size while parsing. Please use fileUrl instead to import bigger files. attr_accessor :file_body + # **Mandatory if fileUrl and fileBody is not defined.** JSON content to be imported. **Maximum allowed json body size is 10MB** . However we recommend a safe limit of around 8 MB to avoid the issues caused due to increase of json body size while parsing. Please use fileUrl instead to import bigger files. + attr_accessor :json_body + # Mandatory if newList is not defined. Ids of the lists in which the contacts shall be imported. For example, [2, 4, 7]. attr_accessor :list_ids @@ -45,6 +48,7 @@ def self.attribute_map { :'file_url' => :'fileUrl', :'file_body' => :'fileBody', + :'json_body' => :'jsonBody', :'list_ids' => :'listIds', :'notify_url' => :'notifyUrl', :'new_list' => :'newList', @@ -60,6 +64,7 @@ def self.swagger_types { :'file_url' => :'String', :'file_body' => :'String', + :'json_body' => :'Array>', :'list_ids' => :'Array', :'notify_url' => :'String', :'new_list' => :'RequestContactImportNewList', @@ -86,6 +91,12 @@ def initialize(attributes = {}) self.file_body = attributes[:'fileBody'] end + if attributes.has_key?(:'jsonBody') + if (value = attributes[:'jsonBody']).is_a?(Array) + self.json_body = value + end + end + if attributes.has_key?(:'listIds') if (value = attributes[:'listIds']).is_a?(Array) self.list_ids = value @@ -145,6 +156,7 @@ def ==(o) self.class == o.class && file_url == o.file_url && file_body == o.file_body && + json_body == o.json_body && list_ids == o.list_ids && notify_url == o.notify_url && new_list == o.new_list && @@ -163,7 +175,7 @@ def eql?(o) # Calculates hash code according to all attributes. # @return [Fixnum] Hash code def hash - [file_url, file_body, list_ids, notify_url, new_list, email_blacklist, sms_blacklist, update_existing_contacts, empty_contacts_attributes].hash + [file_url, file_body, json_body, list_ids, notify_url, new_list, email_blacklist, sms_blacklist, update_existing_contacts, empty_contacts_attributes].hash end # Builds the object from hash diff --git a/lib/sib-api-v3-sdk/models/send_smtp_email.rb b/lib/sib-api-v3-sdk/models/send_smtp_email.rb index dc4279e..84fda9d 100644 --- a/lib/sib-api-v3-sdk/models/send_smtp_email.rb +++ b/lib/sib-api-v3-sdk/models/send_smtp_email.rb @@ -36,19 +36,19 @@ class SendSmtpEmail attr_accessor :reply_to - # Pass the absolute URL (no local file) or the base64 content of the attachment along with the attachment name (Mandatory if attachment content is passed). For example, `[{\"url\":\"https://attachment.domain.com/myAttachmentFromUrl.jpg\", \"name\":\"myAttachmentFromUrl.jpg\"}, {\"content\":\"base64 example content\", \"name\":\"myAttachmentFromBase64.jpg\"}]`. Allowed extensions for attachment file: xlsx, xls, ods, docx, docm, doc, csv, pdf, txt, gif, jpg, jpeg, png, tif, tiff, rtf, bmp, cgm, css, shtml, html, htm, zip, xml, ppt, pptx, tar, ez, ics, mobi, msg, pub, eps, odt, mp3, m4a, m4v, wma, ogg, flac, wav, aif, aifc, aiff, mp4, mov, avi, mkv, mpeg, mpg, wmv and pkpass ( If 'templateId' is passed and is in New Template Language format then both attachment url and content are accepted. If template is in Old template Language format, then 'attachment' is ignored ) + # Pass the absolute URL (no local file) or the base64 content of the attachment along with the attachment name (Mandatory if attachment content is passed). For example, `[{\"url\":\"https://attachment.domain.com/myAttachmentFromUrl.jpg\", \"name\":\"myAttachmentFromUrl.jpg\"}, {\"content\":\"base64 example content\", \"name\":\"myAttachmentFromBase64.jpg\"}]`. Allowed extensions for attachment file: xlsx, xls, ods, docx, docm, doc, csv, pdf, txt, gif, jpg, jpeg, png, tif, tiff, rtf, bmp, cgm, css, shtml, html, htm, zip, xml, ppt, pptx, tar, ez, ics, mobi, msg, pub, eps, odt, mp3, m4a, m4v, wma, ogg, flac, wav, aif, aifc, aiff, mp4, mov, avi, mkv, mpeg, mpg, wmv, pkpass and xlsm ( If 'templateId' is passed and is in New Template Language format then both attachment url and content are accepted. If template is in Old template Language format, then 'attachment' is ignored ) attr_accessor :attachment # Pass the set of custom headers (not the standard headers) that shall be sent along the mail headers in the original email. 'sender.ip' header can be set (only for dedicated ip users) to mention the IP to be used for sending transactional emails. Headers are allowed in `This-Case-Only` (i.e. words separated by hyphen with first letter of each word in capital letter), they will be converted to such case styling if not in this format in the request payload. For example, `{\"sender.ip\":\"1.2.3.4\", \"X-Mailin-custom\":\"some_custom_header\", \"idempotencyKey\":\"abc-123\"}`. attr_accessor :headers - # Id of the template. Mandatory if messageVersions are passed + # Id of the template. attr_accessor :template_id # Pass the set of attributes to customize the template. For example, {\"FNAME\":\"Joe\", \"LNAME\":\"Doe\"}. It's considered only if template is in New Template Language format. attr_accessor :params - # You can customize and send out multiple versions of a templateId. Some global parameters such as **to(mandatory), bcc, cc, replyTo, subject** can also be customized specific to each version. Total number of recipients in one API request must not exceed 200. However, you can still pass upto 99 recipients maximum in one message version. The size of individual params in all the messageVersions shall not exceed 100 KB limit and that of cumulative params shall not exceed 1000 KB. This feature is currently in its beta version. You can follow this **step-by-step guide** on how to use **messageVersions** to batch send emails - https://developers.sendinblue.com/docs/batch-send-transactional-emails + # You can customize and send out multiple versions of a mail. templateId can be customized only if global parameter contains templateId. htmlContent and textContent can be customized only if any of the two, htmlContent or textContent, is present in global parameters. Some global parameters such as **to(mandatory), bcc, cc, replyTo, subject** can also be customized specific to each version. Total number of recipients in one API request must not exceed 2000. However, you can still pass upto 99 recipients maximum in one message version. The size of individual params in all the messageVersions shall not exceed 100 KB limit and that of cumulative params shall not exceed 1000 KB. You can follow this **step-by-step guide** on how to use **messageVersions** to batch send emails - https://developers.sendinblue.com/docs/batch-send-transactional-emails attr_accessor :message_versions # Tag your emails to find them more easily diff --git a/lib/sib-api-v3-sdk/models/task_types.rb b/lib/sib-api-v3-sdk/models/task_types.rb new file mode 100644 index 0000000..86b0004 --- /dev/null +++ b/lib/sib-api-v3-sdk/models/task_types.rb @@ -0,0 +1,206 @@ +=begin +#SendinBlue API + +#SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | + +OpenAPI spec version: 3.0.0 +Contact: contact@sendinblue.com +Generated by: https://github.com/swagger-api/swagger-codegen.git +Swagger Codegen version: 2.4.19 + +=end + +require 'date' + +module SibApiV3Sdk + # Task types details + class TaskTypes + # Id of task type + attr_accessor :id + + # Icon of task type + attr_accessor :icon + + # Title of task type + attr_accessor :title + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'id' => :'id', + :'icon' => :'icon', + :'title' => :'title' + } + end + + # Attribute type mapping. + def self.swagger_types + { + :'id' => :'String', + :'icon' => :'String', + :'title' => :'String' + } + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + return unless attributes.is_a?(Hash) + + # convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v } + + if attributes.has_key?(:'id') + self.id = attributes[:'id'] + end + + if attributes.has_key?(:'icon') + self.icon = attributes[:'icon'] + end + + if attributes.has_key?(:'title') + self.title = attributes[:'title'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + id == o.id && + icon == o.icon && + title == o.title + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Fixnum] Hash code + def hash + [id, icon, title].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + self.class.swagger_types.each_pair do |key, type| + if type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end # or else data not found in attributes(hash), not an issue as the data can be optional + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :DateTime + DateTime.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :BOOLEAN + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + temp_model = SibApiV3Sdk.const_get(type).new + temp_model.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + next if value.nil? + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + + end +end diff --git a/lib/sib-api-v3-sdk/version.rb b/lib/sib-api-v3-sdk/version.rb index 161dc64..bfe3688 100644 --- a/lib/sib-api-v3-sdk/version.rb +++ b/lib/sib-api-v3-sdk/version.rb @@ -11,5 +11,5 @@ =end module SibApiV3Sdk - VERSION = "8.0.0" + VERSION = "8.5.0" end diff --git a/spec/api/crm_api_spec.rb b/spec/api/crm_api_spec.rb index a0d0467..a80bb8c 100644 --- a/spec/api/crm_api_spec.rb +++ b/spec/api/crm_api_spec.rb @@ -33,7 +33,7 @@ end # unit tests for crm_files_id_data_get - # Get file data by id. + # Get file details # @param id File id to get file data. # @param [Hash] opts the optional parameters # @return [FileData] @@ -44,7 +44,7 @@ end # unit tests for crm_files_id_delete - # Delete file. + # Delete a file # @param id File id to delete. # @param [Hash] opts the optional parameters # @return [nil] @@ -55,7 +55,7 @@ end # unit tests for crm_files_id_get - # Download file by id. + # Download a file # @param id File id to download. # @param [Hash] opts the optional parameters # @return [nil] @@ -66,7 +66,7 @@ end # unit tests for crm_files_post - # Upload and create file. + # Upload a file # @param file File data to create a file. # @param [Hash] opts the optional parameters # @option opts [Array] :deals_ids Deal ids linked to a file @@ -78,7 +78,7 @@ end # unit tests for crm_notes_id_delete - # Delete Note by ID + # Delete a note # @param id Note ID to delete # @param [Hash] opts the optional parameters # @return [nil] @@ -89,7 +89,7 @@ end # unit tests for crm_notes_id_get - # Get one Note by ID + # Get a note # @param id Note ID to get # @param [Hash] opts the optional parameters # @return [Note] @@ -112,7 +112,7 @@ end # unit tests for crm_notes_post - # Create a new Note + # Create a note # @param body Note data to create a note. # @param [Hash] opts the optional parameters # @return [Note] @@ -123,7 +123,7 @@ end # unit tests for crm_tasks_id_delete - # Delete Task by id + # Delete a task # @param id # @param [Hash] opts the optional parameters # @return [nil] @@ -134,7 +134,7 @@ end # unit tests for crm_tasks_id_get - # Get one Task by ID + # Get a task # @param id # @param [Hash] opts the optional parameters # @return [Task] @@ -145,7 +145,7 @@ end # unit tests for crm_tasks_id_patch - # Update partial existing task + # Update a task # @param id # @param body Updated task details. # @param [Hash] opts the optional parameters @@ -157,7 +157,7 @@ end # unit tests for crm_tasks_post - # Create a new Task + # Create a task # @param body Task name. # @param [Hash] opts the optional parameters # @return [Task] @@ -167,4 +167,14 @@ end end + # unit tests for crm_tasktypes_get + # Get all task types + # @param [Hash] opts the optional parameters + # @return [TaskTypes] + describe 'crm_tasktypes_get test' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + end diff --git a/spec/api/master_account_api_spec.rb b/spec/api/master_account_api_spec.rb index 3b63b37..f3be164 100644 --- a/spec/api/master_account_api_spec.rb +++ b/spec/api/master_account_api_spec.rb @@ -56,6 +56,17 @@ end end + # unit tests for corporate_sub_account_id_delete + # Delete a sub-account + # @param id Id of the sub-account organization to be deleted + # @param [Hash] opts the optional parameters + # @return [nil] + describe 'corporate_sub_account_id_delete test' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + # unit tests for corporate_sub_account_id_get # Get sub-account details # This endpoint will provide the details of specified sub-account organization diff --git a/spec/models/create_sub_account_spec.rb b/spec/models/create_sub_account_spec.rb index ea25789..03268d5 100644 --- a/spec/models/create_sub_account_spec.rb +++ b/spec/models/create_sub_account_spec.rb @@ -38,6 +38,12 @@ end end + describe 'test attribute "email"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + describe 'test attribute "language"' do it 'should work' do # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers diff --git a/spec/models/get_email_event_report_events_spec.rb b/spec/models/get_email_event_report_events_spec.rb index 416adbf..96762ab 100644 --- a/spec/models/get_email_event_report_events_spec.rb +++ b/spec/models/get_email_event_report_events_spec.rb @@ -59,7 +59,7 @@ describe 'test attribute "event"' do it 'should work' do # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - # validator = Petstore::EnumTest::EnumAttributeValidator.new('String', ["bounces", "hardBounces", "softBounces", "delivered", "spam", "requests", "opened", "clicks", "invalid", "deferred", "blocked", "unsubscribed", "error"]) + # validator = Petstore::EnumTest::EnumAttributeValidator.new('String', ["bounces", "hardBounces", "softBounces", "delivered", "spam", "requests", "opened", "clicks", "invalid", "deferred", "blocked", "unsubscribed", "error", "loadedByProxy"]) # validator.allowable_values.each do |value| # expect { @instance.event = value }.not_to raise_error # end diff --git a/spec/models/request_contact_import_spec.rb b/spec/models/request_contact_import_spec.rb index d0984a1..9808742 100644 --- a/spec/models/request_contact_import_spec.rb +++ b/spec/models/request_contact_import_spec.rb @@ -44,6 +44,12 @@ end end + describe 'test attribute "json_body"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + describe 'test attribute "list_ids"' do it 'should work' do # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers diff --git a/spec/models/task_types_spec.rb b/spec/models/task_types_spec.rb new file mode 100644 index 0000000..c273dd0 --- /dev/null +++ b/spec/models/task_types_spec.rb @@ -0,0 +1,53 @@ +=begin +#SendinBlue API + +#SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | + +OpenAPI spec version: 3.0.0 +Contact: contact@sendinblue.com +Generated by: https://github.com/swagger-api/swagger-codegen.git +Swagger Codegen version: 2.4.19 + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for SibApiV3Sdk::TaskTypes +# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) +# Please update as you see appropriate +describe 'TaskTypes' do + before do + # run before each test + @instance = SibApiV3Sdk::TaskTypes.new + end + + after do + # run after each test + end + + describe 'test an instance of TaskTypes' do + it 'should create an instance of TaskTypes' do + expect(@instance).to be_instance_of(SibApiV3Sdk::TaskTypes) + end + end + describe 'test attribute "id"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "icon"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "title"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + +end From 9fa9d7236a3cd7657c65cabcb54bc2559231a5e2 Mon Sep 17 00:00:00 2001 From: nagendraSIB Date: Wed, 2 Mar 2022 13:22:35 +0530 Subject: [PATCH 02/10] update ruby wrapper --- git_push.sh | 55 +++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 55 insertions(+) create mode 100644 git_push.sh diff --git a/git_push.sh b/git_push.sh new file mode 100644 index 0000000..89eb49e --- /dev/null +++ b/git_push.sh @@ -0,0 +1,55 @@ +#!/bin/sh +# +# Generated by: https://github.com/swagger-api/swagger-codegen.git +# +# ref: https://help.github.com/articles/adding-an-existing-project-to-github-using-the-command-line/ +# +# Usage example: /bin/sh ./git_push.sh wing328 swagger-petstore-perl "minor update" + +git_user_id=$1 +git_repo_id=$2 +release_note=$3 + +if [ "$git_user_id" = "" ]; then + git_user_id="GIT_USER_ID" + echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id" +fi + +if [ "$git_repo_id" = "" ]; then + git_repo_id="GIT_REPO_ID" + echo "[INFO] No command line input provided. Set \$git_repo_id to $git_repo_id" +fi + +if [ "$release_note" = "" ]; then + release_note="Minor update" + echo "[INFO] No command line input provided. Set \$release_note to $release_note" +fi + +# Initialize the local directory as a Git repository +git init + +# Adds the files in the local repository and stages them for commit. +git add . + +# Commits the tracked changes and prepares them to be pushed to a remote repository. +git commit -m "$release_note" + +# Sets the new remote +git_remote=`git remote` +if [ "$git_remote" = "" ]; then # git remote not defined + + if [ "$GIT_TOKEN" = "" ]; then + echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment." + git remote add origin https://github.com/${git_user_id}/${git_repo_id}.git + else + git remote add origin https://${git_user_id}:${GIT_TOKEN}@github.com/${git_user_id}/${git_repo_id}.git + fi + +fi + +git pull origin master + +# Pushes (Forces) the changes in the local repository up to the remote repository +echo "Git pushing to https://github.com/${git_user_id}/${git_repo_id}.git" +git push origin master 2>&1 | grep -v 'To https' + From 2b18b417d387c2540f518b7e9e1e02bd970e3aeb Mon Sep 17 00:00:00 2001 From: nagendraSIB Date: Wed, 2 Mar 2022 17:38:50 +0530 Subject: [PATCH 03/10] delete unwanted file --- git_push.sh | 55 ----------------------------------------------------- 1 file changed, 55 deletions(-) delete mode 100644 git_push.sh diff --git a/git_push.sh b/git_push.sh deleted file mode 100644 index 89eb49e..0000000 --- a/git_push.sh +++ /dev/null @@ -1,55 +0,0 @@ -#!/bin/sh -# -# Generated by: https://github.com/swagger-api/swagger-codegen.git -# -# ref: https://help.github.com/articles/adding-an-existing-project-to-github-using-the-command-line/ -# -# Usage example: /bin/sh ./git_push.sh wing328 swagger-petstore-perl "minor update" - -git_user_id=$1 -git_repo_id=$2 -release_note=$3 - -if [ "$git_user_id" = "" ]; then - git_user_id="GIT_USER_ID" - echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id" -fi - -if [ "$git_repo_id" = "" ]; then - git_repo_id="GIT_REPO_ID" - echo "[INFO] No command line input provided. Set \$git_repo_id to $git_repo_id" -fi - -if [ "$release_note" = "" ]; then - release_note="Minor update" - echo "[INFO] No command line input provided. Set \$release_note to $release_note" -fi - -# Initialize the local directory as a Git repository -git init - -# Adds the files in the local repository and stages them for commit. -git add . - -# Commits the tracked changes and prepares them to be pushed to a remote repository. -git commit -m "$release_note" - -# Sets the new remote -git_remote=`git remote` -if [ "$git_remote" = "" ]; then # git remote not defined - - if [ "$GIT_TOKEN" = "" ]; then - echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment." - git remote add origin https://github.com/${git_user_id}/${git_repo_id}.git - else - git remote add origin https://${git_user_id}:${GIT_TOKEN}@github.com/${git_user_id}/${git_repo_id}.git - fi - -fi - -git pull origin master - -# Pushes (Forces) the changes in the local repository up to the remote repository -echo "Git pushing to https://github.com/${git_user_id}/${git_repo_id}.git" -git push origin master 2>&1 | grep -v 'To https' - From c7cb2c285dc7f4f894bab287ad6dc2f2d5bf0430 Mon Sep 17 00:00:00 2001 From: nagendraSIB Date: Wed, 2 Mar 2022 18:05:48 +0530 Subject: [PATCH 04/10] version update --- lib/sib-api-v3-sdk/version.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/sib-api-v3-sdk/version.rb b/lib/sib-api-v3-sdk/version.rb index bfe3688..b9235be 100644 --- a/lib/sib-api-v3-sdk/version.rb +++ b/lib/sib-api-v3-sdk/version.rb @@ -11,5 +11,5 @@ =end module SibApiV3Sdk - VERSION = "8.5.0" + VERSION = "8.1.0" end From ec613272401ab69ecfc6da3bbc9e26afee3836ad Mon Sep 17 00:00:00 2001 From: NagendraSIB Date: Tue, 16 Aug 2022 17:36:01 +0530 Subject: [PATCH 05/10] latest version 8.2.0 --- README.md | 96 ++- docs/Body.md | 13 +- docs/Body1.md | 13 +- docs/Body10.md | 11 + docs/Body11.md | 8 + docs/Body12.md | 11 + docs/Body2.md | 11 + docs/Body3.md | 9 + docs/Body4.md | 9 + docs/Body5.md | 11 + docs/Body6.md | 18 + docs/Body7.md | 17 + docs/Body8.md | 13 + docs/Body9.md | 8 + docs/CRMApi.md | 762 ------------------ docs/CompaniesApi.md | 425 ++++++++++ docs/CompaniesList.md | 8 + docs/Company.md | 11 + docs/CompanyAttributes.md | 7 + docs/CompanyAttributesInner.md | 12 + docs/Contact.md | 15 - docs/ContactsApi.md | 10 +- docs/ConversationsApi.md | 542 +++++++++++++ docs/ConversationsMessage.md | 17 + docs/ConversationsMessageFile.md | 12 + docs/ConversationsMessageFileImageInfo.md | 10 + docs/CreateContact.md | 2 +- docs/CreateSubAccount.md | 6 +- docs/CreateSubAccountResponse.md | 8 + docs/Deal.md | 11 + docs/DealAttributes.md | 7 + docs/DealAttributesInner.md | 12 + docs/DealsApi.md | 476 +++++++++++ docs/DealsList.md | 8 + docs/EmailCampaignsApi.md | 11 +- docs/FileData.md | 9 +- docs/FileDownloadableLink.md | 8 + docs/FileList.md | 7 + docs/FilesApi.md | 318 ++++++++ docs/GetCampaignStats.md | 2 + docs/GetScheduledEmailByBatchId.md | 9 + docs/GetScheduledEmailByBatchIdBatches.md | 10 + docs/GetScheduledEmailByMessageId.md | 10 + docs/GetSsoToken.md | 2 +- docs/InboundParsingApi.md | 60 ++ docs/InlineResponse200.md | 8 + docs/InlineResponse201.md | 8 + docs/InlineResponse2011.md | 8 + docs/MasterAccountApi.md | 12 +- docs/NoteId.md | 8 + docs/NoteList.md | 7 + docs/NotesApi.md | 312 +++++++ docs/Pipeline.md | 8 + docs/PipelineStage.md | 9 + docs/ScheduleSmtpEmail.md | 10 + docs/SendSmtpEmail.md | 4 +- ...ubAccountDetailsResponsePlanInfoCredits.md | 2 +- docs/SubAccountsResponseSubAccounts.md | 8 +- docs/Task.md | 11 - docs/TaskList.md | 8 + docs/TaskReminder.md | 2 +- docs/TaskTypes.md | 1 - docs/TasksApi.md | 376 +++++++++ docs/TransactionalEmailsApi.md | 199 +++++ docs/UpdateContact.md | 2 +- docs/UpdateEmailCampaign.md | 2 +- docs/UpdateSmtpTemplate.md | 2 +- docs/UploadImageModel.md | 8 + lib/sib-api-v3-sdk.rb | 46 +- lib/sib-api-v3-sdk/api/companies_api.rb | 409 ++++++++++ lib/sib-api-v3-sdk/api/contacts_api.rb | 6 + lib/sib-api-v3-sdk/api/conversations_api.rb | 504 ++++++++++++ lib/sib-api-v3-sdk/api/crm_api.rb | 716 ---------------- lib/sib-api-v3-sdk/api/deals_api.rb | 454 +++++++++++ lib/sib-api-v3-sdk/api/email_campaigns_api.rb | 17 +- lib/sib-api-v3-sdk/api/files_api.rb | 313 +++++++ lib/sib-api-v3-sdk/api/inbound_parsing_api.rb | 55 +- lib/sib-api-v3-sdk/api/master_account_api.rb | 18 +- lib/sib-api-v3-sdk/api/notes_api.rb | 308 +++++++ lib/sib-api-v3-sdk/api/tasks_api.rb | 375 +++++++++ .../api/transactional_emails_api.rb | 195 +++++ lib/sib-api-v3-sdk/models/body.rb | 123 +-- lib/sib-api-v3-sdk/models/body_1.rb | 128 +-- lib/sib-api-v3-sdk/models/body_10.rb | 225 ++++++ lib/sib-api-v3-sdk/models/body_11.rb | 190 +++++ lib/sib-api-v3-sdk/models/body_12.rb | 215 +++++ lib/sib-api-v3-sdk/models/body_2.rb | 223 +++++ lib/sib-api-v3-sdk/models/body_3.rb | 200 +++++ lib/sib-api-v3-sdk/models/body_4.rb | 195 +++++ lib/sib-api-v3-sdk/models/body_5.rb | 223 +++++ lib/sib-api-v3-sdk/models/body_6.rb | 320 ++++++++ lib/sib-api-v3-sdk/models/body_7.rb | 281 +++++++ lib/sib-api-v3-sdk/models/body_8.rb | 245 ++++++ lib/sib-api-v3-sdk/models/body_9.rb | 190 +++++ lib/sib-api-v3-sdk/models/companies_list.rb | 188 +++++ lib/sib-api-v3-sdk/models/company.rb | 220 +++++ .../models/company_attributes.rb | 176 ++++ .../models/company_attributes_inner.rb | 223 +++++ .../models/conversations_message.rb | 324 ++++++++ .../models/conversations_message_file.rb | 239 ++++++ .../conversations_message_file_image_info.rb | 236 ++++++ lib/sib-api-v3-sdk/models/create_contact.rb | 2 +- .../models/create_sub_account.rb | 6 +- .../models/create_sub_account_response.rb | 190 +++++ lib/sib-api-v3-sdk/models/deal.rb | 220 +++++ lib/sib-api-v3-sdk/models/deal_attributes.rb | 176 ++++ .../models/deal_attributes_inner.rb | 223 +++++ lib/sib-api-v3-sdk/models/deals_list.rb | 188 +++++ lib/sib-api-v3-sdk/models/file_data.rb | 76 +- .../models/file_downloadable_link.rb | 190 +++++ lib/sib-api-v3-sdk/models/file_list.rb | 176 ++++ .../models/get_campaign_stats.rb | 22 +- .../models/get_scheduled_email_by_batch_id.rb | 196 +++++ ...et_scheduled_email_by_batch_id_batches.rb} | 136 ++-- .../get_scheduled_email_by_message_id.rb | 254 ++++++ lib/sib-api-v3-sdk/models/get_sso_token.rb | 2 +- .../models/inline_response_200.rb | 191 +++++ .../models/inline_response_201.rb | 191 +++++ .../models/inline_response_201_1.rb | 191 +++++ lib/sib-api-v3-sdk/models/note_id.rb | 186 +++++ lib/sib-api-v3-sdk/models/note_list.rb | 176 ++++ lib/sib-api-v3-sdk/models/pipeline.rb | 188 +++++ lib/sib-api-v3-sdk/models/pipeline_stage.rb | 196 +++++ .../models/schedule_smtp_email.rb | 206 +++++ lib/sib-api-v3-sdk/models/send_smtp_email.rb | 28 +- ...ount_details_response_plan_info_credits.rb | 4 +- ...tails_response_plan_info_credits_emails.rb | 2 +- ...unt_details_response_plan_info_features.rb | 2 +- .../sub_accounts_response_sub_accounts.rb | 8 +- lib/sib-api-v3-sdk/models/task.rb | 123 +-- lib/sib-api-v3-sdk/models/task_list.rb | 188 +++++ lib/sib-api-v3-sdk/models/task_reminder.rb | 2 +- lib/sib-api-v3-sdk/models/task_types.rb | 12 +- lib/sib-api-v3-sdk/models/update_contact.rb | 2 +- .../models/update_email_campaign.rb | 2 +- .../models/update_smtp_template.rb | 2 +- .../models/upload_image_model.rb | 190 +++++ lib/sib-api-v3-sdk/version.rb | 2 +- spec/api/companies_api_spec.rb | 119 +++ spec/api/contacts_api_spec.rb | 2 + spec/api/conversations_api_spec.rb | 140 ++++ spec/api/deals_api_spec.rb | 129 +++ spec/api/email_campaigns_api_spec.rb | 2 +- spec/api/files_api_spec.rb | 99 +++ spec/api/inbound_parsing_api_spec.rb | 12 + spec/api/master_account_api_spec.rb | 8 +- spec/api/notes_api_spec.rb | 97 +++ .../{crm_api_spec.rb => tasks_api_spec.rb} | 117 +-- spec/api/transactional_emails_api_spec.rb | 44 + spec/models/body_10_spec.rb | 59 ++ spec/models/body_11_spec.rb | 41 + spec/models/body_12_spec.rb | 59 ++ spec/models/body_1_spec.rb | 56 +- spec/models/body_2_spec.rb | 59 ++ spec/models/body_3_spec.rb | 47 ++ spec/models/body_4_spec.rb | 47 ++ spec/models/body_5_spec.rb | 59 ++ spec/models/body_6_spec.rb | 101 +++ .../{contact_spec.rb => body_7_spec.rb} | 40 +- spec/models/body_8_spec.rb | 71 ++ spec/models/body_9_spec.rb | 41 + spec/models/body_spec.rb | 56 +- spec/models/companies_list_spec.rb | 41 + spec/models/company_attributes_inner_spec.rb | 65 ++ spec/models/company_attributes_spec.rb | 35 + spec/models/company_spec.rb | 59 ++ ...versations_message_file_image_info_spec.rb | 53 ++ .../models/conversations_message_file_spec.rb | 65 ++ spec/models/conversations_message_spec.rb | 99 +++ .../create_sub_account_response_spec.rb | 41 + spec/models/deal_attributes_inner_spec.rb | 65 ++ spec/models/deal_attributes_spec.rb | 35 + spec/models/deal_spec.rb | 59 ++ spec/models/deals_list_spec.rb | 41 + spec/models/file_data_spec.rb | 24 +- spec/models/file_downloadable_link_spec.rb | 41 + spec/models/file_list_spec.rb | 35 + spec/models/get_campaign_stats_spec.rb | 12 + ...cheduled_email_by_batch_id_batches_spec.rb | 57 ++ .../get_scheduled_email_by_batch_id_spec.rb | 47 ++ .../get_scheduled_email_by_message_id_spec.rb | 57 ++ spec/models/inline_response_200_spec.rb | 41 + spec/models/inline_response_201_1_spec.rb | 41 + spec/models/inline_response_201_spec.rb | 41 + spec/models/note_id_spec.rb | 41 + spec/models/note_list_spec.rb | 35 + spec/models/pipeline_spec.rb | 41 + spec/models/pipeline_stage_spec.rb | 47 ++ spec/models/schedule_smtp_email_spec.rb | 53 ++ spec/models/send_smtp_email_spec.rb | 12 + spec/models/task_list_spec.rb | 41 + spec/models/task_spec.rb | 66 -- spec/models/task_types_spec.rb | 6 - spec/models/upload_image_model_spec.rb | 41 + 194 files changed, 16517 insertions(+), 2424 deletions(-) create mode 100644 docs/Body10.md create mode 100644 docs/Body11.md create mode 100644 docs/Body12.md create mode 100644 docs/Body2.md create mode 100644 docs/Body3.md create mode 100644 docs/Body4.md create mode 100644 docs/Body5.md create mode 100644 docs/Body6.md create mode 100644 docs/Body7.md create mode 100644 docs/Body8.md create mode 100644 docs/Body9.md delete mode 100644 docs/CRMApi.md create mode 100644 docs/CompaniesApi.md create mode 100644 docs/CompaniesList.md create mode 100644 docs/Company.md create mode 100644 docs/CompanyAttributes.md create mode 100644 docs/CompanyAttributesInner.md delete mode 100644 docs/Contact.md create mode 100644 docs/ConversationsApi.md create mode 100644 docs/ConversationsMessage.md create mode 100644 docs/ConversationsMessageFile.md create mode 100644 docs/ConversationsMessageFileImageInfo.md create mode 100644 docs/CreateSubAccountResponse.md create mode 100644 docs/Deal.md create mode 100644 docs/DealAttributes.md create mode 100644 docs/DealAttributesInner.md create mode 100644 docs/DealsApi.md create mode 100644 docs/DealsList.md create mode 100644 docs/FileDownloadableLink.md create mode 100644 docs/FileList.md create mode 100644 docs/FilesApi.md create mode 100644 docs/GetScheduledEmailByBatchId.md create mode 100644 docs/GetScheduledEmailByBatchIdBatches.md create mode 100644 docs/GetScheduledEmailByMessageId.md create mode 100644 docs/InlineResponse200.md create mode 100644 docs/InlineResponse201.md create mode 100644 docs/InlineResponse2011.md create mode 100644 docs/NoteId.md create mode 100644 docs/NoteList.md create mode 100644 docs/NotesApi.md create mode 100644 docs/Pipeline.md create mode 100644 docs/PipelineStage.md create mode 100644 docs/ScheduleSmtpEmail.md create mode 100644 docs/TaskList.md create mode 100644 docs/TasksApi.md create mode 100644 docs/UploadImageModel.md create mode 100644 lib/sib-api-v3-sdk/api/companies_api.rb create mode 100644 lib/sib-api-v3-sdk/api/conversations_api.rb delete mode 100644 lib/sib-api-v3-sdk/api/crm_api.rb create mode 100644 lib/sib-api-v3-sdk/api/deals_api.rb create mode 100644 lib/sib-api-v3-sdk/api/files_api.rb create mode 100644 lib/sib-api-v3-sdk/api/notes_api.rb create mode 100644 lib/sib-api-v3-sdk/api/tasks_api.rb create mode 100644 lib/sib-api-v3-sdk/models/body_10.rb create mode 100644 lib/sib-api-v3-sdk/models/body_11.rb create mode 100644 lib/sib-api-v3-sdk/models/body_12.rb create mode 100644 lib/sib-api-v3-sdk/models/body_2.rb create mode 100644 lib/sib-api-v3-sdk/models/body_3.rb create mode 100644 lib/sib-api-v3-sdk/models/body_4.rb create mode 100644 lib/sib-api-v3-sdk/models/body_5.rb create mode 100644 lib/sib-api-v3-sdk/models/body_6.rb create mode 100644 lib/sib-api-v3-sdk/models/body_7.rb create mode 100644 lib/sib-api-v3-sdk/models/body_8.rb create mode 100644 lib/sib-api-v3-sdk/models/body_9.rb create mode 100644 lib/sib-api-v3-sdk/models/companies_list.rb create mode 100644 lib/sib-api-v3-sdk/models/company.rb create mode 100644 lib/sib-api-v3-sdk/models/company_attributes.rb create mode 100644 lib/sib-api-v3-sdk/models/company_attributes_inner.rb create mode 100644 lib/sib-api-v3-sdk/models/conversations_message.rb create mode 100644 lib/sib-api-v3-sdk/models/conversations_message_file.rb create mode 100644 lib/sib-api-v3-sdk/models/conversations_message_file_image_info.rb create mode 100644 lib/sib-api-v3-sdk/models/create_sub_account_response.rb create mode 100644 lib/sib-api-v3-sdk/models/deal.rb create mode 100644 lib/sib-api-v3-sdk/models/deal_attributes.rb create mode 100644 lib/sib-api-v3-sdk/models/deal_attributes_inner.rb create mode 100644 lib/sib-api-v3-sdk/models/deals_list.rb create mode 100644 lib/sib-api-v3-sdk/models/file_downloadable_link.rb create mode 100644 lib/sib-api-v3-sdk/models/file_list.rb create mode 100644 lib/sib-api-v3-sdk/models/get_scheduled_email_by_batch_id.rb rename lib/sib-api-v3-sdk/models/{contact.rb => get_scheduled_email_by_batch_id_batches.rb} (71%) create mode 100644 lib/sib-api-v3-sdk/models/get_scheduled_email_by_message_id.rb create mode 100644 lib/sib-api-v3-sdk/models/inline_response_200.rb create mode 100644 lib/sib-api-v3-sdk/models/inline_response_201.rb create mode 100644 lib/sib-api-v3-sdk/models/inline_response_201_1.rb create mode 100644 lib/sib-api-v3-sdk/models/note_id.rb create mode 100644 lib/sib-api-v3-sdk/models/note_list.rb create mode 100644 lib/sib-api-v3-sdk/models/pipeline.rb create mode 100644 lib/sib-api-v3-sdk/models/pipeline_stage.rb create mode 100644 lib/sib-api-v3-sdk/models/schedule_smtp_email.rb create mode 100644 lib/sib-api-v3-sdk/models/task_list.rb create mode 100644 lib/sib-api-v3-sdk/models/upload_image_model.rb create mode 100644 spec/api/companies_api_spec.rb create mode 100644 spec/api/conversations_api_spec.rb create mode 100644 spec/api/deals_api_spec.rb create mode 100644 spec/api/files_api_spec.rb create mode 100644 spec/api/notes_api_spec.rb rename spec/api/{crm_api_spec.rb => tasks_api_spec.rb} (51%) create mode 100644 spec/models/body_10_spec.rb create mode 100644 spec/models/body_11_spec.rb create mode 100644 spec/models/body_12_spec.rb create mode 100644 spec/models/body_2_spec.rb create mode 100644 spec/models/body_3_spec.rb create mode 100644 spec/models/body_4_spec.rb create mode 100644 spec/models/body_5_spec.rb create mode 100644 spec/models/body_6_spec.rb rename spec/models/{contact_spec.rb => body_7_spec.rb} (73%) create mode 100644 spec/models/body_8_spec.rb create mode 100644 spec/models/body_9_spec.rb create mode 100644 spec/models/companies_list_spec.rb create mode 100644 spec/models/company_attributes_inner_spec.rb create mode 100644 spec/models/company_attributes_spec.rb create mode 100644 spec/models/company_spec.rb create mode 100644 spec/models/conversations_message_file_image_info_spec.rb create mode 100644 spec/models/conversations_message_file_spec.rb create mode 100644 spec/models/conversations_message_spec.rb create mode 100644 spec/models/create_sub_account_response_spec.rb create mode 100644 spec/models/deal_attributes_inner_spec.rb create mode 100644 spec/models/deal_attributes_spec.rb create mode 100644 spec/models/deal_spec.rb create mode 100644 spec/models/deals_list_spec.rb create mode 100644 spec/models/file_downloadable_link_spec.rb create mode 100644 spec/models/file_list_spec.rb create mode 100644 spec/models/get_scheduled_email_by_batch_id_batches_spec.rb create mode 100644 spec/models/get_scheduled_email_by_batch_id_spec.rb create mode 100644 spec/models/get_scheduled_email_by_message_id_spec.rb create mode 100644 spec/models/inline_response_200_spec.rb create mode 100644 spec/models/inline_response_201_1_spec.rb create mode 100644 spec/models/inline_response_201_spec.rb create mode 100644 spec/models/note_id_spec.rb create mode 100644 spec/models/note_list_spec.rb create mode 100644 spec/models/pipeline_spec.rb create mode 100644 spec/models/pipeline_stage_spec.rb create mode 100644 spec/models/schedule_smtp_email_spec.rb create mode 100644 spec/models/task_list_spec.rb create mode 100644 spec/models/upload_image_model_spec.rb diff --git a/README.md b/README.md index 1e9e074..40697af 100644 --- a/README.md +++ b/README.md @@ -89,19 +89,13 @@ Class | Method | HTTP request | Description *SibApiV3Sdk::AttributesApi* | [**delete_attribute**](docs/AttributesApi.md#delete_attribute) | **DELETE** /contacts/attributes/{attributeCategory}/{attributeName} | Delete an attribute *SibApiV3Sdk::AttributesApi* | [**get_attributes**](docs/AttributesApi.md#get_attributes) | **GET** /contacts/attributes | List all attributes *SibApiV3Sdk::AttributesApi* | [**update_attribute**](docs/AttributesApi.md#update_attribute) | **PUT** /contacts/attributes/{attributeCategory}/{attributeName} | Update contact attribute -*SibApiV3Sdk::CRMApi* | [**crm_files_id_data_get**](docs/CRMApi.md#crm_files_id_data_get) | **GET** /crm/files/{id}/data | Get file details -*SibApiV3Sdk::CRMApi* | [**crm_files_id_delete**](docs/CRMApi.md#crm_files_id_delete) | **DELETE** /crm/files/{id} | Delete a file -*SibApiV3Sdk::CRMApi* | [**crm_files_id_get**](docs/CRMApi.md#crm_files_id_get) | **GET** /crm/files/{id} | Download a file -*SibApiV3Sdk::CRMApi* | [**crm_files_post**](docs/CRMApi.md#crm_files_post) | **POST** /crm/files | Upload a file -*SibApiV3Sdk::CRMApi* | [**crm_notes_id_delete**](docs/CRMApi.md#crm_notes_id_delete) | **DELETE** /crm/notes/{id} | Delete a note -*SibApiV3Sdk::CRMApi* | [**crm_notes_id_get**](docs/CRMApi.md#crm_notes_id_get) | **GET** /crm/notes/{id} | Get a note -*SibApiV3Sdk::CRMApi* | [**crm_notes_id_patch**](docs/CRMApi.md#crm_notes_id_patch) | **PATCH** /crm/notes/{id} | Update a note -*SibApiV3Sdk::CRMApi* | [**crm_notes_post**](docs/CRMApi.md#crm_notes_post) | **POST** /crm/notes | Create a note -*SibApiV3Sdk::CRMApi* | [**crm_tasks_id_delete**](docs/CRMApi.md#crm_tasks_id_delete) | **DELETE** /crm/tasks/{id} | Delete a task -*SibApiV3Sdk::CRMApi* | [**crm_tasks_id_get**](docs/CRMApi.md#crm_tasks_id_get) | **GET** /crm/tasks/{id} | Get a task -*SibApiV3Sdk::CRMApi* | [**crm_tasks_id_patch**](docs/CRMApi.md#crm_tasks_id_patch) | **PATCH** /crm/tasks/{id} | Update a task -*SibApiV3Sdk::CRMApi* | [**crm_tasks_post**](docs/CRMApi.md#crm_tasks_post) | **POST** /crm/tasks | Create a task -*SibApiV3Sdk::CRMApi* | [**crm_tasktypes_get**](docs/CRMApi.md#crm_tasktypes_get) | **GET** /crm/tasktypes | Get all task types +*SibApiV3Sdk::CompaniesApi* | [**companies_attributes_get**](docs/CompaniesApi.md#companies_attributes_get) | **GET** /companies/attributes | Get company attributes +*SibApiV3Sdk::CompaniesApi* | [**companies_get**](docs/CompaniesApi.md#companies_get) | **GET** /companies | Get all companies +*SibApiV3Sdk::CompaniesApi* | [**companies_id_delete**](docs/CompaniesApi.md#companies_id_delete) | **DELETE** /companies/{id} | Delete a company +*SibApiV3Sdk::CompaniesApi* | [**companies_id_get**](docs/CompaniesApi.md#companies_id_get) | **GET** /companies/{id} | Get a company +*SibApiV3Sdk::CompaniesApi* | [**companies_id_patch**](docs/CompaniesApi.md#companies_id_patch) | **PATCH** /companies/{id} | Update a company +*SibApiV3Sdk::CompaniesApi* | [**companies_link_unlink_id_patch**](docs/CompaniesApi.md#companies_link_unlink_id_patch) | **PATCH** /companies/link-unlink/{id} | Link and Unlink company with contacts and deals +*SibApiV3Sdk::CompaniesApi* | [**companies_post**](docs/CompaniesApi.md#companies_post) | **POST** /companies | Create a company *SibApiV3Sdk::ContactsApi* | [**add_contact_to_list**](docs/ContactsApi.md#add_contact_to_list) | **POST** /contacts/lists/{listId}/contacts/add | Add existing contacts to a list *SibApiV3Sdk::ContactsApi* | [**create_attribute**](docs/ContactsApi.md#create_attribute) | **POST** /contacts/attributes/{attributeCategory}/{attributeName} | Create contact attribute *SibApiV3Sdk::ContactsApi* | [**create_contact**](docs/ContactsApi.md#create_contact) | **POST** /contacts | Create a contact @@ -130,6 +124,23 @@ Class | Method | HTTP request | Description *SibApiV3Sdk::ContactsApi* | [**update_contact**](docs/ContactsApi.md#update_contact) | **PUT** /contacts/{identifier} | Update a contact *SibApiV3Sdk::ContactsApi* | [**update_folder**](docs/ContactsApi.md#update_folder) | **PUT** /contacts/folders/{folderId} | Update a folder *SibApiV3Sdk::ContactsApi* | [**update_list**](docs/ContactsApi.md#update_list) | **PUT** /contacts/lists/{listId} | Update a list +*SibApiV3Sdk::ConversationsApi* | [**conversations_agent_online_ping_post**](docs/ConversationsApi.md#conversations_agent_online_ping_post) | **POST** /conversations/agentOnlinePing | Sets agent’s status to online for 2-3 minutes +*SibApiV3Sdk::ConversationsApi* | [**conversations_messages_id_delete**](docs/ConversationsApi.md#conversations_messages_id_delete) | **DELETE** /conversations/messages/{id} | Delete a message sent by an agent +*SibApiV3Sdk::ConversationsApi* | [**conversations_messages_id_get**](docs/ConversationsApi.md#conversations_messages_id_get) | **GET** /conversations/messages/{id} | Get a message +*SibApiV3Sdk::ConversationsApi* | [**conversations_messages_id_put**](docs/ConversationsApi.md#conversations_messages_id_put) | **PUT** /conversations/messages/{id} | Update a message sent by an agent +*SibApiV3Sdk::ConversationsApi* | [**conversations_messages_post**](docs/ConversationsApi.md#conversations_messages_post) | **POST** /conversations/messages | Send a message as an agent +*SibApiV3Sdk::ConversationsApi* | [**conversations_pushed_messages_id_delete**](docs/ConversationsApi.md#conversations_pushed_messages_id_delete) | **DELETE** /conversations/pushedMessages/{id} | Delete an automated message +*SibApiV3Sdk::ConversationsApi* | [**conversations_pushed_messages_id_get**](docs/ConversationsApi.md#conversations_pushed_messages_id_get) | **GET** /conversations/pushedMessages/{id} | Get an automated message +*SibApiV3Sdk::ConversationsApi* | [**conversations_pushed_messages_id_put**](docs/ConversationsApi.md#conversations_pushed_messages_id_put) | **PUT** /conversations/pushedMessages/{id} | Update an automated message +*SibApiV3Sdk::ConversationsApi* | [**conversations_pushed_messages_post**](docs/ConversationsApi.md#conversations_pushed_messages_post) | **POST** /conversations/pushedMessages | Send an automated message to a visitor +*SibApiV3Sdk::DealsApi* | [**crm_attributes_deals_get**](docs/DealsApi.md#crm_attributes_deals_get) | **GET** /crm/attributes/deals | Get deal attributes +*SibApiV3Sdk::DealsApi* | [**crm_deals_get**](docs/DealsApi.md#crm_deals_get) | **GET** /crm/deals | Get all deals +*SibApiV3Sdk::DealsApi* | [**crm_deals_id_delete**](docs/DealsApi.md#crm_deals_id_delete) | **DELETE** /crm/deals/{id} | Delete a deal +*SibApiV3Sdk::DealsApi* | [**crm_deals_id_get**](docs/DealsApi.md#crm_deals_id_get) | **GET** /crm/deals/{id} | Get a deal +*SibApiV3Sdk::DealsApi* | [**crm_deals_id_patch**](docs/DealsApi.md#crm_deals_id_patch) | **PATCH** /crm/deals/{id} | Update a deal +*SibApiV3Sdk::DealsApi* | [**crm_deals_link_unlink_id_patch**](docs/DealsApi.md#crm_deals_link_unlink_id_patch) | **PATCH** /crm/deals/link-unlink/{id} | Link and Unlink a deal with contacts and companies +*SibApiV3Sdk::DealsApi* | [**crm_deals_post**](docs/DealsApi.md#crm_deals_post) | **POST** /crm/deals | Create a deal +*SibApiV3Sdk::DealsApi* | [**crm_pipeline_details_get**](docs/DealsApi.md#crm_pipeline_details_get) | **GET** /crm/pipeline/details | Get pipeline stages *SibApiV3Sdk::EmailCampaignsApi* | [**create_email_campaign**](docs/EmailCampaignsApi.md#create_email_campaign) | **POST** /emailCampaigns | Create an email campaign *SibApiV3Sdk::EmailCampaignsApi* | [**delete_email_campaign**](docs/EmailCampaignsApi.md#delete_email_campaign) | **DELETE** /emailCampaigns/{campaignId} | Delete an email campaign *SibApiV3Sdk::EmailCampaignsApi* | [**email_export_recipients**](docs/EmailCampaignsApi.md#email_export_recipients) | **POST** /emailCampaigns/{campaignId}/exportRecipients | Export the recipients of an email campaign @@ -143,12 +154,18 @@ Class | Method | HTTP request | Description *SibApiV3Sdk::EmailCampaignsApi* | [**update_campaign_status**](docs/EmailCampaignsApi.md#update_campaign_status) | **PUT** /emailCampaigns/{campaignId}/status | Update an email campaign status *SibApiV3Sdk::EmailCampaignsApi* | [**update_email_campaign**](docs/EmailCampaignsApi.md#update_email_campaign) | **PUT** /emailCampaigns/{campaignId} | Update an email campaign *SibApiV3Sdk::EmailCampaignsApi* | [**upload_image_to_gallery**](docs/EmailCampaignsApi.md#upload_image_to_gallery) | **POST** /emailCampaigns/images | Upload an image to your account's image gallery +*SibApiV3Sdk::FilesApi* | [**crm_files_get**](docs/FilesApi.md#crm_files_get) | **GET** /crm/files | Get all files +*SibApiV3Sdk::FilesApi* | [**crm_files_id_data_get**](docs/FilesApi.md#crm_files_id_data_get) | **GET** /crm/files/{id}/data | Get file details +*SibApiV3Sdk::FilesApi* | [**crm_files_id_delete**](docs/FilesApi.md#crm_files_id_delete) | **DELETE** /crm/files/{id} | Delete a file +*SibApiV3Sdk::FilesApi* | [**crm_files_id_get**](docs/FilesApi.md#crm_files_id_get) | **GET** /crm/files/{id} | Download a file +*SibApiV3Sdk::FilesApi* | [**crm_files_post**](docs/FilesApi.md#crm_files_post) | **POST** /crm/files | Upload a file *SibApiV3Sdk::FoldersApi* | [**create_folder**](docs/FoldersApi.md#create_folder) | **POST** /contacts/folders | Create a folder *SibApiV3Sdk::FoldersApi* | [**delete_folder**](docs/FoldersApi.md#delete_folder) | **DELETE** /contacts/folders/{folderId} | Delete a folder (and all its lists) *SibApiV3Sdk::FoldersApi* | [**get_folder**](docs/FoldersApi.md#get_folder) | **GET** /contacts/folders/{folderId} | Returns a folder's details *SibApiV3Sdk::FoldersApi* | [**get_folder_lists**](docs/FoldersApi.md#get_folder_lists) | **GET** /contacts/folders/{folderId}/lists | Get lists in a folder *SibApiV3Sdk::FoldersApi* | [**get_folders**](docs/FoldersApi.md#get_folders) | **GET** /contacts/folders | Get all folders *SibApiV3Sdk::FoldersApi* | [**update_folder**](docs/FoldersApi.md#update_folder) | **PUT** /contacts/folders/{folderId} | Update a folder +*SibApiV3Sdk::InboundParsingApi* | [**get_inbound_email_attachment**](docs/InboundParsingApi.md#get_inbound_email_attachment) | **GET** /inbound/attachments/{downloadToken} | Retrieve inbound attachment with download token. *SibApiV3Sdk::InboundParsingApi* | [**get_inbound_email_events**](docs/InboundParsingApi.md#get_inbound_email_events) | **GET** /inbound/events | Get the list of all the events for the received emails. *SibApiV3Sdk::InboundParsingApi* | [**get_inbound_email_events_by_uuid**](docs/InboundParsingApi.md#get_inbound_email_events_by_uuid) | **GET** /inbound/events/{uuid} | Fetch all events history for one particular received email. *SibApiV3Sdk::ListsApi* | [**add_contact_to_list**](docs/ListsApi.md#add_contact_to_list) | **POST** /contacts/lists/{listId}/contacts/add | Add existing contacts to a list @@ -167,6 +184,11 @@ Class | Method | HTTP request | Description *SibApiV3Sdk::MasterAccountApi* | [**corporate_sub_account_id_plan_put**](docs/MasterAccountApi.md#corporate_sub_account_id_plan_put) | **PUT** /corporate/subAccount/{id}/plan | Update sub-account plan *SibApiV3Sdk::MasterAccountApi* | [**corporate_sub_account_post**](docs/MasterAccountApi.md#corporate_sub_account_post) | **POST** /corporate/subAccount | Create a new sub-account under a master account. *SibApiV3Sdk::MasterAccountApi* | [**corporate_sub_account_sso_token_post**](docs/MasterAccountApi.md#corporate_sub_account_sso_token_post) | **POST** /corporate/subAccount/ssoToken | Generate SSO token to access Sendinblue +*SibApiV3Sdk::NotesApi* | [**crm_notes_get**](docs/NotesApi.md#crm_notes_get) | **GET** /crm/notes | Get all notes +*SibApiV3Sdk::NotesApi* | [**crm_notes_id_delete**](docs/NotesApi.md#crm_notes_id_delete) | **DELETE** /crm/notes/{id} | Delete a note +*SibApiV3Sdk::NotesApi* | [**crm_notes_id_get**](docs/NotesApi.md#crm_notes_id_get) | **GET** /crm/notes/{id} | Get a note +*SibApiV3Sdk::NotesApi* | [**crm_notes_id_patch**](docs/NotesApi.md#crm_notes_id_patch) | **PATCH** /crm/notes/{id} | Update a note +*SibApiV3Sdk::NotesApi* | [**crm_notes_post**](docs/NotesApi.md#crm_notes_post) | **POST** /crm/notes | Create a note *SibApiV3Sdk::ProcessApi* | [**get_process**](docs/ProcessApi.md#get_process) | **GET** /processes/{processId} | Return the informations for a process *SibApiV3Sdk::ProcessApi* | [**get_processes**](docs/ProcessApi.md#get_processes) | **GET** /processes | Return all the processes for your account *SibApiV3Sdk::ResellerApi* | [**add_credits**](docs/ResellerApi.md#add_credits) | **POST** /reseller/children/{childIdentifier}/credits/add | Add Email and/or SMS credits to a specific child account @@ -201,14 +223,23 @@ Class | Method | HTTP request | Description *SibApiV3Sdk::SendersApi* | [**get_ips_from_sender**](docs/SendersApi.md#get_ips_from_sender) | **GET** /senders/{senderId}/ips | Get all the dedicated IPs for a sender *SibApiV3Sdk::SendersApi* | [**get_senders**](docs/SendersApi.md#get_senders) | **GET** /senders | Get the list of all your senders *SibApiV3Sdk::SendersApi* | [**update_sender**](docs/SendersApi.md#update_sender) | **PUT** /senders/{senderId} | Update a sender +*SibApiV3Sdk::TasksApi* | [**crm_tasks_get**](docs/TasksApi.md#crm_tasks_get) | **GET** /crm/tasks | Get all tasks +*SibApiV3Sdk::TasksApi* | [**crm_tasks_id_delete**](docs/TasksApi.md#crm_tasks_id_delete) | **DELETE** /crm/tasks/{id} | Delete a task +*SibApiV3Sdk::TasksApi* | [**crm_tasks_id_get**](docs/TasksApi.md#crm_tasks_id_get) | **GET** /crm/tasks/{id} | Get a task +*SibApiV3Sdk::TasksApi* | [**crm_tasks_id_patch**](docs/TasksApi.md#crm_tasks_id_patch) | **PATCH** /crm/tasks/{id} | Update a task +*SibApiV3Sdk::TasksApi* | [**crm_tasks_post**](docs/TasksApi.md#crm_tasks_post) | **POST** /crm/tasks | Create a task +*SibApiV3Sdk::TasksApi* | [**crm_tasktypes_get**](docs/TasksApi.md#crm_tasktypes_get) | **GET** /crm/tasktypes | Get all task types *SibApiV3Sdk::TransactionalEmailsApi* | [**block_new_domain**](docs/TransactionalEmailsApi.md#block_new_domain) | **POST** /smtp/blockedDomains | Add a new domain to the list of blocked domains *SibApiV3Sdk::TransactionalEmailsApi* | [**create_smtp_template**](docs/TransactionalEmailsApi.md#create_smtp_template) | **POST** /smtp/templates | Create an email template *SibApiV3Sdk::TransactionalEmailsApi* | [**delete_blocked_domain**](docs/TransactionalEmailsApi.md#delete_blocked_domain) | **DELETE** /smtp/blockedDomains/{domain} | Unblock an existing domain from the list of blocked domains *SibApiV3Sdk::TransactionalEmailsApi* | [**delete_hardbounces**](docs/TransactionalEmailsApi.md#delete_hardbounces) | **POST** /smtp/deleteHardbounces | Delete hardbounces +*SibApiV3Sdk::TransactionalEmailsApi* | [**delete_scheduled_email_by_id**](docs/TransactionalEmailsApi.md#delete_scheduled_email_by_id) | **DELETE** /smtp/email/{identifier} | Delete scheduled emails by batchId or messageId *SibApiV3Sdk::TransactionalEmailsApi* | [**delete_smtp_template**](docs/TransactionalEmailsApi.md#delete_smtp_template) | **DELETE** /smtp/templates/{templateId} | Delete an inactive email template *SibApiV3Sdk::TransactionalEmailsApi* | [**get_aggregated_smtp_report**](docs/TransactionalEmailsApi.md#get_aggregated_smtp_report) | **GET** /smtp/statistics/aggregatedReport | Get your transactional email activity aggregated over a period of time *SibApiV3Sdk::TransactionalEmailsApi* | [**get_blocked_domains**](docs/TransactionalEmailsApi.md#get_blocked_domains) | **GET** /smtp/blockedDomains | Get the list of blocked domains *SibApiV3Sdk::TransactionalEmailsApi* | [**get_email_event_report**](docs/TransactionalEmailsApi.md#get_email_event_report) | **GET** /smtp/statistics/events | Get all your transactional email activity (unaggregated events) +*SibApiV3Sdk::TransactionalEmailsApi* | [**get_scheduled_email_by_batch_id**](docs/TransactionalEmailsApi.md#get_scheduled_email_by_batch_id) | **GET** /smtp/emailStatus/{batchId} | Fetch scheduled emails by batchId +*SibApiV3Sdk::TransactionalEmailsApi* | [**get_scheduled_email_by_message_id**](docs/TransactionalEmailsApi.md#get_scheduled_email_by_message_id) | **GET** /smtp/emailStatus/{messageId} | Fetch scheduled email by messageId *SibApiV3Sdk::TransactionalEmailsApi* | [**get_smtp_report**](docs/TransactionalEmailsApi.md#get_smtp_report) | **GET** /smtp/statistics/reports | Get your transactional email activity aggregated per day *SibApiV3Sdk::TransactionalEmailsApi* | [**get_smtp_template**](docs/TransactionalEmailsApi.md#get_smtp_template) | **GET** /smtp/templates/{templateId} | Returns the template information *SibApiV3Sdk::TransactionalEmailsApi* | [**get_smtp_templates**](docs/TransactionalEmailsApi.md#get_smtp_templates) | **GET** /smtp/templates | Get the list of email templates @@ -245,7 +276,24 @@ Class | Method | HTTP request | Description - [SibApiV3Sdk::BlockDomain](docs/BlockDomain.md) - [SibApiV3Sdk::Body](docs/Body.md) - [SibApiV3Sdk::Body1](docs/Body1.md) - - [SibApiV3Sdk::Contact](docs/Contact.md) + - [SibApiV3Sdk::Body10](docs/Body10.md) + - [SibApiV3Sdk::Body11](docs/Body11.md) + - [SibApiV3Sdk::Body12](docs/Body12.md) + - [SibApiV3Sdk::Body2](docs/Body2.md) + - [SibApiV3Sdk::Body3](docs/Body3.md) + - [SibApiV3Sdk::Body4](docs/Body4.md) + - [SibApiV3Sdk::Body5](docs/Body5.md) + - [SibApiV3Sdk::Body6](docs/Body6.md) + - [SibApiV3Sdk::Body7](docs/Body7.md) + - [SibApiV3Sdk::Body8](docs/Body8.md) + - [SibApiV3Sdk::Body9](docs/Body9.md) + - [SibApiV3Sdk::CompaniesList](docs/CompaniesList.md) + - [SibApiV3Sdk::Company](docs/Company.md) + - [SibApiV3Sdk::CompanyAttributes](docs/CompanyAttributes.md) + - [SibApiV3Sdk::CompanyAttributesInner](docs/CompanyAttributesInner.md) + - [SibApiV3Sdk::ConversationsMessage](docs/ConversationsMessage.md) + - [SibApiV3Sdk::ConversationsMessageFile](docs/ConversationsMessageFile.md) + - [SibApiV3Sdk::ConversationsMessageFileImageInfo](docs/ConversationsMessageFileImageInfo.md) - [SibApiV3Sdk::CreateAttribute](docs/CreateAttribute.md) - [SibApiV3Sdk::CreateAttributeEnumeration](docs/CreateAttributeEnumeration.md) - [SibApiV3Sdk::CreateChild](docs/CreateChild.md) @@ -266,14 +314,21 @@ Class | Method | HTTP request | Description - [SibApiV3Sdk::CreateSmtpTemplate](docs/CreateSmtpTemplate.md) - [SibApiV3Sdk::CreateSmtpTemplateSender](docs/CreateSmtpTemplateSender.md) - [SibApiV3Sdk::CreateSubAccount](docs/CreateSubAccount.md) + - [SibApiV3Sdk::CreateSubAccountResponse](docs/CreateSubAccountResponse.md) - [SibApiV3Sdk::CreateUpdateContactModel](docs/CreateUpdateContactModel.md) - [SibApiV3Sdk::CreateUpdateFolder](docs/CreateUpdateFolder.md) - [SibApiV3Sdk::CreateWebhook](docs/CreateWebhook.md) - [SibApiV3Sdk::CreatedProcessId](docs/CreatedProcessId.md) + - [SibApiV3Sdk::Deal](docs/Deal.md) + - [SibApiV3Sdk::DealAttributes](docs/DealAttributes.md) + - [SibApiV3Sdk::DealAttributesInner](docs/DealAttributesInner.md) + - [SibApiV3Sdk::DealsList](docs/DealsList.md) - [SibApiV3Sdk::DeleteHardbounces](docs/DeleteHardbounces.md) - [SibApiV3Sdk::EmailExportRecipients](docs/EmailExportRecipients.md) - [SibApiV3Sdk::ErrorModel](docs/ErrorModel.md) - [SibApiV3Sdk::FileData](docs/FileData.md) + - [SibApiV3Sdk::FileDownloadableLink](docs/FileDownloadableLink.md) + - [SibApiV3Sdk::FileList](docs/FileList.md) - [SibApiV3Sdk::GetAccount](docs/GetAccount.md) - [SibApiV3Sdk::GetAccountMarketingAutomation](docs/GetAccountMarketingAutomation.md) - [SibApiV3Sdk::GetAccountPlan](docs/GetAccountPlan.md) @@ -346,6 +401,9 @@ Class | Method | HTTP request | Description - [SibApiV3Sdk::GetProcesses](docs/GetProcesses.md) - [SibApiV3Sdk::GetReports](docs/GetReports.md) - [SibApiV3Sdk::GetReportsReports](docs/GetReportsReports.md) + - [SibApiV3Sdk::GetScheduledEmailByBatchId](docs/GetScheduledEmailByBatchId.md) + - [SibApiV3Sdk::GetScheduledEmailByBatchIdBatches](docs/GetScheduledEmailByBatchIdBatches.md) + - [SibApiV3Sdk::GetScheduledEmailByMessageId](docs/GetScheduledEmailByMessageId.md) - [SibApiV3Sdk::GetSendersList](docs/GetSendersList.md) - [SibApiV3Sdk::GetSendersListIps](docs/GetSendersListIps.md) - [SibApiV3Sdk::GetSendersListSenders](docs/GetSendersListSenders.md) @@ -376,6 +434,9 @@ Class | Method | HTTP request | Description - [SibApiV3Sdk::GetTransacSmsReportReports](docs/GetTransacSmsReportReports.md) - [SibApiV3Sdk::GetWebhook](docs/GetWebhook.md) - [SibApiV3Sdk::GetWebhooks](docs/GetWebhooks.md) + - [SibApiV3Sdk::InlineResponse200](docs/InlineResponse200.md) + - [SibApiV3Sdk::InlineResponse201](docs/InlineResponse201.md) + - [SibApiV3Sdk::InlineResponse2011](docs/InlineResponse2011.md) - [SibApiV3Sdk::ManageIp](docs/ManageIp.md) - [SibApiV3Sdk::MasterDetailsResponse](docs/MasterDetailsResponse.md) - [SibApiV3Sdk::MasterDetailsResponseBillingInfo](docs/MasterDetailsResponseBillingInfo.md) @@ -385,6 +446,10 @@ Class | Method | HTTP request | Description - [SibApiV3Sdk::MasterDetailsResponsePlanInfoFeatures](docs/MasterDetailsResponsePlanInfoFeatures.md) - [SibApiV3Sdk::Note](docs/Note.md) - [SibApiV3Sdk::NoteData](docs/NoteData.md) + - [SibApiV3Sdk::NoteId](docs/NoteId.md) + - [SibApiV3Sdk::NoteList](docs/NoteList.md) + - [SibApiV3Sdk::Pipeline](docs/Pipeline.md) + - [SibApiV3Sdk::PipelineStage](docs/PipelineStage.md) - [SibApiV3Sdk::PostContactInfo](docs/PostContactInfo.md) - [SibApiV3Sdk::PostContactInfoContacts](docs/PostContactInfoContacts.md) - [SibApiV3Sdk::PostSendFailed](docs/PostSendFailed.md) @@ -399,6 +464,7 @@ Class | Method | HTTP request | Description - [SibApiV3Sdk::RequestContactImport](docs/RequestContactImport.md) - [SibApiV3Sdk::RequestContactImportNewList](docs/RequestContactImportNewList.md) - [SibApiV3Sdk::RequestSmsRecipientExport](docs/RequestSmsRecipientExport.md) + - [SibApiV3Sdk::ScheduleSmtpEmail](docs/ScheduleSmtpEmail.md) - [SibApiV3Sdk::SendReport](docs/SendReport.md) - [SibApiV3Sdk::SendReportEmail](docs/SendReportEmail.md) - [SibApiV3Sdk::SendSms](docs/SendSms.md) @@ -430,6 +496,7 @@ Class | Method | HTTP request | Description - [SibApiV3Sdk::SubAccountsResponse](docs/SubAccountsResponse.md) - [SibApiV3Sdk::SubAccountsResponseSubAccounts](docs/SubAccountsResponseSubAccounts.md) - [SibApiV3Sdk::Task](docs/Task.md) + - [SibApiV3Sdk::TaskList](docs/TaskList.md) - [SibApiV3Sdk::TaskReminder](docs/TaskReminder.md) - [SibApiV3Sdk::TaskTypes](docs/TaskTypes.md) - [SibApiV3Sdk::UpdateAttribute](docs/UpdateAttribute.md) @@ -451,6 +518,7 @@ Class | Method | HTTP request | Description - [SibApiV3Sdk::UpdateSmtpTemplate](docs/UpdateSmtpTemplate.md) - [SibApiV3Sdk::UpdateSmtpTemplateSender](docs/UpdateSmtpTemplateSender.md) - [SibApiV3Sdk::UpdateWebhook](docs/UpdateWebhook.md) + - [SibApiV3Sdk::UploadImageModel](docs/UploadImageModel.md) - [SibApiV3Sdk::UploadImageToGallery](docs/UploadImageToGallery.md) diff --git a/docs/Body.md b/docs/Body.md index 572f8ad..8ab102c 100644 --- a/docs/Body.md +++ b/docs/Body.md @@ -3,16 +3,7 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**name** | **String** | Name of task | -**duration** | **Integer** | Duration of task | [optional] -**task_type_id** | **String** | Id for type of task e.g Call / Email / Meeting etc. | -**date** | **DateTime** | Task date/time | -**notes** | **String** | Notes added to a task | [optional] -**done** | **BOOLEAN** | Task marked as done | [optional] -**assign_to_id** | **String** | User id to whom task is assigned | [optional] -**contacts_ids** | **Array<Integer>** | Contact ids for contacts linked to this task | [optional] -**deals_ids** | **Array<String>** | Deal ids for deals a task is linked to | [optional] -**companies_ids** | **Array<String>** | Companies ids for companies a task is linked to | [optional] -**reminder** | [**TaskReminder**](TaskReminder.md) | | [optional] +**name** | **String** | Name of company | +**attributes** | **Object** | Attributes for company creation | [optional] diff --git a/docs/Body1.md b/docs/Body1.md index f71d335..b4d72b3 100644 --- a/docs/Body1.md +++ b/docs/Body1.md @@ -3,16 +3,7 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**name** | **String** | Name of task | -**duration** | **Integer** | Duration of task | [optional] -**task_type_id** | **String** | Id for type of task e.g Call / Email / Meeting etc. | -**date** | **DateTime** | Task date/time | -**notes** | **String** | Notes added to a task | [optional] -**done** | **BOOLEAN** | Task marked as done | [optional] -**assign_to_id** | **String** | User id to whom task is assigned | [optional] -**contacts_ids** | **Array<Integer>** | Contact ids for contacts linked to this task | [optional] -**deals_ids** | **Array<String>** | Deal ids for deals a task is linked to | [optional] -**companies_ids** | **Array<String>** | Companies ids for companies a task is linked to | [optional] -**reminder** | [**TaskReminder**](TaskReminder.md) | | [optional] +**name** | **String** | Name of company | [optional] +**attributes** | **Object** | Attributes for company update | [optional] diff --git a/docs/Body10.md b/docs/Body10.md new file mode 100644 index 0000000..a98306a --- /dev/null +++ b/docs/Body10.md @@ -0,0 +1,11 @@ +# SibApiV3Sdk::Body10 + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**visitor_id** | **String** | visitor’s ID received from a webhook or generated by you to <a href=\"https://developers.sendinblue.com/docs/customize-the-widget#identifying-existing-users\">bind existing user account to Conversations</a> | +**text** | **String** | message text | +**agent_id** | **String** | agent ID. It can be found on agent’s page or received from a webhook. Optional if `groupId` is set. | [optional] +**group_id** | **String** | group ID. It can be found on group’s page. Optional if `agentId` is set. | [optional] + + diff --git a/docs/Body11.md b/docs/Body11.md new file mode 100644 index 0000000..d632ada --- /dev/null +++ b/docs/Body11.md @@ -0,0 +1,8 @@ +# SibApiV3Sdk::Body11 + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**text** | **String** | edited message text | + + diff --git a/docs/Body12.md b/docs/Body12.md new file mode 100644 index 0000000..4599f7c --- /dev/null +++ b/docs/Body12.md @@ -0,0 +1,11 @@ +# SibApiV3Sdk::Body12 + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**agent_id** | **String** | agent ID. It can be found on agent’s page or received from a webhook. Alternatively, you can use `agentEmail` + `agentName` + `receivedFrom` instead (all 3 fields required). | [optional] +**received_from** | **String** | mark your messages to distinguish messages created by you from the others. | [optional] +**agent_email** | **String** | agent email. When sending online pings from a standalone system, it’s hard to maintain a 1-to-1 relationship between the users of both systems. In this case, an agent can be specified by their email address. If there’s no agent with the specified email address in your Sendinblue organization, a dummy agent will be created automatically. | [optional] +**agent_name** | **String** | agent name. | [optional] + + diff --git a/docs/Body2.md b/docs/Body2.md new file mode 100644 index 0000000..1224006 --- /dev/null +++ b/docs/Body2.md @@ -0,0 +1,11 @@ +# SibApiV3Sdk::Body2 + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**link_contact_ids** | **Array<Integer>** | Contact ids for contacts to be linked with company | [optional] +**unlink_contact_ids** | **Array<Integer>** | Contact ids for contacts to be unlinked from company | [optional] +**link_deals_ids** | **Array<String>** | Deals ids for deals to be linked with company | [optional] +**unlink_deals_ids** | **Array<String>** | Deals ids for deals to be unlinked from company | [optional] + + diff --git a/docs/Body3.md b/docs/Body3.md new file mode 100644 index 0000000..d25d44d --- /dev/null +++ b/docs/Body3.md @@ -0,0 +1,9 @@ +# SibApiV3Sdk::Body3 + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **String** | Name of deal | +**attributes** | **Object** | Attributes fo\\r deal creation | [optional] + + diff --git a/docs/Body4.md b/docs/Body4.md new file mode 100644 index 0000000..2505c02 --- /dev/null +++ b/docs/Body4.md @@ -0,0 +1,9 @@ +# SibApiV3Sdk::Body4 + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **String** | Name of deal | [optional] +**attributes** | **Object** | Attributes for deal update | [optional] + + diff --git a/docs/Body5.md b/docs/Body5.md new file mode 100644 index 0000000..b335c56 --- /dev/null +++ b/docs/Body5.md @@ -0,0 +1,11 @@ +# SibApiV3Sdk::Body5 + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**link_contact_ids** | **Array<Integer>** | Contact ids for contacts to be linked with deal | [optional] +**unlink_contact_ids** | **Array<Integer>** | Contact ids for contacts to be unlinked from deal | [optional] +**link_company_ids** | **Array<String>** | Company ids to be linked with deal | [optional] +**unlink_company_ids** | **Array<String>** | Company ids to be unlinked from deal | [optional] + + diff --git a/docs/Body6.md b/docs/Body6.md new file mode 100644 index 0000000..810811b --- /dev/null +++ b/docs/Body6.md @@ -0,0 +1,18 @@ +# SibApiV3Sdk::Body6 + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **String** | Name of task | +**duration** | **Integer** | Duration of task in milliseconds [1 minute = 60000 ms] | [optional] +**task_type_id** | **String** | Id for type of task e.g Call / Email / Meeting etc. | +**date** | **DateTime** | Task due date and time | +**notes** | **String** | Notes added to a task | [optional] +**done** | **BOOLEAN** | Task marked as done | [optional] +**assign_to_id** | **String** | User id to whom task is assigned | [optional] +**contacts_ids** | **Array<Integer>** | Contact ids for contacts linked to this task | [optional] +**deals_ids** | **Array<String>** | Deal ids for deals a task is linked to | [optional] +**companies_ids** | **Array<String>** | Companies ids for companies a task is linked to | [optional] +**reminder** | [**TaskReminder**](TaskReminder.md) | | [optional] + + diff --git a/docs/Body7.md b/docs/Body7.md new file mode 100644 index 0000000..52143aa --- /dev/null +++ b/docs/Body7.md @@ -0,0 +1,17 @@ +# SibApiV3Sdk::Body7 + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **String** | Name of task | [optional] +**duration** | **Integer** | Duration of task in milliseconds [1 minute = 60000 ms] | [optional] +**task_type_id** | **String** | Id for type of task e.g Call / Email / Meeting etc. | [optional] +**date** | **DateTime** | Task date/time | [optional] +**notes** | **String** | Notes added to a task | [optional] +**done** | **BOOLEAN** | Task marked as done | [optional] +**assign_to_id** | **String** | User id to whom task is assigned | [optional] +**contacts_ids** | **Array<Integer>** | Contact ids for contacts linked to this task | [optional] +**deals_ids** | **Array<String>** | Deal ids for deals a task is linked to | [optional] +**companies_ids** | **Array<String>** | Companies ids for companies a task is linked to | [optional] + + diff --git a/docs/Body8.md b/docs/Body8.md new file mode 100644 index 0000000..ae58c59 --- /dev/null +++ b/docs/Body8.md @@ -0,0 +1,13 @@ +# SibApiV3Sdk::Body8 + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**visitor_id** | **String** | visitor’s ID received from a webhook or generated by you to <a href=\"https://developers.sendinblue.com/docs/customize-the-widget#identifying-existing-users\">bind existing user account to Conversations</a> | +**text** | **String** | message text | +**agent_id** | **String** | agent ID. It can be found on agent’s page or received from a webhook. Alternatively, you can use `agentEmail` + `agentName` + `receivedFrom` instead (all 3 fields required). | [optional] +**received_from** | **String** | mark your messages to distinguish messages created by you from the others. | [optional] +**agent_email** | **String** | agent email. When sending messages from a standalone system, it’s hard to maintain a 1-to-1 relationship between the users of both systems. In this case, an agent can be specified by their email address. | [optional] +**agent_name** | **String** | agent name | [optional] + + diff --git a/docs/Body9.md b/docs/Body9.md new file mode 100644 index 0000000..7a3bb89 --- /dev/null +++ b/docs/Body9.md @@ -0,0 +1,8 @@ +# SibApiV3Sdk::Body9 + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**text** | **String** | edited message text | + + diff --git a/docs/CRMApi.md b/docs/CRMApi.md deleted file mode 100644 index 30243b6..0000000 --- a/docs/CRMApi.md +++ /dev/null @@ -1,762 +0,0 @@ -# SibApiV3Sdk::CRMApi - -All URIs are relative to *https://api.sendinblue.com/v3* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**crm_files_id_data_get**](CRMApi.md#crm_files_id_data_get) | **GET** /crm/files/{id}/data | Get file details -[**crm_files_id_delete**](CRMApi.md#crm_files_id_delete) | **DELETE** /crm/files/{id} | Delete a file -[**crm_files_id_get**](CRMApi.md#crm_files_id_get) | **GET** /crm/files/{id} | Download a file -[**crm_files_post**](CRMApi.md#crm_files_post) | **POST** /crm/files | Upload a file -[**crm_notes_id_delete**](CRMApi.md#crm_notes_id_delete) | **DELETE** /crm/notes/{id} | Delete a note -[**crm_notes_id_get**](CRMApi.md#crm_notes_id_get) | **GET** /crm/notes/{id} | Get a note -[**crm_notes_id_patch**](CRMApi.md#crm_notes_id_patch) | **PATCH** /crm/notes/{id} | Update a note -[**crm_notes_post**](CRMApi.md#crm_notes_post) | **POST** /crm/notes | Create a note -[**crm_tasks_id_delete**](CRMApi.md#crm_tasks_id_delete) | **DELETE** /crm/tasks/{id} | Delete a task -[**crm_tasks_id_get**](CRMApi.md#crm_tasks_id_get) | **GET** /crm/tasks/{id} | Get a task -[**crm_tasks_id_patch**](CRMApi.md#crm_tasks_id_patch) | **PATCH** /crm/tasks/{id} | Update a task -[**crm_tasks_post**](CRMApi.md#crm_tasks_post) | **POST** /crm/tasks | Create a task -[**crm_tasktypes_get**](CRMApi.md#crm_tasktypes_get) | **GET** /crm/tasktypes | Get all task types - - -# **crm_files_id_data_get** -> FileData crm_files_id_data_get(id) - -Get file details - -### Example -```ruby -# load the gem -require 'sib-api-v3-sdk' -# setup authorization -SibApiV3Sdk.configure do |config| - # Configure API key authorization: api-key - config.api_key['api-key'] = 'YOUR API KEY' - # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil) - #config.api_key_prefix['api-key'] = 'Bearer' - - # Configure API key authorization: partner-key - config.api_key['partner-key'] = 'YOUR API KEY' - # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil) - #config.api_key_prefix['partner-key'] = 'Bearer' -end - -api_instance = SibApiV3Sdk::CRMApi.new - -id = 'id_example' # String | File id to get file data. - - -begin - #Get file details - result = api_instance.crm_files_id_data_get(id) - p result -rescue SibApiV3Sdk::ApiError => e - puts "Exception when calling CRMApi->crm_files_id_data_get: #{e}" -end -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **id** | **String**| File id to get file data. | - -### Return type - -[**FileData**](FileData.md) - -### Authorization - -[api-key](../README.md#api-key), [partner-key](../README.md#partner-key) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - - - -# **crm_files_id_delete** -> crm_files_id_delete(id) - -Delete a file - -### Example -```ruby -# load the gem -require 'sib-api-v3-sdk' -# setup authorization -SibApiV3Sdk.configure do |config| - # Configure API key authorization: api-key - config.api_key['api-key'] = 'YOUR API KEY' - # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil) - #config.api_key_prefix['api-key'] = 'Bearer' - - # Configure API key authorization: partner-key - config.api_key['partner-key'] = 'YOUR API KEY' - # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil) - #config.api_key_prefix['partner-key'] = 'Bearer' -end - -api_instance = SibApiV3Sdk::CRMApi.new - -id = 'id_example' # String | File id to delete. - - -begin - #Delete a file - api_instance.crm_files_id_delete(id) -rescue SibApiV3Sdk::ApiError => e - puts "Exception when calling CRMApi->crm_files_id_delete: #{e}" -end -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **id** | **String**| File id to delete. | - -### Return type - -nil (empty response body) - -### Authorization - -[api-key](../README.md#api-key), [partner-key](../README.md#partner-key) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - - - -# **crm_files_id_get** -> crm_files_id_get(id) - -Download a file - -### Example -```ruby -# load the gem -require 'sib-api-v3-sdk' -# setup authorization -SibApiV3Sdk.configure do |config| - # Configure API key authorization: api-key - config.api_key['api-key'] = 'YOUR API KEY' - # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil) - #config.api_key_prefix['api-key'] = 'Bearer' - - # Configure API key authorization: partner-key - config.api_key['partner-key'] = 'YOUR API KEY' - # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil) - #config.api_key_prefix['partner-key'] = 'Bearer' -end - -api_instance = SibApiV3Sdk::CRMApi.new - -id = 'id_example' # String | File id to download. - - -begin - #Download a file - api_instance.crm_files_id_get(id) -rescue SibApiV3Sdk::ApiError => e - puts "Exception when calling CRMApi->crm_files_id_get: #{e}" -end -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **id** | **String**| File id to download. | - -### Return type - -nil (empty response body) - -### Authorization - -[api-key](../README.md#api-key), [partner-key](../README.md#partner-key) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - - - -# **crm_files_post** -> FileData crm_files_post(file, opts) - -Upload a file - -### Example -```ruby -# load the gem -require 'sib-api-v3-sdk' -# setup authorization -SibApiV3Sdk.configure do |config| - # Configure API key authorization: api-key - config.api_key['api-key'] = 'YOUR API KEY' - # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil) - #config.api_key_prefix['api-key'] = 'Bearer' - - # Configure API key authorization: partner-key - config.api_key['partner-key'] = 'YOUR API KEY' - # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil) - #config.api_key_prefix['partner-key'] = 'Bearer' -end - -api_instance = SibApiV3Sdk::CRMApi.new - -file = File.new('/path/to/file.txt') # File | File data to create a file. - -opts = { - deals_ids: ['deals_ids_example'] # Array | Deal ids linked to a file -} - -begin - #Upload a file - result = api_instance.crm_files_post(file, opts) - p result -rescue SibApiV3Sdk::ApiError => e - puts "Exception when calling CRMApi->crm_files_post: #{e}" -end -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **file** | **File**| File data to create a file. | - **deals_ids** | [**Array<String>**](String.md)| Deal ids linked to a file | [optional] - -### Return type - -[**FileData**](FileData.md) - -### Authorization - -[api-key](../README.md#api-key), [partner-key](../README.md#partner-key) - -### HTTP request headers - - - **Content-Type**: multipart/form-data - - **Accept**: application/json - - - -# **crm_notes_id_delete** -> crm_notes_id_delete(id) - -Delete a note - -### Example -```ruby -# load the gem -require 'sib-api-v3-sdk' -# setup authorization -SibApiV3Sdk.configure do |config| - # Configure API key authorization: api-key - config.api_key['api-key'] = 'YOUR API KEY' - # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil) - #config.api_key_prefix['api-key'] = 'Bearer' - - # Configure API key authorization: partner-key - config.api_key['partner-key'] = 'YOUR API KEY' - # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil) - #config.api_key_prefix['partner-key'] = 'Bearer' -end - -api_instance = SibApiV3Sdk::CRMApi.new - -id = 'id_example' # String | Note ID to delete - - -begin - #Delete a note - api_instance.crm_notes_id_delete(id) -rescue SibApiV3Sdk::ApiError => e - puts "Exception when calling CRMApi->crm_notes_id_delete: #{e}" -end -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **id** | **String**| Note ID to delete | - -### Return type - -nil (empty response body) - -### Authorization - -[api-key](../README.md#api-key), [partner-key](../README.md#partner-key) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - - - -# **crm_notes_id_get** -> Note crm_notes_id_get(id) - -Get a note - -### Example -```ruby -# load the gem -require 'sib-api-v3-sdk' -# setup authorization -SibApiV3Sdk.configure do |config| - # Configure API key authorization: api-key - config.api_key['api-key'] = 'YOUR API KEY' - # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil) - #config.api_key_prefix['api-key'] = 'Bearer' - - # Configure API key authorization: partner-key - config.api_key['partner-key'] = 'YOUR API KEY' - # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil) - #config.api_key_prefix['partner-key'] = 'Bearer' -end - -api_instance = SibApiV3Sdk::CRMApi.new - -id = 'id_example' # String | Note ID to get - - -begin - #Get a note - result = api_instance.crm_notes_id_get(id) - p result -rescue SibApiV3Sdk::ApiError => e - puts "Exception when calling CRMApi->crm_notes_id_get: #{e}" -end -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **id** | **String**| Note ID to get | - -### Return type - -[**Note**](Note.md) - -### Authorization - -[api-key](../README.md#api-key), [partner-key](../README.md#partner-key) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - - - -# **crm_notes_id_patch** -> Note crm_notes_id_patch(id, body) - -Update a note - -### Example -```ruby -# load the gem -require 'sib-api-v3-sdk' -# setup authorization -SibApiV3Sdk.configure do |config| - # Configure API key authorization: api-key - config.api_key['api-key'] = 'YOUR API KEY' - # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil) - #config.api_key_prefix['api-key'] = 'Bearer' - - # Configure API key authorization: partner-key - config.api_key['partner-key'] = 'YOUR API KEY' - # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil) - #config.api_key_prefix['partner-key'] = 'Bearer' -end - -api_instance = SibApiV3Sdk::CRMApi.new - -id = 'id_example' # String | Note ID to update - -body = SibApiV3Sdk::NoteData.new # NoteData | Note data to update a note - - -begin - #Update a note - result = api_instance.crm_notes_id_patch(id, body) - p result -rescue SibApiV3Sdk::ApiError => e - puts "Exception when calling CRMApi->crm_notes_id_patch: #{e}" -end -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **id** | **String**| Note ID to update | - **body** | [**NoteData**](NoteData.md)| Note data to update a note | - -### Return type - -[**Note**](Note.md) - -### Authorization - -[api-key](../README.md#api-key), [partner-key](../README.md#partner-key) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - - - -# **crm_notes_post** -> Note crm_notes_post(body) - -Create a note - -### Example -```ruby -# load the gem -require 'sib-api-v3-sdk' -# setup authorization -SibApiV3Sdk.configure do |config| - # Configure API key authorization: api-key - config.api_key['api-key'] = 'YOUR API KEY' - # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil) - #config.api_key_prefix['api-key'] = 'Bearer' - - # Configure API key authorization: partner-key - config.api_key['partner-key'] = 'YOUR API KEY' - # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil) - #config.api_key_prefix['partner-key'] = 'Bearer' -end - -api_instance = SibApiV3Sdk::CRMApi.new - -body = SibApiV3Sdk::NoteData.new # NoteData | Note data to create a note. - - -begin - #Create a note - result = api_instance.crm_notes_post(body) - p result -rescue SibApiV3Sdk::ApiError => e - puts "Exception when calling CRMApi->crm_notes_post: #{e}" -end -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | [**NoteData**](NoteData.md)| Note data to create a note. | - -### Return type - -[**Note**](Note.md) - -### Authorization - -[api-key](../README.md#api-key), [partner-key](../README.md#partner-key) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - - - -# **crm_tasks_id_delete** -> crm_tasks_id_delete(id) - -Delete a task - -### Example -```ruby -# load the gem -require 'sib-api-v3-sdk' -# setup authorization -SibApiV3Sdk.configure do |config| - # Configure API key authorization: api-key - config.api_key['api-key'] = 'YOUR API KEY' - # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil) - #config.api_key_prefix['api-key'] = 'Bearer' - - # Configure API key authorization: partner-key - config.api_key['partner-key'] = 'YOUR API KEY' - # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil) - #config.api_key_prefix['partner-key'] = 'Bearer' -end - -api_instance = SibApiV3Sdk::CRMApi.new - -id = 'id_example' # String | - - -begin - #Delete a task - api_instance.crm_tasks_id_delete(id) -rescue SibApiV3Sdk::ApiError => e - puts "Exception when calling CRMApi->crm_tasks_id_delete: #{e}" -end -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **id** | **String**| | - -### Return type - -nil (empty response body) - -### Authorization - -[api-key](../README.md#api-key), [partner-key](../README.md#partner-key) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - - - -# **crm_tasks_id_get** -> Task crm_tasks_id_get(id) - -Get a task - -### Example -```ruby -# load the gem -require 'sib-api-v3-sdk' -# setup authorization -SibApiV3Sdk.configure do |config| - # Configure API key authorization: api-key - config.api_key['api-key'] = 'YOUR API KEY' - # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil) - #config.api_key_prefix['api-key'] = 'Bearer' - - # Configure API key authorization: partner-key - config.api_key['partner-key'] = 'YOUR API KEY' - # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil) - #config.api_key_prefix['partner-key'] = 'Bearer' -end - -api_instance = SibApiV3Sdk::CRMApi.new - -id = 'id_example' # String | - - -begin - #Get a task - result = api_instance.crm_tasks_id_get(id) - p result -rescue SibApiV3Sdk::ApiError => e - puts "Exception when calling CRMApi->crm_tasks_id_get: #{e}" -end -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **id** | **String**| | - -### Return type - -[**Task**](Task.md) - -### Authorization - -[api-key](../README.md#api-key), [partner-key](../README.md#partner-key) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - - - -# **crm_tasks_id_patch** -> Task crm_tasks_id_patch(id, body) - -Update a task - -### Example -```ruby -# load the gem -require 'sib-api-v3-sdk' -# setup authorization -SibApiV3Sdk.configure do |config| - # Configure API key authorization: api-key - config.api_key['api-key'] = 'YOUR API KEY' - # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil) - #config.api_key_prefix['api-key'] = 'Bearer' - - # Configure API key authorization: partner-key - config.api_key['partner-key'] = 'YOUR API KEY' - # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil) - #config.api_key_prefix['partner-key'] = 'Bearer' -end - -api_instance = SibApiV3Sdk::CRMApi.new - -id = 'id_example' # String | - -body = SibApiV3Sdk::Body1.new # Body1 | Updated task details. - - -begin - #Update a task - result = api_instance.crm_tasks_id_patch(id, body) - p result -rescue SibApiV3Sdk::ApiError => e - puts "Exception when calling CRMApi->crm_tasks_id_patch: #{e}" -end -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **id** | **String**| | - **body** | [**Body1**](Body1.md)| Updated task details. | - -### Return type - -[**Task**](Task.md) - -### Authorization - -[api-key](../README.md#api-key), [partner-key](../README.md#partner-key) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - - - -# **crm_tasks_post** -> Task crm_tasks_post(body) - -Create a task - -### Example -```ruby -# load the gem -require 'sib-api-v3-sdk' -# setup authorization -SibApiV3Sdk.configure do |config| - # Configure API key authorization: api-key - config.api_key['api-key'] = 'YOUR API KEY' - # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil) - #config.api_key_prefix['api-key'] = 'Bearer' - - # Configure API key authorization: partner-key - config.api_key['partner-key'] = 'YOUR API KEY' - # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil) - #config.api_key_prefix['partner-key'] = 'Bearer' -end - -api_instance = SibApiV3Sdk::CRMApi.new - -body = SibApiV3Sdk::Body.new # Body | Task name. - - -begin - #Create a task - result = api_instance.crm_tasks_post(body) - p result -rescue SibApiV3Sdk::ApiError => e - puts "Exception when calling CRMApi->crm_tasks_post: #{e}" -end -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | [**Body**](Body.md)| Task name. | - -### Return type - -[**Task**](Task.md) - -### Authorization - -[api-key](../README.md#api-key), [partner-key](../README.md#partner-key) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - - - -# **crm_tasktypes_get** -> TaskTypes crm_tasktypes_get - -Get all task types - -### Example -```ruby -# load the gem -require 'sib-api-v3-sdk' -# setup authorization -SibApiV3Sdk.configure do |config| - # Configure API key authorization: api-key - config.api_key['api-key'] = 'YOUR API KEY' - # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil) - #config.api_key_prefix['api-key'] = 'Bearer' - - # Configure API key authorization: partner-key - config.api_key['partner-key'] = 'YOUR API KEY' - # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil) - #config.api_key_prefix['partner-key'] = 'Bearer' -end - -api_instance = SibApiV3Sdk::CRMApi.new - -begin - #Get all task types - result = api_instance.crm_tasktypes_get - p result -rescue SibApiV3Sdk::ApiError => e - puts "Exception when calling CRMApi->crm_tasktypes_get: #{e}" -end -``` - -### Parameters -This endpoint does not need any parameter. - -### Return type - -[**TaskTypes**](TaskTypes.md) - -### Authorization - -[api-key](../README.md#api-key), [partner-key](../README.md#partner-key) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - - - diff --git a/docs/CompaniesApi.md b/docs/CompaniesApi.md new file mode 100644 index 0000000..7e8e025 --- /dev/null +++ b/docs/CompaniesApi.md @@ -0,0 +1,425 @@ +# SibApiV3Sdk::CompaniesApi + +All URIs are relative to *https://api.sendinblue.com/v3* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**companies_attributes_get**](CompaniesApi.md#companies_attributes_get) | **GET** /companies/attributes | Get company attributes +[**companies_get**](CompaniesApi.md#companies_get) | **GET** /companies | Get all companies +[**companies_id_delete**](CompaniesApi.md#companies_id_delete) | **DELETE** /companies/{id} | Delete a company +[**companies_id_get**](CompaniesApi.md#companies_id_get) | **GET** /companies/{id} | Get a company +[**companies_id_patch**](CompaniesApi.md#companies_id_patch) | **PATCH** /companies/{id} | Update a company +[**companies_link_unlink_id_patch**](CompaniesApi.md#companies_link_unlink_id_patch) | **PATCH** /companies/link-unlink/{id} | Link and Unlink company with contacts and deals +[**companies_post**](CompaniesApi.md#companies_post) | **POST** /companies | Create a company + + +# **companies_attributes_get** +> CompanyAttributes companies_attributes_get + +Get company attributes + +### Example +```ruby +# load the gem +require 'sib-api-v3-sdk' +# setup authorization +SibApiV3Sdk.configure do |config| + # Configure API key authorization: api-key + config.api_key['api-key'] = 'YOUR API KEY' + # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil) + #config.api_key_prefix['api-key'] = 'Bearer' + + # Configure API key authorization: partner-key + config.api_key['partner-key'] = 'YOUR API KEY' + # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil) + #config.api_key_prefix['partner-key'] = 'Bearer' +end + +api_instance = SibApiV3Sdk::CompaniesApi.new + +begin + #Get company attributes + result = api_instance.companies_attributes_get + p result +rescue SibApiV3Sdk::ApiError => e + puts "Exception when calling CompaniesApi->companies_attributes_get: #{e}" +end +``` + +### Parameters +This endpoint does not need any parameter. + +### Return type + +[**CompanyAttributes**](CompanyAttributes.md) + +### Authorization + +[api-key](../README.md#api-key), [partner-key](../README.md#partner-key) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + + +# **companies_get** +> CompaniesList companies_get(opts) + +Get all companies + +### Example +```ruby +# load the gem +require 'sib-api-v3-sdk' +# setup authorization +SibApiV3Sdk.configure do |config| + # Configure API key authorization: api-key + config.api_key['api-key'] = 'YOUR API KEY' + # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil) + #config.api_key_prefix['api-key'] = 'Bearer' + + # Configure API key authorization: partner-key + config.api_key['partner-key'] = 'YOUR API KEY' + # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil) + #config.api_key_prefix['partner-key'] = 'Bearer' +end + +api_instance = SibApiV3Sdk::CompaniesApi.new + +opts = { + filters: 'filters_example', # String | Filter by attrbutes. If you have filter for owner on your side please send it as {\"attributes.owner\":\"5b1a17d914b73d35a76ca0c7\"} + linked_contacts_ids: 789, # Integer | Filter by linked contacts ids + linked_deals_ids: 'linked_deals_ids_example', # String | Filter by linked deals ids + page: 789, # Integer | Index of the first document of the page + limit: 50, # Integer | Number of documents per page + sort: 'sort_example', # String | Sort the results in the ascending/descending order. Default order is **descending** by creation if `sort` is not passed + sort_by: 'sort_by_example' # String | The field used to sort field names. +} + +begin + #Get all companies + result = api_instance.companies_get(opts) + p result +rescue SibApiV3Sdk::ApiError => e + puts "Exception when calling CompaniesApi->companies_get: #{e}" +end +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **filters** | **String**| Filter by attrbutes. If you have filter for owner on your side please send it as {\"attributes.owner\":\"5b1a17d914b73d35a76ca0c7\"} | [optional] + **linked_contacts_ids** | **Integer**| Filter by linked contacts ids | [optional] + **linked_deals_ids** | **String**| Filter by linked deals ids | [optional] + **page** | **Integer**| Index of the first document of the page | [optional] + **limit** | **Integer**| Number of documents per page | [optional] [default to 50] + **sort** | **String**| Sort the results in the ascending/descending order. Default order is **descending** by creation if `sort` is not passed | [optional] + **sort_by** | **String**| The field used to sort field names. | [optional] + +### Return type + +[**CompaniesList**](CompaniesList.md) + +### Authorization + +[api-key](../README.md#api-key), [partner-key](../README.md#partner-key) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + + +# **companies_id_delete** +> companies_id_delete(id) + +Delete a company + +### Example +```ruby +# load the gem +require 'sib-api-v3-sdk' +# setup authorization +SibApiV3Sdk.configure do |config| + # Configure API key authorization: api-key + config.api_key['api-key'] = 'YOUR API KEY' + # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil) + #config.api_key_prefix['api-key'] = 'Bearer' + + # Configure API key authorization: partner-key + config.api_key['partner-key'] = 'YOUR API KEY' + # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil) + #config.api_key_prefix['partner-key'] = 'Bearer' +end + +api_instance = SibApiV3Sdk::CompaniesApi.new + +id = 'id_example' # String | + + +begin + #Delete a company + api_instance.companies_id_delete(id) +rescue SibApiV3Sdk::ApiError => e + puts "Exception when calling CompaniesApi->companies_id_delete: #{e}" +end +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **id** | **String**| | + +### Return type + +nil (empty response body) + +### Authorization + +[api-key](../README.md#api-key), [partner-key](../README.md#partner-key) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + + +# **companies_id_get** +> Company companies_id_get(id) + +Get a company + +### Example +```ruby +# load the gem +require 'sib-api-v3-sdk' +# setup authorization +SibApiV3Sdk.configure do |config| + # Configure API key authorization: api-key + config.api_key['api-key'] = 'YOUR API KEY' + # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil) + #config.api_key_prefix['api-key'] = 'Bearer' + + # Configure API key authorization: partner-key + config.api_key['partner-key'] = 'YOUR API KEY' + # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil) + #config.api_key_prefix['partner-key'] = 'Bearer' +end + +api_instance = SibApiV3Sdk::CompaniesApi.new + +id = 'id_example' # String | + + +begin + #Get a company + result = api_instance.companies_id_get(id) + p result +rescue SibApiV3Sdk::ApiError => e + puts "Exception when calling CompaniesApi->companies_id_get: #{e}" +end +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **id** | **String**| | + +### Return type + +[**Company**](Company.md) + +### Authorization + +[api-key](../README.md#api-key), [partner-key](../README.md#partner-key) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + + +# **companies_id_patch** +> Company companies_id_patch(id, body) + +Update a company + +### Example +```ruby +# load the gem +require 'sib-api-v3-sdk' +# setup authorization +SibApiV3Sdk.configure do |config| + # Configure API key authorization: api-key + config.api_key['api-key'] = 'YOUR API KEY' + # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil) + #config.api_key_prefix['api-key'] = 'Bearer' + + # Configure API key authorization: partner-key + config.api_key['partner-key'] = 'YOUR API KEY' + # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil) + #config.api_key_prefix['partner-key'] = 'Bearer' +end + +api_instance = SibApiV3Sdk::CompaniesApi.new + +id = 'id_example' # String | + +body = SibApiV3Sdk::Body1.new # Body1 | Updated company details. + + +begin + #Update a company + result = api_instance.companies_id_patch(id, body) + p result +rescue SibApiV3Sdk::ApiError => e + puts "Exception when calling CompaniesApi->companies_id_patch: #{e}" +end +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **id** | **String**| | + **body** | [**Body1**](Body1.md)| Updated company details. | + +### Return type + +[**Company**](Company.md) + +### Authorization + +[api-key](../README.md#api-key), [partner-key](../README.md#partner-key) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + + +# **companies_link_unlink_id_patch** +> companies_link_unlink_id_patch(id, body) + +Link and Unlink company with contacts and deals + +### Example +```ruby +# load the gem +require 'sib-api-v3-sdk' +# setup authorization +SibApiV3Sdk.configure do |config| + # Configure API key authorization: api-key + config.api_key['api-key'] = 'YOUR API KEY' + # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil) + #config.api_key_prefix['api-key'] = 'Bearer' + + # Configure API key authorization: partner-key + config.api_key['partner-key'] = 'YOUR API KEY' + # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil) + #config.api_key_prefix['partner-key'] = 'Bearer' +end + +api_instance = SibApiV3Sdk::CompaniesApi.new + +id = 'id_example' # String | + +body = SibApiV3Sdk::Body2.new # Body2 | Linked / Unlinked contacts and deals ids. + + +begin + #Link and Unlink company with contacts and deals + api_instance.companies_link_unlink_id_patch(id, body) +rescue SibApiV3Sdk::ApiError => e + puts "Exception when calling CompaniesApi->companies_link_unlink_id_patch: #{e}" +end +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **id** | **String**| | + **body** | [**Body2**](Body2.md)| Linked / Unlinked contacts and deals ids. | + +### Return type + +nil (empty response body) + +### Authorization + +[api-key](../README.md#api-key), [partner-key](../README.md#partner-key) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + + +# **companies_post** +> InlineResponse200 companies_post(body) + +Create a company + +### Example +```ruby +# load the gem +require 'sib-api-v3-sdk' +# setup authorization +SibApiV3Sdk.configure do |config| + # Configure API key authorization: api-key + config.api_key['api-key'] = 'YOUR API KEY' + # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil) + #config.api_key_prefix['api-key'] = 'Bearer' + + # Configure API key authorization: partner-key + config.api_key['partner-key'] = 'YOUR API KEY' + # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil) + #config.api_key_prefix['partner-key'] = 'Bearer' +end + +api_instance = SibApiV3Sdk::CompaniesApi.new + +body = SibApiV3Sdk::Body.new # Body | Company create data. + + +begin + #Create a company + result = api_instance.companies_post(body) + p result +rescue SibApiV3Sdk::ApiError => e + puts "Exception when calling CompaniesApi->companies_post: #{e}" +end +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **body** | [**Body**](Body.md)| Company create data. | + +### Return type + +[**InlineResponse200**](InlineResponse200.md) + +### Authorization + +[api-key](../README.md#api-key), [partner-key](../README.md#partner-key) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + + diff --git a/docs/CompaniesList.md b/docs/CompaniesList.md new file mode 100644 index 0000000..738f48d --- /dev/null +++ b/docs/CompaniesList.md @@ -0,0 +1,8 @@ +# SibApiV3Sdk::CompaniesList + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**items** | [**Array<Company>**](Company.md) | List of compaies | [optional] + + diff --git a/docs/Company.md b/docs/Company.md new file mode 100644 index 0000000..2011fea --- /dev/null +++ b/docs/Company.md @@ -0,0 +1,11 @@ +# SibApiV3Sdk::Company + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **String** | Unique company id | [optional] +**attributes** | **Object** | Company attributes with values | [optional] +**linked_contacts_ids** | **Array<Integer>** | Contact ids for contacts linked to this company | [optional] +**linked_deals_ids** | **Array<String>** | Deals ids for companies linked to this company | [optional] + + diff --git a/docs/CompanyAttributes.md b/docs/CompanyAttributes.md new file mode 100644 index 0000000..6961929 --- /dev/null +++ b/docs/CompanyAttributes.md @@ -0,0 +1,7 @@ +# SibApiV3Sdk::CompanyAttributes + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + + diff --git a/docs/CompanyAttributesInner.md b/docs/CompanyAttributesInner.md new file mode 100644 index 0000000..8987a6d --- /dev/null +++ b/docs/CompanyAttributesInner.md @@ -0,0 +1,12 @@ +# SibApiV3Sdk::CompanyAttributesInner + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**internal_name** | **String** | | [optional] +**label** | **String** | | [optional] +**attribute_type_name** | **String** | | [optional] +**attribute_options** | **Array<Object>** | | [optional] +**is_required** | **BOOLEAN** | | [optional] + + diff --git a/docs/Contact.md b/docs/Contact.md deleted file mode 100644 index af04af3..0000000 --- a/docs/Contact.md +++ /dev/null @@ -1,15 +0,0 @@ -# SibApiV3Sdk::Contact - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**virtual_next_task** | **Object** | Next incomplete task of contact | [optional] -**email** | **String** | Contact email | -**assign_to_id** | **String** | User id to whom contact is assigned | [optional] -**contacts_id** | **Integer** | Contact id | [optional] -**crm_lists** | **Object** | CRM lists in which contact is added | -**attributes** | **Object** | Contact attributes e.g firstname / lastname / SMS etc. | [optional] -**created_at** | **DateTime** | Contact created date/time | [optional] -**updated_at** | **DateTime** | Contact updated date/time | [optional] - - diff --git a/docs/ContactsApi.md b/docs/ContactsApi.md index 3eaecda..63178cf 100644 --- a/docs/ContactsApi.md +++ b/docs/ContactsApi.md @@ -662,7 +662,7 @@ This endpoint does not need any parameter. # **get_contact_info** -> GetExtendedContactDetails get_contact_info(identifier) +> GetExtendedContactDetails get_contact_info(identifier, opts) Get a contact's details @@ -689,10 +689,14 @@ api_instance = SibApiV3Sdk::ContactsApi.new identifier = 'identifier_example' # String | Email (urlencoded) OR ID of the contact OR its SMS attribute value +opts = { + start_date: nil, # Object | **Mandatory if endDate is used.** Starting date (YYYY-MM-DD) of the statistic events specific to campaigns. Must be lower than equal to endDate + end_date: nil # Object | **Mandatory if startDate is used.** Ending date (YYYY-MM-DD) of the statistic events specific to campaigns. Must be greater than equal to startDate. +} begin #Get a contact's details - result = api_instance.get_contact_info(identifier) + result = api_instance.get_contact_info(identifier, opts) p result rescue SibApiV3Sdk::ApiError => e puts "Exception when calling ContactsApi->get_contact_info: #{e}" @@ -704,6 +708,8 @@ end Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **identifier** | **String**| Email (urlencoded) OR ID of the contact OR its SMS attribute value | + **start_date** | [**Object**](.md)| **Mandatory if endDate is used.** Starting date (YYYY-MM-DD) of the statistic events specific to campaigns. Must be lower than equal to endDate | [optional] + **end_date** | [**Object**](.md)| **Mandatory if startDate is used.** Ending date (YYYY-MM-DD) of the statistic events specific to campaigns. Must be greater than equal to startDate. | [optional] ### Return type diff --git a/docs/ConversationsApi.md b/docs/ConversationsApi.md new file mode 100644 index 0000000..7918e93 --- /dev/null +++ b/docs/ConversationsApi.md @@ -0,0 +1,542 @@ +# SibApiV3Sdk::ConversationsApi + +All URIs are relative to *https://api.sendinblue.com/v3* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**conversations_agent_online_ping_post**](ConversationsApi.md#conversations_agent_online_ping_post) | **POST** /conversations/agentOnlinePing | Sets agent’s status to online for 2-3 minutes +[**conversations_messages_id_delete**](ConversationsApi.md#conversations_messages_id_delete) | **DELETE** /conversations/messages/{id} | Delete a message sent by an agent +[**conversations_messages_id_get**](ConversationsApi.md#conversations_messages_id_get) | **GET** /conversations/messages/{id} | Get a message +[**conversations_messages_id_put**](ConversationsApi.md#conversations_messages_id_put) | **PUT** /conversations/messages/{id} | Update a message sent by an agent +[**conversations_messages_post**](ConversationsApi.md#conversations_messages_post) | **POST** /conversations/messages | Send a message as an agent +[**conversations_pushed_messages_id_delete**](ConversationsApi.md#conversations_pushed_messages_id_delete) | **DELETE** /conversations/pushedMessages/{id} | Delete an automated message +[**conversations_pushed_messages_id_get**](ConversationsApi.md#conversations_pushed_messages_id_get) | **GET** /conversations/pushedMessages/{id} | Get an automated message +[**conversations_pushed_messages_id_put**](ConversationsApi.md#conversations_pushed_messages_id_put) | **PUT** /conversations/pushedMessages/{id} | Update an automated message +[**conversations_pushed_messages_post**](ConversationsApi.md#conversations_pushed_messages_post) | **POST** /conversations/pushedMessages | Send an automated message to a visitor + + +# **conversations_agent_online_ping_post** +> conversations_agent_online_ping_post(body) + +Sets agent’s status to online for 2-3 minutes + +We recommend pinging this endpoint every minute for as long as the agent has to be considered online. + +### Example +```ruby +# load the gem +require 'sib-api-v3-sdk' +# setup authorization +SibApiV3Sdk.configure do |config| + # Configure API key authorization: api-key + config.api_key['api-key'] = 'YOUR API KEY' + # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil) + #config.api_key_prefix['api-key'] = 'Bearer' + + # Configure API key authorization: partner-key + config.api_key['partner-key'] = 'YOUR API KEY' + # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil) + #config.api_key_prefix['partner-key'] = 'Bearer' +end + +api_instance = SibApiV3Sdk::ConversationsApi.new + +body = SibApiV3Sdk::Body12.new # Body12 | Agent fields. + + +begin + #Sets agent’s status to online for 2-3 minutes + api_instance.conversations_agent_online_ping_post(body) +rescue SibApiV3Sdk::ApiError => e + puts "Exception when calling ConversationsApi->conversations_agent_online_ping_post: #{e}" +end +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **body** | [**Body12**](Body12.md)| Agent fields. | + +### Return type + +nil (empty response body) + +### Authorization + +[api-key](../README.md#api-key), [partner-key](../README.md#partner-key) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + + +# **conversations_messages_id_delete** +> conversations_messages_id_delete(id) + +Delete a message sent by an agent + +Only agents’ messages can be deleted. + +### Example +```ruby +# load the gem +require 'sib-api-v3-sdk' +# setup authorization +SibApiV3Sdk.configure do |config| + # Configure API key authorization: api-key + config.api_key['api-key'] = 'YOUR API KEY' + # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil) + #config.api_key_prefix['api-key'] = 'Bearer' + + # Configure API key authorization: partner-key + config.api_key['partner-key'] = 'YOUR API KEY' + # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil) + #config.api_key_prefix['partner-key'] = 'Bearer' +end + +api_instance = SibApiV3Sdk::ConversationsApi.new + +id = 'id_example' # String | ID of the message + + +begin + #Delete a message sent by an agent + api_instance.conversations_messages_id_delete(id) +rescue SibApiV3Sdk::ApiError => e + puts "Exception when calling ConversationsApi->conversations_messages_id_delete: #{e}" +end +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **id** | **String**| ID of the message | + +### Return type + +nil (empty response body) + +### Authorization + +[api-key](../README.md#api-key), [partner-key](../README.md#partner-key) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + + +# **conversations_messages_id_get** +> ConversationsMessage conversations_messages_id_get(id) + +Get a message + +### Example +```ruby +# load the gem +require 'sib-api-v3-sdk' +# setup authorization +SibApiV3Sdk.configure do |config| + # Configure API key authorization: api-key + config.api_key['api-key'] = 'YOUR API KEY' + # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil) + #config.api_key_prefix['api-key'] = 'Bearer' + + # Configure API key authorization: partner-key + config.api_key['partner-key'] = 'YOUR API KEY' + # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil) + #config.api_key_prefix['partner-key'] = 'Bearer' +end + +api_instance = SibApiV3Sdk::ConversationsApi.new + +id = 'id_example' # String | ID of the message + + +begin + #Get a message + result = api_instance.conversations_messages_id_get(id) + p result +rescue SibApiV3Sdk::ApiError => e + puts "Exception when calling ConversationsApi->conversations_messages_id_get: #{e}" +end +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **id** | **String**| ID of the message | + +### Return type + +[**ConversationsMessage**](ConversationsMessage.md) + +### Authorization + +[api-key](../README.md#api-key), [partner-key](../README.md#partner-key) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + + +# **conversations_messages_id_put** +> ConversationsMessage conversations_messages_id_put(id, opts) + +Update a message sent by an agent + +Only agents’ messages can be edited. + +### Example +```ruby +# load the gem +require 'sib-api-v3-sdk' +# setup authorization +SibApiV3Sdk.configure do |config| + # Configure API key authorization: api-key + config.api_key['api-key'] = 'YOUR API KEY' + # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil) + #config.api_key_prefix['api-key'] = 'Bearer' + + # Configure API key authorization: partner-key + config.api_key['partner-key'] = 'YOUR API KEY' + # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil) + #config.api_key_prefix['partner-key'] = 'Bearer' +end + +api_instance = SibApiV3Sdk::ConversationsApi.new + +id = 'id_example' # String | ID of the message + +opts = { + body: SibApiV3Sdk::Body9.new # Body9 | +} + +begin + #Update a message sent by an agent + result = api_instance.conversations_messages_id_put(id, opts) + p result +rescue SibApiV3Sdk::ApiError => e + puts "Exception when calling ConversationsApi->conversations_messages_id_put: #{e}" +end +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **id** | **String**| ID of the message | + **body** | [**Body9**](Body9.md)| | [optional] + +### Return type + +[**ConversationsMessage**](ConversationsMessage.md) + +### Authorization + +[api-key](../README.md#api-key), [partner-key](../README.md#partner-key) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + + +# **conversations_messages_post** +> ConversationsMessage conversations_messages_post(body) + +Send a message as an agent + +### Example +```ruby +# load the gem +require 'sib-api-v3-sdk' +# setup authorization +SibApiV3Sdk.configure do |config| + # Configure API key authorization: api-key + config.api_key['api-key'] = 'YOUR API KEY' + # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil) + #config.api_key_prefix['api-key'] = 'Bearer' + + # Configure API key authorization: partner-key + config.api_key['partner-key'] = 'YOUR API KEY' + # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil) + #config.api_key_prefix['partner-key'] = 'Bearer' +end + +api_instance = SibApiV3Sdk::ConversationsApi.new + +body = SibApiV3Sdk::Body8.new # Body8 | Message fields. + + +begin + #Send a message as an agent + result = api_instance.conversations_messages_post(body) + p result +rescue SibApiV3Sdk::ApiError => e + puts "Exception when calling ConversationsApi->conversations_messages_post: #{e}" +end +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **body** | [**Body8**](Body8.md)| Message fields. | + +### Return type + +[**ConversationsMessage**](ConversationsMessage.md) + +### Authorization + +[api-key](../README.md#api-key), [partner-key](../README.md#partner-key) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + + +# **conversations_pushed_messages_id_delete** +> conversations_pushed_messages_id_delete(id) + +Delete an automated message + +### Example +```ruby +# load the gem +require 'sib-api-v3-sdk' +# setup authorization +SibApiV3Sdk.configure do |config| + # Configure API key authorization: api-key + config.api_key['api-key'] = 'YOUR API KEY' + # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil) + #config.api_key_prefix['api-key'] = 'Bearer' + + # Configure API key authorization: partner-key + config.api_key['partner-key'] = 'YOUR API KEY' + # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil) + #config.api_key_prefix['partner-key'] = 'Bearer' +end + +api_instance = SibApiV3Sdk::ConversationsApi.new + +id = 'id_example' # String | ID of the message + + +begin + #Delete an automated message + api_instance.conversations_pushed_messages_id_delete(id) +rescue SibApiV3Sdk::ApiError => e + puts "Exception when calling ConversationsApi->conversations_pushed_messages_id_delete: #{e}" +end +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **id** | **String**| ID of the message | + +### Return type + +nil (empty response body) + +### Authorization + +[api-key](../README.md#api-key), [partner-key](../README.md#partner-key) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + + +# **conversations_pushed_messages_id_get** +> ConversationsMessage conversations_pushed_messages_id_get(id) + +Get an automated message + +### Example +```ruby +# load the gem +require 'sib-api-v3-sdk' +# setup authorization +SibApiV3Sdk.configure do |config| + # Configure API key authorization: api-key + config.api_key['api-key'] = 'YOUR API KEY' + # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil) + #config.api_key_prefix['api-key'] = 'Bearer' + + # Configure API key authorization: partner-key + config.api_key['partner-key'] = 'YOUR API KEY' + # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil) + #config.api_key_prefix['partner-key'] = 'Bearer' +end + +api_instance = SibApiV3Sdk::ConversationsApi.new + +id = 'id_example' # String | ID of the message sent previously + + +begin + #Get an automated message + result = api_instance.conversations_pushed_messages_id_get(id) + p result +rescue SibApiV3Sdk::ApiError => e + puts "Exception when calling ConversationsApi->conversations_pushed_messages_id_get: #{e}" +end +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **id** | **String**| ID of the message sent previously | + +### Return type + +[**ConversationsMessage**](ConversationsMessage.md) + +### Authorization + +[api-key](../README.md#api-key), [partner-key](../README.md#partner-key) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + + +# **conversations_pushed_messages_id_put** +> ConversationsMessage conversations_pushed_messages_id_put(id, body) + +Update an automated message + +### Example +```ruby +# load the gem +require 'sib-api-v3-sdk' +# setup authorization +SibApiV3Sdk.configure do |config| + # Configure API key authorization: api-key + config.api_key['api-key'] = 'YOUR API KEY' + # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil) + #config.api_key_prefix['api-key'] = 'Bearer' + + # Configure API key authorization: partner-key + config.api_key['partner-key'] = 'YOUR API KEY' + # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil) + #config.api_key_prefix['partner-key'] = 'Bearer' +end + +api_instance = SibApiV3Sdk::ConversationsApi.new + +id = 'id_example' # String | ID of the message + +body = SibApiV3Sdk::Body11.new # Body11 | + + +begin + #Update an automated message + result = api_instance.conversations_pushed_messages_id_put(id, body) + p result +rescue SibApiV3Sdk::ApiError => e + puts "Exception when calling ConversationsApi->conversations_pushed_messages_id_put: #{e}" +end +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **id** | **String**| ID of the message | + **body** | [**Body11**](Body11.md)| | + +### Return type + +[**ConversationsMessage**](ConversationsMessage.md) + +### Authorization + +[api-key](../README.md#api-key), [partner-key](../README.md#partner-key) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + + +# **conversations_pushed_messages_post** +> ConversationsMessage conversations_pushed_messages_post(body) + +Send an automated message to a visitor + +Example of automated messages: order status, announce new features in your web app, etc. + +### Example +```ruby +# load the gem +require 'sib-api-v3-sdk' +# setup authorization +SibApiV3Sdk.configure do |config| + # Configure API key authorization: api-key + config.api_key['api-key'] = 'YOUR API KEY' + # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil) + #config.api_key_prefix['api-key'] = 'Bearer' + + # Configure API key authorization: partner-key + config.api_key['partner-key'] = 'YOUR API KEY' + # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil) + #config.api_key_prefix['partner-key'] = 'Bearer' +end + +api_instance = SibApiV3Sdk::ConversationsApi.new + +body = SibApiV3Sdk::Body10.new # Body10 | + + +begin + #Send an automated message to a visitor + result = api_instance.conversations_pushed_messages_post(body) + p result +rescue SibApiV3Sdk::ApiError => e + puts "Exception when calling ConversationsApi->conversations_pushed_messages_post: #{e}" +end +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **body** | [**Body10**](Body10.md)| | + +### Return type + +[**ConversationsMessage**](ConversationsMessage.md) + +### Authorization + +[api-key](../README.md#api-key), [partner-key](../README.md#partner-key) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + + diff --git a/docs/ConversationsMessage.md b/docs/ConversationsMessage.md new file mode 100644 index 0000000..7b198c1 --- /dev/null +++ b/docs/ConversationsMessage.md @@ -0,0 +1,17 @@ +# SibApiV3Sdk::ConversationsMessage + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **String** | Message ID. It can be used for further manipulations with the message. | [optional] +**type** | **String** | `\"agent\"` for agents’ messages, `\"visitor\"` for visitors’ messages. | [optional] +**text** | **String** | Message text or name of the attached file | [optional] +**visitor_id** | **String** | visitor’s ID | [optional] +**agent_id** | **String** | ID of the agent on whose behalf the message was sent (only in messages sent by an agent). | [optional] +**agent_name** | **String** | Agent’s name as displayed to the visitor. Only in the messages sent by an agent. | [optional] +**created_at** | **Integer** | Timestamp in milliseconds. | [optional] +**is_pushed** | **BOOLEAN** | `true` for pushed messages | [optional] +**received_from** | **String** | In two-way integrations, messages sent via REST API can be marked with receivedFrom property and then filtered out when received in a webhook to avoid infinite loop. | [optional] +**file** | [**ConversationsMessageFile**](ConversationsMessageFile.md) | | [optional] + + diff --git a/docs/ConversationsMessageFile.md b/docs/ConversationsMessageFile.md new file mode 100644 index 0000000..499cabe --- /dev/null +++ b/docs/ConversationsMessageFile.md @@ -0,0 +1,12 @@ +# SibApiV3Sdk::ConversationsMessageFile + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**filename** | **String** | Name of the file | [optional] +**size** | **Integer** | Size in bytes | [optional] +**is_image** | **BOOLEAN** | Whether the file is an image | [optional] +**url** | **String** | URL of the file | [optional] +**image_info** | [**ConversationsMessageFileImageInfo**](ConversationsMessageFileImageInfo.md) | | [optional] + + diff --git a/docs/ConversationsMessageFileImageInfo.md b/docs/ConversationsMessageFileImageInfo.md new file mode 100644 index 0000000..840eaf3 --- /dev/null +++ b/docs/ConversationsMessageFileImageInfo.md @@ -0,0 +1,10 @@ +# SibApiV3Sdk::ConversationsMessageFileImageInfo + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**width** | **Integer** | Width of the image | [optional] +**height** | **Integer** | height of the image | [optional] +**preview_url** | **String** | URL of the preview | [optional] + + diff --git a/docs/CreateContact.md b/docs/CreateContact.md index c457d9d..cfb9617 100644 --- a/docs/CreateContact.md +++ b/docs/CreateContact.md @@ -4,7 +4,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **email** | **String** | Email address of the user. Mandatory if \"SMS\" field is not passed in \"attributes\" parameter. Mobile Number in \"SMS\" field should be passed with proper country code. For example {\"SMS\":\"+91xxxxxxxxxx\"} or {\"SMS\":\"0091xxxxxxxxxx\"} | [optional] -**attributes** | **Object** | Pass the set of attributes and their values. These attributes must be present in your SendinBlue account. For eg. {\"FNAME\":\"Elly\", \"LNAME\":\"Roger\"} | [optional] +**attributes** | **Object** | Pass the set of attributes and their values. The attribute's parameter should be passed in capital letter while creating a contact. These attributes must be present in your SendinBlue account. For eg. {\"FNAME\":\"Elly\", \"LNAME\":\"Roger\"} | [optional] **email_blacklisted** | **BOOLEAN** | Set this field to blacklist the contact for emails (emailBlacklisted = true) | [optional] **sms_blacklisted** | **BOOLEAN** | Set this field to blacklist the contact for SMS (smsBlacklisted = true) | [optional] **list_ids** | **Array<Integer>** | Ids of the lists to add the contact to | [optional] diff --git a/docs/CreateSubAccount.md b/docs/CreateSubAccount.md index 23d8971..623ef5c 100644 --- a/docs/CreateSubAccount.md +++ b/docs/CreateSubAccount.md @@ -3,9 +3,9 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**company_name** | **String** | Name of the organization | +**company_name** | **String** | Set the name of the sub-account company | **email** | **String** | Email address for the organization | -**language** | **String** | Language for identifying localization information | [optional] -**timezone** | **String** | Request timezone of the client | [optional] +**language** | **String** | Set the language of the sub-account | [optional] +**timezone** | **String** | Set the timezone of the sub-account | [optional] diff --git a/docs/CreateSubAccountResponse.md b/docs/CreateSubAccountResponse.md new file mode 100644 index 0000000..019995b --- /dev/null +++ b/docs/CreateSubAccountResponse.md @@ -0,0 +1,8 @@ +# SibApiV3Sdk::CreateSubAccountResponse + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **Integer** | ID of the sub-account created | + + diff --git a/docs/Deal.md b/docs/Deal.md new file mode 100644 index 0000000..069b38c --- /dev/null +++ b/docs/Deal.md @@ -0,0 +1,11 @@ +# SibApiV3Sdk::Deal + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **String** | Unique deal id | [optional] +**attributes** | **Object** | Deal attributes with values | [optional] +**linked_contacts_ids** | **Array<Integer>** | Contact ids for contacts linked to this deal | [optional] +**linked_companies_ids** | **Array<String>** | Companies ids for companies linked to this deal | [optional] + + diff --git a/docs/DealAttributes.md b/docs/DealAttributes.md new file mode 100644 index 0000000..e741cee --- /dev/null +++ b/docs/DealAttributes.md @@ -0,0 +1,7 @@ +# SibApiV3Sdk::DealAttributes + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + + diff --git a/docs/DealAttributesInner.md b/docs/DealAttributesInner.md new file mode 100644 index 0000000..9caa957 --- /dev/null +++ b/docs/DealAttributesInner.md @@ -0,0 +1,12 @@ +# SibApiV3Sdk::DealAttributesInner + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**internal_name** | **String** | | [optional] +**label** | **String** | | [optional] +**attribute_type_name** | **String** | | [optional] +**attribute_options** | **Array<Object>** | | [optional] +**is_required** | **BOOLEAN** | | [optional] + + diff --git a/docs/DealsApi.md b/docs/DealsApi.md new file mode 100644 index 0000000..0b7d555 --- /dev/null +++ b/docs/DealsApi.md @@ -0,0 +1,476 @@ +# SibApiV3Sdk::DealsApi + +All URIs are relative to *https://api.sendinblue.com/v3* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**crm_attributes_deals_get**](DealsApi.md#crm_attributes_deals_get) | **GET** /crm/attributes/deals | Get deal attributes +[**crm_deals_get**](DealsApi.md#crm_deals_get) | **GET** /crm/deals | Get all deals +[**crm_deals_id_delete**](DealsApi.md#crm_deals_id_delete) | **DELETE** /crm/deals/{id} | Delete a deal +[**crm_deals_id_get**](DealsApi.md#crm_deals_id_get) | **GET** /crm/deals/{id} | Get a deal +[**crm_deals_id_patch**](DealsApi.md#crm_deals_id_patch) | **PATCH** /crm/deals/{id} | Update a deal +[**crm_deals_link_unlink_id_patch**](DealsApi.md#crm_deals_link_unlink_id_patch) | **PATCH** /crm/deals/link-unlink/{id} | Link and Unlink a deal with contacts and companies +[**crm_deals_post**](DealsApi.md#crm_deals_post) | **POST** /crm/deals | Create a deal +[**crm_pipeline_details_get**](DealsApi.md#crm_pipeline_details_get) | **GET** /crm/pipeline/details | Get pipeline stages + + +# **crm_attributes_deals_get** +> DealAttributes crm_attributes_deals_get + +Get deal attributes + +### Example +```ruby +# load the gem +require 'sib-api-v3-sdk' +# setup authorization +SibApiV3Sdk.configure do |config| + # Configure API key authorization: api-key + config.api_key['api-key'] = 'YOUR API KEY' + # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil) + #config.api_key_prefix['api-key'] = 'Bearer' + + # Configure API key authorization: partner-key + config.api_key['partner-key'] = 'YOUR API KEY' + # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil) + #config.api_key_prefix['partner-key'] = 'Bearer' +end + +api_instance = SibApiV3Sdk::DealsApi.new + +begin + #Get deal attributes + result = api_instance.crm_attributes_deals_get + p result +rescue SibApiV3Sdk::ApiError => e + puts "Exception when calling DealsApi->crm_attributes_deals_get: #{e}" +end +``` + +### Parameters +This endpoint does not need any parameter. + +### Return type + +[**DealAttributes**](DealAttributes.md) + +### Authorization + +[api-key](../README.md#api-key), [partner-key](../README.md#partner-key) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + + +# **crm_deals_get** +> DealsList crm_deals_get(opts) + +Get all deals + +### Example +```ruby +# load the gem +require 'sib-api-v3-sdk' +# setup authorization +SibApiV3Sdk.configure do |config| + # Configure API key authorization: api-key + config.api_key['api-key'] = 'YOUR API KEY' + # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil) + #config.api_key_prefix['api-key'] = 'Bearer' + + # Configure API key authorization: partner-key + config.api_key['partner-key'] = 'YOUR API KEY' + # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil) + #config.api_key_prefix['partner-key'] = 'Bearer' +end + +api_instance = SibApiV3Sdk::DealsApi.new + +opts = { + filter_attributes: 'filter_attributes_example', # String | Filter by attrbutes. If you have filter for owner on your side please send it as `attributes.owner`.\" + filter_linked_companies_ids: 'filter_linked_companies_ids_example', # String | Filter by linked companies ids + filter_linked_contacts_ids: 'filter_linked_contacts_ids_example', # String | Filter by linked companies ids + offset: 789, # Integer | Index of the first document of the page + limit: 50, # Integer | Number of documents per page + sort: 'sort_example', # String | Sort the results in the ascending/descending order. Default order is **descending** by creation if `sort` is not passed + sort_by: 'sort_by_example' # String | The field used to sort field names. +} + +begin + #Get all deals + result = api_instance.crm_deals_get(opts) + p result +rescue SibApiV3Sdk::ApiError => e + puts "Exception when calling DealsApi->crm_deals_get: #{e}" +end +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **filter_attributes** | **String**| Filter by attrbutes. If you have filter for owner on your side please send it as `attributes.owner`.\" | [optional] + **filter_linked_companies_ids** | **String**| Filter by linked companies ids | [optional] + **filter_linked_contacts_ids** | **String**| Filter by linked companies ids | [optional] + **offset** | **Integer**| Index of the first document of the page | [optional] + **limit** | **Integer**| Number of documents per page | [optional] [default to 50] + **sort** | **String**| Sort the results in the ascending/descending order. Default order is **descending** by creation if `sort` is not passed | [optional] + **sort_by** | **String**| The field used to sort field names. | [optional] + +### Return type + +[**DealsList**](DealsList.md) + +### Authorization + +[api-key](../README.md#api-key), [partner-key](../README.md#partner-key) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + + +# **crm_deals_id_delete** +> crm_deals_id_delete(id) + +Delete a deal + +### Example +```ruby +# load the gem +require 'sib-api-v3-sdk' +# setup authorization +SibApiV3Sdk.configure do |config| + # Configure API key authorization: api-key + config.api_key['api-key'] = 'YOUR API KEY' + # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil) + #config.api_key_prefix['api-key'] = 'Bearer' + + # Configure API key authorization: partner-key + config.api_key['partner-key'] = 'YOUR API KEY' + # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil) + #config.api_key_prefix['partner-key'] = 'Bearer' +end + +api_instance = SibApiV3Sdk::DealsApi.new + +id = 'id_example' # String | + + +begin + #Delete a deal + api_instance.crm_deals_id_delete(id) +rescue SibApiV3Sdk::ApiError => e + puts "Exception when calling DealsApi->crm_deals_id_delete: #{e}" +end +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **id** | **String**| | + +### Return type + +nil (empty response body) + +### Authorization + +[api-key](../README.md#api-key), [partner-key](../README.md#partner-key) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + + +# **crm_deals_id_get** +> Deal crm_deals_id_get(id) + +Get a deal + +### Example +```ruby +# load the gem +require 'sib-api-v3-sdk' +# setup authorization +SibApiV3Sdk.configure do |config| + # Configure API key authorization: api-key + config.api_key['api-key'] = 'YOUR API KEY' + # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil) + #config.api_key_prefix['api-key'] = 'Bearer' + + # Configure API key authorization: partner-key + config.api_key['partner-key'] = 'YOUR API KEY' + # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil) + #config.api_key_prefix['partner-key'] = 'Bearer' +end + +api_instance = SibApiV3Sdk::DealsApi.new + +id = 'id_example' # String | + + +begin + #Get a deal + result = api_instance.crm_deals_id_get(id) + p result +rescue SibApiV3Sdk::ApiError => e + puts "Exception when calling DealsApi->crm_deals_id_get: #{e}" +end +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **id** | **String**| | + +### Return type + +[**Deal**](Deal.md) + +### Authorization + +[api-key](../README.md#api-key), [partner-key](../README.md#partner-key) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + + +# **crm_deals_id_patch** +> crm_deals_id_patch(id, body) + +Update a deal + +### Example +```ruby +# load the gem +require 'sib-api-v3-sdk' +# setup authorization +SibApiV3Sdk.configure do |config| + # Configure API key authorization: api-key + config.api_key['api-key'] = 'YOUR API KEY' + # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil) + #config.api_key_prefix['api-key'] = 'Bearer' + + # Configure API key authorization: partner-key + config.api_key['partner-key'] = 'YOUR API KEY' + # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil) + #config.api_key_prefix['partner-key'] = 'Bearer' +end + +api_instance = SibApiV3Sdk::DealsApi.new + +id = 'id_example' # String | + +body = SibApiV3Sdk::Body4.new # Body4 | Updated deal details. + + +begin + #Update a deal + api_instance.crm_deals_id_patch(id, body) +rescue SibApiV3Sdk::ApiError => e + puts "Exception when calling DealsApi->crm_deals_id_patch: #{e}" +end +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **id** | **String**| | + **body** | [**Body4**](Body4.md)| Updated deal details. | + +### Return type + +nil (empty response body) + +### Authorization + +[api-key](../README.md#api-key), [partner-key](../README.md#partner-key) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + + +# **crm_deals_link_unlink_id_patch** +> crm_deals_link_unlink_id_patch(id, body) + +Link and Unlink a deal with contacts and companies + +### Example +```ruby +# load the gem +require 'sib-api-v3-sdk' +# setup authorization +SibApiV3Sdk.configure do |config| + # Configure API key authorization: api-key + config.api_key['api-key'] = 'YOUR API KEY' + # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil) + #config.api_key_prefix['api-key'] = 'Bearer' + + # Configure API key authorization: partner-key + config.api_key['partner-key'] = 'YOUR API KEY' + # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil) + #config.api_key_prefix['partner-key'] = 'Bearer' +end + +api_instance = SibApiV3Sdk::DealsApi.new + +id = 'id_example' # String | + +body = SibApiV3Sdk::Body5.new # Body5 | Linked / Unlinked contacts and companies ids. + + +begin + #Link and Unlink a deal with contacts and companies + api_instance.crm_deals_link_unlink_id_patch(id, body) +rescue SibApiV3Sdk::ApiError => e + puts "Exception when calling DealsApi->crm_deals_link_unlink_id_patch: #{e}" +end +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **id** | **String**| | + **body** | [**Body5**](Body5.md)| Linked / Unlinked contacts and companies ids. | + +### Return type + +nil (empty response body) + +### Authorization + +[api-key](../README.md#api-key), [partner-key](../README.md#partner-key) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + + +# **crm_deals_post** +> InlineResponse201 crm_deals_post(body) + +Create a deal + +### Example +```ruby +# load the gem +require 'sib-api-v3-sdk' +# setup authorization +SibApiV3Sdk.configure do |config| + # Configure API key authorization: api-key + config.api_key['api-key'] = 'YOUR API KEY' + # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil) + #config.api_key_prefix['api-key'] = 'Bearer' + + # Configure API key authorization: partner-key + config.api_key['partner-key'] = 'YOUR API KEY' + # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil) + #config.api_key_prefix['partner-key'] = 'Bearer' +end + +api_instance = SibApiV3Sdk::DealsApi.new + +body = SibApiV3Sdk::Body3.new # Body3 | Deal create data. + + +begin + #Create a deal + result = api_instance.crm_deals_post(body) + p result +rescue SibApiV3Sdk::ApiError => e + puts "Exception when calling DealsApi->crm_deals_post: #{e}" +end +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **body** | [**Body3**](Body3.md)| Deal create data. | + +### Return type + +[**InlineResponse201**](InlineResponse201.md) + +### Authorization + +[api-key](../README.md#api-key), [partner-key](../README.md#partner-key) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + + +# **crm_pipeline_details_get** +> Pipeline crm_pipeline_details_get + +Get pipeline stages + +### Example +```ruby +# load the gem +require 'sib-api-v3-sdk' +# setup authorization +SibApiV3Sdk.configure do |config| + # Configure API key authorization: api-key + config.api_key['api-key'] = 'YOUR API KEY' + # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil) + #config.api_key_prefix['api-key'] = 'Bearer' + + # Configure API key authorization: partner-key + config.api_key['partner-key'] = 'YOUR API KEY' + # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil) + #config.api_key_prefix['partner-key'] = 'Bearer' +end + +api_instance = SibApiV3Sdk::DealsApi.new + +begin + #Get pipeline stages + result = api_instance.crm_pipeline_details_get + p result +rescue SibApiV3Sdk::ApiError => e + puts "Exception when calling DealsApi->crm_pipeline_details_get: #{e}" +end +``` + +### Parameters +This endpoint does not need any parameter. + +### Return type + +[**Pipeline**](Pipeline.md) + +### Authorization + +[api-key](../README.md#api-key), [partner-key](../README.md#partner-key) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + + diff --git a/docs/DealsList.md b/docs/DealsList.md new file mode 100644 index 0000000..142caab --- /dev/null +++ b/docs/DealsList.md @@ -0,0 +1,8 @@ +# SibApiV3Sdk::DealsList + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**items** | [**Array<Deal>**](Deal.md) | List of deals | [optional] + + diff --git a/docs/EmailCampaignsApi.md b/docs/EmailCampaignsApi.md index 6e520b5..d08d5f6 100644 --- a/docs/EmailCampaignsApi.md +++ b/docs/EmailCampaignsApi.md @@ -338,7 +338,7 @@ opts = { status: 'status_example', # String | Filter on the status of the campaign start_date: 'start_date_example', # String | Mandatory if endDate is used. Starting (urlencoded) UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ) to filter the sent email campaigns. Prefer to pass your timezone in date-time format for accurate result ( only available if either 'status' not passed and if passed is set to 'sent' ) end_date: 'end_date_example', # String | Mandatory if startDate is used. Ending (urlencoded) UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ) to filter the sent email campaigns. Prefer to pass your timezone in date-time format for accurate result ( only available if either 'status' not passed and if passed is set to 'sent' ) - limit: 500, # Integer | Number of documents per page + limit: 50, # Integer | Number of documents per page offset: 0, # Integer | Index of the first document in the page sort: 'desc' # String | Sort the results in the ascending/descending order of record creation. Default order is **descending** if `sort` is not passed } @@ -360,7 +360,7 @@ Name | Type | Description | Notes **status** | **String**| Filter on the status of the campaign | [optional] **start_date** | **String**| Mandatory if endDate is used. Starting (urlencoded) UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ) to filter the sent email campaigns. Prefer to pass your timezone in date-time format for accurate result ( only available if either 'status' not passed and if passed is set to 'sent' ) | [optional] **end_date** | **String**| Mandatory if startDate is used. Ending (urlencoded) UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ) to filter the sent email campaigns. Prefer to pass your timezone in date-time format for accurate result ( only available if either 'status' not passed and if passed is set to 'sent' ) | [optional] - **limit** | **Integer**| Number of documents per page | [optional] [default to 500] + **limit** | **Integer**| Number of documents per page | [optional] [default to 50] **offset** | **Integer**| Index of the first document in the page | [optional] [default to 0] **sort** | **String**| Sort the results in the ascending/descending order of record creation. Default order is **descending** if `sort` is not passed | [optional] [default to desc] @@ -733,7 +733,7 @@ nil (empty response body) # **upload_image_to_gallery** -> upload_image_to_gallery(upload_image) +> UploadImageModel upload_image_to_gallery(upload_image) Upload an image to your account's image gallery @@ -761,7 +761,8 @@ upload_image = SibApiV3Sdk::UploadImageToGallery.new # UploadImageToGallery | Pa begin #Upload an image to your account's image gallery - api_instance.upload_image_to_gallery(upload_image) + result = api_instance.upload_image_to_gallery(upload_image) + p result rescue SibApiV3Sdk::ApiError => e puts "Exception when calling EmailCampaignsApi->upload_image_to_gallery: #{e}" end @@ -775,7 +776,7 @@ Name | Type | Description | Notes ### Return type -nil (empty response body) +[**UploadImageModel**](UploadImageModel.md) ### Authorization diff --git a/docs/FileData.md b/docs/FileData.md index 7990182..bf460a5 100644 --- a/docs/FileData.md +++ b/docs/FileData.md @@ -3,15 +3,12 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**url** | **String** | Url of uploaded file | [optional] -**id** | **String** | Id of uploaded file | [optional] **name** | **String** | Name of uploaded file | [optional] **author_id** | **String** | Account id of user which created the file | [optional] -**author** | **Object** | Account details of user which created the file | [optional] **contact_id** | **Integer** | Contact id of contact on which file is uploaded | [optional] -**deal_ids** | **Array<String>** | Deal ids linked to a file | [optional] -**size** | **Integer** | Size of file uploaded | [optional] +**deal_id** | **String** | Deal id linked to a file | [optional] +**company_id** | **String** | Company id linked to a file | [optional] +**size** | **Integer** | Size of file in bytes | [optional] **created_at** | **DateTime** | File created date/time | [optional] -**updated_at** | **DateTime** | File updated date/time | [optional] diff --git a/docs/FileDownloadableLink.md b/docs/FileDownloadableLink.md new file mode 100644 index 0000000..bcf95b8 --- /dev/null +++ b/docs/FileDownloadableLink.md @@ -0,0 +1,8 @@ +# SibApiV3Sdk::FileDownloadableLink + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**file_url** | **String** | A unique link to download the requested file. | + + diff --git a/docs/FileList.md b/docs/FileList.md new file mode 100644 index 0000000..0d5cd24 --- /dev/null +++ b/docs/FileList.md @@ -0,0 +1,7 @@ +# SibApiV3Sdk::FileList + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + + diff --git a/docs/FilesApi.md b/docs/FilesApi.md new file mode 100644 index 0000000..593dc15 --- /dev/null +++ b/docs/FilesApi.md @@ -0,0 +1,318 @@ +# SibApiV3Sdk::FilesApi + +All URIs are relative to *https://api.sendinblue.com/v3* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**crm_files_get**](FilesApi.md#crm_files_get) | **GET** /crm/files | Get all files +[**crm_files_id_data_get**](FilesApi.md#crm_files_id_data_get) | **GET** /crm/files/{id}/data | Get file details +[**crm_files_id_delete**](FilesApi.md#crm_files_id_delete) | **DELETE** /crm/files/{id} | Delete a file +[**crm_files_id_get**](FilesApi.md#crm_files_id_get) | **GET** /crm/files/{id} | Download a file +[**crm_files_post**](FilesApi.md#crm_files_post) | **POST** /crm/files | Upload a file + + +# **crm_files_get** +> FileList crm_files_get(opts) + +Get all files + +### Example +```ruby +# load the gem +require 'sib-api-v3-sdk' +# setup authorization +SibApiV3Sdk.configure do |config| + # Configure API key authorization: api-key + config.api_key['api-key'] = 'YOUR API KEY' + # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil) + #config.api_key_prefix['api-key'] = 'Bearer' + + # Configure API key authorization: partner-key + config.api_key['partner-key'] = 'YOUR API KEY' + # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil) + #config.api_key_prefix['partner-key'] = 'Bearer' +end + +api_instance = SibApiV3Sdk::FilesApi.new + +opts = { + entity: 'entity_example', # String | Filter by file entity type + entity_ids: 'entity_ids_example', # String | Filter by file entity IDs + date_from: 56, # Integer | dateFrom to date range filter type (timestamp in milliseconds) + date_to: 56, # Integer | dateTo to date range filter type (timestamp in milliseconds) + offset: 789, # Integer | Index of the first document of the page + limit: 50, # Integer | Number of documents per page + sort: 'sort_example' # String | Sort the results in the ascending/descending order. Default order is **descending** by creation if `sort` is not passed +} + +begin + #Get all files + result = api_instance.crm_files_get(opts) + p result +rescue SibApiV3Sdk::ApiError => e + puts "Exception when calling FilesApi->crm_files_get: #{e}" +end +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **entity** | **String**| Filter by file entity type | [optional] + **entity_ids** | **String**| Filter by file entity IDs | [optional] + **date_from** | **Integer**| dateFrom to date range filter type (timestamp in milliseconds) | [optional] + **date_to** | **Integer**| dateTo to date range filter type (timestamp in milliseconds) | [optional] + **offset** | **Integer**| Index of the first document of the page | [optional] + **limit** | **Integer**| Number of documents per page | [optional] [default to 50] + **sort** | **String**| Sort the results in the ascending/descending order. Default order is **descending** by creation if `sort` is not passed | [optional] + +### Return type + +[**FileList**](FileList.md) + +### Authorization + +[api-key](../README.md#api-key), [partner-key](../README.md#partner-key) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + + +# **crm_files_id_data_get** +> FileData crm_files_id_data_get(id) + +Get file details + +### Example +```ruby +# load the gem +require 'sib-api-v3-sdk' +# setup authorization +SibApiV3Sdk.configure do |config| + # Configure API key authorization: api-key + config.api_key['api-key'] = 'YOUR API KEY' + # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil) + #config.api_key_prefix['api-key'] = 'Bearer' + + # Configure API key authorization: partner-key + config.api_key['partner-key'] = 'YOUR API KEY' + # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil) + #config.api_key_prefix['partner-key'] = 'Bearer' +end + +api_instance = SibApiV3Sdk::FilesApi.new + +id = 'id_example' # String | File id to get file data. + + +begin + #Get file details + result = api_instance.crm_files_id_data_get(id) + p result +rescue SibApiV3Sdk::ApiError => e + puts "Exception when calling FilesApi->crm_files_id_data_get: #{e}" +end +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **id** | **String**| File id to get file data. | + +### Return type + +[**FileData**](FileData.md) + +### Authorization + +[api-key](../README.md#api-key), [partner-key](../README.md#partner-key) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + + +# **crm_files_id_delete** +> crm_files_id_delete(id) + +Delete a file + +### Example +```ruby +# load the gem +require 'sib-api-v3-sdk' +# setup authorization +SibApiV3Sdk.configure do |config| + # Configure API key authorization: api-key + config.api_key['api-key'] = 'YOUR API KEY' + # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil) + #config.api_key_prefix['api-key'] = 'Bearer' + + # Configure API key authorization: partner-key + config.api_key['partner-key'] = 'YOUR API KEY' + # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil) + #config.api_key_prefix['partner-key'] = 'Bearer' +end + +api_instance = SibApiV3Sdk::FilesApi.new + +id = 'id_example' # String | File id to delete. + + +begin + #Delete a file + api_instance.crm_files_id_delete(id) +rescue SibApiV3Sdk::ApiError => e + puts "Exception when calling FilesApi->crm_files_id_delete: #{e}" +end +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **id** | **String**| File id to delete. | + +### Return type + +nil (empty response body) + +### Authorization + +[api-key](../README.md#api-key), [partner-key](../README.md#partner-key) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + + +# **crm_files_id_get** +> FileDownloadableLink crm_files_id_get(id) + +Download a file + +### Example +```ruby +# load the gem +require 'sib-api-v3-sdk' +# setup authorization +SibApiV3Sdk.configure do |config| + # Configure API key authorization: api-key + config.api_key['api-key'] = 'YOUR API KEY' + # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil) + #config.api_key_prefix['api-key'] = 'Bearer' + + # Configure API key authorization: partner-key + config.api_key['partner-key'] = 'YOUR API KEY' + # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil) + #config.api_key_prefix['partner-key'] = 'Bearer' +end + +api_instance = SibApiV3Sdk::FilesApi.new + +id = 'id_example' # String | File id to download. + + +begin + #Download a file + result = api_instance.crm_files_id_get(id) + p result +rescue SibApiV3Sdk::ApiError => e + puts "Exception when calling FilesApi->crm_files_id_get: #{e}" +end +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **id** | **String**| File id to download. | + +### Return type + +[**FileDownloadableLink**](FileDownloadableLink.md) + +### Authorization + +[api-key](../README.md#api-key), [partner-key](../README.md#partner-key) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + + +# **crm_files_post** +> FileData crm_files_post(file, opts) + +Upload a file + +### Example +```ruby +# load the gem +require 'sib-api-v3-sdk' +# setup authorization +SibApiV3Sdk.configure do |config| + # Configure API key authorization: api-key + config.api_key['api-key'] = 'YOUR API KEY' + # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil) + #config.api_key_prefix['api-key'] = 'Bearer' + + # Configure API key authorization: partner-key + config.api_key['partner-key'] = 'YOUR API KEY' + # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil) + #config.api_key_prefix['partner-key'] = 'Bearer' +end + +api_instance = SibApiV3Sdk::FilesApi.new + +file = File.new('/path/to/file.txt') # File | File data to create a file. + +opts = { + deal_id: 'deal_id_example', # String | Deal id linked to a file + contact_id: 789, # Integer | Contact id linked to a file + company_id: 'company_id_example' # String | Company id linked to a file +} + +begin + #Upload a file + result = api_instance.crm_files_post(file, opts) + p result +rescue SibApiV3Sdk::ApiError => e + puts "Exception when calling FilesApi->crm_files_post: #{e}" +end +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **file** | **File**| File data to create a file. | + **deal_id** | **String**| Deal id linked to a file | [optional] + **contact_id** | **Integer**| Contact id linked to a file | [optional] + **company_id** | **String**| Company id linked to a file | [optional] + +### Return type + +[**FileData**](FileData.md) + +### Authorization + +[api-key](../README.md#api-key), [partner-key](../README.md#partner-key) + +### HTTP request headers + + - **Content-Type**: multipart/form-data + - **Accept**: application/json + + + diff --git a/docs/GetCampaignStats.md b/docs/GetCampaignStats.md index 389ddec..2080440 100644 --- a/docs/GetCampaignStats.md +++ b/docs/GetCampaignStats.md @@ -13,6 +13,8 @@ Name | Type | Description | Notes **hard_bounces** | **Integer** | Number of harbounce for the campaign | **unique_views** | **Integer** | Number of unique openings for the campaign | **trackable_views** | **Integer** | Recipients without any privacy protection option enabled in their email client | +**trackable_views_rate** | **Float** | Rate of recipients without any privacy protection option enabled in their email client | [optional] +**estimated_views** | **Integer** | Rate of recipients without any privacy protection option enabled in their email client, applied to all delivered emails | [optional] **unsubscriptions** | **Integer** | Number of unsubscription for the campaign | **viewed** | **Integer** | Number of openings for the campaign | **deferred** | **Integer** | Number of deferred emails for the campaign | [optional] diff --git a/docs/GetScheduledEmailByBatchId.md b/docs/GetScheduledEmailByBatchId.md new file mode 100644 index 0000000..85e1fe1 --- /dev/null +++ b/docs/GetScheduledEmailByBatchId.md @@ -0,0 +1,9 @@ +# SibApiV3Sdk::GetScheduledEmailByBatchId + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**count** | **Integer** | Total number of batches | [optional] +**batches** | [**Array<GetScheduledEmailByBatchIdBatches>**](GetScheduledEmailByBatchIdBatches.md) | | [optional] + + diff --git a/docs/GetScheduledEmailByBatchIdBatches.md b/docs/GetScheduledEmailByBatchIdBatches.md new file mode 100644 index 0000000..b9a0ee5 --- /dev/null +++ b/docs/GetScheduledEmailByBatchIdBatches.md @@ -0,0 +1,10 @@ +# SibApiV3Sdk::GetScheduledEmailByBatchIdBatches + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**scheduled_at** | **DateTime** | Datetime for which the batch was scheduled | +**created_at** | **DateTime** | Datetime on which the batch was scheduled | +**status** | **String** | Current status of the scheduled batch | + + diff --git a/docs/GetScheduledEmailByMessageId.md b/docs/GetScheduledEmailByMessageId.md new file mode 100644 index 0000000..41880f4 --- /dev/null +++ b/docs/GetScheduledEmailByMessageId.md @@ -0,0 +1,10 @@ +# SibApiV3Sdk::GetScheduledEmailByMessageId + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**scheduled_at** | **DateTime** | Datetime for which the email was scheduled | +**created_at** | **DateTime** | Datetime on which the email was scheduled | +**status** | **String** | Current status of the scheduled email | + + diff --git a/docs/GetSsoToken.md b/docs/GetSsoToken.md index 59d9236..c3cabb4 100644 --- a/docs/GetSsoToken.md +++ b/docs/GetSsoToken.md @@ -3,6 +3,6 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**token** | **String** | Session token. It will remain valid for a short period of time only. | +**token** | **String** | Session token, it will remain valid for 15 days. | diff --git a/docs/InboundParsingApi.md b/docs/InboundParsingApi.md index 4776f3d..bd83e89 100644 --- a/docs/InboundParsingApi.md +++ b/docs/InboundParsingApi.md @@ -4,10 +4,70 @@ All URIs are relative to *https://api.sendinblue.com/v3* Method | HTTP request | Description ------------- | ------------- | ------------- +[**get_inbound_email_attachment**](InboundParsingApi.md#get_inbound_email_attachment) | **GET** /inbound/attachments/{downloadToken} | Retrieve inbound attachment with download token. [**get_inbound_email_events**](InboundParsingApi.md#get_inbound_email_events) | **GET** /inbound/events | Get the list of all the events for the received emails. [**get_inbound_email_events_by_uuid**](InboundParsingApi.md#get_inbound_email_events_by_uuid) | **GET** /inbound/events/{uuid} | Fetch all events history for one particular received email. +# **get_inbound_email_attachment** +> File get_inbound_email_attachment(download_token) + +Retrieve inbound attachment with download token. + +This endpoint will retrieve inbound attachment with download token. + +### Example +```ruby +# load the gem +require 'sib-api-v3-sdk' +# setup authorization +SibApiV3Sdk.configure do |config| + # Configure API key authorization: api-key + config.api_key['api-key'] = 'YOUR API KEY' + # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil) + #config.api_key_prefix['api-key'] = 'Bearer' + + # Configure API key authorization: partner-key + config.api_key['partner-key'] = 'YOUR API KEY' + # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil) + #config.api_key_prefix['partner-key'] = 'Bearer' +end + +api_instance = SibApiV3Sdk::InboundParsingApi.new + +download_token = 'download_token_example' # String | Token to fetch a particular attachment + + +begin + #Retrieve inbound attachment with download token. + result = api_instance.get_inbound_email_attachment(download_token) + p result +rescue SibApiV3Sdk::ApiError => e + puts "Exception when calling InboundParsingApi->get_inbound_email_attachment: #{e}" +end +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **download_token** | **String**| Token to fetch a particular attachment | + +### Return type + +**File** + +### Authorization + +[api-key](../README.md#api-key), [partner-key](../README.md#partner-key) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + + # **get_inbound_email_events** > GetInboundEmailEvents get_inbound_email_events(opts) diff --git a/docs/InlineResponse200.md b/docs/InlineResponse200.md new file mode 100644 index 0000000..8282f21 --- /dev/null +++ b/docs/InlineResponse200.md @@ -0,0 +1,8 @@ +# SibApiV3Sdk::InlineResponse200 + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **String** | Unique company id | + + diff --git a/docs/InlineResponse201.md b/docs/InlineResponse201.md new file mode 100644 index 0000000..9e6175e --- /dev/null +++ b/docs/InlineResponse201.md @@ -0,0 +1,8 @@ +# SibApiV3Sdk::InlineResponse201 + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **String** | Unique deal id | + + diff --git a/docs/InlineResponse2011.md b/docs/InlineResponse2011.md new file mode 100644 index 0000000..7db4354 --- /dev/null +++ b/docs/InlineResponse2011.md @@ -0,0 +1,8 @@ +# SibApiV3Sdk::InlineResponse2011 + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **String** | Unique task id | + + diff --git a/docs/MasterAccountApi.md b/docs/MasterAccountApi.md index 42f34f9..6f54153 100644 --- a/docs/MasterAccountApi.md +++ b/docs/MasterAccountApi.md @@ -92,7 +92,7 @@ end api_instance = SibApiV3Sdk::MasterAccountApi.new -offset = 56 # Integer | Page number of sub-accounts listing +offset = 56 # Integer | Index of the first sub-account in the page limit = 56 # Integer | Number of sub-accounts to be displayed on each page @@ -110,7 +110,7 @@ end Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **offset** | **Integer**| Page number of sub-accounts listing | + **offset** | **Integer**| Index of the first sub-account in the page | **limit** | **Integer**| Number of sub-accounts to be displayed on each page | ### Return type @@ -189,7 +189,7 @@ nil (empty response body) Get sub-account details -This endpoint will provide the details of specified sub-account organization +This endpoint will provide the details for the specified sub-account company ### Example ```ruby @@ -305,7 +305,7 @@ nil (empty response body) # **corporate_sub_account_post** -> CreateModel corporate_sub_account_post(sub_account_create) +> CreateSubAccountResponse corporate_sub_account_post(sub_account_create) Create a new sub-account under a master account. @@ -350,7 +350,7 @@ Name | Type | Description | Notes ### Return type -[**CreateModel**](CreateModel.md) +[**CreateSubAccountResponse**](CreateSubAccountResponse.md) ### Authorization @@ -368,7 +368,7 @@ Name | Type | Description | Notes Generate SSO token to access Sendinblue -This endpoint generates an sso token to authenticate and access a sub-account of the master using the account endpoint https://app.sendinblue.com/account/login/sub-account/sso/[token], where [token] will be replaced with actual token. +This endpoint generates an sso token to authenticate and access a sub-account of the master using the account endpoint https://app.sendinblue.com/account/login/sub-account/sso/[token], where [token] will be replaced by the actual token. ### Example ```ruby diff --git a/docs/NoteId.md b/docs/NoteId.md new file mode 100644 index 0000000..666aab3 --- /dev/null +++ b/docs/NoteId.md @@ -0,0 +1,8 @@ +# SibApiV3Sdk::NoteId + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **String** | Unique note Id | [optional] + + diff --git a/docs/NoteList.md b/docs/NoteList.md new file mode 100644 index 0000000..f12856b --- /dev/null +++ b/docs/NoteList.md @@ -0,0 +1,7 @@ +# SibApiV3Sdk::NoteList + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + + diff --git a/docs/NotesApi.md b/docs/NotesApi.md new file mode 100644 index 0000000..2d27f30 --- /dev/null +++ b/docs/NotesApi.md @@ -0,0 +1,312 @@ +# SibApiV3Sdk::NotesApi + +All URIs are relative to *https://api.sendinblue.com/v3* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**crm_notes_get**](NotesApi.md#crm_notes_get) | **GET** /crm/notes | Get all notes +[**crm_notes_id_delete**](NotesApi.md#crm_notes_id_delete) | **DELETE** /crm/notes/{id} | Delete a note +[**crm_notes_id_get**](NotesApi.md#crm_notes_id_get) | **GET** /crm/notes/{id} | Get a note +[**crm_notes_id_patch**](NotesApi.md#crm_notes_id_patch) | **PATCH** /crm/notes/{id} | Update a note +[**crm_notes_post**](NotesApi.md#crm_notes_post) | **POST** /crm/notes | Create a note + + +# **crm_notes_get** +> NoteList crm_notes_get(opts) + +Get all notes + +### Example +```ruby +# load the gem +require 'sib-api-v3-sdk' +# setup authorization +SibApiV3Sdk.configure do |config| + # Configure API key authorization: api-key + config.api_key['api-key'] = 'YOUR API KEY' + # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil) + #config.api_key_prefix['api-key'] = 'Bearer' + + # Configure API key authorization: partner-key + config.api_key['partner-key'] = 'YOUR API KEY' + # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil) + #config.api_key_prefix['partner-key'] = 'Bearer' +end + +api_instance = SibApiV3Sdk::NotesApi.new + +opts = { + entity: 'entity_example', # String | Filter by note entity type + entity_ids: 'entity_ids_example', # String | Filter by note entity IDs + date_from: 56, # Integer | dateFrom to date range filter type (timestamp in milliseconds) + date_to: 56, # Integer | dateTo to date range filter type (timestamp in milliseconds) + offset: 789, # Integer | Index of the first document of the page + limit: 50, # Integer | Number of documents per page + sort: 'sort_example' # String | Sort the results in the ascending/descending order. Default order is **descending** by creation if `sort` is not passed +} + +begin + #Get all notes + result = api_instance.crm_notes_get(opts) + p result +rescue SibApiV3Sdk::ApiError => e + puts "Exception when calling NotesApi->crm_notes_get: #{e}" +end +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **entity** | **String**| Filter by note entity type | [optional] + **entity_ids** | **String**| Filter by note entity IDs | [optional] + **date_from** | **Integer**| dateFrom to date range filter type (timestamp in milliseconds) | [optional] + **date_to** | **Integer**| dateTo to date range filter type (timestamp in milliseconds) | [optional] + **offset** | **Integer**| Index of the first document of the page | [optional] + **limit** | **Integer**| Number of documents per page | [optional] [default to 50] + **sort** | **String**| Sort the results in the ascending/descending order. Default order is **descending** by creation if `sort` is not passed | [optional] + +### Return type + +[**NoteList**](NoteList.md) + +### Authorization + +[api-key](../README.md#api-key), [partner-key](../README.md#partner-key) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + + +# **crm_notes_id_delete** +> crm_notes_id_delete(id) + +Delete a note + +### Example +```ruby +# load the gem +require 'sib-api-v3-sdk' +# setup authorization +SibApiV3Sdk.configure do |config| + # Configure API key authorization: api-key + config.api_key['api-key'] = 'YOUR API KEY' + # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil) + #config.api_key_prefix['api-key'] = 'Bearer' + + # Configure API key authorization: partner-key + config.api_key['partner-key'] = 'YOUR API KEY' + # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil) + #config.api_key_prefix['partner-key'] = 'Bearer' +end + +api_instance = SibApiV3Sdk::NotesApi.new + +id = 'id_example' # String | Note ID to delete + + +begin + #Delete a note + api_instance.crm_notes_id_delete(id) +rescue SibApiV3Sdk::ApiError => e + puts "Exception when calling NotesApi->crm_notes_id_delete: #{e}" +end +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **id** | **String**| Note ID to delete | + +### Return type + +nil (empty response body) + +### Authorization + +[api-key](../README.md#api-key), [partner-key](../README.md#partner-key) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + + +# **crm_notes_id_get** +> Note crm_notes_id_get(id) + +Get a note + +### Example +```ruby +# load the gem +require 'sib-api-v3-sdk' +# setup authorization +SibApiV3Sdk.configure do |config| + # Configure API key authorization: api-key + config.api_key['api-key'] = 'YOUR API KEY' + # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil) + #config.api_key_prefix['api-key'] = 'Bearer' + + # Configure API key authorization: partner-key + config.api_key['partner-key'] = 'YOUR API KEY' + # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil) + #config.api_key_prefix['partner-key'] = 'Bearer' +end + +api_instance = SibApiV3Sdk::NotesApi.new + +id = 'id_example' # String | Note ID to get + + +begin + #Get a note + result = api_instance.crm_notes_id_get(id) + p result +rescue SibApiV3Sdk::ApiError => e + puts "Exception when calling NotesApi->crm_notes_id_get: #{e}" +end +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **id** | **String**| Note ID to get | + +### Return type + +[**Note**](Note.md) + +### Authorization + +[api-key](../README.md#api-key), [partner-key](../README.md#partner-key) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + + +# **crm_notes_id_patch** +> crm_notes_id_patch(id, body) + +Update a note + +### Example +```ruby +# load the gem +require 'sib-api-v3-sdk' +# setup authorization +SibApiV3Sdk.configure do |config| + # Configure API key authorization: api-key + config.api_key['api-key'] = 'YOUR API KEY' + # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil) + #config.api_key_prefix['api-key'] = 'Bearer' + + # Configure API key authorization: partner-key + config.api_key['partner-key'] = 'YOUR API KEY' + # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil) + #config.api_key_prefix['partner-key'] = 'Bearer' +end + +api_instance = SibApiV3Sdk::NotesApi.new + +id = 'id_example' # String | Note ID to update + +body = SibApiV3Sdk::NoteData.new # NoteData | Note data to update a note + + +begin + #Update a note + api_instance.crm_notes_id_patch(id, body) +rescue SibApiV3Sdk::ApiError => e + puts "Exception when calling NotesApi->crm_notes_id_patch: #{e}" +end +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **id** | **String**| Note ID to update | + **body** | [**NoteData**](NoteData.md)| Note data to update a note | + +### Return type + +nil (empty response body) + +### Authorization + +[api-key](../README.md#api-key), [partner-key](../README.md#partner-key) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + + +# **crm_notes_post** +> NoteId crm_notes_post(body) + +Create a note + +### Example +```ruby +# load the gem +require 'sib-api-v3-sdk' +# setup authorization +SibApiV3Sdk.configure do |config| + # Configure API key authorization: api-key + config.api_key['api-key'] = 'YOUR API KEY' + # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil) + #config.api_key_prefix['api-key'] = 'Bearer' + + # Configure API key authorization: partner-key + config.api_key['partner-key'] = 'YOUR API KEY' + # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil) + #config.api_key_prefix['partner-key'] = 'Bearer' +end + +api_instance = SibApiV3Sdk::NotesApi.new + +body = SibApiV3Sdk::NoteData.new # NoteData | Note data to create a note. + + +begin + #Create a note + result = api_instance.crm_notes_post(body) + p result +rescue SibApiV3Sdk::ApiError => e + puts "Exception when calling NotesApi->crm_notes_post: #{e}" +end +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **body** | [**NoteData**](NoteData.md)| Note data to create a note. | + +### Return type + +[**NoteId**](NoteId.md) + +### Authorization + +[api-key](../README.md#api-key), [partner-key](../README.md#partner-key) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + + diff --git a/docs/Pipeline.md b/docs/Pipeline.md new file mode 100644 index 0000000..8ec1fb8 --- /dev/null +++ b/docs/Pipeline.md @@ -0,0 +1,8 @@ +# SibApiV3Sdk::Pipeline + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**stages** | [**Array<PipelineStage>**](PipelineStage.md) | List of stages | [optional] + + diff --git a/docs/PipelineStage.md b/docs/PipelineStage.md new file mode 100644 index 0000000..de49124 --- /dev/null +++ b/docs/PipelineStage.md @@ -0,0 +1,9 @@ +# SibApiV3Sdk::PipelineStage + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **String** | Stage id | [optional] +**name** | **String** | Stage name | [optional] + + diff --git a/docs/ScheduleSmtpEmail.md b/docs/ScheduleSmtpEmail.md new file mode 100644 index 0000000..b0b6031 --- /dev/null +++ b/docs/ScheduleSmtpEmail.md @@ -0,0 +1,10 @@ +# SibApiV3Sdk::ScheduleSmtpEmail + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**message_id** | **String** | Message ID of the transactional email scheduled | [optional] +**message_ids** | **Array<String>** | | [optional] +**batch_id** | **String** | Batch ID of the batch transactional email scheduled | [optional] + + diff --git a/docs/SendSmtpEmail.md b/docs/SendSmtpEmail.md index 1947609..1a63819 100644 --- a/docs/SendSmtpEmail.md +++ b/docs/SendSmtpEmail.md @@ -13,9 +13,11 @@ Name | Type | Description | Notes **reply_to** | [**SendSmtpEmailReplyTo**](SendSmtpEmailReplyTo.md) | | [optional] **attachment** | [**Array<SendSmtpEmailAttachment>**](SendSmtpEmailAttachment.md) | Pass the absolute URL (no local file) or the base64 content of the attachment along with the attachment name (Mandatory if attachment content is passed). For example, `[{\"url\":\"https://attachment.domain.com/myAttachmentFromUrl.jpg\", \"name\":\"myAttachmentFromUrl.jpg\"}, {\"content\":\"base64 example content\", \"name\":\"myAttachmentFromBase64.jpg\"}]`. Allowed extensions for attachment file: xlsx, xls, ods, docx, docm, doc, csv, pdf, txt, gif, jpg, jpeg, png, tif, tiff, rtf, bmp, cgm, css, shtml, html, htm, zip, xml, ppt, pptx, tar, ez, ics, mobi, msg, pub, eps, odt, mp3, m4a, m4v, wma, ogg, flac, wav, aif, aifc, aiff, mp4, mov, avi, mkv, mpeg, mpg, wmv, pkpass and xlsm ( If 'templateId' is passed and is in New Template Language format then both attachment url and content are accepted. If template is in Old template Language format, then 'attachment' is ignored ) | [optional] **headers** | **Object** | Pass the set of custom headers (not the standard headers) that shall be sent along the mail headers in the original email. 'sender.ip' header can be set (only for dedicated ip users) to mention the IP to be used for sending transactional emails. Headers are allowed in `This-Case-Only` (i.e. words separated by hyphen with first letter of each word in capital letter), they will be converted to such case styling if not in this format in the request payload. For example, `{\"sender.ip\":\"1.2.3.4\", \"X-Mailin-custom\":\"some_custom_header\", \"idempotencyKey\":\"abc-123\"}`. | [optional] -**template_id** | **Integer** | Id of the template. | [optional] +**templateId** | **Integer** | Id of the template. | [optional] **params** | **Object** | Pass the set of attributes to customize the template. For example, {\"FNAME\":\"Joe\", \"LNAME\":\"Doe\"}. It's considered only if template is in New Template Language format. | [optional] **message_versions** | [**Array<SendSmtpEmailMessageVersions>**](SendSmtpEmailMessageVersions.md) | You can customize and send out multiple versions of a mail. templateId can be customized only if global parameter contains templateId. htmlContent and textContent can be customized only if any of the two, htmlContent or textContent, is present in global parameters. Some global parameters such as **to(mandatory), bcc, cc, replyTo, subject** can also be customized specific to each version. Total number of recipients in one API request must not exceed 2000. However, you can still pass upto 99 recipients maximum in one message version. The size of individual params in all the messageVersions shall not exceed 100 KB limit and that of cumulative params shall not exceed 1000 KB. You can follow this **step-by-step guide** on how to use **messageVersions** to batch send emails - https://developers.sendinblue.com/docs/batch-send-transactional-emails | [optional] **tags** | **Array<String>** | Tag your emails to find them more easily | [optional] +**scheduled_at** | **DateTime** | UTC date-time on which the email has to schedule (YYYY-MM-DDTHH:mm:ss.SSSZ). Prefer to pass your timezone in date-time format for scheduling. There can be an expected delay of +5 minutes in scheduled email delivery. **Please note this feature is currently a public beta**. | [optional] +**batch_id** | **String** | Valid UUIDv4 batch id to identify the scheduled batches transactional email. If not passed we will create a valid UUIDv4 batch id at our end. | [optional] diff --git a/docs/SubAccountDetailsResponsePlanInfoCredits.md b/docs/SubAccountDetailsResponsePlanInfoCredits.md index 779fb14..1f49383 100644 --- a/docs/SubAccountDetailsResponsePlanInfoCredits.md +++ b/docs/SubAccountDetailsResponsePlanInfoCredits.md @@ -3,7 +3,7 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**sms** | **Integer** | Sms quota of the sub-account | [optional] +**sms** | **Integer** | SMS credits remaining on the sub-account | [optional] **emails** | [**SubAccountDetailsResponsePlanInfoCreditsEmails**](SubAccountDetailsResponsePlanInfoCreditsEmails.md) | | [optional] diff --git a/docs/SubAccountsResponseSubAccounts.md b/docs/SubAccountsResponseSubAccounts.md index 3ebb7e7..e42344b 100644 --- a/docs/SubAccountsResponseSubAccounts.md +++ b/docs/SubAccountsResponseSubAccounts.md @@ -3,9 +3,9 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**id** | **Integer** | client id of sub-account organization | -**company_name** | **String** | Name of sub-account organization | -**active** | **BOOLEAN** | Whether organization is active or not | -**created_at** | **Integer** | timestamp when the organization was created | +**id** | **Integer** | id of the sub-account | +**company_name** | **String** | Name of the sub-account company | +**active** | **BOOLEAN** | Whether the sub-account is active or not | +**created_at** | **Integer** | Timestamp when the sub-account was created | diff --git a/docs/Task.md b/docs/Task.md index 33722a0..867e622 100644 --- a/docs/Task.md +++ b/docs/Task.md @@ -3,22 +3,11 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**first_contact** | [**Contact**](Contact.md) | | [optional] **id** | **String** | Unique task id | [optional] **task_type_id** | **String** | Id for type of task e.g Call / Email / Meeting etc. | **name** | **String** | Name of task | **contacts_ids** | **Array<Integer>** | Contact ids for contacts linked to this task | [optional] -**contacts** | [**Array<Contact>**](Contact.md) | Contact details for contacts linked to this task | [optional] **deals_ids** | **Array<String>** | Deal ids for deals a task is linked to | [optional] **companies_ids** | **Array<String>** | Companies ids for companies a task is linked to | [optional] -**assign_to_id** | **String** | User id to whom task is assigned | [optional] -**date** | **DateTime** | Task date/time | -**duration** | **Integer** | Duration of task | [optional] -**notes** | **String** | Notes added to a task | [optional] -**done** | **BOOLEAN** | Task marked as done | [optional] -**reminder** | [**TaskReminder**](TaskReminder.md) | Task reminder date/time for a task | [optional] -**created_at** | **DateTime** | Task created date/time | [optional] -**updated_at** | **DateTime** | Task update date/time | [optional] -**refs** | **Object** | | [optional] diff --git a/docs/TaskList.md b/docs/TaskList.md new file mode 100644 index 0000000..bb57426 --- /dev/null +++ b/docs/TaskList.md @@ -0,0 +1,8 @@ +# SibApiV3Sdk::TaskList + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**items** | [**Array<Task>**](Task.md) | List of tasks | [optional] + + diff --git a/docs/TaskReminder.md b/docs/TaskReminder.md index 634bd40..2b086b4 100644 --- a/docs/TaskReminder.md +++ b/docs/TaskReminder.md @@ -5,6 +5,6 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **value** | **Integer** | Value of time unit before reminder is to be sent | **unit** | **String** | Unit of time before reminder is to be sent | -**types** | **Array<String>** | Type of task reminder | +**types** | **Array<String>** | Type of task reminder e.g email, push | diff --git a/docs/TaskTypes.md b/docs/TaskTypes.md index d4903da..de50b4a 100644 --- a/docs/TaskTypes.md +++ b/docs/TaskTypes.md @@ -4,7 +4,6 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **id** | **String** | Id of task type | [optional] -**icon** | **String** | Icon of task type | [optional] **title** | **String** | Title of task type | [optional] diff --git a/docs/TasksApi.md b/docs/TasksApi.md new file mode 100644 index 0000000..2c0b2fa --- /dev/null +++ b/docs/TasksApi.md @@ -0,0 +1,376 @@ +# SibApiV3Sdk::TasksApi + +All URIs are relative to *https://api.sendinblue.com/v3* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**crm_tasks_get**](TasksApi.md#crm_tasks_get) | **GET** /crm/tasks | Get all tasks +[**crm_tasks_id_delete**](TasksApi.md#crm_tasks_id_delete) | **DELETE** /crm/tasks/{id} | Delete a task +[**crm_tasks_id_get**](TasksApi.md#crm_tasks_id_get) | **GET** /crm/tasks/{id} | Get a task +[**crm_tasks_id_patch**](TasksApi.md#crm_tasks_id_patch) | **PATCH** /crm/tasks/{id} | Update a task +[**crm_tasks_post**](TasksApi.md#crm_tasks_post) | **POST** /crm/tasks | Create a task +[**crm_tasktypes_get**](TasksApi.md#crm_tasktypes_get) | **GET** /crm/tasktypes | Get all task types + + +# **crm_tasks_get** +> TaskList crm_tasks_get(opts) + +Get all tasks + +### Example +```ruby +# load the gem +require 'sib-api-v3-sdk' +# setup authorization +SibApiV3Sdk.configure do |config| + # Configure API key authorization: api-key + config.api_key['api-key'] = 'YOUR API KEY' + # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil) + #config.api_key_prefix['api-key'] = 'Bearer' + + # Configure API key authorization: partner-key + config.api_key['partner-key'] = 'YOUR API KEY' + # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil) + #config.api_key_prefix['partner-key'] = 'Bearer' +end + +api_instance = SibApiV3Sdk::TasksApi.new + +opts = { + filter_type: 'filter_type_example', # String | Filter by task type (ID) + filter_status: 'filter_status_example', # String | Filter by task status + filter_date: 'filter_date_example', # String | Filter by date + filter_assign_to: 'filter_assign_to_example', # String | Filter by assignTo id + filter_contacts: 'filter_contacts_example', # String | Filter by contact ids + filter_deals: 'filter_deals_example', # String | Filter by deals ids + filter_companies: 'filter_companies_example', # String | Filter by companies ids + date_from: 56, # Integer | dateFrom to date range filter type (timestamp in milliseconds) + date_to: 56, # Integer | dateTo to date range filter type (timestamp in milliseconds) + offset: 789, # Integer | Index of the first document of the page + limit: 50, # Integer | Number of documents per page + sort: 'sort_example', # String | Sort the results in the ascending/descending order. Default order is **descending** by creation if `sort` is not passed + sort_by: 'sort_by_example' # String | The field used to sort field names. +} + +begin + #Get all tasks + result = api_instance.crm_tasks_get(opts) + p result +rescue SibApiV3Sdk::ApiError => e + puts "Exception when calling TasksApi->crm_tasks_get: #{e}" +end +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **filter_type** | **String**| Filter by task type (ID) | [optional] + **filter_status** | **String**| Filter by task status | [optional] + **filter_date** | **String**| Filter by date | [optional] + **filter_assign_to** | **String**| Filter by assignTo id | [optional] + **filter_contacts** | **String**| Filter by contact ids | [optional] + **filter_deals** | **String**| Filter by deals ids | [optional] + **filter_companies** | **String**| Filter by companies ids | [optional] + **date_from** | **Integer**| dateFrom to date range filter type (timestamp in milliseconds) | [optional] + **date_to** | **Integer**| dateTo to date range filter type (timestamp in milliseconds) | [optional] + **offset** | **Integer**| Index of the first document of the page | [optional] + **limit** | **Integer**| Number of documents per page | [optional] [default to 50] + **sort** | **String**| Sort the results in the ascending/descending order. Default order is **descending** by creation if `sort` is not passed | [optional] + **sort_by** | **String**| The field used to sort field names. | [optional] + +### Return type + +[**TaskList**](TaskList.md) + +### Authorization + +[api-key](../README.md#api-key), [partner-key](../README.md#partner-key) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + + +# **crm_tasks_id_delete** +> crm_tasks_id_delete(id) + +Delete a task + +### Example +```ruby +# load the gem +require 'sib-api-v3-sdk' +# setup authorization +SibApiV3Sdk.configure do |config| + # Configure API key authorization: api-key + config.api_key['api-key'] = 'YOUR API KEY' + # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil) + #config.api_key_prefix['api-key'] = 'Bearer' + + # Configure API key authorization: partner-key + config.api_key['partner-key'] = 'YOUR API KEY' + # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil) + #config.api_key_prefix['partner-key'] = 'Bearer' +end + +api_instance = SibApiV3Sdk::TasksApi.new + +id = 'id_example' # String | + + +begin + #Delete a task + api_instance.crm_tasks_id_delete(id) +rescue SibApiV3Sdk::ApiError => e + puts "Exception when calling TasksApi->crm_tasks_id_delete: #{e}" +end +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **id** | **String**| | + +### Return type + +nil (empty response body) + +### Authorization + +[api-key](../README.md#api-key), [partner-key](../README.md#partner-key) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + + +# **crm_tasks_id_get** +> Task crm_tasks_id_get(id) + +Get a task + +### Example +```ruby +# load the gem +require 'sib-api-v3-sdk' +# setup authorization +SibApiV3Sdk.configure do |config| + # Configure API key authorization: api-key + config.api_key['api-key'] = 'YOUR API KEY' + # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil) + #config.api_key_prefix['api-key'] = 'Bearer' + + # Configure API key authorization: partner-key + config.api_key['partner-key'] = 'YOUR API KEY' + # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil) + #config.api_key_prefix['partner-key'] = 'Bearer' +end + +api_instance = SibApiV3Sdk::TasksApi.new + +id = 'id_example' # String | + + +begin + #Get a task + result = api_instance.crm_tasks_id_get(id) + p result +rescue SibApiV3Sdk::ApiError => e + puts "Exception when calling TasksApi->crm_tasks_id_get: #{e}" +end +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **id** | **String**| | + +### Return type + +[**Task**](Task.md) + +### Authorization + +[api-key](../README.md#api-key), [partner-key](../README.md#partner-key) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + + +# **crm_tasks_id_patch** +> crm_tasks_id_patch(id, body) + +Update a task + +### Example +```ruby +# load the gem +require 'sib-api-v3-sdk' +# setup authorization +SibApiV3Sdk.configure do |config| + # Configure API key authorization: api-key + config.api_key['api-key'] = 'YOUR API KEY' + # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil) + #config.api_key_prefix['api-key'] = 'Bearer' + + # Configure API key authorization: partner-key + config.api_key['partner-key'] = 'YOUR API KEY' + # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil) + #config.api_key_prefix['partner-key'] = 'Bearer' +end + +api_instance = SibApiV3Sdk::TasksApi.new + +id = 'id_example' # String | + +body = SibApiV3Sdk::Body7.new # Body7 | Updated task details. + + +begin + #Update a task + api_instance.crm_tasks_id_patch(id, body) +rescue SibApiV3Sdk::ApiError => e + puts "Exception when calling TasksApi->crm_tasks_id_patch: #{e}" +end +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **id** | **String**| | + **body** | [**Body7**](Body7.md)| Updated task details. | + +### Return type + +nil (empty response body) + +### Authorization + +[api-key](../README.md#api-key), [partner-key](../README.md#partner-key) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + + +# **crm_tasks_post** +> InlineResponse2011 crm_tasks_post(body) + +Create a task + +### Example +```ruby +# load the gem +require 'sib-api-v3-sdk' +# setup authorization +SibApiV3Sdk.configure do |config| + # Configure API key authorization: api-key + config.api_key['api-key'] = 'YOUR API KEY' + # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil) + #config.api_key_prefix['api-key'] = 'Bearer' + + # Configure API key authorization: partner-key + config.api_key['partner-key'] = 'YOUR API KEY' + # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil) + #config.api_key_prefix['partner-key'] = 'Bearer' +end + +api_instance = SibApiV3Sdk::TasksApi.new + +body = SibApiV3Sdk::Body6.new # Body6 | Task name. + + +begin + #Create a task + result = api_instance.crm_tasks_post(body) + p result +rescue SibApiV3Sdk::ApiError => e + puts "Exception when calling TasksApi->crm_tasks_post: #{e}" +end +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **body** | [**Body6**](Body6.md)| Task name. | + +### Return type + +[**InlineResponse2011**](InlineResponse2011.md) + +### Authorization + +[api-key](../README.md#api-key), [partner-key](../README.md#partner-key) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + + +# **crm_tasktypes_get** +> TaskTypes crm_tasktypes_get + +Get all task types + +### Example +```ruby +# load the gem +require 'sib-api-v3-sdk' +# setup authorization +SibApiV3Sdk.configure do |config| + # Configure API key authorization: api-key + config.api_key['api-key'] = 'YOUR API KEY' + # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil) + #config.api_key_prefix['api-key'] = 'Bearer' + + # Configure API key authorization: partner-key + config.api_key['partner-key'] = 'YOUR API KEY' + # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil) + #config.api_key_prefix['partner-key'] = 'Bearer' +end + +api_instance = SibApiV3Sdk::TasksApi.new + +begin + #Get all task types + result = api_instance.crm_tasktypes_get + p result +rescue SibApiV3Sdk::ApiError => e + puts "Exception when calling TasksApi->crm_tasktypes_get: #{e}" +end +``` + +### Parameters +This endpoint does not need any parameter. + +### Return type + +[**TaskTypes**](TaskTypes.md) + +### Authorization + +[api-key](../README.md#api-key), [partner-key](../README.md#partner-key) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + + diff --git a/docs/TransactionalEmailsApi.md b/docs/TransactionalEmailsApi.md index 7db178c..64c293a 100644 --- a/docs/TransactionalEmailsApi.md +++ b/docs/TransactionalEmailsApi.md @@ -8,10 +8,13 @@ Method | HTTP request | Description [**create_smtp_template**](TransactionalEmailsApi.md#create_smtp_template) | **POST** /smtp/templates | Create an email template [**delete_blocked_domain**](TransactionalEmailsApi.md#delete_blocked_domain) | **DELETE** /smtp/blockedDomains/{domain} | Unblock an existing domain from the list of blocked domains [**delete_hardbounces**](TransactionalEmailsApi.md#delete_hardbounces) | **POST** /smtp/deleteHardbounces | Delete hardbounces +[**delete_scheduled_email_by_id**](TransactionalEmailsApi.md#delete_scheduled_email_by_id) | **DELETE** /smtp/email/{identifier} | Delete scheduled emails by batchId or messageId [**delete_smtp_template**](TransactionalEmailsApi.md#delete_smtp_template) | **DELETE** /smtp/templates/{templateId} | Delete an inactive email template [**get_aggregated_smtp_report**](TransactionalEmailsApi.md#get_aggregated_smtp_report) | **GET** /smtp/statistics/aggregatedReport | Get your transactional email activity aggregated over a period of time [**get_blocked_domains**](TransactionalEmailsApi.md#get_blocked_domains) | **GET** /smtp/blockedDomains | Get the list of blocked domains [**get_email_event_report**](TransactionalEmailsApi.md#get_email_event_report) | **GET** /smtp/statistics/events | Get all your transactional email activity (unaggregated events) +[**get_scheduled_email_by_batch_id**](TransactionalEmailsApi.md#get_scheduled_email_by_batch_id) | **GET** /smtp/emailStatus/{batchId} | Fetch scheduled emails by batchId +[**get_scheduled_email_by_message_id**](TransactionalEmailsApi.md#get_scheduled_email_by_message_id) | **GET** /smtp/emailStatus/{messageId} | Fetch scheduled email by messageId [**get_smtp_report**](TransactionalEmailsApi.md#get_smtp_report) | **GET** /smtp/statistics/reports | Get your transactional email activity aggregated per day [**get_smtp_template**](TransactionalEmailsApi.md#get_smtp_template) | **GET** /smtp/templates/{templateId} | Returns the template information [**get_smtp_templates**](TransactionalEmailsApi.md#get_smtp_templates) | **GET** /smtp/templates | Get the list of email templates @@ -257,6 +260,64 @@ nil (empty response body) +# **delete_scheduled_email_by_id** +> delete_scheduled_email_by_id(identifier) + +Delete scheduled emails by batchId or messageId + +Delete scheduled batch of emails by batchId or single scheduled email by messageId + +### Example +```ruby +# load the gem +require 'sib-api-v3-sdk' +# setup authorization +SibApiV3Sdk.configure do |config| + # Configure API key authorization: api-key + config.api_key['api-key'] = 'YOUR API KEY' + # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil) + #config.api_key_prefix['api-key'] = 'Bearer' + + # Configure API key authorization: partner-key + config.api_key['partner-key'] = 'YOUR API KEY' + # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil) + #config.api_key_prefix['partner-key'] = 'Bearer' +end + +api_instance = SibApiV3Sdk::TransactionalEmailsApi.new + +identifier = 'identifier_example' # String | The `batchId` of scheduled emails batch (Should be a valid UUIDv4) or the `messageId` of scheduled email. + + +begin + #Delete scheduled emails by batchId or messageId + api_instance.delete_scheduled_email_by_id(identifier) +rescue SibApiV3Sdk::ApiError => e + puts "Exception when calling TransactionalEmailsApi->delete_scheduled_email_by_id: #{e}" +end +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **identifier** | **String**| The `batchId` of scheduled emails batch (Should be a valid UUIDv4) or the `messageId` of scheduled email. | + +### Return type + +nil (empty response body) + +### Authorization + +[api-key](../README.md#api-key), [partner-key](../README.md#partner-key) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + + # **delete_smtp_template** > delete_smtp_template(template_id) @@ -512,6 +573,144 @@ Name | Type | Description | Notes +# **get_scheduled_email_by_batch_id** +> GetScheduledEmailByBatchId get_scheduled_email_by_batch_id(batch_id, opts) + +Fetch scheduled emails by batchId + +Fetch scheduled batch of emails by batchId (Can retrieve data upto 30 days old) + +### Example +```ruby +# load the gem +require 'sib-api-v3-sdk' +# setup authorization +SibApiV3Sdk.configure do |config| + # Configure API key authorization: api-key + config.api_key['api-key'] = 'YOUR API KEY' + # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil) + #config.api_key_prefix['api-key'] = 'Bearer' + + # Configure API key authorization: partner-key + config.api_key['partner-key'] = 'YOUR API KEY' + # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil) + #config.api_key_prefix['partner-key'] = 'Bearer' +end + +api_instance = SibApiV3Sdk::TransactionalEmailsApi.new + +batch_id = 'batch_id_example' # String | The batchId of scheduled emails batch (Should be a valid UUIDv4) + +opts = { + start_date: Date.parse('2013-10-20'), # Date | Mandatory if `endDate` is used. Starting date (YYYY-MM-DD) from which you want to fetch the list. Can be maximum 30 days older tha current date. + end_date: Date.parse('2013-10-20'), # Date | Mandatory if `startDate` is used. Ending date (YYYY-MM-DD) till which you want to fetch the list. Maximum time period that can be selected is one month. + sort: 'desc', # String | Sort the results in the ascending/descending order of record creation. Default order is **descending** if `sort` is not passed + status: 'status_example', # String | Filter the records by `status` of the scheduled email batch or message. + limit: 100, # Integer | Number of documents returned per page + offset: 0 # Integer | Index of the first document on the page +} + +begin + #Fetch scheduled emails by batchId + result = api_instance.get_scheduled_email_by_batch_id(batch_id, opts) + p result +rescue SibApiV3Sdk::ApiError => e + puts "Exception when calling TransactionalEmailsApi->get_scheduled_email_by_batch_id: #{e}" +end +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **batch_id** | **String**| The batchId of scheduled emails batch (Should be a valid UUIDv4) | + **start_date** | **Date**| Mandatory if `endDate` is used. Starting date (YYYY-MM-DD) from which you want to fetch the list. Can be maximum 30 days older tha current date. | [optional] + **end_date** | **Date**| Mandatory if `startDate` is used. Ending date (YYYY-MM-DD) till which you want to fetch the list. Maximum time period that can be selected is one month. | [optional] + **sort** | **String**| Sort the results in the ascending/descending order of record creation. Default order is **descending** if `sort` is not passed | [optional] [default to desc] + **status** | **String**| Filter the records by `status` of the scheduled email batch or message. | [optional] + **limit** | **Integer**| Number of documents returned per page | [optional] [default to 100] + **offset** | **Integer**| Index of the first document on the page | [optional] [default to 0] + +### Return type + +[**GetScheduledEmailByBatchId**](GetScheduledEmailByBatchId.md) + +### Authorization + +[api-key](../README.md#api-key), [partner-key](../README.md#partner-key) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + + +# **get_scheduled_email_by_message_id** +> GetScheduledEmailByMessageId get_scheduled_email_by_message_id(message_id, opts) + +Fetch scheduled email by messageId + +Fetch scheduled email by messageId (Can retrieve data upto 30 days old) + +### Example +```ruby +# load the gem +require 'sib-api-v3-sdk' +# setup authorization +SibApiV3Sdk.configure do |config| + # Configure API key authorization: api-key + config.api_key['api-key'] = 'YOUR API KEY' + # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil) + #config.api_key_prefix['api-key'] = 'Bearer' + + # Configure API key authorization: partner-key + config.api_key['partner-key'] = 'YOUR API KEY' + # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil) + #config.api_key_prefix['partner-key'] = 'Bearer' +end + +api_instance = SibApiV3Sdk::TransactionalEmailsApi.new + +message_id = 'message_id_example' # String | The messageId of scheduled email + +opts = { + start_date: Date.parse('2013-10-20'), # Date | Mandatory if endDate is used. Starting date (YYYY-MM-DD) from which you want to fetch the list. Can be maximum 30 days older tha current date. + end_date: Date.parse('2013-10-20') # Date | Mandatory if startDate is used. Ending date (YYYY-MM-DD) till which you want to fetch the list. Maximum time period that can be selected is one month. +} + +begin + #Fetch scheduled email by messageId + result = api_instance.get_scheduled_email_by_message_id(message_id, opts) + p result +rescue SibApiV3Sdk::ApiError => e + puts "Exception when calling TransactionalEmailsApi->get_scheduled_email_by_message_id: #{e}" +end +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **message_id** | **String**| The messageId of scheduled email | + **start_date** | **Date**| Mandatory if endDate is used. Starting date (YYYY-MM-DD) from which you want to fetch the list. Can be maximum 30 days older tha current date. | [optional] + **end_date** | **Date**| Mandatory if startDate is used. Ending date (YYYY-MM-DD) till which you want to fetch the list. Maximum time period that can be selected is one month. | [optional] + +### Return type + +[**GetScheduledEmailByMessageId**](GetScheduledEmailByMessageId.md) + +### Authorization + +[api-key](../README.md#api-key), [partner-key](../README.md#partner-key) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + + # **get_smtp_report** > GetReports get_smtp_report(opts) diff --git a/docs/UpdateContact.md b/docs/UpdateContact.md index 971bd55..ec1c55a 100644 --- a/docs/UpdateContact.md +++ b/docs/UpdateContact.md @@ -3,7 +3,7 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**attributes** | **Object** | Pass the set of attributes to be updated. These attributes must be present in your account. To update existing email address of a contact with the new one please pass EMAIL in attribtes. For example, `{ \"EMAIL\":\"newemail@domain.com\", \"FNAME\":\"Ellie\", \"LNAME\":\"Roger\"}`. Keep in mind transactional attributes can be updated the same way as normal attributes. Mobile Number in \"SMS\" field should be passed with proper country code. For example {\"SMS\":\"+91xxxxxxxxxx\"} or {\"SMS\":\"0091xxxxxxxxxx\"} | [optional] +**attributes** | **Object** | Pass the set of attributes to be updated. These attributes must be present in your account. To update existing email address of a contact with the new one please pass EMAIL in attributes. For example, `{ \"EMAIL\":\"newemail@domain.com\", \"FNAME\":\"Ellie\", \"LNAME\":\"Roger\"}`. The attribute's parameter should be passed in capital letter while updating a contact. Keep in mind transactional attributes can be updated the same way as normal attributes. Mobile Number in \"SMS\" field should be passed with proper country code. For example {\"SMS\":\"+91xxxxxxxxxx\"} or {\"SMS\":\"0091xxxxxxxxxx\"} | [optional] **email_blacklisted** | **BOOLEAN** | Set/unset this field to blacklist/allow the contact for emails (emailBlacklisted = true) | [optional] **sms_blacklisted** | **BOOLEAN** | Set/unset this field to blacklist/allow the contact for SMS (smsBlacklisted = true) | [optional] **list_ids** | **Array<Integer>** | Ids of the lists to add the contact to | [optional] diff --git a/docs/UpdateEmailCampaign.md b/docs/UpdateEmailCampaign.md index 80e88ba..923c522 100644 --- a/docs/UpdateEmailCampaign.md +++ b/docs/UpdateEmailCampaign.md @@ -6,7 +6,7 @@ Name | Type | Description | Notes **tag** | **String** | Tag of the campaign | [optional] **sender** | [**UpdateEmailCampaignSender**](UpdateEmailCampaignSender.md) | | [optional] **name** | **String** | Name of the campaign | [optional] -**html_content** | **String** | Body of the message (HTML version). REQUIRED if htmlUrl is empty | [optional] +**html_content** | **String** | Body of the message (HTML version). If the campaign is designed using Drag & Drop editor via HTML content, then the design page will not have Drag & Drop editor access for that campaign. REQUIRED if htmlUrl is empty | [optional] **html_url** | **String** | Url which contents the body of the email message. REQUIRED if htmlContent is empty | [optional] **scheduled_at** | **String** | UTC date-time on which the campaign has to run (YYYY-MM-DDTHH:mm:ss.SSSZ). Prefer to pass your timezone in date-time format for accurate result. If sendAtBestTime is set to true, your campaign will be sent according to the date passed (ignoring the time part). | [optional] **subject** | **String** | Subject of the campaign | [optional] diff --git a/docs/UpdateSmtpTemplate.md b/docs/UpdateSmtpTemplate.md index f2d289a..323f631 100644 --- a/docs/UpdateSmtpTemplate.md +++ b/docs/UpdateSmtpTemplate.md @@ -6,7 +6,7 @@ Name | Type | Description | Notes **tag** | **String** | Tag of the template | [optional] **sender** | [**UpdateSmtpTemplateSender**](UpdateSmtpTemplateSender.md) | | [optional] **template_name** | **String** | Name of the template | [optional] -**html_content** | **String** | Required if htmlUrl is empty. Body of the message (HTML must have more than 10 characters) | [optional] +**html_content** | **String** | Required if htmlUrl is empty. If the template is designed using Drag & Drop editor via HTML content, then the design page will not have Drag & Drop editor access for that template. Body of the message (HTML must have more than 10 characters) | [optional] **html_url** | **String** | Required if htmlContent is empty. URL to the body of the email (HTML) | [optional] **subject** | **String** | Subject of the email | [optional] **reply_to** | **String** | Email on which campaign recipients will be able to reply to | [optional] diff --git a/docs/UploadImageModel.md b/docs/UploadImageModel.md new file mode 100644 index 0000000..63af05f --- /dev/null +++ b/docs/UploadImageModel.md @@ -0,0 +1,8 @@ +# SibApiV3Sdk::UploadImageModel + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**url** | **String** | URL of the image uploaded | + + diff --git a/lib/sib-api-v3-sdk.rb b/lib/sib-api-v3-sdk.rb index 862ba0b..5c13ab8 100644 --- a/lib/sib-api-v3-sdk.rb +++ b/lib/sib-api-v3-sdk.rb @@ -29,7 +29,24 @@ require 'sib-api-v3-sdk/models/block_domain' require 'sib-api-v3-sdk/models/body' require 'sib-api-v3-sdk/models/body_1' -require 'sib-api-v3-sdk/models/contact' +require 'sib-api-v3-sdk/models/body_10' +require 'sib-api-v3-sdk/models/body_11' +require 'sib-api-v3-sdk/models/body_12' +require 'sib-api-v3-sdk/models/body_2' +require 'sib-api-v3-sdk/models/body_3' +require 'sib-api-v3-sdk/models/body_4' +require 'sib-api-v3-sdk/models/body_5' +require 'sib-api-v3-sdk/models/body_6' +require 'sib-api-v3-sdk/models/body_7' +require 'sib-api-v3-sdk/models/body_8' +require 'sib-api-v3-sdk/models/body_9' +require 'sib-api-v3-sdk/models/companies_list' +require 'sib-api-v3-sdk/models/company' +require 'sib-api-v3-sdk/models/company_attributes' +require 'sib-api-v3-sdk/models/company_attributes_inner' +require 'sib-api-v3-sdk/models/conversations_message' +require 'sib-api-v3-sdk/models/conversations_message_file' +require 'sib-api-v3-sdk/models/conversations_message_file_image_info' require 'sib-api-v3-sdk/models/create_attribute' require 'sib-api-v3-sdk/models/create_attribute_enumeration' require 'sib-api-v3-sdk/models/create_child' @@ -50,14 +67,21 @@ require 'sib-api-v3-sdk/models/create_smtp_template' require 'sib-api-v3-sdk/models/create_smtp_template_sender' require 'sib-api-v3-sdk/models/create_sub_account' +require 'sib-api-v3-sdk/models/create_sub_account_response' require 'sib-api-v3-sdk/models/create_update_contact_model' require 'sib-api-v3-sdk/models/create_update_folder' require 'sib-api-v3-sdk/models/create_webhook' require 'sib-api-v3-sdk/models/created_process_id' +require 'sib-api-v3-sdk/models/deal' +require 'sib-api-v3-sdk/models/deal_attributes' +require 'sib-api-v3-sdk/models/deal_attributes_inner' +require 'sib-api-v3-sdk/models/deals_list' require 'sib-api-v3-sdk/models/delete_hardbounces' require 'sib-api-v3-sdk/models/email_export_recipients' require 'sib-api-v3-sdk/models/error_model' require 'sib-api-v3-sdk/models/file_data' +require 'sib-api-v3-sdk/models/file_downloadable_link' +require 'sib-api-v3-sdk/models/file_list' require 'sib-api-v3-sdk/models/get_account' require 'sib-api-v3-sdk/models/get_account_marketing_automation' require 'sib-api-v3-sdk/models/get_account_plan' @@ -130,6 +154,9 @@ require 'sib-api-v3-sdk/models/get_processes' require 'sib-api-v3-sdk/models/get_reports' require 'sib-api-v3-sdk/models/get_reports_reports' +require 'sib-api-v3-sdk/models/get_scheduled_email_by_batch_id' +require 'sib-api-v3-sdk/models/get_scheduled_email_by_batch_id_batches' +require 'sib-api-v3-sdk/models/get_scheduled_email_by_message_id' require 'sib-api-v3-sdk/models/get_senders_list' require 'sib-api-v3-sdk/models/get_senders_list_ips' require 'sib-api-v3-sdk/models/get_senders_list_senders' @@ -160,6 +187,9 @@ require 'sib-api-v3-sdk/models/get_transac_sms_report_reports' require 'sib-api-v3-sdk/models/get_webhook' require 'sib-api-v3-sdk/models/get_webhooks' +require 'sib-api-v3-sdk/models/inline_response_200' +require 'sib-api-v3-sdk/models/inline_response_201' +require 'sib-api-v3-sdk/models/inline_response_201_1' require 'sib-api-v3-sdk/models/manage_ip' require 'sib-api-v3-sdk/models/master_details_response' require 'sib-api-v3-sdk/models/master_details_response_billing_info' @@ -169,6 +199,10 @@ require 'sib-api-v3-sdk/models/master_details_response_plan_info_features' require 'sib-api-v3-sdk/models/note' require 'sib-api-v3-sdk/models/note_data' +require 'sib-api-v3-sdk/models/note_id' +require 'sib-api-v3-sdk/models/note_list' +require 'sib-api-v3-sdk/models/pipeline' +require 'sib-api-v3-sdk/models/pipeline_stage' require 'sib-api-v3-sdk/models/post_contact_info' require 'sib-api-v3-sdk/models/post_contact_info_contacts' require 'sib-api-v3-sdk/models/post_send_failed' @@ -183,6 +217,7 @@ require 'sib-api-v3-sdk/models/request_contact_import' require 'sib-api-v3-sdk/models/request_contact_import_new_list' require 'sib-api-v3-sdk/models/request_sms_recipient_export' +require 'sib-api-v3-sdk/models/schedule_smtp_email' require 'sib-api-v3-sdk/models/send_report' require 'sib-api-v3-sdk/models/send_report_email' require 'sib-api-v3-sdk/models/send_sms' @@ -214,6 +249,7 @@ require 'sib-api-v3-sdk/models/sub_accounts_response' require 'sib-api-v3-sdk/models/sub_accounts_response_sub_accounts' require 'sib-api-v3-sdk/models/task' +require 'sib-api-v3-sdk/models/task_list' require 'sib-api-v3-sdk/models/task_reminder' require 'sib-api-v3-sdk/models/task_types' require 'sib-api-v3-sdk/models/update_attribute' @@ -235,22 +271,28 @@ require 'sib-api-v3-sdk/models/update_smtp_template' require 'sib-api-v3-sdk/models/update_smtp_template_sender' require 'sib-api-v3-sdk/models/update_webhook' +require 'sib-api-v3-sdk/models/upload_image_model' require 'sib-api-v3-sdk/models/upload_image_to_gallery' # APIs require 'sib-api-v3-sdk/api/account_api' require 'sib-api-v3-sdk/api/attributes_api' -require 'sib-api-v3-sdk/api/crm_api' +require 'sib-api-v3-sdk/api/companies_api' require 'sib-api-v3-sdk/api/contacts_api' +require 'sib-api-v3-sdk/api/conversations_api' +require 'sib-api-v3-sdk/api/deals_api' require 'sib-api-v3-sdk/api/email_campaigns_api' +require 'sib-api-v3-sdk/api/files_api' require 'sib-api-v3-sdk/api/folders_api' require 'sib-api-v3-sdk/api/inbound_parsing_api' require 'sib-api-v3-sdk/api/lists_api' require 'sib-api-v3-sdk/api/master_account_api' +require 'sib-api-v3-sdk/api/notes_api' require 'sib-api-v3-sdk/api/process_api' require 'sib-api-v3-sdk/api/reseller_api' require 'sib-api-v3-sdk/api/sms_campaigns_api' require 'sib-api-v3-sdk/api/senders_api' +require 'sib-api-v3-sdk/api/tasks_api' require 'sib-api-v3-sdk/api/transactional_emails_api' require 'sib-api-v3-sdk/api/transactional_sms_api' require 'sib-api-v3-sdk/api/webhooks_api' diff --git a/lib/sib-api-v3-sdk/api/companies_api.rb b/lib/sib-api-v3-sdk/api/companies_api.rb new file mode 100644 index 0000000..17b3f2e --- /dev/null +++ b/lib/sib-api-v3-sdk/api/companies_api.rb @@ -0,0 +1,409 @@ +=begin +#SendinBlue API + +#SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | + +OpenAPI spec version: 3.0.0 +Contact: contact@sendinblue.com +Generated by: https://github.com/swagger-api/swagger-codegen.git +Swagger Codegen version: 2.4.19 + +=end + +require 'uri' + +module SibApiV3Sdk + class CompaniesApi + attr_accessor :api_client + + def initialize(api_client = ApiClient.default) + @api_client = api_client + end + # Get company attributes + # @param [Hash] opts the optional parameters + # @return [CompanyAttributes] + def companies_attributes_get(opts = {}) + data, _status_code, _headers = companies_attributes_get_with_http_info(opts) + data + end + + # Get company attributes + # @param [Hash] opts the optional parameters + # @return [Array<(CompanyAttributes, Fixnum, Hash)>] CompanyAttributes data, response status code and response headers + def companies_attributes_get_with_http_info(opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: CompaniesApi.companies_attributes_get ...' + end + # resource path + local_var_path = '/companies/attributes' + + # query parameters + query_params = {} + + # header parameters + header_params = {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) + # HTTP header 'Content-Type' + header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) + + # form parameters + form_params = {} + + # http body (model) + post_body = nil + auth_names = ['api-key', 'partner-key'] + data, status_code, headers = @api_client.call_api(:GET, local_var_path, + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => 'CompanyAttributes') + if @api_client.config.debugging + @api_client.config.logger.debug "API called: CompaniesApi#companies_attributes_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + # Get all companies + # @param [Hash] opts the optional parameters + # @option opts [String] :filters Filter by attrbutes. If you have filter for owner on your side please send it as {\"attributes.owner\":\"5b1a17d914b73d35a76ca0c7\"} + # @option opts [Integer] :linked_contacts_ids Filter by linked contacts ids + # @option opts [String] :linked_deals_ids Filter by linked deals ids + # @option opts [Integer] :page Index of the first document of the page + # @option opts [Integer] :limit Number of documents per page (default to 50) + # @option opts [String] :sort Sort the results in the ascending/descending order. Default order is **descending** by creation if `sort` is not passed + # @option opts [String] :sort_by The field used to sort field names. + # @return [CompaniesList] + def companies_get(opts = {}) + data, _status_code, _headers = companies_get_with_http_info(opts) + data + end + + # Get all companies + # @param [Hash] opts the optional parameters + # @option opts [String] :filters Filter by attrbutes. If you have filter for owner on your side please send it as {\"attributes.owner\":\"5b1a17d914b73d35a76ca0c7\"} + # @option opts [Integer] :linked_contacts_ids Filter by linked contacts ids + # @option opts [String] :linked_deals_ids Filter by linked deals ids + # @option opts [Integer] :page Index of the first document of the page + # @option opts [Integer] :limit Number of documents per page + # @option opts [String] :sort Sort the results in the ascending/descending order. Default order is **descending** by creation if `sort` is not passed + # @option opts [String] :sort_by The field used to sort field names. + # @return [Array<(CompaniesList, Fixnum, Hash)>] CompaniesList data, response status code and response headers + def companies_get_with_http_info(opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: CompaniesApi.companies_get ...' + end + if @api_client.config.client_side_validation && opts[:'sort'] && !['asc', 'desc'].include?(opts[:'sort']) + fail ArgumentError, 'invalid value for "sort", must be one of asc, desc' + end + # resource path + local_var_path = '/companies' + + # query parameters + query_params = {} + query_params[:'filters'] = opts[:'filters'] if !opts[:'filters'].nil? + query_params[:'linkedContactsIds'] = opts[:'linked_contacts_ids'] if !opts[:'linked_contacts_ids'].nil? + query_params[:'linkedDealsIds'] = opts[:'linked_deals_ids'] if !opts[:'linked_deals_ids'].nil? + query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil? + query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil? + query_params[:'sort'] = opts[:'sort'] if !opts[:'sort'].nil? + query_params[:'sortBy'] = opts[:'sort_by'] if !opts[:'sort_by'].nil? + + # header parameters + header_params = {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) + # HTTP header 'Content-Type' + header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) + + # form parameters + form_params = {} + + # http body (model) + post_body = nil + auth_names = ['api-key', 'partner-key'] + data, status_code, headers = @api_client.call_api(:GET, local_var_path, + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => 'CompaniesList') + if @api_client.config.debugging + @api_client.config.logger.debug "API called: CompaniesApi#companies_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + # Delete a company + # @param id + # @param [Hash] opts the optional parameters + # @return [nil] + def companies_id_delete(id, opts = {}) + companies_id_delete_with_http_info(id, opts) + nil + end + + # Delete a company + # @param id + # @param [Hash] opts the optional parameters + # @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers + def companies_id_delete_with_http_info(id, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: CompaniesApi.companies_id_delete ...' + 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 CompaniesApi.companies_id_delete" + end + # resource path + local_var_path = '/companies/{id}'.sub('{' + 'id' + '}', id.to_s) + + # query parameters + query_params = {} + + # header parameters + header_params = {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) + # HTTP header 'Content-Type' + header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) + + # form parameters + form_params = {} + + # http body (model) + post_body = nil + auth_names = ['api-key', 'partner-key'] + data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: CompaniesApi#companies_id_delete\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + # Get a company + # @param id + # @param [Hash] opts the optional parameters + # @return [Company] + def companies_id_get(id, opts = {}) + data, _status_code, _headers = companies_id_get_with_http_info(id, opts) + data + end + + # Get a company + # @param id + # @param [Hash] opts the optional parameters + # @return [Array<(Company, Fixnum, Hash)>] Company data, response status code and response headers + def companies_id_get_with_http_info(id, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: CompaniesApi.companies_id_get ...' + 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 CompaniesApi.companies_id_get" + end + # resource path + local_var_path = '/companies/{id}'.sub('{' + 'id' + '}', id.to_s) + + # query parameters + query_params = {} + + # header parameters + header_params = {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) + # HTTP header 'Content-Type' + header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) + + # form parameters + form_params = {} + + # http body (model) + post_body = nil + auth_names = ['api-key', 'partner-key'] + data, status_code, headers = @api_client.call_api(:GET, local_var_path, + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => 'Company') + if @api_client.config.debugging + @api_client.config.logger.debug "API called: CompaniesApi#companies_id_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + # Update a company + # @param id + # @param body Updated company details. + # @param [Hash] opts the optional parameters + # @return [Company] + def companies_id_patch(id, body, opts = {}) + data, _status_code, _headers = companies_id_patch_with_http_info(id, body, opts) + data + end + + # Update a company + # @param id + # @param body Updated company details. + # @param [Hash] opts the optional parameters + # @return [Array<(Company, Fixnum, Hash)>] Company data, response status code and response headers + def companies_id_patch_with_http_info(id, body, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: CompaniesApi.companies_id_patch ...' + 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 CompaniesApi.companies_id_patch" + end + # verify the required parameter 'body' is set + if @api_client.config.client_side_validation && body.nil? + fail ArgumentError, "Missing the required parameter 'body' when calling CompaniesApi.companies_id_patch" + end + # resource path + local_var_path = '/companies/{id}'.sub('{' + 'id' + '}', id.to_s) + + # query parameters + query_params = {} + + # header parameters + header_params = {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) + # HTTP header 'Content-Type' + header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) + + # form parameters + form_params = {} + + # http body (model) + post_body = @api_client.object_to_http_body(body) + auth_names = ['api-key', 'partner-key'] + data, status_code, headers = @api_client.call_api(:PATCH, local_var_path, + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => 'Company') + if @api_client.config.debugging + @api_client.config.logger.debug "API called: CompaniesApi#companies_id_patch\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + # Link and Unlink company with contacts and deals + # @param id + # @param body Linked / Unlinked contacts and deals ids. + # @param [Hash] opts the optional parameters + # @return [nil] + def companies_link_unlink_id_patch(id, body, opts = {}) + companies_link_unlink_id_patch_with_http_info(id, body, opts) + nil + end + + # Link and Unlink company with contacts and deals + # @param id + # @param body Linked / Unlinked contacts and deals ids. + # @param [Hash] opts the optional parameters + # @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers + def companies_link_unlink_id_patch_with_http_info(id, body, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: CompaniesApi.companies_link_unlink_id_patch ...' + 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 CompaniesApi.companies_link_unlink_id_patch" + end + # verify the required parameter 'body' is set + if @api_client.config.client_side_validation && body.nil? + fail ArgumentError, "Missing the required parameter 'body' when calling CompaniesApi.companies_link_unlink_id_patch" + end + # resource path + local_var_path = '/companies/link-unlink/{id}'.sub('{' + 'id' + '}', id.to_s) + + # query parameters + query_params = {} + + # header parameters + header_params = {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) + # HTTP header 'Content-Type' + header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) + + # form parameters + form_params = {} + + # http body (model) + post_body = @api_client.object_to_http_body(body) + auth_names = ['api-key', 'partner-key'] + data, status_code, headers = @api_client.call_api(:PATCH, local_var_path, + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: CompaniesApi#companies_link_unlink_id_patch\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + # Create a company + # @param body Company create data. + # @param [Hash] opts the optional parameters + # @return [InlineResponse200] + def companies_post(body, opts = {}) + data, _status_code, _headers = companies_post_with_http_info(body, opts) + data + end + + # Create a company + # @param body Company create data. + # @param [Hash] opts the optional parameters + # @return [Array<(InlineResponse200, Fixnum, Hash)>] InlineResponse200 data, response status code and response headers + def companies_post_with_http_info(body, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: CompaniesApi.companies_post ...' + end + # verify the required parameter 'body' is set + if @api_client.config.client_side_validation && body.nil? + fail ArgumentError, "Missing the required parameter 'body' when calling CompaniesApi.companies_post" + end + # resource path + local_var_path = '/companies' + + # query parameters + query_params = {} + + # header parameters + header_params = {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) + # HTTP header 'Content-Type' + header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) + + # form parameters + form_params = {} + + # http body (model) + post_body = @api_client.object_to_http_body(body) + auth_names = ['api-key', 'partner-key'] + data, status_code, headers = @api_client.call_api(:POST, local_var_path, + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => 'InlineResponse200') + if @api_client.config.debugging + @api_client.config.logger.debug "API called: CompaniesApi#companies_post\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + end +end diff --git a/lib/sib-api-v3-sdk/api/contacts_api.rb b/lib/sib-api-v3-sdk/api/contacts_api.rb index dade455..a332781 100644 --- a/lib/sib-api-v3-sdk/api/contacts_api.rb +++ b/lib/sib-api-v3-sdk/api/contacts_api.rb @@ -625,6 +625,8 @@ def get_attributes_with_http_info(opts = {}) # Along with the contact details, this endpoint will show the statistics of contact for the recent 90 days by default. To fetch the earlier statistics, please use Get contact campaign stats (https://developers.sendinblue.com/reference/contacts-7#getcontactstats) endpoint with the appropriate date ranges. # @param identifier Email (urlencoded) OR ID of the contact OR its SMS attribute value # @param [Hash] opts the optional parameters + # @option opts [Object] :start_date **Mandatory if endDate is used.** Starting date (YYYY-MM-DD) of the statistic events specific to campaigns. Must be lower than equal to endDate + # @option opts [Object] :end_date **Mandatory if startDate is used.** Ending date (YYYY-MM-DD) of the statistic events specific to campaigns. Must be greater than equal to startDate. # @return [GetExtendedContactDetails] def get_contact_info(identifier, opts = {}) data, _status_code, _headers = get_contact_info_with_http_info(identifier, opts) @@ -635,6 +637,8 @@ def get_contact_info(identifier, opts = {}) # Along with the contact details, this endpoint will show the statistics of contact for the recent 90 days by default. To fetch the earlier statistics, please use Get contact campaign stats (https://developers.sendinblue.com/reference/contacts-7#getcontactstats) endpoint with the appropriate date ranges. # @param identifier Email (urlencoded) OR ID of the contact OR its SMS attribute value # @param [Hash] opts the optional parameters + # @option opts [Object] :start_date **Mandatory if endDate is used.** Starting date (YYYY-MM-DD) of the statistic events specific to campaigns. Must be lower than equal to endDate + # @option opts [Object] :end_date **Mandatory if startDate is used.** Ending date (YYYY-MM-DD) of the statistic events specific to campaigns. Must be greater than equal to startDate. # @return [Array<(GetExtendedContactDetails, Fixnum, Hash)>] GetExtendedContactDetails data, response status code and response headers def get_contact_info_with_http_info(identifier, opts = {}) if @api_client.config.debugging @@ -649,6 +653,8 @@ def get_contact_info_with_http_info(identifier, opts = {}) # query parameters query_params = {} + query_params[:'startDate'] = opts[:'start_date'] if !opts[:'start_date'].nil? + query_params[:'endDate'] = opts[:'end_date'] if !opts[:'end_date'].nil? # header parameters header_params = {} diff --git a/lib/sib-api-v3-sdk/api/conversations_api.rb b/lib/sib-api-v3-sdk/api/conversations_api.rb new file mode 100644 index 0000000..6f65b17 --- /dev/null +++ b/lib/sib-api-v3-sdk/api/conversations_api.rb @@ -0,0 +1,504 @@ +=begin +#SendinBlue API + +#SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | + +OpenAPI spec version: 3.0.0 +Contact: contact@sendinblue.com +Generated by: https://github.com/swagger-api/swagger-codegen.git +Swagger Codegen version: 2.4.19 + +=end + +require 'uri' + +module SibApiV3Sdk + class ConversationsApi + attr_accessor :api_client + + def initialize(api_client = ApiClient.default) + @api_client = api_client + end + # Sets agent’s status to online for 2-3 minutes + # We recommend pinging this endpoint every minute for as long as the agent has to be considered online. + # @param body Agent fields. + # @param [Hash] opts the optional parameters + # @return [nil] + def conversations_agent_online_ping_post(body, opts = {}) + conversations_agent_online_ping_post_with_http_info(body, opts) + nil + end + + # Sets agent’s status to online for 2-3 minutes + # We recommend pinging this endpoint every minute for as long as the agent has to be considered online. + # @param body Agent fields. + # @param [Hash] opts the optional parameters + # @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers + def conversations_agent_online_ping_post_with_http_info(body, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: ConversationsApi.conversations_agent_online_ping_post ...' + end + # verify the required parameter 'body' is set + if @api_client.config.client_side_validation && body.nil? + fail ArgumentError, "Missing the required parameter 'body' when calling ConversationsApi.conversations_agent_online_ping_post" + end + # resource path + local_var_path = '/conversations/agentOnlinePing' + + # query parameters + query_params = {} + + # header parameters + header_params = {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) + # HTTP header 'Content-Type' + header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) + + # form parameters + form_params = {} + + # http body (model) + post_body = @api_client.object_to_http_body(body) + auth_names = ['api-key', 'partner-key'] + data, status_code, headers = @api_client.call_api(:POST, local_var_path, + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: ConversationsApi#conversations_agent_online_ping_post\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + # Delete a message sent by an agent + # Only agents’ messages can be deleted. + # @param id ID of the message + # @param [Hash] opts the optional parameters + # @return [nil] + def conversations_messages_id_delete(id, opts = {}) + conversations_messages_id_delete_with_http_info(id, opts) + nil + end + + # Delete a message sent by an agent + # Only agents’ messages can be deleted. + # @param id ID of the message + # @param [Hash] opts the optional parameters + # @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers + def conversations_messages_id_delete_with_http_info(id, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: ConversationsApi.conversations_messages_id_delete ...' + 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 ConversationsApi.conversations_messages_id_delete" + end + # resource path + local_var_path = '/conversations/messages/{id}'.sub('{' + 'id' + '}', id.to_s) + + # query parameters + query_params = {} + + # header parameters + header_params = {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) + # HTTP header 'Content-Type' + header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) + + # form parameters + form_params = {} + + # http body (model) + post_body = nil + auth_names = ['api-key', 'partner-key'] + data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: ConversationsApi#conversations_messages_id_delete\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + # Get a message + # @param id ID of the message + # @param [Hash] opts the optional parameters + # @return [ConversationsMessage] + def conversations_messages_id_get(id, opts = {}) + data, _status_code, _headers = conversations_messages_id_get_with_http_info(id, opts) + data + end + + # Get a message + # @param id ID of the message + # @param [Hash] opts the optional parameters + # @return [Array<(ConversationsMessage, Fixnum, Hash)>] ConversationsMessage data, response status code and response headers + def conversations_messages_id_get_with_http_info(id, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: ConversationsApi.conversations_messages_id_get ...' + 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 ConversationsApi.conversations_messages_id_get" + end + # resource path + local_var_path = '/conversations/messages/{id}'.sub('{' + 'id' + '}', id.to_s) + + # query parameters + query_params = {} + + # header parameters + header_params = {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) + # HTTP header 'Content-Type' + header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) + + # form parameters + form_params = {} + + # http body (model) + post_body = nil + auth_names = ['api-key', 'partner-key'] + data, status_code, headers = @api_client.call_api(:GET, local_var_path, + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => 'ConversationsMessage') + if @api_client.config.debugging + @api_client.config.logger.debug "API called: ConversationsApi#conversations_messages_id_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + # Update a message sent by an agent + # Only agents’ messages can be edited. + # @param id ID of the message + # @param [Hash] opts the optional parameters + # @option opts [Body9] :body + # @return [ConversationsMessage] + def conversations_messages_id_put(id, opts = {}) + data, _status_code, _headers = conversations_messages_id_put_with_http_info(id, opts) + data + end + + # Update a message sent by an agent + # Only agents’ messages can be edited. + # @param id ID of the message + # @param [Hash] opts the optional parameters + # @option opts [Body9] :body + # @return [Array<(ConversationsMessage, Fixnum, Hash)>] ConversationsMessage data, response status code and response headers + def conversations_messages_id_put_with_http_info(id, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: ConversationsApi.conversations_messages_id_put ...' + 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 ConversationsApi.conversations_messages_id_put" + end + # resource path + local_var_path = '/conversations/messages/{id}'.sub('{' + 'id' + '}', id.to_s) + + # query parameters + query_params = {} + + # header parameters + header_params = {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) + # HTTP header 'Content-Type' + header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) + + # form parameters + form_params = {} + + # http body (model) + post_body = @api_client.object_to_http_body(opts[:'body']) + auth_names = ['api-key', 'partner-key'] + data, status_code, headers = @api_client.call_api(:PUT, local_var_path, + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => 'ConversationsMessage') + if @api_client.config.debugging + @api_client.config.logger.debug "API called: ConversationsApi#conversations_messages_id_put\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + # Send a message as an agent + # @param body Message fields. + # @param [Hash] opts the optional parameters + # @return [ConversationsMessage] + def conversations_messages_post(body, opts = {}) + data, _status_code, _headers = conversations_messages_post_with_http_info(body, opts) + data + end + + # Send a message as an agent + # @param body Message fields. + # @param [Hash] opts the optional parameters + # @return [Array<(ConversationsMessage, Fixnum, Hash)>] ConversationsMessage data, response status code and response headers + def conversations_messages_post_with_http_info(body, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: ConversationsApi.conversations_messages_post ...' + end + # verify the required parameter 'body' is set + if @api_client.config.client_side_validation && body.nil? + fail ArgumentError, "Missing the required parameter 'body' when calling ConversationsApi.conversations_messages_post" + end + # resource path + local_var_path = '/conversations/messages' + + # query parameters + query_params = {} + + # header parameters + header_params = {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) + # HTTP header 'Content-Type' + header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) + + # form parameters + form_params = {} + + # http body (model) + post_body = @api_client.object_to_http_body(body) + auth_names = ['api-key', 'partner-key'] + data, status_code, headers = @api_client.call_api(:POST, local_var_path, + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => 'ConversationsMessage') + if @api_client.config.debugging + @api_client.config.logger.debug "API called: ConversationsApi#conversations_messages_post\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + # Delete an automated message + # @param id ID of the message + # @param [Hash] opts the optional parameters + # @return [nil] + def conversations_pushed_messages_id_delete(id, opts = {}) + conversations_pushed_messages_id_delete_with_http_info(id, opts) + nil + end + + # Delete an automated message + # @param id ID of the message + # @param [Hash] opts the optional parameters + # @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers + def conversations_pushed_messages_id_delete_with_http_info(id, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: ConversationsApi.conversations_pushed_messages_id_delete ...' + 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 ConversationsApi.conversations_pushed_messages_id_delete" + end + # resource path + local_var_path = '/conversations/pushedMessages/{id}'.sub('{' + 'id' + '}', id.to_s) + + # query parameters + query_params = {} + + # header parameters + header_params = {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) + # HTTP header 'Content-Type' + header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) + + # form parameters + form_params = {} + + # http body (model) + post_body = nil + auth_names = ['api-key', 'partner-key'] + data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: ConversationsApi#conversations_pushed_messages_id_delete\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + # Get an automated message + # @param id ID of the message sent previously + # @param [Hash] opts the optional parameters + # @return [ConversationsMessage] + def conversations_pushed_messages_id_get(id, opts = {}) + data, _status_code, _headers = conversations_pushed_messages_id_get_with_http_info(id, opts) + data + end + + # Get an automated message + # @param id ID of the message sent previously + # @param [Hash] opts the optional parameters + # @return [Array<(ConversationsMessage, Fixnum, Hash)>] ConversationsMessage data, response status code and response headers + def conversations_pushed_messages_id_get_with_http_info(id, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: ConversationsApi.conversations_pushed_messages_id_get ...' + 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 ConversationsApi.conversations_pushed_messages_id_get" + end + # resource path + local_var_path = '/conversations/pushedMessages/{id}'.sub('{' + 'id' + '}', id.to_s) + + # query parameters + query_params = {} + + # header parameters + header_params = {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) + # HTTP header 'Content-Type' + header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) + + # form parameters + form_params = {} + + # http body (model) + post_body = nil + auth_names = ['api-key', 'partner-key'] + data, status_code, headers = @api_client.call_api(:GET, local_var_path, + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => 'ConversationsMessage') + if @api_client.config.debugging + @api_client.config.logger.debug "API called: ConversationsApi#conversations_pushed_messages_id_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + # Update an automated message + # @param id ID of the message + # @param body + # @param [Hash] opts the optional parameters + # @return [ConversationsMessage] + def conversations_pushed_messages_id_put(id, body, opts = {}) + data, _status_code, _headers = conversations_pushed_messages_id_put_with_http_info(id, body, opts) + data + end + + # Update an automated message + # @param id ID of the message + # @param body + # @param [Hash] opts the optional parameters + # @return [Array<(ConversationsMessage, Fixnum, Hash)>] ConversationsMessage data, response status code and response headers + def conversations_pushed_messages_id_put_with_http_info(id, body, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: ConversationsApi.conversations_pushed_messages_id_put ...' + 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 ConversationsApi.conversations_pushed_messages_id_put" + end + # verify the required parameter 'body' is set + if @api_client.config.client_side_validation && body.nil? + fail ArgumentError, "Missing the required parameter 'body' when calling ConversationsApi.conversations_pushed_messages_id_put" + end + # resource path + local_var_path = '/conversations/pushedMessages/{id}'.sub('{' + 'id' + '}', id.to_s) + + # query parameters + query_params = {} + + # header parameters + header_params = {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) + # HTTP header 'Content-Type' + header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) + + # form parameters + form_params = {} + + # http body (model) + post_body = @api_client.object_to_http_body(body) + auth_names = ['api-key', 'partner-key'] + data, status_code, headers = @api_client.call_api(:PUT, local_var_path, + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => 'ConversationsMessage') + if @api_client.config.debugging + @api_client.config.logger.debug "API called: ConversationsApi#conversations_pushed_messages_id_put\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + # Send an automated message to a visitor + # Example of automated messages: order status, announce new features in your web app, etc. + # @param body + # @param [Hash] opts the optional parameters + # @return [ConversationsMessage] + def conversations_pushed_messages_post(body, opts = {}) + data, _status_code, _headers = conversations_pushed_messages_post_with_http_info(body, opts) + data + end + + # Send an automated message to a visitor + # Example of automated messages: order status, announce new features in your web app, etc. + # @param body + # @param [Hash] opts the optional parameters + # @return [Array<(ConversationsMessage, Fixnum, Hash)>] ConversationsMessage data, response status code and response headers + def conversations_pushed_messages_post_with_http_info(body, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: ConversationsApi.conversations_pushed_messages_post ...' + end + # verify the required parameter 'body' is set + if @api_client.config.client_side_validation && body.nil? + fail ArgumentError, "Missing the required parameter 'body' when calling ConversationsApi.conversations_pushed_messages_post" + end + # resource path + local_var_path = '/conversations/pushedMessages' + + # query parameters + query_params = {} + + # header parameters + header_params = {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) + # HTTP header 'Content-Type' + header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) + + # form parameters + form_params = {} + + # http body (model) + post_body = @api_client.object_to_http_body(body) + auth_names = ['api-key', 'partner-key'] + data, status_code, headers = @api_client.call_api(:POST, local_var_path, + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => 'ConversationsMessage') + if @api_client.config.debugging + @api_client.config.logger.debug "API called: ConversationsApi#conversations_pushed_messages_post\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + end +end diff --git a/lib/sib-api-v3-sdk/api/crm_api.rb b/lib/sib-api-v3-sdk/api/crm_api.rb deleted file mode 100644 index b729ee1..0000000 --- a/lib/sib-api-v3-sdk/api/crm_api.rb +++ /dev/null @@ -1,716 +0,0 @@ -=begin -#SendinBlue API - -#SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | - -OpenAPI spec version: 3.0.0 -Contact: contact@sendinblue.com -Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: 2.4.19 - -=end - -require 'uri' - -module SibApiV3Sdk - class CRMApi - attr_accessor :api_client - - def initialize(api_client = ApiClient.default) - @api_client = api_client - end - - # Set custom user_agent if explicitly passed in api - # default will still remain Swagger-Codegen/#{VERSION}/ruby - def setUserAgent(user_agent) - @user_agent = user_agent - if user_agent.is_a?(String) && user_agent.downcase.start_with?('sendinblue_') - @api_client.default_headers['User-Agent'] = @user_agent - end - end - - - # Get file details. - # @param id File id to get file data. - # @param [Hash] opts the optional parameters - # @return [FileData] - def crm_files_id_data_get(id, opts = {}) - data, _status_code, _headers = crm_files_id_data_get_with_http_info(id, opts) - data - end - - # Get file details - # @param id File id to get file data. - # @param [Hash] opts the optional parameters - # @return [Array<(FileData, Fixnum, Hash)>] FileData data, response status code and response headers - def crm_files_id_data_get_with_http_info(id, opts = {}) - if @api_client.config.debugging - @api_client.config.logger.debug 'Calling API: CRMApi.crm_files_id_data_get ...' - 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 CRMApi.crm_files_id_data_get" - end - # resource path - local_var_path = '/crm/files/{id}/data'.sub('{' + 'id' + '}', id.to_s) - - # query parameters - query_params = {} - - # header parameters - header_params = {} - # HTTP header 'Accept' (if needed) - header_params['Accept'] = @api_client.select_header_accept(['application/json']) - # HTTP header 'Content-Type' - header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) - - # form parameters - form_params = {} - - # http body (model) - post_body = nil - auth_names = ['api-key', 'partner-key'] - data, status_code, headers = @api_client.call_api(:GET, local_var_path, - :header_params => header_params, - :query_params => query_params, - :form_params => form_params, - :body => post_body, - :auth_names => auth_names, - :return_type => 'FileData') - if @api_client.config.debugging - @api_client.config.logger.debug "API called: CRMApi#crm_files_id_data_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" - end - return data, status_code, headers - end - # Delete a file - # @param id File id to delete. - # @param [Hash] opts the optional parameters - # @return [nil] - def crm_files_id_delete(id, opts = {}) - crm_files_id_delete_with_http_info(id, opts) - nil - end - - # Delete a file - # @param id File id to delete. - # @param [Hash] opts the optional parameters - # @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers - def crm_files_id_delete_with_http_info(id, opts = {}) - if @api_client.config.debugging - @api_client.config.logger.debug 'Calling API: CRMApi.crm_files_id_delete ...' - 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 CRMApi.crm_files_id_delete" - end - # resource path - local_var_path = '/crm/files/{id}'.sub('{' + 'id' + '}', id.to_s) - - # query parameters - query_params = {} - - # header parameters - header_params = {} - # HTTP header 'Accept' (if needed) - header_params['Accept'] = @api_client.select_header_accept(['application/json']) - # HTTP header 'Content-Type' - header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) - - # form parameters - form_params = {} - - # http body (model) - post_body = nil - auth_names = ['api-key', 'partner-key'] - data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, - :header_params => header_params, - :query_params => query_params, - :form_params => form_params, - :body => post_body, - :auth_names => auth_names) - if @api_client.config.debugging - @api_client.config.logger.debug "API called: CRMApi#crm_files_id_delete\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" - end - return data, status_code, headers - end - # Download a file - # @param id File id to download. - # @param [Hash] opts the optional parameters - # @return [nil] - def crm_files_id_get(id, opts = {}) - crm_files_id_get_with_http_info(id, opts) - nil - end - - # Download a file - # @param id File id to download. - # @param [Hash] opts the optional parameters - # @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers - def crm_files_id_get_with_http_info(id, opts = {}) - if @api_client.config.debugging - @api_client.config.logger.debug 'Calling API: CRMApi.crm_files_id_get ...' - 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 CRMApi.crm_files_id_get" - end - # resource path - local_var_path = '/crm/files/{id}'.sub('{' + 'id' + '}', id.to_s) - - # query parameters - query_params = {} - - # header parameters - header_params = {} - # HTTP header 'Accept' (if needed) - header_params['Accept'] = @api_client.select_header_accept(['application/json']) - # HTTP header 'Content-Type' - header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) - - # form parameters - form_params = {} - - # http body (model) - post_body = nil - auth_names = ['api-key', 'partner-key'] - data, status_code, headers = @api_client.call_api(:GET, local_var_path, - :header_params => header_params, - :query_params => query_params, - :form_params => form_params, - :body => post_body, - :auth_names => auth_names) - if @api_client.config.debugging - @api_client.config.logger.debug "API called: CRMApi#crm_files_id_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" - end - return data, status_code, headers - end - # Upload a file - # @param file File data to create a file. - # @param [Hash] opts the optional parameters - # @option opts [Array] :deals_ids Deal ids linked to a file - # @return [FileData] - def crm_files_post(file, opts = {}) - data, _status_code, _headers = crm_files_post_with_http_info(file, opts) - data - end - - # Upload a file - # @param file File data to create a file. - # @param [Hash] opts the optional parameters - # @option opts [Array] :deals_ids Deal ids linked to a file - # @return [Array<(FileData, Fixnum, Hash)>] FileData data, response status code and response headers - def crm_files_post_with_http_info(file, opts = {}) - if @api_client.config.debugging - @api_client.config.logger.debug 'Calling API: CRMApi.crm_files_post ...' - end - # verify the required parameter 'file' is set - if @api_client.config.client_side_validation && file.nil? - fail ArgumentError, "Missing the required parameter 'file' when calling CRMApi.crm_files_post" - end - # resource path - local_var_path = '/crm/files' - - # query parameters - query_params = {} - - # header parameters - header_params = {} - # HTTP header 'Accept' (if needed) - header_params['Accept'] = @api_client.select_header_accept(['application/json']) - # HTTP header 'Content-Type' - header_params['Content-Type'] = @api_client.select_header_content_type(['multipart/form-data']) - - # form parameters - form_params = {} - form_params['file'] = file - form_params['dealsIds'] = @api_client.build_collection_param(opts[:'deals_ids'], :csv) if !opts[:'deals_ids'].nil? - - # http body (model) - post_body = nil - auth_names = ['api-key', 'partner-key'] - data, status_code, headers = @api_client.call_api(:POST, local_var_path, - :header_params => header_params, - :query_params => query_params, - :form_params => form_params, - :body => post_body, - :auth_names => auth_names, - :return_type => 'FileData') - if @api_client.config.debugging - @api_client.config.logger.debug "API called: CRMApi#crm_files_post\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" - end - return data, status_code, headers - end - # Delete a note - # @param id Note ID to delete - # @param [Hash] opts the optional parameters - # @return [nil] - def crm_notes_id_delete(id, opts = {}) - crm_notes_id_delete_with_http_info(id, opts) - nil - end - - # Delete a note - # @param id Note ID to delete - # @param [Hash] opts the optional parameters - # @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers - def crm_notes_id_delete_with_http_info(id, opts = {}) - if @api_client.config.debugging - @api_client.config.logger.debug 'Calling API: CRMApi.crm_notes_id_delete ...' - 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 CRMApi.crm_notes_id_delete" - end - # resource path - local_var_path = '/crm/notes/{id}'.sub('{' + 'id' + '}', id.to_s) - - # query parameters - query_params = {} - - # header parameters - header_params = {} - # HTTP header 'Accept' (if needed) - header_params['Accept'] = @api_client.select_header_accept(['application/json']) - # HTTP header 'Content-Type' - header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) - - # form parameters - form_params = {} - - # http body (model) - post_body = nil - auth_names = ['api-key', 'partner-key'] - data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, - :header_params => header_params, - :query_params => query_params, - :form_params => form_params, - :body => post_body, - :auth_names => auth_names) - if @api_client.config.debugging - @api_client.config.logger.debug "API called: CRMApi#crm_notes_id_delete\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" - end - return data, status_code, headers - end - # Get a note - # @param id Note ID to get - # @param [Hash] opts the optional parameters - # @return [Note] - def crm_notes_id_get(id, opts = {}) - data, _status_code, _headers = crm_notes_id_get_with_http_info(id, opts) - data - end - - # Get a note - # @param id Note ID to get - # @param [Hash] opts the optional parameters - # @return [Array<(Note, Fixnum, Hash)>] Note data, response status code and response headers - def crm_notes_id_get_with_http_info(id, opts = {}) - if @api_client.config.debugging - @api_client.config.logger.debug 'Calling API: CRMApi.crm_notes_id_get ...' - 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 CRMApi.crm_notes_id_get" - end - # resource path - local_var_path = '/crm/notes/{id}'.sub('{' + 'id' + '}', id.to_s) - - # query parameters - query_params = {} - - # header parameters - header_params = {} - # HTTP header 'Accept' (if needed) - header_params['Accept'] = @api_client.select_header_accept(['application/json']) - # HTTP header 'Content-Type' - header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) - - # form parameters - form_params = {} - - # http body (model) - post_body = nil - auth_names = ['api-key', 'partner-key'] - data, status_code, headers = @api_client.call_api(:GET, local_var_path, - :header_params => header_params, - :query_params => query_params, - :form_params => form_params, - :body => post_body, - :auth_names => auth_names, - :return_type => 'Note') - if @api_client.config.debugging - @api_client.config.logger.debug "API called: CRMApi#crm_notes_id_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" - end - return data, status_code, headers - end - # Update a note - # @param id Note ID to update - # @param body Note data to update a note - # @param [Hash] opts the optional parameters - # @return [Note] - def crm_notes_id_patch(id, body, opts = {}) - data, _status_code, _headers = crm_notes_id_patch_with_http_info(id, body, opts) - data - end - - # Update a note - # @param id Note ID to update - # @param body Note data to update a note - # @param [Hash] opts the optional parameters - # @return [Array<(Note, Fixnum, Hash)>] Note data, response status code and response headers - def crm_notes_id_patch_with_http_info(id, body, opts = {}) - if @api_client.config.debugging - @api_client.config.logger.debug 'Calling API: CRMApi.crm_notes_id_patch ...' - 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 CRMApi.crm_notes_id_patch" - end - # verify the required parameter 'body' is set - if @api_client.config.client_side_validation && body.nil? - fail ArgumentError, "Missing the required parameter 'body' when calling CRMApi.crm_notes_id_patch" - end - # resource path - local_var_path = '/crm/notes/{id}'.sub('{' + 'id' + '}', id.to_s) - - # query parameters - query_params = {} - - # header parameters - header_params = {} - # HTTP header 'Accept' (if needed) - header_params['Accept'] = @api_client.select_header_accept(['application/json']) - # HTTP header 'Content-Type' - header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) - - # form parameters - form_params = {} - - # http body (model) - post_body = @api_client.object_to_http_body(body) - auth_names = ['api-key', 'partner-key'] - data, status_code, headers = @api_client.call_api(:PATCH, local_var_path, - :header_params => header_params, - :query_params => query_params, - :form_params => form_params, - :body => post_body, - :auth_names => auth_names, - :return_type => 'Note') - if @api_client.config.debugging - @api_client.config.logger.debug "API called: CRMApi#crm_notes_id_patch\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" - end - return data, status_code, headers - end - # Create a note - # @param body Note data to create a note. - # @param [Hash] opts the optional parameters - # @return [Note] - def crm_notes_post(body, opts = {}) - data, _status_code, _headers = crm_notes_post_with_http_info(body, opts) - data - end - - # Create a note - # @param body Note data to create a note. - # @param [Hash] opts the optional parameters - # @return [Array<(Note, Fixnum, Hash)>] Note data, response status code and response headers - def crm_notes_post_with_http_info(body, opts = {}) - if @api_client.config.debugging - @api_client.config.logger.debug 'Calling API: CRMApi.crm_notes_post ...' - end - # verify the required parameter 'body' is set - if @api_client.config.client_side_validation && body.nil? - fail ArgumentError, "Missing the required parameter 'body' when calling CRMApi.crm_notes_post" - end - # resource path - local_var_path = '/crm/notes' - - # query parameters - query_params = {} - - # header parameters - header_params = {} - # HTTP header 'Accept' (if needed) - header_params['Accept'] = @api_client.select_header_accept(['application/json']) - # HTTP header 'Content-Type' - header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) - - # form parameters - form_params = {} - - # http body (model) - post_body = @api_client.object_to_http_body(body) - auth_names = ['api-key', 'partner-key'] - data, status_code, headers = @api_client.call_api(:POST, local_var_path, - :header_params => header_params, - :query_params => query_params, - :form_params => form_params, - :body => post_body, - :auth_names => auth_names, - :return_type => 'Note') - if @api_client.config.debugging - @api_client.config.logger.debug "API called: CRMApi#crm_notes_post\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" - end - return data, status_code, headers - end - # Delete a task - # @param id - # @param [Hash] opts the optional parameters - # @return [nil] - def crm_tasks_id_delete(id, opts = {}) - crm_tasks_id_delete_with_http_info(id, opts) - nil - end - - # Delete a task - # @param id - # @param [Hash] opts the optional parameters - # @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers - def crm_tasks_id_delete_with_http_info(id, opts = {}) - if @api_client.config.debugging - @api_client.config.logger.debug 'Calling API: CRMApi.crm_tasks_id_delete ...' - 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 CRMApi.crm_tasks_id_delete" - end - # resource path - local_var_path = '/crm/tasks/{id}'.sub('{' + 'id' + '}', id.to_s) - - # query parameters - query_params = {} - - # header parameters - header_params = {} - # HTTP header 'Accept' (if needed) - header_params['Accept'] = @api_client.select_header_accept(['application/json']) - # HTTP header 'Content-Type' - header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) - - # form parameters - form_params = {} - - # http body (model) - post_body = nil - auth_names = ['api-key', 'partner-key'] - data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, - :header_params => header_params, - :query_params => query_params, - :form_params => form_params, - :body => post_body, - :auth_names => auth_names) - if @api_client.config.debugging - @api_client.config.logger.debug "API called: CRMApi#crm_tasks_id_delete\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" - end - return data, status_code, headers - end - # Get a task - # @param id - # @param [Hash] opts the optional parameters - # @return [Task] - def crm_tasks_id_get(id, opts = {}) - data, _status_code, _headers = crm_tasks_id_get_with_http_info(id, opts) - data - end - - # Get a task - # @param id - # @param [Hash] opts the optional parameters - # @return [Array<(Task, Fixnum, Hash)>] Task data, response status code and response headers - def crm_tasks_id_get_with_http_info(id, opts = {}) - if @api_client.config.debugging - @api_client.config.logger.debug 'Calling API: CRMApi.crm_tasks_id_get ...' - 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 CRMApi.crm_tasks_id_get" - end - # resource path - local_var_path = '/crm/tasks/{id}'.sub('{' + 'id' + '}', id.to_s) - - # query parameters - query_params = {} - - # header parameters - header_params = {} - # HTTP header 'Accept' (if needed) - header_params['Accept'] = @api_client.select_header_accept(['application/json']) - # HTTP header 'Content-Type' - header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) - - # form parameters - form_params = {} - - # http body (model) - post_body = nil - auth_names = ['api-key', 'partner-key'] - data, status_code, headers = @api_client.call_api(:GET, local_var_path, - :header_params => header_params, - :query_params => query_params, - :form_params => form_params, - :body => post_body, - :auth_names => auth_names, - :return_type => 'Task') - if @api_client.config.debugging - @api_client.config.logger.debug "API called: CRMApi#crm_tasks_id_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" - end - return data, status_code, headers - end - # Update a task - # @param id - # @param body Updated task details. - # @param [Hash] opts the optional parameters - # @return [Task] - def crm_tasks_id_patch(id, body, opts = {}) - data, _status_code, _headers = crm_tasks_id_patch_with_http_info(id, body, opts) - data - end - - # Update a task - # @param id - # @param body Updated task details. - # @param [Hash] opts the optional parameters - # @return [Array<(Task, Fixnum, Hash)>] Task data, response status code and response headers - def crm_tasks_id_patch_with_http_info(id, body, opts = {}) - if @api_client.config.debugging - @api_client.config.logger.debug 'Calling API: CRMApi.crm_tasks_id_patch ...' - 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 CRMApi.crm_tasks_id_patch" - end - # verify the required parameter 'body' is set - if @api_client.config.client_side_validation && body.nil? - fail ArgumentError, "Missing the required parameter 'body' when calling CRMApi.crm_tasks_id_patch" - end - # resource path - local_var_path = '/crm/tasks/{id}'.sub('{' + 'id' + '}', id.to_s) - - # query parameters - query_params = {} - - # header parameters - header_params = {} - # HTTP header 'Accept' (if needed) - header_params['Accept'] = @api_client.select_header_accept(['application/json']) - # HTTP header 'Content-Type' - header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) - - # form parameters - form_params = {} - - # http body (model) - post_body = @api_client.object_to_http_body(body) - auth_names = ['api-key', 'partner-key'] - data, status_code, headers = @api_client.call_api(:PATCH, local_var_path, - :header_params => header_params, - :query_params => query_params, - :form_params => form_params, - :body => post_body, - :auth_names => auth_names, - :return_type => 'Task') - if @api_client.config.debugging - @api_client.config.logger.debug "API called: CRMApi#crm_tasks_id_patch\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" - end - return data, status_code, headers - end - # Create a task - # @param body Task name. - # @param [Hash] opts the optional parameters - # @return [Task] - def crm_tasks_post(body, opts = {}) - data, _status_code, _headers = crm_tasks_post_with_http_info(body, opts) - data - end - - # Create a task - # @param body Task name. - # @param [Hash] opts the optional parameters - # @return [Array<(Task, Fixnum, Hash)>] Task data, response status code and response headers - def crm_tasks_post_with_http_info(body, opts = {}) - if @api_client.config.debugging - @api_client.config.logger.debug 'Calling API: CRMApi.crm_tasks_post ...' - end - # verify the required parameter 'body' is set - if @api_client.config.client_side_validation && body.nil? - fail ArgumentError, "Missing the required parameter 'body' when calling CRMApi.crm_tasks_post" - end - # resource path - local_var_path = '/crm/tasks' - - # query parameters - query_params = {} - - # header parameters - header_params = {} - # HTTP header 'Accept' (if needed) - header_params['Accept'] = @api_client.select_header_accept(['application/json']) - # HTTP header 'Content-Type' - header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) - - # form parameters - form_params = {} - - # http body (model) - post_body = @api_client.object_to_http_body(body) - auth_names = ['api-key', 'partner-key'] - data, status_code, headers = @api_client.call_api(:POST, local_var_path, - :header_params => header_params, - :query_params => query_params, - :form_params => form_params, - :body => post_body, - :auth_names => auth_names, - :return_type => 'Task') - if @api_client.config.debugging - @api_client.config.logger.debug "API called: CRMApi#crm_tasks_post\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" - end - return data, status_code, headers - end - # Get all task types - # @param [Hash] opts the optional parameters - # @return [TaskTypes] - def crm_tasktypes_get(opts = {}) - data, _status_code, _headers = crm_tasktypes_get_with_http_info(opts) - data - end - - # Get all task types - # @param [Hash] opts the optional parameters - # @return [Array<(TaskTypes, Fixnum, Hash)>] TaskTypes data, response status code and response headers - def crm_tasktypes_get_with_http_info(opts = {}) - if @api_client.config.debugging - @api_client.config.logger.debug 'Calling API: CRMApi.crm_tasktypes_get ...' - end - # resource path - local_var_path = '/crm/tasktypes' - - # query parameters - query_params = {} - - # header parameters - header_params = {} - # HTTP header 'Accept' (if needed) - header_params['Accept'] = @api_client.select_header_accept(['application/json']) - # HTTP header 'Content-Type' - header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) - - # form parameters - form_params = {} - - # http body (model) - post_body = nil - auth_names = ['api-key', 'partner-key'] - data, status_code, headers = @api_client.call_api(:GET, local_var_path, - :header_params => header_params, - :query_params => query_params, - :form_params => form_params, - :body => post_body, - :auth_names => auth_names, - :return_type => 'TaskTypes') - if @api_client.config.debugging - @api_client.config.logger.debug "API called: CRMApi#crm_tasktypes_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" - end - return data, status_code, headers - end - end -end diff --git a/lib/sib-api-v3-sdk/api/deals_api.rb b/lib/sib-api-v3-sdk/api/deals_api.rb new file mode 100644 index 0000000..6a1b313 --- /dev/null +++ b/lib/sib-api-v3-sdk/api/deals_api.rb @@ -0,0 +1,454 @@ +=begin +#SendinBlue API + +#SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | + +OpenAPI spec version: 3.0.0 +Contact: contact@sendinblue.com +Generated by: https://github.com/swagger-api/swagger-codegen.git +Swagger Codegen version: 2.4.19 + +=end + +require 'uri' + +module SibApiV3Sdk + class DealsApi + attr_accessor :api_client + + def initialize(api_client = ApiClient.default) + @api_client = api_client + end + # Get deal attributes + # @param [Hash] opts the optional parameters + # @return [DealAttributes] + def crm_attributes_deals_get(opts = {}) + data, _status_code, _headers = crm_attributes_deals_get_with_http_info(opts) + data + end + + # Get deal attributes + # @param [Hash] opts the optional parameters + # @return [Array<(DealAttributes, Fixnum, Hash)>] DealAttributes data, response status code and response headers + def crm_attributes_deals_get_with_http_info(opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: DealsApi.crm_attributes_deals_get ...' + end + # resource path + local_var_path = '/crm/attributes/deals' + + # query parameters + query_params = {} + + # header parameters + header_params = {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) + # HTTP header 'Content-Type' + header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) + + # form parameters + form_params = {} + + # http body (model) + post_body = nil + auth_names = ['api-key', 'partner-key'] + data, status_code, headers = @api_client.call_api(:GET, local_var_path, + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => 'DealAttributes') + if @api_client.config.debugging + @api_client.config.logger.debug "API called: DealsApi#crm_attributes_deals_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + # Get all deals + # @param [Hash] opts the optional parameters + # @option opts [String] :filter_attributes Filter by attrbutes. If you have filter for owner on your side please send it as `attributes.owner`.\" + # @option opts [String] :filter_linked_companies_ids Filter by linked companies ids + # @option opts [String] :filter_linked_contacts_ids Filter by linked companies ids + # @option opts [Integer] :offset Index of the first document of the page + # @option opts [Integer] :limit Number of documents per page (default to 50) + # @option opts [String] :sort Sort the results in the ascending/descending order. Default order is **descending** by creation if `sort` is not passed + # @option opts [String] :sort_by The field used to sort field names. + # @return [DealsList] + def crm_deals_get(opts = {}) + data, _status_code, _headers = crm_deals_get_with_http_info(opts) + data + end + + # Get all deals + # @param [Hash] opts the optional parameters + # @option opts [String] :filter_attributes Filter by attrbutes. If you have filter for owner on your side please send it as `attributes.owner`.\" + # @option opts [String] :filter_linked_companies_ids Filter by linked companies ids + # @option opts [String] :filter_linked_contacts_ids Filter by linked companies ids + # @option opts [Integer] :offset Index of the first document of the page + # @option opts [Integer] :limit Number of documents per page + # @option opts [String] :sort Sort the results in the ascending/descending order. Default order is **descending** by creation if `sort` is not passed + # @option opts [String] :sort_by The field used to sort field names. + # @return [Array<(DealsList, Fixnum, Hash)>] DealsList data, response status code and response headers + def crm_deals_get_with_http_info(opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: DealsApi.crm_deals_get ...' + end + if @api_client.config.client_side_validation && opts[:'sort'] && !['asc', 'desc'].include?(opts[:'sort']) + fail ArgumentError, 'invalid value for "sort", must be one of asc, desc' + end + # resource path + local_var_path = '/crm/deals' + + # query parameters + query_params = {} + query_params[:'filter[attributes]'] = opts[:'filter_attributes'] if !opts[:'filter_attributes'].nil? + query_params[:'filter[linkedCompaniesIds]'] = opts[:'filter_linked_companies_ids'] if !opts[:'filter_linked_companies_ids'].nil? + query_params[:'filter[linkedContactsIds]'] = opts[:'filter_linked_contacts_ids'] if !opts[:'filter_linked_contacts_ids'].nil? + query_params[:'offset'] = opts[:'offset'] if !opts[:'offset'].nil? + query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil? + query_params[:'sort'] = opts[:'sort'] if !opts[:'sort'].nil? + query_params[:'sortBy'] = opts[:'sort_by'] if !opts[:'sort_by'].nil? + + # header parameters + header_params = {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) + # HTTP header 'Content-Type' + header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) + + # form parameters + form_params = {} + + # http body (model) + post_body = nil + auth_names = ['api-key', 'partner-key'] + data, status_code, headers = @api_client.call_api(:GET, local_var_path, + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => 'DealsList') + if @api_client.config.debugging + @api_client.config.logger.debug "API called: DealsApi#crm_deals_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + # Delete a deal + # @param id + # @param [Hash] opts the optional parameters + # @return [nil] + def crm_deals_id_delete(id, opts = {}) + crm_deals_id_delete_with_http_info(id, opts) + nil + end + + # Delete a deal + # @param id + # @param [Hash] opts the optional parameters + # @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers + def crm_deals_id_delete_with_http_info(id, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: DealsApi.crm_deals_id_delete ...' + 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 DealsApi.crm_deals_id_delete" + end + # resource path + local_var_path = '/crm/deals/{id}'.sub('{' + 'id' + '}', id.to_s) + + # query parameters + query_params = {} + + # header parameters + header_params = {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) + # HTTP header 'Content-Type' + header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) + + # form parameters + form_params = {} + + # http body (model) + post_body = nil + auth_names = ['api-key', 'partner-key'] + data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: DealsApi#crm_deals_id_delete\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + # Get a deal + # @param id + # @param [Hash] opts the optional parameters + # @return [Deal] + def crm_deals_id_get(id, opts = {}) + data, _status_code, _headers = crm_deals_id_get_with_http_info(id, opts) + data + end + + # Get a deal + # @param id + # @param [Hash] opts the optional parameters + # @return [Array<(Deal, Fixnum, Hash)>] Deal data, response status code and response headers + def crm_deals_id_get_with_http_info(id, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: DealsApi.crm_deals_id_get ...' + 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 DealsApi.crm_deals_id_get" + end + # resource path + local_var_path = '/crm/deals/{id}'.sub('{' + 'id' + '}', id.to_s) + + # query parameters + query_params = {} + + # header parameters + header_params = {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) + # HTTP header 'Content-Type' + header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) + + # form parameters + form_params = {} + + # http body (model) + post_body = nil + auth_names = ['api-key', 'partner-key'] + data, status_code, headers = @api_client.call_api(:GET, local_var_path, + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => 'Deal') + if @api_client.config.debugging + @api_client.config.logger.debug "API called: DealsApi#crm_deals_id_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + # Update a deal + # @param id + # @param body Updated deal details. + # @param [Hash] opts the optional parameters + # @return [nil] + def crm_deals_id_patch(id, body, opts = {}) + crm_deals_id_patch_with_http_info(id, body, opts) + nil + end + + # Update a deal + # @param id + # @param body Updated deal details. + # @param [Hash] opts the optional parameters + # @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers + def crm_deals_id_patch_with_http_info(id, body, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: DealsApi.crm_deals_id_patch ...' + 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 DealsApi.crm_deals_id_patch" + end + # verify the required parameter 'body' is set + if @api_client.config.client_side_validation && body.nil? + fail ArgumentError, "Missing the required parameter 'body' when calling DealsApi.crm_deals_id_patch" + end + # resource path + local_var_path = '/crm/deals/{id}'.sub('{' + 'id' + '}', id.to_s) + + # query parameters + query_params = {} + + # header parameters + header_params = {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) + # HTTP header 'Content-Type' + header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) + + # form parameters + form_params = {} + + # http body (model) + post_body = @api_client.object_to_http_body(body) + auth_names = ['api-key', 'partner-key'] + data, status_code, headers = @api_client.call_api(:PATCH, local_var_path, + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: DealsApi#crm_deals_id_patch\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + # Link and Unlink a deal with contacts and companies + # @param id + # @param body Linked / Unlinked contacts and companies ids. + # @param [Hash] opts the optional parameters + # @return [nil] + def crm_deals_link_unlink_id_patch(id, body, opts = {}) + crm_deals_link_unlink_id_patch_with_http_info(id, body, opts) + nil + end + + # Link and Unlink a deal with contacts and companies + # @param id + # @param body Linked / Unlinked contacts and companies ids. + # @param [Hash] opts the optional parameters + # @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers + def crm_deals_link_unlink_id_patch_with_http_info(id, body, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: DealsApi.crm_deals_link_unlink_id_patch ...' + 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 DealsApi.crm_deals_link_unlink_id_patch" + end + # verify the required parameter 'body' is set + if @api_client.config.client_side_validation && body.nil? + fail ArgumentError, "Missing the required parameter 'body' when calling DealsApi.crm_deals_link_unlink_id_patch" + end + # resource path + local_var_path = '/crm/deals/link-unlink/{id}'.sub('{' + 'id' + '}', id.to_s) + + # query parameters + query_params = {} + + # header parameters + header_params = {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) + # HTTP header 'Content-Type' + header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) + + # form parameters + form_params = {} + + # http body (model) + post_body = @api_client.object_to_http_body(body) + auth_names = ['api-key', 'partner-key'] + data, status_code, headers = @api_client.call_api(:PATCH, local_var_path, + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: DealsApi#crm_deals_link_unlink_id_patch\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + # Create a deal + # @param body Deal create data. + # @param [Hash] opts the optional parameters + # @return [InlineResponse201] + def crm_deals_post(body, opts = {}) + data, _status_code, _headers = crm_deals_post_with_http_info(body, opts) + data + end + + # Create a deal + # @param body Deal create data. + # @param [Hash] opts the optional parameters + # @return [Array<(InlineResponse201, Fixnum, Hash)>] InlineResponse201 data, response status code and response headers + def crm_deals_post_with_http_info(body, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: DealsApi.crm_deals_post ...' + end + # verify the required parameter 'body' is set + if @api_client.config.client_side_validation && body.nil? + fail ArgumentError, "Missing the required parameter 'body' when calling DealsApi.crm_deals_post" + end + # resource path + local_var_path = '/crm/deals' + + # query parameters + query_params = {} + + # header parameters + header_params = {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) + # HTTP header 'Content-Type' + header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) + + # form parameters + form_params = {} + + # http body (model) + post_body = @api_client.object_to_http_body(body) + auth_names = ['api-key', 'partner-key'] + data, status_code, headers = @api_client.call_api(:POST, local_var_path, + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => 'InlineResponse201') + if @api_client.config.debugging + @api_client.config.logger.debug "API called: DealsApi#crm_deals_post\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + # Get pipeline stages + # @param [Hash] opts the optional parameters + # @return [Pipeline] + def crm_pipeline_details_get(opts = {}) + data, _status_code, _headers = crm_pipeline_details_get_with_http_info(opts) + data + end + + # Get pipeline stages + # @param [Hash] opts the optional parameters + # @return [Array<(Pipeline, Fixnum, Hash)>] Pipeline data, response status code and response headers + def crm_pipeline_details_get_with_http_info(opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: DealsApi.crm_pipeline_details_get ...' + end + # resource path + local_var_path = '/crm/pipeline/details' + + # query parameters + query_params = {} + + # header parameters + header_params = {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) + # HTTP header 'Content-Type' + header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) + + # form parameters + form_params = {} + + # http body (model) + post_body = nil + auth_names = ['api-key', 'partner-key'] + data, status_code, headers = @api_client.call_api(:GET, local_var_path, + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => 'Pipeline') + if @api_client.config.debugging + @api_client.config.logger.debug "API called: DealsApi#crm_pipeline_details_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + end +end diff --git a/lib/sib-api-v3-sdk/api/email_campaigns_api.rb b/lib/sib-api-v3-sdk/api/email_campaigns_api.rb index 3a3ad95..170070f 100644 --- a/lib/sib-api-v3-sdk/api/email_campaigns_api.rb +++ b/lib/sib-api-v3-sdk/api/email_campaigns_api.rb @@ -298,7 +298,7 @@ def get_email_campaign_with_http_info(campaign_id, opts = {}) # @option opts [String] :status Filter on the status of the campaign # @option opts [String] :start_date Mandatory if endDate is used. Starting (urlencoded) UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ) to filter the sent email campaigns. Prefer to pass your timezone in date-time format for accurate result ( only available if either 'status' not passed and if passed is set to 'sent' ) # @option opts [String] :end_date Mandatory if startDate is used. Ending (urlencoded) UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ) to filter the sent email campaigns. Prefer to pass your timezone in date-time format for accurate result ( only available if either 'status' not passed and if passed is set to 'sent' ) - # @option opts [Integer] :limit Number of documents per page (default to 500) + # @option opts [Integer] :limit Number of documents per page (default to 50) # @option opts [Integer] :offset Index of the first document in the page (default to 0) # @option opts [String] :sort Sort the results in the ascending/descending order of record creation. Default order is **descending** if `sort` is not passed (default to desc) # @return [GetEmailCampaigns] @@ -327,8 +327,8 @@ def get_email_campaigns_with_http_info(opts = {}) if @api_client.config.client_side_validation && opts[:'status'] && !['suspended', 'archive', 'sent', 'queued', 'draft', 'inProcess'].include?(opts[:'status']) fail ArgumentError, 'invalid value for "status", must be one of suspended, archive, sent, queued, draft, inProcess' end - if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] > 1000 - fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling EmailCampaignsApi.get_email_campaigns, must be smaller than or equal to 1000.' + if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] > 100 + fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling EmailCampaignsApi.get_email_campaigns, must be smaller than or equal to 100.' end if @api_client.config.client_side_validation && opts[:'sort'] && !['asc', 'desc'].include?(opts[:'sort']) @@ -710,16 +710,16 @@ def update_email_campaign_with_http_info(campaign_id, email_campaign, opts = {}) # Upload an image to your account's image gallery # @param upload_image Parameters to upload an image # @param [Hash] opts the optional parameters - # @return [nil] + # @return [UploadImageModel] def upload_image_to_gallery(upload_image, opts = {}) - upload_image_to_gallery_with_http_info(upload_image, opts) - nil + data, _status_code, _headers = upload_image_to_gallery_with_http_info(upload_image, opts) + data end # Upload an image to your account's image gallery # @param upload_image Parameters to upload an image # @param [Hash] opts the optional parameters - # @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers + # @return [Array<(UploadImageModel, Fixnum, Hash)>] UploadImageModel data, response status code and response headers def upload_image_to_gallery_with_http_info(upload_image, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: EmailCampaignsApi.upload_image_to_gallery ...' @@ -752,7 +752,8 @@ def upload_image_to_gallery_with_http_info(upload_image, opts = {}) :query_params => query_params, :form_params => form_params, :body => post_body, - :auth_names => auth_names) + :auth_names => auth_names, + :return_type => 'UploadImageModel') if @api_client.config.debugging @api_client.config.logger.debug "API called: EmailCampaignsApi#upload_image_to_gallery\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end diff --git a/lib/sib-api-v3-sdk/api/files_api.rb b/lib/sib-api-v3-sdk/api/files_api.rb new file mode 100644 index 0000000..596ccdb --- /dev/null +++ b/lib/sib-api-v3-sdk/api/files_api.rb @@ -0,0 +1,313 @@ +=begin +#SendinBlue API + +#SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | + +OpenAPI spec version: 3.0.0 +Contact: contact@sendinblue.com +Generated by: https://github.com/swagger-api/swagger-codegen.git +Swagger Codegen version: 2.4.19 + +=end + +require 'uri' + +module SibApiV3Sdk + class FilesApi + attr_accessor :api_client + + def initialize(api_client = ApiClient.default) + @api_client = api_client + end + # Get all files + # @param [Hash] opts the optional parameters + # @option opts [String] :entity Filter by file entity type + # @option opts [String] :entity_ids Filter by file entity IDs + # @option opts [Integer] :date_from dateFrom to date range filter type (timestamp in milliseconds) + # @option opts [Integer] :date_to dateTo to date range filter type (timestamp in milliseconds) + # @option opts [Integer] :offset Index of the first document of the page + # @option opts [Integer] :limit Number of documents per page (default to 50) + # @option opts [String] :sort Sort the results in the ascending/descending order. Default order is **descending** by creation if `sort` is not passed + # @return [FileList] + def crm_files_get(opts = {}) + data, _status_code, _headers = crm_files_get_with_http_info(opts) + data + end + + # Get all files + # @param [Hash] opts the optional parameters + # @option opts [String] :entity Filter by file entity type + # @option opts [String] :entity_ids Filter by file entity IDs + # @option opts [Integer] :date_from dateFrom to date range filter type (timestamp in milliseconds) + # @option opts [Integer] :date_to dateTo to date range filter type (timestamp in milliseconds) + # @option opts [Integer] :offset Index of the first document of the page + # @option opts [Integer] :limit Number of documents per page + # @option opts [String] :sort Sort the results in the ascending/descending order. Default order is **descending** by creation if `sort` is not passed + # @return [Array<(FileList, Fixnum, Hash)>] FileList data, response status code and response headers + def crm_files_get_with_http_info(opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: FilesApi.crm_files_get ...' + end + if @api_client.config.client_side_validation && opts[:'entity'] && !['companies', 'deals', 'contacts'].include?(opts[:'entity']) + fail ArgumentError, 'invalid value for "entity", must be one of companies, deals, contacts' + end + if @api_client.config.client_side_validation && opts[:'sort'] && !['asc', 'desc'].include?(opts[:'sort']) + fail ArgumentError, 'invalid value for "sort", must be one of asc, desc' + end + # resource path + local_var_path = '/crm/files' + + # query parameters + query_params = {} + query_params[:'entity'] = opts[:'entity'] if !opts[:'entity'].nil? + query_params[:'entityIds'] = opts[:'entity_ids'] if !opts[:'entity_ids'].nil? + query_params[:'dateFrom'] = opts[:'date_from'] if !opts[:'date_from'].nil? + query_params[:'dateTo'] = opts[:'date_to'] if !opts[:'date_to'].nil? + query_params[:'offset'] = opts[:'offset'] if !opts[:'offset'].nil? + query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil? + query_params[:'sort'] = opts[:'sort'] if !opts[:'sort'].nil? + + # header parameters + header_params = {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) + # HTTP header 'Content-Type' + header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) + + # form parameters + form_params = {} + + # http body (model) + post_body = nil + auth_names = ['api-key', 'partner-key'] + data, status_code, headers = @api_client.call_api(:GET, local_var_path, + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => 'FileList') + if @api_client.config.debugging + @api_client.config.logger.debug "API called: FilesApi#crm_files_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + # Get file details + # @param id File id to get file data. + # @param [Hash] opts the optional parameters + # @return [FileData] + def crm_files_id_data_get(id, opts = {}) + data, _status_code, _headers = crm_files_id_data_get_with_http_info(id, opts) + data + end + + # Get file details + # @param id File id to get file data. + # @param [Hash] opts the optional parameters + # @return [Array<(FileData, Fixnum, Hash)>] FileData data, response status code and response headers + def crm_files_id_data_get_with_http_info(id, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: FilesApi.crm_files_id_data_get ...' + 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 FilesApi.crm_files_id_data_get" + end + # resource path + local_var_path = '/crm/files/{id}/data'.sub('{' + 'id' + '}', id.to_s) + + # query parameters + query_params = {} + + # header parameters + header_params = {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) + # HTTP header 'Content-Type' + header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) + + # form parameters + form_params = {} + + # http body (model) + post_body = nil + auth_names = ['api-key', 'partner-key'] + data, status_code, headers = @api_client.call_api(:GET, local_var_path, + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => 'FileData') + if @api_client.config.debugging + @api_client.config.logger.debug "API called: FilesApi#crm_files_id_data_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + # Delete a file + # @param id File id to delete. + # @param [Hash] opts the optional parameters + # @return [nil] + def crm_files_id_delete(id, opts = {}) + crm_files_id_delete_with_http_info(id, opts) + nil + end + + # Delete a file + # @param id File id to delete. + # @param [Hash] opts the optional parameters + # @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers + def crm_files_id_delete_with_http_info(id, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: FilesApi.crm_files_id_delete ...' + 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 FilesApi.crm_files_id_delete" + end + # resource path + local_var_path = '/crm/files/{id}'.sub('{' + 'id' + '}', id.to_s) + + # query parameters + query_params = {} + + # header parameters + header_params = {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) + # HTTP header 'Content-Type' + header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) + + # form parameters + form_params = {} + + # http body (model) + post_body = nil + auth_names = ['api-key', 'partner-key'] + data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: FilesApi#crm_files_id_delete\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + # Download a file + # @param id File id to download. + # @param [Hash] opts the optional parameters + # @return [FileDownloadableLink] + def crm_files_id_get(id, opts = {}) + data, _status_code, _headers = crm_files_id_get_with_http_info(id, opts) + data + end + + # Download a file + # @param id File id to download. + # @param [Hash] opts the optional parameters + # @return [Array<(FileDownloadableLink, Fixnum, Hash)>] FileDownloadableLink data, response status code and response headers + def crm_files_id_get_with_http_info(id, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: FilesApi.crm_files_id_get ...' + 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 FilesApi.crm_files_id_get" + end + # resource path + local_var_path = '/crm/files/{id}'.sub('{' + 'id' + '}', id.to_s) + + # query parameters + query_params = {} + + # header parameters + header_params = {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) + # HTTP header 'Content-Type' + header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) + + # form parameters + form_params = {} + + # http body (model) + post_body = nil + auth_names = ['api-key', 'partner-key'] + data, status_code, headers = @api_client.call_api(:GET, local_var_path, + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => 'FileDownloadableLink') + if @api_client.config.debugging + @api_client.config.logger.debug "API called: FilesApi#crm_files_id_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + # Upload a file + # @param file File data to create a file. + # @param [Hash] opts the optional parameters + # @option opts [String] :deal_id Deal id linked to a file + # @option opts [Integer] :contact_id Contact id linked to a file + # @option opts [String] :company_id Company id linked to a file + # @return [FileData] + def crm_files_post(file, opts = {}) + data, _status_code, _headers = crm_files_post_with_http_info(file, opts) + data + end + + # Upload a file + # @param file File data to create a file. + # @param [Hash] opts the optional parameters + # @option opts [String] :deal_id Deal id linked to a file + # @option opts [Integer] :contact_id Contact id linked to a file + # @option opts [String] :company_id Company id linked to a file + # @return [Array<(FileData, Fixnum, Hash)>] FileData data, response status code and response headers + def crm_files_post_with_http_info(file, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: FilesApi.crm_files_post ...' + end + # verify the required parameter 'file' is set + if @api_client.config.client_side_validation && file.nil? + fail ArgumentError, "Missing the required parameter 'file' when calling FilesApi.crm_files_post" + end + # resource path + local_var_path = '/crm/files' + + # query parameters + query_params = {} + + # header parameters + header_params = {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) + # HTTP header 'Content-Type' + header_params['Content-Type'] = @api_client.select_header_content_type(['multipart/form-data']) + + # form parameters + form_params = {} + form_params['file'] = file + form_params['dealId'] = opts[:'deal_id'] if !opts[:'deal_id'].nil? + form_params['contactId'] = opts[:'contact_id'] if !opts[:'contact_id'].nil? + form_params['companyId'] = opts[:'company_id'] if !opts[:'company_id'].nil? + + # http body (model) + post_body = nil + auth_names = ['api-key', 'partner-key'] + data, status_code, headers = @api_client.call_api(:POST, local_var_path, + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => 'FileData') + if @api_client.config.debugging + @api_client.config.logger.debug "API called: FilesApi#crm_files_post\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + end +end diff --git a/lib/sib-api-v3-sdk/api/inbound_parsing_api.rb b/lib/sib-api-v3-sdk/api/inbound_parsing_api.rb index 86f4798..b58af75 100644 --- a/lib/sib-api-v3-sdk/api/inbound_parsing_api.rb +++ b/lib/sib-api-v3-sdk/api/inbound_parsing_api.rb @@ -19,6 +19,25 @@ class InboundParsingApi def initialize(api_client = ApiClient.default) @api_client = api_client end + # Retrieve inbound attachment with download token. + # This endpoint will retrieve inbound attachment with download token. + # @param download_token Token to fetch a particular attachment + # @param [Hash] opts the optional parameters + # @return [File] + def get_inbound_email_attachment(download_token, opts = {}) + data, _status_code, _headers = get_inbound_email_attachment_with_http_info(download_token, opts) + data + end + + # Retrieve inbound attachment with download token. + # This endpoint will retrieve inbound attachment with download token. + # @param download_token Token to fetch a particular attachment + # @param [Hash] opts the optional parameters + # @return [Array<(File, Fixnum, Hash)>] File data, response status code and response headers + def get_inbound_email_attachment_with_http_info(download_token, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: InboundParsingApi.get_inbound_email_attachment ...' + end # Set custom user_agent if explicitly passed in api # default will still remain Swagger-Codegen/#{VERSION}/ruby @@ -27,9 +46,41 @@ def setUserAgent(user_agent) if user_agent.is_a?(String) && user_agent.downcase.start_with?('sendinblue_') @api_client.default_headers['User-Agent'] = @user_agent end - end + # verify the required parameter 'download_token' is set + if @api_client.config.client_side_validation && download_token.nil? + fail ArgumentError, "Missing the required parameter 'download_token' when calling InboundParsingApi.get_inbound_email_attachment" + end + # resource path + local_var_path = '/inbound/attachments/{downloadToken}'.sub('{' + 'downloadToken' + '}', download_token.to_s) + + # query parameters + query_params = {} + + # header parameters + header_params = {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) + # HTTP header 'Content-Type' + header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) + + # form parameters + form_params = {} - + # http body (model) + post_body = nil + auth_names = ['api-key', 'partner-key'] + data, status_code, headers = @api_client.call_api(:GET, local_var_path, + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => 'File') + if @api_client.config.debugging + @api_client.config.logger.debug "API called: InboundParsingApi#get_inbound_email_attachment\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end # Get the list of all the events for the received emails. # This endpoint will show the list of all the events for the received emails. # @param [Hash] opts the optional parameters diff --git a/lib/sib-api-v3-sdk/api/master_account_api.rb b/lib/sib-api-v3-sdk/api/master_account_api.rb index 343c60a..e9b3ac5 100644 --- a/lib/sib-api-v3-sdk/api/master_account_api.rb +++ b/lib/sib-api-v3-sdk/api/master_account_api.rb @@ -80,7 +80,7 @@ def corporate_master_account_get_with_http_info(opts = {}) end # Get the list of all the sub-accounts of the master account. # This endpoint will provide the list all the sub-accounts of the master account. - # @param offset Page number of sub-accounts listing + # @param offset Index of the first sub-account in the page # @param limit Number of sub-accounts to be displayed on each page # @param [Hash] opts the optional parameters # @return [SubAccountsResponse] @@ -91,7 +91,7 @@ def corporate_sub_account_get(offset, limit, opts = {}) # Get the list of all the sub-accounts of the master account. # This endpoint will provide the list all the sub-accounts of the master account. - # @param offset Page number of sub-accounts listing + # @param offset Index of the first sub-account in the page # @param limit Number of sub-accounts to be displayed on each page # @param [Hash] opts the optional parameters # @return [Array<(SubAccountsResponse, Fixnum, Hash)>] SubAccountsResponse data, response status code and response headers @@ -192,7 +192,7 @@ def corporate_sub_account_id_delete_with_http_info(id, opts = {}) return data, status_code, headers end # Get sub-account details - # This endpoint will provide the details of specified sub-account organization + # This endpoint will provide the details for the specified sub-account company # @param id Id of the sub-account organization # @param [Hash] opts the optional parameters # @return [SubAccountDetailsResponse] @@ -202,7 +202,7 @@ def corporate_sub_account_id_get(id, opts = {}) end # Get sub-account details - # This endpoint will provide the details of specified sub-account organization + # This endpoint will provide the details for the specified sub-account company # @param id Id of the sub-account organization # @param [Hash] opts the optional parameters # @return [Array<(SubAccountDetailsResponse, Fixnum, Hash)>] SubAccountDetailsResponse data, response status code and response headers @@ -308,7 +308,7 @@ def corporate_sub_account_id_plan_put_with_http_info(id, update_plan_details, op # This endpoint will create a new sub-account under a master account # @param sub_account_create values to create new sub-account # @param [Hash] opts the optional parameters - # @return [CreateModel] + # @return [CreateSubAccountResponse] def corporate_sub_account_post(sub_account_create, opts = {}) data, _status_code, _headers = corporate_sub_account_post_with_http_info(sub_account_create, opts) data @@ -318,7 +318,7 @@ def corporate_sub_account_post(sub_account_create, opts = {}) # This endpoint will create a new sub-account under a master account # @param sub_account_create values to create new sub-account # @param [Hash] opts the optional parameters - # @return [Array<(CreateModel, Fixnum, Hash)>] CreateModel data, response status code and response headers + # @return [Array<(CreateSubAccountResponse, Fixnum, Hash)>] CreateSubAccountResponse data, response status code and response headers def corporate_sub_account_post_with_http_info(sub_account_create, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: MasterAccountApi.corporate_sub_account_post ...' @@ -352,14 +352,14 @@ def corporate_sub_account_post_with_http_info(sub_account_create, opts = {}) :form_params => form_params, :body => post_body, :auth_names => auth_names, - :return_type => 'CreateModel') + :return_type => 'CreateSubAccountResponse') if @api_client.config.debugging @api_client.config.logger.debug "API called: MasterAccountApi#corporate_sub_account_post\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Generate SSO token to access Sendinblue - # This endpoint generates an sso token to authenticate and access a sub-account of the master using the account endpoint https://app.sendinblue.com/account/login/sub-account/sso/[token], where [token] will be replaced with actual token. + # This endpoint generates an sso token to authenticate and access a sub-account of the master using the account endpoint https://app.sendinblue.com/account/login/sub-account/sso/[token], where [token] will be replaced by the actual token. # @param sso_token_request Values to generate SSO token for sub-account # @param [Hash] opts the optional parameters # @return [GetSsoToken] @@ -369,7 +369,7 @@ def corporate_sub_account_sso_token_post(sso_token_request, opts = {}) end # Generate SSO token to access Sendinblue - # This endpoint generates an sso token to authenticate and access a sub-account of the master using the account endpoint https://app.sendinblue.com/account/login/sub-account/sso/[token], where [token] will be replaced with actual token. + # This endpoint generates an sso token to authenticate and access a sub-account of the master using the account endpoint https://app.sendinblue.com/account/login/sub-account/sso/[token], where [token] will be replaced by the actual token. # @param sso_token_request Values to generate SSO token for sub-account # @param [Hash] opts the optional parameters # @return [Array<(GetSsoToken, Fixnum, Hash)>] GetSsoToken data, response status code and response headers diff --git a/lib/sib-api-v3-sdk/api/notes_api.rb b/lib/sib-api-v3-sdk/api/notes_api.rb new file mode 100644 index 0000000..e34fe77 --- /dev/null +++ b/lib/sib-api-v3-sdk/api/notes_api.rb @@ -0,0 +1,308 @@ +=begin +#SendinBlue API + +#SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | + +OpenAPI spec version: 3.0.0 +Contact: contact@sendinblue.com +Generated by: https://github.com/swagger-api/swagger-codegen.git +Swagger Codegen version: 2.4.19 + +=end + +require 'uri' + +module SibApiV3Sdk + class NotesApi + attr_accessor :api_client + + def initialize(api_client = ApiClient.default) + @api_client = api_client + end + # Get all notes + # @param [Hash] opts the optional parameters + # @option opts [String] :entity Filter by note entity type + # @option opts [String] :entity_ids Filter by note entity IDs + # @option opts [Integer] :date_from dateFrom to date range filter type (timestamp in milliseconds) + # @option opts [Integer] :date_to dateTo to date range filter type (timestamp in milliseconds) + # @option opts [Integer] :offset Index of the first document of the page + # @option opts [Integer] :limit Number of documents per page (default to 50) + # @option opts [String] :sort Sort the results in the ascending/descending order. Default order is **descending** by creation if `sort` is not passed + # @return [NoteList] + def crm_notes_get(opts = {}) + data, _status_code, _headers = crm_notes_get_with_http_info(opts) + data + end + + # Get all notes + # @param [Hash] opts the optional parameters + # @option opts [String] :entity Filter by note entity type + # @option opts [String] :entity_ids Filter by note entity IDs + # @option opts [Integer] :date_from dateFrom to date range filter type (timestamp in milliseconds) + # @option opts [Integer] :date_to dateTo to date range filter type (timestamp in milliseconds) + # @option opts [Integer] :offset Index of the first document of the page + # @option opts [Integer] :limit Number of documents per page + # @option opts [String] :sort Sort the results in the ascending/descending order. Default order is **descending** by creation if `sort` is not passed + # @return [Array<(NoteList, Fixnum, Hash)>] NoteList data, response status code and response headers + def crm_notes_get_with_http_info(opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: NotesApi.crm_notes_get ...' + end + if @api_client.config.client_side_validation && opts[:'entity'] && !['companies', 'deals', 'contacts'].include?(opts[:'entity']) + fail ArgumentError, 'invalid value for "entity", must be one of companies, deals, contacts' + end + if @api_client.config.client_side_validation && opts[:'sort'] && !['asc', 'desc'].include?(opts[:'sort']) + fail ArgumentError, 'invalid value for "sort", must be one of asc, desc' + end + # resource path + local_var_path = '/crm/notes' + + # query parameters + query_params = {} + query_params[:'entity'] = opts[:'entity'] if !opts[:'entity'].nil? + query_params[:'entityIds'] = opts[:'entity_ids'] if !opts[:'entity_ids'].nil? + query_params[:'dateFrom'] = opts[:'date_from'] if !opts[:'date_from'].nil? + query_params[:'dateTo'] = opts[:'date_to'] if !opts[:'date_to'].nil? + query_params[:'offset'] = opts[:'offset'] if !opts[:'offset'].nil? + query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil? + query_params[:'sort'] = opts[:'sort'] if !opts[:'sort'].nil? + + # header parameters + header_params = {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) + # HTTP header 'Content-Type' + header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) + + # form parameters + form_params = {} + + # http body (model) + post_body = nil + auth_names = ['api-key', 'partner-key'] + data, status_code, headers = @api_client.call_api(:GET, local_var_path, + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => 'NoteList') + if @api_client.config.debugging + @api_client.config.logger.debug "API called: NotesApi#crm_notes_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + # Delete a note + # @param id Note ID to delete + # @param [Hash] opts the optional parameters + # @return [nil] + def crm_notes_id_delete(id, opts = {}) + crm_notes_id_delete_with_http_info(id, opts) + nil + end + + # Delete a note + # @param id Note ID to delete + # @param [Hash] opts the optional parameters + # @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers + def crm_notes_id_delete_with_http_info(id, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: NotesApi.crm_notes_id_delete ...' + 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 NotesApi.crm_notes_id_delete" + end + # resource path + local_var_path = '/crm/notes/{id}'.sub('{' + 'id' + '}', id.to_s) + + # query parameters + query_params = {} + + # header parameters + header_params = {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) + # HTTP header 'Content-Type' + header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) + + # form parameters + form_params = {} + + # http body (model) + post_body = nil + auth_names = ['api-key', 'partner-key'] + data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: NotesApi#crm_notes_id_delete\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + # Get a note + # @param id Note ID to get + # @param [Hash] opts the optional parameters + # @return [Note] + def crm_notes_id_get(id, opts = {}) + data, _status_code, _headers = crm_notes_id_get_with_http_info(id, opts) + data + end + + # Get a note + # @param id Note ID to get + # @param [Hash] opts the optional parameters + # @return [Array<(Note, Fixnum, Hash)>] Note data, response status code and response headers + def crm_notes_id_get_with_http_info(id, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: NotesApi.crm_notes_id_get ...' + 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 NotesApi.crm_notes_id_get" + end + # resource path + local_var_path = '/crm/notes/{id}'.sub('{' + 'id' + '}', id.to_s) + + # query parameters + query_params = {} + + # header parameters + header_params = {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) + # HTTP header 'Content-Type' + header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) + + # form parameters + form_params = {} + + # http body (model) + post_body = nil + auth_names = ['api-key', 'partner-key'] + data, status_code, headers = @api_client.call_api(:GET, local_var_path, + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => 'Note') + if @api_client.config.debugging + @api_client.config.logger.debug "API called: NotesApi#crm_notes_id_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + # Update a note + # @param id Note ID to update + # @param body Note data to update a note + # @param [Hash] opts the optional parameters + # @return [nil] + def crm_notes_id_patch(id, body, opts = {}) + crm_notes_id_patch_with_http_info(id, body, opts) + nil + end + + # Update a note + # @param id Note ID to update + # @param body Note data to update a note + # @param [Hash] opts the optional parameters + # @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers + def crm_notes_id_patch_with_http_info(id, body, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: NotesApi.crm_notes_id_patch ...' + 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 NotesApi.crm_notes_id_patch" + end + # verify the required parameter 'body' is set + if @api_client.config.client_side_validation && body.nil? + fail ArgumentError, "Missing the required parameter 'body' when calling NotesApi.crm_notes_id_patch" + end + # resource path + local_var_path = '/crm/notes/{id}'.sub('{' + 'id' + '}', id.to_s) + + # query parameters + query_params = {} + + # header parameters + header_params = {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) + # HTTP header 'Content-Type' + header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) + + # form parameters + form_params = {} + + # http body (model) + post_body = @api_client.object_to_http_body(body) + auth_names = ['api-key', 'partner-key'] + data, status_code, headers = @api_client.call_api(:PATCH, local_var_path, + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: NotesApi#crm_notes_id_patch\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + # Create a note + # @param body Note data to create a note. + # @param [Hash] opts the optional parameters + # @return [NoteId] + def crm_notes_post(body, opts = {}) + data, _status_code, _headers = crm_notes_post_with_http_info(body, opts) + data + end + + # Create a note + # @param body Note data to create a note. + # @param [Hash] opts the optional parameters + # @return [Array<(NoteId, Fixnum, Hash)>] NoteId data, response status code and response headers + def crm_notes_post_with_http_info(body, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: NotesApi.crm_notes_post ...' + end + # verify the required parameter 'body' is set + if @api_client.config.client_side_validation && body.nil? + fail ArgumentError, "Missing the required parameter 'body' when calling NotesApi.crm_notes_post" + end + # resource path + local_var_path = '/crm/notes' + + # query parameters + query_params = {} + + # header parameters + header_params = {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) + # HTTP header 'Content-Type' + header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) + + # form parameters + form_params = {} + + # http body (model) + post_body = @api_client.object_to_http_body(body) + auth_names = ['api-key', 'partner-key'] + data, status_code, headers = @api_client.call_api(:POST, local_var_path, + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => 'NoteId') + if @api_client.config.debugging + @api_client.config.logger.debug "API called: NotesApi#crm_notes_post\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + end +end diff --git a/lib/sib-api-v3-sdk/api/tasks_api.rb b/lib/sib-api-v3-sdk/api/tasks_api.rb new file mode 100644 index 0000000..8d4ede7 --- /dev/null +++ b/lib/sib-api-v3-sdk/api/tasks_api.rb @@ -0,0 +1,375 @@ +=begin +#SendinBlue API + +#SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | + +OpenAPI spec version: 3.0.0 +Contact: contact@sendinblue.com +Generated by: https://github.com/swagger-api/swagger-codegen.git +Swagger Codegen version: 2.4.19 + +=end + +require 'uri' + +module SibApiV3Sdk + class TasksApi + attr_accessor :api_client + + def initialize(api_client = ApiClient.default) + @api_client = api_client + end + # Get all tasks + # @param [Hash] opts the optional parameters + # @option opts [String] :filter_type Filter by task type (ID) + # @option opts [String] :filter_status Filter by task status + # @option opts [String] :filter_date Filter by date + # @option opts [String] :filter_assign_to Filter by assignTo id + # @option opts [String] :filter_contacts Filter by contact ids + # @option opts [String] :filter_deals Filter by deals ids + # @option opts [String] :filter_companies Filter by companies ids + # @option opts [Integer] :date_from dateFrom to date range filter type (timestamp in milliseconds) + # @option opts [Integer] :date_to dateTo to date range filter type (timestamp in milliseconds) + # @option opts [Integer] :offset Index of the first document of the page + # @option opts [Integer] :limit Number of documents per page (default to 50) + # @option opts [String] :sort Sort the results in the ascending/descending order. Default order is **descending** by creation if `sort` is not passed + # @option opts [String] :sort_by The field used to sort field names. + # @return [TaskList] + def crm_tasks_get(opts = {}) + data, _status_code, _headers = crm_tasks_get_with_http_info(opts) + data + end + + # Get all tasks + # @param [Hash] opts the optional parameters + # @option opts [String] :filter_type Filter by task type (ID) + # @option opts [String] :filter_status Filter by task status + # @option opts [String] :filter_date Filter by date + # @option opts [String] :filter_assign_to Filter by assignTo id + # @option opts [String] :filter_contacts Filter by contact ids + # @option opts [String] :filter_deals Filter by deals ids + # @option opts [String] :filter_companies Filter by companies ids + # @option opts [Integer] :date_from dateFrom to date range filter type (timestamp in milliseconds) + # @option opts [Integer] :date_to dateTo to date range filter type (timestamp in milliseconds) + # @option opts [Integer] :offset Index of the first document of the page + # @option opts [Integer] :limit Number of documents per page + # @option opts [String] :sort Sort the results in the ascending/descending order. Default order is **descending** by creation if `sort` is not passed + # @option opts [String] :sort_by The field used to sort field names. + # @return [Array<(TaskList, Fixnum, Hash)>] TaskList data, response status code and response headers + def crm_tasks_get_with_http_info(opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: TasksApi.crm_tasks_get ...' + end + if @api_client.config.client_side_validation && opts[:'filter_status'] && !['done', 'undone'].include?(opts[:'filter_status']) + fail ArgumentError, 'invalid value for "filter_status", must be one of done, undone' + end + if @api_client.config.client_side_validation && opts[:'filter_date'] && !['overdue', 'today', 'tomorrow', 'week', 'range'].include?(opts[:'filter_date']) + fail ArgumentError, 'invalid value for "filter_date", must be one of overdue, today, tomorrow, week, range' + end + if @api_client.config.client_side_validation && opts[:'sort'] && !['asc', 'desc'].include?(opts[:'sort']) + fail ArgumentError, 'invalid value for "sort", must be one of asc, desc' + end + # resource path + local_var_path = '/crm/tasks' + + # query parameters + query_params = {} + query_params[:'filter[type]'] = opts[:'filter_type'] if !opts[:'filter_type'].nil? + query_params[:'filter[status]'] = opts[:'filter_status'] if !opts[:'filter_status'].nil? + query_params[:'filter[date]'] = opts[:'filter_date'] if !opts[:'filter_date'].nil? + query_params[:'filter[assignTo]'] = opts[:'filter_assign_to'] if !opts[:'filter_assign_to'].nil? + query_params[:'filter[contacts]'] = opts[:'filter_contacts'] if !opts[:'filter_contacts'].nil? + query_params[:'filter[deals]'] = opts[:'filter_deals'] if !opts[:'filter_deals'].nil? + query_params[:'filter[companies]'] = opts[:'filter_companies'] if !opts[:'filter_companies'].nil? + query_params[:'dateFrom'] = opts[:'date_from'] if !opts[:'date_from'].nil? + query_params[:'dateTo'] = opts[:'date_to'] if !opts[:'date_to'].nil? + query_params[:'offset'] = opts[:'offset'] if !opts[:'offset'].nil? + query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil? + query_params[:'sort'] = opts[:'sort'] if !opts[:'sort'].nil? + query_params[:'sortBy'] = opts[:'sort_by'] if !opts[:'sort_by'].nil? + + # header parameters + header_params = {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) + # HTTP header 'Content-Type' + header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) + + # form parameters + form_params = {} + + # http body (model) + post_body = nil + auth_names = ['api-key', 'partner-key'] + data, status_code, headers = @api_client.call_api(:GET, local_var_path, + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => 'TaskList') + if @api_client.config.debugging + @api_client.config.logger.debug "API called: TasksApi#crm_tasks_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + # Delete a task + # @param id + # @param [Hash] opts the optional parameters + # @return [nil] + def crm_tasks_id_delete(id, opts = {}) + crm_tasks_id_delete_with_http_info(id, opts) + nil + end + + # Delete a task + # @param id + # @param [Hash] opts the optional parameters + # @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers + def crm_tasks_id_delete_with_http_info(id, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: TasksApi.crm_tasks_id_delete ...' + 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 TasksApi.crm_tasks_id_delete" + end + # resource path + local_var_path = '/crm/tasks/{id}'.sub('{' + 'id' + '}', id.to_s) + + # query parameters + query_params = {} + + # header parameters + header_params = {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) + # HTTP header 'Content-Type' + header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) + + # form parameters + form_params = {} + + # http body (model) + post_body = nil + auth_names = ['api-key', 'partner-key'] + data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: TasksApi#crm_tasks_id_delete\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + # Get a task + # @param id + # @param [Hash] opts the optional parameters + # @return [Task] + def crm_tasks_id_get(id, opts = {}) + data, _status_code, _headers = crm_tasks_id_get_with_http_info(id, opts) + data + end + + # Get a task + # @param id + # @param [Hash] opts the optional parameters + # @return [Array<(Task, Fixnum, Hash)>] Task data, response status code and response headers + def crm_tasks_id_get_with_http_info(id, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: TasksApi.crm_tasks_id_get ...' + 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 TasksApi.crm_tasks_id_get" + end + # resource path + local_var_path = '/crm/tasks/{id}'.sub('{' + 'id' + '}', id.to_s) + + # query parameters + query_params = {} + + # header parameters + header_params = {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) + # HTTP header 'Content-Type' + header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) + + # form parameters + form_params = {} + + # http body (model) + post_body = nil + auth_names = ['api-key', 'partner-key'] + data, status_code, headers = @api_client.call_api(:GET, local_var_path, + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => 'Task') + if @api_client.config.debugging + @api_client.config.logger.debug "API called: TasksApi#crm_tasks_id_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + # Update a task + # @param id + # @param body Updated task details. + # @param [Hash] opts the optional parameters + # @return [nil] + def crm_tasks_id_patch(id, body, opts = {}) + crm_tasks_id_patch_with_http_info(id, body, opts) + nil + end + + # Update a task + # @param id + # @param body Updated task details. + # @param [Hash] opts the optional parameters + # @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers + def crm_tasks_id_patch_with_http_info(id, body, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: TasksApi.crm_tasks_id_patch ...' + 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 TasksApi.crm_tasks_id_patch" + end + # verify the required parameter 'body' is set + if @api_client.config.client_side_validation && body.nil? + fail ArgumentError, "Missing the required parameter 'body' when calling TasksApi.crm_tasks_id_patch" + end + # resource path + local_var_path = '/crm/tasks/{id}'.sub('{' + 'id' + '}', id.to_s) + + # query parameters + query_params = {} + + # header parameters + header_params = {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) + # HTTP header 'Content-Type' + header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) + + # form parameters + form_params = {} + + # http body (model) + post_body = @api_client.object_to_http_body(body) + auth_names = ['api-key', 'partner-key'] + data, status_code, headers = @api_client.call_api(:PATCH, local_var_path, + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: TasksApi#crm_tasks_id_patch\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + # Create a task + # @param body Task name. + # @param [Hash] opts the optional parameters + # @return [InlineResponse2011] + def crm_tasks_post(body, opts = {}) + data, _status_code, _headers = crm_tasks_post_with_http_info(body, opts) + data + end + + # Create a task + # @param body Task name. + # @param [Hash] opts the optional parameters + # @return [Array<(InlineResponse2011, Fixnum, Hash)>] InlineResponse2011 data, response status code and response headers + def crm_tasks_post_with_http_info(body, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: TasksApi.crm_tasks_post ...' + end + # verify the required parameter 'body' is set + if @api_client.config.client_side_validation && body.nil? + fail ArgumentError, "Missing the required parameter 'body' when calling TasksApi.crm_tasks_post" + end + # resource path + local_var_path = '/crm/tasks' + + # query parameters + query_params = {} + + # header parameters + header_params = {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) + # HTTP header 'Content-Type' + header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) + + # form parameters + form_params = {} + + # http body (model) + post_body = @api_client.object_to_http_body(body) + auth_names = ['api-key', 'partner-key'] + data, status_code, headers = @api_client.call_api(:POST, local_var_path, + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => 'InlineResponse2011') + if @api_client.config.debugging + @api_client.config.logger.debug "API called: TasksApi#crm_tasks_post\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + # Get all task types + # @param [Hash] opts the optional parameters + # @return [TaskTypes] + def crm_tasktypes_get(opts = {}) + data, _status_code, _headers = crm_tasktypes_get_with_http_info(opts) + data + end + + # Get all task types + # @param [Hash] opts the optional parameters + # @return [Array<(TaskTypes, Fixnum, Hash)>] TaskTypes data, response status code and response headers + def crm_tasktypes_get_with_http_info(opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: TasksApi.crm_tasktypes_get ...' + end + # resource path + local_var_path = '/crm/tasktypes' + + # query parameters + query_params = {} + + # header parameters + header_params = {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) + # HTTP header 'Content-Type' + header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) + + # form parameters + form_params = {} + + # http body (model) + post_body = nil + auth_names = ['api-key', 'partner-key'] + data, status_code, headers = @api_client.call_api(:GET, local_var_path, + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => 'TaskTypes') + if @api_client.config.debugging + @api_client.config.logger.debug "API called: TasksApi#crm_tasktypes_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + end +end diff --git a/lib/sib-api-v3-sdk/api/transactional_emails_api.rb b/lib/sib-api-v3-sdk/api/transactional_emails_api.rb index 879daf1..e6fa38e 100644 --- a/lib/sib-api-v3-sdk/api/transactional_emails_api.rb +++ b/lib/sib-api-v3-sdk/api/transactional_emails_api.rb @@ -236,6 +236,59 @@ def delete_hardbounces_with_http_info(opts = {}) end return data, status_code, headers end + # Delete scheduled emails by batchId or messageId + # Delete scheduled batch of emails by batchId or single scheduled email by messageId + # @param identifier The `batchId` of scheduled emails batch (Should be a valid UUIDv4) or the `messageId` of scheduled email. + # @param [Hash] opts the optional parameters + # @return [nil] + def delete_scheduled_email_by_id(identifier, opts = {}) + delete_scheduled_email_by_id_with_http_info(identifier, opts) + nil + end + + # Delete scheduled emails by batchId or messageId + # Delete scheduled batch of emails by batchId or single scheduled email by messageId + # @param identifier The `batchId` of scheduled emails batch (Should be a valid UUIDv4) or the `messageId` of scheduled email. + # @param [Hash] opts the optional parameters + # @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers + def delete_scheduled_email_by_id_with_http_info(identifier, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: TransactionalEmailsApi.delete_scheduled_email_by_id ...' + end + # verify the required parameter 'identifier' is set + if @api_client.config.client_side_validation && identifier.nil? + fail ArgumentError, "Missing the required parameter 'identifier' when calling TransactionalEmailsApi.delete_scheduled_email_by_id" + end + # resource path + local_var_path = '/smtp/email/{identifier}'.sub('{' + 'identifier' + '}', identifier.to_s) + + # query parameters + query_params = {} + + # header parameters + header_params = {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) + # HTTP header 'Content-Type' + header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) + + # form parameters + form_params = {} + + # http body (model) + post_body = nil + auth_names = ['api-key', 'partner-key'] + data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: TransactionalEmailsApi#delete_scheduled_email_by_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end # Delete an inactive email template # @param template_id id of the template # @param [Hash] opts the optional parameters @@ -486,6 +539,148 @@ def get_email_event_report_with_http_info(opts = {}) end return data, status_code, headers end + # Fetch scheduled emails by batchId + # Fetch scheduled batch of emails by batchId (Can retrieve data upto 30 days old) + # @param batch_id The batchId of scheduled emails batch (Should be a valid UUIDv4) + # @param [Hash] opts the optional parameters + # @option opts [Date] :start_date Mandatory if `endDate` is used. Starting date (YYYY-MM-DD) from which you want to fetch the list. Can be maximum 30 days older tha current date. + # @option opts [Date] :end_date Mandatory if `startDate` is used. Ending date (YYYY-MM-DD) till which you want to fetch the list. Maximum time period that can be selected is one month. + # @option opts [String] :sort Sort the results in the ascending/descending order of record creation. Default order is **descending** if `sort` is not passed (default to desc) + # @option opts [String] :status Filter the records by `status` of the scheduled email batch or message. + # @option opts [Integer] :limit Number of documents returned per page (default to 100) + # @option opts [Integer] :offset Index of the first document on the page (default to 0) + # @return [GetScheduledEmailByBatchId] + def get_scheduled_email_by_batch_id(batch_id, opts = {}) + data, _status_code, _headers = get_scheduled_email_by_batch_id_with_http_info(batch_id, opts) + data + end + + # Fetch scheduled emails by batchId + # Fetch scheduled batch of emails by batchId (Can retrieve data upto 30 days old) + # @param batch_id The batchId of scheduled emails batch (Should be a valid UUIDv4) + # @param [Hash] opts the optional parameters + # @option opts [Date] :start_date Mandatory if `endDate` is used. Starting date (YYYY-MM-DD) from which you want to fetch the list. Can be maximum 30 days older tha current date. + # @option opts [Date] :end_date Mandatory if `startDate` is used. Ending date (YYYY-MM-DD) till which you want to fetch the list. Maximum time period that can be selected is one month. + # @option opts [String] :sort Sort the results in the ascending/descending order of record creation. Default order is **descending** if `sort` is not passed + # @option opts [String] :status Filter the records by `status` of the scheduled email batch or message. + # @option opts [Integer] :limit Number of documents returned per page + # @option opts [Integer] :offset Index of the first document on the page + # @return [Array<(GetScheduledEmailByBatchId, Fixnum, Hash)>] GetScheduledEmailByBatchId data, response status code and response headers + def get_scheduled_email_by_batch_id_with_http_info(batch_id, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: TransactionalEmailsApi.get_scheduled_email_by_batch_id ...' + end + # verify the required parameter 'batch_id' is set + if @api_client.config.client_side_validation && batch_id.nil? + fail ArgumentError, "Missing the required parameter 'batch_id' when calling TransactionalEmailsApi.get_scheduled_email_by_batch_id" + end + if @api_client.config.client_side_validation && opts[:'sort'] && !['asc', 'desc'].include?(opts[:'sort']) + fail ArgumentError, 'invalid value for "sort", must be one of asc, desc' + end + if @api_client.config.client_side_validation && opts[:'status'] && !['processed', 'inProgress', 'queued'].include?(opts[:'status']) + fail ArgumentError, 'invalid value for "status", must be one of processed, inProgress, queued' + end + if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] > 500 + fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling TransactionalEmailsApi.get_scheduled_email_by_batch_id, must be smaller than or equal to 500.' + end + + # resource path + local_var_path = '/smtp/emailStatus/{batchId}'.sub('{' + 'batchId' + '}', batch_id.to_s) + + # query parameters + query_params = {} + query_params[:'startDate'] = opts[:'start_date'] if !opts[:'start_date'].nil? + query_params[:'endDate'] = opts[:'end_date'] if !opts[:'end_date'].nil? + query_params[:'sort'] = opts[:'sort'] if !opts[:'sort'].nil? + query_params[:'status'] = opts[:'status'] if !opts[:'status'].nil? + query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil? + query_params[:'offset'] = opts[:'offset'] if !opts[:'offset'].nil? + + # header parameters + header_params = {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) + # HTTP header 'Content-Type' + header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) + + # form parameters + form_params = {} + + # http body (model) + post_body = nil + auth_names = ['api-key', 'partner-key'] + data, status_code, headers = @api_client.call_api(:GET, local_var_path, + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => 'GetScheduledEmailByBatchId') + if @api_client.config.debugging + @api_client.config.logger.debug "API called: TransactionalEmailsApi#get_scheduled_email_by_batch_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + # Fetch scheduled email by messageId + # Fetch scheduled email by messageId (Can retrieve data upto 30 days old) + # @param message_id The messageId of scheduled email + # @param [Hash] opts the optional parameters + # @option opts [Date] :start_date Mandatory if endDate is used. Starting date (YYYY-MM-DD) from which you want to fetch the list. Can be maximum 30 days older tha current date. + # @option opts [Date] :end_date Mandatory if startDate is used. Ending date (YYYY-MM-DD) till which you want to fetch the list. Maximum time period that can be selected is one month. + # @return [GetScheduledEmailByMessageId] + def get_scheduled_email_by_message_id(message_id, opts = {}) + data, _status_code, _headers = get_scheduled_email_by_message_id_with_http_info(message_id, opts) + data + end + + # Fetch scheduled email by messageId + # Fetch scheduled email by messageId (Can retrieve data upto 30 days old) + # @param message_id The messageId of scheduled email + # @param [Hash] opts the optional parameters + # @option opts [Date] :start_date Mandatory if endDate is used. Starting date (YYYY-MM-DD) from which you want to fetch the list. Can be maximum 30 days older tha current date. + # @option opts [Date] :end_date Mandatory if startDate is used. Ending date (YYYY-MM-DD) till which you want to fetch the list. Maximum time period that can be selected is one month. + # @return [Array<(GetScheduledEmailByMessageId, Fixnum, Hash)>] GetScheduledEmailByMessageId data, response status code and response headers + def get_scheduled_email_by_message_id_with_http_info(message_id, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: TransactionalEmailsApi.get_scheduled_email_by_message_id ...' + end + # verify the required parameter 'message_id' is set + if @api_client.config.client_side_validation && message_id.nil? + fail ArgumentError, "Missing the required parameter 'message_id' when calling TransactionalEmailsApi.get_scheduled_email_by_message_id" + end + # resource path + local_var_path = '/smtp/emailStatus/{messageId}'.sub('{' + 'messageId' + '}', message_id.to_s) + + # query parameters + query_params = {} + query_params[:'startDate'] = opts[:'start_date'] if !opts[:'start_date'].nil? + query_params[:'endDate'] = opts[:'end_date'] if !opts[:'end_date'].nil? + + # header parameters + header_params = {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) + # HTTP header 'Content-Type' + header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) + + # form parameters + form_params = {} + + # http body (model) + post_body = nil + auth_names = ['api-key', 'partner-key'] + data, status_code, headers = @api_client.call_api(:GET, local_var_path, + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => 'GetScheduledEmailByMessageId') + if @api_client.config.debugging + @api_client.config.logger.debug "API called: TransactionalEmailsApi#get_scheduled_email_by_message_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end # Get your transactional email activity aggregated per day # @param [Hash] opts the optional parameters # @option opts [Integer] :limit Number of documents returned per page (default to 10) diff --git a/lib/sib-api-v3-sdk/models/body.rb b/lib/sib-api-v3-sdk/models/body.rb index 12b8761..c5b6c0a 100644 --- a/lib/sib-api-v3-sdk/models/body.rb +++ b/lib/sib-api-v3-sdk/models/body.rb @@ -14,52 +14,17 @@ module SibApiV3Sdk class Body - # Name of task + # Name of company attr_accessor :name - # Duration of task - attr_accessor :duration - - # Id for type of task e.g Call / Email / Meeting etc. - attr_accessor :task_type_id - - # Task date/time - attr_accessor :date - - # Notes added to a task - attr_accessor :notes - - # Task marked as done - attr_accessor :done - - # User id to whom task is assigned - attr_accessor :assign_to_id - - # Contact ids for contacts linked to this task - attr_accessor :contacts_ids - - # Deal ids for deals a task is linked to - attr_accessor :deals_ids - - # Companies ids for companies a task is linked to - attr_accessor :companies_ids - - attr_accessor :reminder + # Attributes for company creation + attr_accessor :attributes # Attribute mapping from ruby-style variable name to JSON key. def self.attribute_map { :'name' => :'name', - :'duration' => :'duration', - :'task_type_id' => :'taskTypeId', - :'date' => :'date', - :'notes' => :'notes', - :'done' => :'done', - :'assign_to_id' => :'assignToId', - :'contacts_ids' => :'contactsIds', - :'deals_ids' => :'dealsIds', - :'companies_ids' => :'companiesIds', - :'reminder' => :'reminder' + :'attributes' => :'attributes' } end @@ -67,16 +32,7 @@ def self.attribute_map def self.swagger_types { :'name' => :'String', - :'duration' => :'Integer', - :'task_type_id' => :'String', - :'date' => :'DateTime', - :'notes' => :'String', - :'done' => :'BOOLEAN', - :'assign_to_id' => :'String', - :'contacts_ids' => :'Array', - :'deals_ids' => :'Array', - :'companies_ids' => :'Array', - :'reminder' => :'TaskReminder' + :'attributes' => :'Object' } end @@ -92,50 +48,8 @@ def initialize(attributes = {}) self.name = attributes[:'name'] end - if attributes.has_key?(:'duration') - self.duration = attributes[:'duration'] - end - - if attributes.has_key?(:'taskTypeId') - self.task_type_id = attributes[:'taskTypeId'] - end - - if attributes.has_key?(:'date') - self.date = attributes[:'date'] - end - - if attributes.has_key?(:'notes') - self.notes = attributes[:'notes'] - end - - if attributes.has_key?(:'done') - self.done = attributes[:'done'] - end - - if attributes.has_key?(:'assignToId') - self.assign_to_id = attributes[:'assignToId'] - end - - if attributes.has_key?(:'contactsIds') - if (value = attributes[:'contactsIds']).is_a?(Array) - self.contacts_ids = value - end - end - - if attributes.has_key?(:'dealsIds') - if (value = attributes[:'dealsIds']).is_a?(Array) - self.deals_ids = value - end - end - - if attributes.has_key?(:'companiesIds') - if (value = attributes[:'companiesIds']).is_a?(Array) - self.companies_ids = value - end - end - - if attributes.has_key?(:'reminder') - self.reminder = attributes[:'reminder'] + if attributes.has_key?(:'attributes') + self.attributes = attributes[:'attributes'] end end @@ -147,14 +61,6 @@ def list_invalid_properties invalid_properties.push('invalid value for "name", name cannot be nil.') end - if @task_type_id.nil? - invalid_properties.push('invalid value for "task_type_id", task_type_id cannot be nil.') - end - - if @date.nil? - invalid_properties.push('invalid value for "date", date cannot be nil.') - end - invalid_properties end @@ -162,8 +68,6 @@ def list_invalid_properties # @return true if the model is valid def valid? return false if @name.nil? - return false if @task_type_id.nil? - return false if @date.nil? true end @@ -173,16 +77,7 @@ def ==(o) return true if self.equal?(o) self.class == o.class && name == o.name && - duration == o.duration && - task_type_id == o.task_type_id && - date == o.date && - notes == o.notes && - done == o.done && - assign_to_id == o.assign_to_id && - contacts_ids == o.contacts_ids && - deals_ids == o.deals_ids && - companies_ids == o.companies_ids && - reminder == o.reminder + attributes == o.attributes end # @see the `==` method @@ -194,7 +89,7 @@ def eql?(o) # Calculates hash code according to all attributes. # @return [Fixnum] Hash code def hash - [name, duration, task_type_id, date, notes, done, assign_to_id, contacts_ids, deals_ids, companies_ids, reminder].hash + [name, attributes].hash end # Builds the object from hash diff --git a/lib/sib-api-v3-sdk/models/body_1.rb b/lib/sib-api-v3-sdk/models/body_1.rb index b345e63..4b50e01 100644 --- a/lib/sib-api-v3-sdk/models/body_1.rb +++ b/lib/sib-api-v3-sdk/models/body_1.rb @@ -14,52 +14,17 @@ module SibApiV3Sdk class Body1 - # Name of task + # Name of company attr_accessor :name - # Duration of task - attr_accessor :duration - - # Id for type of task e.g Call / Email / Meeting etc. - attr_accessor :task_type_id - - # Task date/time - attr_accessor :date - - # Notes added to a task - attr_accessor :notes - - # Task marked as done - attr_accessor :done - - # User id to whom task is assigned - attr_accessor :assign_to_id - - # Contact ids for contacts linked to this task - attr_accessor :contacts_ids - - # Deal ids for deals a task is linked to - attr_accessor :deals_ids - - # Companies ids for companies a task is linked to - attr_accessor :companies_ids - - attr_accessor :reminder + # Attributes for company update + attr_accessor :attributes # Attribute mapping from ruby-style variable name to JSON key. def self.attribute_map { :'name' => :'name', - :'duration' => :'duration', - :'task_type_id' => :'taskTypeId', - :'date' => :'date', - :'notes' => :'notes', - :'done' => :'done', - :'assign_to_id' => :'assignToId', - :'contacts_ids' => :'contactsIds', - :'deals_ids' => :'dealsIds', - :'companies_ids' => :'companiesIds', - :'reminder' => :'reminder' + :'attributes' => :'attributes' } end @@ -67,16 +32,7 @@ def self.attribute_map def self.swagger_types { :'name' => :'String', - :'duration' => :'Integer', - :'task_type_id' => :'String', - :'date' => :'DateTime', - :'notes' => :'String', - :'done' => :'BOOLEAN', - :'assign_to_id' => :'String', - :'contacts_ids' => :'Array', - :'deals_ids' => :'Array', - :'companies_ids' => :'Array', - :'reminder' => :'TaskReminder' + :'attributes' => :'Object' } end @@ -92,50 +48,8 @@ def initialize(attributes = {}) self.name = attributes[:'name'] end - if attributes.has_key?(:'duration') - self.duration = attributes[:'duration'] - end - - if attributes.has_key?(:'taskTypeId') - self.task_type_id = attributes[:'taskTypeId'] - end - - if attributes.has_key?(:'date') - self.date = attributes[:'date'] - end - - if attributes.has_key?(:'notes') - self.notes = attributes[:'notes'] - end - - if attributes.has_key?(:'done') - self.done = attributes[:'done'] - end - - if attributes.has_key?(:'assignToId') - self.assign_to_id = attributes[:'assignToId'] - end - - if attributes.has_key?(:'contactsIds') - if (value = attributes[:'contactsIds']).is_a?(Array) - self.contacts_ids = value - end - end - - if attributes.has_key?(:'dealsIds') - if (value = attributes[:'dealsIds']).is_a?(Array) - self.deals_ids = value - end - end - - if attributes.has_key?(:'companiesIds') - if (value = attributes[:'companiesIds']).is_a?(Array) - self.companies_ids = value - end - end - - if attributes.has_key?(:'reminder') - self.reminder = attributes[:'reminder'] + if attributes.has_key?(:'attributes') + self.attributes = attributes[:'attributes'] end end @@ -143,27 +57,12 @@ def initialize(attributes = {}) # @return Array for valid properties with the reasons def list_invalid_properties invalid_properties = Array.new - if @name.nil? - invalid_properties.push('invalid value for "name", name cannot be nil.') - end - - if @task_type_id.nil? - invalid_properties.push('invalid value for "task_type_id", task_type_id cannot be nil.') - end - - if @date.nil? - invalid_properties.push('invalid value for "date", date cannot be nil.') - end - invalid_properties end # Check to see if the all the properties in the model are valid # @return true if the model is valid def valid? - return false if @name.nil? - return false if @task_type_id.nil? - return false if @date.nil? true end @@ -173,16 +72,7 @@ def ==(o) return true if self.equal?(o) self.class == o.class && name == o.name && - duration == o.duration && - task_type_id == o.task_type_id && - date == o.date && - notes == o.notes && - done == o.done && - assign_to_id == o.assign_to_id && - contacts_ids == o.contacts_ids && - deals_ids == o.deals_ids && - companies_ids == o.companies_ids && - reminder == o.reminder + attributes == o.attributes end # @see the `==` method @@ -194,7 +84,7 @@ def eql?(o) # Calculates hash code according to all attributes. # @return [Fixnum] Hash code def hash - [name, duration, task_type_id, date, notes, done, assign_to_id, contacts_ids, deals_ids, companies_ids, reminder].hash + [name, attributes].hash end # Builds the object from hash diff --git a/lib/sib-api-v3-sdk/models/body_10.rb b/lib/sib-api-v3-sdk/models/body_10.rb new file mode 100644 index 0000000..5f0ba51 --- /dev/null +++ b/lib/sib-api-v3-sdk/models/body_10.rb @@ -0,0 +1,225 @@ +=begin +#SendinBlue API + +#SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | + +OpenAPI spec version: 3.0.0 +Contact: contact@sendinblue.com +Generated by: https://github.com/swagger-api/swagger-codegen.git +Swagger Codegen version: 2.4.19 + +=end + +require 'date' + +module SibApiV3Sdk + class Body10 + # visitor’s ID received from a webhook or generated by you to bind existing user account to Conversations + attr_accessor :visitor_id + + # message text + attr_accessor :text + + # agent ID. It can be found on agent’s page or received from a webhook. Optional if `groupId` is set. + attr_accessor :agent_id + + # group ID. It can be found on group’s page. Optional if `agentId` is set. + attr_accessor :group_id + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'visitor_id' => :'visitorId', + :'text' => :'text', + :'agent_id' => :'agentId', + :'group_id' => :'groupId' + } + end + + # Attribute type mapping. + def self.swagger_types + { + :'visitor_id' => :'String', + :'text' => :'String', + :'agent_id' => :'String', + :'group_id' => :'String' + } + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + return unless attributes.is_a?(Hash) + + # convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v } + + if attributes.has_key?(:'visitorId') + self.visitor_id = attributes[:'visitorId'] + end + + if attributes.has_key?(:'text') + self.text = attributes[:'text'] + end + + if attributes.has_key?(:'agentId') + self.agent_id = attributes[:'agentId'] + end + + if attributes.has_key?(:'groupId') + self.group_id = attributes[:'groupId'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + if @visitor_id.nil? + invalid_properties.push('invalid value for "visitor_id", visitor_id cannot be nil.') + end + + if @text.nil? + invalid_properties.push('invalid value for "text", text cannot be nil.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + return false if @visitor_id.nil? + return false if @text.nil? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + visitor_id == o.visitor_id && + text == o.text && + agent_id == o.agent_id && + group_id == o.group_id + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Fixnum] Hash code + def hash + [visitor_id, text, agent_id, group_id].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + self.class.swagger_types.each_pair do |key, type| + if type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end # or else data not found in attributes(hash), not an issue as the data can be optional + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :DateTime + DateTime.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :BOOLEAN + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + temp_model = SibApiV3Sdk.const_get(type).new + temp_model.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + next if value.nil? + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + + end +end diff --git a/lib/sib-api-v3-sdk/models/body_11.rb b/lib/sib-api-v3-sdk/models/body_11.rb new file mode 100644 index 0000000..7dcae3e --- /dev/null +++ b/lib/sib-api-v3-sdk/models/body_11.rb @@ -0,0 +1,190 @@ +=begin +#SendinBlue API + +#SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | + +OpenAPI spec version: 3.0.0 +Contact: contact@sendinblue.com +Generated by: https://github.com/swagger-api/swagger-codegen.git +Swagger Codegen version: 2.4.19 + +=end + +require 'date' + +module SibApiV3Sdk + class Body11 + # edited message text + attr_accessor :text + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'text' => :'text' + } + end + + # Attribute type mapping. + def self.swagger_types + { + :'text' => :'String' + } + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + return unless attributes.is_a?(Hash) + + # convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v } + + if attributes.has_key?(:'text') + self.text = attributes[:'text'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + if @text.nil? + invalid_properties.push('invalid value for "text", text cannot be nil.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + return false if @text.nil? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + text == o.text + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Fixnum] Hash code + def hash + [text].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + self.class.swagger_types.each_pair do |key, type| + if type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end # or else data not found in attributes(hash), not an issue as the data can be optional + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :DateTime + DateTime.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :BOOLEAN + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + temp_model = SibApiV3Sdk.const_get(type).new + temp_model.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + next if value.nil? + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + + end +end diff --git a/lib/sib-api-v3-sdk/models/body_12.rb b/lib/sib-api-v3-sdk/models/body_12.rb new file mode 100644 index 0000000..d27357e --- /dev/null +++ b/lib/sib-api-v3-sdk/models/body_12.rb @@ -0,0 +1,215 @@ +=begin +#SendinBlue API + +#SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | + +OpenAPI spec version: 3.0.0 +Contact: contact@sendinblue.com +Generated by: https://github.com/swagger-api/swagger-codegen.git +Swagger Codegen version: 2.4.19 + +=end + +require 'date' + +module SibApiV3Sdk + class Body12 + # agent ID. It can be found on agent’s page or received from a webhook. Alternatively, you can use `agentEmail` + `agentName` + `receivedFrom` instead (all 3 fields required). + attr_accessor :agent_id + + # mark your messages to distinguish messages created by you from the others. + attr_accessor :received_from + + # agent email. When sending online pings from a standalone system, it’s hard to maintain a 1-to-1 relationship between the users of both systems. In this case, an agent can be specified by their email address. If there’s no agent with the specified email address in your Sendinblue organization, a dummy agent will be created automatically. + attr_accessor :agent_email + + # agent name. + attr_accessor :agent_name + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'agent_id' => :'agentId', + :'received_from' => :'receivedFrom', + :'agent_email' => :'agentEmail', + :'agent_name' => :'agentName' + } + end + + # Attribute type mapping. + def self.swagger_types + { + :'agent_id' => :'String', + :'received_from' => :'String', + :'agent_email' => :'String', + :'agent_name' => :'String' + } + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + return unless attributes.is_a?(Hash) + + # convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v } + + if attributes.has_key?(:'agentId') + self.agent_id = attributes[:'agentId'] + end + + if attributes.has_key?(:'receivedFrom') + self.received_from = attributes[:'receivedFrom'] + end + + if attributes.has_key?(:'agentEmail') + self.agent_email = attributes[:'agentEmail'] + end + + if attributes.has_key?(:'agentName') + self.agent_name = attributes[:'agentName'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + agent_id == o.agent_id && + received_from == o.received_from && + agent_email == o.agent_email && + agent_name == o.agent_name + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Fixnum] Hash code + def hash + [agent_id, received_from, agent_email, agent_name].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + self.class.swagger_types.each_pair do |key, type| + if type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end # or else data not found in attributes(hash), not an issue as the data can be optional + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :DateTime + DateTime.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :BOOLEAN + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + temp_model = SibApiV3Sdk.const_get(type).new + temp_model.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + next if value.nil? + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + + end +end diff --git a/lib/sib-api-v3-sdk/models/body_2.rb b/lib/sib-api-v3-sdk/models/body_2.rb new file mode 100644 index 0000000..9e742bb --- /dev/null +++ b/lib/sib-api-v3-sdk/models/body_2.rb @@ -0,0 +1,223 @@ +=begin +#SendinBlue API + +#SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | + +OpenAPI spec version: 3.0.0 +Contact: contact@sendinblue.com +Generated by: https://github.com/swagger-api/swagger-codegen.git +Swagger Codegen version: 2.4.19 + +=end + +require 'date' + +module SibApiV3Sdk + class Body2 + # Contact ids for contacts to be linked with company + attr_accessor :link_contact_ids + + # Contact ids for contacts to be unlinked from company + attr_accessor :unlink_contact_ids + + # Deals ids for deals to be linked with company + attr_accessor :link_deals_ids + + # Deals ids for deals to be unlinked from company + attr_accessor :unlink_deals_ids + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'link_contact_ids' => :'linkContactIds', + :'unlink_contact_ids' => :'unlinkContactIds', + :'link_deals_ids' => :'linkDealsIds', + :'unlink_deals_ids' => :'unlinkDealsIds' + } + end + + # Attribute type mapping. + def self.swagger_types + { + :'link_contact_ids' => :'Array', + :'unlink_contact_ids' => :'Array', + :'link_deals_ids' => :'Array', + :'unlink_deals_ids' => :'Array' + } + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + return unless attributes.is_a?(Hash) + + # convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v } + + if attributes.has_key?(:'linkContactIds') + if (value = attributes[:'linkContactIds']).is_a?(Array) + self.link_contact_ids = value + end + end + + if attributes.has_key?(:'unlinkContactIds') + if (value = attributes[:'unlinkContactIds']).is_a?(Array) + self.unlink_contact_ids = value + end + end + + if attributes.has_key?(:'linkDealsIds') + if (value = attributes[:'linkDealsIds']).is_a?(Array) + self.link_deals_ids = value + end + end + + if attributes.has_key?(:'unlinkDealsIds') + if (value = attributes[:'unlinkDealsIds']).is_a?(Array) + self.unlink_deals_ids = value + end + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + link_contact_ids == o.link_contact_ids && + unlink_contact_ids == o.unlink_contact_ids && + link_deals_ids == o.link_deals_ids && + unlink_deals_ids == o.unlink_deals_ids + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Fixnum] Hash code + def hash + [link_contact_ids, unlink_contact_ids, link_deals_ids, unlink_deals_ids].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + self.class.swagger_types.each_pair do |key, type| + if type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end # or else data not found in attributes(hash), not an issue as the data can be optional + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :DateTime + DateTime.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :BOOLEAN + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + temp_model = SibApiV3Sdk.const_get(type).new + temp_model.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + next if value.nil? + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + + end +end diff --git a/lib/sib-api-v3-sdk/models/body_3.rb b/lib/sib-api-v3-sdk/models/body_3.rb new file mode 100644 index 0000000..831348e --- /dev/null +++ b/lib/sib-api-v3-sdk/models/body_3.rb @@ -0,0 +1,200 @@ +=begin +#SendinBlue API + +#SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | + +OpenAPI spec version: 3.0.0 +Contact: contact@sendinblue.com +Generated by: https://github.com/swagger-api/swagger-codegen.git +Swagger Codegen version: 2.4.19 + +=end + +require 'date' + +module SibApiV3Sdk + class Body3 + # Name of deal + attr_accessor :name + + # Attributes fo\\r deal creation + attr_accessor :attributes + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'name' => :'name', + :'attributes' => :'attributes' + } + end + + # Attribute type mapping. + def self.swagger_types + { + :'name' => :'String', + :'attributes' => :'Object' + } + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + return unless attributes.is_a?(Hash) + + # convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v } + + if attributes.has_key?(:'name') + self.name = attributes[:'name'] + end + + if attributes.has_key?(:'attributes') + self.attributes = attributes[:'attributes'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + if @name.nil? + invalid_properties.push('invalid value for "name", name cannot be nil.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + return false if @name.nil? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + name == o.name && + attributes == o.attributes + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Fixnum] Hash code + def hash + [name, attributes].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + self.class.swagger_types.each_pair do |key, type| + if type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end # or else data not found in attributes(hash), not an issue as the data can be optional + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :DateTime + DateTime.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :BOOLEAN + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + temp_model = SibApiV3Sdk.const_get(type).new + temp_model.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + next if value.nil? + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + + end +end diff --git a/lib/sib-api-v3-sdk/models/body_4.rb b/lib/sib-api-v3-sdk/models/body_4.rb new file mode 100644 index 0000000..3c97b5f --- /dev/null +++ b/lib/sib-api-v3-sdk/models/body_4.rb @@ -0,0 +1,195 @@ +=begin +#SendinBlue API + +#SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | + +OpenAPI spec version: 3.0.0 +Contact: contact@sendinblue.com +Generated by: https://github.com/swagger-api/swagger-codegen.git +Swagger Codegen version: 2.4.19 + +=end + +require 'date' + +module SibApiV3Sdk + class Body4 + # Name of deal + attr_accessor :name + + # Attributes for deal update + attr_accessor :attributes + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'name' => :'name', + :'attributes' => :'attributes' + } + end + + # Attribute type mapping. + def self.swagger_types + { + :'name' => :'String', + :'attributes' => :'Object' + } + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + return unless attributes.is_a?(Hash) + + # convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v } + + if attributes.has_key?(:'name') + self.name = attributes[:'name'] + end + + if attributes.has_key?(:'attributes') + self.attributes = attributes[:'attributes'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + name == o.name && + attributes == o.attributes + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Fixnum] Hash code + def hash + [name, attributes].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + self.class.swagger_types.each_pair do |key, type| + if type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end # or else data not found in attributes(hash), not an issue as the data can be optional + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :DateTime + DateTime.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :BOOLEAN + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + temp_model = SibApiV3Sdk.const_get(type).new + temp_model.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + next if value.nil? + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + + end +end diff --git a/lib/sib-api-v3-sdk/models/body_5.rb b/lib/sib-api-v3-sdk/models/body_5.rb new file mode 100644 index 0000000..de502a7 --- /dev/null +++ b/lib/sib-api-v3-sdk/models/body_5.rb @@ -0,0 +1,223 @@ +=begin +#SendinBlue API + +#SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | + +OpenAPI spec version: 3.0.0 +Contact: contact@sendinblue.com +Generated by: https://github.com/swagger-api/swagger-codegen.git +Swagger Codegen version: 2.4.19 + +=end + +require 'date' + +module SibApiV3Sdk + class Body5 + # Contact ids for contacts to be linked with deal + attr_accessor :link_contact_ids + + # Contact ids for contacts to be unlinked from deal + attr_accessor :unlink_contact_ids + + # Company ids to be linked with deal + attr_accessor :link_company_ids + + # Company ids to be unlinked from deal + attr_accessor :unlink_company_ids + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'link_contact_ids' => :'linkContactIds', + :'unlink_contact_ids' => :'unlinkContactIds', + :'link_company_ids' => :'linkCompanyIds', + :'unlink_company_ids' => :'unlinkCompanyIds' + } + end + + # Attribute type mapping. + def self.swagger_types + { + :'link_contact_ids' => :'Array', + :'unlink_contact_ids' => :'Array', + :'link_company_ids' => :'Array', + :'unlink_company_ids' => :'Array' + } + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + return unless attributes.is_a?(Hash) + + # convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v } + + if attributes.has_key?(:'linkContactIds') + if (value = attributes[:'linkContactIds']).is_a?(Array) + self.link_contact_ids = value + end + end + + if attributes.has_key?(:'unlinkContactIds') + if (value = attributes[:'unlinkContactIds']).is_a?(Array) + self.unlink_contact_ids = value + end + end + + if attributes.has_key?(:'linkCompanyIds') + if (value = attributes[:'linkCompanyIds']).is_a?(Array) + self.link_company_ids = value + end + end + + if attributes.has_key?(:'unlinkCompanyIds') + if (value = attributes[:'unlinkCompanyIds']).is_a?(Array) + self.unlink_company_ids = value + end + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + link_contact_ids == o.link_contact_ids && + unlink_contact_ids == o.unlink_contact_ids && + link_company_ids == o.link_company_ids && + unlink_company_ids == o.unlink_company_ids + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Fixnum] Hash code + def hash + [link_contact_ids, unlink_contact_ids, link_company_ids, unlink_company_ids].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + self.class.swagger_types.each_pair do |key, type| + if type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end # or else data not found in attributes(hash), not an issue as the data can be optional + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :DateTime + DateTime.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :BOOLEAN + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + temp_model = SibApiV3Sdk.const_get(type).new + temp_model.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + next if value.nil? + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + + end +end diff --git a/lib/sib-api-v3-sdk/models/body_6.rb b/lib/sib-api-v3-sdk/models/body_6.rb new file mode 100644 index 0000000..047a139 --- /dev/null +++ b/lib/sib-api-v3-sdk/models/body_6.rb @@ -0,0 +1,320 @@ +=begin +#SendinBlue API + +#SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | + +OpenAPI spec version: 3.0.0 +Contact: contact@sendinblue.com +Generated by: https://github.com/swagger-api/swagger-codegen.git +Swagger Codegen version: 2.4.19 + +=end + +require 'date' + +module SibApiV3Sdk + class Body6 + # Name of task + attr_accessor :name + + # Duration of task in milliseconds [1 minute = 60000 ms] + attr_accessor :duration + + # Id for type of task e.g Call / Email / Meeting etc. + attr_accessor :task_type_id + + # Task due date and time + attr_accessor :date + + # Notes added to a task + attr_accessor :notes + + # Task marked as done + attr_accessor :done + + # User id to whom task is assigned + attr_accessor :assign_to_id + + # Contact ids for contacts linked to this task + attr_accessor :contacts_ids + + # Deal ids for deals a task is linked to + attr_accessor :deals_ids + + # Companies ids for companies a task is linked to + attr_accessor :companies_ids + + attr_accessor :reminder + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'name' => :'name', + :'duration' => :'duration', + :'task_type_id' => :'taskTypeId', + :'date' => :'date', + :'notes' => :'notes', + :'done' => :'done', + :'assign_to_id' => :'assignToId', + :'contacts_ids' => :'contactsIds', + :'deals_ids' => :'dealsIds', + :'companies_ids' => :'companiesIds', + :'reminder' => :'reminder' + } + end + + # Attribute type mapping. + def self.swagger_types + { + :'name' => :'String', + :'duration' => :'Integer', + :'task_type_id' => :'String', + :'date' => :'DateTime', + :'notes' => :'String', + :'done' => :'BOOLEAN', + :'assign_to_id' => :'String', + :'contacts_ids' => :'Array', + :'deals_ids' => :'Array', + :'companies_ids' => :'Array', + :'reminder' => :'TaskReminder' + } + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + return unless attributes.is_a?(Hash) + + # convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v } + + if attributes.has_key?(:'name') + self.name = attributes[:'name'] + end + + if attributes.has_key?(:'duration') + self.duration = attributes[:'duration'] + end + + if attributes.has_key?(:'taskTypeId') + self.task_type_id = attributes[:'taskTypeId'] + end + + if attributes.has_key?(:'date') + self.date = attributes[:'date'] + end + + if attributes.has_key?(:'notes') + self.notes = attributes[:'notes'] + end + + if attributes.has_key?(:'done') + self.done = attributes[:'done'] + end + + if attributes.has_key?(:'assignToId') + self.assign_to_id = attributes[:'assignToId'] + end + + if attributes.has_key?(:'contactsIds') + if (value = attributes[:'contactsIds']).is_a?(Array) + self.contacts_ids = value + end + end + + if attributes.has_key?(:'dealsIds') + if (value = attributes[:'dealsIds']).is_a?(Array) + self.deals_ids = value + end + end + + if attributes.has_key?(:'companiesIds') + if (value = attributes[:'companiesIds']).is_a?(Array) + self.companies_ids = value + end + end + + if attributes.has_key?(:'reminder') + self.reminder = attributes[:'reminder'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + if @name.nil? + invalid_properties.push('invalid value for "name", name cannot be nil.') + end + + if !@duration.nil? && @duration < 0 + invalid_properties.push('invalid value for "duration", must be greater than or equal to 0.') + end + + if @task_type_id.nil? + invalid_properties.push('invalid value for "task_type_id", task_type_id cannot be nil.') + end + + if @date.nil? + invalid_properties.push('invalid value for "date", date cannot be nil.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + return false if @name.nil? + return false if !@duration.nil? && @duration < 0 + return false if @task_type_id.nil? + return false if @date.nil? + true + end + + # Custom attribute writer method with validation + # @param [Object] duration Value to be assigned + def duration=(duration) + if !duration.nil? && duration < 0 + fail ArgumentError, 'invalid value for "duration", must be greater than or equal to 0.' + end + + @duration = duration + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + name == o.name && + duration == o.duration && + task_type_id == o.task_type_id && + date == o.date && + notes == o.notes && + done == o.done && + assign_to_id == o.assign_to_id && + contacts_ids == o.contacts_ids && + deals_ids == o.deals_ids && + companies_ids == o.companies_ids && + reminder == o.reminder + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Fixnum] Hash code + def hash + [name, duration, task_type_id, date, notes, done, assign_to_id, contacts_ids, deals_ids, companies_ids, reminder].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + self.class.swagger_types.each_pair do |key, type| + if type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end # or else data not found in attributes(hash), not an issue as the data can be optional + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :DateTime + DateTime.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :BOOLEAN + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + temp_model = SibApiV3Sdk.const_get(type).new + temp_model.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + next if value.nil? + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + + end +end diff --git a/lib/sib-api-v3-sdk/models/body_7.rb b/lib/sib-api-v3-sdk/models/body_7.rb new file mode 100644 index 0000000..e06a708 --- /dev/null +++ b/lib/sib-api-v3-sdk/models/body_7.rb @@ -0,0 +1,281 @@ +=begin +#SendinBlue API + +#SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | + +OpenAPI spec version: 3.0.0 +Contact: contact@sendinblue.com +Generated by: https://github.com/swagger-api/swagger-codegen.git +Swagger Codegen version: 2.4.19 + +=end + +require 'date' + +module SibApiV3Sdk + class Body7 + # Name of task + attr_accessor :name + + # Duration of task in milliseconds [1 minute = 60000 ms] + attr_accessor :duration + + # Id for type of task e.g Call / Email / Meeting etc. + attr_accessor :task_type_id + + # Task date/time + attr_accessor :date + + # Notes added to a task + attr_accessor :notes + + # Task marked as done + attr_accessor :done + + # User id to whom task is assigned + attr_accessor :assign_to_id + + # Contact ids for contacts linked to this task + attr_accessor :contacts_ids + + # Deal ids for deals a task is linked to + attr_accessor :deals_ids + + # Companies ids for companies a task is linked to + attr_accessor :companies_ids + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'name' => :'name', + :'duration' => :'duration', + :'task_type_id' => :'taskTypeId', + :'date' => :'date', + :'notes' => :'notes', + :'done' => :'done', + :'assign_to_id' => :'assignToId', + :'contacts_ids' => :'contactsIds', + :'deals_ids' => :'dealsIds', + :'companies_ids' => :'companiesIds' + } + end + + # Attribute type mapping. + def self.swagger_types + { + :'name' => :'String', + :'duration' => :'Integer', + :'task_type_id' => :'String', + :'date' => :'DateTime', + :'notes' => :'String', + :'done' => :'BOOLEAN', + :'assign_to_id' => :'String', + :'contacts_ids' => :'Array', + :'deals_ids' => :'Array', + :'companies_ids' => :'Array' + } + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + return unless attributes.is_a?(Hash) + + # convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v } + + if attributes.has_key?(:'name') + self.name = attributes[:'name'] + end + + if attributes.has_key?(:'duration') + self.duration = attributes[:'duration'] + end + + if attributes.has_key?(:'taskTypeId') + self.task_type_id = attributes[:'taskTypeId'] + end + + if attributes.has_key?(:'date') + self.date = attributes[:'date'] + end + + if attributes.has_key?(:'notes') + self.notes = attributes[:'notes'] + end + + if attributes.has_key?(:'done') + self.done = attributes[:'done'] + end + + if attributes.has_key?(:'assignToId') + self.assign_to_id = attributes[:'assignToId'] + end + + if attributes.has_key?(:'contactsIds') + if (value = attributes[:'contactsIds']).is_a?(Array) + self.contacts_ids = value + end + end + + if attributes.has_key?(:'dealsIds') + if (value = attributes[:'dealsIds']).is_a?(Array) + self.deals_ids = value + end + end + + if attributes.has_key?(:'companiesIds') + if (value = attributes[:'companiesIds']).is_a?(Array) + self.companies_ids = value + end + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + name == o.name && + duration == o.duration && + task_type_id == o.task_type_id && + date == o.date && + notes == o.notes && + done == o.done && + assign_to_id == o.assign_to_id && + contacts_ids == o.contacts_ids && + deals_ids == o.deals_ids && + companies_ids == o.companies_ids + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Fixnum] Hash code + def hash + [name, duration, task_type_id, date, notes, done, assign_to_id, contacts_ids, deals_ids, companies_ids].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + self.class.swagger_types.each_pair do |key, type| + if type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end # or else data not found in attributes(hash), not an issue as the data can be optional + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :DateTime + DateTime.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :BOOLEAN + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + temp_model = SibApiV3Sdk.const_get(type).new + temp_model.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + next if value.nil? + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + + end +end diff --git a/lib/sib-api-v3-sdk/models/body_8.rb b/lib/sib-api-v3-sdk/models/body_8.rb new file mode 100644 index 0000000..93ade92 --- /dev/null +++ b/lib/sib-api-v3-sdk/models/body_8.rb @@ -0,0 +1,245 @@ +=begin +#SendinBlue API + +#SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | + +OpenAPI spec version: 3.0.0 +Contact: contact@sendinblue.com +Generated by: https://github.com/swagger-api/swagger-codegen.git +Swagger Codegen version: 2.4.19 + +=end + +require 'date' + +module SibApiV3Sdk + class Body8 + # visitor’s ID received from a webhook or generated by you to bind existing user account to Conversations + attr_accessor :visitor_id + + # message text + attr_accessor :text + + # agent ID. It can be found on agent’s page or received from a webhook. Alternatively, you can use `agentEmail` + `agentName` + `receivedFrom` instead (all 3 fields required). + attr_accessor :agent_id + + # mark your messages to distinguish messages created by you from the others. + attr_accessor :received_from + + # agent email. When sending messages from a standalone system, it’s hard to maintain a 1-to-1 relationship between the users of both systems. In this case, an agent can be specified by their email address. + attr_accessor :agent_email + + # agent name + attr_accessor :agent_name + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'visitor_id' => :'visitorId', + :'text' => :'text', + :'agent_id' => :'agentId', + :'received_from' => :'receivedFrom', + :'agent_email' => :'agentEmail', + :'agent_name' => :'agentName' + } + end + + # Attribute type mapping. + def self.swagger_types + { + :'visitor_id' => :'String', + :'text' => :'String', + :'agent_id' => :'String', + :'received_from' => :'String', + :'agent_email' => :'String', + :'agent_name' => :'String' + } + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + return unless attributes.is_a?(Hash) + + # convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v } + + if attributes.has_key?(:'visitorId') + self.visitor_id = attributes[:'visitorId'] + end + + if attributes.has_key?(:'text') + self.text = attributes[:'text'] + end + + if attributes.has_key?(:'agentId') + self.agent_id = attributes[:'agentId'] + end + + if attributes.has_key?(:'receivedFrom') + self.received_from = attributes[:'receivedFrom'] + end + + if attributes.has_key?(:'agentEmail') + self.agent_email = attributes[:'agentEmail'] + end + + if attributes.has_key?(:'agentName') + self.agent_name = attributes[:'agentName'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + if @visitor_id.nil? + invalid_properties.push('invalid value for "visitor_id", visitor_id cannot be nil.') + end + + if @text.nil? + invalid_properties.push('invalid value for "text", text cannot be nil.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + return false if @visitor_id.nil? + return false if @text.nil? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + visitor_id == o.visitor_id && + text == o.text && + agent_id == o.agent_id && + received_from == o.received_from && + agent_email == o.agent_email && + agent_name == o.agent_name + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Fixnum] Hash code + def hash + [visitor_id, text, agent_id, received_from, agent_email, agent_name].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + self.class.swagger_types.each_pair do |key, type| + if type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end # or else data not found in attributes(hash), not an issue as the data can be optional + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :DateTime + DateTime.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :BOOLEAN + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + temp_model = SibApiV3Sdk.const_get(type).new + temp_model.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + next if value.nil? + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + + end +end diff --git a/lib/sib-api-v3-sdk/models/body_9.rb b/lib/sib-api-v3-sdk/models/body_9.rb new file mode 100644 index 0000000..b98d0da --- /dev/null +++ b/lib/sib-api-v3-sdk/models/body_9.rb @@ -0,0 +1,190 @@ +=begin +#SendinBlue API + +#SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | + +OpenAPI spec version: 3.0.0 +Contact: contact@sendinblue.com +Generated by: https://github.com/swagger-api/swagger-codegen.git +Swagger Codegen version: 2.4.19 + +=end + +require 'date' + +module SibApiV3Sdk + class Body9 + # edited message text + attr_accessor :text + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'text' => :'text' + } + end + + # Attribute type mapping. + def self.swagger_types + { + :'text' => :'String' + } + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + return unless attributes.is_a?(Hash) + + # convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v } + + if attributes.has_key?(:'text') + self.text = attributes[:'text'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + if @text.nil? + invalid_properties.push('invalid value for "text", text cannot be nil.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + return false if @text.nil? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + text == o.text + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Fixnum] Hash code + def hash + [text].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + self.class.swagger_types.each_pair do |key, type| + if type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end # or else data not found in attributes(hash), not an issue as the data can be optional + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :DateTime + DateTime.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :BOOLEAN + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + temp_model = SibApiV3Sdk.const_get(type).new + temp_model.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + next if value.nil? + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + + end +end diff --git a/lib/sib-api-v3-sdk/models/companies_list.rb b/lib/sib-api-v3-sdk/models/companies_list.rb new file mode 100644 index 0000000..168d1d8 --- /dev/null +++ b/lib/sib-api-v3-sdk/models/companies_list.rb @@ -0,0 +1,188 @@ +=begin +#SendinBlue API + +#SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | + +OpenAPI spec version: 3.0.0 +Contact: contact@sendinblue.com +Generated by: https://github.com/swagger-api/swagger-codegen.git +Swagger Codegen version: 2.4.19 + +=end + +require 'date' + +module SibApiV3Sdk + # List of companies + class CompaniesList + # List of compaies + attr_accessor :items + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'items' => :'items' + } + end + + # Attribute type mapping. + def self.swagger_types + { + :'items' => :'Array' + } + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + return unless attributes.is_a?(Hash) + + # convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v } + + if attributes.has_key?(:'items') + if (value = attributes[:'items']).is_a?(Array) + self.items = value + end + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + items == o.items + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Fixnum] Hash code + def hash + [items].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + self.class.swagger_types.each_pair do |key, type| + if type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end # or else data not found in attributes(hash), not an issue as the data can be optional + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :DateTime + DateTime.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :BOOLEAN + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + temp_model = SibApiV3Sdk.const_get(type).new + temp_model.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + next if value.nil? + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + + end +end diff --git a/lib/sib-api-v3-sdk/models/company.rb b/lib/sib-api-v3-sdk/models/company.rb new file mode 100644 index 0000000..cbb326e --- /dev/null +++ b/lib/sib-api-v3-sdk/models/company.rb @@ -0,0 +1,220 @@ +=begin +#SendinBlue API + +#SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | + +OpenAPI spec version: 3.0.0 +Contact: contact@sendinblue.com +Generated by: https://github.com/swagger-api/swagger-codegen.git +Swagger Codegen version: 2.4.19 + +=end + +require 'date' + +module SibApiV3Sdk + # Company Details + class Company + # Unique company id + attr_accessor :id + + # Company attributes with values + attr_accessor :attributes + + # Contact ids for contacts linked to this company + attr_accessor :linked_contacts_ids + + # Deals ids for companies linked to this company + attr_accessor :linked_deals_ids + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'id' => :'id', + :'attributes' => :'attributes', + :'linked_contacts_ids' => :'linkedContactsIds', + :'linked_deals_ids' => :'linkedDealsIds' + } + end + + # Attribute type mapping. + def self.swagger_types + { + :'id' => :'String', + :'attributes' => :'Object', + :'linked_contacts_ids' => :'Array', + :'linked_deals_ids' => :'Array' + } + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + return unless attributes.is_a?(Hash) + + # convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v } + + if attributes.has_key?(:'id') + self.id = attributes[:'id'] + end + + if attributes.has_key?(:'attributes') + self.attributes = attributes[:'attributes'] + end + + if attributes.has_key?(:'linkedContactsIds') + if (value = attributes[:'linkedContactsIds']).is_a?(Array) + self.linked_contacts_ids = value + end + end + + if attributes.has_key?(:'linkedDealsIds') + if (value = attributes[:'linkedDealsIds']).is_a?(Array) + self.linked_deals_ids = value + end + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + id == o.id && + attributes == o.attributes && + linked_contacts_ids == o.linked_contacts_ids && + linked_deals_ids == o.linked_deals_ids + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Fixnum] Hash code + def hash + [id, attributes, linked_contacts_ids, linked_deals_ids].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + self.class.swagger_types.each_pair do |key, type| + if type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end # or else data not found in attributes(hash), not an issue as the data can be optional + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :DateTime + DateTime.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :BOOLEAN + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + temp_model = SibApiV3Sdk.const_get(type).new + temp_model.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + next if value.nil? + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + + end +end diff --git a/lib/sib-api-v3-sdk/models/company_attributes.rb b/lib/sib-api-v3-sdk/models/company_attributes.rb new file mode 100644 index 0000000..4b28c46 --- /dev/null +++ b/lib/sib-api-v3-sdk/models/company_attributes.rb @@ -0,0 +1,176 @@ +=begin +#SendinBlue API + +#SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | + +OpenAPI spec version: 3.0.0 +Contact: contact@sendinblue.com +Generated by: https://github.com/swagger-api/swagger-codegen.git +Swagger Codegen version: 2.4.19 + +=end + +require 'date' + +module SibApiV3Sdk + # List of company attributes + class CompanyAttributes + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + } + end + + # Attribute type mapping. + def self.swagger_types + { + } + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + return unless attributes.is_a?(Hash) + + # convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v } + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Fixnum] Hash code + def hash + [].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + self.class.swagger_types.each_pair do |key, type| + if type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end # or else data not found in attributes(hash), not an issue as the data can be optional + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :DateTime + DateTime.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :BOOLEAN + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + temp_model = SibApiV3Sdk.const_get(type).new + temp_model.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + next if value.nil? + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + + end +end diff --git a/lib/sib-api-v3-sdk/models/company_attributes_inner.rb b/lib/sib-api-v3-sdk/models/company_attributes_inner.rb new file mode 100644 index 0000000..f2ab195 --- /dev/null +++ b/lib/sib-api-v3-sdk/models/company_attributes_inner.rb @@ -0,0 +1,223 @@ +=begin +#SendinBlue API + +#SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | + +OpenAPI spec version: 3.0.0 +Contact: contact@sendinblue.com +Generated by: https://github.com/swagger-api/swagger-codegen.git +Swagger Codegen version: 2.4.19 + +=end + +require 'date' + +module SibApiV3Sdk + # List of attributes + class CompanyAttributesInner + attr_accessor :internal_name + + attr_accessor :label + + attr_accessor :attribute_type_name + + attr_accessor :attribute_options + + attr_accessor :is_required + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'internal_name' => :'internalName', + :'label' => :'label', + :'attribute_type_name' => :'attributeTypeName', + :'attribute_options' => :'attributeOptions', + :'is_required' => :'isRequired' + } + end + + # Attribute type mapping. + def self.swagger_types + { + :'internal_name' => :'String', + :'label' => :'String', + :'attribute_type_name' => :'String', + :'attribute_options' => :'Array', + :'is_required' => :'BOOLEAN' + } + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + return unless attributes.is_a?(Hash) + + # convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v } + + if attributes.has_key?(:'internalName') + self.internal_name = attributes[:'internalName'] + end + + if attributes.has_key?(:'label') + self.label = attributes[:'label'] + end + + if attributes.has_key?(:'attributeTypeName') + self.attribute_type_name = attributes[:'attributeTypeName'] + end + + if attributes.has_key?(:'attributeOptions') + if (value = attributes[:'attributeOptions']).is_a?(Array) + self.attribute_options = value + end + end + + if attributes.has_key?(:'isRequired') + self.is_required = attributes[:'isRequired'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + internal_name == o.internal_name && + label == o.label && + attribute_type_name == o.attribute_type_name && + attribute_options == o.attribute_options && + is_required == o.is_required + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Fixnum] Hash code + def hash + [internal_name, label, attribute_type_name, attribute_options, is_required].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + self.class.swagger_types.each_pair do |key, type| + if type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end # or else data not found in attributes(hash), not an issue as the data can be optional + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :DateTime + DateTime.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :BOOLEAN + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + temp_model = SibApiV3Sdk.const_get(type).new + temp_model.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + next if value.nil? + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + + end +end diff --git a/lib/sib-api-v3-sdk/models/conversations_message.rb b/lib/sib-api-v3-sdk/models/conversations_message.rb new file mode 100644 index 0000000..b8a8ef6 --- /dev/null +++ b/lib/sib-api-v3-sdk/models/conversations_message.rb @@ -0,0 +1,324 @@ +=begin +#SendinBlue API + +#SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | + +OpenAPI spec version: 3.0.0 +Contact: contact@sendinblue.com +Generated by: https://github.com/swagger-api/swagger-codegen.git +Swagger Codegen version: 2.4.19 + +=end + +require 'date' + +module SibApiV3Sdk + # a Conversations message + class ConversationsMessage + # Message ID. It can be used for further manipulations with the message. + attr_accessor :id + + # `\"agent\"` for agents’ messages, `\"visitor\"` for visitors’ messages. + attr_accessor :type + + # Message text or name of the attached file + attr_accessor :text + + # visitor’s ID + attr_accessor :visitor_id + + # ID of the agent on whose behalf the message was sent (only in messages sent by an agent). + attr_accessor :agent_id + + # Agent’s name as displayed to the visitor. Only in the messages sent by an agent. + attr_accessor :agent_name + + # Timestamp in milliseconds. + attr_accessor :created_at + + # `true` for pushed messages + attr_accessor :is_pushed + + # In two-way integrations, messages sent via REST API can be marked with receivedFrom property and then filtered out when received in a webhook to avoid infinite loop. + attr_accessor :received_from + + attr_accessor :file + + class EnumAttributeValidator + attr_reader :datatype + attr_reader :allowable_values + + def initialize(datatype, allowable_values) + @allowable_values = allowable_values.map do |value| + case datatype.to_s + when /Integer/i + value.to_i + when /Float/i + value.to_f + else + value + end + end + end + + def valid?(value) + !value || allowable_values.include?(value) + end + end + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'id' => :'id', + :'type' => :'type', + :'text' => :'text', + :'visitor_id' => :'visitorId', + :'agent_id' => :'agentId', + :'agent_name' => :'agentName', + :'created_at' => :'createdAt', + :'is_pushed' => :'isPushed', + :'received_from' => :'receivedFrom', + :'file' => :'file' + } + end + + # Attribute type mapping. + def self.swagger_types + { + :'id' => :'String', + :'type' => :'String', + :'text' => :'String', + :'visitor_id' => :'String', + :'agent_id' => :'String', + :'agent_name' => :'String', + :'created_at' => :'Integer', + :'is_pushed' => :'BOOLEAN', + :'received_from' => :'String', + :'file' => :'ConversationsMessageFile' + } + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + return unless attributes.is_a?(Hash) + + # convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v } + + if attributes.has_key?(:'id') + self.id = attributes[:'id'] + end + + if attributes.has_key?(:'type') + self.type = attributes[:'type'] + end + + if attributes.has_key?(:'text') + self.text = attributes[:'text'] + end + + if attributes.has_key?(:'visitorId') + self.visitor_id = attributes[:'visitorId'] + end + + if attributes.has_key?(:'agentId') + self.agent_id = attributes[:'agentId'] + end + + if attributes.has_key?(:'agentName') + self.agent_name = attributes[:'agentName'] + end + + if attributes.has_key?(:'createdAt') + self.created_at = attributes[:'createdAt'] + end + + if attributes.has_key?(:'isPushed') + self.is_pushed = attributes[:'isPushed'] + end + + if attributes.has_key?(:'receivedFrom') + self.received_from = attributes[:'receivedFrom'] + end + + if attributes.has_key?(:'file') + self.file = attributes[:'file'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + if !@created_at.nil? && @created_at < 0 + invalid_properties.push('invalid value for "created_at", must be greater than or equal to 0.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + type_validator = EnumAttributeValidator.new('String', ['agent', 'visitor']) + return false unless type_validator.valid?(@type) + return false if !@created_at.nil? && @created_at < 0 + true + end + + # Custom attribute writer method checking allowed values (enum). + # @param [Object] type Object to be assigned + def type=(type) + validator = EnumAttributeValidator.new('String', ['agent', 'visitor']) + unless validator.valid?(type) + fail ArgumentError, 'invalid value for "type", must be one of #{validator.allowable_values}.' + end + @type = type + end + + # Custom attribute writer method with validation + # @param [Object] created_at Value to be assigned + def created_at=(created_at) + if !created_at.nil? && created_at < 0 + fail ArgumentError, 'invalid value for "created_at", must be greater than or equal to 0.' + end + + @created_at = created_at + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + id == o.id && + type == o.type && + text == o.text && + visitor_id == o.visitor_id && + agent_id == o.agent_id && + agent_name == o.agent_name && + created_at == o.created_at && + is_pushed == o.is_pushed && + received_from == o.received_from && + file == o.file + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Fixnum] Hash code + def hash + [id, type, text, visitor_id, agent_id, agent_name, created_at, is_pushed, received_from, file].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + self.class.swagger_types.each_pair do |key, type| + if type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end # or else data not found in attributes(hash), not an issue as the data can be optional + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :DateTime + DateTime.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :BOOLEAN + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + temp_model = SibApiV3Sdk.const_get(type).new + temp_model.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + next if value.nil? + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + + end +end diff --git a/lib/sib-api-v3-sdk/models/conversations_message_file.rb b/lib/sib-api-v3-sdk/models/conversations_message_file.rb new file mode 100644 index 0000000..623f22e --- /dev/null +++ b/lib/sib-api-v3-sdk/models/conversations_message_file.rb @@ -0,0 +1,239 @@ +=begin +#SendinBlue API + +#SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | + +OpenAPI spec version: 3.0.0 +Contact: contact@sendinblue.com +Generated by: https://github.com/swagger-api/swagger-codegen.git +Swagger Codegen version: 2.4.19 + +=end + +require 'date' + +module SibApiV3Sdk + class ConversationsMessageFile + # Name of the file + attr_accessor :filename + + # Size in bytes + attr_accessor :size + + # Whether the file is an image + attr_accessor :is_image + + # URL of the file + attr_accessor :url + + attr_accessor :image_info + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'filename' => :'filename', + :'size' => :'size', + :'is_image' => :'isImage', + :'url' => :'url', + :'image_info' => :'imageInfo' + } + end + + # Attribute type mapping. + def self.swagger_types + { + :'filename' => :'String', + :'size' => :'Integer', + :'is_image' => :'BOOLEAN', + :'url' => :'String', + :'image_info' => :'ConversationsMessageFileImageInfo' + } + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + return unless attributes.is_a?(Hash) + + # convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v } + + if attributes.has_key?(:'filename') + self.filename = attributes[:'filename'] + end + + if attributes.has_key?(:'size') + self.size = attributes[:'size'] + end + + if attributes.has_key?(:'isImage') + self.is_image = attributes[:'isImage'] + end + + if attributes.has_key?(:'url') + self.url = attributes[:'url'] + end + + if attributes.has_key?(:'imageInfo') + self.image_info = attributes[:'imageInfo'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + if !@size.nil? && @size < 0 + invalid_properties.push('invalid value for "size", must be greater than or equal to 0.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + return false if !@size.nil? && @size < 0 + true + end + + # Custom attribute writer method with validation + # @param [Object] size Value to be assigned + def size=(size) + if !size.nil? && size < 0 + fail ArgumentError, 'invalid value for "size", must be greater than or equal to 0.' + end + + @size = size + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + filename == o.filename && + size == o.size && + is_image == o.is_image && + url == o.url && + image_info == o.image_info + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Fixnum] Hash code + def hash + [filename, size, is_image, url, image_info].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + self.class.swagger_types.each_pair do |key, type| + if type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end # or else data not found in attributes(hash), not an issue as the data can be optional + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :DateTime + DateTime.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :BOOLEAN + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + temp_model = SibApiV3Sdk.const_get(type).new + temp_model.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + next if value.nil? + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + + end +end diff --git a/lib/sib-api-v3-sdk/models/conversations_message_file_image_info.rb b/lib/sib-api-v3-sdk/models/conversations_message_file_image_info.rb new file mode 100644 index 0000000..7d8e83a --- /dev/null +++ b/lib/sib-api-v3-sdk/models/conversations_message_file_image_info.rb @@ -0,0 +1,236 @@ +=begin +#SendinBlue API + +#SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | + +OpenAPI spec version: 3.0.0 +Contact: contact@sendinblue.com +Generated by: https://github.com/swagger-api/swagger-codegen.git +Swagger Codegen version: 2.4.19 + +=end + +require 'date' + +module SibApiV3Sdk + # image info is passed in case the file is an image + class ConversationsMessageFileImageInfo + # Width of the image + attr_accessor :width + + # height of the image + attr_accessor :height + + # URL of the preview + attr_accessor :preview_url + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'width' => :'width', + :'height' => :'height', + :'preview_url' => :'previewUrl' + } + end + + # Attribute type mapping. + def self.swagger_types + { + :'width' => :'Integer', + :'height' => :'Integer', + :'preview_url' => :'String' + } + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + return unless attributes.is_a?(Hash) + + # convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v } + + if attributes.has_key?(:'width') + self.width = attributes[:'width'] + end + + if attributes.has_key?(:'height') + self.height = attributes[:'height'] + end + + if attributes.has_key?(:'previewUrl') + self.preview_url = attributes[:'previewUrl'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + if !@width.nil? && @width < 0 + invalid_properties.push('invalid value for "width", must be greater than or equal to 0.') + end + + if !@height.nil? && @height < 0 + invalid_properties.push('invalid value for "height", must be greater than or equal to 0.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + return false if !@width.nil? && @width < 0 + return false if !@height.nil? && @height < 0 + true + end + + # Custom attribute writer method with validation + # @param [Object] width Value to be assigned + def width=(width) + if !width.nil? && width < 0 + fail ArgumentError, 'invalid value for "width", must be greater than or equal to 0.' + end + + @width = width + end + + # Custom attribute writer method with validation + # @param [Object] height Value to be assigned + def height=(height) + if !height.nil? && height < 0 + fail ArgumentError, 'invalid value for "height", must be greater than or equal to 0.' + end + + @height = height + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + width == o.width && + height == o.height && + preview_url == o.preview_url + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Fixnum] Hash code + def hash + [width, height, preview_url].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + self.class.swagger_types.each_pair do |key, type| + if type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end # or else data not found in attributes(hash), not an issue as the data can be optional + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :DateTime + DateTime.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :BOOLEAN + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + temp_model = SibApiV3Sdk.const_get(type).new + temp_model.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + next if value.nil? + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + + end +end diff --git a/lib/sib-api-v3-sdk/models/create_contact.rb b/lib/sib-api-v3-sdk/models/create_contact.rb index 25b1c8a..46269e9 100644 --- a/lib/sib-api-v3-sdk/models/create_contact.rb +++ b/lib/sib-api-v3-sdk/models/create_contact.rb @@ -17,7 +17,7 @@ class CreateContact # Email address of the user. Mandatory if \"SMS\" field is not passed in \"attributes\" parameter. Mobile Number in \"SMS\" field should be passed with proper country code. For example {\"SMS\":\"+91xxxxxxxxxx\"} or {\"SMS\":\"0091xxxxxxxxxx\"} attr_accessor :email - # Pass the set of attributes and their values. These attributes must be present in your SendinBlue account. For eg. {\"FNAME\":\"Elly\", \"LNAME\":\"Roger\"} + # Pass the set of attributes and their values. The attribute's parameter should be passed in capital letter while creating a contact. These attributes must be present in your SendinBlue account. For eg. {\"FNAME\":\"Elly\", \"LNAME\":\"Roger\"} attr_accessor :attributes # Set this field to blacklist the contact for emails (emailBlacklisted = true) diff --git a/lib/sib-api-v3-sdk/models/create_sub_account.rb b/lib/sib-api-v3-sdk/models/create_sub_account.rb index 287fd51..6c43b4a 100644 --- a/lib/sib-api-v3-sdk/models/create_sub_account.rb +++ b/lib/sib-api-v3-sdk/models/create_sub_account.rb @@ -14,16 +14,16 @@ module SibApiV3Sdk class CreateSubAccount - # Name of the organization + # Set the name of the sub-account company attr_accessor :company_name # Email address for the organization attr_accessor :email - # Language for identifying localization information + # Set the language of the sub-account attr_accessor :language - # Request timezone of the client + # Set the timezone of the sub-account attr_accessor :timezone class EnumAttributeValidator diff --git a/lib/sib-api-v3-sdk/models/create_sub_account_response.rb b/lib/sib-api-v3-sdk/models/create_sub_account_response.rb new file mode 100644 index 0000000..3e83657 --- /dev/null +++ b/lib/sib-api-v3-sdk/models/create_sub_account_response.rb @@ -0,0 +1,190 @@ +=begin +#SendinBlue API + +#SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | + +OpenAPI spec version: 3.0.0 +Contact: contact@sendinblue.com +Generated by: https://github.com/swagger-api/swagger-codegen.git +Swagger Codegen version: 2.4.19 + +=end + +require 'date' + +module SibApiV3Sdk + class CreateSubAccountResponse + # ID of the sub-account created + attr_accessor :id + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'id' => :'id' + } + end + + # Attribute type mapping. + def self.swagger_types + { + :'id' => :'Integer' + } + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + return unless attributes.is_a?(Hash) + + # convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v } + + if attributes.has_key?(:'id') + self.id = attributes[:'id'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + if @id.nil? + invalid_properties.push('invalid value for "id", id cannot be nil.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + return false if @id.nil? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + id == o.id + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Fixnum] Hash code + def hash + [id].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + self.class.swagger_types.each_pair do |key, type| + if type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end # or else data not found in attributes(hash), not an issue as the data can be optional + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :DateTime + DateTime.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :BOOLEAN + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + temp_model = SibApiV3Sdk.const_get(type).new + temp_model.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + next if value.nil? + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + + end +end diff --git a/lib/sib-api-v3-sdk/models/deal.rb b/lib/sib-api-v3-sdk/models/deal.rb new file mode 100644 index 0000000..3170c52 --- /dev/null +++ b/lib/sib-api-v3-sdk/models/deal.rb @@ -0,0 +1,220 @@ +=begin +#SendinBlue API + +#SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | + +OpenAPI spec version: 3.0.0 +Contact: contact@sendinblue.com +Generated by: https://github.com/swagger-api/swagger-codegen.git +Swagger Codegen version: 2.4.19 + +=end + +require 'date' + +module SibApiV3Sdk + # Deal Details + class Deal + # Unique deal id + attr_accessor :id + + # Deal attributes with values + attr_accessor :attributes + + # Contact ids for contacts linked to this deal + attr_accessor :linked_contacts_ids + + # Companies ids for companies linked to this deal + attr_accessor :linked_companies_ids + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'id' => :'id', + :'attributes' => :'attributes', + :'linked_contacts_ids' => :'linkedContactsIds', + :'linked_companies_ids' => :'linkedCompaniesIds' + } + end + + # Attribute type mapping. + def self.swagger_types + { + :'id' => :'String', + :'attributes' => :'Object', + :'linked_contacts_ids' => :'Array', + :'linked_companies_ids' => :'Array' + } + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + return unless attributes.is_a?(Hash) + + # convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v } + + if attributes.has_key?(:'id') + self.id = attributes[:'id'] + end + + if attributes.has_key?(:'attributes') + self.attributes = attributes[:'attributes'] + end + + if attributes.has_key?(:'linkedContactsIds') + if (value = attributes[:'linkedContactsIds']).is_a?(Array) + self.linked_contacts_ids = value + end + end + + if attributes.has_key?(:'linkedCompaniesIds') + if (value = attributes[:'linkedCompaniesIds']).is_a?(Array) + self.linked_companies_ids = value + end + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + id == o.id && + attributes == o.attributes && + linked_contacts_ids == o.linked_contacts_ids && + linked_companies_ids == o.linked_companies_ids + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Fixnum] Hash code + def hash + [id, attributes, linked_contacts_ids, linked_companies_ids].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + self.class.swagger_types.each_pair do |key, type| + if type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end # or else data not found in attributes(hash), not an issue as the data can be optional + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :DateTime + DateTime.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :BOOLEAN + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + temp_model = SibApiV3Sdk.const_get(type).new + temp_model.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + next if value.nil? + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + + end +end diff --git a/lib/sib-api-v3-sdk/models/deal_attributes.rb b/lib/sib-api-v3-sdk/models/deal_attributes.rb new file mode 100644 index 0000000..71caf35 --- /dev/null +++ b/lib/sib-api-v3-sdk/models/deal_attributes.rb @@ -0,0 +1,176 @@ +=begin +#SendinBlue API + +#SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | + +OpenAPI spec version: 3.0.0 +Contact: contact@sendinblue.com +Generated by: https://github.com/swagger-api/swagger-codegen.git +Swagger Codegen version: 2.4.19 + +=end + +require 'date' + +module SibApiV3Sdk + # List of deal attributes + class DealAttributes + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + } + end + + # Attribute type mapping. + def self.swagger_types + { + } + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + return unless attributes.is_a?(Hash) + + # convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v } + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Fixnum] Hash code + def hash + [].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + self.class.swagger_types.each_pair do |key, type| + if type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end # or else data not found in attributes(hash), not an issue as the data can be optional + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :DateTime + DateTime.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :BOOLEAN + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + temp_model = SibApiV3Sdk.const_get(type).new + temp_model.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + next if value.nil? + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + + end +end diff --git a/lib/sib-api-v3-sdk/models/deal_attributes_inner.rb b/lib/sib-api-v3-sdk/models/deal_attributes_inner.rb new file mode 100644 index 0000000..fb1f09e --- /dev/null +++ b/lib/sib-api-v3-sdk/models/deal_attributes_inner.rb @@ -0,0 +1,223 @@ +=begin +#SendinBlue API + +#SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | + +OpenAPI spec version: 3.0.0 +Contact: contact@sendinblue.com +Generated by: https://github.com/swagger-api/swagger-codegen.git +Swagger Codegen version: 2.4.19 + +=end + +require 'date' + +module SibApiV3Sdk + # List of attributes + class DealAttributesInner + attr_accessor :internal_name + + attr_accessor :label + + attr_accessor :attribute_type_name + + attr_accessor :attribute_options + + attr_accessor :is_required + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'internal_name' => :'internalName', + :'label' => :'label', + :'attribute_type_name' => :'attributeTypeName', + :'attribute_options' => :'attributeOptions', + :'is_required' => :'isRequired' + } + end + + # Attribute type mapping. + def self.swagger_types + { + :'internal_name' => :'String', + :'label' => :'String', + :'attribute_type_name' => :'String', + :'attribute_options' => :'Array', + :'is_required' => :'BOOLEAN' + } + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + return unless attributes.is_a?(Hash) + + # convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v } + + if attributes.has_key?(:'internalName') + self.internal_name = attributes[:'internalName'] + end + + if attributes.has_key?(:'label') + self.label = attributes[:'label'] + end + + if attributes.has_key?(:'attributeTypeName') + self.attribute_type_name = attributes[:'attributeTypeName'] + end + + if attributes.has_key?(:'attributeOptions') + if (value = attributes[:'attributeOptions']).is_a?(Array) + self.attribute_options = value + end + end + + if attributes.has_key?(:'isRequired') + self.is_required = attributes[:'isRequired'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + internal_name == o.internal_name && + label == o.label && + attribute_type_name == o.attribute_type_name && + attribute_options == o.attribute_options && + is_required == o.is_required + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Fixnum] Hash code + def hash + [internal_name, label, attribute_type_name, attribute_options, is_required].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + self.class.swagger_types.each_pair do |key, type| + if type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end # or else data not found in attributes(hash), not an issue as the data can be optional + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :DateTime + DateTime.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :BOOLEAN + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + temp_model = SibApiV3Sdk.const_get(type).new + temp_model.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + next if value.nil? + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + + end +end diff --git a/lib/sib-api-v3-sdk/models/deals_list.rb b/lib/sib-api-v3-sdk/models/deals_list.rb new file mode 100644 index 0000000..54557ba --- /dev/null +++ b/lib/sib-api-v3-sdk/models/deals_list.rb @@ -0,0 +1,188 @@ +=begin +#SendinBlue API + +#SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | + +OpenAPI spec version: 3.0.0 +Contact: contact@sendinblue.com +Generated by: https://github.com/swagger-api/swagger-codegen.git +Swagger Codegen version: 2.4.19 + +=end + +require 'date' + +module SibApiV3Sdk + # List of Deals + class DealsList + # List of deals + attr_accessor :items + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'items' => :'items' + } + end + + # Attribute type mapping. + def self.swagger_types + { + :'items' => :'Array' + } + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + return unless attributes.is_a?(Hash) + + # convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v } + + if attributes.has_key?(:'items') + if (value = attributes[:'items']).is_a?(Array) + self.items = value + end + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + items == o.items + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Fixnum] Hash code + def hash + [items].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + self.class.swagger_types.each_pair do |key, type| + if type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end # or else data not found in attributes(hash), not an issue as the data can be optional + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :DateTime + DateTime.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :BOOLEAN + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + temp_model = SibApiV3Sdk.const_get(type).new + temp_model.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + next if value.nil? + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + + end +end diff --git a/lib/sib-api-v3-sdk/models/file_data.rb b/lib/sib-api-v3-sdk/models/file_data.rb index 6a9a812..746470d 100644 --- a/lib/sib-api-v3-sdk/models/file_data.rb +++ b/lib/sib-api-v3-sdk/models/file_data.rb @@ -15,65 +15,50 @@ module SibApiV3Sdk # File data that is uploaded class FileData - # Url of uploaded file - attr_accessor :url - - # Id of uploaded file - attr_accessor :id - # Name of uploaded file attr_accessor :name # Account id of user which created the file attr_accessor :author_id - # Account details of user which created the file - attr_accessor :author - # Contact id of contact on which file is uploaded attr_accessor :contact_id - # Deal ids linked to a file - attr_accessor :deal_ids + # Deal id linked to a file + attr_accessor :deal_id + + # Company id linked to a file + attr_accessor :company_id - # Size of file uploaded + # Size of file in bytes attr_accessor :size # File created date/time attr_accessor :created_at - # File updated date/time - attr_accessor :updated_at - # Attribute mapping from ruby-style variable name to JSON key. def self.attribute_map { - :'url' => :'url', - :'id' => :'id', :'name' => :'name', :'author_id' => :'authorId', - :'author' => :'author', :'contact_id' => :'contactId', - :'deal_ids' => :'dealIds', + :'deal_id' => :'dealId', + :'company_id' => :'companyId', :'size' => :'size', - :'created_at' => :'createdAt', - :'updated_at' => :'updatedAt' + :'created_at' => :'createdAt' } end # Attribute type mapping. def self.swagger_types { - :'url' => :'String', - :'id' => :'String', :'name' => :'String', :'author_id' => :'String', - :'author' => :'Object', :'contact_id' => :'Integer', - :'deal_ids' => :'Array', + :'deal_id' => :'String', + :'company_id' => :'String', :'size' => :'Integer', - :'created_at' => :'DateTime', - :'updated_at' => :'DateTime' + :'created_at' => :'DateTime' } end @@ -85,14 +70,6 @@ def initialize(attributes = {}) # convert string to symbol for hash key attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v } - if attributes.has_key?(:'url') - self.url = attributes[:'url'] - end - - if attributes.has_key?(:'id') - self.id = attributes[:'id'] - end - if attributes.has_key?(:'name') self.name = attributes[:'name'] end @@ -101,18 +78,16 @@ def initialize(attributes = {}) self.author_id = attributes[:'authorId'] end - if attributes.has_key?(:'author') - self.author = attributes[:'author'] - end - if attributes.has_key?(:'contactId') self.contact_id = attributes[:'contactId'] end - if attributes.has_key?(:'dealIds') - if (value = attributes[:'dealIds']).is_a?(Array) - self.deal_ids = value - end + if attributes.has_key?(:'dealId') + self.deal_id = attributes[:'dealId'] + end + + if attributes.has_key?(:'companyId') + self.company_id = attributes[:'companyId'] end if attributes.has_key?(:'size') @@ -122,10 +97,6 @@ def initialize(attributes = {}) if attributes.has_key?(:'createdAt') self.created_at = attributes[:'createdAt'] end - - if attributes.has_key?(:'updatedAt') - self.updated_at = attributes[:'updatedAt'] - end end # Show invalid properties with the reasons. Usually used together with valid? @@ -146,16 +117,13 @@ def valid? def ==(o) return true if self.equal?(o) self.class == o.class && - url == o.url && - id == o.id && name == o.name && author_id == o.author_id && - author == o.author && contact_id == o.contact_id && - deal_ids == o.deal_ids && + deal_id == o.deal_id && + company_id == o.company_id && size == o.size && - created_at == o.created_at && - updated_at == o.updated_at + created_at == o.created_at end # @see the `==` method @@ -167,7 +135,7 @@ def eql?(o) # Calculates hash code according to all attributes. # @return [Fixnum] Hash code def hash - [url, id, name, author_id, author, contact_id, deal_ids, size, created_at, updated_at].hash + [name, author_id, contact_id, deal_id, company_id, size, created_at].hash end # Builds the object from hash diff --git a/lib/sib-api-v3-sdk/models/file_downloadable_link.rb b/lib/sib-api-v3-sdk/models/file_downloadable_link.rb new file mode 100644 index 0000000..e50c0ce --- /dev/null +++ b/lib/sib-api-v3-sdk/models/file_downloadable_link.rb @@ -0,0 +1,190 @@ +=begin +#SendinBlue API + +#SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | + +OpenAPI spec version: 3.0.0 +Contact: contact@sendinblue.com +Generated by: https://github.com/swagger-api/swagger-codegen.git +Swagger Codegen version: 2.4.19 + +=end + +require 'date' + +module SibApiV3Sdk + class FileDownloadableLink + # A unique link to download the requested file. + attr_accessor :file_url + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'file_url' => :'fileUrl' + } + end + + # Attribute type mapping. + def self.swagger_types + { + :'file_url' => :'String' + } + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + return unless attributes.is_a?(Hash) + + # convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v } + + if attributes.has_key?(:'fileUrl') + self.file_url = attributes[:'fileUrl'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + if @file_url.nil? + invalid_properties.push('invalid value for "file_url", file_url cannot be nil.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + return false if @file_url.nil? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + file_url == o.file_url + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Fixnum] Hash code + def hash + [file_url].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + self.class.swagger_types.each_pair do |key, type| + if type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end # or else data not found in attributes(hash), not an issue as the data can be optional + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :DateTime + DateTime.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :BOOLEAN + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + temp_model = SibApiV3Sdk.const_get(type).new + temp_model.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + next if value.nil? + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + + end +end diff --git a/lib/sib-api-v3-sdk/models/file_list.rb b/lib/sib-api-v3-sdk/models/file_list.rb new file mode 100644 index 0000000..dd85c97 --- /dev/null +++ b/lib/sib-api-v3-sdk/models/file_list.rb @@ -0,0 +1,176 @@ +=begin +#SendinBlue API + +#SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | + +OpenAPI spec version: 3.0.0 +Contact: contact@sendinblue.com +Generated by: https://github.com/swagger-api/swagger-codegen.git +Swagger Codegen version: 2.4.19 + +=end + +require 'date' + +module SibApiV3Sdk + # List of files + class FileList + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + } + end + + # Attribute type mapping. + def self.swagger_types + { + } + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + return unless attributes.is_a?(Hash) + + # convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v } + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Fixnum] Hash code + def hash + [].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + self.class.swagger_types.each_pair do |key, type| + if type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end # or else data not found in attributes(hash), not an issue as the data can be optional + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :DateTime + DateTime.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :BOOLEAN + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + temp_model = SibApiV3Sdk.const_get(type).new + temp_model.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + next if value.nil? + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + + end +end diff --git a/lib/sib-api-v3-sdk/models/get_campaign_stats.rb b/lib/sib-api-v3-sdk/models/get_campaign_stats.rb index 47d4fcb..7fd6660 100644 --- a/lib/sib-api-v3-sdk/models/get_campaign_stats.rb +++ b/lib/sib-api-v3-sdk/models/get_campaign_stats.rb @@ -44,6 +44,12 @@ class GetCampaignStats # Recipients without any privacy protection option enabled in their email client attr_accessor :trackable_views + # Rate of recipients without any privacy protection option enabled in their email client + attr_accessor :trackable_views_rate + + # Rate of recipients without any privacy protection option enabled in their email client, applied to all delivered emails + attr_accessor :estimated_views + # Number of unsubscription for the campaign attr_accessor :unsubscriptions @@ -69,6 +75,8 @@ def self.attribute_map :'hard_bounces' => :'hardBounces', :'unique_views' => :'uniqueViews', :'trackable_views' => :'trackableViews', + :'trackable_views_rate' => :'trackableViewsRate', + :'estimated_views' => :'estimatedViews', :'unsubscriptions' => :'unsubscriptions', :'viewed' => :'viewed', :'deferred' => :'deferred', @@ -89,6 +97,8 @@ def self.swagger_types :'hard_bounces' => :'Integer', :'unique_views' => :'Integer', :'trackable_views' => :'Integer', + :'trackable_views_rate' => :'Float', + :'estimated_views' => :'Integer', :'unsubscriptions' => :'Integer', :'viewed' => :'Integer', :'deferred' => :'Integer', @@ -144,6 +154,14 @@ def initialize(attributes = {}) self.trackable_views = attributes[:'trackableViews'] end + if attributes.has_key?(:'trackableViewsRate') + self.trackable_views_rate = attributes[:'trackableViewsRate'] + end + + if attributes.has_key?(:'estimatedViews') + self.estimated_views = attributes[:'estimatedViews'] + end + if attributes.has_key?(:'unsubscriptions') self.unsubscriptions = attributes[:'unsubscriptions'] end @@ -244,6 +262,8 @@ def ==(o) hard_bounces == o.hard_bounces && unique_views == o.unique_views && trackable_views == o.trackable_views && + trackable_views_rate == o.trackable_views_rate && + estimated_views == o.estimated_views && unsubscriptions == o.unsubscriptions && viewed == o.viewed && deferred == o.deferred && @@ -259,7 +279,7 @@ def eql?(o) # Calculates hash code according to all attributes. # @return [Fixnum] Hash code def hash - [list_id, unique_clicks, clickers, complaints, delivered, sent, soft_bounces, hard_bounces, unique_views, trackable_views, unsubscriptions, viewed, deferred, return_bounce].hash + [list_id, unique_clicks, clickers, complaints, delivered, sent, soft_bounces, hard_bounces, unique_views, trackable_views, trackable_views_rate, estimated_views, unsubscriptions, viewed, deferred, return_bounce].hash end # Builds the object from hash diff --git a/lib/sib-api-v3-sdk/models/get_scheduled_email_by_batch_id.rb b/lib/sib-api-v3-sdk/models/get_scheduled_email_by_batch_id.rb new file mode 100644 index 0000000..3b27d14 --- /dev/null +++ b/lib/sib-api-v3-sdk/models/get_scheduled_email_by_batch_id.rb @@ -0,0 +1,196 @@ +=begin +#SendinBlue API + +#SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | + +OpenAPI spec version: 3.0.0 +Contact: contact@sendinblue.com +Generated by: https://github.com/swagger-api/swagger-codegen.git +Swagger Codegen version: 2.4.19 + +=end + +require 'date' + +module SibApiV3Sdk + class GetScheduledEmailByBatchId + # Total number of batches + attr_accessor :count + + attr_accessor :batches + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'count' => :'count', + :'batches' => :'batches' + } + end + + # Attribute type mapping. + def self.swagger_types + { + :'count' => :'Integer', + :'batches' => :'Array' + } + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + return unless attributes.is_a?(Hash) + + # convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v } + + if attributes.has_key?(:'count') + self.count = attributes[:'count'] + end + + if attributes.has_key?(:'batches') + if (value = attributes[:'batches']).is_a?(Array) + self.batches = value + end + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + count == o.count && + batches == o.batches + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Fixnum] Hash code + def hash + [count, batches].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + self.class.swagger_types.each_pair do |key, type| + if type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end # or else data not found in attributes(hash), not an issue as the data can be optional + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :DateTime + DateTime.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :BOOLEAN + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + temp_model = SibApiV3Sdk.const_get(type).new + temp_model.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + next if value.nil? + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + + end +end diff --git a/lib/sib-api-v3-sdk/models/contact.rb b/lib/sib-api-v3-sdk/models/get_scheduled_email_by_batch_id_batches.rb similarity index 71% rename from lib/sib-api-v3-sdk/models/contact.rb rename to lib/sib-api-v3-sdk/models/get_scheduled_email_by_batch_id_batches.rb index 373736c..c3fa999 100644 --- a/lib/sib-api-v3-sdk/models/contact.rb +++ b/lib/sib-api-v3-sdk/models/get_scheduled_email_by_batch_id_batches.rb @@ -13,57 +13,53 @@ require 'date' module SibApiV3Sdk - # Contact Details - class Contact - # Next incomplete task of contact - attr_accessor :virtual_next_task + class GetScheduledEmailByBatchIdBatches + # Datetime for which the batch was scheduled + attr_accessor :scheduled_at - # Contact email - attr_accessor :email - - # User id to whom contact is assigned - attr_accessor :assign_to_id - - # Contact id - attr_accessor :contacts_id - - # CRM lists in which contact is added - attr_accessor :crm_lists - - # Contact attributes e.g firstname / lastname / SMS etc. - attr_accessor :attributes - - # Contact created date/time + # Datetime on which the batch was scheduled attr_accessor :created_at - # Contact updated date/time - attr_accessor :updated_at + # Current status of the scheduled batch + attr_accessor :status + + class EnumAttributeValidator + attr_reader :datatype + attr_reader :allowable_values + + def initialize(datatype, allowable_values) + @allowable_values = allowable_values.map do |value| + case datatype.to_s + when /Integer/i + value.to_i + when /Float/i + value.to_f + else + value + end + end + end + + def valid?(value) + !value || allowable_values.include?(value) + end + end # Attribute mapping from ruby-style variable name to JSON key. def self.attribute_map { - :'virtual_next_task' => :'virtualNextTask', - :'email' => :'email', - :'assign_to_id' => :'assignToId', - :'contacts_id' => :'contactsId', - :'crm_lists' => :'crmLists', - :'attributes' => :'attributes', + :'scheduled_at' => :'scheduledAt', :'created_at' => :'createdAt', - :'updated_at' => :'updatedAt' + :'status' => :'status' } end # Attribute type mapping. def self.swagger_types { - :'virtual_next_task' => :'Object', - :'email' => :'String', - :'assign_to_id' => :'String', - :'contacts_id' => :'Integer', - :'crm_lists' => :'Object', - :'attributes' => :'Object', + :'scheduled_at' => :'DateTime', :'created_at' => :'DateTime', - :'updated_at' => :'DateTime' + :'status' => :'String' } end @@ -75,36 +71,16 @@ def initialize(attributes = {}) # convert string to symbol for hash key attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v } - if attributes.has_key?(:'virtualNextTask') - self.virtual_next_task = attributes[:'virtualNextTask'] - end - - if attributes.has_key?(:'email') - self.email = attributes[:'email'] - end - - if attributes.has_key?(:'assignToId') - self.assign_to_id = attributes[:'assignToId'] - end - - if attributes.has_key?(:'contactsId') - self.contacts_id = attributes[:'contactsId'] - end - - if attributes.has_key?(:'crmLists') - self.crm_lists = attributes[:'crmLists'] - end - - if attributes.has_key?(:'attributes') - self.attributes = attributes[:'attributes'] + if attributes.has_key?(:'scheduledAt') + self.scheduled_at = attributes[:'scheduledAt'] end if attributes.has_key?(:'createdAt') self.created_at = attributes[:'createdAt'] end - if attributes.has_key?(:'updatedAt') - self.updated_at = attributes[:'updatedAt'] + if attributes.has_key?(:'status') + self.status = attributes[:'status'] end end @@ -112,12 +88,16 @@ def initialize(attributes = {}) # @return Array for valid properties with the reasons def list_invalid_properties invalid_properties = Array.new - if @email.nil? - invalid_properties.push('invalid value for "email", email cannot be nil.') + if @scheduled_at.nil? + invalid_properties.push('invalid value for "scheduled_at", scheduled_at cannot be nil.') + end + + if @created_at.nil? + invalid_properties.push('invalid value for "created_at", created_at cannot be nil.') end - if @crm_lists.nil? - invalid_properties.push('invalid value for "crm_lists", crm_lists cannot be nil.') + if @status.nil? + invalid_properties.push('invalid value for "status", status cannot be nil.') end invalid_properties @@ -126,24 +106,32 @@ def list_invalid_properties # Check to see if the all the properties in the model are valid # @return true if the model is valid def valid? - return false if @email.nil? - return false if @crm_lists.nil? + return false if @scheduled_at.nil? + return false if @created_at.nil? + return false if @status.nil? + status_validator = EnumAttributeValidator.new('String', ['inProgress', 'queued', 'processed', 'error']) + return false unless status_validator.valid?(@status) true end + # Custom attribute writer method checking allowed values (enum). + # @param [Object] status Object to be assigned + def status=(status) + validator = EnumAttributeValidator.new('String', ['inProgress', 'queued', 'processed', 'error']) + unless validator.valid?(status) + fail ArgumentError, 'invalid value for "status", must be one of #{validator.allowable_values}.' + end + @status = status + end + # Checks equality by comparing each attribute. # @param [Object] Object to be compared def ==(o) return true if self.equal?(o) self.class == o.class && - virtual_next_task == o.virtual_next_task && - email == o.email && - assign_to_id == o.assign_to_id && - contacts_id == o.contacts_id && - crm_lists == o.crm_lists && - attributes == o.attributes && + scheduled_at == o.scheduled_at && created_at == o.created_at && - updated_at == o.updated_at + status == o.status end # @see the `==` method @@ -155,7 +143,7 @@ def eql?(o) # Calculates hash code according to all attributes. # @return [Fixnum] Hash code def hash - [virtual_next_task, email, assign_to_id, contacts_id, crm_lists, attributes, created_at, updated_at].hash + [scheduled_at, created_at, status].hash end # Builds the object from hash diff --git a/lib/sib-api-v3-sdk/models/get_scheduled_email_by_message_id.rb b/lib/sib-api-v3-sdk/models/get_scheduled_email_by_message_id.rb new file mode 100644 index 0000000..27ff876 --- /dev/null +++ b/lib/sib-api-v3-sdk/models/get_scheduled_email_by_message_id.rb @@ -0,0 +1,254 @@ +=begin +#SendinBlue API + +#SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | + +OpenAPI spec version: 3.0.0 +Contact: contact@sendinblue.com +Generated by: https://github.com/swagger-api/swagger-codegen.git +Swagger Codegen version: 2.4.19 + +=end + +require 'date' + +module SibApiV3Sdk + class GetScheduledEmailByMessageId + # Datetime for which the email was scheduled + attr_accessor :scheduled_at + + # Datetime on which the email was scheduled + attr_accessor :created_at + + # Current status of the scheduled email + attr_accessor :status + + class EnumAttributeValidator + attr_reader :datatype + attr_reader :allowable_values + + def initialize(datatype, allowable_values) + @allowable_values = allowable_values.map do |value| + case datatype.to_s + when /Integer/i + value.to_i + when /Float/i + value.to_f + else + value + end + end + end + + def valid?(value) + !value || allowable_values.include?(value) + end + end + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'scheduled_at' => :'scheduledAt', + :'created_at' => :'createdAt', + :'status' => :'status' + } + end + + # Attribute type mapping. + def self.swagger_types + { + :'scheduled_at' => :'DateTime', + :'created_at' => :'DateTime', + :'status' => :'String' + } + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + return unless attributes.is_a?(Hash) + + # convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v } + + if attributes.has_key?(:'scheduledAt') + self.scheduled_at = attributes[:'scheduledAt'] + end + + if attributes.has_key?(:'createdAt') + self.created_at = attributes[:'createdAt'] + end + + if attributes.has_key?(:'status') + self.status = attributes[:'status'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + if @scheduled_at.nil? + invalid_properties.push('invalid value for "scheduled_at", scheduled_at cannot be nil.') + end + + if @created_at.nil? + invalid_properties.push('invalid value for "created_at", created_at cannot be nil.') + end + + if @status.nil? + invalid_properties.push('invalid value for "status", status cannot be nil.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + return false if @scheduled_at.nil? + return false if @created_at.nil? + return false if @status.nil? + status_validator = EnumAttributeValidator.new('String', ['inProgress', 'queued', 'processed', 'error']) + return false unless status_validator.valid?(@status) + true + end + + # Custom attribute writer method checking allowed values (enum). + # @param [Object] status Object to be assigned + def status=(status) + validator = EnumAttributeValidator.new('String', ['inProgress', 'queued', 'processed', 'error']) + unless validator.valid?(status) + fail ArgumentError, 'invalid value for "status", must be one of #{validator.allowable_values}.' + end + @status = status + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + scheduled_at == o.scheduled_at && + created_at == o.created_at && + status == o.status + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Fixnum] Hash code + def hash + [scheduled_at, created_at, status].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + self.class.swagger_types.each_pair do |key, type| + if type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end # or else data not found in attributes(hash), not an issue as the data can be optional + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :DateTime + DateTime.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :BOOLEAN + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + temp_model = SibApiV3Sdk.const_get(type).new + temp_model.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + next if value.nil? + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + + end +end diff --git a/lib/sib-api-v3-sdk/models/get_sso_token.rb b/lib/sib-api-v3-sdk/models/get_sso_token.rb index 03d5fe6..3def413 100644 --- a/lib/sib-api-v3-sdk/models/get_sso_token.rb +++ b/lib/sib-api-v3-sdk/models/get_sso_token.rb @@ -14,7 +14,7 @@ module SibApiV3Sdk class GetSsoToken - # Session token. It will remain valid for a short period of time only. + # Session token, it will remain valid for 15 days. attr_accessor :token # Attribute mapping from ruby-style variable name to JSON key. diff --git a/lib/sib-api-v3-sdk/models/inline_response_200.rb b/lib/sib-api-v3-sdk/models/inline_response_200.rb new file mode 100644 index 0000000..22e81de --- /dev/null +++ b/lib/sib-api-v3-sdk/models/inline_response_200.rb @@ -0,0 +1,191 @@ +=begin +#SendinBlue API + +#SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | + +OpenAPI spec version: 3.0.0 +Contact: contact@sendinblue.com +Generated by: https://github.com/swagger-api/swagger-codegen.git +Swagger Codegen version: 2.4.19 + +=end + +require 'date' + +module SibApiV3Sdk + # Created company id + class InlineResponse200 + # Unique company id + attr_accessor :id + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'id' => :'id' + } + end + + # Attribute type mapping. + def self.swagger_types + { + :'id' => :'String' + } + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + return unless attributes.is_a?(Hash) + + # convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v } + + if attributes.has_key?(:'id') + self.id = attributes[:'id'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + if @id.nil? + invalid_properties.push('invalid value for "id", id cannot be nil.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + return false if @id.nil? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + id == o.id + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Fixnum] Hash code + def hash + [id].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + self.class.swagger_types.each_pair do |key, type| + if type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end # or else data not found in attributes(hash), not an issue as the data can be optional + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :DateTime + DateTime.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :BOOLEAN + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + temp_model = SibApiV3Sdk.const_get(type).new + temp_model.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + next if value.nil? + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + + end +end diff --git a/lib/sib-api-v3-sdk/models/inline_response_201.rb b/lib/sib-api-v3-sdk/models/inline_response_201.rb new file mode 100644 index 0000000..7a44615 --- /dev/null +++ b/lib/sib-api-v3-sdk/models/inline_response_201.rb @@ -0,0 +1,191 @@ +=begin +#SendinBlue API + +#SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | + +OpenAPI spec version: 3.0.0 +Contact: contact@sendinblue.com +Generated by: https://github.com/swagger-api/swagger-codegen.git +Swagger Codegen version: 2.4.19 + +=end + +require 'date' + +module SibApiV3Sdk + # Created deal id + class InlineResponse201 + # Unique deal id + attr_accessor :id + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'id' => :'id' + } + end + + # Attribute type mapping. + def self.swagger_types + { + :'id' => :'String' + } + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + return unless attributes.is_a?(Hash) + + # convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v } + + if attributes.has_key?(:'id') + self.id = attributes[:'id'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + if @id.nil? + invalid_properties.push('invalid value for "id", id cannot be nil.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + return false if @id.nil? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + id == o.id + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Fixnum] Hash code + def hash + [id].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + self.class.swagger_types.each_pair do |key, type| + if type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end # or else data not found in attributes(hash), not an issue as the data can be optional + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :DateTime + DateTime.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :BOOLEAN + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + temp_model = SibApiV3Sdk.const_get(type).new + temp_model.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + next if value.nil? + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + + end +end diff --git a/lib/sib-api-v3-sdk/models/inline_response_201_1.rb b/lib/sib-api-v3-sdk/models/inline_response_201_1.rb new file mode 100644 index 0000000..3d3cfb2 --- /dev/null +++ b/lib/sib-api-v3-sdk/models/inline_response_201_1.rb @@ -0,0 +1,191 @@ +=begin +#SendinBlue API + +#SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | + +OpenAPI spec version: 3.0.0 +Contact: contact@sendinblue.com +Generated by: https://github.com/swagger-api/swagger-codegen.git +Swagger Codegen version: 2.4.19 + +=end + +require 'date' + +module SibApiV3Sdk + # Task Details + class InlineResponse2011 + # Unique task id + attr_accessor :id + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'id' => :'id' + } + end + + # Attribute type mapping. + def self.swagger_types + { + :'id' => :'String' + } + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + return unless attributes.is_a?(Hash) + + # convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v } + + if attributes.has_key?(:'id') + self.id = attributes[:'id'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + if @id.nil? + invalid_properties.push('invalid value for "id", id cannot be nil.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + return false if @id.nil? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + id == o.id + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Fixnum] Hash code + def hash + [id].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + self.class.swagger_types.each_pair do |key, type| + if type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end # or else data not found in attributes(hash), not an issue as the data can be optional + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :DateTime + DateTime.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :BOOLEAN + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + temp_model = SibApiV3Sdk.const_get(type).new + temp_model.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + next if value.nil? + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + + end +end diff --git a/lib/sib-api-v3-sdk/models/note_id.rb b/lib/sib-api-v3-sdk/models/note_id.rb new file mode 100644 index 0000000..950d469 --- /dev/null +++ b/lib/sib-api-v3-sdk/models/note_id.rb @@ -0,0 +1,186 @@ +=begin +#SendinBlue API + +#SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | + +OpenAPI spec version: 3.0.0 +Contact: contact@sendinblue.com +Generated by: https://github.com/swagger-api/swagger-codegen.git +Swagger Codegen version: 2.4.19 + +=end + +require 'date' + +module SibApiV3Sdk + # Updated Note ID + class NoteId + # Unique note Id + attr_accessor :id + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'id' => :'id' + } + end + + # Attribute type mapping. + def self.swagger_types + { + :'id' => :'String' + } + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + return unless attributes.is_a?(Hash) + + # convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v } + + if attributes.has_key?(:'id') + self.id = attributes[:'id'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + id == o.id + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Fixnum] Hash code + def hash + [id].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + self.class.swagger_types.each_pair do |key, type| + if type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end # or else data not found in attributes(hash), not an issue as the data can be optional + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :DateTime + DateTime.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :BOOLEAN + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + temp_model = SibApiV3Sdk.const_get(type).new + temp_model.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + next if value.nil? + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + + end +end diff --git a/lib/sib-api-v3-sdk/models/note_list.rb b/lib/sib-api-v3-sdk/models/note_list.rb new file mode 100644 index 0000000..eca7da3 --- /dev/null +++ b/lib/sib-api-v3-sdk/models/note_list.rb @@ -0,0 +1,176 @@ +=begin +#SendinBlue API + +#SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | + +OpenAPI spec version: 3.0.0 +Contact: contact@sendinblue.com +Generated by: https://github.com/swagger-api/swagger-codegen.git +Swagger Codegen version: 2.4.19 + +=end + +require 'date' + +module SibApiV3Sdk + # List of notes + class NoteList + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + } + end + + # Attribute type mapping. + def self.swagger_types + { + } + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + return unless attributes.is_a?(Hash) + + # convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v } + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Fixnum] Hash code + def hash + [].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + self.class.swagger_types.each_pair do |key, type| + if type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end # or else data not found in attributes(hash), not an issue as the data can be optional + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :DateTime + DateTime.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :BOOLEAN + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + temp_model = SibApiV3Sdk.const_get(type).new + temp_model.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + next if value.nil? + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + + end +end diff --git a/lib/sib-api-v3-sdk/models/pipeline.rb b/lib/sib-api-v3-sdk/models/pipeline.rb new file mode 100644 index 0000000..5912a46 --- /dev/null +++ b/lib/sib-api-v3-sdk/models/pipeline.rb @@ -0,0 +1,188 @@ +=begin +#SendinBlue API + +#SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | + +OpenAPI spec version: 3.0.0 +Contact: contact@sendinblue.com +Generated by: https://github.com/swagger-api/swagger-codegen.git +Swagger Codegen version: 2.4.19 + +=end + +require 'date' + +module SibApiV3Sdk + # List of stages + class Pipeline + # List of stages + attr_accessor :stages + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'stages' => :'stages' + } + end + + # Attribute type mapping. + def self.swagger_types + { + :'stages' => :'Array' + } + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + return unless attributes.is_a?(Hash) + + # convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v } + + if attributes.has_key?(:'stages') + if (value = attributes[:'stages']).is_a?(Array) + self.stages = value + end + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + stages == o.stages + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Fixnum] Hash code + def hash + [stages].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + self.class.swagger_types.each_pair do |key, type| + if type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end # or else data not found in attributes(hash), not an issue as the data can be optional + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :DateTime + DateTime.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :BOOLEAN + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + temp_model = SibApiV3Sdk.const_get(type).new + temp_model.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + next if value.nil? + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + + end +end diff --git a/lib/sib-api-v3-sdk/models/pipeline_stage.rb b/lib/sib-api-v3-sdk/models/pipeline_stage.rb new file mode 100644 index 0000000..a35736e --- /dev/null +++ b/lib/sib-api-v3-sdk/models/pipeline_stage.rb @@ -0,0 +1,196 @@ +=begin +#SendinBlue API + +#SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | + +OpenAPI spec version: 3.0.0 +Contact: contact@sendinblue.com +Generated by: https://github.com/swagger-api/swagger-codegen.git +Swagger Codegen version: 2.4.19 + +=end + +require 'date' + +module SibApiV3Sdk + # List of stages + class PipelineStage + # Stage id + attr_accessor :id + + # Stage name + attr_accessor :name + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'id' => :'id', + :'name' => :'name' + } + end + + # Attribute type mapping. + def self.swagger_types + { + :'id' => :'String', + :'name' => :'String' + } + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + return unless attributes.is_a?(Hash) + + # convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v } + + if attributes.has_key?(:'id') + self.id = attributes[:'id'] + end + + if attributes.has_key?(:'name') + self.name = attributes[:'name'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + id == o.id && + name == o.name + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Fixnum] Hash code + def hash + [id, name].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + self.class.swagger_types.each_pair do |key, type| + if type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end # or else data not found in attributes(hash), not an issue as the data can be optional + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :DateTime + DateTime.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :BOOLEAN + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + temp_model = SibApiV3Sdk.const_get(type).new + temp_model.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + next if value.nil? + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + + end +end diff --git a/lib/sib-api-v3-sdk/models/schedule_smtp_email.rb b/lib/sib-api-v3-sdk/models/schedule_smtp_email.rb new file mode 100644 index 0000000..75f4c50 --- /dev/null +++ b/lib/sib-api-v3-sdk/models/schedule_smtp_email.rb @@ -0,0 +1,206 @@ +=begin +#SendinBlue API + +#SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | + +OpenAPI spec version: 3.0.0 +Contact: contact@sendinblue.com +Generated by: https://github.com/swagger-api/swagger-codegen.git +Swagger Codegen version: 2.4.19 + +=end + +require 'date' + +module SibApiV3Sdk + class ScheduleSmtpEmail + # Message ID of the transactional email scheduled + attr_accessor :message_id + + attr_accessor :message_ids + + # Batch ID of the batch transactional email scheduled + attr_accessor :batch_id + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'message_id' => :'messageId', + :'message_ids' => :'messageIds', + :'batch_id' => :'batchId' + } + end + + # Attribute type mapping. + def self.swagger_types + { + :'message_id' => :'String', + :'message_ids' => :'Array', + :'batch_id' => :'String' + } + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + return unless attributes.is_a?(Hash) + + # convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v } + + if attributes.has_key?(:'messageId') + self.message_id = attributes[:'messageId'] + end + + if attributes.has_key?(:'messageIds') + if (value = attributes[:'messageIds']).is_a?(Array) + self.message_ids = value + end + end + + if attributes.has_key?(:'batchId') + self.batch_id = attributes[:'batchId'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + message_id == o.message_id && + message_ids == o.message_ids && + batch_id == o.batch_id + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Fixnum] Hash code + def hash + [message_id, message_ids, batch_id].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + self.class.swagger_types.each_pair do |key, type| + if type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end # or else data not found in attributes(hash), not an issue as the data can be optional + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :DateTime + DateTime.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :BOOLEAN + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + temp_model = SibApiV3Sdk.const_get(type).new + temp_model.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + next if value.nil? + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + + end +end diff --git a/lib/sib-api-v3-sdk/models/send_smtp_email.rb b/lib/sib-api-v3-sdk/models/send_smtp_email.rb index 84fda9d..3c83109 100644 --- a/lib/sib-api-v3-sdk/models/send_smtp_email.rb +++ b/lib/sib-api-v3-sdk/models/send_smtp_email.rb @@ -54,6 +54,12 @@ class SendSmtpEmail # Tag your emails to find them more easily attr_accessor :tags + # UTC date-time on which the email has to schedule (YYYY-MM-DDTHH:mm:ss.SSSZ). Prefer to pass your timezone in date-time format for scheduling. There can be an expected delay of +5 minutes in scheduled email delivery. **Please note this feature is currently a public beta**. + attr_accessor :scheduled_at + + # Valid UUIDv4 batch id to identify the scheduled batches transactional email. If not passed we will create a valid UUIDv4 batch id at our end. + attr_accessor :batch_id + # Attribute mapping from ruby-style variable name to JSON key. def self.attribute_map { @@ -70,7 +76,9 @@ def self.attribute_map :'template_id' => :'templateId', :'params' => :'params', :'message_versions' => :'messageVersions', - :'tags' => :'tags' + :'tags' => :'tags', + :'scheduled_at' => :'scheduledAt', + :'batch_id' => :'batchId' } end @@ -90,7 +98,9 @@ def self.swagger_types :'template_id' => :'Integer', :'params' => :'Object', :'message_versions' => :'Array', - :'tags' => :'Array' + :'tags' => :'Array', + :'scheduled_at' => :'DateTime', + :'batch_id' => :'String' } end @@ -169,6 +179,14 @@ def initialize(attributes = {}) self.tags = value end end + + if attributes.has_key?(:'scheduledAt') + self.scheduled_at = attributes[:'scheduledAt'] + end + + if attributes.has_key?(:'batchId') + self.batch_id = attributes[:'batchId'] + end end # Show invalid properties with the reasons. Usually used together with valid? @@ -202,7 +220,9 @@ def ==(o) template_id == o.template_id && params == o.params && message_versions == o.message_versions && - tags == o.tags + tags == o.tags && + scheduled_at == o.scheduled_at && + batch_id == o.batch_id end # @see the `==` method @@ -214,7 +234,7 @@ def eql?(o) # Calculates hash code according to all attributes. # @return [Fixnum] Hash code def hash - [sender, to, bcc, cc, html_content, text_content, subject, reply_to, attachment, headers, template_id, params, message_versions, tags].hash + [sender, to, bcc, cc, html_content, text_content, subject, reply_to, attachment, headers, template_id, params, message_versions, tags, scheduled_at, batch_id].hash end # Builds the object from hash diff --git a/lib/sib-api-v3-sdk/models/sub_account_details_response_plan_info_credits.rb b/lib/sib-api-v3-sdk/models/sub_account_details_response_plan_info_credits.rb index 9490666..eb1c1e4 100644 --- a/lib/sib-api-v3-sdk/models/sub_account_details_response_plan_info_credits.rb +++ b/lib/sib-api-v3-sdk/models/sub_account_details_response_plan_info_credits.rb @@ -13,9 +13,9 @@ require 'date' module SibApiV3Sdk - # Sub-account messaging quota details + # Credits quota and remaining credits on the sub-account class SubAccountDetailsResponsePlanInfoCredits - # Sms quota of the sub-account + # SMS credits remaining on the sub-account attr_accessor :sms attr_accessor :emails diff --git a/lib/sib-api-v3-sdk/models/sub_account_details_response_plan_info_credits_emails.rb b/lib/sib-api-v3-sdk/models/sub_account_details_response_plan_info_credits_emails.rb index 975c890..70546cb 100644 --- a/lib/sib-api-v3-sdk/models/sub_account_details_response_plan_info_credits_emails.rb +++ b/lib/sib-api-v3-sdk/models/sub_account_details_response_plan_info_credits_emails.rb @@ -13,7 +13,7 @@ require 'date' module SibApiV3Sdk - # Email quota details of the sub-account + # Email credits remaining on the sub-account class SubAccountDetailsResponsePlanInfoCreditsEmails # Quantity of email messaging limits provided attr_accessor :quantity diff --git a/lib/sib-api-v3-sdk/models/sub_account_details_response_plan_info_features.rb b/lib/sib-api-v3-sdk/models/sub_account_details_response_plan_info_features.rb index 0587eaa..261deda 100644 --- a/lib/sib-api-v3-sdk/models/sub_account_details_response_plan_info_features.rb +++ b/lib/sib-api-v3-sdk/models/sub_account_details_response_plan_info_features.rb @@ -13,7 +13,7 @@ require 'date' module SibApiV3Sdk - # Sub-account features and addons quota details + # Features available on the sub-account class SubAccountDetailsResponsePlanInfoFeatures attr_accessor :inbox diff --git a/lib/sib-api-v3-sdk/models/sub_accounts_response_sub_accounts.rb b/lib/sib-api-v3-sdk/models/sub_accounts_response_sub_accounts.rb index 2af9ab3..771232a 100644 --- a/lib/sib-api-v3-sdk/models/sub_accounts_response_sub_accounts.rb +++ b/lib/sib-api-v3-sdk/models/sub_accounts_response_sub_accounts.rb @@ -14,16 +14,16 @@ module SibApiV3Sdk class SubAccountsResponseSubAccounts - # client id of sub-account organization + # id of the sub-account attr_accessor :id - # Name of sub-account organization + # Name of the sub-account company attr_accessor :company_name - # Whether organization is active or not + # Whether the sub-account is active or not attr_accessor :active - # timestamp when the organization was created + # Timestamp when the sub-account was created attr_accessor :created_at # Attribute mapping from ruby-style variable name to JSON key. diff --git a/lib/sib-api-v3-sdk/models/task.rb b/lib/sib-api-v3-sdk/models/task.rb index e02a113..d578c40 100644 --- a/lib/sib-api-v3-sdk/models/task.rb +++ b/lib/sib-api-v3-sdk/models/task.rb @@ -15,8 +15,6 @@ module SibApiV3Sdk # Task Details class Task - attr_accessor :first_contact - # Unique task id attr_accessor :id @@ -29,84 +27,33 @@ class Task # Contact ids for contacts linked to this task attr_accessor :contacts_ids - # Contact details for contacts linked to this task - attr_accessor :contacts - # Deal ids for deals a task is linked to attr_accessor :deals_ids # Companies ids for companies a task is linked to attr_accessor :companies_ids - # User id to whom task is assigned - attr_accessor :assign_to_id - - # Task date/time - attr_accessor :date - - # Duration of task - attr_accessor :duration - - # Notes added to a task - attr_accessor :notes - - # Task marked as done - attr_accessor :done - - # Task reminder date/time for a task - attr_accessor :reminder - - # Task created date/time - attr_accessor :created_at - - # Task update date/time - attr_accessor :updated_at - - attr_accessor :refs - # Attribute mapping from ruby-style variable name to JSON key. def self.attribute_map { - :'first_contact' => :'firstContact', :'id' => :'id', :'task_type_id' => :'taskTypeId', :'name' => :'name', :'contacts_ids' => :'contactsIds', - :'contacts' => :'contacts', :'deals_ids' => :'dealsIds', - :'companies_ids' => :'companiesIds', - :'assign_to_id' => :'assignToId', - :'date' => :'date', - :'duration' => :'duration', - :'notes' => :'notes', - :'done' => :'done', - :'reminder' => :'reminder', - :'created_at' => :'createdAt', - :'updated_at' => :'updatedAt', - :'refs' => :'refs' + :'companies_ids' => :'companiesIds' } end # Attribute type mapping. def self.swagger_types { - :'first_contact' => :'Contact', :'id' => :'String', :'task_type_id' => :'String', :'name' => :'String', :'contacts_ids' => :'Array', - :'contacts' => :'Array', :'deals_ids' => :'Array', - :'companies_ids' => :'Array', - :'assign_to_id' => :'String', - :'date' => :'DateTime', - :'duration' => :'Integer', - :'notes' => :'String', - :'done' => :'BOOLEAN', - :'reminder' => :'TaskReminder', - :'created_at' => :'DateTime', - :'updated_at' => :'DateTime', - :'refs' => :'Object' + :'companies_ids' => :'Array' } end @@ -118,10 +65,6 @@ def initialize(attributes = {}) # convert string to symbol for hash key attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v } - if attributes.has_key?(:'firstContact') - self.first_contact = attributes[:'firstContact'] - end - if attributes.has_key?(:'id') self.id = attributes[:'id'] end @@ -140,12 +83,6 @@ def initialize(attributes = {}) end end - if attributes.has_key?(:'contacts') - if (value = attributes[:'contacts']).is_a?(Array) - self.contacts = value - end - end - if attributes.has_key?(:'dealsIds') if (value = attributes[:'dealsIds']).is_a?(Array) self.deals_ids = value @@ -157,42 +94,6 @@ def initialize(attributes = {}) self.companies_ids = value end end - - if attributes.has_key?(:'assignToId') - self.assign_to_id = attributes[:'assignToId'] - end - - if attributes.has_key?(:'date') - self.date = attributes[:'date'] - end - - if attributes.has_key?(:'duration') - self.duration = attributes[:'duration'] - end - - if attributes.has_key?(:'notes') - self.notes = attributes[:'notes'] - end - - if attributes.has_key?(:'done') - self.done = attributes[:'done'] - end - - if attributes.has_key?(:'reminder') - self.reminder = attributes[:'reminder'] - end - - if attributes.has_key?(:'createdAt') - self.created_at = attributes[:'createdAt'] - end - - if attributes.has_key?(:'updatedAt') - self.updated_at = attributes[:'updatedAt'] - end - - if attributes.has_key?(:'refs') - self.refs = attributes[:'refs'] - end end # Show invalid properties with the reasons. Usually used together with valid? @@ -207,10 +108,6 @@ def list_invalid_properties invalid_properties.push('invalid value for "name", name cannot be nil.') end - if @date.nil? - invalid_properties.push('invalid value for "date", date cannot be nil.') - end - invalid_properties end @@ -219,7 +116,6 @@ def list_invalid_properties def valid? return false if @task_type_id.nil? return false if @name.nil? - return false if @date.nil? true end @@ -228,23 +124,12 @@ def valid? def ==(o) return true if self.equal?(o) self.class == o.class && - first_contact == o.first_contact && id == o.id && task_type_id == o.task_type_id && name == o.name && contacts_ids == o.contacts_ids && - contacts == o.contacts && deals_ids == o.deals_ids && - companies_ids == o.companies_ids && - assign_to_id == o.assign_to_id && - date == o.date && - duration == o.duration && - notes == o.notes && - done == o.done && - reminder == o.reminder && - created_at == o.created_at && - updated_at == o.updated_at && - refs == o.refs + companies_ids == o.companies_ids end # @see the `==` method @@ -256,7 +141,7 @@ def eql?(o) # Calculates hash code according to all attributes. # @return [Fixnum] Hash code def hash - [first_contact, id, task_type_id, name, contacts_ids, contacts, deals_ids, companies_ids, assign_to_id, date, duration, notes, done, reminder, created_at, updated_at, refs].hash + [id, task_type_id, name, contacts_ids, deals_ids, companies_ids].hash end # Builds the object from hash diff --git a/lib/sib-api-v3-sdk/models/task_list.rb b/lib/sib-api-v3-sdk/models/task_list.rb new file mode 100644 index 0000000..1da4e4c --- /dev/null +++ b/lib/sib-api-v3-sdk/models/task_list.rb @@ -0,0 +1,188 @@ +=begin +#SendinBlue API + +#SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | + +OpenAPI spec version: 3.0.0 +Contact: contact@sendinblue.com +Generated by: https://github.com/swagger-api/swagger-codegen.git +Swagger Codegen version: 2.4.19 + +=end + +require 'date' + +module SibApiV3Sdk + # List of tasks + class TaskList + # List of tasks + attr_accessor :items + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'items' => :'items' + } + end + + # Attribute type mapping. + def self.swagger_types + { + :'items' => :'Array' + } + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + return unless attributes.is_a?(Hash) + + # convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v } + + if attributes.has_key?(:'items') + if (value = attributes[:'items']).is_a?(Array) + self.items = value + end + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + items == o.items + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Fixnum] Hash code + def hash + [items].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + self.class.swagger_types.each_pair do |key, type| + if type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end # or else data not found in attributes(hash), not an issue as the data can be optional + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :DateTime + DateTime.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :BOOLEAN + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + temp_model = SibApiV3Sdk.const_get(type).new + temp_model.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + next if value.nil? + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + + end +end diff --git a/lib/sib-api-v3-sdk/models/task_reminder.rb b/lib/sib-api-v3-sdk/models/task_reminder.rb index 21d68c2..c9e8431 100644 --- a/lib/sib-api-v3-sdk/models/task_reminder.rb +++ b/lib/sib-api-v3-sdk/models/task_reminder.rb @@ -21,7 +21,7 @@ class TaskReminder # Unit of time before reminder is to be sent attr_accessor :unit - # Type of task reminder + # Type of task reminder e.g email, push attr_accessor :types class EnumAttributeValidator diff --git a/lib/sib-api-v3-sdk/models/task_types.rb b/lib/sib-api-v3-sdk/models/task_types.rb index 86b0004..a603d20 100644 --- a/lib/sib-api-v3-sdk/models/task_types.rb +++ b/lib/sib-api-v3-sdk/models/task_types.rb @@ -18,9 +18,6 @@ class TaskTypes # Id of task type attr_accessor :id - # Icon of task type - attr_accessor :icon - # Title of task type attr_accessor :title @@ -28,7 +25,6 @@ class TaskTypes def self.attribute_map { :'id' => :'id', - :'icon' => :'icon', :'title' => :'title' } end @@ -37,7 +33,6 @@ def self.attribute_map def self.swagger_types { :'id' => :'String', - :'icon' => :'String', :'title' => :'String' } end @@ -54,10 +49,6 @@ def initialize(attributes = {}) self.id = attributes[:'id'] end - if attributes.has_key?(:'icon') - self.icon = attributes[:'icon'] - end - if attributes.has_key?(:'title') self.title = attributes[:'title'] end @@ -82,7 +73,6 @@ def ==(o) return true if self.equal?(o) self.class == o.class && id == o.id && - icon == o.icon && title == o.title end @@ -95,7 +85,7 @@ def eql?(o) # Calculates hash code according to all attributes. # @return [Fixnum] Hash code def hash - [id, icon, title].hash + [id, title].hash end # Builds the object from hash diff --git a/lib/sib-api-v3-sdk/models/update_contact.rb b/lib/sib-api-v3-sdk/models/update_contact.rb index cdcc6eb..df62530 100644 --- a/lib/sib-api-v3-sdk/models/update_contact.rb +++ b/lib/sib-api-v3-sdk/models/update_contact.rb @@ -14,7 +14,7 @@ module SibApiV3Sdk class UpdateContact - # Pass the set of attributes to be updated. These attributes must be present in your account. To update existing email address of a contact with the new one please pass EMAIL in attribtes. For example, `{ \"EMAIL\":\"newemail@domain.com\", \"FNAME\":\"Ellie\", \"LNAME\":\"Roger\"}`. Keep in mind transactional attributes can be updated the same way as normal attributes. Mobile Number in \"SMS\" field should be passed with proper country code. For example {\"SMS\":\"+91xxxxxxxxxx\"} or {\"SMS\":\"0091xxxxxxxxxx\"} + # Pass the set of attributes to be updated. These attributes must be present in your account. To update existing email address of a contact with the new one please pass EMAIL in attributes. For example, `{ \"EMAIL\":\"newemail@domain.com\", \"FNAME\":\"Ellie\", \"LNAME\":\"Roger\"}`. The attribute's parameter should be passed in capital letter while updating a contact. Keep in mind transactional attributes can be updated the same way as normal attributes. Mobile Number in \"SMS\" field should be passed with proper country code. For example {\"SMS\":\"+91xxxxxxxxxx\"} or {\"SMS\":\"0091xxxxxxxxxx\"} attr_accessor :attributes # Set/unset this field to blacklist/allow the contact for emails (emailBlacklisted = true) diff --git a/lib/sib-api-v3-sdk/models/update_email_campaign.rb b/lib/sib-api-v3-sdk/models/update_email_campaign.rb index 5331611..a6d2eb7 100644 --- a/lib/sib-api-v3-sdk/models/update_email_campaign.rb +++ b/lib/sib-api-v3-sdk/models/update_email_campaign.rb @@ -22,7 +22,7 @@ class UpdateEmailCampaign # Name of the campaign attr_accessor :name - # Body of the message (HTML version). REQUIRED if htmlUrl is empty + # Body of the message (HTML version). If the campaign is designed using Drag & Drop editor via HTML content, then the design page will not have Drag & Drop editor access for that campaign. REQUIRED if htmlUrl is empty attr_accessor :html_content # Url which contents the body of the email message. REQUIRED if htmlContent is empty diff --git a/lib/sib-api-v3-sdk/models/update_smtp_template.rb b/lib/sib-api-v3-sdk/models/update_smtp_template.rb index 638cc54..75726ec 100644 --- a/lib/sib-api-v3-sdk/models/update_smtp_template.rb +++ b/lib/sib-api-v3-sdk/models/update_smtp_template.rb @@ -22,7 +22,7 @@ class UpdateSmtpTemplate # Name of the template attr_accessor :template_name - # Required if htmlUrl is empty. Body of the message (HTML must have more than 10 characters) + # Required if htmlUrl is empty. If the template is designed using Drag & Drop editor via HTML content, then the design page will not have Drag & Drop editor access for that template. Body of the message (HTML must have more than 10 characters) attr_accessor :html_content # Required if htmlContent is empty. URL to the body of the email (HTML) diff --git a/lib/sib-api-v3-sdk/models/upload_image_model.rb b/lib/sib-api-v3-sdk/models/upload_image_model.rb new file mode 100644 index 0000000..e0a59eb --- /dev/null +++ b/lib/sib-api-v3-sdk/models/upload_image_model.rb @@ -0,0 +1,190 @@ +=begin +#SendinBlue API + +#SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | + +OpenAPI spec version: 3.0.0 +Contact: contact@sendinblue.com +Generated by: https://github.com/swagger-api/swagger-codegen.git +Swagger Codegen version: 2.4.19 + +=end + +require 'date' + +module SibApiV3Sdk + class UploadImageModel + # URL of the image uploaded + attr_accessor :url + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'url' => :'url' + } + end + + # Attribute type mapping. + def self.swagger_types + { + :'url' => :'String' + } + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + return unless attributes.is_a?(Hash) + + # convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v } + + if attributes.has_key?(:'url') + self.url = attributes[:'url'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + if @url.nil? + invalid_properties.push('invalid value for "url", url cannot be nil.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + return false if @url.nil? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + url == o.url + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Fixnum] Hash code + def hash + [url].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + self.class.swagger_types.each_pair do |key, type| + if type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end # or else data not found in attributes(hash), not an issue as the data can be optional + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :DateTime + DateTime.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :BOOLEAN + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + temp_model = SibApiV3Sdk.const_get(type).new + temp_model.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + next if value.nil? + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + + end +end diff --git a/lib/sib-api-v3-sdk/version.rb b/lib/sib-api-v3-sdk/version.rb index b9235be..3affc93 100644 --- a/lib/sib-api-v3-sdk/version.rb +++ b/lib/sib-api-v3-sdk/version.rb @@ -11,5 +11,5 @@ =end module SibApiV3Sdk - VERSION = "8.1.0" + VERSION = "8.2.0" end diff --git a/spec/api/companies_api_spec.rb b/spec/api/companies_api_spec.rb new file mode 100644 index 0000000..2fd25e4 --- /dev/null +++ b/spec/api/companies_api_spec.rb @@ -0,0 +1,119 @@ +=begin +#SendinBlue API + +#SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | + +OpenAPI spec version: 3.0.0 +Contact: contact@sendinblue.com +Generated by: https://github.com/swagger-api/swagger-codegen.git +Swagger Codegen version: 2.4.19 + +=end + +require 'spec_helper' +require 'json' + +# Unit tests for SibApiV3Sdk::CompaniesApi +# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) +# Please update as you see appropriate +describe 'CompaniesApi' do + before do + # run before each test + @instance = SibApiV3Sdk::CompaniesApi.new + end + + after do + # run after each test + end + + describe 'test an instance of CompaniesApi' do + it 'should create an instance of CompaniesApi' do + expect(@instance).to be_instance_of(SibApiV3Sdk::CompaniesApi) + end + end + + # unit tests for companies_attributes_get + # Get company attributes + # @param [Hash] opts the optional parameters + # @return [CompanyAttributes] + describe 'companies_attributes_get test' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + # unit tests for companies_get + # Get all companies + # @param [Hash] opts the optional parameters + # @option opts [String] :filters Filter by attrbutes. If you have filter for owner on your side please send it as {\"attributes.owner\":\"5b1a17d914b73d35a76ca0c7\"} + # @option opts [Integer] :linked_contacts_ids Filter by linked contacts ids + # @option opts [String] :linked_deals_ids Filter by linked deals ids + # @option opts [Integer] :page Index of the first document of the page + # @option opts [Integer] :limit Number of documents per page + # @option opts [String] :sort Sort the results in the ascending/descending order. Default order is **descending** by creation if `sort` is not passed + # @option opts [String] :sort_by The field used to sort field names. + # @return [CompaniesList] + describe 'companies_get test' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + # unit tests for companies_id_delete + # Delete a company + # @param id + # @param [Hash] opts the optional parameters + # @return [nil] + describe 'companies_id_delete test' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + # unit tests for companies_id_get + # Get a company + # @param id + # @param [Hash] opts the optional parameters + # @return [Company] + describe 'companies_id_get test' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + # unit tests for companies_id_patch + # Update a company + # @param id + # @param body Updated company details. + # @param [Hash] opts the optional parameters + # @return [Company] + describe 'companies_id_patch test' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + # unit tests for companies_link_unlink_id_patch + # Link and Unlink company with contacts and deals + # @param id + # @param body Linked / Unlinked contacts and deals ids. + # @param [Hash] opts the optional parameters + # @return [nil] + describe 'companies_link_unlink_id_patch test' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + # unit tests for companies_post + # Create a company + # @param body Company create data. + # @param [Hash] opts the optional parameters + # @return [InlineResponse200] + describe 'companies_post test' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + +end diff --git a/spec/api/contacts_api_spec.rb b/spec/api/contacts_api_spec.rb index c3489aa..1cac6f8 100644 --- a/spec/api/contacts_api_spec.rb +++ b/spec/api/contacts_api_spec.rb @@ -161,6 +161,8 @@ # Along with the contact details, this endpoint will show the statistics of contact for the recent 90 days by default. To fetch the earlier statistics, please use Get contact campaign stats (https://developers.sendinblue.com/reference/contacts-7#getcontactstats) endpoint with the appropriate date ranges. # @param identifier Email (urlencoded) OR ID of the contact OR its SMS attribute value # @param [Hash] opts the optional parameters + # @option opts [Object] :start_date **Mandatory if endDate is used.** Starting date (YYYY-MM-DD) of the statistic events specific to campaigns. Must be lower than equal to endDate + # @option opts [Object] :end_date **Mandatory if startDate is used.** Ending date (YYYY-MM-DD) of the statistic events specific to campaigns. Must be greater than equal to startDate. # @return [GetExtendedContactDetails] describe 'get_contact_info test' do it 'should work' do diff --git a/spec/api/conversations_api_spec.rb b/spec/api/conversations_api_spec.rb new file mode 100644 index 0000000..b0ff13f --- /dev/null +++ b/spec/api/conversations_api_spec.rb @@ -0,0 +1,140 @@ +=begin +#SendinBlue API + +#SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | + +OpenAPI spec version: 3.0.0 +Contact: contact@sendinblue.com +Generated by: https://github.com/swagger-api/swagger-codegen.git +Swagger Codegen version: 2.4.19 + +=end + +require 'spec_helper' +require 'json' + +# Unit tests for SibApiV3Sdk::ConversationsApi +# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) +# Please update as you see appropriate +describe 'ConversationsApi' do + before do + # run before each test + @instance = SibApiV3Sdk::ConversationsApi.new + end + + after do + # run after each test + end + + describe 'test an instance of ConversationsApi' do + it 'should create an instance of ConversationsApi' do + expect(@instance).to be_instance_of(SibApiV3Sdk::ConversationsApi) + end + end + + # unit tests for conversations_agent_online_ping_post + # Sets agent’s status to online for 2-3 minutes + # We recommend pinging this endpoint every minute for as long as the agent has to be considered online. + # @param body Agent fields. + # @param [Hash] opts the optional parameters + # @return [nil] + describe 'conversations_agent_online_ping_post test' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + # unit tests for conversations_messages_id_delete + # Delete a message sent by an agent + # Only agents’ messages can be deleted. + # @param id ID of the message + # @param [Hash] opts the optional parameters + # @return [nil] + describe 'conversations_messages_id_delete test' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + # unit tests for conversations_messages_id_get + # Get a message + # @param id ID of the message + # @param [Hash] opts the optional parameters + # @return [ConversationsMessage] + describe 'conversations_messages_id_get test' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + # unit tests for conversations_messages_id_put + # Update a message sent by an agent + # Only agents’ messages can be edited. + # @param id ID of the message + # @param [Hash] opts the optional parameters + # @option opts [Body9] :body + # @return [ConversationsMessage] + describe 'conversations_messages_id_put test' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + # unit tests for conversations_messages_post + # Send a message as an agent + # @param body Message fields. + # @param [Hash] opts the optional parameters + # @return [ConversationsMessage] + describe 'conversations_messages_post test' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + # unit tests for conversations_pushed_messages_id_delete + # Delete an automated message + # @param id ID of the message + # @param [Hash] opts the optional parameters + # @return [nil] + describe 'conversations_pushed_messages_id_delete test' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + # unit tests for conversations_pushed_messages_id_get + # Get an automated message + # @param id ID of the message sent previously + # @param [Hash] opts the optional parameters + # @return [ConversationsMessage] + describe 'conversations_pushed_messages_id_get test' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + # unit tests for conversations_pushed_messages_id_put + # Update an automated message + # @param id ID of the message + # @param body + # @param [Hash] opts the optional parameters + # @return [ConversationsMessage] + describe 'conversations_pushed_messages_id_put test' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + # unit tests for conversations_pushed_messages_post + # Send an automated message to a visitor + # Example of automated messages: order status, announce new features in your web app, etc. + # @param body + # @param [Hash] opts the optional parameters + # @return [ConversationsMessage] + describe 'conversations_pushed_messages_post test' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + +end diff --git a/spec/api/deals_api_spec.rb b/spec/api/deals_api_spec.rb new file mode 100644 index 0000000..caec5d1 --- /dev/null +++ b/spec/api/deals_api_spec.rb @@ -0,0 +1,129 @@ +=begin +#SendinBlue API + +#SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | + +OpenAPI spec version: 3.0.0 +Contact: contact@sendinblue.com +Generated by: https://github.com/swagger-api/swagger-codegen.git +Swagger Codegen version: 2.4.19 + +=end + +require 'spec_helper' +require 'json' + +# Unit tests for SibApiV3Sdk::DealsApi +# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) +# Please update as you see appropriate +describe 'DealsApi' do + before do + # run before each test + @instance = SibApiV3Sdk::DealsApi.new + end + + after do + # run after each test + end + + describe 'test an instance of DealsApi' do + it 'should create an instance of DealsApi' do + expect(@instance).to be_instance_of(SibApiV3Sdk::DealsApi) + end + end + + # unit tests for crm_attributes_deals_get + # Get deal attributes + # @param [Hash] opts the optional parameters + # @return [DealAttributes] + describe 'crm_attributes_deals_get test' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + # unit tests for crm_deals_get + # Get all deals + # @param [Hash] opts the optional parameters + # @option opts [String] :filter_attributes Filter by attrbutes. If you have filter for owner on your side please send it as `attributes.owner`.\" + # @option opts [String] :filter_linked_companies_ids Filter by linked companies ids + # @option opts [String] :filter_linked_contacts_ids Filter by linked companies ids + # @option opts [Integer] :offset Index of the first document of the page + # @option opts [Integer] :limit Number of documents per page + # @option opts [String] :sort Sort the results in the ascending/descending order. Default order is **descending** by creation if `sort` is not passed + # @option opts [String] :sort_by The field used to sort field names. + # @return [DealsList] + describe 'crm_deals_get test' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + # unit tests for crm_deals_id_delete + # Delete a deal + # @param id + # @param [Hash] opts the optional parameters + # @return [nil] + describe 'crm_deals_id_delete test' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + # unit tests for crm_deals_id_get + # Get a deal + # @param id + # @param [Hash] opts the optional parameters + # @return [Deal] + describe 'crm_deals_id_get test' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + # unit tests for crm_deals_id_patch + # Update a deal + # @param id + # @param body Updated deal details. + # @param [Hash] opts the optional parameters + # @return [nil] + describe 'crm_deals_id_patch test' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + # unit tests for crm_deals_link_unlink_id_patch + # Link and Unlink a deal with contacts and companies + # @param id + # @param body Linked / Unlinked contacts and companies ids. + # @param [Hash] opts the optional parameters + # @return [nil] + describe 'crm_deals_link_unlink_id_patch test' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + # unit tests for crm_deals_post + # Create a deal + # @param body Deal create data. + # @param [Hash] opts the optional parameters + # @return [InlineResponse201] + describe 'crm_deals_post test' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + # unit tests for crm_pipeline_details_get + # Get pipeline stages + # @param [Hash] opts the optional parameters + # @return [Pipeline] + describe 'crm_pipeline_details_get test' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + +end diff --git a/spec/api/email_campaigns_api_spec.rb b/spec/api/email_campaigns_api_spec.rb index a9d43bf..3411c66 100644 --- a/spec/api/email_campaigns_api_spec.rb +++ b/spec/api/email_campaigns_api_spec.rb @@ -182,7 +182,7 @@ # Upload an image to your account's image gallery # @param upload_image Parameters to upload an image # @param [Hash] opts the optional parameters - # @return [nil] + # @return [UploadImageModel] describe 'upload_image_to_gallery test' do it 'should work' do # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers diff --git a/spec/api/files_api_spec.rb b/spec/api/files_api_spec.rb new file mode 100644 index 0000000..e2e3523 --- /dev/null +++ b/spec/api/files_api_spec.rb @@ -0,0 +1,99 @@ +=begin +#SendinBlue API + +#SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | + +OpenAPI spec version: 3.0.0 +Contact: contact@sendinblue.com +Generated by: https://github.com/swagger-api/swagger-codegen.git +Swagger Codegen version: 2.4.19 + +=end + +require 'spec_helper' +require 'json' + +# Unit tests for SibApiV3Sdk::FilesApi +# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) +# Please update as you see appropriate +describe 'FilesApi' do + before do + # run before each test + @instance = SibApiV3Sdk::FilesApi.new + end + + after do + # run after each test + end + + describe 'test an instance of FilesApi' do + it 'should create an instance of FilesApi' do + expect(@instance).to be_instance_of(SibApiV3Sdk::FilesApi) + end + end + + # unit tests for crm_files_get + # Get all files + # @param [Hash] opts the optional parameters + # @option opts [String] :entity Filter by file entity type + # @option opts [String] :entity_ids Filter by file entity IDs + # @option opts [Integer] :date_from dateFrom to date range filter type (timestamp in milliseconds) + # @option opts [Integer] :date_to dateTo to date range filter type (timestamp in milliseconds) + # @option opts [Integer] :offset Index of the first document of the page + # @option opts [Integer] :limit Number of documents per page + # @option opts [String] :sort Sort the results in the ascending/descending order. Default order is **descending** by creation if `sort` is not passed + # @return [FileList] + describe 'crm_files_get test' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + # unit tests for crm_files_id_data_get + # Get file details + # @param id File id to get file data. + # @param [Hash] opts the optional parameters + # @return [FileData] + describe 'crm_files_id_data_get test' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + # unit tests for crm_files_id_delete + # Delete a file + # @param id File id to delete. + # @param [Hash] opts the optional parameters + # @return [nil] + describe 'crm_files_id_delete test' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + # unit tests for crm_files_id_get + # Download a file + # @param id File id to download. + # @param [Hash] opts the optional parameters + # @return [FileDownloadableLink] + describe 'crm_files_id_get test' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + # unit tests for crm_files_post + # Upload a file + # @param file File data to create a file. + # @param [Hash] opts the optional parameters + # @option opts [String] :deal_id Deal id linked to a file + # @option opts [Integer] :contact_id Contact id linked to a file + # @option opts [String] :company_id Company id linked to a file + # @return [FileData] + describe 'crm_files_post test' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + +end diff --git a/spec/api/inbound_parsing_api_spec.rb b/spec/api/inbound_parsing_api_spec.rb index 9f9fdea..e0355f2 100644 --- a/spec/api/inbound_parsing_api_spec.rb +++ b/spec/api/inbound_parsing_api_spec.rb @@ -32,6 +32,18 @@ end end + # unit tests for get_inbound_email_attachment + # Retrieve inbound attachment with download token. + # This endpoint will retrieve inbound attachment with download token. + # @param download_token Token to fetch a particular attachment + # @param [Hash] opts the optional parameters + # @return [File] + describe 'get_inbound_email_attachment test' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + # unit tests for get_inbound_email_events # Get the list of all the events for the received emails. # This endpoint will show the list of all the events for the received emails. diff --git a/spec/api/master_account_api_spec.rb b/spec/api/master_account_api_spec.rb index f3be164..8a01d35 100644 --- a/spec/api/master_account_api_spec.rb +++ b/spec/api/master_account_api_spec.rb @@ -46,7 +46,7 @@ # unit tests for corporate_sub_account_get # Get the list of all the sub-accounts of the master account. # This endpoint will provide the list all the sub-accounts of the master account. - # @param offset Page number of sub-accounts listing + # @param offset Index of the first sub-account in the page # @param limit Number of sub-accounts to be displayed on each page # @param [Hash] opts the optional parameters # @return [SubAccountsResponse] @@ -69,7 +69,7 @@ # unit tests for corporate_sub_account_id_get # Get sub-account details - # This endpoint will provide the details of specified sub-account organization + # This endpoint will provide the details for the specified sub-account company # @param id Id of the sub-account organization # @param [Hash] opts the optional parameters # @return [SubAccountDetailsResponse] @@ -97,7 +97,7 @@ # This endpoint will create a new sub-account under a master account # @param sub_account_create values to create new sub-account # @param [Hash] opts the optional parameters - # @return [CreateModel] + # @return [CreateSubAccountResponse] describe 'corporate_sub_account_post test' do it 'should work' do # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers @@ -106,7 +106,7 @@ # unit tests for corporate_sub_account_sso_token_post # Generate SSO token to access Sendinblue - # This endpoint generates an sso token to authenticate and access a sub-account of the master using the account endpoint https://app.sendinblue.com/account/login/sub-account/sso/[token], where [token] will be replaced with actual token. + # This endpoint generates an sso token to authenticate and access a sub-account of the master using the account endpoint https://app.sendinblue.com/account/login/sub-account/sso/[token], where [token] will be replaced by the actual token. # @param sso_token_request Values to generate SSO token for sub-account # @param [Hash] opts the optional parameters # @return [GetSsoToken] diff --git a/spec/api/notes_api_spec.rb b/spec/api/notes_api_spec.rb new file mode 100644 index 0000000..1bbfb96 --- /dev/null +++ b/spec/api/notes_api_spec.rb @@ -0,0 +1,97 @@ +=begin +#SendinBlue API + +#SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | + +OpenAPI spec version: 3.0.0 +Contact: contact@sendinblue.com +Generated by: https://github.com/swagger-api/swagger-codegen.git +Swagger Codegen version: 2.4.19 + +=end + +require 'spec_helper' +require 'json' + +# Unit tests for SibApiV3Sdk::NotesApi +# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) +# Please update as you see appropriate +describe 'NotesApi' do + before do + # run before each test + @instance = SibApiV3Sdk::NotesApi.new + end + + after do + # run after each test + end + + describe 'test an instance of NotesApi' do + it 'should create an instance of NotesApi' do + expect(@instance).to be_instance_of(SibApiV3Sdk::NotesApi) + end + end + + # unit tests for crm_notes_get + # Get all notes + # @param [Hash] opts the optional parameters + # @option opts [String] :entity Filter by note entity type + # @option opts [String] :entity_ids Filter by note entity IDs + # @option opts [Integer] :date_from dateFrom to date range filter type (timestamp in milliseconds) + # @option opts [Integer] :date_to dateTo to date range filter type (timestamp in milliseconds) + # @option opts [Integer] :offset Index of the first document of the page + # @option opts [Integer] :limit Number of documents per page + # @option opts [String] :sort Sort the results in the ascending/descending order. Default order is **descending** by creation if `sort` is not passed + # @return [NoteList] + describe 'crm_notes_get test' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + # unit tests for crm_notes_id_delete + # Delete a note + # @param id Note ID to delete + # @param [Hash] opts the optional parameters + # @return [nil] + describe 'crm_notes_id_delete test' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + # unit tests for crm_notes_id_get + # Get a note + # @param id Note ID to get + # @param [Hash] opts the optional parameters + # @return [Note] + describe 'crm_notes_id_get test' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + # unit tests for crm_notes_id_patch + # Update a note + # @param id Note ID to update + # @param body Note data to update a note + # @param [Hash] opts the optional parameters + # @return [nil] + describe 'crm_notes_id_patch test' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + # unit tests for crm_notes_post + # Create a note + # @param body Note data to create a note. + # @param [Hash] opts the optional parameters + # @return [NoteId] + describe 'crm_notes_post test' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + +end diff --git a/spec/api/crm_api_spec.rb b/spec/api/tasks_api_spec.rb similarity index 51% rename from spec/api/crm_api_spec.rb rename to spec/api/tasks_api_spec.rb index a80bb8c..13163c2 100644 --- a/spec/api/crm_api_spec.rb +++ b/spec/api/tasks_api_spec.rb @@ -13,110 +13,43 @@ require 'spec_helper' require 'json' -# Unit tests for SibApiV3Sdk::CRMApi +# Unit tests for SibApiV3Sdk::TasksApi # Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) # Please update as you see appropriate -describe 'CRMApi' do +describe 'TasksApi' do before do # run before each test - @instance = SibApiV3Sdk::CRMApi.new + @instance = SibApiV3Sdk::TasksApi.new end after do # run after each test end - describe 'test an instance of CRMApi' do - it 'should create an instance of CRMApi' do - expect(@instance).to be_instance_of(SibApiV3Sdk::CRMApi) + describe 'test an instance of TasksApi' do + it 'should create an instance of TasksApi' do + expect(@instance).to be_instance_of(SibApiV3Sdk::TasksApi) end end - # unit tests for crm_files_id_data_get - # Get file details - # @param id File id to get file data. + # unit tests for crm_tasks_get + # Get all tasks # @param [Hash] opts the optional parameters - # @return [FileData] - describe 'crm_files_id_data_get test' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - # unit tests for crm_files_id_delete - # Delete a file - # @param id File id to delete. - # @param [Hash] opts the optional parameters - # @return [nil] - describe 'crm_files_id_delete test' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - # unit tests for crm_files_id_get - # Download a file - # @param id File id to download. - # @param [Hash] opts the optional parameters - # @return [nil] - describe 'crm_files_id_get test' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - # unit tests for crm_files_post - # Upload a file - # @param file File data to create a file. - # @param [Hash] opts the optional parameters - # @option opts [Array] :deals_ids Deal ids linked to a file - # @return [FileData] - describe 'crm_files_post test' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - # unit tests for crm_notes_id_delete - # Delete a note - # @param id Note ID to delete - # @param [Hash] opts the optional parameters - # @return [nil] - describe 'crm_notes_id_delete test' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - # unit tests for crm_notes_id_get - # Get a note - # @param id Note ID to get - # @param [Hash] opts the optional parameters - # @return [Note] - describe 'crm_notes_id_get test' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - # unit tests for crm_notes_id_patch - # Update a note - # @param id Note ID to update - # @param body Note data to update a note - # @param [Hash] opts the optional parameters - # @return [Note] - describe 'crm_notes_id_patch test' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - # unit tests for crm_notes_post - # Create a note - # @param body Note data to create a note. - # @param [Hash] opts the optional parameters - # @return [Note] - describe 'crm_notes_post test' do + # @option opts [String] :filter_type Filter by task type (ID) + # @option opts [String] :filter_status Filter by task status + # @option opts [String] :filter_date Filter by date + # @option opts [String] :filter_assign_to Filter by assignTo id + # @option opts [String] :filter_contacts Filter by contact ids + # @option opts [String] :filter_deals Filter by deals ids + # @option opts [String] :filter_companies Filter by companies ids + # @option opts [Integer] :date_from dateFrom to date range filter type (timestamp in milliseconds) + # @option opts [Integer] :date_to dateTo to date range filter type (timestamp in milliseconds) + # @option opts [Integer] :offset Index of the first document of the page + # @option opts [Integer] :limit Number of documents per page + # @option opts [String] :sort Sort the results in the ascending/descending order. Default order is **descending** by creation if `sort` is not passed + # @option opts [String] :sort_by The field used to sort field names. + # @return [TaskList] + describe 'crm_tasks_get test' do it 'should work' do # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers end @@ -149,7 +82,7 @@ # @param id # @param body Updated task details. # @param [Hash] opts the optional parameters - # @return [Task] + # @return [nil] describe 'crm_tasks_id_patch test' do it 'should work' do # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers @@ -160,7 +93,7 @@ # Create a task # @param body Task name. # @param [Hash] opts the optional parameters - # @return [Task] + # @return [InlineResponse2011] describe 'crm_tasks_post test' do it 'should work' do # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers diff --git a/spec/api/transactional_emails_api_spec.rb b/spec/api/transactional_emails_api_spec.rb index b181719..972edb3 100644 --- a/spec/api/transactional_emails_api_spec.rb +++ b/spec/api/transactional_emails_api_spec.rb @@ -79,6 +79,18 @@ end end + # unit tests for delete_scheduled_email_by_id + # Delete scheduled emails by batchId or messageId + # Delete scheduled batch of emails by batchId or single scheduled email by messageId + # @param identifier The `batchId` of scheduled emails batch (Should be a valid UUIDv4) or the `messageId` of scheduled email. + # @param [Hash] opts the optional parameters + # @return [nil] + describe 'delete_scheduled_email_by_id test' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + # unit tests for delete_smtp_template # Delete an inactive email template # @param template_id id of the template @@ -138,6 +150,38 @@ end end + # unit tests for get_scheduled_email_by_batch_id + # Fetch scheduled emails by batchId + # Fetch scheduled batch of emails by batchId (Can retrieve data upto 30 days old) + # @param batch_id The batchId of scheduled emails batch (Should be a valid UUIDv4) + # @param [Hash] opts the optional parameters + # @option opts [Date] :start_date Mandatory if `endDate` is used. Starting date (YYYY-MM-DD) from which you want to fetch the list. Can be maximum 30 days older tha current date. + # @option opts [Date] :end_date Mandatory if `startDate` is used. Ending date (YYYY-MM-DD) till which you want to fetch the list. Maximum time period that can be selected is one month. + # @option opts [String] :sort Sort the results in the ascending/descending order of record creation. Default order is **descending** if `sort` is not passed + # @option opts [String] :status Filter the records by `status` of the scheduled email batch or message. + # @option opts [Integer] :limit Number of documents returned per page + # @option opts [Integer] :offset Index of the first document on the page + # @return [GetScheduledEmailByBatchId] + describe 'get_scheduled_email_by_batch_id test' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + # unit tests for get_scheduled_email_by_message_id + # Fetch scheduled email by messageId + # Fetch scheduled email by messageId (Can retrieve data upto 30 days old) + # @param message_id The messageId of scheduled email + # @param [Hash] opts the optional parameters + # @option opts [Date] :start_date Mandatory if endDate is used. Starting date (YYYY-MM-DD) from which you want to fetch the list. Can be maximum 30 days older tha current date. + # @option opts [Date] :end_date Mandatory if startDate is used. Ending date (YYYY-MM-DD) till which you want to fetch the list. Maximum time period that can be selected is one month. + # @return [GetScheduledEmailByMessageId] + describe 'get_scheduled_email_by_message_id test' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + # unit tests for get_smtp_report # Get your transactional email activity aggregated per day # @param [Hash] opts the optional parameters diff --git a/spec/models/body_10_spec.rb b/spec/models/body_10_spec.rb new file mode 100644 index 0000000..971d5ca --- /dev/null +++ b/spec/models/body_10_spec.rb @@ -0,0 +1,59 @@ +=begin +#SendinBlue API + +#SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | + +OpenAPI spec version: 3.0.0 +Contact: contact@sendinblue.com +Generated by: https://github.com/swagger-api/swagger-codegen.git +Swagger Codegen version: 2.4.19 + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for SibApiV3Sdk::Body10 +# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) +# Please update as you see appropriate +describe 'Body10' do + before do + # run before each test + @instance = SibApiV3Sdk::Body10.new + end + + after do + # run after each test + end + + describe 'test an instance of Body10' do + it 'should create an instance of Body10' do + expect(@instance).to be_instance_of(SibApiV3Sdk::Body10) + end + end + describe 'test attribute "visitor_id"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "text"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "agent_id"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "group_id"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + +end diff --git a/spec/models/body_11_spec.rb b/spec/models/body_11_spec.rb new file mode 100644 index 0000000..f974ce6 --- /dev/null +++ b/spec/models/body_11_spec.rb @@ -0,0 +1,41 @@ +=begin +#SendinBlue API + +#SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | + +OpenAPI spec version: 3.0.0 +Contact: contact@sendinblue.com +Generated by: https://github.com/swagger-api/swagger-codegen.git +Swagger Codegen version: 2.4.19 + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for SibApiV3Sdk::Body11 +# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) +# Please update as you see appropriate +describe 'Body11' do + before do + # run before each test + @instance = SibApiV3Sdk::Body11.new + end + + after do + # run after each test + end + + describe 'test an instance of Body11' do + it 'should create an instance of Body11' do + expect(@instance).to be_instance_of(SibApiV3Sdk::Body11) + end + end + describe 'test attribute "text"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + +end diff --git a/spec/models/body_12_spec.rb b/spec/models/body_12_spec.rb new file mode 100644 index 0000000..23d01c4 --- /dev/null +++ b/spec/models/body_12_spec.rb @@ -0,0 +1,59 @@ +=begin +#SendinBlue API + +#SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | + +OpenAPI spec version: 3.0.0 +Contact: contact@sendinblue.com +Generated by: https://github.com/swagger-api/swagger-codegen.git +Swagger Codegen version: 2.4.19 + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for SibApiV3Sdk::Body12 +# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) +# Please update as you see appropriate +describe 'Body12' do + before do + # run before each test + @instance = SibApiV3Sdk::Body12.new + end + + after do + # run after each test + end + + describe 'test an instance of Body12' do + it 'should create an instance of Body12' do + expect(@instance).to be_instance_of(SibApiV3Sdk::Body12) + end + end + describe 'test attribute "agent_id"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "received_from"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "agent_email"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "agent_name"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + +end diff --git a/spec/models/body_1_spec.rb b/spec/models/body_1_spec.rb index 166f4e5..9808458 100644 --- a/spec/models/body_1_spec.rb +++ b/spec/models/body_1_spec.rb @@ -38,61 +38,7 @@ end end - describe 'test attribute "duration"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "task_type_id"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "date"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "notes"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "done"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "assign_to_id"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "contacts_ids"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "deals_ids"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "companies_ids"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "reminder"' do + describe 'test attribute "attributes"' do it 'should work' do # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers end diff --git a/spec/models/body_2_spec.rb b/spec/models/body_2_spec.rb new file mode 100644 index 0000000..029304e --- /dev/null +++ b/spec/models/body_2_spec.rb @@ -0,0 +1,59 @@ +=begin +#SendinBlue API + +#SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | + +OpenAPI spec version: 3.0.0 +Contact: contact@sendinblue.com +Generated by: https://github.com/swagger-api/swagger-codegen.git +Swagger Codegen version: 2.4.19 + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for SibApiV3Sdk::Body2 +# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) +# Please update as you see appropriate +describe 'Body2' do + before do + # run before each test + @instance = SibApiV3Sdk::Body2.new + end + + after do + # run after each test + end + + describe 'test an instance of Body2' do + it 'should create an instance of Body2' do + expect(@instance).to be_instance_of(SibApiV3Sdk::Body2) + end + end + describe 'test attribute "link_contact_ids"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "unlink_contact_ids"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "link_deals_ids"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "unlink_deals_ids"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + +end diff --git a/spec/models/body_3_spec.rb b/spec/models/body_3_spec.rb new file mode 100644 index 0000000..58339e5 --- /dev/null +++ b/spec/models/body_3_spec.rb @@ -0,0 +1,47 @@ +=begin +#SendinBlue API + +#SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | + +OpenAPI spec version: 3.0.0 +Contact: contact@sendinblue.com +Generated by: https://github.com/swagger-api/swagger-codegen.git +Swagger Codegen version: 2.4.19 + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for SibApiV3Sdk::Body3 +# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) +# Please update as you see appropriate +describe 'Body3' do + before do + # run before each test + @instance = SibApiV3Sdk::Body3.new + end + + after do + # run after each test + end + + describe 'test an instance of Body3' do + it 'should create an instance of Body3' do + expect(@instance).to be_instance_of(SibApiV3Sdk::Body3) + end + end + describe 'test attribute "name"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "attributes"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + +end diff --git a/spec/models/body_4_spec.rb b/spec/models/body_4_spec.rb new file mode 100644 index 0000000..1118e2e --- /dev/null +++ b/spec/models/body_4_spec.rb @@ -0,0 +1,47 @@ +=begin +#SendinBlue API + +#SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | + +OpenAPI spec version: 3.0.0 +Contact: contact@sendinblue.com +Generated by: https://github.com/swagger-api/swagger-codegen.git +Swagger Codegen version: 2.4.19 + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for SibApiV3Sdk::Body4 +# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) +# Please update as you see appropriate +describe 'Body4' do + before do + # run before each test + @instance = SibApiV3Sdk::Body4.new + end + + after do + # run after each test + end + + describe 'test an instance of Body4' do + it 'should create an instance of Body4' do + expect(@instance).to be_instance_of(SibApiV3Sdk::Body4) + end + end + describe 'test attribute "name"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "attributes"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + +end diff --git a/spec/models/body_5_spec.rb b/spec/models/body_5_spec.rb new file mode 100644 index 0000000..32399dc --- /dev/null +++ b/spec/models/body_5_spec.rb @@ -0,0 +1,59 @@ +=begin +#SendinBlue API + +#SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | + +OpenAPI spec version: 3.0.0 +Contact: contact@sendinblue.com +Generated by: https://github.com/swagger-api/swagger-codegen.git +Swagger Codegen version: 2.4.19 + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for SibApiV3Sdk::Body5 +# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) +# Please update as you see appropriate +describe 'Body5' do + before do + # run before each test + @instance = SibApiV3Sdk::Body5.new + end + + after do + # run after each test + end + + describe 'test an instance of Body5' do + it 'should create an instance of Body5' do + expect(@instance).to be_instance_of(SibApiV3Sdk::Body5) + end + end + describe 'test attribute "link_contact_ids"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "unlink_contact_ids"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "link_company_ids"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "unlink_company_ids"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + +end diff --git a/spec/models/body_6_spec.rb b/spec/models/body_6_spec.rb new file mode 100644 index 0000000..f19fbc2 --- /dev/null +++ b/spec/models/body_6_spec.rb @@ -0,0 +1,101 @@ +=begin +#SendinBlue API + +#SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | + +OpenAPI spec version: 3.0.0 +Contact: contact@sendinblue.com +Generated by: https://github.com/swagger-api/swagger-codegen.git +Swagger Codegen version: 2.4.19 + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for SibApiV3Sdk::Body6 +# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) +# Please update as you see appropriate +describe 'Body6' do + before do + # run before each test + @instance = SibApiV3Sdk::Body6.new + end + + after do + # run after each test + end + + describe 'test an instance of Body6' do + it 'should create an instance of Body6' do + expect(@instance).to be_instance_of(SibApiV3Sdk::Body6) + end + end + describe 'test attribute "name"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "duration"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "task_type_id"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "date"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "notes"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "done"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "assign_to_id"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "contacts_ids"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "deals_ids"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "companies_ids"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "reminder"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + +end diff --git a/spec/models/contact_spec.rb b/spec/models/body_7_spec.rb similarity index 73% rename from spec/models/contact_spec.rb rename to spec/models/body_7_spec.rb index 40f1ecc..dd43632 100644 --- a/spec/models/contact_spec.rb +++ b/spec/models/body_7_spec.rb @@ -14,67 +14,79 @@ require 'json' require 'date' -# Unit tests for SibApiV3Sdk::Contact +# Unit tests for SibApiV3Sdk::Body7 # Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) # Please update as you see appropriate -describe 'Contact' do +describe 'Body7' do before do # run before each test - @instance = SibApiV3Sdk::Contact.new + @instance = SibApiV3Sdk::Body7.new end after do # run after each test end - describe 'test an instance of Contact' do - it 'should create an instance of Contact' do - expect(@instance).to be_instance_of(SibApiV3Sdk::Contact) + describe 'test an instance of Body7' do + it 'should create an instance of Body7' do + expect(@instance).to be_instance_of(SibApiV3Sdk::Body7) end end - describe 'test attribute "virtual_next_task"' do + describe 'test attribute "name"' do it 'should work' do # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers end end - describe 'test attribute "email"' do + describe 'test attribute "duration"' do it 'should work' do # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers end end - describe 'test attribute "assign_to_id"' do + describe 'test attribute "task_type_id"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "date"' do it 'should work' do # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers end end - describe 'test attribute "contacts_id"' do + describe 'test attribute "notes"' do it 'should work' do # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers end end - describe 'test attribute "crm_lists"' do + describe 'test attribute "done"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "assign_to_id"' do it 'should work' do # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers end end - describe 'test attribute "attributes"' do + describe 'test attribute "contacts_ids"' do it 'should work' do # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers end end - describe 'test attribute "created_at"' do + describe 'test attribute "deals_ids"' do it 'should work' do # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers end end - describe 'test attribute "updated_at"' do + describe 'test attribute "companies_ids"' do it 'should work' do # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers end diff --git a/spec/models/body_8_spec.rb b/spec/models/body_8_spec.rb new file mode 100644 index 0000000..d6cb120 --- /dev/null +++ b/spec/models/body_8_spec.rb @@ -0,0 +1,71 @@ +=begin +#SendinBlue API + +#SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | + +OpenAPI spec version: 3.0.0 +Contact: contact@sendinblue.com +Generated by: https://github.com/swagger-api/swagger-codegen.git +Swagger Codegen version: 2.4.19 + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for SibApiV3Sdk::Body8 +# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) +# Please update as you see appropriate +describe 'Body8' do + before do + # run before each test + @instance = SibApiV3Sdk::Body8.new + end + + after do + # run after each test + end + + describe 'test an instance of Body8' do + it 'should create an instance of Body8' do + expect(@instance).to be_instance_of(SibApiV3Sdk::Body8) + end + end + describe 'test attribute "visitor_id"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "text"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "agent_id"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "received_from"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "agent_email"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "agent_name"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + +end diff --git a/spec/models/body_9_spec.rb b/spec/models/body_9_spec.rb new file mode 100644 index 0000000..fdae01f --- /dev/null +++ b/spec/models/body_9_spec.rb @@ -0,0 +1,41 @@ +=begin +#SendinBlue API + +#SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | + +OpenAPI spec version: 3.0.0 +Contact: contact@sendinblue.com +Generated by: https://github.com/swagger-api/swagger-codegen.git +Swagger Codegen version: 2.4.19 + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for SibApiV3Sdk::Body9 +# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) +# Please update as you see appropriate +describe 'Body9' do + before do + # run before each test + @instance = SibApiV3Sdk::Body9.new + end + + after do + # run after each test + end + + describe 'test an instance of Body9' do + it 'should create an instance of Body9' do + expect(@instance).to be_instance_of(SibApiV3Sdk::Body9) + end + end + describe 'test attribute "text"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + +end diff --git a/spec/models/body_spec.rb b/spec/models/body_spec.rb index 6fe65ef..defd0d0 100644 --- a/spec/models/body_spec.rb +++ b/spec/models/body_spec.rb @@ -38,61 +38,7 @@ end end - describe 'test attribute "duration"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "task_type_id"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "date"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "notes"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "done"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "assign_to_id"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "contacts_ids"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "deals_ids"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "companies_ids"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "reminder"' do + describe 'test attribute "attributes"' do it 'should work' do # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers end diff --git a/spec/models/companies_list_spec.rb b/spec/models/companies_list_spec.rb new file mode 100644 index 0000000..0594a99 --- /dev/null +++ b/spec/models/companies_list_spec.rb @@ -0,0 +1,41 @@ +=begin +#SendinBlue API + +#SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | + +OpenAPI spec version: 3.0.0 +Contact: contact@sendinblue.com +Generated by: https://github.com/swagger-api/swagger-codegen.git +Swagger Codegen version: 2.4.19 + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for SibApiV3Sdk::CompaniesList +# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) +# Please update as you see appropriate +describe 'CompaniesList' do + before do + # run before each test + @instance = SibApiV3Sdk::CompaniesList.new + end + + after do + # run after each test + end + + describe 'test an instance of CompaniesList' do + it 'should create an instance of CompaniesList' do + expect(@instance).to be_instance_of(SibApiV3Sdk::CompaniesList) + end + end + describe 'test attribute "items"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + +end diff --git a/spec/models/company_attributes_inner_spec.rb b/spec/models/company_attributes_inner_spec.rb new file mode 100644 index 0000000..464ddc2 --- /dev/null +++ b/spec/models/company_attributes_inner_spec.rb @@ -0,0 +1,65 @@ +=begin +#SendinBlue API + +#SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | + +OpenAPI spec version: 3.0.0 +Contact: contact@sendinblue.com +Generated by: https://github.com/swagger-api/swagger-codegen.git +Swagger Codegen version: 2.4.19 + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for SibApiV3Sdk::CompanyAttributesInner +# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) +# Please update as you see appropriate +describe 'CompanyAttributesInner' do + before do + # run before each test + @instance = SibApiV3Sdk::CompanyAttributesInner.new + end + + after do + # run after each test + end + + describe 'test an instance of CompanyAttributesInner' do + it 'should create an instance of CompanyAttributesInner' do + expect(@instance).to be_instance_of(SibApiV3Sdk::CompanyAttributesInner) + end + end + describe 'test attribute "internal_name"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "label"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "attribute_type_name"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "attribute_options"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "is_required"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + +end diff --git a/spec/models/company_attributes_spec.rb b/spec/models/company_attributes_spec.rb new file mode 100644 index 0000000..82ddeda --- /dev/null +++ b/spec/models/company_attributes_spec.rb @@ -0,0 +1,35 @@ +=begin +#SendinBlue API + +#SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | + +OpenAPI spec version: 3.0.0 +Contact: contact@sendinblue.com +Generated by: https://github.com/swagger-api/swagger-codegen.git +Swagger Codegen version: 2.4.19 + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for SibApiV3Sdk::CompanyAttributes +# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) +# Please update as you see appropriate +describe 'CompanyAttributes' do + before do + # run before each test + @instance = SibApiV3Sdk::CompanyAttributes.new + end + + after do + # run after each test + end + + describe 'test an instance of CompanyAttributes' do + it 'should create an instance of CompanyAttributes' do + expect(@instance).to be_instance_of(SibApiV3Sdk::CompanyAttributes) + end + end +end diff --git a/spec/models/company_spec.rb b/spec/models/company_spec.rb new file mode 100644 index 0000000..2ff64e7 --- /dev/null +++ b/spec/models/company_spec.rb @@ -0,0 +1,59 @@ +=begin +#SendinBlue API + +#SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | + +OpenAPI spec version: 3.0.0 +Contact: contact@sendinblue.com +Generated by: https://github.com/swagger-api/swagger-codegen.git +Swagger Codegen version: 2.4.19 + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for SibApiV3Sdk::Company +# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) +# Please update as you see appropriate +describe 'Company' do + before do + # run before each test + @instance = SibApiV3Sdk::Company.new + end + + after do + # run after each test + end + + describe 'test an instance of Company' do + it 'should create an instance of Company' do + expect(@instance).to be_instance_of(SibApiV3Sdk::Company) + end + end + describe 'test attribute "id"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "attributes"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "linked_contacts_ids"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "linked_deals_ids"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + +end diff --git a/spec/models/conversations_message_file_image_info_spec.rb b/spec/models/conversations_message_file_image_info_spec.rb new file mode 100644 index 0000000..dfc5f25 --- /dev/null +++ b/spec/models/conversations_message_file_image_info_spec.rb @@ -0,0 +1,53 @@ +=begin +#SendinBlue API + +#SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | + +OpenAPI spec version: 3.0.0 +Contact: contact@sendinblue.com +Generated by: https://github.com/swagger-api/swagger-codegen.git +Swagger Codegen version: 2.4.19 + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for SibApiV3Sdk::ConversationsMessageFileImageInfo +# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) +# Please update as you see appropriate +describe 'ConversationsMessageFileImageInfo' do + before do + # run before each test + @instance = SibApiV3Sdk::ConversationsMessageFileImageInfo.new + end + + after do + # run after each test + end + + describe 'test an instance of ConversationsMessageFileImageInfo' do + it 'should create an instance of ConversationsMessageFileImageInfo' do + expect(@instance).to be_instance_of(SibApiV3Sdk::ConversationsMessageFileImageInfo) + end + end + describe 'test attribute "width"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "height"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "preview_url"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + +end diff --git a/spec/models/conversations_message_file_spec.rb b/spec/models/conversations_message_file_spec.rb new file mode 100644 index 0000000..14e6f5a --- /dev/null +++ b/spec/models/conversations_message_file_spec.rb @@ -0,0 +1,65 @@ +=begin +#SendinBlue API + +#SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | + +OpenAPI spec version: 3.0.0 +Contact: contact@sendinblue.com +Generated by: https://github.com/swagger-api/swagger-codegen.git +Swagger Codegen version: 2.4.19 + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for SibApiV3Sdk::ConversationsMessageFile +# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) +# Please update as you see appropriate +describe 'ConversationsMessageFile' do + before do + # run before each test + @instance = SibApiV3Sdk::ConversationsMessageFile.new + end + + after do + # run after each test + end + + describe 'test an instance of ConversationsMessageFile' do + it 'should create an instance of ConversationsMessageFile' do + expect(@instance).to be_instance_of(SibApiV3Sdk::ConversationsMessageFile) + end + end + describe 'test attribute "filename"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "size"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "is_image"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "url"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "image_info"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + +end diff --git a/spec/models/conversations_message_spec.rb b/spec/models/conversations_message_spec.rb new file mode 100644 index 0000000..8a83cf9 --- /dev/null +++ b/spec/models/conversations_message_spec.rb @@ -0,0 +1,99 @@ +=begin +#SendinBlue API + +#SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | + +OpenAPI spec version: 3.0.0 +Contact: contact@sendinblue.com +Generated by: https://github.com/swagger-api/swagger-codegen.git +Swagger Codegen version: 2.4.19 + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for SibApiV3Sdk::ConversationsMessage +# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) +# Please update as you see appropriate +describe 'ConversationsMessage' do + before do + # run before each test + @instance = SibApiV3Sdk::ConversationsMessage.new + end + + after do + # run after each test + end + + describe 'test an instance of ConversationsMessage' do + it 'should create an instance of ConversationsMessage' do + expect(@instance).to be_instance_of(SibApiV3Sdk::ConversationsMessage) + end + end + describe 'test attribute "id"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "type"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + # validator = Petstore::EnumTest::EnumAttributeValidator.new('String', ["agent", "visitor"]) + # validator.allowable_values.each do |value| + # expect { @instance.type = value }.not_to raise_error + # end + end + end + + describe 'test attribute "text"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "visitor_id"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "agent_id"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "agent_name"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "created_at"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "is_pushed"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "received_from"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "file"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + +end diff --git a/spec/models/create_sub_account_response_spec.rb b/spec/models/create_sub_account_response_spec.rb new file mode 100644 index 0000000..c83fc02 --- /dev/null +++ b/spec/models/create_sub_account_response_spec.rb @@ -0,0 +1,41 @@ +=begin +#SendinBlue API + +#SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | + +OpenAPI spec version: 3.0.0 +Contact: contact@sendinblue.com +Generated by: https://github.com/swagger-api/swagger-codegen.git +Swagger Codegen version: 2.4.19 + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for SibApiV3Sdk::CreateSubAccountResponse +# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) +# Please update as you see appropriate +describe 'CreateSubAccountResponse' do + before do + # run before each test + @instance = SibApiV3Sdk::CreateSubAccountResponse.new + end + + after do + # run after each test + end + + describe 'test an instance of CreateSubAccountResponse' do + it 'should create an instance of CreateSubAccountResponse' do + expect(@instance).to be_instance_of(SibApiV3Sdk::CreateSubAccountResponse) + end + end + describe 'test attribute "id"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + +end diff --git a/spec/models/deal_attributes_inner_spec.rb b/spec/models/deal_attributes_inner_spec.rb new file mode 100644 index 0000000..ea52356 --- /dev/null +++ b/spec/models/deal_attributes_inner_spec.rb @@ -0,0 +1,65 @@ +=begin +#SendinBlue API + +#SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | + +OpenAPI spec version: 3.0.0 +Contact: contact@sendinblue.com +Generated by: https://github.com/swagger-api/swagger-codegen.git +Swagger Codegen version: 2.4.19 + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for SibApiV3Sdk::DealAttributesInner +# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) +# Please update as you see appropriate +describe 'DealAttributesInner' do + before do + # run before each test + @instance = SibApiV3Sdk::DealAttributesInner.new + end + + after do + # run after each test + end + + describe 'test an instance of DealAttributesInner' do + it 'should create an instance of DealAttributesInner' do + expect(@instance).to be_instance_of(SibApiV3Sdk::DealAttributesInner) + end + end + describe 'test attribute "internal_name"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "label"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "attribute_type_name"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "attribute_options"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "is_required"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + +end diff --git a/spec/models/deal_attributes_spec.rb b/spec/models/deal_attributes_spec.rb new file mode 100644 index 0000000..8107b18 --- /dev/null +++ b/spec/models/deal_attributes_spec.rb @@ -0,0 +1,35 @@ +=begin +#SendinBlue API + +#SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | + +OpenAPI spec version: 3.0.0 +Contact: contact@sendinblue.com +Generated by: https://github.com/swagger-api/swagger-codegen.git +Swagger Codegen version: 2.4.19 + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for SibApiV3Sdk::DealAttributes +# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) +# Please update as you see appropriate +describe 'DealAttributes' do + before do + # run before each test + @instance = SibApiV3Sdk::DealAttributes.new + end + + after do + # run after each test + end + + describe 'test an instance of DealAttributes' do + it 'should create an instance of DealAttributes' do + expect(@instance).to be_instance_of(SibApiV3Sdk::DealAttributes) + end + end +end diff --git a/spec/models/deal_spec.rb b/spec/models/deal_spec.rb new file mode 100644 index 0000000..6bc34f7 --- /dev/null +++ b/spec/models/deal_spec.rb @@ -0,0 +1,59 @@ +=begin +#SendinBlue API + +#SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | + +OpenAPI spec version: 3.0.0 +Contact: contact@sendinblue.com +Generated by: https://github.com/swagger-api/swagger-codegen.git +Swagger Codegen version: 2.4.19 + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for SibApiV3Sdk::Deal +# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) +# Please update as you see appropriate +describe 'Deal' do + before do + # run before each test + @instance = SibApiV3Sdk::Deal.new + end + + after do + # run after each test + end + + describe 'test an instance of Deal' do + it 'should create an instance of Deal' do + expect(@instance).to be_instance_of(SibApiV3Sdk::Deal) + end + end + describe 'test attribute "id"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "attributes"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "linked_contacts_ids"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "linked_companies_ids"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + +end diff --git a/spec/models/deals_list_spec.rb b/spec/models/deals_list_spec.rb new file mode 100644 index 0000000..7ed6c2c --- /dev/null +++ b/spec/models/deals_list_spec.rb @@ -0,0 +1,41 @@ +=begin +#SendinBlue API + +#SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | + +OpenAPI spec version: 3.0.0 +Contact: contact@sendinblue.com +Generated by: https://github.com/swagger-api/swagger-codegen.git +Swagger Codegen version: 2.4.19 + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for SibApiV3Sdk::DealsList +# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) +# Please update as you see appropriate +describe 'DealsList' do + before do + # run before each test + @instance = SibApiV3Sdk::DealsList.new + end + + after do + # run after each test + end + + describe 'test an instance of DealsList' do + it 'should create an instance of DealsList' do + expect(@instance).to be_instance_of(SibApiV3Sdk::DealsList) + end + end + describe 'test attribute "items"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + +end diff --git a/spec/models/file_data_spec.rb b/spec/models/file_data_spec.rb index 63c5f7e..ae74e4e 100644 --- a/spec/models/file_data_spec.rb +++ b/spec/models/file_data_spec.rb @@ -32,18 +32,6 @@ expect(@instance).to be_instance_of(SibApiV3Sdk::FileData) end end - describe 'test attribute "url"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "id"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - describe 'test attribute "name"' do it 'should work' do # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers @@ -56,19 +44,19 @@ end end - describe 'test attribute "author"' do + describe 'test attribute "contact_id"' do it 'should work' do # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers end end - describe 'test attribute "contact_id"' do + describe 'test attribute "deal_id"' do it 'should work' do # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers end end - describe 'test attribute "deal_ids"' do + describe 'test attribute "company_id"' do it 'should work' do # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers end @@ -86,10 +74,4 @@ end end - describe 'test attribute "updated_at"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - end diff --git a/spec/models/file_downloadable_link_spec.rb b/spec/models/file_downloadable_link_spec.rb new file mode 100644 index 0000000..55c0948 --- /dev/null +++ b/spec/models/file_downloadable_link_spec.rb @@ -0,0 +1,41 @@ +=begin +#SendinBlue API + +#SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | + +OpenAPI spec version: 3.0.0 +Contact: contact@sendinblue.com +Generated by: https://github.com/swagger-api/swagger-codegen.git +Swagger Codegen version: 2.4.19 + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for SibApiV3Sdk::FileDownloadableLink +# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) +# Please update as you see appropriate +describe 'FileDownloadableLink' do + before do + # run before each test + @instance = SibApiV3Sdk::FileDownloadableLink.new + end + + after do + # run after each test + end + + describe 'test an instance of FileDownloadableLink' do + it 'should create an instance of FileDownloadableLink' do + expect(@instance).to be_instance_of(SibApiV3Sdk::FileDownloadableLink) + end + end + describe 'test attribute "file_url"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + +end diff --git a/spec/models/file_list_spec.rb b/spec/models/file_list_spec.rb new file mode 100644 index 0000000..2e9c509 --- /dev/null +++ b/spec/models/file_list_spec.rb @@ -0,0 +1,35 @@ +=begin +#SendinBlue API + +#SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | + +OpenAPI spec version: 3.0.0 +Contact: contact@sendinblue.com +Generated by: https://github.com/swagger-api/swagger-codegen.git +Swagger Codegen version: 2.4.19 + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for SibApiV3Sdk::FileList +# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) +# Please update as you see appropriate +describe 'FileList' do + before do + # run before each test + @instance = SibApiV3Sdk::FileList.new + end + + after do + # run after each test + end + + describe 'test an instance of FileList' do + it 'should create an instance of FileList' do + expect(@instance).to be_instance_of(SibApiV3Sdk::FileList) + end + end +end diff --git a/spec/models/get_campaign_stats_spec.rb b/spec/models/get_campaign_stats_spec.rb index 503c557..5b8a658 100644 --- a/spec/models/get_campaign_stats_spec.rb +++ b/spec/models/get_campaign_stats_spec.rb @@ -92,6 +92,18 @@ end end + describe 'test attribute "trackable_views_rate"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "estimated_views"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + describe 'test attribute "unsubscriptions"' do it 'should work' do # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers diff --git a/spec/models/get_scheduled_email_by_batch_id_batches_spec.rb b/spec/models/get_scheduled_email_by_batch_id_batches_spec.rb new file mode 100644 index 0000000..8ac3f86 --- /dev/null +++ b/spec/models/get_scheduled_email_by_batch_id_batches_spec.rb @@ -0,0 +1,57 @@ +=begin +#SendinBlue API + +#SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | + +OpenAPI spec version: 3.0.0 +Contact: contact@sendinblue.com +Generated by: https://github.com/swagger-api/swagger-codegen.git +Swagger Codegen version: 2.4.19 + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for SibApiV3Sdk::GetScheduledEmailByBatchIdBatches +# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) +# Please update as you see appropriate +describe 'GetScheduledEmailByBatchIdBatches' do + before do + # run before each test + @instance = SibApiV3Sdk::GetScheduledEmailByBatchIdBatches.new + end + + after do + # run after each test + end + + describe 'test an instance of GetScheduledEmailByBatchIdBatches' do + it 'should create an instance of GetScheduledEmailByBatchIdBatches' do + expect(@instance).to be_instance_of(SibApiV3Sdk::GetScheduledEmailByBatchIdBatches) + end + end + describe 'test attribute "scheduled_at"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "created_at"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "status"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + # validator = Petstore::EnumTest::EnumAttributeValidator.new('String', ["inProgress", "queued", "processed", "error"]) + # validator.allowable_values.each do |value| + # expect { @instance.status = value }.not_to raise_error + # end + end + end + +end diff --git a/spec/models/get_scheduled_email_by_batch_id_spec.rb b/spec/models/get_scheduled_email_by_batch_id_spec.rb new file mode 100644 index 0000000..bd20c77 --- /dev/null +++ b/spec/models/get_scheduled_email_by_batch_id_spec.rb @@ -0,0 +1,47 @@ +=begin +#SendinBlue API + +#SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | + +OpenAPI spec version: 3.0.0 +Contact: contact@sendinblue.com +Generated by: https://github.com/swagger-api/swagger-codegen.git +Swagger Codegen version: 2.4.19 + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for SibApiV3Sdk::GetScheduledEmailByBatchId +# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) +# Please update as you see appropriate +describe 'GetScheduledEmailByBatchId' do + before do + # run before each test + @instance = SibApiV3Sdk::GetScheduledEmailByBatchId.new + end + + after do + # run after each test + end + + describe 'test an instance of GetScheduledEmailByBatchId' do + it 'should create an instance of GetScheduledEmailByBatchId' do + expect(@instance).to be_instance_of(SibApiV3Sdk::GetScheduledEmailByBatchId) + end + end + describe 'test attribute "count"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "batches"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + +end diff --git a/spec/models/get_scheduled_email_by_message_id_spec.rb b/spec/models/get_scheduled_email_by_message_id_spec.rb new file mode 100644 index 0000000..5ee19ae --- /dev/null +++ b/spec/models/get_scheduled_email_by_message_id_spec.rb @@ -0,0 +1,57 @@ +=begin +#SendinBlue API + +#SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | + +OpenAPI spec version: 3.0.0 +Contact: contact@sendinblue.com +Generated by: https://github.com/swagger-api/swagger-codegen.git +Swagger Codegen version: 2.4.19 + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for SibApiV3Sdk::GetScheduledEmailByMessageId +# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) +# Please update as you see appropriate +describe 'GetScheduledEmailByMessageId' do + before do + # run before each test + @instance = SibApiV3Sdk::GetScheduledEmailByMessageId.new + end + + after do + # run after each test + end + + describe 'test an instance of GetScheduledEmailByMessageId' do + it 'should create an instance of GetScheduledEmailByMessageId' do + expect(@instance).to be_instance_of(SibApiV3Sdk::GetScheduledEmailByMessageId) + end + end + describe 'test attribute "scheduled_at"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "created_at"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "status"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + # validator = Petstore::EnumTest::EnumAttributeValidator.new('String', ["inProgress", "queued", "processed", "error"]) + # validator.allowable_values.each do |value| + # expect { @instance.status = value }.not_to raise_error + # end + end + end + +end diff --git a/spec/models/inline_response_200_spec.rb b/spec/models/inline_response_200_spec.rb new file mode 100644 index 0000000..64438ba --- /dev/null +++ b/spec/models/inline_response_200_spec.rb @@ -0,0 +1,41 @@ +=begin +#SendinBlue API + +#SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | + +OpenAPI spec version: 3.0.0 +Contact: contact@sendinblue.com +Generated by: https://github.com/swagger-api/swagger-codegen.git +Swagger Codegen version: 2.4.19 + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for SibApiV3Sdk::InlineResponse200 +# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) +# Please update as you see appropriate +describe 'InlineResponse200' do + before do + # run before each test + @instance = SibApiV3Sdk::InlineResponse200.new + end + + after do + # run after each test + end + + describe 'test an instance of InlineResponse200' do + it 'should create an instance of InlineResponse200' do + expect(@instance).to be_instance_of(SibApiV3Sdk::InlineResponse200) + end + end + describe 'test attribute "id"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + +end diff --git a/spec/models/inline_response_201_1_spec.rb b/spec/models/inline_response_201_1_spec.rb new file mode 100644 index 0000000..5164343 --- /dev/null +++ b/spec/models/inline_response_201_1_spec.rb @@ -0,0 +1,41 @@ +=begin +#SendinBlue API + +#SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | + +OpenAPI spec version: 3.0.0 +Contact: contact@sendinblue.com +Generated by: https://github.com/swagger-api/swagger-codegen.git +Swagger Codegen version: 2.4.19 + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for SibApiV3Sdk::InlineResponse2011 +# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) +# Please update as you see appropriate +describe 'InlineResponse2011' do + before do + # run before each test + @instance = SibApiV3Sdk::InlineResponse2011.new + end + + after do + # run after each test + end + + describe 'test an instance of InlineResponse2011' do + it 'should create an instance of InlineResponse2011' do + expect(@instance).to be_instance_of(SibApiV3Sdk::InlineResponse2011) + end + end + describe 'test attribute "id"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + +end diff --git a/spec/models/inline_response_201_spec.rb b/spec/models/inline_response_201_spec.rb new file mode 100644 index 0000000..d4c58fd --- /dev/null +++ b/spec/models/inline_response_201_spec.rb @@ -0,0 +1,41 @@ +=begin +#SendinBlue API + +#SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | + +OpenAPI spec version: 3.0.0 +Contact: contact@sendinblue.com +Generated by: https://github.com/swagger-api/swagger-codegen.git +Swagger Codegen version: 2.4.19 + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for SibApiV3Sdk::InlineResponse201 +# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) +# Please update as you see appropriate +describe 'InlineResponse201' do + before do + # run before each test + @instance = SibApiV3Sdk::InlineResponse201.new + end + + after do + # run after each test + end + + describe 'test an instance of InlineResponse201' do + it 'should create an instance of InlineResponse201' do + expect(@instance).to be_instance_of(SibApiV3Sdk::InlineResponse201) + end + end + describe 'test attribute "id"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + +end diff --git a/spec/models/note_id_spec.rb b/spec/models/note_id_spec.rb new file mode 100644 index 0000000..ac5245f --- /dev/null +++ b/spec/models/note_id_spec.rb @@ -0,0 +1,41 @@ +=begin +#SendinBlue API + +#SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | + +OpenAPI spec version: 3.0.0 +Contact: contact@sendinblue.com +Generated by: https://github.com/swagger-api/swagger-codegen.git +Swagger Codegen version: 2.4.19 + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for SibApiV3Sdk::NoteId +# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) +# Please update as you see appropriate +describe 'NoteId' do + before do + # run before each test + @instance = SibApiV3Sdk::NoteId.new + end + + after do + # run after each test + end + + describe 'test an instance of NoteId' do + it 'should create an instance of NoteId' do + expect(@instance).to be_instance_of(SibApiV3Sdk::NoteId) + end + end + describe 'test attribute "id"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + +end diff --git a/spec/models/note_list_spec.rb b/spec/models/note_list_spec.rb new file mode 100644 index 0000000..70facf2 --- /dev/null +++ b/spec/models/note_list_spec.rb @@ -0,0 +1,35 @@ +=begin +#SendinBlue API + +#SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | + +OpenAPI spec version: 3.0.0 +Contact: contact@sendinblue.com +Generated by: https://github.com/swagger-api/swagger-codegen.git +Swagger Codegen version: 2.4.19 + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for SibApiV3Sdk::NoteList +# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) +# Please update as you see appropriate +describe 'NoteList' do + before do + # run before each test + @instance = SibApiV3Sdk::NoteList.new + end + + after do + # run after each test + end + + describe 'test an instance of NoteList' do + it 'should create an instance of NoteList' do + expect(@instance).to be_instance_of(SibApiV3Sdk::NoteList) + end + end +end diff --git a/spec/models/pipeline_spec.rb b/spec/models/pipeline_spec.rb new file mode 100644 index 0000000..24f7e55 --- /dev/null +++ b/spec/models/pipeline_spec.rb @@ -0,0 +1,41 @@ +=begin +#SendinBlue API + +#SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | + +OpenAPI spec version: 3.0.0 +Contact: contact@sendinblue.com +Generated by: https://github.com/swagger-api/swagger-codegen.git +Swagger Codegen version: 2.4.19 + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for SibApiV3Sdk::Pipeline +# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) +# Please update as you see appropriate +describe 'Pipeline' do + before do + # run before each test + @instance = SibApiV3Sdk::Pipeline.new + end + + after do + # run after each test + end + + describe 'test an instance of Pipeline' do + it 'should create an instance of Pipeline' do + expect(@instance).to be_instance_of(SibApiV3Sdk::Pipeline) + end + end + describe 'test attribute "stages"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + +end diff --git a/spec/models/pipeline_stage_spec.rb b/spec/models/pipeline_stage_spec.rb new file mode 100644 index 0000000..4fe5a90 --- /dev/null +++ b/spec/models/pipeline_stage_spec.rb @@ -0,0 +1,47 @@ +=begin +#SendinBlue API + +#SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | + +OpenAPI spec version: 3.0.0 +Contact: contact@sendinblue.com +Generated by: https://github.com/swagger-api/swagger-codegen.git +Swagger Codegen version: 2.4.19 + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for SibApiV3Sdk::PipelineStage +# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) +# Please update as you see appropriate +describe 'PipelineStage' do + before do + # run before each test + @instance = SibApiV3Sdk::PipelineStage.new + end + + after do + # run after each test + end + + describe 'test an instance of PipelineStage' do + it 'should create an instance of PipelineStage' do + expect(@instance).to be_instance_of(SibApiV3Sdk::PipelineStage) + end + end + describe 'test attribute "id"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "name"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + +end diff --git a/spec/models/schedule_smtp_email_spec.rb b/spec/models/schedule_smtp_email_spec.rb new file mode 100644 index 0000000..07a7666 --- /dev/null +++ b/spec/models/schedule_smtp_email_spec.rb @@ -0,0 +1,53 @@ +=begin +#SendinBlue API + +#SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | + +OpenAPI spec version: 3.0.0 +Contact: contact@sendinblue.com +Generated by: https://github.com/swagger-api/swagger-codegen.git +Swagger Codegen version: 2.4.19 + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for SibApiV3Sdk::ScheduleSmtpEmail +# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) +# Please update as you see appropriate +describe 'ScheduleSmtpEmail' do + before do + # run before each test + @instance = SibApiV3Sdk::ScheduleSmtpEmail.new + end + + after do + # run after each test + end + + describe 'test an instance of ScheduleSmtpEmail' do + it 'should create an instance of ScheduleSmtpEmail' do + expect(@instance).to be_instance_of(SibApiV3Sdk::ScheduleSmtpEmail) + end + end + describe 'test attribute "message_id"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "message_ids"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "batch_id"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + +end diff --git a/spec/models/send_smtp_email_spec.rb b/spec/models/send_smtp_email_spec.rb index ba67e4d..3403820 100644 --- a/spec/models/send_smtp_email_spec.rb +++ b/spec/models/send_smtp_email_spec.rb @@ -116,4 +116,16 @@ end end + describe 'test attribute "scheduled_at"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "batch_id"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + end diff --git a/spec/models/task_list_spec.rb b/spec/models/task_list_spec.rb new file mode 100644 index 0000000..68aac91 --- /dev/null +++ b/spec/models/task_list_spec.rb @@ -0,0 +1,41 @@ +=begin +#SendinBlue API + +#SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | + +OpenAPI spec version: 3.0.0 +Contact: contact@sendinblue.com +Generated by: https://github.com/swagger-api/swagger-codegen.git +Swagger Codegen version: 2.4.19 + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for SibApiV3Sdk::TaskList +# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) +# Please update as you see appropriate +describe 'TaskList' do + before do + # run before each test + @instance = SibApiV3Sdk::TaskList.new + end + + after do + # run after each test + end + + describe 'test an instance of TaskList' do + it 'should create an instance of TaskList' do + expect(@instance).to be_instance_of(SibApiV3Sdk::TaskList) + end + end + describe 'test attribute "items"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + +end diff --git a/spec/models/task_spec.rb b/spec/models/task_spec.rb index 9511e0e..37f763a 100644 --- a/spec/models/task_spec.rb +++ b/spec/models/task_spec.rb @@ -32,12 +32,6 @@ expect(@instance).to be_instance_of(SibApiV3Sdk::Task) end end - describe 'test attribute "first_contact"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - describe 'test attribute "id"' do it 'should work' do # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers @@ -62,12 +56,6 @@ end end - describe 'test attribute "contacts"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - describe 'test attribute "deals_ids"' do it 'should work' do # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers @@ -80,58 +68,4 @@ end end - describe 'test attribute "assign_to_id"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "date"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "duration"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "notes"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "done"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "reminder"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "created_at"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "updated_at"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "refs"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - end diff --git a/spec/models/task_types_spec.rb b/spec/models/task_types_spec.rb index c273dd0..03b4dac 100644 --- a/spec/models/task_types_spec.rb +++ b/spec/models/task_types_spec.rb @@ -38,12 +38,6 @@ end end - describe 'test attribute "icon"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - describe 'test attribute "title"' do it 'should work' do # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers diff --git a/spec/models/upload_image_model_spec.rb b/spec/models/upload_image_model_spec.rb new file mode 100644 index 0000000..cad035f --- /dev/null +++ b/spec/models/upload_image_model_spec.rb @@ -0,0 +1,41 @@ +=begin +#SendinBlue API + +#SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | + +OpenAPI spec version: 3.0.0 +Contact: contact@sendinblue.com +Generated by: https://github.com/swagger-api/swagger-codegen.git +Swagger Codegen version: 2.4.19 + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for SibApiV3Sdk::UploadImageModel +# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) +# Please update as you see appropriate +describe 'UploadImageModel' do + before do + # run before each test + @instance = SibApiV3Sdk::UploadImageModel.new + end + + after do + # run after each test + end + + describe 'test an instance of UploadImageModel' do + it 'should create an instance of UploadImageModel' do + expect(@instance).to be_instance_of(SibApiV3Sdk::UploadImageModel) + end + end + describe 'test attribute "url"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + +end From 689667a77e96a367022fe69dbd98d76b0b0a93fe Mon Sep 17 00:00:00 2001 From: NagendraSIB Date: Tue, 16 Aug 2022 22:01:31 +0530 Subject: [PATCH 06/10] major changes --- lib/sib-api-v3-sdk/version.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/sib-api-v3-sdk/version.rb b/lib/sib-api-v3-sdk/version.rb index 3affc93..6091926 100644 --- a/lib/sib-api-v3-sdk/version.rb +++ b/lib/sib-api-v3-sdk/version.rb @@ -11,5 +11,5 @@ =end module SibApiV3Sdk - VERSION = "8.2.0" + VERSION = "9.0.0" end From 437a9afe39515f097181dc83c131f63852fad9e7 Mon Sep 17 00:00:00 2001 From: NagendraSIB Date: Thu, 18 Aug 2022 14:32:19 +0530 Subject: [PATCH 07/10] user_agent fix --- lib/sib-api-v3-sdk/api/inbound_parsing_api.rb | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/lib/sib-api-v3-sdk/api/inbound_parsing_api.rb b/lib/sib-api-v3-sdk/api/inbound_parsing_api.rb index b58af75..8e4fafb 100644 --- a/lib/sib-api-v3-sdk/api/inbound_parsing_api.rb +++ b/lib/sib-api-v3-sdk/api/inbound_parsing_api.rb @@ -19,6 +19,15 @@ class InboundParsingApi def initialize(api_client = ApiClient.default) @api_client = api_client end + + # Set custom user_agent if explicitly passed in api + # default will still remain Swagger-Codegen/#{VERSION}/ruby + def setUserAgent(user_agent) + @user_agent = user_agent + if user_agent.is_a?(String) && user_agent.downcase.start_with?('sendinblue_') + @api_client.default_headers['User-Agent'] = @user_agent + end + end # Retrieve inbound attachment with download token. # This endpoint will retrieve inbound attachment with download token. # @param download_token Token to fetch a particular attachment @@ -38,14 +47,6 @@ def get_inbound_email_attachment_with_http_info(download_token, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: InboundParsingApi.get_inbound_email_attachment ...' end - - # Set custom user_agent if explicitly passed in api - # default will still remain Swagger-Codegen/#{VERSION}/ruby - def setUserAgent(user_agent) - @user_agent = user_agent - if user_agent.is_a?(String) && user_agent.downcase.start_with?('sendinblue_') - @api_client.default_headers['User-Agent'] = @user_agent - end # verify the required parameter 'download_token' is set if @api_client.config.client_side_validation && download_token.nil? fail ArgumentError, "Missing the required parameter 'download_token' when calling InboundParsingApi.get_inbound_email_attachment" From a31b5f1015e101d835a90711ad6cf00329abd36f Mon Sep 17 00:00:00 2001 From: NagendraSIB Date: Tue, 6 Dec 2022 11:28:18 +0530 Subject: [PATCH 08/10] wrapper udpate --- README.md | 19 - docs/AttributesApi.md | 246 -------- docs/Body.md | 1 + docs/Body1.md | 1 + docs/Body10.md | 4 +- docs/Body12.md | 2 +- docs/Body8.md | 4 +- docs/CreateEmailCampaign.md | 2 + docs/CreateEmailCampaignRecipients.md | 1 + docs/FoldersApi.md | 372 ------------ docs/ListsApi.md | 560 ----------------- docs/NoteData.md | 1 + docs/TransactionalEmailsApi.md | 4 +- docs/UpdateEmailCampaign.md | 2 + docs/UpdateEmailCampaignRecipients.md | 3 +- lib/sib-api-v3-sdk.rb | 3 - lib/sib-api-v3-sdk/api/attributes_api.rb | 274 --------- lib/sib-api-v3-sdk/api/contacts_api.rb | 20 + lib/sib-api-v3-sdk/api/email_campaigns_api.rb | 4 + lib/sib-api-v3-sdk/api/folders_api.rb | 383 ------------ lib/sib-api-v3-sdk/api/inbound_parsing_api.rb | 4 + lib/sib-api-v3-sdk/api/lists_api.rb | 562 ------------------ lib/sib-api-v3-sdk/api/process_api.rb | 4 + lib/sib-api-v3-sdk/api/reseller_api.rb | 4 + lib/sib-api-v3-sdk/api/sms_campaigns_api.rb | 4 + .../api/transactional_emails_api.rb | 30 +- lib/sib-api-v3-sdk/models/body.rb | 18 +- lib/sib-api-v3-sdk/models/body_1.rb | 18 +- lib/sib-api-v3-sdk/models/body_10.rb | 4 +- lib/sib-api-v3-sdk/models/body_12.rb | 2 +- lib/sib-api-v3-sdk/models/body_8.rb | 4 +- .../models/create_email_campaign.rb | 28 +- .../create_email_campaign_recipients.rb | 22 +- lib/sib-api-v3-sdk/models/note_data.rb | 20 +- .../models/update_email_campaign.rb | 28 +- .../update_email_campaign_recipients.rb | 24 +- lib/sib-api-v3-sdk/version.rb | 2 +- spec/api/attributes_api_spec.rb | 83 --- spec/api/folders_api_spec.rb | 107 ---- spec/api/lists_api_spec.rb | 146 ----- spec/models/body_1_spec.rb | 6 + spec/models/body_spec.rb | 6 + .../create_email_campaign_recipients_spec.rb | 6 + spec/models/create_email_campaign_spec.rb | 12 + spec/models/note_data_spec.rb | 6 + .../update_email_campaign_recipients_spec.rb | 6 + spec/models/update_email_campaign_spec.rb | 12 + 47 files changed, 271 insertions(+), 2803 deletions(-) delete mode 100644 docs/AttributesApi.md delete mode 100644 docs/FoldersApi.md delete mode 100644 docs/ListsApi.md delete mode 100644 lib/sib-api-v3-sdk/api/attributes_api.rb delete mode 100644 lib/sib-api-v3-sdk/api/folders_api.rb delete mode 100644 lib/sib-api-v3-sdk/api/lists_api.rb delete mode 100644 spec/api/attributes_api_spec.rb delete mode 100644 spec/api/folders_api_spec.rb delete mode 100644 spec/api/lists_api_spec.rb diff --git a/README.md b/README.md index 40697af..f8ec083 100644 --- a/README.md +++ b/README.md @@ -85,10 +85,6 @@ All URIs are relative to *https://api.sendinblue.com/v3* Class | Method | HTTP request | Description ------------ | ------------- | ------------- | ------------- *SibApiV3Sdk::AccountApi* | [**get_account**](docs/AccountApi.md#get_account) | **GET** /account | Get your account information, plan and credits details -*SibApiV3Sdk::AttributesApi* | [**create_attribute**](docs/AttributesApi.md#create_attribute) | **POST** /contacts/attributes/{attributeCategory}/{attributeName} | Create contact attribute -*SibApiV3Sdk::AttributesApi* | [**delete_attribute**](docs/AttributesApi.md#delete_attribute) | **DELETE** /contacts/attributes/{attributeCategory}/{attributeName} | Delete an attribute -*SibApiV3Sdk::AttributesApi* | [**get_attributes**](docs/AttributesApi.md#get_attributes) | **GET** /contacts/attributes | List all attributes -*SibApiV3Sdk::AttributesApi* | [**update_attribute**](docs/AttributesApi.md#update_attribute) | **PUT** /contacts/attributes/{attributeCategory}/{attributeName} | Update contact attribute *SibApiV3Sdk::CompaniesApi* | [**companies_attributes_get**](docs/CompaniesApi.md#companies_attributes_get) | **GET** /companies/attributes | Get company attributes *SibApiV3Sdk::CompaniesApi* | [**companies_get**](docs/CompaniesApi.md#companies_get) | **GET** /companies | Get all companies *SibApiV3Sdk::CompaniesApi* | [**companies_id_delete**](docs/CompaniesApi.md#companies_id_delete) | **DELETE** /companies/{id} | Delete a company @@ -159,24 +155,9 @@ Class | Method | HTTP request | Description *SibApiV3Sdk::FilesApi* | [**crm_files_id_delete**](docs/FilesApi.md#crm_files_id_delete) | **DELETE** /crm/files/{id} | Delete a file *SibApiV3Sdk::FilesApi* | [**crm_files_id_get**](docs/FilesApi.md#crm_files_id_get) | **GET** /crm/files/{id} | Download a file *SibApiV3Sdk::FilesApi* | [**crm_files_post**](docs/FilesApi.md#crm_files_post) | **POST** /crm/files | Upload a file -*SibApiV3Sdk::FoldersApi* | [**create_folder**](docs/FoldersApi.md#create_folder) | **POST** /contacts/folders | Create a folder -*SibApiV3Sdk::FoldersApi* | [**delete_folder**](docs/FoldersApi.md#delete_folder) | **DELETE** /contacts/folders/{folderId} | Delete a folder (and all its lists) -*SibApiV3Sdk::FoldersApi* | [**get_folder**](docs/FoldersApi.md#get_folder) | **GET** /contacts/folders/{folderId} | Returns a folder's details -*SibApiV3Sdk::FoldersApi* | [**get_folder_lists**](docs/FoldersApi.md#get_folder_lists) | **GET** /contacts/folders/{folderId}/lists | Get lists in a folder -*SibApiV3Sdk::FoldersApi* | [**get_folders**](docs/FoldersApi.md#get_folders) | **GET** /contacts/folders | Get all folders -*SibApiV3Sdk::FoldersApi* | [**update_folder**](docs/FoldersApi.md#update_folder) | **PUT** /contacts/folders/{folderId} | Update a folder *SibApiV3Sdk::InboundParsingApi* | [**get_inbound_email_attachment**](docs/InboundParsingApi.md#get_inbound_email_attachment) | **GET** /inbound/attachments/{downloadToken} | Retrieve inbound attachment with download token. *SibApiV3Sdk::InboundParsingApi* | [**get_inbound_email_events**](docs/InboundParsingApi.md#get_inbound_email_events) | **GET** /inbound/events | Get the list of all the events for the received emails. *SibApiV3Sdk::InboundParsingApi* | [**get_inbound_email_events_by_uuid**](docs/InboundParsingApi.md#get_inbound_email_events_by_uuid) | **GET** /inbound/events/{uuid} | Fetch all events history for one particular received email. -*SibApiV3Sdk::ListsApi* | [**add_contact_to_list**](docs/ListsApi.md#add_contact_to_list) | **POST** /contacts/lists/{listId}/contacts/add | Add existing contacts to a list -*SibApiV3Sdk::ListsApi* | [**create_list**](docs/ListsApi.md#create_list) | **POST** /contacts/lists | Create a list -*SibApiV3Sdk::ListsApi* | [**delete_list**](docs/ListsApi.md#delete_list) | **DELETE** /contacts/lists/{listId} | Delete a list -*SibApiV3Sdk::ListsApi* | [**get_contacts_from_list**](docs/ListsApi.md#get_contacts_from_list) | **GET** /contacts/lists/{listId}/contacts | Get contacts in a list -*SibApiV3Sdk::ListsApi* | [**get_folder_lists**](docs/ListsApi.md#get_folder_lists) | **GET** /contacts/folders/{folderId}/lists | Get lists in a folder -*SibApiV3Sdk::ListsApi* | [**get_list**](docs/ListsApi.md#get_list) | **GET** /contacts/lists/{listId} | Get a list's details -*SibApiV3Sdk::ListsApi* | [**get_lists**](docs/ListsApi.md#get_lists) | **GET** /contacts/lists | Get all the lists -*SibApiV3Sdk::ListsApi* | [**remove_contact_from_list**](docs/ListsApi.md#remove_contact_from_list) | **POST** /contacts/lists/{listId}/contacts/remove | Delete a contact from a list -*SibApiV3Sdk::ListsApi* | [**update_list**](docs/ListsApi.md#update_list) | **PUT** /contacts/lists/{listId} | Update a list *SibApiV3Sdk::MasterAccountApi* | [**corporate_master_account_get**](docs/MasterAccountApi.md#corporate_master_account_get) | **GET** /corporate/masterAccount | Get the details of requested master account *SibApiV3Sdk::MasterAccountApi* | [**corporate_sub_account_get**](docs/MasterAccountApi.md#corporate_sub_account_get) | **GET** /corporate/subAccount | Get the list of all the sub-accounts of the master account. *SibApiV3Sdk::MasterAccountApi* | [**corporate_sub_account_id_delete**](docs/MasterAccountApi.md#corporate_sub_account_id_delete) | **DELETE** /corporate/subAccount/{id} | Delete a sub-account diff --git a/docs/AttributesApi.md b/docs/AttributesApi.md deleted file mode 100644 index ee475a6..0000000 --- a/docs/AttributesApi.md +++ /dev/null @@ -1,246 +0,0 @@ -# SibApiV3Sdk::AttributesApi - -All URIs are relative to *https://api.sendinblue.com/v3* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**create_attribute**](AttributesApi.md#create_attribute) | **POST** /contacts/attributes/{attributeCategory}/{attributeName} | Create contact attribute -[**delete_attribute**](AttributesApi.md#delete_attribute) | **DELETE** /contacts/attributes/{attributeCategory}/{attributeName} | Delete an attribute -[**get_attributes**](AttributesApi.md#get_attributes) | **GET** /contacts/attributes | List all attributes -[**update_attribute**](AttributesApi.md#update_attribute) | **PUT** /contacts/attributes/{attributeCategory}/{attributeName} | Update contact attribute - - -# **create_attribute** -> create_attribute(attribute_category, attribute_name, create_attribute) - -Create contact attribute - -### Example -```ruby -# load the gem -require 'sib-api-v3-sdk' -# setup authorization -SibApiV3Sdk.configure do |config| - # Configure API key authorization: api-key - config.api_key['api-key'] = 'YOUR API KEY' - # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil) - #config.api_key_prefix['api-key'] = 'Bearer' - - # Configure API key authorization: partner-key - config.api_key['partner-key'] = 'YOUR API KEY' - # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil) - #config.api_key_prefix['partner-key'] = 'Bearer' -end - -api_instance = SibApiV3Sdk::AttributesApi.new - -attribute_category = 'attribute_category_example' # String | Category of the attribute - -attribute_name = 'attribute_name_example' # String | Name of the attribute - -create_attribute = SibApiV3Sdk::CreateAttribute.new # CreateAttribute | Values to create an attribute - - -begin - #Create contact attribute - api_instance.create_attribute(attribute_category, attribute_name, create_attribute) -rescue SibApiV3Sdk::ApiError => e - puts "Exception when calling AttributesApi->create_attribute: #{e}" -end -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **attribute_category** | **String**| Category of the attribute | - **attribute_name** | **String**| Name of the attribute | - **create_attribute** | [**CreateAttribute**](CreateAttribute.md)| Values to create an attribute | - -### Return type - -nil (empty response body) - -### Authorization - -[api-key](../README.md#api-key), [partner-key](../README.md#partner-key) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - - - -# **delete_attribute** -> delete_attribute(attribute_category, attribute_name) - -Delete an attribute - -### Example -```ruby -# load the gem -require 'sib-api-v3-sdk' -# setup authorization -SibApiV3Sdk.configure do |config| - # Configure API key authorization: api-key - config.api_key['api-key'] = 'YOUR API KEY' - # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil) - #config.api_key_prefix['api-key'] = 'Bearer' - - # Configure API key authorization: partner-key - config.api_key['partner-key'] = 'YOUR API KEY' - # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil) - #config.api_key_prefix['partner-key'] = 'Bearer' -end - -api_instance = SibApiV3Sdk::AttributesApi.new - -attribute_category = 'attribute_category_example' # String | Category of the attribute - -attribute_name = 'attribute_name_example' # String | Name of the existing attribute - - -begin - #Delete an attribute - api_instance.delete_attribute(attribute_category, attribute_name) -rescue SibApiV3Sdk::ApiError => e - puts "Exception when calling AttributesApi->delete_attribute: #{e}" -end -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **attribute_category** | **String**| Category of the attribute | - **attribute_name** | **String**| Name of the existing attribute | - -### Return type - -nil (empty response body) - -### Authorization - -[api-key](../README.md#api-key), [partner-key](../README.md#partner-key) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - - - -# **get_attributes** -> GetAttributes get_attributes - -List all attributes - -### Example -```ruby -# load the gem -require 'sib-api-v3-sdk' -# setup authorization -SibApiV3Sdk.configure do |config| - # Configure API key authorization: api-key - config.api_key['api-key'] = 'YOUR API KEY' - # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil) - #config.api_key_prefix['api-key'] = 'Bearer' - - # Configure API key authorization: partner-key - config.api_key['partner-key'] = 'YOUR API KEY' - # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil) - #config.api_key_prefix['partner-key'] = 'Bearer' -end - -api_instance = SibApiV3Sdk::AttributesApi.new - -begin - #List all attributes - result = api_instance.get_attributes - p result -rescue SibApiV3Sdk::ApiError => e - puts "Exception when calling AttributesApi->get_attributes: #{e}" -end -``` - -### Parameters -This endpoint does not need any parameter. - -### Return type - -[**GetAttributes**](GetAttributes.md) - -### Authorization - -[api-key](../README.md#api-key), [partner-key](../README.md#partner-key) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - - - -# **update_attribute** -> update_attribute(attribute_category, attribute_name, update_attribute) - -Update contact attribute - -### Example -```ruby -# load the gem -require 'sib-api-v3-sdk' -# setup authorization -SibApiV3Sdk.configure do |config| - # Configure API key authorization: api-key - config.api_key['api-key'] = 'YOUR API KEY' - # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil) - #config.api_key_prefix['api-key'] = 'Bearer' - - # Configure API key authorization: partner-key - config.api_key['partner-key'] = 'YOUR API KEY' - # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil) - #config.api_key_prefix['partner-key'] = 'Bearer' -end - -api_instance = SibApiV3Sdk::AttributesApi.new - -attribute_category = 'attribute_category_example' # String | Category of the attribute - -attribute_name = 'attribute_name_example' # String | Name of the existing attribute - -update_attribute = SibApiV3Sdk::UpdateAttribute.new # UpdateAttribute | Values to update an attribute - - -begin - #Update contact attribute - api_instance.update_attribute(attribute_category, attribute_name, update_attribute) -rescue SibApiV3Sdk::ApiError => e - puts "Exception when calling AttributesApi->update_attribute: #{e}" -end -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **attribute_category** | **String**| Category of the attribute | - **attribute_name** | **String**| Name of the existing attribute | - **update_attribute** | [**UpdateAttribute**](UpdateAttribute.md)| Values to update an attribute | - -### Return type - -nil (empty response body) - -### Authorization - -[api-key](../README.md#api-key), [partner-key](../README.md#partner-key) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - - - diff --git a/docs/Body.md b/docs/Body.md index 8ab102c..4595c35 100644 --- a/docs/Body.md +++ b/docs/Body.md @@ -5,5 +5,6 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **name** | **String** | Name of company | **attributes** | **Object** | Attributes for company creation | [optional] +**country_code** | **Integer** | Country code if phone_number is passed in attributes. | [optional] diff --git a/docs/Body1.md b/docs/Body1.md index b4d72b3..29de168 100644 --- a/docs/Body1.md +++ b/docs/Body1.md @@ -5,5 +5,6 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **name** | **String** | Name of company | [optional] **attributes** | **Object** | Attributes for company update | [optional] +**country_code** | **Integer** | Country code if phone_number is passed in attributes. | [optional] diff --git a/docs/Body10.md b/docs/Body10.md index a98306a..eda356b 100644 --- a/docs/Body10.md +++ b/docs/Body10.md @@ -3,9 +3,9 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**visitor_id** | **String** | visitor’s ID received from a webhook or generated by you to <a href=\"https://developers.sendinblue.com/docs/customize-the-widget#identifying-existing-users\">bind existing user account to Conversations</a> | +**visitor_id** | **String** | visitor’s ID received <a href=\"https://developers.sendinblue.com/docs/conversations-webhooks\">from a webhook</a> or generated by you to <a href=\"https://developers.sendinblue.com/docs/customize-the-widget#identifying-existing-users\">bind existing user account to Conversations</a> | **text** | **String** | message text | -**agent_id** | **String** | agent ID. It can be found on agent’s page or received from a webhook. Optional if `groupId` is set. | [optional] +**agent_id** | **String** | agent ID. It can be found on agent’s page or received <a href=\"https://developers.sendinblue.com/docs/conversations-webhooks\">from a webhook</a>. Optional if `groupId` is set. | [optional] **group_id** | **String** | group ID. It can be found on group’s page. Optional if `agentId` is set. | [optional] diff --git a/docs/Body12.md b/docs/Body12.md index 4599f7c..cfbf584 100644 --- a/docs/Body12.md +++ b/docs/Body12.md @@ -3,7 +3,7 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**agent_id** | **String** | agent ID. It can be found on agent’s page or received from a webhook. Alternatively, you can use `agentEmail` + `agentName` + `receivedFrom` instead (all 3 fields required). | [optional] +**agent_id** | **String** | agent ID. It can be found on agent’s page or received <a href=\"https://developers.sendinblue.com/docs/conversations-webhooks\">from a webhook</a>. Alternatively, you can use `agentEmail` + `agentName` + `receivedFrom` instead (all 3 fields required). | [optional] **received_from** | **String** | mark your messages to distinguish messages created by you from the others. | [optional] **agent_email** | **String** | agent email. When sending online pings from a standalone system, it’s hard to maintain a 1-to-1 relationship between the users of both systems. In this case, an agent can be specified by their email address. If there’s no agent with the specified email address in your Sendinblue organization, a dummy agent will be created automatically. | [optional] **agent_name** | **String** | agent name. | [optional] diff --git a/docs/Body8.md b/docs/Body8.md index ae58c59..2499ab4 100644 --- a/docs/Body8.md +++ b/docs/Body8.md @@ -3,9 +3,9 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**visitor_id** | **String** | visitor’s ID received from a webhook or generated by you to <a href=\"https://developers.sendinblue.com/docs/customize-the-widget#identifying-existing-users\">bind existing user account to Conversations</a> | +**visitor_id** | **String** | visitor’s ID received <a href=\"https://developers.sendinblue.com/docs/conversations-webhooks\">from a webhook</a> or generated by you to <a href=\"https://developers.sendinblue.com/docs/customize-the-widget#identifying-existing-users\">bind existing user account to Conversations</a> | **text** | **String** | message text | -**agent_id** | **String** | agent ID. It can be found on agent’s page or received from a webhook. Alternatively, you can use `agentEmail` + `agentName` + `receivedFrom` instead (all 3 fields required). | [optional] +**agent_id** | **String** | agent ID. It can be found on agent’s page or received <a href=\"https://developers.sendinblue.com/docs/conversations-webhooks\">from a webhook</a>. Alternatively, you can use `agentEmail` + `agentName` + `receivedFrom` instead (all 3 fields required). | [optional] **received_from** | **String** | mark your messages to distinguish messages created by you from the others. | [optional] **agent_email** | **String** | agent email. When sending messages from a standalone system, it’s hard to maintain a 1-to-1 relationship between the users of both systems. In this case, an agent can be specified by their email address. | [optional] **agent_name** | **String** | agent name | [optional] diff --git a/docs/CreateEmailCampaign.md b/docs/CreateEmailCampaign.md index 3b28306..6606f90 100644 --- a/docs/CreateEmailCampaign.md +++ b/docs/CreateEmailCampaign.md @@ -31,5 +31,7 @@ Name | Type | Description | Notes **ip_warmup_enable** | **BOOLEAN** | Available for dedicated ip clients. Set this to true if you wish to warm up your ip. | [optional] [default to false] **initial_quota** | **Integer** | Mandatory if ipWarmupEnable is set to true. Set an initial quota greater than 1 for warming up your ip. We recommend you set a value of 3000. | [optional] **increase_rate** | **Integer** | Mandatory if ipWarmupEnable is set to true. Set a percentage increase rate for warming up your ip. We recommend you set the increase rate to 30% per day. If you want to send the same number of emails every day, set the daily increase value to 0%. | [optional] +**unsubscription_page_id** | **String** | Enter an unsubscription page id. The page id is a 24 digit alphanumeric id that can be found in the URL when editing the page. If not entered, then the default unsubscription page will be used. | [optional] +**update_form_id** | **String** | Mandatory if templateId is used containing the {{ update_profile }} tag. Enter an update profile form id. The form id is a 24 digit alphanumeric id that can be found in the URL when editing the form. If not entered, then the default update profile form will be used. | [optional] diff --git a/docs/CreateEmailCampaignRecipients.md b/docs/CreateEmailCampaignRecipients.md index 191d952..ce16e77 100644 --- a/docs/CreateEmailCampaignRecipients.md +++ b/docs/CreateEmailCampaignRecipients.md @@ -5,5 +5,6 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **exclusion_list_ids** | **Array<Integer>** | List ids to exclude from the campaign | [optional] **list_ids** | **Array<Integer>** | Mandatory if scheduledAt is not empty. List Ids to send the campaign to | [optional] +**segment_ids** | **Array<Integer>** | Mandatory if listIds are not used. Segment ids to send the campaign to. | [optional] diff --git a/docs/FoldersApi.md b/docs/FoldersApi.md deleted file mode 100644 index 37eccd9..0000000 --- a/docs/FoldersApi.md +++ /dev/null @@ -1,372 +0,0 @@ -# SibApiV3Sdk::FoldersApi - -All URIs are relative to *https://api.sendinblue.com/v3* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**create_folder**](FoldersApi.md#create_folder) | **POST** /contacts/folders | Create a folder -[**delete_folder**](FoldersApi.md#delete_folder) | **DELETE** /contacts/folders/{folderId} | Delete a folder (and all its lists) -[**get_folder**](FoldersApi.md#get_folder) | **GET** /contacts/folders/{folderId} | Returns a folder's details -[**get_folder_lists**](FoldersApi.md#get_folder_lists) | **GET** /contacts/folders/{folderId}/lists | Get lists in a folder -[**get_folders**](FoldersApi.md#get_folders) | **GET** /contacts/folders | Get all folders -[**update_folder**](FoldersApi.md#update_folder) | **PUT** /contacts/folders/{folderId} | Update a folder - - -# **create_folder** -> CreateModel create_folder(create_folder) - -Create a folder - -### Example -```ruby -# load the gem -require 'sib-api-v3-sdk' -# setup authorization -SibApiV3Sdk.configure do |config| - # Configure API key authorization: api-key - config.api_key['api-key'] = 'YOUR API KEY' - # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil) - #config.api_key_prefix['api-key'] = 'Bearer' - - # Configure API key authorization: partner-key - config.api_key['partner-key'] = 'YOUR API KEY' - # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil) - #config.api_key_prefix['partner-key'] = 'Bearer' -end - -api_instance = SibApiV3Sdk::FoldersApi.new - -create_folder = SibApiV3Sdk::CreateUpdateFolder.new # CreateUpdateFolder | Name of the folder - - -begin - #Create a folder - result = api_instance.create_folder(create_folder) - p result -rescue SibApiV3Sdk::ApiError => e - puts "Exception when calling FoldersApi->create_folder: #{e}" -end -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **create_folder** | [**CreateUpdateFolder**](CreateUpdateFolder.md)| Name of the folder | - -### Return type - -[**CreateModel**](CreateModel.md) - -### Authorization - -[api-key](../README.md#api-key), [partner-key](../README.md#partner-key) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - - - -# **delete_folder** -> delete_folder(folder_id) - -Delete a folder (and all its lists) - -### Example -```ruby -# load the gem -require 'sib-api-v3-sdk' -# setup authorization -SibApiV3Sdk.configure do |config| - # Configure API key authorization: api-key - config.api_key['api-key'] = 'YOUR API KEY' - # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil) - #config.api_key_prefix['api-key'] = 'Bearer' - - # Configure API key authorization: partner-key - config.api_key['partner-key'] = 'YOUR API KEY' - # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil) - #config.api_key_prefix['partner-key'] = 'Bearer' -end - -api_instance = SibApiV3Sdk::FoldersApi.new - -folder_id = 789 # Integer | Id of the folder - - -begin - #Delete a folder (and all its lists) - api_instance.delete_folder(folder_id) -rescue SibApiV3Sdk::ApiError => e - puts "Exception when calling FoldersApi->delete_folder: #{e}" -end -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **folder_id** | **Integer**| Id of the folder | - -### Return type - -nil (empty response body) - -### Authorization - -[api-key](../README.md#api-key), [partner-key](../README.md#partner-key) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - - - -# **get_folder** -> GetFolder get_folder(folder_id) - -Returns a folder's details - -### Example -```ruby -# load the gem -require 'sib-api-v3-sdk' -# setup authorization -SibApiV3Sdk.configure do |config| - # Configure API key authorization: api-key - config.api_key['api-key'] = 'YOUR API KEY' - # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil) - #config.api_key_prefix['api-key'] = 'Bearer' - - # Configure API key authorization: partner-key - config.api_key['partner-key'] = 'YOUR API KEY' - # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil) - #config.api_key_prefix['partner-key'] = 'Bearer' -end - -api_instance = SibApiV3Sdk::FoldersApi.new - -folder_id = 789 # Integer | id of the folder - - -begin - #Returns a folder's details - result = api_instance.get_folder(folder_id) - p result -rescue SibApiV3Sdk::ApiError => e - puts "Exception when calling FoldersApi->get_folder: #{e}" -end -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **folder_id** | **Integer**| id of the folder | - -### Return type - -[**GetFolder**](GetFolder.md) - -### Authorization - -[api-key](../README.md#api-key), [partner-key](../README.md#partner-key) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - - - -# **get_folder_lists** -> GetFolderLists get_folder_lists(folder_id, opts) - -Get lists in a folder - -### Example -```ruby -# load the gem -require 'sib-api-v3-sdk' -# setup authorization -SibApiV3Sdk.configure do |config| - # Configure API key authorization: api-key - config.api_key['api-key'] = 'YOUR API KEY' - # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil) - #config.api_key_prefix['api-key'] = 'Bearer' - - # Configure API key authorization: partner-key - config.api_key['partner-key'] = 'YOUR API KEY' - # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil) - #config.api_key_prefix['partner-key'] = 'Bearer' -end - -api_instance = SibApiV3Sdk::FoldersApi.new - -folder_id = 789 # Integer | Id of the folder - -opts = { - limit: 10, # Integer | Number of documents per page - offset: 0, # Integer | Index of the first document of the page - sort: 'desc' # String | Sort the results in the ascending/descending order of record creation. Default order is **descending** if `sort` is not passed -} - -begin - #Get lists in a folder - result = api_instance.get_folder_lists(folder_id, opts) - p result -rescue SibApiV3Sdk::ApiError => e - puts "Exception when calling FoldersApi->get_folder_lists: #{e}" -end -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **folder_id** | **Integer**| Id of the folder | - **limit** | **Integer**| Number of documents per page | [optional] [default to 10] - **offset** | **Integer**| Index of the first document of the page | [optional] [default to 0] - **sort** | **String**| Sort the results in the ascending/descending order of record creation. Default order is **descending** if `sort` is not passed | [optional] [default to desc] - -### Return type - -[**GetFolderLists**](GetFolderLists.md) - -### Authorization - -[api-key](../README.md#api-key), [partner-key](../README.md#partner-key) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - - - -# **get_folders** -> GetFolders get_folders(limit, offset, opts) - -Get all folders - -### Example -```ruby -# load the gem -require 'sib-api-v3-sdk' -# setup authorization -SibApiV3Sdk.configure do |config| - # Configure API key authorization: api-key - config.api_key['api-key'] = 'YOUR API KEY' - # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil) - #config.api_key_prefix['api-key'] = 'Bearer' - - # Configure API key authorization: partner-key - config.api_key['partner-key'] = 'YOUR API KEY' - # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil) - #config.api_key_prefix['partner-key'] = 'Bearer' -end - -api_instance = SibApiV3Sdk::FoldersApi.new - -limit = 10 # Integer | Number of documents per page - -offset = 0 # Integer | Index of the first document of the page - -opts = { - sort: 'desc' # String | Sort the results in the ascending/descending order of record creation. Default order is **descending** if `sort` is not passed -} - -begin - #Get all folders - result = api_instance.get_folders(limit, offset, opts) - p result -rescue SibApiV3Sdk::ApiError => e - puts "Exception when calling FoldersApi->get_folders: #{e}" -end -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **limit** | **Integer**| Number of documents per page | [default to 10] - **offset** | **Integer**| Index of the first document of the page | [default to 0] - **sort** | **String**| Sort the results in the ascending/descending order of record creation. Default order is **descending** if `sort` is not passed | [optional] [default to desc] - -### Return type - -[**GetFolders**](GetFolders.md) - -### Authorization - -[api-key](../README.md#api-key), [partner-key](../README.md#partner-key) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - - - -# **update_folder** -> update_folder(folder_id, update_folder) - -Update a folder - -### Example -```ruby -# load the gem -require 'sib-api-v3-sdk' -# setup authorization -SibApiV3Sdk.configure do |config| - # Configure API key authorization: api-key - config.api_key['api-key'] = 'YOUR API KEY' - # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil) - #config.api_key_prefix['api-key'] = 'Bearer' - - # Configure API key authorization: partner-key - config.api_key['partner-key'] = 'YOUR API KEY' - # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil) - #config.api_key_prefix['partner-key'] = 'Bearer' -end - -api_instance = SibApiV3Sdk::FoldersApi.new - -folder_id = 789 # Integer | Id of the folder - -update_folder = SibApiV3Sdk::CreateUpdateFolder.new # CreateUpdateFolder | Name of the folder - - -begin - #Update a folder - api_instance.update_folder(folder_id, update_folder) -rescue SibApiV3Sdk::ApiError => e - puts "Exception when calling FoldersApi->update_folder: #{e}" -end -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **folder_id** | **Integer**| Id of the folder | - **update_folder** | [**CreateUpdateFolder**](CreateUpdateFolder.md)| Name of the folder | - -### Return type - -nil (empty response body) - -### Authorization - -[api-key](../README.md#api-key), [partner-key](../README.md#partner-key) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - - - diff --git a/docs/ListsApi.md b/docs/ListsApi.md deleted file mode 100644 index 6d3c6fd..0000000 --- a/docs/ListsApi.md +++ /dev/null @@ -1,560 +0,0 @@ -# SibApiV3Sdk::ListsApi - -All URIs are relative to *https://api.sendinblue.com/v3* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**add_contact_to_list**](ListsApi.md#add_contact_to_list) | **POST** /contacts/lists/{listId}/contacts/add | Add existing contacts to a list -[**create_list**](ListsApi.md#create_list) | **POST** /contacts/lists | Create a list -[**delete_list**](ListsApi.md#delete_list) | **DELETE** /contacts/lists/{listId} | Delete a list -[**get_contacts_from_list**](ListsApi.md#get_contacts_from_list) | **GET** /contacts/lists/{listId}/contacts | Get contacts in a list -[**get_folder_lists**](ListsApi.md#get_folder_lists) | **GET** /contacts/folders/{folderId}/lists | Get lists in a folder -[**get_list**](ListsApi.md#get_list) | **GET** /contacts/lists/{listId} | Get a list's details -[**get_lists**](ListsApi.md#get_lists) | **GET** /contacts/lists | Get all the lists -[**remove_contact_from_list**](ListsApi.md#remove_contact_from_list) | **POST** /contacts/lists/{listId}/contacts/remove | Delete a contact from a list -[**update_list**](ListsApi.md#update_list) | **PUT** /contacts/lists/{listId} | Update a list - - -# **add_contact_to_list** -> PostContactInfo add_contact_to_list(list_id, contact_emails) - -Add existing contacts to a list - -### Example -```ruby -# load the gem -require 'sib-api-v3-sdk' -# setup authorization -SibApiV3Sdk.configure do |config| - # Configure API key authorization: api-key - config.api_key['api-key'] = 'YOUR API KEY' - # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil) - #config.api_key_prefix['api-key'] = 'Bearer' - - # Configure API key authorization: partner-key - config.api_key['partner-key'] = 'YOUR API KEY' - # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil) - #config.api_key_prefix['partner-key'] = 'Bearer' -end - -api_instance = SibApiV3Sdk::ListsApi.new - -list_id = 789 # Integer | Id of the list - -contact_emails = SibApiV3Sdk::AddContactToList.new # AddContactToList | Emails addresses OR IDs of the contacts - - -begin - #Add existing contacts to a list - result = api_instance.add_contact_to_list(list_id, contact_emails) - p result -rescue SibApiV3Sdk::ApiError => e - puts "Exception when calling ListsApi->add_contact_to_list: #{e}" -end -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **list_id** | **Integer**| Id of the list | - **contact_emails** | [**AddContactToList**](AddContactToList.md)| Emails addresses OR IDs of the contacts | - -### Return type - -[**PostContactInfo**](PostContactInfo.md) - -### Authorization - -[api-key](../README.md#api-key), [partner-key](../README.md#partner-key) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - - - -# **create_list** -> CreateModel create_list(create_list) - -Create a list - -### Example -```ruby -# load the gem -require 'sib-api-v3-sdk' -# setup authorization -SibApiV3Sdk.configure do |config| - # Configure API key authorization: api-key - config.api_key['api-key'] = 'YOUR API KEY' - # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil) - #config.api_key_prefix['api-key'] = 'Bearer' - - # Configure API key authorization: partner-key - config.api_key['partner-key'] = 'YOUR API KEY' - # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil) - #config.api_key_prefix['partner-key'] = 'Bearer' -end - -api_instance = SibApiV3Sdk::ListsApi.new - -create_list = SibApiV3Sdk::CreateList.new # CreateList | Values to create a list - - -begin - #Create a list - result = api_instance.create_list(create_list) - p result -rescue SibApiV3Sdk::ApiError => e - puts "Exception when calling ListsApi->create_list: #{e}" -end -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **create_list** | [**CreateList**](CreateList.md)| Values to create a list | - -### Return type - -[**CreateModel**](CreateModel.md) - -### Authorization - -[api-key](../README.md#api-key), [partner-key](../README.md#partner-key) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - - - -# **delete_list** -> delete_list(list_id) - -Delete a list - -### Example -```ruby -# load the gem -require 'sib-api-v3-sdk' -# setup authorization -SibApiV3Sdk.configure do |config| - # Configure API key authorization: api-key - config.api_key['api-key'] = 'YOUR API KEY' - # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil) - #config.api_key_prefix['api-key'] = 'Bearer' - - # Configure API key authorization: partner-key - config.api_key['partner-key'] = 'YOUR API KEY' - # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil) - #config.api_key_prefix['partner-key'] = 'Bearer' -end - -api_instance = SibApiV3Sdk::ListsApi.new - -list_id = 789 # Integer | Id of the list - - -begin - #Delete a list - api_instance.delete_list(list_id) -rescue SibApiV3Sdk::ApiError => e - puts "Exception when calling ListsApi->delete_list: #{e}" -end -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **list_id** | **Integer**| Id of the list | - -### Return type - -nil (empty response body) - -### Authorization - -[api-key](../README.md#api-key), [partner-key](../README.md#partner-key) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - - - -# **get_contacts_from_list** -> GetContacts get_contacts_from_list(list_id, opts) - -Get contacts in a list - -### Example -```ruby -# load the gem -require 'sib-api-v3-sdk' -# setup authorization -SibApiV3Sdk.configure do |config| - # Configure API key authorization: api-key - config.api_key['api-key'] = 'YOUR API KEY' - # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil) - #config.api_key_prefix['api-key'] = 'Bearer' - - # Configure API key authorization: partner-key - config.api_key['partner-key'] = 'YOUR API KEY' - # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil) - #config.api_key_prefix['partner-key'] = 'Bearer' -end - -api_instance = SibApiV3Sdk::ListsApi.new - -list_id = 789 # Integer | Id of the list - -opts = { - modified_since: 'modified_since_example', # String | Filter (urlencoded) the contacts modified after a given UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ). Prefer to pass your timezone in date-time format for accurate result. - limit: 50, # Integer | Number of documents per page - offset: 0, # Integer | Index of the first document of the page - sort: 'desc' # String | Sort the results in the ascending/descending order of record creation. Default order is **descending** if `sort` is not passed -} - -begin - #Get contacts in a list - result = api_instance.get_contacts_from_list(list_id, opts) - p result -rescue SibApiV3Sdk::ApiError => e - puts "Exception when calling ListsApi->get_contacts_from_list: #{e}" -end -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **list_id** | **Integer**| Id of the list | - **modified_since** | **String**| Filter (urlencoded) the contacts modified after a given UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ). Prefer to pass your timezone in date-time format for accurate result. | [optional] - **limit** | **Integer**| Number of documents per page | [optional] [default to 50] - **offset** | **Integer**| Index of the first document of the page | [optional] [default to 0] - **sort** | **String**| Sort the results in the ascending/descending order of record creation. Default order is **descending** if `sort` is not passed | [optional] [default to desc] - -### Return type - -[**GetContacts**](GetContacts.md) - -### Authorization - -[api-key](../README.md#api-key), [partner-key](../README.md#partner-key) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - - - -# **get_folder_lists** -> GetFolderLists get_folder_lists(folder_id, opts) - -Get lists in a folder - -### Example -```ruby -# load the gem -require 'sib-api-v3-sdk' -# setup authorization -SibApiV3Sdk.configure do |config| - # Configure API key authorization: api-key - config.api_key['api-key'] = 'YOUR API KEY' - # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil) - #config.api_key_prefix['api-key'] = 'Bearer' - - # Configure API key authorization: partner-key - config.api_key['partner-key'] = 'YOUR API KEY' - # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil) - #config.api_key_prefix['partner-key'] = 'Bearer' -end - -api_instance = SibApiV3Sdk::ListsApi.new - -folder_id = 789 # Integer | Id of the folder - -opts = { - limit: 10, # Integer | Number of documents per page - offset: 0, # Integer | Index of the first document of the page - sort: 'desc' # String | Sort the results in the ascending/descending order of record creation. Default order is **descending** if `sort` is not passed -} - -begin - #Get lists in a folder - result = api_instance.get_folder_lists(folder_id, opts) - p result -rescue SibApiV3Sdk::ApiError => e - puts "Exception when calling ListsApi->get_folder_lists: #{e}" -end -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **folder_id** | **Integer**| Id of the folder | - **limit** | **Integer**| Number of documents per page | [optional] [default to 10] - **offset** | **Integer**| Index of the first document of the page | [optional] [default to 0] - **sort** | **String**| Sort the results in the ascending/descending order of record creation. Default order is **descending** if `sort` is not passed | [optional] [default to desc] - -### Return type - -[**GetFolderLists**](GetFolderLists.md) - -### Authorization - -[api-key](../README.md#api-key), [partner-key](../README.md#partner-key) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - - - -# **get_list** -> GetExtendedList get_list(list_id) - -Get a list's details - -### Example -```ruby -# load the gem -require 'sib-api-v3-sdk' -# setup authorization -SibApiV3Sdk.configure do |config| - # Configure API key authorization: api-key - config.api_key['api-key'] = 'YOUR API KEY' - # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil) - #config.api_key_prefix['api-key'] = 'Bearer' - - # Configure API key authorization: partner-key - config.api_key['partner-key'] = 'YOUR API KEY' - # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil) - #config.api_key_prefix['partner-key'] = 'Bearer' -end - -api_instance = SibApiV3Sdk::ListsApi.new - -list_id = 789 # Integer | Id of the list - - -begin - #Get a list's details - result = api_instance.get_list(list_id) - p result -rescue SibApiV3Sdk::ApiError => e - puts "Exception when calling ListsApi->get_list: #{e}" -end -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **list_id** | **Integer**| Id of the list | - -### Return type - -[**GetExtendedList**](GetExtendedList.md) - -### Authorization - -[api-key](../README.md#api-key), [partner-key](../README.md#partner-key) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - - - -# **get_lists** -> GetLists get_lists(opts) - -Get all the lists - -### Example -```ruby -# load the gem -require 'sib-api-v3-sdk' -# setup authorization -SibApiV3Sdk.configure do |config| - # Configure API key authorization: api-key - config.api_key['api-key'] = 'YOUR API KEY' - # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil) - #config.api_key_prefix['api-key'] = 'Bearer' - - # Configure API key authorization: partner-key - config.api_key['partner-key'] = 'YOUR API KEY' - # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil) - #config.api_key_prefix['partner-key'] = 'Bearer' -end - -api_instance = SibApiV3Sdk::ListsApi.new - -opts = { - limit: 10, # Integer | Number of documents per page - offset: 0, # Integer | Index of the first document of the page - sort: 'desc' # String | Sort the results in the ascending/descending order of record creation. Default order is **descending** if `sort` is not passed -} - -begin - #Get all the lists - result = api_instance.get_lists(opts) - p result -rescue SibApiV3Sdk::ApiError => e - puts "Exception when calling ListsApi->get_lists: #{e}" -end -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **limit** | **Integer**| Number of documents per page | [optional] [default to 10] - **offset** | **Integer**| Index of the first document of the page | [optional] [default to 0] - **sort** | **String**| Sort the results in the ascending/descending order of record creation. Default order is **descending** if `sort` is not passed | [optional] [default to desc] - -### Return type - -[**GetLists**](GetLists.md) - -### Authorization - -[api-key](../README.md#api-key), [partner-key](../README.md#partner-key) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - - - -# **remove_contact_from_list** -> PostContactInfo remove_contact_from_list(list_id, contact_emails) - -Delete a contact from a list - -### Example -```ruby -# load the gem -require 'sib-api-v3-sdk' -# setup authorization -SibApiV3Sdk.configure do |config| - # Configure API key authorization: api-key - config.api_key['api-key'] = 'YOUR API KEY' - # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil) - #config.api_key_prefix['api-key'] = 'Bearer' - - # Configure API key authorization: partner-key - config.api_key['partner-key'] = 'YOUR API KEY' - # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil) - #config.api_key_prefix['partner-key'] = 'Bearer' -end - -api_instance = SibApiV3Sdk::ListsApi.new - -list_id = 789 # Integer | Id of the list - -contact_emails = SibApiV3Sdk::RemoveContactFromList.new # RemoveContactFromList | Emails addresses OR IDs of the contacts - - -begin - #Delete a contact from a list - result = api_instance.remove_contact_from_list(list_id, contact_emails) - p result -rescue SibApiV3Sdk::ApiError => e - puts "Exception when calling ListsApi->remove_contact_from_list: #{e}" -end -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **list_id** | **Integer**| Id of the list | - **contact_emails** | [**RemoveContactFromList**](RemoveContactFromList.md)| Emails addresses OR IDs of the contacts | - -### Return type - -[**PostContactInfo**](PostContactInfo.md) - -### Authorization - -[api-key](../README.md#api-key), [partner-key](../README.md#partner-key) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - - - -# **update_list** -> update_list(list_id, update_list) - -Update a list - -### Example -```ruby -# load the gem -require 'sib-api-v3-sdk' -# setup authorization -SibApiV3Sdk.configure do |config| - # Configure API key authorization: api-key - config.api_key['api-key'] = 'YOUR API KEY' - # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil) - #config.api_key_prefix['api-key'] = 'Bearer' - - # Configure API key authorization: partner-key - config.api_key['partner-key'] = 'YOUR API KEY' - # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil) - #config.api_key_prefix['partner-key'] = 'Bearer' -end - -api_instance = SibApiV3Sdk::ListsApi.new - -list_id = 789 # Integer | Id of the list - -update_list = SibApiV3Sdk::UpdateList.new # UpdateList | Values to update a list - - -begin - #Update a list - api_instance.update_list(list_id, update_list) -rescue SibApiV3Sdk::ApiError => e - puts "Exception when calling ListsApi->update_list: #{e}" -end -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **list_id** | **Integer**| Id of the list | - **update_list** | [**UpdateList**](UpdateList.md)| Values to update a list | - -### Return type - -nil (empty response body) - -### Authorization - -[api-key](../README.md#api-key), [partner-key](../README.md#partner-key) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - - - diff --git a/docs/NoteData.md b/docs/NoteData.md index 5ae6704..c9e62cd 100644 --- a/docs/NoteData.md +++ b/docs/NoteData.md @@ -6,5 +6,6 @@ Name | Type | Description | Notes **text** | **String** | Text content of a note | **contact_ids** | **Array<Integer>** | Contact Ids linked to a note | [optional] **deal_ids** | **Array<String>** | Deal Ids linked to a note | [optional] +**company_ids** | **Array<String>** | Company Ids linked to a note | [optional] diff --git a/docs/TransactionalEmailsApi.md b/docs/TransactionalEmailsApi.md index 64c293a..c76ab10 100644 --- a/docs/TransactionalEmailsApi.md +++ b/docs/TransactionalEmailsApi.md @@ -520,7 +520,7 @@ end api_instance = SibApiV3Sdk::TransactionalEmailsApi.new opts = { - limit: 50, # Integer | Number limitation for the result returned + limit: 2500, # Integer | Number limitation for the result returned offset: 0, # Integer | Beginning point in the list to retrieve from. start_date: 'start_date_example', # String | Mandatory if endDate is used. Starting date of the report (YYYY-MM-DD). Must be lower than equal to endDate end_date: 'end_date_example', # String | Mandatory if startDate is used. Ending date of the report (YYYY-MM-DD). Must be greater than equal to startDate @@ -546,7 +546,7 @@ end Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **limit** | **Integer**| Number limitation for the result returned | [optional] [default to 50] + **limit** | **Integer**| Number limitation for the result returned | [optional] [default to 2500] **offset** | **Integer**| Beginning point in the list to retrieve from. | [optional] [default to 0] **start_date** | **String**| Mandatory if endDate is used. Starting date of the report (YYYY-MM-DD). Must be lower than equal to endDate | [optional] **end_date** | **String**| Mandatory if startDate is used. Ending date of the report (YYYY-MM-DD). Must be greater than equal to startDate | [optional] diff --git a/docs/UpdateEmailCampaign.md b/docs/UpdateEmailCampaign.md index 923c522..07a3e91 100644 --- a/docs/UpdateEmailCampaign.md +++ b/docs/UpdateEmailCampaign.md @@ -31,5 +31,7 @@ Name | Type | Description | Notes **ip_warmup_enable** | **BOOLEAN** | Available for dedicated ip clients. Set this to true if you wish to warm up your ip. | [optional] [default to false] **initial_quota** | **Integer** | Set an initial quota greater than 1 for warming up your ip. We recommend you set a value of 3000. | [optional] **increase_rate** | **Integer** | Set a percentage increase rate for warming up your ip. We recommend you set the increase rate to 30% per day. If you want to send the same number of emails every day, set the daily increase value to 0%. | [optional] +**unsubscription_page_id** | **String** | Enter an unsubscription page id. The page id is a 24 digit alphanumeric id that can be found in the URL when editing the page. | [optional] +**update_form_id** | **String** | Mandatory if templateId is used containing the {{ update_profile }} tag. Enter an update profile form id. The form id is a 24 digit alphanumeric id that can be found in the URL when editing the form. | [optional] diff --git a/docs/UpdateEmailCampaignRecipients.md b/docs/UpdateEmailCampaignRecipients.md index 7ca86ac..41844c8 100644 --- a/docs/UpdateEmailCampaignRecipients.md +++ b/docs/UpdateEmailCampaignRecipients.md @@ -4,6 +4,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **exclusion_list_ids** | **Array<Integer>** | List ids which have to be excluded from a campaign | [optional] -**list_ids** | **Array<Integer>** | Lists Ids to send the campaign to. REQUIRED if already not present in campaign and scheduledAt is not empty | [optional] +**list_ids** | **Array<Integer>** | Lists Ids to send the campaign to. Campaign should only be updated with listIds if listIds were used to create it. REQUIRED if already not present in campaign and scheduledAt is not empty | [optional] +**segment_ids** | **Array<Integer>** | Mandatory if listIds are not used. Campaign should only be updated with segmentIds if segmentIds were used to create it. Segment ids to send the campaign to. | [optional] diff --git a/lib/sib-api-v3-sdk.rb b/lib/sib-api-v3-sdk.rb index 5c13ab8..9956269 100644 --- a/lib/sib-api-v3-sdk.rb +++ b/lib/sib-api-v3-sdk.rb @@ -276,16 +276,13 @@ # APIs require 'sib-api-v3-sdk/api/account_api' -require 'sib-api-v3-sdk/api/attributes_api' require 'sib-api-v3-sdk/api/companies_api' require 'sib-api-v3-sdk/api/contacts_api' require 'sib-api-v3-sdk/api/conversations_api' require 'sib-api-v3-sdk/api/deals_api' require 'sib-api-v3-sdk/api/email_campaigns_api' require 'sib-api-v3-sdk/api/files_api' -require 'sib-api-v3-sdk/api/folders_api' require 'sib-api-v3-sdk/api/inbound_parsing_api' -require 'sib-api-v3-sdk/api/lists_api' require 'sib-api-v3-sdk/api/master_account_api' require 'sib-api-v3-sdk/api/notes_api' require 'sib-api-v3-sdk/api/process_api' diff --git a/lib/sib-api-v3-sdk/api/attributes_api.rb b/lib/sib-api-v3-sdk/api/attributes_api.rb deleted file mode 100644 index 7e48889..0000000 --- a/lib/sib-api-v3-sdk/api/attributes_api.rb +++ /dev/null @@ -1,274 +0,0 @@ -=begin -#SendinBlue API - -#SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | - -OpenAPI spec version: 3.0.0 -Contact: contact@sendinblue.com -Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: 2.4.19 - -=end - -require 'uri' - -module SibApiV3Sdk - class AttributesApi - attr_accessor :api_client - - def initialize(api_client = ApiClient.default) - @api_client = api_client - end - - # Set custom user_agent if explicitly passed in api - # default will still remain Swagger-Codegen/#{VERSION}/ruby - def setUserAgent(user_agent) - @user_agent = user_agent - if user_agent.is_a?(String) && user_agent.downcase.start_with?('sendinblue_') - @api_client.default_headers['User-Agent'] = @user_agent - end - end - - # Create contact attribute - # @param attribute_category Category of the attribute - # @param attribute_name Name of the attribute - # @param create_attribute Values to create an attribute - # @param [Hash] opts the optional parameters - # @return [nil] - def create_attribute(attribute_category, attribute_name, create_attribute, opts = {}) - create_attribute_with_http_info(attribute_category, attribute_name, create_attribute, opts) - nil - end - - # Create contact attribute - # @param attribute_category Category of the attribute - # @param attribute_name Name of the attribute - # @param create_attribute Values to create an attribute - # @param [Hash] opts the optional parameters - # @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers - def create_attribute_with_http_info(attribute_category, attribute_name, create_attribute, opts = {}) - if @api_client.config.debugging - @api_client.config.logger.debug 'Calling API: AttributesApi.create_attribute ...' - end - # verify the required parameter 'attribute_category' is set - if @api_client.config.client_side_validation && attribute_category.nil? - fail ArgumentError, "Missing the required parameter 'attribute_category' when calling AttributesApi.create_attribute" - end - # verify enum value - if @api_client.config.client_side_validation && !['normal', 'transactional', 'category', 'calculated', 'global'].include?(attribute_category) - fail ArgumentError, "invalid value for 'attribute_category', must be one of normal, transactional, category, calculated, global" - end - # verify the required parameter 'attribute_name' is set - if @api_client.config.client_side_validation && attribute_name.nil? - fail ArgumentError, "Missing the required parameter 'attribute_name' when calling AttributesApi.create_attribute" - end - # verify the required parameter 'create_attribute' is set - if @api_client.config.client_side_validation && create_attribute.nil? - fail ArgumentError, "Missing the required parameter 'create_attribute' when calling AttributesApi.create_attribute" - end - # resource path - local_var_path = '/contacts/attributes/{attributeCategory}/{attributeName}'.sub('{' + 'attributeCategory' + '}', attribute_category.to_s).sub('{' + 'attributeName' + '}', attribute_name.to_s) - - # query parameters - query_params = {} - - # header parameters - header_params = {} - # HTTP header 'Accept' (if needed) - header_params['Accept'] = @api_client.select_header_accept(['application/json']) - # HTTP header 'Content-Type' - header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) - - # form parameters - form_params = {} - - # http body (model) - post_body = @api_client.object_to_http_body(create_attribute) - auth_names = ['api-key', 'partner-key'] - data, status_code, headers = @api_client.call_api(:POST, local_var_path, - :header_params => header_params, - :query_params => query_params, - :form_params => form_params, - :body => post_body, - :auth_names => auth_names) - if @api_client.config.debugging - @api_client.config.logger.debug "API called: AttributesApi#create_attribute\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" - end - return data, status_code, headers - end - # Delete an attribute - # @param attribute_category Category of the attribute - # @param attribute_name Name of the existing attribute - # @param [Hash] opts the optional parameters - # @return [nil] - def delete_attribute(attribute_category, attribute_name, opts = {}) - delete_attribute_with_http_info(attribute_category, attribute_name, opts) - nil - end - - # Delete an attribute - # @param attribute_category Category of the attribute - # @param attribute_name Name of the existing attribute - # @param [Hash] opts the optional parameters - # @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers - def delete_attribute_with_http_info(attribute_category, attribute_name, opts = {}) - if @api_client.config.debugging - @api_client.config.logger.debug 'Calling API: AttributesApi.delete_attribute ...' - end - # verify the required parameter 'attribute_category' is set - if @api_client.config.client_side_validation && attribute_category.nil? - fail ArgumentError, "Missing the required parameter 'attribute_category' when calling AttributesApi.delete_attribute" - end - # verify enum value - if @api_client.config.client_side_validation && !['normal', 'transactional', 'category', 'calculated', 'global'].include?(attribute_category) - fail ArgumentError, "invalid value for 'attribute_category', must be one of normal, transactional, category, calculated, global" - end - # verify the required parameter 'attribute_name' is set - if @api_client.config.client_side_validation && attribute_name.nil? - fail ArgumentError, "Missing the required parameter 'attribute_name' when calling AttributesApi.delete_attribute" - end - # resource path - local_var_path = '/contacts/attributes/{attributeCategory}/{attributeName}'.sub('{' + 'attributeCategory' + '}', attribute_category.to_s).sub('{' + 'attributeName' + '}', attribute_name.to_s) - - # query parameters - query_params = {} - - # header parameters - header_params = {} - # HTTP header 'Accept' (if needed) - header_params['Accept'] = @api_client.select_header_accept(['application/json']) - # HTTP header 'Content-Type' - header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) - - # form parameters - form_params = {} - - # http body (model) - post_body = nil - auth_names = ['api-key', 'partner-key'] - data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, - :header_params => header_params, - :query_params => query_params, - :form_params => form_params, - :body => post_body, - :auth_names => auth_names) - if @api_client.config.debugging - @api_client.config.logger.debug "API called: AttributesApi#delete_attribute\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" - end - return data, status_code, headers - end - # List all attributes - # @param [Hash] opts the optional parameters - # @return [GetAttributes] - def get_attributes(opts = {}) - data, _status_code, _headers = get_attributes_with_http_info(opts) - data - end - - # List all attributes - # @param [Hash] opts the optional parameters - # @return [Array<(GetAttributes, Fixnum, Hash)>] GetAttributes data, response status code and response headers - def get_attributes_with_http_info(opts = {}) - if @api_client.config.debugging - @api_client.config.logger.debug 'Calling API: AttributesApi.get_attributes ...' - end - # resource path - local_var_path = '/contacts/attributes' - - # query parameters - query_params = {} - - # header parameters - header_params = {} - # HTTP header 'Accept' (if needed) - header_params['Accept'] = @api_client.select_header_accept(['application/json']) - # HTTP header 'Content-Type' - header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) - - # form parameters - form_params = {} - - # http body (model) - post_body = nil - auth_names = ['api-key', 'partner-key'] - data, status_code, headers = @api_client.call_api(:GET, local_var_path, - :header_params => header_params, - :query_params => query_params, - :form_params => form_params, - :body => post_body, - :auth_names => auth_names, - :return_type => 'GetAttributes') - if @api_client.config.debugging - @api_client.config.logger.debug "API called: AttributesApi#get_attributes\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" - end - return data, status_code, headers - end - # Update contact attribute - # @param attribute_category Category of the attribute - # @param attribute_name Name of the existing attribute - # @param update_attribute Values to update an attribute - # @param [Hash] opts the optional parameters - # @return [nil] - def update_attribute(attribute_category, attribute_name, update_attribute, opts = {}) - update_attribute_with_http_info(attribute_category, attribute_name, update_attribute, opts) - nil - end - - # Update contact attribute - # @param attribute_category Category of the attribute - # @param attribute_name Name of the existing attribute - # @param update_attribute Values to update an attribute - # @param [Hash] opts the optional parameters - # @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers - def update_attribute_with_http_info(attribute_category, attribute_name, update_attribute, opts = {}) - if @api_client.config.debugging - @api_client.config.logger.debug 'Calling API: AttributesApi.update_attribute ...' - end - # verify the required parameter 'attribute_category' is set - if @api_client.config.client_side_validation && attribute_category.nil? - fail ArgumentError, "Missing the required parameter 'attribute_category' when calling AttributesApi.update_attribute" - end - # verify enum value - if @api_client.config.client_side_validation && !['category', 'calculated', 'global'].include?(attribute_category) - fail ArgumentError, "invalid value for 'attribute_category', must be one of category, calculated, global" - end - # verify the required parameter 'attribute_name' is set - if @api_client.config.client_side_validation && attribute_name.nil? - fail ArgumentError, "Missing the required parameter 'attribute_name' when calling AttributesApi.update_attribute" - end - # verify the required parameter 'update_attribute' is set - if @api_client.config.client_side_validation && update_attribute.nil? - fail ArgumentError, "Missing the required parameter 'update_attribute' when calling AttributesApi.update_attribute" - end - # resource path - local_var_path = '/contacts/attributes/{attributeCategory}/{attributeName}'.sub('{' + 'attributeCategory' + '}', attribute_category.to_s).sub('{' + 'attributeName' + '}', attribute_name.to_s) - - # query parameters - query_params = {} - - # header parameters - header_params = {} - # HTTP header 'Accept' (if needed) - header_params['Accept'] = @api_client.select_header_accept(['application/json']) - # HTTP header 'Content-Type' - header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) - - # form parameters - form_params = {} - - # http body (model) - post_body = @api_client.object_to_http_body(update_attribute) - auth_names = ['api-key', 'partner-key'] - data, status_code, headers = @api_client.call_api(:PUT, local_var_path, - :header_params => header_params, - :query_params => query_params, - :form_params => form_params, - :body => post_body, - :auth_names => auth_names) - if @api_client.config.debugging - @api_client.config.logger.debug "API called: AttributesApi#update_attribute\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" - end - return data, status_code, headers - end - end -end diff --git a/lib/sib-api-v3-sdk/api/contacts_api.rb b/lib/sib-api-v3-sdk/api/contacts_api.rb index a332781..76c1410 100644 --- a/lib/sib-api-v3-sdk/api/contacts_api.rb +++ b/lib/sib-api-v3-sdk/api/contacts_api.rb @@ -766,6 +766,10 @@ def get_contacts_with_http_info(opts = {}) fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling ContactsApi.get_contacts, must be smaller than or equal to 1000.' end + if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] < 0 + fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling ContactsApi.get_contacts, must be greater than or equal to 0.' + end + if @api_client.config.client_side_validation && opts[:'sort'] && !['asc', 'desc'].include?(opts[:'sort']) fail ArgumentError, 'invalid value for "sort", must be one of asc, desc' end @@ -837,6 +841,10 @@ def get_contacts_from_list_with_http_info(list_id, opts = {}) fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling ContactsApi.get_contacts_from_list, must be smaller than or equal to 500.' end + if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] < 0 + fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling ContactsApi.get_contacts_from_list, must be greater than or equal to 0.' + end + if @api_client.config.client_side_validation && opts[:'sort'] && !['asc', 'desc'].include?(opts[:'sort']) fail ArgumentError, 'invalid value for "sort", must be one of asc, desc' end @@ -958,6 +966,10 @@ def get_folder_lists_with_http_info(folder_id, opts = {}) fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling ContactsApi.get_folder_lists, must be smaller than or equal to 50.' end + if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] < 0 + fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling ContactsApi.get_folder_lists, must be greater than or equal to 0.' + end + if @api_client.config.client_side_validation && opts[:'sort'] && !['asc', 'desc'].include?(opts[:'sort']) fail ArgumentError, 'invalid value for "sort", must be one of asc, desc' end @@ -1024,6 +1036,10 @@ def get_folders_with_http_info(limit, offset, opts = {}) fail ArgumentError, 'invalid value for "limit" when calling ContactsApi.get_folders, must be smaller than or equal to 50.' end + if @api_client.config.client_side_validation && limit < 0 + fail ArgumentError, 'invalid value for "limit" when calling ContactsApi.get_folders, must be greater than or equal to 0.' + end + # verify the required parameter 'offset' is set if @api_client.config.client_side_validation && offset.nil? fail ArgumentError, "Missing the required parameter 'offset' when calling ContactsApi.get_folders" @@ -1142,6 +1158,10 @@ def get_lists_with_http_info(opts = {}) fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling ContactsApi.get_lists, must be smaller than or equal to 50.' end + if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] < 0 + fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling ContactsApi.get_lists, must be greater than or equal to 0.' + end + if @api_client.config.client_side_validation && opts[:'sort'] && !['asc', 'desc'].include?(opts[:'sort']) fail ArgumentError, 'invalid value for "sort", must be one of asc, desc' end diff --git a/lib/sib-api-v3-sdk/api/email_campaigns_api.rb b/lib/sib-api-v3-sdk/api/email_campaigns_api.rb index 170070f..8dbfcec 100644 --- a/lib/sib-api-v3-sdk/api/email_campaigns_api.rb +++ b/lib/sib-api-v3-sdk/api/email_campaigns_api.rb @@ -331,6 +331,10 @@ def get_email_campaigns_with_http_info(opts = {}) fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling EmailCampaignsApi.get_email_campaigns, must be smaller than or equal to 100.' end + if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] < 0 + fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling EmailCampaignsApi.get_email_campaigns, must be greater than or equal to 0.' + end + if @api_client.config.client_side_validation && opts[:'sort'] && !['asc', 'desc'].include?(opts[:'sort']) fail ArgumentError, 'invalid value for "sort", must be one of asc, desc' end diff --git a/lib/sib-api-v3-sdk/api/folders_api.rb b/lib/sib-api-v3-sdk/api/folders_api.rb deleted file mode 100644 index a191ab7..0000000 --- a/lib/sib-api-v3-sdk/api/folders_api.rb +++ /dev/null @@ -1,383 +0,0 @@ -=begin -#SendinBlue API - -#SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | - -OpenAPI spec version: 3.0.0 -Contact: contact@sendinblue.com -Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: 2.4.19 - -=end - -require 'uri' - -module SibApiV3Sdk - class FoldersApi - attr_accessor :api_client - - def initialize(api_client = ApiClient.default) - @api_client = api_client - end - - # Set custom user_agent if explicitly passed in api - # default will still remain Swagger-Codegen/#{VERSION}/ruby - def setUserAgent(user_agent) - @user_agent = user_agent - if user_agent.is_a?(String) && user_agent.downcase.start_with?('sendinblue_') - @api_client.default_headers['User-Agent'] = @user_agent - end - end - - # Create a folder - # @param create_folder Name of the folder - # @param [Hash] opts the optional parameters - # @return [CreateModel] - def create_folder(create_folder, opts = {}) - data, _status_code, _headers = create_folder_with_http_info(create_folder, opts) - data - end - - # Create a folder - # @param create_folder Name of the folder - # @param [Hash] opts the optional parameters - # @return [Array<(CreateModel, Fixnum, Hash)>] CreateModel data, response status code and response headers - def create_folder_with_http_info(create_folder, opts = {}) - if @api_client.config.debugging - @api_client.config.logger.debug 'Calling API: FoldersApi.create_folder ...' - end - # verify the required parameter 'create_folder' is set - if @api_client.config.client_side_validation && create_folder.nil? - fail ArgumentError, "Missing the required parameter 'create_folder' when calling FoldersApi.create_folder" - end - # resource path - local_var_path = '/contacts/folders' - - # query parameters - query_params = {} - - # header parameters - header_params = {} - # HTTP header 'Accept' (if needed) - header_params['Accept'] = @api_client.select_header_accept(['application/json']) - # HTTP header 'Content-Type' - header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) - - # form parameters - form_params = {} - - # http body (model) - post_body = @api_client.object_to_http_body(create_folder) - auth_names = ['api-key', 'partner-key'] - data, status_code, headers = @api_client.call_api(:POST, local_var_path, - :header_params => header_params, - :query_params => query_params, - :form_params => form_params, - :body => post_body, - :auth_names => auth_names, - :return_type => 'CreateModel') - if @api_client.config.debugging - @api_client.config.logger.debug "API called: FoldersApi#create_folder\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" - end - return data, status_code, headers - end - # Delete a folder (and all its lists) - # @param folder_id Id of the folder - # @param [Hash] opts the optional parameters - # @return [nil] - def delete_folder(folder_id, opts = {}) - delete_folder_with_http_info(folder_id, opts) - nil - end - - # Delete a folder (and all its lists) - # @param folder_id Id of the folder - # @param [Hash] opts the optional parameters - # @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers - def delete_folder_with_http_info(folder_id, opts = {}) - if @api_client.config.debugging - @api_client.config.logger.debug 'Calling API: FoldersApi.delete_folder ...' - end - # verify the required parameter 'folder_id' is set - if @api_client.config.client_side_validation && folder_id.nil? - fail ArgumentError, "Missing the required parameter 'folder_id' when calling FoldersApi.delete_folder" - end - # resource path - local_var_path = '/contacts/folders/{folderId}'.sub('{' + 'folderId' + '}', folder_id.to_s) - - # query parameters - query_params = {} - - # header parameters - header_params = {} - # HTTP header 'Accept' (if needed) - header_params['Accept'] = @api_client.select_header_accept(['application/json']) - # HTTP header 'Content-Type' - header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) - - # form parameters - form_params = {} - - # http body (model) - post_body = nil - auth_names = ['api-key', 'partner-key'] - data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, - :header_params => header_params, - :query_params => query_params, - :form_params => form_params, - :body => post_body, - :auth_names => auth_names) - if @api_client.config.debugging - @api_client.config.logger.debug "API called: FoldersApi#delete_folder\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" - end - return data, status_code, headers - end - # Returns a folder's details - # @param folder_id id of the folder - # @param [Hash] opts the optional parameters - # @return [GetFolder] - def get_folder(folder_id, opts = {}) - data, _status_code, _headers = get_folder_with_http_info(folder_id, opts) - data - end - - # Returns a folder's details - # @param folder_id id of the folder - # @param [Hash] opts the optional parameters - # @return [Array<(GetFolder, Fixnum, Hash)>] GetFolder data, response status code and response headers - def get_folder_with_http_info(folder_id, opts = {}) - if @api_client.config.debugging - @api_client.config.logger.debug 'Calling API: FoldersApi.get_folder ...' - end - # verify the required parameter 'folder_id' is set - if @api_client.config.client_side_validation && folder_id.nil? - fail ArgumentError, "Missing the required parameter 'folder_id' when calling FoldersApi.get_folder" - end - # resource path - local_var_path = '/contacts/folders/{folderId}'.sub('{' + 'folderId' + '}', folder_id.to_s) - - # query parameters - query_params = {} - - # header parameters - header_params = {} - # HTTP header 'Accept' (if needed) - header_params['Accept'] = @api_client.select_header_accept(['application/json']) - # HTTP header 'Content-Type' - header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) - - # form parameters - form_params = {} - - # http body (model) - post_body = nil - auth_names = ['api-key', 'partner-key'] - data, status_code, headers = @api_client.call_api(:GET, local_var_path, - :header_params => header_params, - :query_params => query_params, - :form_params => form_params, - :body => post_body, - :auth_names => auth_names, - :return_type => 'GetFolder') - if @api_client.config.debugging - @api_client.config.logger.debug "API called: FoldersApi#get_folder\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" - end - return data, status_code, headers - end - # Get lists in a folder - # @param folder_id Id of the folder - # @param [Hash] opts the optional parameters - # @option opts [Integer] :limit Number of documents per page (default to 10) - # @option opts [Integer] :offset Index of the first document of the page (default to 0) - # @option opts [String] :sort Sort the results in the ascending/descending order of record creation. Default order is **descending** if `sort` is not passed (default to desc) - # @return [GetFolderLists] - def get_folder_lists(folder_id, opts = {}) - data, _status_code, _headers = get_folder_lists_with_http_info(folder_id, opts) - data - end - - # Get lists in a folder - # @param folder_id Id of the folder - # @param [Hash] opts the optional parameters - # @option opts [Integer] :limit Number of documents per page - # @option opts [Integer] :offset Index of the first document of the page - # @option opts [String] :sort Sort the results in the ascending/descending order of record creation. Default order is **descending** if `sort` is not passed - # @return [Array<(GetFolderLists, Fixnum, Hash)>] GetFolderLists data, response status code and response headers - def get_folder_lists_with_http_info(folder_id, opts = {}) - if @api_client.config.debugging - @api_client.config.logger.debug 'Calling API: FoldersApi.get_folder_lists ...' - end - # verify the required parameter 'folder_id' is set - if @api_client.config.client_side_validation && folder_id.nil? - fail ArgumentError, "Missing the required parameter 'folder_id' when calling FoldersApi.get_folder_lists" - end - if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] > 50 - fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling FoldersApi.get_folder_lists, must be smaller than or equal to 50.' - end - - if @api_client.config.client_side_validation && opts[:'sort'] && !['asc', 'desc'].include?(opts[:'sort']) - fail ArgumentError, 'invalid value for "sort", must be one of asc, desc' - end - # resource path - local_var_path = '/contacts/folders/{folderId}/lists'.sub('{' + 'folderId' + '}', folder_id.to_s) - - # query parameters - query_params = {} - query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil? - query_params[:'offset'] = opts[:'offset'] if !opts[:'offset'].nil? - query_params[:'sort'] = opts[:'sort'] if !opts[:'sort'].nil? - - # header parameters - header_params = {} - # HTTP header 'Accept' (if needed) - header_params['Accept'] = @api_client.select_header_accept(['application/json']) - # HTTP header 'Content-Type' - header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) - - # form parameters - form_params = {} - - # http body (model) - post_body = nil - auth_names = ['api-key', 'partner-key'] - data, status_code, headers = @api_client.call_api(:GET, local_var_path, - :header_params => header_params, - :query_params => query_params, - :form_params => form_params, - :body => post_body, - :auth_names => auth_names, - :return_type => 'GetFolderLists') - if @api_client.config.debugging - @api_client.config.logger.debug "API called: FoldersApi#get_folder_lists\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" - end - return data, status_code, headers - end - # Get all folders - # @param limit Number of documents per page - # @param offset Index of the first document of the page - # @param [Hash] opts the optional parameters - # @option opts [String] :sort Sort the results in the ascending/descending order of record creation. Default order is **descending** if `sort` is not passed (default to desc) - # @return [GetFolders] - def get_folders(limit, offset, opts = {}) - data, _status_code, _headers = get_folders_with_http_info(limit, offset, opts) - data - end - - # Get all folders - # @param limit Number of documents per page - # @param offset Index of the first document of the page - # @param [Hash] opts the optional parameters - # @option opts [String] :sort Sort the results in the ascending/descending order of record creation. Default order is **descending** if `sort` is not passed - # @return [Array<(GetFolders, Fixnum, Hash)>] GetFolders data, response status code and response headers - def get_folders_with_http_info(limit, offset, opts = {}) - if @api_client.config.debugging - @api_client.config.logger.debug 'Calling API: FoldersApi.get_folders ...' - end - # verify the required parameter 'limit' is set - if @api_client.config.client_side_validation && limit.nil? - fail ArgumentError, "Missing the required parameter 'limit' when calling FoldersApi.get_folders" - end - if @api_client.config.client_side_validation && limit > 50 - fail ArgumentError, 'invalid value for "limit" when calling FoldersApi.get_folders, must be smaller than or equal to 50.' - end - - # verify the required parameter 'offset' is set - if @api_client.config.client_side_validation && offset.nil? - fail ArgumentError, "Missing the required parameter 'offset' when calling FoldersApi.get_folders" - end - if @api_client.config.client_side_validation && opts[:'sort'] && !['asc', 'desc'].include?(opts[:'sort']) - fail ArgumentError, 'invalid value for "sort", must be one of asc, desc' - end - # resource path - local_var_path = '/contacts/folders' - - # query parameters - query_params = {} - query_params[:'limit'] = limit - query_params[:'offset'] = offset - query_params[:'sort'] = opts[:'sort'] if !opts[:'sort'].nil? - - # header parameters - header_params = {} - # HTTP header 'Accept' (if needed) - header_params['Accept'] = @api_client.select_header_accept(['application/json']) - # HTTP header 'Content-Type' - header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) - - # form parameters - form_params = {} - - # http body (model) - post_body = nil - auth_names = ['api-key', 'partner-key'] - data, status_code, headers = @api_client.call_api(:GET, local_var_path, - :header_params => header_params, - :query_params => query_params, - :form_params => form_params, - :body => post_body, - :auth_names => auth_names, - :return_type => 'GetFolders') - if @api_client.config.debugging - @api_client.config.logger.debug "API called: FoldersApi#get_folders\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" - end - return data, status_code, headers - end - # Update a folder - # @param folder_id Id of the folder - # @param update_folder Name of the folder - # @param [Hash] opts the optional parameters - # @return [nil] - def update_folder(folder_id, update_folder, opts = {}) - update_folder_with_http_info(folder_id, update_folder, opts) - nil - end - - # Update a folder - # @param folder_id Id of the folder - # @param update_folder Name of the folder - # @param [Hash] opts the optional parameters - # @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers - def update_folder_with_http_info(folder_id, update_folder, opts = {}) - if @api_client.config.debugging - @api_client.config.logger.debug 'Calling API: FoldersApi.update_folder ...' - end - # verify the required parameter 'folder_id' is set - if @api_client.config.client_side_validation && folder_id.nil? - fail ArgumentError, "Missing the required parameter 'folder_id' when calling FoldersApi.update_folder" - end - # verify the required parameter 'update_folder' is set - if @api_client.config.client_side_validation && update_folder.nil? - fail ArgumentError, "Missing the required parameter 'update_folder' when calling FoldersApi.update_folder" - end - # resource path - local_var_path = '/contacts/folders/{folderId}'.sub('{' + 'folderId' + '}', folder_id.to_s) - - # query parameters - query_params = {} - - # header parameters - header_params = {} - # HTTP header 'Accept' (if needed) - header_params['Accept'] = @api_client.select_header_accept(['application/json']) - # HTTP header 'Content-Type' - header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) - - # form parameters - form_params = {} - - # http body (model) - post_body = @api_client.object_to_http_body(update_folder) - auth_names = ['api-key', 'partner-key'] - data, status_code, headers = @api_client.call_api(:PUT, local_var_path, - :header_params => header_params, - :query_params => query_params, - :form_params => form_params, - :body => post_body, - :auth_names => auth_names) - if @api_client.config.debugging - @api_client.config.logger.debug "API called: FoldersApi#update_folder\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" - end - return data, status_code, headers - end - end -end diff --git a/lib/sib-api-v3-sdk/api/inbound_parsing_api.rb b/lib/sib-api-v3-sdk/api/inbound_parsing_api.rb index 8e4fafb..be80d94 100644 --- a/lib/sib-api-v3-sdk/api/inbound_parsing_api.rb +++ b/lib/sib-api-v3-sdk/api/inbound_parsing_api.rb @@ -115,6 +115,10 @@ def get_inbound_email_events_with_http_info(opts = {}) fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling InboundParsingApi.get_inbound_email_events, must be smaller than or equal to 500.' end + if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] < 0 + fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling InboundParsingApi.get_inbound_email_events, must be greater than or equal to 0.' + end + if @api_client.config.client_side_validation && opts[:'sort'] && !['asc', 'desc'].include?(opts[:'sort']) fail ArgumentError, 'invalid value for "sort", must be one of asc, desc' end diff --git a/lib/sib-api-v3-sdk/api/lists_api.rb b/lib/sib-api-v3-sdk/api/lists_api.rb deleted file mode 100644 index f2d3187..0000000 --- a/lib/sib-api-v3-sdk/api/lists_api.rb +++ /dev/null @@ -1,562 +0,0 @@ -=begin -#SendinBlue API - -#SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | - -OpenAPI spec version: 3.0.0 -Contact: contact@sendinblue.com -Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: 2.4.19 - -=end - -require 'uri' - -module SibApiV3Sdk - class ListsApi - attr_accessor :api_client - - def initialize(api_client = ApiClient.default) - @api_client = api_client - end - - # Set custom user_agent if explicitly passed in api - # default will still remain Swagger-Codegen/#{VERSION}/ruby - def setUserAgent(user_agent) - @user_agent = user_agent - if user_agent.is_a?(String) && user_agent.downcase.start_with?('sendinblue_') - @api_client.default_headers['User-Agent'] = @user_agent - end - end - - # Add existing contacts to a list - # @param list_id Id of the list - # @param contact_emails Emails addresses OR IDs of the contacts - # @param [Hash] opts the optional parameters - # @return [PostContactInfo] - def add_contact_to_list(list_id, contact_emails, opts = {}) - data, _status_code, _headers = add_contact_to_list_with_http_info(list_id, contact_emails, opts) - data - end - - # Add existing contacts to a list - # @param list_id Id of the list - # @param contact_emails Emails addresses OR IDs of the contacts - # @param [Hash] opts the optional parameters - # @return [Array<(PostContactInfo, Fixnum, Hash)>] PostContactInfo data, response status code and response headers - def add_contact_to_list_with_http_info(list_id, contact_emails, opts = {}) - if @api_client.config.debugging - @api_client.config.logger.debug 'Calling API: ListsApi.add_contact_to_list ...' - end - # verify the required parameter 'list_id' is set - if @api_client.config.client_side_validation && list_id.nil? - fail ArgumentError, "Missing the required parameter 'list_id' when calling ListsApi.add_contact_to_list" - end - # verify the required parameter 'contact_emails' is set - if @api_client.config.client_side_validation && contact_emails.nil? - fail ArgumentError, "Missing the required parameter 'contact_emails' when calling ListsApi.add_contact_to_list" - end - # resource path - local_var_path = '/contacts/lists/{listId}/contacts/add'.sub('{' + 'listId' + '}', list_id.to_s) - - # query parameters - query_params = {} - - # header parameters - header_params = {} - # HTTP header 'Accept' (if needed) - header_params['Accept'] = @api_client.select_header_accept(['application/json']) - # HTTP header 'Content-Type' - header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) - - # form parameters - form_params = {} - - # http body (model) - post_body = @api_client.object_to_http_body(contact_emails) - auth_names = ['api-key', 'partner-key'] - data, status_code, headers = @api_client.call_api(:POST, local_var_path, - :header_params => header_params, - :query_params => query_params, - :form_params => form_params, - :body => post_body, - :auth_names => auth_names, - :return_type => 'PostContactInfo') - if @api_client.config.debugging - @api_client.config.logger.debug "API called: ListsApi#add_contact_to_list\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" - end - return data, status_code, headers - end - # Create a list - # @param create_list Values to create a list - # @param [Hash] opts the optional parameters - # @return [CreateModel] - def create_list(create_list, opts = {}) - data, _status_code, _headers = create_list_with_http_info(create_list, opts) - data - end - - # Create a list - # @param create_list Values to create a list - # @param [Hash] opts the optional parameters - # @return [Array<(CreateModel, Fixnum, Hash)>] CreateModel data, response status code and response headers - def create_list_with_http_info(create_list, opts = {}) - if @api_client.config.debugging - @api_client.config.logger.debug 'Calling API: ListsApi.create_list ...' - end - # verify the required parameter 'create_list' is set - if @api_client.config.client_side_validation && create_list.nil? - fail ArgumentError, "Missing the required parameter 'create_list' when calling ListsApi.create_list" - end - # resource path - local_var_path = '/contacts/lists' - - # query parameters - query_params = {} - - # header parameters - header_params = {} - # HTTP header 'Accept' (if needed) - header_params['Accept'] = @api_client.select_header_accept(['application/json']) - # HTTP header 'Content-Type' - header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) - - # form parameters - form_params = {} - - # http body (model) - post_body = @api_client.object_to_http_body(create_list) - auth_names = ['api-key', 'partner-key'] - data, status_code, headers = @api_client.call_api(:POST, local_var_path, - :header_params => header_params, - :query_params => query_params, - :form_params => form_params, - :body => post_body, - :auth_names => auth_names, - :return_type => 'CreateModel') - if @api_client.config.debugging - @api_client.config.logger.debug "API called: ListsApi#create_list\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" - end - return data, status_code, headers - end - # Delete a list - # @param list_id Id of the list - # @param [Hash] opts the optional parameters - # @return [nil] - def delete_list(list_id, opts = {}) - delete_list_with_http_info(list_id, opts) - nil - end - - # Delete a list - # @param list_id Id of the list - # @param [Hash] opts the optional parameters - # @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers - def delete_list_with_http_info(list_id, opts = {}) - if @api_client.config.debugging - @api_client.config.logger.debug 'Calling API: ListsApi.delete_list ...' - end - # verify the required parameter 'list_id' is set - if @api_client.config.client_side_validation && list_id.nil? - fail ArgumentError, "Missing the required parameter 'list_id' when calling ListsApi.delete_list" - end - # resource path - local_var_path = '/contacts/lists/{listId}'.sub('{' + 'listId' + '}', list_id.to_s) - - # query parameters - query_params = {} - - # header parameters - header_params = {} - # HTTP header 'Accept' (if needed) - header_params['Accept'] = @api_client.select_header_accept(['application/json']) - # HTTP header 'Content-Type' - header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) - - # form parameters - form_params = {} - - # http body (model) - post_body = nil - auth_names = ['api-key', 'partner-key'] - data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, - :header_params => header_params, - :query_params => query_params, - :form_params => form_params, - :body => post_body, - :auth_names => auth_names) - if @api_client.config.debugging - @api_client.config.logger.debug "API called: ListsApi#delete_list\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" - end - return data, status_code, headers - end - # Get contacts in a list - # @param list_id Id of the list - # @param [Hash] opts the optional parameters - # @option opts [String] :modified_since Filter (urlencoded) the contacts modified after a given UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ). Prefer to pass your timezone in date-time format for accurate result. - # @option opts [Integer] :limit Number of documents per page (default to 50) - # @option opts [Integer] :offset Index of the first document of the page (default to 0) - # @option opts [String] :sort Sort the results in the ascending/descending order of record creation. Default order is **descending** if `sort` is not passed (default to desc) - # @return [GetContacts] - def get_contacts_from_list(list_id, opts = {}) - data, _status_code, _headers = get_contacts_from_list_with_http_info(list_id, opts) - data - end - - # Get contacts in a list - # @param list_id Id of the list - # @param [Hash] opts the optional parameters - # @option opts [String] :modified_since Filter (urlencoded) the contacts modified after a given UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ). Prefer to pass your timezone in date-time format for accurate result. - # @option opts [Integer] :limit Number of documents per page - # @option opts [Integer] :offset Index of the first document of the page - # @option opts [String] :sort Sort the results in the ascending/descending order of record creation. Default order is **descending** if `sort` is not passed - # @return [Array<(GetContacts, Fixnum, Hash)>] GetContacts data, response status code and response headers - def get_contacts_from_list_with_http_info(list_id, opts = {}) - if @api_client.config.debugging - @api_client.config.logger.debug 'Calling API: ListsApi.get_contacts_from_list ...' - end - # verify the required parameter 'list_id' is set - if @api_client.config.client_side_validation && list_id.nil? - fail ArgumentError, "Missing the required parameter 'list_id' when calling ListsApi.get_contacts_from_list" - end - if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] > 500 - fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling ListsApi.get_contacts_from_list, must be smaller than or equal to 500.' - end - - if @api_client.config.client_side_validation && opts[:'sort'] && !['asc', 'desc'].include?(opts[:'sort']) - fail ArgumentError, 'invalid value for "sort", must be one of asc, desc' - end - # resource path - local_var_path = '/contacts/lists/{listId}/contacts'.sub('{' + 'listId' + '}', list_id.to_s) - - # query parameters - query_params = {} - query_params[:'modifiedSince'] = opts[:'modified_since'] if !opts[:'modified_since'].nil? - query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil? - query_params[:'offset'] = opts[:'offset'] if !opts[:'offset'].nil? - query_params[:'sort'] = opts[:'sort'] if !opts[:'sort'].nil? - - # header parameters - header_params = {} - # HTTP header 'Accept' (if needed) - header_params['Accept'] = @api_client.select_header_accept(['application/json']) - # HTTP header 'Content-Type' - header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) - - # form parameters - form_params = {} - - # http body (model) - post_body = nil - auth_names = ['api-key', 'partner-key'] - data, status_code, headers = @api_client.call_api(:GET, local_var_path, - :header_params => header_params, - :query_params => query_params, - :form_params => form_params, - :body => post_body, - :auth_names => auth_names, - :return_type => 'GetContacts') - if @api_client.config.debugging - @api_client.config.logger.debug "API called: ListsApi#get_contacts_from_list\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" - end - return data, status_code, headers - end - # Get lists in a folder - # @param folder_id Id of the folder - # @param [Hash] opts the optional parameters - # @option opts [Integer] :limit Number of documents per page (default to 10) - # @option opts [Integer] :offset Index of the first document of the page (default to 0) - # @option opts [String] :sort Sort the results in the ascending/descending order of record creation. Default order is **descending** if `sort` is not passed (default to desc) - # @return [GetFolderLists] - def get_folder_lists(folder_id, opts = {}) - data, _status_code, _headers = get_folder_lists_with_http_info(folder_id, opts) - data - end - - # Get lists in a folder - # @param folder_id Id of the folder - # @param [Hash] opts the optional parameters - # @option opts [Integer] :limit Number of documents per page - # @option opts [Integer] :offset Index of the first document of the page - # @option opts [String] :sort Sort the results in the ascending/descending order of record creation. Default order is **descending** if `sort` is not passed - # @return [Array<(GetFolderLists, Fixnum, Hash)>] GetFolderLists data, response status code and response headers - def get_folder_lists_with_http_info(folder_id, opts = {}) - if @api_client.config.debugging - @api_client.config.logger.debug 'Calling API: ListsApi.get_folder_lists ...' - end - # verify the required parameter 'folder_id' is set - if @api_client.config.client_side_validation && folder_id.nil? - fail ArgumentError, "Missing the required parameter 'folder_id' when calling ListsApi.get_folder_lists" - end - if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] > 50 - fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling ListsApi.get_folder_lists, must be smaller than or equal to 50.' - end - - if @api_client.config.client_side_validation && opts[:'sort'] && !['asc', 'desc'].include?(opts[:'sort']) - fail ArgumentError, 'invalid value for "sort", must be one of asc, desc' - end - # resource path - local_var_path = '/contacts/folders/{folderId}/lists'.sub('{' + 'folderId' + '}', folder_id.to_s) - - # query parameters - query_params = {} - query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil? - query_params[:'offset'] = opts[:'offset'] if !opts[:'offset'].nil? - query_params[:'sort'] = opts[:'sort'] if !opts[:'sort'].nil? - - # header parameters - header_params = {} - # HTTP header 'Accept' (if needed) - header_params['Accept'] = @api_client.select_header_accept(['application/json']) - # HTTP header 'Content-Type' - header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) - - # form parameters - form_params = {} - - # http body (model) - post_body = nil - auth_names = ['api-key', 'partner-key'] - data, status_code, headers = @api_client.call_api(:GET, local_var_path, - :header_params => header_params, - :query_params => query_params, - :form_params => form_params, - :body => post_body, - :auth_names => auth_names, - :return_type => 'GetFolderLists') - if @api_client.config.debugging - @api_client.config.logger.debug "API called: ListsApi#get_folder_lists\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" - end - return data, status_code, headers - end - # Get a list's details - # @param list_id Id of the list - # @param [Hash] opts the optional parameters - # @return [GetExtendedList] - def get_list(list_id, opts = {}) - data, _status_code, _headers = get_list_with_http_info(list_id, opts) - data - end - - # Get a list's details - # @param list_id Id of the list - # @param [Hash] opts the optional parameters - # @return [Array<(GetExtendedList, Fixnum, Hash)>] GetExtendedList data, response status code and response headers - def get_list_with_http_info(list_id, opts = {}) - if @api_client.config.debugging - @api_client.config.logger.debug 'Calling API: ListsApi.get_list ...' - end - # verify the required parameter 'list_id' is set - if @api_client.config.client_side_validation && list_id.nil? - fail ArgumentError, "Missing the required parameter 'list_id' when calling ListsApi.get_list" - end - # resource path - local_var_path = '/contacts/lists/{listId}'.sub('{' + 'listId' + '}', list_id.to_s) - - # query parameters - query_params = {} - - # header parameters - header_params = {} - # HTTP header 'Accept' (if needed) - header_params['Accept'] = @api_client.select_header_accept(['application/json']) - # HTTP header 'Content-Type' - header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) - - # form parameters - form_params = {} - - # http body (model) - post_body = nil - auth_names = ['api-key', 'partner-key'] - data, status_code, headers = @api_client.call_api(:GET, local_var_path, - :header_params => header_params, - :query_params => query_params, - :form_params => form_params, - :body => post_body, - :auth_names => auth_names, - :return_type => 'GetExtendedList') - if @api_client.config.debugging - @api_client.config.logger.debug "API called: ListsApi#get_list\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" - end - return data, status_code, headers - end - # Get all the lists - # @param [Hash] opts the optional parameters - # @option opts [Integer] :limit Number of documents per page (default to 10) - # @option opts [Integer] :offset Index of the first document of the page (default to 0) - # @option opts [String] :sort Sort the results in the ascending/descending order of record creation. Default order is **descending** if `sort` is not passed (default to desc) - # @return [GetLists] - def get_lists(opts = {}) - data, _status_code, _headers = get_lists_with_http_info(opts) - data - end - - # Get all the lists - # @param [Hash] opts the optional parameters - # @option opts [Integer] :limit Number of documents per page - # @option opts [Integer] :offset Index of the first document of the page - # @option opts [String] :sort Sort the results in the ascending/descending order of record creation. Default order is **descending** if `sort` is not passed - # @return [Array<(GetLists, Fixnum, Hash)>] GetLists data, response status code and response headers - def get_lists_with_http_info(opts = {}) - if @api_client.config.debugging - @api_client.config.logger.debug 'Calling API: ListsApi.get_lists ...' - end - if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] > 50 - fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling ListsApi.get_lists, must be smaller than or equal to 50.' - end - - if @api_client.config.client_side_validation && opts[:'sort'] && !['asc', 'desc'].include?(opts[:'sort']) - fail ArgumentError, 'invalid value for "sort", must be one of asc, desc' - end - # resource path - local_var_path = '/contacts/lists' - - # query parameters - query_params = {} - query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil? - query_params[:'offset'] = opts[:'offset'] if !opts[:'offset'].nil? - query_params[:'sort'] = opts[:'sort'] if !opts[:'sort'].nil? - - # header parameters - header_params = {} - # HTTP header 'Accept' (if needed) - header_params['Accept'] = @api_client.select_header_accept(['application/json']) - # HTTP header 'Content-Type' - header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) - - # form parameters - form_params = {} - - # http body (model) - post_body = nil - auth_names = ['api-key', 'partner-key'] - data, status_code, headers = @api_client.call_api(:GET, local_var_path, - :header_params => header_params, - :query_params => query_params, - :form_params => form_params, - :body => post_body, - :auth_names => auth_names, - :return_type => 'GetLists') - if @api_client.config.debugging - @api_client.config.logger.debug "API called: ListsApi#get_lists\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" - end - return data, status_code, headers - end - # Delete a contact from a list - # @param list_id Id of the list - # @param contact_emails Emails addresses OR IDs of the contacts - # @param [Hash] opts the optional parameters - # @return [PostContactInfo] - def remove_contact_from_list(list_id, contact_emails, opts = {}) - data, _status_code, _headers = remove_contact_from_list_with_http_info(list_id, contact_emails, opts) - data - end - - # Delete a contact from a list - # @param list_id Id of the list - # @param contact_emails Emails addresses OR IDs of the contacts - # @param [Hash] opts the optional parameters - # @return [Array<(PostContactInfo, Fixnum, Hash)>] PostContactInfo data, response status code and response headers - def remove_contact_from_list_with_http_info(list_id, contact_emails, opts = {}) - if @api_client.config.debugging - @api_client.config.logger.debug 'Calling API: ListsApi.remove_contact_from_list ...' - end - # verify the required parameter 'list_id' is set - if @api_client.config.client_side_validation && list_id.nil? - fail ArgumentError, "Missing the required parameter 'list_id' when calling ListsApi.remove_contact_from_list" - end - # verify the required parameter 'contact_emails' is set - if @api_client.config.client_side_validation && contact_emails.nil? - fail ArgumentError, "Missing the required parameter 'contact_emails' when calling ListsApi.remove_contact_from_list" - end - # resource path - local_var_path = '/contacts/lists/{listId}/contacts/remove'.sub('{' + 'listId' + '}', list_id.to_s) - - # query parameters - query_params = {} - - # header parameters - header_params = {} - # HTTP header 'Accept' (if needed) - header_params['Accept'] = @api_client.select_header_accept(['application/json']) - # HTTP header 'Content-Type' - header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) - - # form parameters - form_params = {} - - # http body (model) - post_body = @api_client.object_to_http_body(contact_emails) - auth_names = ['api-key', 'partner-key'] - data, status_code, headers = @api_client.call_api(:POST, local_var_path, - :header_params => header_params, - :query_params => query_params, - :form_params => form_params, - :body => post_body, - :auth_names => auth_names, - :return_type => 'PostContactInfo') - if @api_client.config.debugging - @api_client.config.logger.debug "API called: ListsApi#remove_contact_from_list\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" - end - return data, status_code, headers - end - # Update a list - # @param list_id Id of the list - # @param update_list Values to update a list - # @param [Hash] opts the optional parameters - # @return [nil] - def update_list(list_id, update_list, opts = {}) - update_list_with_http_info(list_id, update_list, opts) - nil - end - - # Update a list - # @param list_id Id of the list - # @param update_list Values to update a list - # @param [Hash] opts the optional parameters - # @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers - def update_list_with_http_info(list_id, update_list, opts = {}) - if @api_client.config.debugging - @api_client.config.logger.debug 'Calling API: ListsApi.update_list ...' - end - # verify the required parameter 'list_id' is set - if @api_client.config.client_side_validation && list_id.nil? - fail ArgumentError, "Missing the required parameter 'list_id' when calling ListsApi.update_list" - end - # verify the required parameter 'update_list' is set - if @api_client.config.client_side_validation && update_list.nil? - fail ArgumentError, "Missing the required parameter 'update_list' when calling ListsApi.update_list" - end - # resource path - local_var_path = '/contacts/lists/{listId}'.sub('{' + 'listId' + '}', list_id.to_s) - - # query parameters - query_params = {} - - # header parameters - header_params = {} - # HTTP header 'Accept' (if needed) - header_params['Accept'] = @api_client.select_header_accept(['application/json']) - # HTTP header 'Content-Type' - header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) - - # form parameters - form_params = {} - - # http body (model) - post_body = @api_client.object_to_http_body(update_list) - auth_names = ['api-key', 'partner-key'] - data, status_code, headers = @api_client.call_api(:PUT, local_var_path, - :header_params => header_params, - :query_params => query_params, - :form_params => form_params, - :body => post_body, - :auth_names => auth_names) - if @api_client.config.debugging - @api_client.config.logger.debug "API called: ListsApi#update_list\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" - end - return data, status_code, headers - end - end -end diff --git a/lib/sib-api-v3-sdk/api/process_api.rb b/lib/sib-api-v3-sdk/api/process_api.rb index 1620802..901f4da 100644 --- a/lib/sib-api-v3-sdk/api/process_api.rb +++ b/lib/sib-api-v3-sdk/api/process_api.rb @@ -106,6 +106,10 @@ def get_processes_with_http_info(opts = {}) fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling ProcessApi.get_processes, must be smaller than or equal to 50.' end + if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] < 0 + fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling ProcessApi.get_processes, must be greater than or equal to 0.' + end + if @api_client.config.client_side_validation && opts[:'sort'] && !['asc', 'desc'].include?(opts[:'sort']) fail ArgumentError, 'invalid value for "sort", must be one of asc, desc' end diff --git a/lib/sib-api-v3-sdk/api/reseller_api.rb b/lib/sib-api-v3-sdk/api/reseller_api.rb index cb5599e..61625bf 100644 --- a/lib/sib-api-v3-sdk/api/reseller_api.rb +++ b/lib/sib-api-v3-sdk/api/reseller_api.rb @@ -593,6 +593,10 @@ def get_reseller_childs_with_http_info(opts = {}) fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling ResellerApi.get_reseller_childs, must be smaller than or equal to 20.' end + if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] < 0 + fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling ResellerApi.get_reseller_childs, must be greater than or equal to 0.' + end + # resource path local_var_path = '/reseller/children' diff --git a/lib/sib-api-v3-sdk/api/sms_campaigns_api.rb b/lib/sib-api-v3-sdk/api/sms_campaigns_api.rb index c90998f..f3beb4b 100644 --- a/lib/sib-api-v3-sdk/api/sms_campaigns_api.rb +++ b/lib/sib-api-v3-sdk/api/sms_campaigns_api.rb @@ -218,6 +218,10 @@ def get_sms_campaigns_with_http_info(opts = {}) fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling SMSCampaignsApi.get_sms_campaigns, must be smaller than or equal to 1000.' end + if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] < 0 + fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling SMSCampaignsApi.get_sms_campaigns, must be greater than or equal to 0.' + end + if @api_client.config.client_side_validation && opts[:'sort'] && !['asc', 'desc'].include?(opts[:'sort']) fail ArgumentError, 'invalid value for "sort", must be one of asc, desc' end diff --git a/lib/sib-api-v3-sdk/api/transactional_emails_api.rb b/lib/sib-api-v3-sdk/api/transactional_emails_api.rb index e6fa38e..fceb0a8 100644 --- a/lib/sib-api-v3-sdk/api/transactional_emails_api.rb +++ b/lib/sib-api-v3-sdk/api/transactional_emails_api.rb @@ -451,7 +451,7 @@ def get_blocked_domains_with_http_info(opts = {}) # Get all your transactional email activity (unaggregated events) # This endpoint will show the aggregated stats for past 30 days by default if `startDate` and `endDate` OR `days` is not passed. The date range can not exceed 90 days # @param [Hash] opts the optional parameters - # @option opts [Integer] :limit Number limitation for the result returned (default to 50) + # @option opts [Integer] :limit Number limitation for the result returned (default to 2500) # @option opts [Integer] :offset Beginning point in the list to retrieve from. (default to 0) # @option opts [String] :start_date Mandatory if endDate is used. Starting date of the report (YYYY-MM-DD). Must be lower than equal to endDate # @option opts [String] :end_date Mandatory if startDate is used. Ending date of the report (YYYY-MM-DD). Must be greater than equal to startDate @@ -487,8 +487,12 @@ def get_email_event_report_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: TransactionalEmailsApi.get_email_event_report ...' end - if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] > 100 - fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling TransactionalEmailsApi.get_email_event_report, must be smaller than or equal to 100.' + if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] > 5000 + fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling TransactionalEmailsApi.get_email_event_report, must be smaller than or equal to 5000.' + end + + if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] < 0 + fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling TransactionalEmailsApi.get_email_event_report, must be greater than or equal to 0.' end if @api_client.config.client_side_validation && opts[:'event'] && !['bounces', 'hardBounces', 'softBounces', 'delivered', 'spam', 'requests', 'opened', 'clicks', 'invalid', 'deferred', 'blocked', 'unsubscribed', 'error', 'loadedByProxy'].include?(opts[:'event']) @@ -584,6 +588,10 @@ def get_scheduled_email_by_batch_id_with_http_info(batch_id, opts = {}) fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling TransactionalEmailsApi.get_scheduled_email_by_batch_id, must be smaller than or equal to 500.' end + if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] < 0 + fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling TransactionalEmailsApi.get_scheduled_email_by_batch_id, must be greater than or equal to 0.' + end + # resource path local_var_path = '/smtp/emailStatus/{batchId}'.sub('{' + 'batchId' + '}', batch_id.to_s) @@ -714,6 +722,10 @@ def get_smtp_report_with_http_info(opts = {}) fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling TransactionalEmailsApi.get_smtp_report, must be smaller than or equal to 30.' end + if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] < 0 + fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling TransactionalEmailsApi.get_smtp_report, must be greater than or equal to 0.' + end + if @api_client.config.client_side_validation && opts[:'sort'] && !['asc', 'desc'].include?(opts[:'sort']) fail ArgumentError, 'invalid value for "sort", must be one of asc, desc' end @@ -834,6 +846,10 @@ def get_smtp_templates_with_http_info(opts = {}) fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling TransactionalEmailsApi.get_smtp_templates, must be smaller than or equal to 1000.' end + if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] < 0 + fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling TransactionalEmailsApi.get_smtp_templates, must be greater than or equal to 0.' + end + if @api_client.config.client_side_validation && opts[:'sort'] && !['asc', 'desc'].include?(opts[:'sort']) fail ArgumentError, 'invalid value for "sort", must be one of asc, desc' end @@ -903,6 +919,10 @@ def get_transac_blocked_contacts_with_http_info(opts = {}) fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling TransactionalEmailsApi.get_transac_blocked_contacts, must be smaller than or equal to 100.' end + if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] < 0 + fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling TransactionalEmailsApi.get_transac_blocked_contacts, must be greater than or equal to 0.' + end + if @api_client.config.client_side_validation && opts[:'sort'] && !['asc', 'desc'].include?(opts[:'sort']) fail ArgumentError, 'invalid value for "sort", must be one of asc, desc' end @@ -1035,6 +1055,10 @@ def get_transac_emails_list_with_http_info(opts = {}) fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling TransactionalEmailsApi.get_transac_emails_list, must be smaller than or equal to 1000.' end + if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] < 0 + fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling TransactionalEmailsApi.get_transac_emails_list, must be greater than or equal to 0.' + end + # resource path local_var_path = '/smtp/emails' diff --git a/lib/sib-api-v3-sdk/models/body.rb b/lib/sib-api-v3-sdk/models/body.rb index c5b6c0a..f46581a 100644 --- a/lib/sib-api-v3-sdk/models/body.rb +++ b/lib/sib-api-v3-sdk/models/body.rb @@ -20,11 +20,15 @@ class Body # Attributes for company creation attr_accessor :attributes + # Country code if phone_number is passed in attributes. + attr_accessor :country_code + # Attribute mapping from ruby-style variable name to JSON key. def self.attribute_map { :'name' => :'name', - :'attributes' => :'attributes' + :'attributes' => :'attributes', + :'country_code' => :'countryCode' } end @@ -32,7 +36,8 @@ def self.attribute_map def self.swagger_types { :'name' => :'String', - :'attributes' => :'Object' + :'attributes' => :'Object', + :'country_code' => :'Integer' } end @@ -51,6 +56,10 @@ def initialize(attributes = {}) if attributes.has_key?(:'attributes') self.attributes = attributes[:'attributes'] end + + if attributes.has_key?(:'countryCode') + self.country_code = attributes[:'countryCode'] + end end # Show invalid properties with the reasons. Usually used together with valid? @@ -77,7 +86,8 @@ def ==(o) return true if self.equal?(o) self.class == o.class && name == o.name && - attributes == o.attributes + attributes == o.attributes && + country_code == o.country_code end # @see the `==` method @@ -89,7 +99,7 @@ def eql?(o) # Calculates hash code according to all attributes. # @return [Fixnum] Hash code def hash - [name, attributes].hash + [name, attributes, country_code].hash end # Builds the object from hash diff --git a/lib/sib-api-v3-sdk/models/body_1.rb b/lib/sib-api-v3-sdk/models/body_1.rb index 4b50e01..2f9b504 100644 --- a/lib/sib-api-v3-sdk/models/body_1.rb +++ b/lib/sib-api-v3-sdk/models/body_1.rb @@ -20,11 +20,15 @@ class Body1 # Attributes for company update attr_accessor :attributes + # Country code if phone_number is passed in attributes. + attr_accessor :country_code + # Attribute mapping from ruby-style variable name to JSON key. def self.attribute_map { :'name' => :'name', - :'attributes' => :'attributes' + :'attributes' => :'attributes', + :'country_code' => :'countryCode' } end @@ -32,7 +36,8 @@ def self.attribute_map def self.swagger_types { :'name' => :'String', - :'attributes' => :'Object' + :'attributes' => :'Object', + :'country_code' => :'Integer' } end @@ -51,6 +56,10 @@ def initialize(attributes = {}) if attributes.has_key?(:'attributes') self.attributes = attributes[:'attributes'] end + + if attributes.has_key?(:'countryCode') + self.country_code = attributes[:'countryCode'] + end end # Show invalid properties with the reasons. Usually used together with valid? @@ -72,7 +81,8 @@ def ==(o) return true if self.equal?(o) self.class == o.class && name == o.name && - attributes == o.attributes + attributes == o.attributes && + country_code == o.country_code end # @see the `==` method @@ -84,7 +94,7 @@ def eql?(o) # Calculates hash code according to all attributes. # @return [Fixnum] Hash code def hash - [name, attributes].hash + [name, attributes, country_code].hash end # Builds the object from hash diff --git a/lib/sib-api-v3-sdk/models/body_10.rb b/lib/sib-api-v3-sdk/models/body_10.rb index 5f0ba51..d700264 100644 --- a/lib/sib-api-v3-sdk/models/body_10.rb +++ b/lib/sib-api-v3-sdk/models/body_10.rb @@ -14,13 +14,13 @@ module SibApiV3Sdk class Body10 - # visitor’s ID received from a webhook or generated by you to bind existing user account to Conversations + # visitor’s ID received from a webhook or generated by you to bind existing user account to Conversations attr_accessor :visitor_id # message text attr_accessor :text - # agent ID. It can be found on agent’s page or received from a webhook. Optional if `groupId` is set. + # agent ID. It can be found on agent’s page or received from a webhook. Optional if `groupId` is set. attr_accessor :agent_id # group ID. It can be found on group’s page. Optional if `agentId` is set. diff --git a/lib/sib-api-v3-sdk/models/body_12.rb b/lib/sib-api-v3-sdk/models/body_12.rb index d27357e..ff1de65 100644 --- a/lib/sib-api-v3-sdk/models/body_12.rb +++ b/lib/sib-api-v3-sdk/models/body_12.rb @@ -14,7 +14,7 @@ module SibApiV3Sdk class Body12 - # agent ID. It can be found on agent’s page or received from a webhook. Alternatively, you can use `agentEmail` + `agentName` + `receivedFrom` instead (all 3 fields required). + # agent ID. It can be found on agent’s page or received from a webhook. Alternatively, you can use `agentEmail` + `agentName` + `receivedFrom` instead (all 3 fields required). attr_accessor :agent_id # mark your messages to distinguish messages created by you from the others. diff --git a/lib/sib-api-v3-sdk/models/body_8.rb b/lib/sib-api-v3-sdk/models/body_8.rb index 93ade92..4197bcc 100644 --- a/lib/sib-api-v3-sdk/models/body_8.rb +++ b/lib/sib-api-v3-sdk/models/body_8.rb @@ -14,13 +14,13 @@ module SibApiV3Sdk class Body8 - # visitor’s ID received from a webhook or generated by you to bind existing user account to Conversations + # visitor’s ID received from a webhook or generated by you to bind existing user account to Conversations attr_accessor :visitor_id # message text attr_accessor :text - # agent ID. It can be found on agent’s page or received from a webhook. Alternatively, you can use `agentEmail` + `agentName` + `receivedFrom` instead (all 3 fields required). + # agent ID. It can be found on agent’s page or received from a webhook. Alternatively, you can use `agentEmail` + `agentName` + `receivedFrom` instead (all 3 fields required). attr_accessor :agent_id # mark your messages to distinguish messages created by you from the others. diff --git a/lib/sib-api-v3-sdk/models/create_email_campaign.rb b/lib/sib-api-v3-sdk/models/create_email_campaign.rb index 31139e4..d101979 100644 --- a/lib/sib-api-v3-sdk/models/create_email_campaign.rb +++ b/lib/sib-api-v3-sdk/models/create_email_campaign.rb @@ -96,6 +96,12 @@ class CreateEmailCampaign # Mandatory if ipWarmupEnable is set to true. Set a percentage increase rate for warming up your ip. We recommend you set the increase rate to 30% per day. If you want to send the same number of emails every day, set the daily increase value to 0%. attr_accessor :increase_rate + # Enter an unsubscription page id. The page id is a 24 digit alphanumeric id that can be found in the URL when editing the page. If not entered, then the default unsubscription page will be used. + attr_accessor :unsubscription_page_id + + # Mandatory if templateId is used containing the {{ update_profile }} tag. Enter an update profile form id. The form id is a 24 digit alphanumeric id that can be found in the URL when editing the form. If not entered, then the default update profile form will be used. + attr_accessor :update_form_id + class EnumAttributeValidator attr_reader :datatype attr_reader :allowable_values @@ -148,7 +154,9 @@ def self.attribute_map :'winner_delay' => :'winnerDelay', :'ip_warmup_enable' => :'ipWarmupEnable', :'initial_quota' => :'initialQuota', - :'increase_rate' => :'increaseRate' + :'increase_rate' => :'increaseRate', + :'unsubscription_page_id' => :'unsubscriptionPageId', + :'update_form_id' => :'updateFormId' } end @@ -182,7 +190,9 @@ def self.swagger_types :'winner_delay' => :'Integer', :'ip_warmup_enable' => :'BOOLEAN', :'initial_quota' => :'Integer', - :'increase_rate' => :'Integer' + :'increase_rate' => :'Integer', + :'unsubscription_page_id' => :'String', + :'update_form_id' => :'String' } end @@ -313,6 +323,14 @@ def initialize(attributes = {}) if attributes.has_key?(:'increaseRate') self.increase_rate = attributes[:'increaseRate'] end + + if attributes.has_key?(:'unsubscriptionPageId') + self.unsubscription_page_id = attributes[:'unsubscriptionPageId'] + end + + if attributes.has_key?(:'updateFormId') + self.update_form_id = attributes[:'updateFormId'] + end end # Show invalid properties with the reasons. Usually used together with valid? @@ -454,7 +472,9 @@ def ==(o) winner_delay == o.winner_delay && ip_warmup_enable == o.ip_warmup_enable && initial_quota == o.initial_quota && - increase_rate == o.increase_rate + increase_rate == o.increase_rate && + unsubscription_page_id == o.unsubscription_page_id && + update_form_id == o.update_form_id end # @see the `==` method @@ -466,7 +486,7 @@ def eql?(o) # Calculates hash code according to all attributes. # @return [Fixnum] Hash code def hash - [tag, sender, name, html_content, html_url, template_id, scheduled_at, subject, reply_to, to_field, recipients, attachment_url, inline_image_activation, mirror_active, footer, header, utm_campaign, params, send_at_best_time, ab_testing, subject_a, subject_b, split_rule, winner_criteria, winner_delay, ip_warmup_enable, initial_quota, increase_rate].hash + [tag, sender, name, html_content, html_url, template_id, scheduled_at, subject, reply_to, to_field, recipients, attachment_url, inline_image_activation, mirror_active, footer, header, utm_campaign, params, send_at_best_time, ab_testing, subject_a, subject_b, split_rule, winner_criteria, winner_delay, ip_warmup_enable, initial_quota, increase_rate, unsubscription_page_id, update_form_id].hash end # Builds the object from hash diff --git a/lib/sib-api-v3-sdk/models/create_email_campaign_recipients.rb b/lib/sib-api-v3-sdk/models/create_email_campaign_recipients.rb index ceca27f..1cf7ee2 100644 --- a/lib/sib-api-v3-sdk/models/create_email_campaign_recipients.rb +++ b/lib/sib-api-v3-sdk/models/create_email_campaign_recipients.rb @@ -13,7 +13,7 @@ require 'date' module SibApiV3Sdk - # List ids to include/exclude from campaign + # Segment ids and List ids to include/exclude from campaign class CreateEmailCampaignRecipients # List ids to exclude from the campaign attr_accessor :exclusion_list_ids @@ -21,11 +21,15 @@ class CreateEmailCampaignRecipients # Mandatory if scheduledAt is not empty. List Ids to send the campaign to attr_accessor :list_ids + # Mandatory if listIds are not used. Segment ids to send the campaign to. + attr_accessor :segment_ids + # Attribute mapping from ruby-style variable name to JSON key. def self.attribute_map { :'exclusion_list_ids' => :'exclusionListIds', - :'list_ids' => :'listIds' + :'list_ids' => :'listIds', + :'segment_ids' => :'segmentIds' } end @@ -33,7 +37,8 @@ def self.attribute_map def self.swagger_types { :'exclusion_list_ids' => :'Array', - :'list_ids' => :'Array' + :'list_ids' => :'Array', + :'segment_ids' => :'Array' } end @@ -56,6 +61,12 @@ def initialize(attributes = {}) self.list_ids = value end end + + if attributes.has_key?(:'segmentIds') + if (value = attributes[:'segmentIds']).is_a?(Array) + self.segment_ids = value + end + end end # Show invalid properties with the reasons. Usually used together with valid? @@ -77,7 +88,8 @@ def ==(o) return true if self.equal?(o) self.class == o.class && exclusion_list_ids == o.exclusion_list_ids && - list_ids == o.list_ids + list_ids == o.list_ids && + segment_ids == o.segment_ids end # @see the `==` method @@ -89,7 +101,7 @@ def eql?(o) # Calculates hash code according to all attributes. # @return [Fixnum] Hash code def hash - [exclusion_list_ids, list_ids].hash + [exclusion_list_ids, list_ids, segment_ids].hash end # Builds the object from hash diff --git a/lib/sib-api-v3-sdk/models/note_data.rb b/lib/sib-api-v3-sdk/models/note_data.rb index 9dbdebf..c44c68f 100644 --- a/lib/sib-api-v3-sdk/models/note_data.rb +++ b/lib/sib-api-v3-sdk/models/note_data.rb @@ -24,12 +24,16 @@ class NoteData # Deal Ids linked to a note attr_accessor :deal_ids + # Company Ids linked to a note + attr_accessor :company_ids + # Attribute mapping from ruby-style variable name to JSON key. def self.attribute_map { :'text' => :'text', :'contact_ids' => :'contactIds', - :'deal_ids' => :'dealIds' + :'deal_ids' => :'dealIds', + :'company_ids' => :'companyIds' } end @@ -38,7 +42,8 @@ def self.swagger_types { :'text' => :'String', :'contact_ids' => :'Array', - :'deal_ids' => :'Array' + :'deal_ids' => :'Array', + :'company_ids' => :'Array' } end @@ -65,6 +70,12 @@ def initialize(attributes = {}) self.deal_ids = value end end + + if attributes.has_key?(:'companyIds') + if (value = attributes[:'companyIds']).is_a?(Array) + self.company_ids = value + end + end end # Show invalid properties with the reasons. Usually used together with valid? @@ -120,7 +131,8 @@ def ==(o) self.class == o.class && text == o.text && contact_ids == o.contact_ids && - deal_ids == o.deal_ids + deal_ids == o.deal_ids && + company_ids == o.company_ids end # @see the `==` method @@ -132,7 +144,7 @@ def eql?(o) # Calculates hash code according to all attributes. # @return [Fixnum] Hash code def hash - [text, contact_ids, deal_ids].hash + [text, contact_ids, deal_ids, company_ids].hash end # Builds the object from hash diff --git a/lib/sib-api-v3-sdk/models/update_email_campaign.rb b/lib/sib-api-v3-sdk/models/update_email_campaign.rb index a6d2eb7..e93e8a3 100644 --- a/lib/sib-api-v3-sdk/models/update_email_campaign.rb +++ b/lib/sib-api-v3-sdk/models/update_email_campaign.rb @@ -96,6 +96,12 @@ class UpdateEmailCampaign # Set a percentage increase rate for warming up your ip. We recommend you set the increase rate to 30% per day. If you want to send the same number of emails every day, set the daily increase value to 0%. attr_accessor :increase_rate + # Enter an unsubscription page id. The page id is a 24 digit alphanumeric id that can be found in the URL when editing the page. + attr_accessor :unsubscription_page_id + + # Mandatory if templateId is used containing the {{ update_profile }} tag. Enter an update profile form id. The form id is a 24 digit alphanumeric id that can be found in the URL when editing the form. + attr_accessor :update_form_id + class EnumAttributeValidator attr_reader :datatype attr_reader :allowable_values @@ -148,7 +154,9 @@ def self.attribute_map :'winner_delay' => :'winnerDelay', :'ip_warmup_enable' => :'ipWarmupEnable', :'initial_quota' => :'initialQuota', - :'increase_rate' => :'increaseRate' + :'increase_rate' => :'increaseRate', + :'unsubscription_page_id' => :'unsubscriptionPageId', + :'update_form_id' => :'updateFormId' } end @@ -182,7 +190,9 @@ def self.swagger_types :'winner_delay' => :'Integer', :'ip_warmup_enable' => :'BOOLEAN', :'initial_quota' => :'Integer', - :'increase_rate' => :'Integer' + :'increase_rate' => :'Integer', + :'unsubscription_page_id' => :'String', + :'update_form_id' => :'String' } end @@ -313,6 +323,14 @@ def initialize(attributes = {}) if attributes.has_key?(:'increaseRate') self.increase_rate = attributes[:'increaseRate'] end + + if attributes.has_key?(:'unsubscriptionPageId') + self.unsubscription_page_id = attributes[:'unsubscriptionPageId'] + end + + if attributes.has_key?(:'updateFormId') + self.update_form_id = attributes[:'updateFormId'] + end end # Show invalid properties with the reasons. Usually used together with valid? @@ -444,7 +462,9 @@ def ==(o) winner_delay == o.winner_delay && ip_warmup_enable == o.ip_warmup_enable && initial_quota == o.initial_quota && - increase_rate == o.increase_rate + increase_rate == o.increase_rate && + unsubscription_page_id == o.unsubscription_page_id && + update_form_id == o.update_form_id end # @see the `==` method @@ -456,7 +476,7 @@ def eql?(o) # Calculates hash code according to all attributes. # @return [Fixnum] Hash code def hash - [tag, sender, name, html_content, html_url, scheduled_at, subject, reply_to, to_field, recipients, attachment_url, inline_image_activation, mirror_active, recurring, footer, header, utm_campaign, params, send_at_best_time, ab_testing, subject_a, subject_b, split_rule, winner_criteria, winner_delay, ip_warmup_enable, initial_quota, increase_rate].hash + [tag, sender, name, html_content, html_url, scheduled_at, subject, reply_to, to_field, recipients, attachment_url, inline_image_activation, mirror_active, recurring, footer, header, utm_campaign, params, send_at_best_time, ab_testing, subject_a, subject_b, split_rule, winner_criteria, winner_delay, ip_warmup_enable, initial_quota, increase_rate, unsubscription_page_id, update_form_id].hash end # Builds the object from hash diff --git a/lib/sib-api-v3-sdk/models/update_email_campaign_recipients.rb b/lib/sib-api-v3-sdk/models/update_email_campaign_recipients.rb index 4fa10ee..f4e25b7 100644 --- a/lib/sib-api-v3-sdk/models/update_email_campaign_recipients.rb +++ b/lib/sib-api-v3-sdk/models/update_email_campaign_recipients.rb @@ -13,19 +13,23 @@ require 'date' module SibApiV3Sdk - # List ids to include/exclude from campaign + # Segment ids and List ids to include/exclude from campaign class UpdateEmailCampaignRecipients # List ids which have to be excluded from a campaign attr_accessor :exclusion_list_ids - # Lists Ids to send the campaign to. REQUIRED if already not present in campaign and scheduledAt is not empty + # Lists Ids to send the campaign to. Campaign should only be updated with listIds if listIds were used to create it. REQUIRED if already not present in campaign and scheduledAt is not empty attr_accessor :list_ids + # Mandatory if listIds are not used. Campaign should only be updated with segmentIds if segmentIds were used to create it. Segment ids to send the campaign to. + attr_accessor :segment_ids + # Attribute mapping from ruby-style variable name to JSON key. def self.attribute_map { :'exclusion_list_ids' => :'exclusionListIds', - :'list_ids' => :'listIds' + :'list_ids' => :'listIds', + :'segment_ids' => :'segmentIds' } end @@ -33,7 +37,8 @@ def self.attribute_map def self.swagger_types { :'exclusion_list_ids' => :'Array', - :'list_ids' => :'Array' + :'list_ids' => :'Array', + :'segment_ids' => :'Array' } end @@ -56,6 +61,12 @@ def initialize(attributes = {}) self.list_ids = value end end + + if attributes.has_key?(:'segmentIds') + if (value = attributes[:'segmentIds']).is_a?(Array) + self.segment_ids = value + end + end end # Show invalid properties with the reasons. Usually used together with valid? @@ -77,7 +88,8 @@ def ==(o) return true if self.equal?(o) self.class == o.class && exclusion_list_ids == o.exclusion_list_ids && - list_ids == o.list_ids + list_ids == o.list_ids && + segment_ids == o.segment_ids end # @see the `==` method @@ -89,7 +101,7 @@ def eql?(o) # Calculates hash code according to all attributes. # @return [Fixnum] Hash code def hash - [exclusion_list_ids, list_ids].hash + [exclusion_list_ids, list_ids, segment_ids].hash end # Builds the object from hash diff --git a/lib/sib-api-v3-sdk/version.rb b/lib/sib-api-v3-sdk/version.rb index 6091926..25a9c66 100644 --- a/lib/sib-api-v3-sdk/version.rb +++ b/lib/sib-api-v3-sdk/version.rb @@ -11,5 +11,5 @@ =end module SibApiV3Sdk - VERSION = "9.0.0" + VERSION = "9.1.0" end diff --git a/spec/api/attributes_api_spec.rb b/spec/api/attributes_api_spec.rb deleted file mode 100644 index 21264b1..0000000 --- a/spec/api/attributes_api_spec.rb +++ /dev/null @@ -1,83 +0,0 @@ -=begin -#SendinBlue API - -#SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | - -OpenAPI spec version: 3.0.0 -Contact: contact@sendinblue.com -Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: 2.4.19 - -=end - -require 'spec_helper' -require 'json' - -# Unit tests for SibApiV3Sdk::AttributesApi -# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) -# Please update as you see appropriate -describe 'AttributesApi' do - before do - # run before each test - @instance = SibApiV3Sdk::AttributesApi.new - end - - after do - # run after each test - end - - describe 'test an instance of AttributesApi' do - it 'should create an instance of AttributesApi' do - expect(@instance).to be_instance_of(SibApiV3Sdk::AttributesApi) - end - end - - # unit tests for create_attribute - # Create contact attribute - # @param attribute_category Category of the attribute - # @param attribute_name Name of the attribute - # @param create_attribute Values to create an attribute - # @param [Hash] opts the optional parameters - # @return [nil] - describe 'create_attribute test' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - # unit tests for delete_attribute - # Delete an attribute - # @param attribute_category Category of the attribute - # @param attribute_name Name of the existing attribute - # @param [Hash] opts the optional parameters - # @return [nil] - describe 'delete_attribute test' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - # unit tests for get_attributes - # List all attributes - # @param [Hash] opts the optional parameters - # @return [GetAttributes] - describe 'get_attributes test' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - # unit tests for update_attribute - # Update contact attribute - # @param attribute_category Category of the attribute - # @param attribute_name Name of the existing attribute - # @param update_attribute Values to update an attribute - # @param [Hash] opts the optional parameters - # @return [nil] - describe 'update_attribute test' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - -end diff --git a/spec/api/folders_api_spec.rb b/spec/api/folders_api_spec.rb deleted file mode 100644 index 6a8cf18..0000000 --- a/spec/api/folders_api_spec.rb +++ /dev/null @@ -1,107 +0,0 @@ -=begin -#SendinBlue API - -#SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | - -OpenAPI spec version: 3.0.0 -Contact: contact@sendinblue.com -Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: 2.4.19 - -=end - -require 'spec_helper' -require 'json' - -# Unit tests for SibApiV3Sdk::FoldersApi -# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) -# Please update as you see appropriate -describe 'FoldersApi' do - before do - # run before each test - @instance = SibApiV3Sdk::FoldersApi.new - end - - after do - # run after each test - end - - describe 'test an instance of FoldersApi' do - it 'should create an instance of FoldersApi' do - expect(@instance).to be_instance_of(SibApiV3Sdk::FoldersApi) - end - end - - # unit tests for create_folder - # Create a folder - # @param create_folder Name of the folder - # @param [Hash] opts the optional parameters - # @return [CreateModel] - describe 'create_folder test' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - # unit tests for delete_folder - # Delete a folder (and all its lists) - # @param folder_id Id of the folder - # @param [Hash] opts the optional parameters - # @return [nil] - describe 'delete_folder test' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - # unit tests for get_folder - # Returns a folder's details - # @param folder_id id of the folder - # @param [Hash] opts the optional parameters - # @return [GetFolder] - describe 'get_folder test' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - # unit tests for get_folder_lists - # Get lists in a folder - # @param folder_id Id of the folder - # @param [Hash] opts the optional parameters - # @option opts [Integer] :limit Number of documents per page - # @option opts [Integer] :offset Index of the first document of the page - # @option opts [String] :sort Sort the results in the ascending/descending order of record creation. Default order is **descending** if `sort` is not passed - # @return [GetFolderLists] - describe 'get_folder_lists test' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - # unit tests for get_folders - # Get all folders - # @param limit Number of documents per page - # @param offset Index of the first document of the page - # @param [Hash] opts the optional parameters - # @option opts [String] :sort Sort the results in the ascending/descending order of record creation. Default order is **descending** if `sort` is not passed - # @return [GetFolders] - describe 'get_folders test' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - # unit tests for update_folder - # Update a folder - # @param folder_id Id of the folder - # @param update_folder Name of the folder - # @param [Hash] opts the optional parameters - # @return [nil] - describe 'update_folder test' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - -end diff --git a/spec/api/lists_api_spec.rb b/spec/api/lists_api_spec.rb deleted file mode 100644 index 8094188..0000000 --- a/spec/api/lists_api_spec.rb +++ /dev/null @@ -1,146 +0,0 @@ -=begin -#SendinBlue API - -#SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | - -OpenAPI spec version: 3.0.0 -Contact: contact@sendinblue.com -Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: 2.4.19 - -=end - -require 'spec_helper' -require 'json' - -# Unit tests for SibApiV3Sdk::ListsApi -# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) -# Please update as you see appropriate -describe 'ListsApi' do - before do - # run before each test - @instance = SibApiV3Sdk::ListsApi.new - end - - after do - # run after each test - end - - describe 'test an instance of ListsApi' do - it 'should create an instance of ListsApi' do - expect(@instance).to be_instance_of(SibApiV3Sdk::ListsApi) - end - end - - # unit tests for add_contact_to_list - # Add existing contacts to a list - # @param list_id Id of the list - # @param contact_emails Emails addresses OR IDs of the contacts - # @param [Hash] opts the optional parameters - # @return [PostContactInfo] - describe 'add_contact_to_list test' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - # unit tests for create_list - # Create a list - # @param create_list Values to create a list - # @param [Hash] opts the optional parameters - # @return [CreateModel] - describe 'create_list test' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - # unit tests for delete_list - # Delete a list - # @param list_id Id of the list - # @param [Hash] opts the optional parameters - # @return [nil] - describe 'delete_list test' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - # unit tests for get_contacts_from_list - # Get contacts in a list - # @param list_id Id of the list - # @param [Hash] opts the optional parameters - # @option opts [String] :modified_since Filter (urlencoded) the contacts modified after a given UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ). Prefer to pass your timezone in date-time format for accurate result. - # @option opts [Integer] :limit Number of documents per page - # @option opts [Integer] :offset Index of the first document of the page - # @option opts [String] :sort Sort the results in the ascending/descending order of record creation. Default order is **descending** if `sort` is not passed - # @return [GetContacts] - describe 'get_contacts_from_list test' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - # unit tests for get_folder_lists - # Get lists in a folder - # @param folder_id Id of the folder - # @param [Hash] opts the optional parameters - # @option opts [Integer] :limit Number of documents per page - # @option opts [Integer] :offset Index of the first document of the page - # @option opts [String] :sort Sort the results in the ascending/descending order of record creation. Default order is **descending** if `sort` is not passed - # @return [GetFolderLists] - describe 'get_folder_lists test' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - # unit tests for get_list - # Get a list's details - # @param list_id Id of the list - # @param [Hash] opts the optional parameters - # @return [GetExtendedList] - describe 'get_list test' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - # unit tests for get_lists - # Get all the lists - # @param [Hash] opts the optional parameters - # @option opts [Integer] :limit Number of documents per page - # @option opts [Integer] :offset Index of the first document of the page - # @option opts [String] :sort Sort the results in the ascending/descending order of record creation. Default order is **descending** if `sort` is not passed - # @return [GetLists] - describe 'get_lists test' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - # unit tests for remove_contact_from_list - # Delete a contact from a list - # @param list_id Id of the list - # @param contact_emails Emails addresses OR IDs of the contacts - # @param [Hash] opts the optional parameters - # @return [PostContactInfo] - describe 'remove_contact_from_list test' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - # unit tests for update_list - # Update a list - # @param list_id Id of the list - # @param update_list Values to update a list - # @param [Hash] opts the optional parameters - # @return [nil] - describe 'update_list test' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - -end diff --git a/spec/models/body_1_spec.rb b/spec/models/body_1_spec.rb index 9808458..046ed0f 100644 --- a/spec/models/body_1_spec.rb +++ b/spec/models/body_1_spec.rb @@ -44,4 +44,10 @@ end end + describe 'test attribute "country_code"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + end diff --git a/spec/models/body_spec.rb b/spec/models/body_spec.rb index defd0d0..343ec49 100644 --- a/spec/models/body_spec.rb +++ b/spec/models/body_spec.rb @@ -44,4 +44,10 @@ end end + describe 'test attribute "country_code"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + end diff --git a/spec/models/create_email_campaign_recipients_spec.rb b/spec/models/create_email_campaign_recipients_spec.rb index 1a501d0..59089f7 100644 --- a/spec/models/create_email_campaign_recipients_spec.rb +++ b/spec/models/create_email_campaign_recipients_spec.rb @@ -44,4 +44,10 @@ end end + describe 'test attribute "segment_ids"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + end diff --git a/spec/models/create_email_campaign_spec.rb b/spec/models/create_email_campaign_spec.rb index a652200..fa7d4f6 100644 --- a/spec/models/create_email_campaign_spec.rb +++ b/spec/models/create_email_campaign_spec.rb @@ -204,4 +204,16 @@ end end + describe 'test attribute "unsubscription_page_id"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "update_form_id"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + end diff --git a/spec/models/note_data_spec.rb b/spec/models/note_data_spec.rb index e2b20bd..948f983 100644 --- a/spec/models/note_data_spec.rb +++ b/spec/models/note_data_spec.rb @@ -50,4 +50,10 @@ end end + describe 'test attribute "company_ids"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + end diff --git a/spec/models/update_email_campaign_recipients_spec.rb b/spec/models/update_email_campaign_recipients_spec.rb index f365e6d..67469d6 100644 --- a/spec/models/update_email_campaign_recipients_spec.rb +++ b/spec/models/update_email_campaign_recipients_spec.rb @@ -44,4 +44,10 @@ end end + describe 'test attribute "segment_ids"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + end diff --git a/spec/models/update_email_campaign_spec.rb b/spec/models/update_email_campaign_spec.rb index 61caf0f..6780efa 100644 --- a/spec/models/update_email_campaign_spec.rb +++ b/spec/models/update_email_campaign_spec.rb @@ -204,4 +204,16 @@ end end + describe 'test attribute "unsubscription_page_id"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "update_form_id"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + end From 12242e18b49414002dfd82db2c050adb69f22542 Mon Sep 17 00:00:00 2001 From: NAGENDRA KUMAR Date: Thu, 2 May 2024 16:58:53 +0530 Subject: [PATCH 09/10] Update README.md --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index f8ec083..c8123bd 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,4 @@ +# [DEPRECATED:warning:] api-v3-sdk # SendinBlue's API v3 Ruby Library SendinBlue's API exposes the entire SendinBlue features via a standardized programmatic interface. Please refer to the full [documentation](https://developers.sendinblue.com) to learn more. From 47666fc327cf85af2bc5e2204af1667809cee7dc Mon Sep 17 00:00:00 2001 From: NAGENDRA KUMAR Date: Wed, 22 May 2024 22:28:18 +0530 Subject: [PATCH 10/10] redirect to new sdk --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index c8123bd..f132211 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,5 @@ # [DEPRECATED:warning:] api-v3-sdk +Please upgrade to [brevo-ruby](https://github.com/getbrevo/brevo-ruby) # SendinBlue's API v3 Ruby Library SendinBlue's API exposes the entire SendinBlue features via a standardized programmatic interface. Please refer to the full [documentation](https://developers.sendinblue.com) to learn more.