diff --git a/README.md b/README.md index f76a722..cfa227a 100644 --- a/README.md +++ b/README.md @@ -103,7 +103,7 @@ Class | Method | HTTP request | Description *SibApiV3Sdk::ContactsApi* | [**get_list**](docs/ContactsApi.md#get_list) | **GET** /contacts/lists/{listId} | Get the details of a list *SibApiV3Sdk::ContactsApi* | [**get_lists**](docs/ContactsApi.md#get_lists) | **GET** /contacts/lists | Get all the lists *SibApiV3Sdk::ContactsApi* | [**import_contacts**](docs/ContactsApi.md#import_contacts) | **POST** /contacts/import | Import contacts -*SibApiV3Sdk::ContactsApi* | [**remove_contact_to_list**](docs/ContactsApi.md#remove_contact_to_list) | **POST** /contacts/lists/{listId}/contacts/remove | Remove existing contacts from a list +*SibApiV3Sdk::ContactsApi* | [**remove_contact_from_list**](docs/ContactsApi.md#remove_contact_from_list) | **POST** /contacts/lists/{listId}/contacts/remove | Remove existing contacts from a list *SibApiV3Sdk::ContactsApi* | [**request_contact_export**](docs/ContactsApi.md#request_contact_export) | **POST** /contacts/export | Export contacts *SibApiV3Sdk::ContactsApi* | [**update_attribute**](docs/ContactsApi.md#update_attribute) | **PUT** /contacts/attributes/{attributeCategory}/{attributeName} | Updates contact attribute *SibApiV3Sdk::ContactsApi* | [**update_contact**](docs/ContactsApi.md#update_contact) | **PUT** /contacts/{email} | Updates a contact @@ -132,19 +132,19 @@ Class | Method | HTTP request | Description *SibApiV3Sdk::ListsApi* | [**get_folder_lists**](docs/ListsApi.md#get_folder_lists) | **GET** /contacts/folders/{folderId}/lists | Get the lists in a folder *SibApiV3Sdk::ListsApi* | [**get_list**](docs/ListsApi.md#get_list) | **GET** /contacts/lists/{listId} | Get the details of a list *SibApiV3Sdk::ListsApi* | [**get_lists**](docs/ListsApi.md#get_lists) | **GET** /contacts/lists | Get all the lists -*SibApiV3Sdk::ListsApi* | [**remove_contact_to_list**](docs/ListsApi.md#remove_contact_to_list) | **POST** /contacts/lists/{listId}/contacts/remove | Remove existing contacts from a list +*SibApiV3Sdk::ListsApi* | [**remove_contact_from_list**](docs/ListsApi.md#remove_contact_from_list) | **POST** /contacts/lists/{listId}/contacts/remove | Remove existing contacts from a list *SibApiV3Sdk::ListsApi* | [**update_list**](docs/ListsApi.md#update_list) | **PUT** /contacts/lists/{listId} | Update a list *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/{childId}/credits/add | Add Email and/or SMS credits to a specific child account -*SibApiV3Sdk::ResellerApi* | [**associate_ip_to_child**](docs/ResellerApi.md#associate_ip_to_child) | **POST** /reseller/children/{childId}/ips/associate | Associate a dedicated IP to the child +*SibApiV3Sdk::ResellerApi* | [**add_credits**](docs/ResellerApi.md#add_credits) | **POST** /reseller/children/{childAuthKey}/credits/add | Add Email and/or SMS credits to a specific child account +*SibApiV3Sdk::ResellerApi* | [**associate_ip_to_child**](docs/ResellerApi.md#associate_ip_to_child) | **POST** /reseller/children/{childAuthKey}/ips/associate | Associate a dedicated IP to the child *SibApiV3Sdk::ResellerApi* | [**create_reseller_child**](docs/ResellerApi.md#create_reseller_child) | **POST** /reseller/children | Creates a reseller child -*SibApiV3Sdk::ResellerApi* | [**delete_reseller_child**](docs/ResellerApi.md#delete_reseller_child) | **DELETE** /reseller/children/{childId} | Deletes a single reseller child based on the childId supplied -*SibApiV3Sdk::ResellerApi* | [**dissociate_ip_from_child**](docs/ResellerApi.md#dissociate_ip_from_child) | **POST** /reseller/children/{childId}/ips/dissociate | Dissociate a dedicated IP to the child -*SibApiV3Sdk::ResellerApi* | [**get_child_info**](docs/ResellerApi.md#get_child_info) | **GET** /reseller/children/{childId} | Gets the info about a specific child account +*SibApiV3Sdk::ResellerApi* | [**delete_reseller_child**](docs/ResellerApi.md#delete_reseller_child) | **DELETE** /reseller/children/{childAuthKey} | Deletes a single reseller child based on the childAuthKey supplied +*SibApiV3Sdk::ResellerApi* | [**dissociate_ip_from_child**](docs/ResellerApi.md#dissociate_ip_from_child) | **POST** /reseller/children/{childAuthKey}/ips/dissociate | Dissociate a dedicated IP to the child +*SibApiV3Sdk::ResellerApi* | [**get_child_info**](docs/ResellerApi.md#get_child_info) | **GET** /reseller/children/{childAuthKey} | Gets the info about a specific child account *SibApiV3Sdk::ResellerApi* | [**get_reseller_childs**](docs/ResellerApi.md#get_reseller_childs) | **GET** /reseller/children | Gets the list of all reseller's children accounts -*SibApiV3Sdk::ResellerApi* | [**remove_credits**](docs/ResellerApi.md#remove_credits) | **POST** /reseller/children/{childId}/credits/remove | Remove Email and/or SMS credits from a specific child account -*SibApiV3Sdk::ResellerApi* | [**update_reseller_child**](docs/ResellerApi.md#update_reseller_child) | **PUT** /reseller/children/{childId} | Updates infos of reseller's child based on the childId supplied +*SibApiV3Sdk::ResellerApi* | [**remove_credits**](docs/ResellerApi.md#remove_credits) | **POST** /reseller/children/{childAuthKey}/credits/remove | Remove Email and/or SMS credits from a specific child account +*SibApiV3Sdk::ResellerApi* | [**update_reseller_child**](docs/ResellerApi.md#update_reseller_child) | **PUT** /reseller/children/{childAuthKey} | Updates infos of reseller's child based on the childAuthKey supplied *SibApiV3Sdk::SMSCampaignsApi* | [**create_sms_campaign**](docs/SMSCampaignsApi.md#create_sms_campaign) | **POST** /smsCampaigns | Creates an SMS campaign *SibApiV3Sdk::SMSCampaignsApi* | [**delete_sms_campaign**](docs/SMSCampaignsApi.md#delete_sms_campaign) | **DELETE** /smsCampaigns/{campaignId} | Delete the SMS campaign *SibApiV3Sdk::SMSCampaignsApi* | [**get_sms_campaign**](docs/SMSCampaignsApi.md#get_sms_campaign) | **GET** /smsCampaigns/{campaignId} | Get an SMS campaign @@ -186,8 +186,8 @@ Class | Method | HTTP request | Description ## Documentation for Models + - [SibApiV3Sdk::AddContactToList](docs/AddContactToList.md) - [SibApiV3Sdk::AddCredits](docs/AddCredits.md) - - [SibApiV3Sdk::AddRemoveContactToList](docs/AddRemoveContactToList.md) - [SibApiV3Sdk::CreateAttribute](docs/CreateAttribute.md) - [SibApiV3Sdk::CreateAttributeEnumeration](docs/CreateAttributeEnumeration.md) - [SibApiV3Sdk::CreateChild](docs/CreateChild.md) @@ -197,6 +197,7 @@ Class | Method | HTTP request | Description - [SibApiV3Sdk::CreateEmailCampaignSender](docs/CreateEmailCampaignSender.md) - [SibApiV3Sdk::CreateList](docs/CreateList.md) - [SibApiV3Sdk::CreateModel](docs/CreateModel.md) + - [SibApiV3Sdk::CreateReseller](docs/CreateReseller.md) - [SibApiV3Sdk::CreateSender](docs/CreateSender.md) - [SibApiV3Sdk::CreateSenderIps](docs/CreateSenderIps.md) - [SibApiV3Sdk::CreateSenderModel](docs/CreateSenderModel.md) @@ -223,8 +224,9 @@ Class | Method | HTTP request | Description - [SibApiV3Sdk::GetCampaignRecipients](docs/GetCampaignRecipients.md) - [SibApiV3Sdk::GetCampaignStats](docs/GetCampaignStats.md) - [SibApiV3Sdk::GetChildInfoApiKeys](docs/GetChildInfoApiKeys.md) + - [SibApiV3Sdk::GetChildInfoApiKeysV2](docs/GetChildInfoApiKeysV2.md) + - [SibApiV3Sdk::GetChildInfoApiKeysV3](docs/GetChildInfoApiKeysV3.md) - [SibApiV3Sdk::GetChildInfoCredits](docs/GetChildInfoCredits.md) - - [SibApiV3Sdk::GetChildInfoIps](docs/GetChildInfoIps.md) - [SibApiV3Sdk::GetChildInfoStatistics](docs/GetChildInfoStatistics.md) - [SibApiV3Sdk::GetChildrenList](docs/GetChildrenList.md) - [SibApiV3Sdk::GetClient](docs/GetClient.md) @@ -289,6 +291,7 @@ Class | Method | HTTP request | Description - [SibApiV3Sdk::RemainingCreditModel](docs/RemainingCreditModel.md) - [SibApiV3Sdk::RemainingCreditModelChild](docs/RemainingCreditModelChild.md) - [SibApiV3Sdk::RemainingCreditModelReseller](docs/RemainingCreditModelReseller.md) + - [SibApiV3Sdk::RemoveContactFromList](docs/RemoveContactFromList.md) - [SibApiV3Sdk::RemoveCredits](docs/RemoveCredits.md) - [SibApiV3Sdk::RequestContactExport](docs/RequestContactExport.md) - [SibApiV3Sdk::RequestContactImport](docs/RequestContactImport.md) diff --git a/docs/AddContactToList.md b/docs/AddContactToList.md new file mode 100644 index 0000000..bb7ce7c --- /dev/null +++ b/docs/AddContactToList.md @@ -0,0 +1,8 @@ +# SibApiV3Sdk::AddContactToList + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**emails** | **Array<String>** | Emails to add to a list | [optional] + + diff --git a/docs/AddCredits.md b/docs/AddCredits.md index de9b697..9e08ab1 100644 --- a/docs/AddCredits.md +++ b/docs/AddCredits.md @@ -3,7 +3,7 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**sms** | **Integer** | SMS credits to be added to the child account | [optional] -**email** | **Integer** | Email credits to be added to the child account | [optional] +**sms** | **Integer** | Required if email credits are empty. SMS credits to be added to the child account | [optional] +**email** | **Integer** | Required if sms credits are empty. Email credits to be added to the child account | [optional] diff --git a/docs/AddRemoveContactToList.md b/docs/AddRemoveContactToList.md deleted file mode 100644 index f340fce..0000000 --- a/docs/AddRemoveContactToList.md +++ /dev/null @@ -1,8 +0,0 @@ -# SibApiV3Sdk::AddRemoveContactToList - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**emails** | **Array<String>** | Emails to add or remove from a list | [optional] - - diff --git a/docs/ContactsApi.md b/docs/ContactsApi.md index 8ae53fc..edcb232 100644 --- a/docs/ContactsApi.md +++ b/docs/ContactsApi.md @@ -23,7 +23,7 @@ Method | HTTP request | Description [**get_list**](ContactsApi.md#get_list) | **GET** /contacts/lists/{listId} | Get the details of a list [**get_lists**](ContactsApi.md#get_lists) | **GET** /contacts/lists | Get all the lists [**import_contacts**](ContactsApi.md#import_contacts) | **POST** /contacts/import | Import contacts -[**remove_contact_to_list**](ContactsApi.md#remove_contact_to_list) | **POST** /contacts/lists/{listId}/contacts/remove | Remove existing contacts from a list +[**remove_contact_from_list**](ContactsApi.md#remove_contact_from_list) | **POST** /contacts/lists/{listId}/contacts/remove | Remove existing contacts from a list [**request_contact_export**](ContactsApi.md#request_contact_export) | **POST** /contacts/export | Export contacts [**update_attribute**](ContactsApi.md#update_attribute) | **PUT** /contacts/attributes/{attributeCategory}/{attributeName} | Updates contact attribute [**update_contact**](ContactsApi.md#update_contact) | **PUT** /contacts/{email} | Updates a contact @@ -52,7 +52,7 @@ api_instance = SibApiV3Sdk::ContactsApi.new list_id = 789 # Integer | Id of the list -contact_emails = SibApiV3Sdk::AddRemoveContactToList.new # AddRemoveContactToList | Emails addresses of the contacts +contact_emails = SibApiV3Sdk::AddContactToList.new # AddContactToList | Emails addresses of the contacts begin @@ -69,7 +69,7 @@ end Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **list_id** | **Integer**| Id of the list | - **contact_emails** | [**AddRemoveContactToList**](AddRemoveContactToList.md)| Emails addresses of the contacts | + **contact_emails** | [**AddContactToList**](AddContactToList.md)| Emails addresses of the contacts | ### Return type @@ -1048,8 +1048,8 @@ Name | Type | Description | Notes -# **remove_contact_to_list** -> PostContactInfo remove_contact_to_list(list_id, contact_emails) +# **remove_contact_from_list** +> PostContactInfo remove_contact_from_list(list_id, contact_emails) Remove existing contacts from a list @@ -1069,15 +1069,15 @@ api_instance = SibApiV3Sdk::ContactsApi.new list_id = 789 # Integer | Id of the list -contact_emails = SibApiV3Sdk::AddRemoveContactToList.new # AddRemoveContactToList | Emails adresses of the contact +contact_emails = SibApiV3Sdk::RemoveContactFromList.new # RemoveContactFromList | Emails adresses of the contact begin #Remove existing contacts from a list - result = api_instance.remove_contact_to_list(list_id, contact_emails) + result = api_instance.remove_contact_from_list(list_id, contact_emails) p result rescue SibApiV3Sdk::ApiError => e - puts "Exception when calling ContactsApi->remove_contact_to_list: #{e}" + puts "Exception when calling ContactsApi->remove_contact_from_list: #{e}" end ``` @@ -1086,7 +1086,7 @@ end Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **list_id** | **Integer**| Id of the list | - **contact_emails** | [**AddRemoveContactToList**](AddRemoveContactToList.md)| Emails adresses of the contact | + **contact_emails** | [**RemoveContactFromList**](RemoveContactFromList.md)| Emails adresses of the contact | ### Return type diff --git a/docs/CreateReseller.md b/docs/CreateReseller.md new file mode 100644 index 0000000..9b0c8c3 --- /dev/null +++ b/docs/CreateReseller.md @@ -0,0 +1,8 @@ +# SibApiV3Sdk::CreateReseller + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**auth_key** | **String** | AuthKey of Reseller child created | + + diff --git a/docs/GetChildInfo.md b/docs/GetChildInfo.md index c9534f0..bea0dbf 100644 --- a/docs/GetChildInfo.md +++ b/docs/GetChildInfo.md @@ -10,7 +10,7 @@ Name | Type | Description | Notes **credits** | [**GetChildInfoCredits**](GetChildInfoCredits.md) | | [optional] **statistics** | [**GetChildInfoStatistics**](GetChildInfoStatistics.md) | | [optional] **password** | **String** | The encrypted password of child account | -**ips** | [**Array<GetChildInfoIps>**](GetChildInfoIps.md) | IP(s) associated to a child account user | [optional] -**api_keys** | [**Array<GetChildInfoApiKeys>**](GetChildInfoApiKeys.md) | API Keys associated to child account | [optional] +**ips** | **Array<String>** | IP(s) associated to a child account user | [optional] +**api_keys** | [**GetChildInfoApiKeys**](GetChildInfoApiKeys.md) | | [optional] diff --git a/docs/GetChildInfoApiKeys.md b/docs/GetChildInfoApiKeys.md index 994246c..82f2de6 100644 --- a/docs/GetChildInfoApiKeys.md +++ b/docs/GetChildInfoApiKeys.md @@ -3,8 +3,7 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**name** | **String** | Name of the key | -**key** | **String** | API Key | -**secret** | **String** | Secret Key associated to the API Key (in case v1 Key is used only) | [optional] +**v2** | [**Array<GetChildInfoApiKeysV2>**](GetChildInfoApiKeysV2.md) | | +**v3** | [**Array<GetChildInfoApiKeysV3>**](GetChildInfoApiKeysV3.md) | | [optional] diff --git a/docs/GetChildInfoApiKeysV2.md b/docs/GetChildInfoApiKeysV2.md new file mode 100644 index 0000000..fa996a3 --- /dev/null +++ b/docs/GetChildInfoApiKeysV2.md @@ -0,0 +1,9 @@ +# SibApiV3Sdk::GetChildInfoApiKeysV2 + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **String** | Name of the key for version 2 | +**key** | **String** | API Key for version 2 | + + diff --git a/docs/GetChildInfoApiKeysV3.md b/docs/GetChildInfoApiKeysV3.md new file mode 100644 index 0000000..982041b --- /dev/null +++ b/docs/GetChildInfoApiKeysV3.md @@ -0,0 +1,9 @@ +# SibApiV3Sdk::GetChildInfoApiKeysV3 + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **String** | Name of the key for version 3 | +**key** | **String** | API Key for version 3 | + + diff --git a/docs/GetChildInfoIps.md b/docs/GetChildInfoIps.md deleted file mode 100644 index 688dc94..0000000 --- a/docs/GetChildInfoIps.md +++ /dev/null @@ -1,9 +0,0 @@ -# SibApiV3Sdk::GetChildInfoIps - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**id** | **Integer** | ID of the IP | -**ip** | **String** | IP associated to the child account user | - - diff --git a/docs/GetEmailCampaign.md b/docs/GetEmailCampaign.md index 058a7ef..61bf47b 100644 --- a/docs/GetEmailCampaign.md +++ b/docs/GetEmailCampaign.md @@ -23,5 +23,7 @@ Name | Type | Description | Notes **inline_image_activation** | **BOOLEAN** | Status of inline image. inlineImageActivation = false means image can’t be embedded, & inlineImageActivation = true means image can be embedded, in the email. | [optional] **mirror_active** | **BOOLEAN** | Status of mirror links in campaign. mirrorActive = false means mirror links are deactivated, & mirrorActive = true means mirror links are activated, in the campaign | [optional] **recurring** | **BOOLEAN** | FOR TRIGGER ONLY ! Type of trigger campaign.recurring = false means contact can receive the same Trigger campaign only once, & recurring = true means contact can receive the same Trigger campaign several times | [optional] +**recipients** | **Object** | | +**statistics** | **Object** | | diff --git a/docs/GetSmsCampaign.md b/docs/GetSmsCampaign.md index d2f852a..aa7727e 100644 --- a/docs/GetSmsCampaign.md +++ b/docs/GetSmsCampaign.md @@ -12,5 +12,7 @@ Name | Type | Description | Notes **sender** | **String** | Sender of the SMS Campaign | **created_at** | **DateTime** | Creation UTC date-time of the SMS campaign (YYYY-MM-DDTHH:mm:ss.SSSZ) | **modified_at** | **DateTime** | UTC date-time of last modification of the SMS campaign (YYYY-MM-DDTHH:mm:ss.SSSZ) | +**recipients** | **Object** | | +**statistics** | **Object** | | diff --git a/docs/ListsApi.md b/docs/ListsApi.md index 3e67311..e761b74 100644 --- a/docs/ListsApi.md +++ b/docs/ListsApi.md @@ -11,7 +11,7 @@ Method | HTTP request | Description [**get_folder_lists**](ListsApi.md#get_folder_lists) | **GET** /contacts/folders/{folderId}/lists | Get the lists in a folder [**get_list**](ListsApi.md#get_list) | **GET** /contacts/lists/{listId} | Get the details of a list [**get_lists**](ListsApi.md#get_lists) | **GET** /contacts/lists | Get all the lists -[**remove_contact_to_list**](ListsApi.md#remove_contact_to_list) | **POST** /contacts/lists/{listId}/contacts/remove | Remove existing contacts from a list +[**remove_contact_from_list**](ListsApi.md#remove_contact_from_list) | **POST** /contacts/lists/{listId}/contacts/remove | Remove existing contacts from a list [**update_list**](ListsApi.md#update_list) | **PUT** /contacts/lists/{listId} | Update a list @@ -36,7 +36,7 @@ api_instance = SibApiV3Sdk::ListsApi.new list_id = 789 # Integer | Id of the list -contact_emails = SibApiV3Sdk::AddRemoveContactToList.new # AddRemoveContactToList | Emails addresses of the contacts +contact_emails = SibApiV3Sdk::AddContactToList.new # AddContactToList | Emails addresses of the contacts begin @@ -53,7 +53,7 @@ end Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **list_id** | **Integer**| Id of the list | - **contact_emails** | [**AddRemoveContactToList**](AddRemoveContactToList.md)| Emails addresses of the contacts | + **contact_emails** | [**AddContactToList**](AddContactToList.md)| Emails addresses of the contacts | ### Return type @@ -398,8 +398,8 @@ Name | Type | Description | Notes -# **remove_contact_to_list** -> PostContactInfo remove_contact_to_list(list_id, contact_emails) +# **remove_contact_from_list** +> PostContactInfo remove_contact_from_list(list_id, contact_emails) Remove existing contacts from a list @@ -419,15 +419,15 @@ api_instance = SibApiV3Sdk::ListsApi.new list_id = 789 # Integer | Id of the list -contact_emails = SibApiV3Sdk::AddRemoveContactToList.new # AddRemoveContactToList | Emails adresses of the contact +contact_emails = SibApiV3Sdk::RemoveContactFromList.new # RemoveContactFromList | Emails adresses of the contact begin #Remove existing contacts from a list - result = api_instance.remove_contact_to_list(list_id, contact_emails) + result = api_instance.remove_contact_from_list(list_id, contact_emails) p result rescue SibApiV3Sdk::ApiError => e - puts "Exception when calling ListsApi->remove_contact_to_list: #{e}" + puts "Exception when calling ListsApi->remove_contact_from_list: #{e}" end ``` @@ -436,7 +436,7 @@ end Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **list_id** | **Integer**| Id of the list | - **contact_emails** | [**AddRemoveContactToList**](AddRemoveContactToList.md)| Emails adresses of the contact | + **contact_emails** | [**RemoveContactFromList**](RemoveContactFromList.md)| Emails adresses of the contact | ### Return type diff --git a/docs/ManageIp.md b/docs/ManageIp.md index b6416a4..7d69750 100644 --- a/docs/ManageIp.md +++ b/docs/ManageIp.md @@ -3,6 +3,6 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**ip_id** | **Integer** | ID of the IP | [optional] +**ip** | **String** | Dedicated ID | [optional] diff --git a/docs/RemoveContactFromList.md b/docs/RemoveContactFromList.md new file mode 100644 index 0000000..2f8969c --- /dev/null +++ b/docs/RemoveContactFromList.md @@ -0,0 +1,9 @@ +# SibApiV3Sdk::RemoveContactFromList + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**emails** | **Array<String>** | Required if 'all' is false. Emails to remove from a list | [optional] +**all** | **BOOLEAN** | Required if 'emails' is empty. Remove all existing contacts from a list | [optional] + + diff --git a/docs/RemoveCredits.md b/docs/RemoveCredits.md index 98e2e33..aedc2a2 100644 --- a/docs/RemoveCredits.md +++ b/docs/RemoveCredits.md @@ -3,7 +3,7 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**sms** | **Integer** | SMS credits to be removed from the child account | [optional] -**email** | **Integer** | Email credits to be removed from the child account | [optional] +**sms** | **Integer** | Required if email credits are empty. SMS credits to be removed from the child account | [optional] +**email** | **Integer** | Required if sms credits are empty. Email credits to be removed from the child account | [optional] diff --git a/docs/ResellerApi.md b/docs/ResellerApi.md index 27d3ff8..1df2e1d 100644 --- a/docs/ResellerApi.md +++ b/docs/ResellerApi.md @@ -4,19 +4,19 @@ All URIs are relative to *https://api.sendinblue.com/v3* Method | HTTP request | Description ------------- | ------------- | ------------- -[**add_credits**](ResellerApi.md#add_credits) | **POST** /reseller/children/{childId}/credits/add | Add Email and/or SMS credits to a specific child account -[**associate_ip_to_child**](ResellerApi.md#associate_ip_to_child) | **POST** /reseller/children/{childId}/ips/associate | Associate a dedicated IP to the child +[**add_credits**](ResellerApi.md#add_credits) | **POST** /reseller/children/{childAuthKey}/credits/add | Add Email and/or SMS credits to a specific child account +[**associate_ip_to_child**](ResellerApi.md#associate_ip_to_child) | **POST** /reseller/children/{childAuthKey}/ips/associate | Associate a dedicated IP to the child [**create_reseller_child**](ResellerApi.md#create_reseller_child) | **POST** /reseller/children | Creates a reseller child -[**delete_reseller_child**](ResellerApi.md#delete_reseller_child) | **DELETE** /reseller/children/{childId} | Deletes a single reseller child based on the childId supplied -[**dissociate_ip_from_child**](ResellerApi.md#dissociate_ip_from_child) | **POST** /reseller/children/{childId}/ips/dissociate | Dissociate a dedicated IP to the child -[**get_child_info**](ResellerApi.md#get_child_info) | **GET** /reseller/children/{childId} | Gets the info about a specific child account +[**delete_reseller_child**](ResellerApi.md#delete_reseller_child) | **DELETE** /reseller/children/{childAuthKey} | Deletes a single reseller child based on the childAuthKey supplied +[**dissociate_ip_from_child**](ResellerApi.md#dissociate_ip_from_child) | **POST** /reseller/children/{childAuthKey}/ips/dissociate | Dissociate a dedicated IP to the child +[**get_child_info**](ResellerApi.md#get_child_info) | **GET** /reseller/children/{childAuthKey} | Gets the info about a specific child account [**get_reseller_childs**](ResellerApi.md#get_reseller_childs) | **GET** /reseller/children | Gets the list of all reseller's children accounts -[**remove_credits**](ResellerApi.md#remove_credits) | **POST** /reseller/children/{childId}/credits/remove | Remove Email and/or SMS credits from a specific child account -[**update_reseller_child**](ResellerApi.md#update_reseller_child) | **PUT** /reseller/children/{childId} | Updates infos of reseller's child based on the childId supplied +[**remove_credits**](ResellerApi.md#remove_credits) | **POST** /reseller/children/{childAuthKey}/credits/remove | Remove Email and/or SMS credits from a specific child account +[**update_reseller_child**](ResellerApi.md#update_reseller_child) | **PUT** /reseller/children/{childAuthKey} | Updates infos of reseller's child based on the childAuthKey supplied # **add_credits** -> RemainingCreditModel add_credits(child_id, add_credits) +> RemainingCreditModel add_credits(child_auth_key, add_credits) Add Email and/or SMS credits to a specific child account @@ -34,14 +34,14 @@ end api_instance = SibApiV3Sdk::ResellerApi.new -child_id = 789 # Integer | id of reseller's child +child_auth_key = "child_auth_key_example" # String | auth key of reseller's child add_credits = SibApiV3Sdk::AddCredits.new # AddCredits | Values to post to add credit to a specific child account begin #Add Email and/or SMS credits to a specific child account - result = api_instance.add_credits(child_id, add_credits) + result = api_instance.add_credits(child_auth_key, add_credits) p result rescue SibApiV3Sdk::ApiError => e puts "Exception when calling ResellerApi->add_credits: #{e}" @@ -52,7 +52,7 @@ end Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **child_id** | **Integer**| id of reseller's child | + **child_auth_key** | **String**| auth key of reseller's child | **add_credits** | [**AddCredits**](AddCredits.md)| Values to post to add credit to a specific child account | ### Return type @@ -71,7 +71,7 @@ Name | Type | Description | Notes # **associate_ip_to_child** -> associate_ip_to_child(child_id, ip_id) +> associate_ip_to_child(child_auth_key, ip) Associate a dedicated IP to the child @@ -89,14 +89,14 @@ end api_instance = SibApiV3Sdk::ResellerApi.new -child_id = 789 # Integer | id of reseller's child +child_auth_key = "child_auth_key_example" # String | auth key of reseller's child -ip_id = SibApiV3Sdk::ManageIp.new # ManageIp | IP's id +ip = SibApiV3Sdk::ManageIp.new # ManageIp | IP to associate begin #Associate a dedicated IP to the child - api_instance.associate_ip_to_child(child_id, ip_id) + api_instance.associate_ip_to_child(child_auth_key, ip) rescue SibApiV3Sdk::ApiError => e puts "Exception when calling ResellerApi->associate_ip_to_child: #{e}" end @@ -106,8 +106,8 @@ end Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **child_id** | **Integer**| id of reseller's child | - **ip_id** | [**ManageIp**](ManageIp.md)| IP's id | + **child_auth_key** | **String**| auth key of reseller's child | + **ip** | [**ManageIp**](ManageIp.md)| IP to associate | ### Return type @@ -125,7 +125,7 @@ nil (empty response body) # **create_reseller_child** -> CreateModel create_reseller_child(opts) +> CreateReseller create_reseller_child(opts) Creates a reseller child @@ -164,7 +164,7 @@ Name | Type | Description | Notes ### Return type -[**CreateModel**](CreateModel.md) +[**CreateReseller**](CreateReseller.md) ### Authorization @@ -178,9 +178,9 @@ Name | Type | Description | Notes # **delete_reseller_child** -> delete_reseller_child(child_id) +> delete_reseller_child(child_auth_key) -Deletes a single reseller child based on the childId supplied +Deletes a single reseller child based on the childAuthKey supplied ### Example ```ruby @@ -196,12 +196,12 @@ end api_instance = SibApiV3Sdk::ResellerApi.new -child_id = 789 # Integer | id of reseller's child +child_auth_key = "child_auth_key_example" # String | auth key of reseller's child begin - #Deletes a single reseller child based on the childId supplied - api_instance.delete_reseller_child(child_id) + #Deletes a single reseller child based on the childAuthKey supplied + api_instance.delete_reseller_child(child_auth_key) rescue SibApiV3Sdk::ApiError => e puts "Exception when calling ResellerApi->delete_reseller_child: #{e}" end @@ -211,7 +211,7 @@ end Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **child_id** | **Integer**| id of reseller's child | + **child_auth_key** | **String**| auth key of reseller's child | ### Return type @@ -229,7 +229,7 @@ nil (empty response body) # **dissociate_ip_from_child** -> dissociate_ip_from_child(child_id, ip_id) +> dissociate_ip_from_child(child_auth_key, ip) Dissociate a dedicated IP to the child @@ -247,14 +247,14 @@ end api_instance = SibApiV3Sdk::ResellerApi.new -child_id = 789 # Integer | id of reseller's child +child_auth_key = "child_auth_key_example" # String | auth key of reseller's child -ip_id = SibApiV3Sdk::ManageIp.new # ManageIp | IP's id +ip = SibApiV3Sdk::ManageIp.new # ManageIp | IP to dissociate begin #Dissociate a dedicated IP to the child - api_instance.dissociate_ip_from_child(child_id, ip_id) + api_instance.dissociate_ip_from_child(child_auth_key, ip) rescue SibApiV3Sdk::ApiError => e puts "Exception when calling ResellerApi->dissociate_ip_from_child: #{e}" end @@ -264,8 +264,8 @@ end Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **child_id** | **Integer**| id of reseller's child | - **ip_id** | [**ManageIp**](ManageIp.md)| IP's id | + **child_auth_key** | **String**| auth key of reseller's child | + **ip** | [**ManageIp**](ManageIp.md)| IP to dissociate | ### Return type @@ -283,7 +283,7 @@ nil (empty response body) # **get_child_info** -> GetChildInfo get_child_info(child_id) +> GetChildInfo get_child_info(child_auth_key) Gets the info about a specific child account @@ -301,12 +301,12 @@ end api_instance = SibApiV3Sdk::ResellerApi.new -child_id = 789 # Integer | id of reseller's child +child_auth_key = "child_auth_key_example" # String | auth key of reseller's child begin #Gets the info about a specific child account - result = api_instance.get_child_info(child_id) + result = api_instance.get_child_info(child_auth_key) p result rescue SibApiV3Sdk::ApiError => e puts "Exception when calling ResellerApi->get_child_info: #{e}" @@ -317,7 +317,7 @@ end Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **child_id** | **Integer**| id of reseller's child | + **child_auth_key** | **String**| auth key of reseller's child | ### Return type @@ -381,7 +381,7 @@ This endpoint does not need any parameter. # **remove_credits** -> RemainingCreditModel remove_credits(child_id, remove_credits) +> RemainingCreditModel remove_credits(child_auth_key, remove_credits) Remove Email and/or SMS credits from a specific child account @@ -399,14 +399,14 @@ end api_instance = SibApiV3Sdk::ResellerApi.new -child_id = 789 # Integer | id of reseller's child +child_auth_key = "child_auth_key_example" # String | auth key of reseller's child remove_credits = SibApiV3Sdk::RemoveCredits.new # RemoveCredits | Values to post to remove email or SMS credits from a specific child account begin #Remove Email and/or SMS credits from a specific child account - result = api_instance.remove_credits(child_id, remove_credits) + result = api_instance.remove_credits(child_auth_key, remove_credits) p result rescue SibApiV3Sdk::ApiError => e puts "Exception when calling ResellerApi->remove_credits: #{e}" @@ -417,7 +417,7 @@ end Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **child_id** | **Integer**| id of reseller's child | + **child_auth_key** | **String**| auth key of reseller's child | **remove_credits** | [**RemoveCredits**](RemoveCredits.md)| Values to post to remove email or SMS credits from a specific child account | ### Return type @@ -436,9 +436,9 @@ Name | Type | Description | Notes # **update_reseller_child** -> update_reseller_child(child_id, reseller_child) +> update_reseller_child(child_auth_key, reseller_child) -Updates infos of reseller's child based on the childId supplied +Updates infos of reseller's child based on the childAuthKey supplied ### Example ```ruby @@ -454,14 +454,14 @@ end api_instance = SibApiV3Sdk::ResellerApi.new -child_id = 789 # Integer | id of reseller's child +child_auth_key = "child_auth_key_example" # String | auth key of reseller's child reseller_child = SibApiV3Sdk::UpdateChild.new # UpdateChild | values to update in child profile begin - #Updates infos of reseller's child based on the childId supplied - api_instance.update_reseller_child(child_id, reseller_child) + #Updates infos of reseller's child based on the childAuthKey supplied + api_instance.update_reseller_child(child_auth_key, reseller_child) rescue SibApiV3Sdk::ApiError => e puts "Exception when calling ResellerApi->update_reseller_child: #{e}" end @@ -471,7 +471,7 @@ end Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **child_id** | **Integer**| id of reseller's child | + **child_auth_key** | **String**| auth key of reseller's child | **reseller_child** | [**UpdateChild**](UpdateChild.md)| values to update in child profile | ### Return type diff --git a/docs/SendSmtpEmail.md b/docs/SendSmtpEmail.md index 10953d0..f6ef613 100644 --- a/docs/SendSmtpEmail.md +++ b/docs/SendSmtpEmail.md @@ -3,15 +3,17 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**sender** | [**SendSmtpEmailSender**](SendSmtpEmailSender.md) | | +**sender** | [**SendSmtpEmailSender**](SendSmtpEmailSender.md) | | [optional] **to** | [**Array<SendSmtpEmailTo>**](SendSmtpEmailTo.md) | Email addresses and names of the recipients | **bcc** | [**Array<SendSmtpEmailBcc>**](SendSmtpEmailBcc.md) | Email addresses and names of the recipients in bcc | [optional] **cc** | [**Array<SendSmtpEmailCc>**](SendSmtpEmailCc.md) | Email addresses and names of the recipients in cc | [optional] -**html_content** | **String** | HTML body of the message | -**text_content** | **String** | Plain Text body of the message | [optional] -**subject** | **String** | Subject of the message | +**html_content** | **String** | HTML body of the message ( Mandatory if 'templateId' is not passed, ignored if 'templateId' is passed ) | [optional] +**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. Name can be used in both cases to define the attachment name. It is mandatory in case of content. Extension allowed: 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 and eps | [optional] +**attachment** | [**Array<SendSmtpEmailAttachment>**](SendSmtpEmailAttachment.md) | Pass the absolute URL (no local file) or the base64 content of the attachment. Name can be used in both cases to define the attachment name. It is mandatory in case of content. Extension allowed: 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 and eps ( Ignored if 'templateId' is passed ) | [optional] **headers** | **Hash<String, String>** | | [optional] +**template_id** | **Integer** | Id of the template | [optional] +**params** | **Hash<String, String>** | | [optional] diff --git a/docs/UpdateChild.md b/docs/UpdateChild.md index e79792c..52b6ad9 100644 --- a/docs/UpdateChild.md +++ b/docs/UpdateChild.md @@ -8,6 +8,5 @@ Name | Type | Description | Notes **last_name** | **String** | New Last name to use to update the child account | [optional] **company_name** | **String** | New Company name to use to update the child account | [optional] **password** | **String** | New password for the child account to login | [optional] -**ips** | **Array<Integer>** | | [optional] diff --git a/lib/sib-api-v3-sdk.rb b/lib/sib-api-v3-sdk.rb index 8dd2267..a15ce9d 100644 --- a/lib/sib-api-v3-sdk.rb +++ b/lib/sib-api-v3-sdk.rb @@ -17,8 +17,8 @@ require 'sib-api-v3-sdk/configuration' # Models +require 'sib-api-v3-sdk/models/add_contact_to_list' require 'sib-api-v3-sdk/models/add_credits' -require 'sib-api-v3-sdk/models/add_remove_contact_to_list' 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' @@ -28,6 +28,7 @@ require 'sib-api-v3-sdk/models/create_email_campaign_sender' require 'sib-api-v3-sdk/models/create_list' require 'sib-api-v3-sdk/models/create_model' +require 'sib-api-v3-sdk/models/create_reseller' require 'sib-api-v3-sdk/models/create_sender' require 'sib-api-v3-sdk/models/create_sender_ips' require 'sib-api-v3-sdk/models/create_sender_model' @@ -54,8 +55,9 @@ require 'sib-api-v3-sdk/models/get_campaign_recipients' require 'sib-api-v3-sdk/models/get_campaign_stats' require 'sib-api-v3-sdk/models/get_child_info_api_keys' +require 'sib-api-v3-sdk/models/get_child_info_api_keys_v2' +require 'sib-api-v3-sdk/models/get_child_info_api_keys_v3' require 'sib-api-v3-sdk/models/get_child_info_credits' -require 'sib-api-v3-sdk/models/get_child_info_ips' require 'sib-api-v3-sdk/models/get_child_info_statistics' require 'sib-api-v3-sdk/models/get_children_list' require 'sib-api-v3-sdk/models/get_client' @@ -120,6 +122,7 @@ require 'sib-api-v3-sdk/models/remaining_credit_model' require 'sib-api-v3-sdk/models/remaining_credit_model_child' require 'sib-api-v3-sdk/models/remaining_credit_model_reseller' +require 'sib-api-v3-sdk/models/remove_contact_from_list' require 'sib-api-v3-sdk/models/remove_credits' require 'sib-api-v3-sdk/models/request_contact_export' require 'sib-api-v3-sdk/models/request_contact_import' diff --git a/lib/sib-api-v3-sdk/api/contacts_api.rb b/lib/sib-api-v3-sdk/api/contacts_api.rb index a1a022f..d9b8582 100644 --- a/lib/sib-api-v3-sdk/api/contacts_api.rb +++ b/lib/sib-api-v3-sdk/api/contacts_api.rb @@ -1139,8 +1139,8 @@ def import_contacts_with_http_info(request_contact_import, opts = {}) # @param contact_emails Emails adresses of the contact # @param [Hash] opts the optional parameters # @return [PostContactInfo] - def remove_contact_to_list(list_id, contact_emails, opts = {}) - data, _status_code, _headers = remove_contact_to_list_with_http_info(list_id, contact_emails, opts) + 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) return data end @@ -1150,17 +1150,17 @@ def remove_contact_to_list(list_id, contact_emails, opts = {}) # @param contact_emails Emails adresses of the contact # @param [Hash] opts the optional parameters # @return [Array<(PostContactInfo, Fixnum, Hash)>] PostContactInfo data, response status code and response headers - def remove_contact_to_list_with_http_info(list_id, contact_emails, opts = {}) + 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: ContactsApi.remove_contact_to_list ..." + @api_client.config.logger.debug "Calling API: ContactsApi.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 ContactsApi.remove_contact_to_list" + fail ArgumentError, "Missing the required parameter 'list_id' when calling ContactsApi.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 ContactsApi.remove_contact_to_list" + fail ArgumentError, "Missing the required parameter 'contact_emails' when calling ContactsApi.remove_contact_from_list" end # resource path local_var_path = "/contacts/lists/{listId}/contacts/remove".sub('{' + 'listId' + '}', list_id.to_s) @@ -1189,7 +1189,7 @@ def remove_contact_to_list_with_http_info(list_id, contact_emails, opts = {}) :auth_names => auth_names, :return_type => 'PostContactInfo') if @api_client.config.debugging - @api_client.config.logger.debug "API called: ContactsApi#remove_contact_to_list\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + @api_client.config.logger.debug "API called: ContactsApi#remove_contact_from_list\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end diff --git a/lib/sib-api-v3-sdk/api/lists_api.rb b/lib/sib-api-v3-sdk/api/lists_api.rb index 5108c29..829a8b3 100644 --- a/lib/sib-api-v3-sdk/api/lists_api.rb +++ b/lib/sib-api-v3-sdk/api/lists_api.rb @@ -443,8 +443,8 @@ def get_lists_with_http_info(opts = {}) # @param contact_emails Emails adresses of the contact # @param [Hash] opts the optional parameters # @return [PostContactInfo] - def remove_contact_to_list(list_id, contact_emails, opts = {}) - data, _status_code, _headers = remove_contact_to_list_with_http_info(list_id, contact_emails, opts) + 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) return data end @@ -454,17 +454,17 @@ def remove_contact_to_list(list_id, contact_emails, opts = {}) # @param contact_emails Emails adresses of the contact # @param [Hash] opts the optional parameters # @return [Array<(PostContactInfo, Fixnum, Hash)>] PostContactInfo data, response status code and response headers - def remove_contact_to_list_with_http_info(list_id, contact_emails, opts = {}) + 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_to_list ..." + @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_to_list" + 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_to_list" + 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) @@ -493,7 +493,7 @@ def remove_contact_to_list_with_http_info(list_id, contact_emails, opts = {}) :auth_names => auth_names, :return_type => 'PostContactInfo') if @api_client.config.debugging - @api_client.config.logger.debug "API called: ListsApi#remove_contact_to_list\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + @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 diff --git a/lib/sib-api-v3-sdk/api/reseller_api.rb b/lib/sib-api-v3-sdk/api/reseller_api.rb index 630fade..0e0c0ec 100644 --- a/lib/sib-api-v3-sdk/api/reseller_api.rb +++ b/lib/sib-api-v3-sdk/api/reseller_api.rb @@ -22,35 +22,35 @@ def initialize(api_client = ApiClient.default) # Add Email and/or SMS credits to a specific child account # - # @param child_id id of reseller's child + # @param child_auth_key auth key of reseller's child # @param add_credits Values to post to add credit to a specific child account # @param [Hash] opts the optional parameters # @return [RemainingCreditModel] - def add_credits(child_id, add_credits, opts = {}) - data, _status_code, _headers = add_credits_with_http_info(child_id, add_credits, opts) + def add_credits(child_auth_key, add_credits, opts = {}) + data, _status_code, _headers = add_credits_with_http_info(child_auth_key, add_credits, opts) return data end # Add Email and/or SMS credits to a specific child account # - # @param child_id id of reseller's child + # @param child_auth_key auth key of reseller's child # @param add_credits Values to post to add credit to a specific child account # @param [Hash] opts the optional parameters # @return [Array<(RemainingCreditModel, Fixnum, Hash)>] RemainingCreditModel data, response status code and response headers - def add_credits_with_http_info(child_id, add_credits, opts = {}) + def add_credits_with_http_info(child_auth_key, add_credits, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: ResellerApi.add_credits ..." end - # verify the required parameter 'child_id' is set - if @api_client.config.client_side_validation && child_id.nil? - fail ArgumentError, "Missing the required parameter 'child_id' when calling ResellerApi.add_credits" + # verify the required parameter 'child_auth_key' is set + if @api_client.config.client_side_validation && child_auth_key.nil? + fail ArgumentError, "Missing the required parameter 'child_auth_key' when calling ResellerApi.add_credits" end # verify the required parameter 'add_credits' is set if @api_client.config.client_side_validation && add_credits.nil? fail ArgumentError, "Missing the required parameter 'add_credits' when calling ResellerApi.add_credits" end # resource path - local_var_path = "/reseller/children/{childId}/credits/add".sub('{' + 'childId' + '}', child_id.to_s) + local_var_path = "/reseller/children/{childAuthKey}/credits/add".sub('{' + 'childAuthKey' + '}', child_auth_key.to_s) # query parameters query_params = {} @@ -83,35 +83,35 @@ def add_credits_with_http_info(child_id, add_credits, opts = {}) # Associate a dedicated IP to the child # - # @param child_id id of reseller's child - # @param ip_id IP's id + # @param child_auth_key auth key of reseller's child + # @param ip IP to associate # @param [Hash] opts the optional parameters # @return [nil] - def associate_ip_to_child(child_id, ip_id, opts = {}) - associate_ip_to_child_with_http_info(child_id, ip_id, opts) + def associate_ip_to_child(child_auth_key, ip, opts = {}) + associate_ip_to_child_with_http_info(child_auth_key, ip, opts) return nil end # Associate a dedicated IP to the child # - # @param child_id id of reseller's child - # @param ip_id IP's id + # @param child_auth_key auth key of reseller's child + # @param ip IP to associate # @param [Hash] opts the optional parameters # @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers - def associate_ip_to_child_with_http_info(child_id, ip_id, opts = {}) + def associate_ip_to_child_with_http_info(child_auth_key, ip, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: ResellerApi.associate_ip_to_child ..." end - # verify the required parameter 'child_id' is set - if @api_client.config.client_side_validation && child_id.nil? - fail ArgumentError, "Missing the required parameter 'child_id' when calling ResellerApi.associate_ip_to_child" + # verify the required parameter 'child_auth_key' is set + if @api_client.config.client_side_validation && child_auth_key.nil? + fail ArgumentError, "Missing the required parameter 'child_auth_key' when calling ResellerApi.associate_ip_to_child" end - # verify the required parameter 'ip_id' is set - if @api_client.config.client_side_validation && ip_id.nil? - fail ArgumentError, "Missing the required parameter 'ip_id' when calling ResellerApi.associate_ip_to_child" + # verify the required parameter 'ip' is set + if @api_client.config.client_side_validation && ip.nil? + fail ArgumentError, "Missing the required parameter 'ip' when calling ResellerApi.associate_ip_to_child" end # resource path - local_var_path = "/reseller/children/{childId}/ips/associate".sub('{' + 'childId' + '}', child_id.to_s) + local_var_path = "/reseller/children/{childAuthKey}/ips/associate".sub('{' + 'childAuthKey' + '}', child_auth_key.to_s) # query parameters query_params = {} @@ -127,7 +127,7 @@ def associate_ip_to_child_with_http_info(child_id, ip_id, opts = {}) form_params = {} # http body (model) - post_body = @api_client.object_to_http_body(ip_id) + post_body = @api_client.object_to_http_body(ip) auth_names = ['api-key'] data, status_code, headers = @api_client.call_api(:POST, local_var_path, :header_params => header_params, @@ -145,7 +145,7 @@ def associate_ip_to_child_with_http_info(child_id, ip_id, opts = {}) # # @param [Hash] opts the optional parameters # @option opts [CreateChild] :reseller_child reseller child to add - # @return [CreateModel] + # @return [CreateReseller] def create_reseller_child(opts = {}) data, _status_code, _headers = create_reseller_child_with_http_info(opts) return data @@ -155,7 +155,7 @@ def create_reseller_child(opts = {}) # # @param [Hash] opts the optional parameters # @option opts [CreateChild] :reseller_child reseller child to add - # @return [Array<(CreateModel, Fixnum, Hash)>] CreateModel data, response status code and response headers + # @return [Array<(CreateReseller, Fixnum, Hash)>] CreateReseller data, response status code and response headers def create_reseller_child_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: ResellerApi.create_reseller_child ..." @@ -185,38 +185,38 @@ def create_reseller_child_with_http_info(opts = {}) :form_params => form_params, :body => post_body, :auth_names => auth_names, - :return_type => 'CreateModel') + :return_type => 'CreateReseller') if @api_client.config.debugging @api_client.config.logger.debug "API called: ResellerApi#create_reseller_child\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end - # Deletes a single reseller child based on the childId supplied + # Deletes a single reseller child based on the childAuthKey supplied # - # @param child_id id of reseller's child + # @param child_auth_key auth key of reseller's child # @param [Hash] opts the optional parameters # @return [nil] - def delete_reseller_child(child_id, opts = {}) - delete_reseller_child_with_http_info(child_id, opts) + def delete_reseller_child(child_auth_key, opts = {}) + delete_reseller_child_with_http_info(child_auth_key, opts) return nil end - # Deletes a single reseller child based on the childId supplied + # Deletes a single reseller child based on the childAuthKey supplied # - # @param child_id id of reseller's child + # @param child_auth_key auth key of reseller's child # @param [Hash] opts the optional parameters # @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers - def delete_reseller_child_with_http_info(child_id, opts = {}) + def delete_reseller_child_with_http_info(child_auth_key, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: ResellerApi.delete_reseller_child ..." end - # verify the required parameter 'child_id' is set - if @api_client.config.client_side_validation && child_id.nil? - fail ArgumentError, "Missing the required parameter 'child_id' when calling ResellerApi.delete_reseller_child" + # verify the required parameter 'child_auth_key' is set + if @api_client.config.client_side_validation && child_auth_key.nil? + fail ArgumentError, "Missing the required parameter 'child_auth_key' when calling ResellerApi.delete_reseller_child" end # resource path - local_var_path = "/reseller/children/{childId}".sub('{' + 'childId' + '}', child_id.to_s) + local_var_path = "/reseller/children/{childAuthKey}".sub('{' + 'childAuthKey' + '}', child_auth_key.to_s) # query parameters query_params = {} @@ -248,35 +248,35 @@ def delete_reseller_child_with_http_info(child_id, opts = {}) # Dissociate a dedicated IP to the child # - # @param child_id id of reseller's child - # @param ip_id IP's id + # @param child_auth_key auth key of reseller's child + # @param ip IP to dissociate # @param [Hash] opts the optional parameters # @return [nil] - def dissociate_ip_from_child(child_id, ip_id, opts = {}) - dissociate_ip_from_child_with_http_info(child_id, ip_id, opts) + def dissociate_ip_from_child(child_auth_key, ip, opts = {}) + dissociate_ip_from_child_with_http_info(child_auth_key, ip, opts) return nil end # Dissociate a dedicated IP to the child # - # @param child_id id of reseller's child - # @param ip_id IP's id + # @param child_auth_key auth key of reseller's child + # @param ip IP to dissociate # @param [Hash] opts the optional parameters # @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers - def dissociate_ip_from_child_with_http_info(child_id, ip_id, opts = {}) + def dissociate_ip_from_child_with_http_info(child_auth_key, ip, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: ResellerApi.dissociate_ip_from_child ..." end - # verify the required parameter 'child_id' is set - if @api_client.config.client_side_validation && child_id.nil? - fail ArgumentError, "Missing the required parameter 'child_id' when calling ResellerApi.dissociate_ip_from_child" + # verify the required parameter 'child_auth_key' is set + if @api_client.config.client_side_validation && child_auth_key.nil? + fail ArgumentError, "Missing the required parameter 'child_auth_key' when calling ResellerApi.dissociate_ip_from_child" end - # verify the required parameter 'ip_id' is set - if @api_client.config.client_side_validation && ip_id.nil? - fail ArgumentError, "Missing the required parameter 'ip_id' when calling ResellerApi.dissociate_ip_from_child" + # verify the required parameter 'ip' is set + if @api_client.config.client_side_validation && ip.nil? + fail ArgumentError, "Missing the required parameter 'ip' when calling ResellerApi.dissociate_ip_from_child" end # resource path - local_var_path = "/reseller/children/{childId}/ips/dissociate".sub('{' + 'childId' + '}', child_id.to_s) + local_var_path = "/reseller/children/{childAuthKey}/ips/dissociate".sub('{' + 'childAuthKey' + '}', child_auth_key.to_s) # query parameters query_params = {} @@ -292,7 +292,7 @@ def dissociate_ip_from_child_with_http_info(child_id, ip_id, opts = {}) form_params = {} # http body (model) - post_body = @api_client.object_to_http_body(ip_id) + post_body = @api_client.object_to_http_body(ip) auth_names = ['api-key'] data, status_code, headers = @api_client.call_api(:POST, local_var_path, :header_params => header_params, @@ -308,29 +308,29 @@ def dissociate_ip_from_child_with_http_info(child_id, ip_id, opts = {}) # Gets the info about a specific child account # - # @param child_id id of reseller's child + # @param child_auth_key auth key of reseller's child # @param [Hash] opts the optional parameters # @return [GetChildInfo] - def get_child_info(child_id, opts = {}) - data, _status_code, _headers = get_child_info_with_http_info(child_id, opts) + def get_child_info(child_auth_key, opts = {}) + data, _status_code, _headers = get_child_info_with_http_info(child_auth_key, opts) return data end # Gets the info about a specific child account # - # @param child_id id of reseller's child + # @param child_auth_key auth key of reseller's child # @param [Hash] opts the optional parameters # @return [Array<(GetChildInfo, Fixnum, Hash)>] GetChildInfo data, response status code and response headers - def get_child_info_with_http_info(child_id, opts = {}) + def get_child_info_with_http_info(child_auth_key, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: ResellerApi.get_child_info ..." end - # verify the required parameter 'child_id' is set - if @api_client.config.client_side_validation && child_id.nil? - fail ArgumentError, "Missing the required parameter 'child_id' when calling ResellerApi.get_child_info" + # verify the required parameter 'child_auth_key' is set + if @api_client.config.client_side_validation && child_auth_key.nil? + fail ArgumentError, "Missing the required parameter 'child_auth_key' when calling ResellerApi.get_child_info" end # resource path - local_var_path = "/reseller/children/{childId}".sub('{' + 'childId' + '}', child_id.to_s) + local_var_path = "/reseller/children/{childAuthKey}".sub('{' + 'childAuthKey' + '}', child_auth_key.to_s) # query parameters query_params = {} @@ -412,35 +412,35 @@ def get_reseller_childs_with_http_info(opts = {}) # Remove Email and/or SMS credits from a specific child account # - # @param child_id id of reseller's child + # @param child_auth_key auth key of reseller's child # @param remove_credits Values to post to remove email or SMS credits from a specific child account # @param [Hash] opts the optional parameters # @return [RemainingCreditModel] - def remove_credits(child_id, remove_credits, opts = {}) - data, _status_code, _headers = remove_credits_with_http_info(child_id, remove_credits, opts) + def remove_credits(child_auth_key, remove_credits, opts = {}) + data, _status_code, _headers = remove_credits_with_http_info(child_auth_key, remove_credits, opts) return data end # Remove Email and/or SMS credits from a specific child account # - # @param child_id id of reseller's child + # @param child_auth_key auth key of reseller's child # @param remove_credits Values to post to remove email or SMS credits from a specific child account # @param [Hash] opts the optional parameters # @return [Array<(RemainingCreditModel, Fixnum, Hash)>] RemainingCreditModel data, response status code and response headers - def remove_credits_with_http_info(child_id, remove_credits, opts = {}) + def remove_credits_with_http_info(child_auth_key, remove_credits, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: ResellerApi.remove_credits ..." end - # verify the required parameter 'child_id' is set - if @api_client.config.client_side_validation && child_id.nil? - fail ArgumentError, "Missing the required parameter 'child_id' when calling ResellerApi.remove_credits" + # verify the required parameter 'child_auth_key' is set + if @api_client.config.client_side_validation && child_auth_key.nil? + fail ArgumentError, "Missing the required parameter 'child_auth_key' when calling ResellerApi.remove_credits" end # verify the required parameter 'remove_credits' is set if @api_client.config.client_side_validation && remove_credits.nil? fail ArgumentError, "Missing the required parameter 'remove_credits' when calling ResellerApi.remove_credits" end # resource path - local_var_path = "/reseller/children/{childId}/credits/remove".sub('{' + 'childId' + '}', child_id.to_s) + local_var_path = "/reseller/children/{childAuthKey}/credits/remove".sub('{' + 'childAuthKey' + '}', child_auth_key.to_s) # query parameters query_params = {} @@ -471,37 +471,37 @@ def remove_credits_with_http_info(child_id, remove_credits, opts = {}) return data, status_code, headers end - # Updates infos of reseller's child based on the childId supplied + # Updates infos of reseller's child based on the childAuthKey supplied # - # @param child_id id of reseller's child + # @param child_auth_key auth key of reseller's child # @param reseller_child values to update in child profile # @param [Hash] opts the optional parameters # @return [nil] - def update_reseller_child(child_id, reseller_child, opts = {}) - update_reseller_child_with_http_info(child_id, reseller_child, opts) + def update_reseller_child(child_auth_key, reseller_child, opts = {}) + update_reseller_child_with_http_info(child_auth_key, reseller_child, opts) return nil end - # Updates infos of reseller's child based on the childId supplied + # Updates infos of reseller's child based on the childAuthKey supplied # - # @param child_id id of reseller's child + # @param child_auth_key auth key of reseller's child # @param reseller_child values to update in child profile # @param [Hash] opts the optional parameters # @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers - def update_reseller_child_with_http_info(child_id, reseller_child, opts = {}) + def update_reseller_child_with_http_info(child_auth_key, reseller_child, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: ResellerApi.update_reseller_child ..." end - # verify the required parameter 'child_id' is set - if @api_client.config.client_side_validation && child_id.nil? - fail ArgumentError, "Missing the required parameter 'child_id' when calling ResellerApi.update_reseller_child" + # verify the required parameter 'child_auth_key' is set + if @api_client.config.client_side_validation && child_auth_key.nil? + fail ArgumentError, "Missing the required parameter 'child_auth_key' when calling ResellerApi.update_reseller_child" end # verify the required parameter 'reseller_child' is set if @api_client.config.client_side_validation && reseller_child.nil? fail ArgumentError, "Missing the required parameter 'reseller_child' when calling ResellerApi.update_reseller_child" end # resource path - local_var_path = "/reseller/children/{childId}".sub('{' + 'childId' + '}', child_id.to_s) + local_var_path = "/reseller/children/{childAuthKey}".sub('{' + 'childAuthKey' + '}', child_auth_key.to_s) # query parameters query_params = {} diff --git a/lib/sib-api-v3-sdk/models/add_remove_contact_to_list.rb b/lib/sib-api-v3-sdk/models/add_contact_to_list.rb similarity index 98% rename from lib/sib-api-v3-sdk/models/add_remove_contact_to_list.rb rename to lib/sib-api-v3-sdk/models/add_contact_to_list.rb index c2dec01..24a5a29 100644 --- a/lib/sib-api-v3-sdk/models/add_remove_contact_to_list.rb +++ b/lib/sib-api-v3-sdk/models/add_contact_to_list.rb @@ -14,8 +14,8 @@ module SibApiV3Sdk - class AddRemoveContactToList - # Emails to add or remove from a list + class AddContactToList + # Emails to add to a list attr_accessor :emails diff --git a/lib/sib-api-v3-sdk/models/add_credits.rb b/lib/sib-api-v3-sdk/models/add_credits.rb index 61ce00d..ed23b92 100644 --- a/lib/sib-api-v3-sdk/models/add_credits.rb +++ b/lib/sib-api-v3-sdk/models/add_credits.rb @@ -15,10 +15,10 @@ module SibApiV3Sdk class AddCredits - # SMS credits to be added to the child account + # Required if email credits are empty. SMS credits to be added to the child account attr_accessor :sms - # Email credits to be added to the child account + # Required if sms credits are empty. Email credits to be added to the child account attr_accessor :email diff --git a/lib/sib-api-v3-sdk/models/create_reseller.rb b/lib/sib-api-v3-sdk/models/create_reseller.rb new file mode 100644 index 0000000..3f76dc0 --- /dev/null +++ b/lib/sib-api-v3-sdk/models/create_reseller.rb @@ -0,0 +1,194 @@ +=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 | + +OpenAPI spec version: 3.0.0 +Contact: contact@sendinblue.com +Generated by: https://github.com/swagger-api/swagger-codegen.git +Swagger Codegen version: 2.3.1 + +=end + +require 'date' + +module SibApiV3Sdk + + class CreateReseller + # AuthKey of Reseller child created + attr_accessor :auth_key + + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'auth_key' => :'authKey' + } + end + + # Attribute type mapping. + def self.swagger_types + { + :'auth_key' => :'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?(:'authKey') + self.auth_key = attributes[:'authKey'] + 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 @auth_key.nil? + invalid_properties.push("invalid value for 'auth_key', auth_key cannot be nil.") + end + + return 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 @auth_key.nil? + return 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 && + auth_key == o.auth_key + 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 + [auth_key].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 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/error_model.rb b/lib/sib-api-v3-sdk/models/error_model.rb index 7517ba7..a8d61f6 100644 --- a/lib/sib-api-v3-sdk/models/error_model.rb +++ b/lib/sib-api-v3-sdk/models/error_model.rb @@ -96,7 +96,7 @@ def list_invalid_properties # @return true if the model is valid def valid? return false if @code.nil? - code_validator = EnumAttributeValidator.new('String', ["invalid_parameter", "missing_parameter", "out_of_range", "campaign_processing", "campaign_sent", "document_not_found", "reseller_permission", "not_enough_credits", "permission_denied", "duplicate_parameter", "duplicate_request", "method_not_allowed", "unauthorized", "account_under_validation", "not_acceptable"]) + code_validator = EnumAttributeValidator.new('String', ["invalid_parameter", "missing_parameter", "out_of_range", "campaign_processing", "campaign_sent", "document_not_found", "reseller_permission_denied", "not_enough_credits", "permission_denied", "duplicate_parameter", "duplicate_request", "method_not_allowed", "unauthorized", "account_under_validation", "not_acceptable"]) return false unless code_validator.valid?(@code) return false if @message.nil? return true @@ -105,7 +105,7 @@ def valid? # Custom attribute writer method checking allowed values (enum). # @param [Object] code Object to be assigned def code=(code) - validator = EnumAttributeValidator.new('String', ["invalid_parameter", "missing_parameter", "out_of_range", "campaign_processing", "campaign_sent", "document_not_found", "reseller_permission", "not_enough_credits", "permission_denied", "duplicate_parameter", "duplicate_request", "method_not_allowed", "unauthorized", "account_under_validation", "not_acceptable"]) + validator = EnumAttributeValidator.new('String', ["invalid_parameter", "missing_parameter", "out_of_range", "campaign_processing", "campaign_sent", "document_not_found", "reseller_permission_denied", "not_enough_credits", "permission_denied", "duplicate_parameter", "duplicate_request", "method_not_allowed", "unauthorized", "account_under_validation", "not_acceptable"]) unless validator.valid?(code) fail ArgumentError, "invalid value for 'code', must be one of #{validator.allowable_values}." end diff --git a/lib/sib-api-v3-sdk/models/get_child_info.rb b/lib/sib-api-v3-sdk/models/get_child_info.rb index 62a7399..1a6cd51 100644 --- a/lib/sib-api-v3-sdk/models/get_child_info.rb +++ b/lib/sib-api-v3-sdk/models/get_child_info.rb @@ -37,7 +37,6 @@ class GetChildInfo # IP(s) associated to a child account user attr_accessor :ips - # API Keys associated to child account attr_accessor :api_keys @@ -66,8 +65,8 @@ def self.swagger_types :'credits' => :'GetChildInfoCredits', :'statistics' => :'GetChildInfoStatistics', :'password' => :'String', - :'ips' => :'Array', - :'api_keys' => :'Array' + :'ips' => :'Array', + :'api_keys' => :'GetChildInfoApiKeys' } end @@ -114,9 +113,7 @@ def initialize(attributes = {}) end if attributes.has_key?(:'apiKeys') - if (value = attributes[:'apiKeys']).is_a?(Array) - self.api_keys = value - end + self.api_keys = attributes[:'apiKeys'] end end diff --git a/lib/sib-api-v3-sdk/models/get_child_info_api_keys.rb b/lib/sib-api-v3-sdk/models/get_child_info_api_keys.rb index 6a4f912..b624488 100644 --- a/lib/sib-api-v3-sdk/models/get_child_info_api_keys.rb +++ b/lib/sib-api-v3-sdk/models/get_child_info_api_keys.rb @@ -13,33 +13,26 @@ require 'date' module SibApiV3Sdk - + # API Keys associated to child account class GetChildInfoApiKeys - # Name of the key - attr_accessor :name - - # API Key - attr_accessor :key + attr_accessor :v2 - # Secret Key associated to the API Key (in case v1 Key is used only) - attr_accessor :secret + attr_accessor :v3 # Attribute mapping from ruby-style variable name to JSON key. def self.attribute_map { - :'name' => :'name', - :'key' => :'key', - :'secret' => :'secret' + :'v2' => :'v2', + :'v3' => :'v3' } end # Attribute type mapping. def self.swagger_types { - :'name' => :'String', - :'key' => :'String', - :'secret' => :'String' + :'v2' => :'Array', + :'v3' => :'Array' } end @@ -51,16 +44,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?(:'name') - self.name = attributes[:'name'] - end - - if attributes.has_key?(:'key') - self.key = attributes[:'key'] + if attributes.has_key?(:'v2') + if (value = attributes[:'v2']).is_a?(Array) + self.v2 = value + end end - if attributes.has_key?(:'secret') - self.secret = attributes[:'secret'] + if attributes.has_key?(:'v3') + if (value = attributes[:'v3']).is_a?(Array) + self.v3 = value + end end end @@ -69,12 +62,8 @@ 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 @key.nil? - invalid_properties.push("invalid value for 'key', key cannot be nil.") + if @v2.nil? + invalid_properties.push("invalid value for 'v2', v2 cannot be nil.") end return invalid_properties @@ -83,8 +72,7 @@ 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 @name.nil? - return false if @key.nil? + return false if @v2.nil? return true end @@ -93,9 +81,8 @@ def valid? def ==(o) return true if self.equal?(o) self.class == o.class && - name == o.name && - key == o.key && - secret == o.secret + v2 == o.v2 && + v3 == o.v3 end # @see the `==` method @@ -107,7 +94,7 @@ def eql?(o) # Calculates hash code according to all attributes. # @return [Fixnum] Hash code def hash - [name, key, secret].hash + [v2, v3].hash end # Builds the object from hash diff --git a/lib/sib-api-v3-sdk/models/get_child_info_api_keys_v2.rb b/lib/sib-api-v3-sdk/models/get_child_info_api_keys_v2.rb new file mode 100644 index 0000000..a8e5f86 --- /dev/null +++ b/lib/sib-api-v3-sdk/models/get_child_info_api_keys_v2.rb @@ -0,0 +1,209 @@ +=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 | + +OpenAPI spec version: 3.0.0 +Contact: contact@sendinblue.com +Generated by: https://github.com/swagger-api/swagger-codegen.git +Swagger Codegen version: 2.3.1 + +=end + +require 'date' + +module SibApiV3Sdk + + class GetChildInfoApiKeysV2 + # Name of the key for version 2 + attr_accessor :name + + # API Key for version 2 + attr_accessor :key + + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'name' => :'name', + :'key' => :'key' + } + end + + # Attribute type mapping. + def self.swagger_types + { + :'name' => :'String', + :'key' => :'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?(:'name') + self.name = attributes[:'name'] + end + + if attributes.has_key?(:'key') + self.key = attributes[:'key'] + 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 @key.nil? + invalid_properties.push("invalid value for 'key', key cannot be nil.") + end + + return 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 @key.nil? + return 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 && + key == o.key + 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, key].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 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_child_info_api_keys_v3.rb b/lib/sib-api-v3-sdk/models/get_child_info_api_keys_v3.rb new file mode 100644 index 0000000..0ba0fe8 --- /dev/null +++ b/lib/sib-api-v3-sdk/models/get_child_info_api_keys_v3.rb @@ -0,0 +1,209 @@ +=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 | + +OpenAPI spec version: 3.0.0 +Contact: contact@sendinblue.com +Generated by: https://github.com/swagger-api/swagger-codegen.git +Swagger Codegen version: 2.3.1 + +=end + +require 'date' + +module SibApiV3Sdk + + class GetChildInfoApiKeysV3 + # Name of the key for version 3 + attr_accessor :name + + # API Key for version 3 + attr_accessor :key + + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'name' => :'name', + :'key' => :'key' + } + end + + # Attribute type mapping. + def self.swagger_types + { + :'name' => :'String', + :'key' => :'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?(:'name') + self.name = attributes[:'name'] + end + + if attributes.has_key?(:'key') + self.key = attributes[:'key'] + 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 @key.nil? + invalid_properties.push("invalid value for 'key', key cannot be nil.") + end + + return 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 @key.nil? + return 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 && + key == o.key + 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, key].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 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_email_campaign.rb b/lib/sib-api-v3-sdk/models/get_email_campaign.rb index 2b2a6f4..ae89140 100644 --- a/lib/sib-api-v3-sdk/models/get_email_campaign.rb +++ b/lib/sib-api-v3-sdk/models/get_email_campaign.rb @@ -74,6 +74,10 @@ class GetEmailCampaign # FOR TRIGGER ONLY ! Type of trigger campaign.recurring = false means contact can receive the same Trigger campaign only once, & recurring = true means contact can receive the same Trigger campaign several times attr_accessor :recurring + attr_accessor :recipients + + attr_accessor :statistics + class EnumAttributeValidator attr_reader :datatype attr_reader :allowable_values @@ -118,7 +122,9 @@ def self.attribute_map :'modified_at' => :'modifiedAt', :'inline_image_activation' => :'inlineImageActivation', :'mirror_active' => :'mirrorActive', - :'recurring' => :'recurring' + :'recurring' => :'recurring', + :'recipients' => :'recipients', + :'statistics' => :'statistics' } end @@ -144,7 +150,9 @@ def self.swagger_types :'modified_at' => :'DateTime', :'inline_image_activation' => :'BOOLEAN', :'mirror_active' => :'BOOLEAN', - :'recurring' => :'BOOLEAN' + :'recurring' => :'BOOLEAN', + :'recipients' => :'Object', + :'statistics' => :'Object' } end @@ -236,6 +244,14 @@ def initialize(attributes = {}) self.recurring = attributes[:'recurring'] end + if attributes.has_key?(:'recipients') + self.recipients = attributes[:'recipients'] + end + + if attributes.has_key?(:'statistics') + self.statistics = attributes[:'statistics'] + end + end # Show invalid properties with the reasons. Usually used together with valid? @@ -302,6 +318,14 @@ def list_invalid_properties invalid_properties.push("invalid value for 'modified_at', modified_at cannot be nil.") end + if @recipients.nil? + invalid_properties.push("invalid value for 'recipients', recipients cannot be nil.") + end + + if @statistics.nil? + invalid_properties.push("invalid value for 'statistics', statistics cannot be nil.") + end + return invalid_properties end @@ -327,6 +351,8 @@ def valid? return false if @tag.nil? return false if @created_at.nil? return false if @modified_at.nil? + return false if @recipients.nil? + return false if @statistics.nil? return true end @@ -374,7 +400,9 @@ def ==(o) modified_at == o.modified_at && inline_image_activation == o.inline_image_activation && mirror_active == o.mirror_active && - recurring == o.recurring + recurring == o.recurring && + recipients == o.recipients && + statistics == o.statistics end # @see the `==` method @@ -386,7 +414,7 @@ def eql?(o) # Calculates hash code according to all attributes. # @return [Fixnum] Hash code def hash - [id, name, subject, type, status, scheduled_at, test_sent, header, footer, sender, reply_to, to_field, html_content, share_link, tag, created_at, modified_at, inline_image_activation, mirror_active, recurring].hash + [id, name, subject, type, status, scheduled_at, test_sent, header, footer, sender, reply_to, to_field, html_content, share_link, tag, created_at, modified_at, inline_image_activation, mirror_active, recurring, recipients, statistics].hash end # Builds the object from hash diff --git a/lib/sib-api-v3-sdk/models/get_sms_campaign.rb b/lib/sib-api-v3-sdk/models/get_sms_campaign.rb index d0c2e89..caf073d 100644 --- a/lib/sib-api-v3-sdk/models/get_sms_campaign.rb +++ b/lib/sib-api-v3-sdk/models/get_sms_campaign.rb @@ -42,6 +42,10 @@ class GetSmsCampaign # UTC date-time of last modification of the SMS campaign (YYYY-MM-DDTHH:mm:ss.SSSZ) attr_accessor :modified_at + attr_accessor :recipients + + attr_accessor :statistics + class EnumAttributeValidator attr_reader :datatype attr_reader :allowable_values @@ -75,7 +79,9 @@ def self.attribute_map :'test_sent' => :'testSent', :'sender' => :'sender', :'created_at' => :'createdAt', - :'modified_at' => :'modifiedAt' + :'modified_at' => :'modifiedAt', + :'recipients' => :'recipients', + :'statistics' => :'statistics' } end @@ -90,7 +96,9 @@ def self.swagger_types :'test_sent' => :'BOOLEAN', :'sender' => :'String', :'created_at' => :'DateTime', - :'modified_at' => :'DateTime' + :'modified_at' => :'DateTime', + :'recipients' => :'Object', + :'statistics' => :'Object' } end @@ -138,6 +146,14 @@ def initialize(attributes = {}) self.modified_at = attributes[:'modifiedAt'] end + if attributes.has_key?(:'recipients') + self.recipients = attributes[:'recipients'] + end + + if attributes.has_key?(:'statistics') + self.statistics = attributes[:'statistics'] + end + end # Show invalid properties with the reasons. Usually used together with valid? @@ -180,6 +196,14 @@ def list_invalid_properties invalid_properties.push("invalid value for 'modified_at', modified_at cannot be nil.") end + if @recipients.nil? + invalid_properties.push("invalid value for 'recipients', recipients cannot be nil.") + end + + if @statistics.nil? + invalid_properties.push("invalid value for 'statistics', statistics cannot be nil.") + end + return invalid_properties end @@ -197,6 +221,8 @@ def valid? return false if @sender.nil? return false if @created_at.nil? return false if @modified_at.nil? + return false if @recipients.nil? + return false if @statistics.nil? return true end @@ -223,7 +249,9 @@ def ==(o) test_sent == o.test_sent && sender == o.sender && created_at == o.created_at && - modified_at == o.modified_at + modified_at == o.modified_at && + recipients == o.recipients && + statistics == o.statistics end # @see the `==` method @@ -235,7 +263,7 @@ def eql?(o) # Calculates hash code according to all attributes. # @return [Fixnum] Hash code def hash - [id, name, status, content, scheduled_at, test_sent, sender, created_at, modified_at].hash + [id, name, status, content, scheduled_at, test_sent, sender, created_at, modified_at, recipients, statistics].hash end # Builds the object from hash diff --git a/lib/sib-api-v3-sdk/models/manage_ip.rb b/lib/sib-api-v3-sdk/models/manage_ip.rb index 3bd9c1e..2ff8d85 100644 --- a/lib/sib-api-v3-sdk/models/manage_ip.rb +++ b/lib/sib-api-v3-sdk/models/manage_ip.rb @@ -15,21 +15,21 @@ module SibApiV3Sdk class ManageIp - # ID of the IP - attr_accessor :ip_id + # Dedicated ID + attr_accessor :ip # Attribute mapping from ruby-style variable name to JSON key. def self.attribute_map { - :'ip_id' => :'ipId' + :'ip' => :'ip' } end # Attribute type mapping. def self.swagger_types { - :'ip_id' => :'Integer' + :'ip' => :'String' } end @@ -41,8 +41,8 @@ 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?(:'ipId') - self.ip_id = attributes[:'ipId'] + if attributes.has_key?(:'ip') + self.ip = attributes[:'ip'] end end @@ -65,7 +65,7 @@ def valid? def ==(o) return true if self.equal?(o) self.class == o.class && - ip_id == o.ip_id + ip == o.ip end # @see the `==` method @@ -77,7 +77,7 @@ def eql?(o) # Calculates hash code according to all attributes. # @return [Fixnum] Hash code def hash - [ip_id].hash + [ip].hash end # Builds the object from hash diff --git a/lib/sib-api-v3-sdk/models/get_child_info_ips.rb b/lib/sib-api-v3-sdk/models/remove_contact_from_list.rb similarity index 88% rename from lib/sib-api-v3-sdk/models/get_child_info_ips.rb rename to lib/sib-api-v3-sdk/models/remove_contact_from_list.rb index 067fe8e..03844f9 100644 --- a/lib/sib-api-v3-sdk/models/get_child_info_ips.rb +++ b/lib/sib-api-v3-sdk/models/remove_contact_from_list.rb @@ -14,27 +14,27 @@ module SibApiV3Sdk - class GetChildInfoIps - # ID of the IP - attr_accessor :id + class RemoveContactFromList + # Required if 'all' is false. Emails to remove from a list + attr_accessor :emails - # IP associated to the child account user - attr_accessor :ip + # Required if 'emails' is empty. Remove all existing contacts from a list + attr_accessor :all # Attribute mapping from ruby-style variable name to JSON key. def self.attribute_map { - :'id' => :'id', - :'ip' => :'ip' + :'emails' => :'emails', + :'all' => :'all' } end # Attribute type mapping. def self.swagger_types { - :'id' => :'Integer', - :'ip' => :'String' + :'emails' => :'Array', + :'all' => :'BOOLEAN' } end @@ -46,12 +46,14 @@ 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?(:'id') - self.id = attributes[:'id'] + if attributes.has_key?(:'emails') + if (value = attributes[:'emails']).is_a?(Array) + self.emails = value + end end - if attributes.has_key?(:'ip') - self.ip = attributes[:'ip'] + if attributes.has_key?(:'all') + self.all = attributes[:'all'] end end @@ -60,22 +62,12 @@ def initialize(attributes = {}) # @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 - - if @ip.nil? - invalid_properties.push("invalid value for 'ip', ip cannot be nil.") - end - return 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? - return false if @ip.nil? return true end @@ -84,8 +76,8 @@ def valid? def ==(o) return true if self.equal?(o) self.class == o.class && - id == o.id && - ip == o.ip + emails == o.emails && + all == o.all end # @see the `==` method @@ -97,7 +89,7 @@ def eql?(o) # Calculates hash code according to all attributes. # @return [Fixnum] Hash code def hash - [id, ip].hash + [emails, all].hash end # Builds the object from hash diff --git a/lib/sib-api-v3-sdk/models/remove_credits.rb b/lib/sib-api-v3-sdk/models/remove_credits.rb index 80ce356..0c0f825 100644 --- a/lib/sib-api-v3-sdk/models/remove_credits.rb +++ b/lib/sib-api-v3-sdk/models/remove_credits.rb @@ -15,10 +15,10 @@ module SibApiV3Sdk class RemoveCredits - # SMS credits to be removed from the child account + # Required if email credits are empty. SMS credits to be removed from the child account attr_accessor :sms - # Email credits to be removed from the child account + # Required if sms credits are empty. Email credits to be removed from the child account attr_accessor :email 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 dc81503..4353e65 100644 --- a/lib/sib-api-v3-sdk/models/send_smtp_email.rb +++ b/lib/sib-api-v3-sdk/models/send_smtp_email.rb @@ -26,22 +26,27 @@ class SendSmtpEmail # Email addresses and names of the recipients in cc attr_accessor :cc - # HTML body of the message + # HTML body of the message ( Mandatory if 'templateId' is not passed, ignored if 'templateId' is passed ) attr_accessor :html_content - # Plain Text body of the message + # Plain Text body of the message ( Ignored if 'templateId' is passed ) attr_accessor :text_content - # Subject of the message + # Subject of the message. Mandatory if 'templateId' is not passed attr_accessor :subject attr_accessor :reply_to - # Pass the absolute URL (no local file) or the base64 content of the attachment. Name can be used in both cases to define the attachment name. It is mandatory in case of content. Extension allowed: 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 and eps + # Pass the absolute URL (no local file) or the base64 content of the attachment. Name can be used in both cases to define the attachment name. It is mandatory in case of content. Extension allowed: 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 and eps ( Ignored if 'templateId' is passed ) attr_accessor :attachment attr_accessor :headers + # Id of the template + attr_accessor :template_id + + attr_accessor :params + # Attribute mapping from ruby-style variable name to JSON key. def self.attribute_map @@ -55,7 +60,9 @@ def self.attribute_map :'subject' => :'subject', :'reply_to' => :'replyTo', :'attachment' => :'attachment', - :'headers' => :'headers' + :'headers' => :'headers', + :'template_id' => :'templateId', + :'params' => :'params' } end @@ -71,7 +78,9 @@ def self.swagger_types :'subject' => :'String', :'reply_to' => :'SendSmtpEmailReplyTo', :'attachment' => :'Array', - :'headers' => :'Hash' + :'headers' => :'Hash', + :'template_id' => :'Integer', + :'params' => :'Hash' } end @@ -133,38 +142,33 @@ def initialize(attributes = {}) end end + if attributes.has_key?(:'templateId') + self.template_id = attributes[:'templateId'] + end + + if attributes.has_key?(:'params') + if (value = attributes[:'params']).is_a?(Hash) + self.params = 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 - if @sender.nil? - invalid_properties.push("invalid value for 'sender', sender cannot be nil.") - end - if @to.nil? invalid_properties.push("invalid value for 'to', to cannot be nil.") end - if @html_content.nil? - invalid_properties.push("invalid value for 'html_content', html_content cannot be nil.") - end - - if @subject.nil? - invalid_properties.push("invalid value for 'subject', subject cannot be nil.") - end - return 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 @sender.nil? return false if @to.nil? - return false if @html_content.nil? - return false if @subject.nil? return true end @@ -182,7 +186,9 @@ def ==(o) subject == o.subject && reply_to == o.reply_to && attachment == o.attachment && - headers == o.headers + headers == o.headers && + template_id == o.template_id && + params == o.params end # @see the `==` method @@ -194,7 +200,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].hash + [sender, to, bcc, cc, html_content, text_content, subject, reply_to, attachment, headers, template_id, params].hash end # Builds the object from hash diff --git a/lib/sib-api-v3-sdk/models/send_smtp_email_sender.rb b/lib/sib-api-v3-sdk/models/send_smtp_email_sender.rb index 619404a..c985a71 100644 --- a/lib/sib-api-v3-sdk/models/send_smtp_email_sender.rb +++ b/lib/sib-api-v3-sdk/models/send_smtp_email_sender.rb @@ -13,7 +13,7 @@ require 'date' module SibApiV3Sdk - + # Sender from which emails are sent. Mandatory if 'templateId' is not passed class SendSmtpEmailSender # Sender Name from which the emails are sent attr_accessor :name diff --git a/lib/sib-api-v3-sdk/models/update_child.rb b/lib/sib-api-v3-sdk/models/update_child.rb index 7cfe3f2..8eab487 100644 --- a/lib/sib-api-v3-sdk/models/update_child.rb +++ b/lib/sib-api-v3-sdk/models/update_child.rb @@ -30,8 +30,6 @@ class UpdateChild # New password for the child account to login attr_accessor :password - attr_accessor :ips - # Attribute mapping from ruby-style variable name to JSON key. def self.attribute_map @@ -40,8 +38,7 @@ def self.attribute_map :'first_name' => :'firstName', :'last_name' => :'lastName', :'company_name' => :'companyName', - :'password' => :'password', - :'ips' => :'ips' + :'password' => :'password' } end @@ -52,8 +49,7 @@ def self.swagger_types :'first_name' => :'String', :'last_name' => :'String', :'company_name' => :'String', - :'password' => :'String', - :'ips' => :'Array' + :'password' => :'String' } end @@ -85,12 +81,6 @@ def initialize(attributes = {}) self.password = attributes[:'password'] end - if attributes.has_key?(:'ips') - if (value = attributes[:'ips']).is_a?(Array) - self.ips = value - end - end - end # Show invalid properties with the reasons. Usually used together with valid? @@ -115,8 +105,7 @@ def ==(o) first_name == o.first_name && last_name == o.last_name && company_name == o.company_name && - password == o.password && - ips == o.ips + password == o.password end # @see the `==` method @@ -128,7 +117,7 @@ def eql?(o) # Calculates hash code according to all attributes. # @return [Fixnum] Hash code def hash - [email, first_name, last_name, company_name, password, ips].hash + [email, first_name, last_name, company_name, password].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 710c5da..0484c70 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 = "3.0.1" + VERSION = "4.0.0" end diff --git a/spec/api/contacts_api_spec.rb b/spec/api/contacts_api_spec.rb index 78e7824..a322d0d 100644 --- a/spec/api/contacts_api_spec.rb +++ b/spec/api/contacts_api_spec.rb @@ -272,14 +272,14 @@ end end - # unit tests for remove_contact_to_list + # unit tests for remove_contact_from_list # Remove existing contacts from a list # # @param list_id Id of the list # @param contact_emails Emails adresses of the contact # @param [Hash] opts the optional parameters # @return [PostContactInfo] - describe 'remove_contact_to_list test' do + 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 diff --git a/spec/api/lists_api_spec.rb b/spec/api/lists_api_spec.rb index ac954c2..36e0fc2 100644 --- a/spec/api/lists_api_spec.rb +++ b/spec/api/lists_api_spec.rb @@ -123,14 +123,14 @@ end end - # unit tests for remove_contact_to_list + # unit tests for remove_contact_from_list # Remove existing contacts from a list # # @param list_id Id of the list # @param contact_emails Emails adresses of the contact # @param [Hash] opts the optional parameters # @return [PostContactInfo] - describe 'remove_contact_to_list test' do + 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 diff --git a/spec/api/reseller_api_spec.rb b/spec/api/reseller_api_spec.rb index 77897b6..ee79c36 100644 --- a/spec/api/reseller_api_spec.rb +++ b/spec/api/reseller_api_spec.rb @@ -35,7 +35,7 @@ # unit tests for add_credits # Add Email and/or SMS credits to a specific child account # - # @param child_id id of reseller's child + # @param child_auth_key auth key of reseller's child # @param add_credits Values to post to add credit to a specific child account # @param [Hash] opts the optional parameters # @return [RemainingCreditModel] @@ -48,8 +48,8 @@ # unit tests for associate_ip_to_child # Associate a dedicated IP to the child # - # @param child_id id of reseller's child - # @param ip_id IP's id + # @param child_auth_key auth key of reseller's child + # @param ip IP to associate # @param [Hash] opts the optional parameters # @return [nil] describe 'associate_ip_to_child test' do @@ -63,7 +63,7 @@ # # @param [Hash] opts the optional parameters # @option opts [CreateChild] :reseller_child reseller child to add - # @return [CreateModel] + # @return [CreateReseller] describe 'create_reseller_child test' do it "should work" do # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers @@ -71,9 +71,9 @@ end # unit tests for delete_reseller_child - # Deletes a single reseller child based on the childId supplied + # Deletes a single reseller child based on the childAuthKey supplied # - # @param child_id id of reseller's child + # @param child_auth_key auth key of reseller's child # @param [Hash] opts the optional parameters # @return [nil] describe 'delete_reseller_child test' do @@ -85,8 +85,8 @@ # unit tests for dissociate_ip_from_child # Dissociate a dedicated IP to the child # - # @param child_id id of reseller's child - # @param ip_id IP's id + # @param child_auth_key auth key of reseller's child + # @param ip IP to dissociate # @param [Hash] opts the optional parameters # @return [nil] describe 'dissociate_ip_from_child test' do @@ -98,7 +98,7 @@ # unit tests for get_child_info # Gets the info about a specific child account # - # @param child_id id of reseller's child + # @param child_auth_key auth key of reseller's child # @param [Hash] opts the optional parameters # @return [GetChildInfo] describe 'get_child_info test' do @@ -121,7 +121,7 @@ # unit tests for remove_credits # Remove Email and/or SMS credits from a specific child account # - # @param child_id id of reseller's child + # @param child_auth_key auth key of reseller's child # @param remove_credits Values to post to remove email or SMS credits from a specific child account # @param [Hash] opts the optional parameters # @return [RemainingCreditModel] @@ -132,9 +132,9 @@ end # unit tests for update_reseller_child - # Updates infos of reseller's child based on the childId supplied + # Updates infos of reseller's child based on the childAuthKey supplied # - # @param child_id id of reseller's child + # @param child_auth_key auth key of reseller's child # @param reseller_child values to update in child profile # @param [Hash] opts the optional parameters # @return [nil] diff --git a/spec/models/add_remove_contact_to_list_spec.rb b/spec/models/add_contact_to_list_spec.rb similarity index 80% rename from spec/models/add_remove_contact_to_list_spec.rb rename to spec/models/add_contact_to_list_spec.rb index eb88f77..7fd5e7c 100644 --- a/spec/models/add_remove_contact_to_list_spec.rb +++ b/spec/models/add_contact_to_list_spec.rb @@ -14,22 +14,22 @@ require 'json' require 'date' -# Unit tests for SibApiV3Sdk::AddRemoveContactToList +# Unit tests for SibApiV3Sdk::AddContactToList # Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) # Please update as you see appropriate -describe 'AddRemoveContactToList' do +describe 'AddContactToList' do before do # run before each test - @instance = SibApiV3Sdk::AddRemoveContactToList.new + @instance = SibApiV3Sdk::AddContactToList.new end after do # run after each test end - describe 'test an instance of AddRemoveContactToList' do - it 'should create an instance of AddRemoveContactToList' do - expect(@instance).to be_instance_of(SibApiV3Sdk::AddRemoveContactToList) + describe 'test an instance of AddContactToList' do + it 'should create an instance of AddContactToList' do + expect(@instance).to be_instance_of(SibApiV3Sdk::AddContactToList) end end describe 'test attribute "emails"' do diff --git a/spec/models/create_reseller_spec.rb b/spec/models/create_reseller_spec.rb new file mode 100644 index 0000000..9d33137 --- /dev/null +++ b/spec/models/create_reseller_spec.rb @@ -0,0 +1,42 @@ +=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 | + +OpenAPI spec version: 3.0.0 +Contact: contact@sendinblue.com +Generated by: https://github.com/swagger-api/swagger-codegen.git +Swagger Codegen version: 2.3.1 + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for SibApiV3Sdk::CreateReseller +# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) +# Please update as you see appropriate +describe 'CreateReseller' do + before do + # run before each test + @instance = SibApiV3Sdk::CreateReseller.new + end + + after do + # run after each test + end + + describe 'test an instance of CreateReseller' do + it 'should create an instance of CreateReseller' do + expect(@instance).to be_instance_of(SibApiV3Sdk::CreateReseller) + end + end + describe 'test attribute "auth_key"' 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/error_model_spec.rb b/spec/models/error_model_spec.rb index da2be4e..5d6e090 100644 --- a/spec/models/error_model_spec.rb +++ b/spec/models/error_model_spec.rb @@ -35,7 +35,7 @@ describe 'test attribute "code"' 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', ["invalid_parameter", "missing_parameter", "out_of_range", "campaign_processing", "campaign_sent", "document_not_found", "reseller_permission", "not_enough_credits", "permission_denied", "duplicate_parameter", "duplicate_request", "method_not_allowed", "unauthorized", "account_under_validation", "not_acceptable"]) + #validator = Petstore::EnumTest::EnumAttributeValidator.new('String', ["invalid_parameter", "missing_parameter", "out_of_range", "campaign_processing", "campaign_sent", "document_not_found", "reseller_permission_denied", "not_enough_credits", "permission_denied", "duplicate_parameter", "duplicate_request", "method_not_allowed", "unauthorized", "account_under_validation", "not_acceptable"]) #validator.allowable_values.each do |value| # expect { @instance.code = value }.not_to raise_error #end diff --git a/spec/models/get_child_info_api_keys_spec.rb b/spec/models/get_child_info_api_keys_spec.rb index 334e4e8..59df25f 100644 --- a/spec/models/get_child_info_api_keys_spec.rb +++ b/spec/models/get_child_info_api_keys_spec.rb @@ -32,19 +32,13 @@ expect(@instance).to be_instance_of(SibApiV3Sdk::GetChildInfoApiKeys) end end - describe 'test attribute "name"' do + describe 'test attribute "v2"' do it 'should work' do # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers end end - describe 'test attribute "key"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "secret"' do + describe 'test attribute "v3"' 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/get_child_info_ips_spec.rb b/spec/models/get_child_info_api_keys_v2_spec.rb similarity index 82% rename from spec/models/get_child_info_ips_spec.rb rename to spec/models/get_child_info_api_keys_v2_spec.rb index cb27691..09c411f 100644 --- a/spec/models/get_child_info_ips_spec.rb +++ b/spec/models/get_child_info_api_keys_v2_spec.rb @@ -14,31 +14,31 @@ require 'json' require 'date' -# Unit tests for SibApiV3Sdk::GetChildInfoIps +# Unit tests for SibApiV3Sdk::GetChildInfoApiKeysV2 # Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) # Please update as you see appropriate -describe 'GetChildInfoIps' do +describe 'GetChildInfoApiKeysV2' do before do # run before each test - @instance = SibApiV3Sdk::GetChildInfoIps.new + @instance = SibApiV3Sdk::GetChildInfoApiKeysV2.new end after do # run after each test end - describe 'test an instance of GetChildInfoIps' do - it 'should create an instance of GetChildInfoIps' do - expect(@instance).to be_instance_of(SibApiV3Sdk::GetChildInfoIps) + describe 'test an instance of GetChildInfoApiKeysV2' do + it 'should create an instance of GetChildInfoApiKeysV2' do + expect(@instance).to be_instance_of(SibApiV3Sdk::GetChildInfoApiKeysV2) end end - describe 'test attribute "id"' 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 "ip"' do + describe 'test attribute "key"' 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/get_child_info_api_keys_v3_spec.rb b/spec/models/get_child_info_api_keys_v3_spec.rb new file mode 100644 index 0000000..f14da06 --- /dev/null +++ b/spec/models/get_child_info_api_keys_v3_spec.rb @@ -0,0 +1,48 @@ +=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 | + +OpenAPI spec version: 3.0.0 +Contact: contact@sendinblue.com +Generated by: https://github.com/swagger-api/swagger-codegen.git +Swagger Codegen version: 2.3.1 + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for SibApiV3Sdk::GetChildInfoApiKeysV3 +# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) +# Please update as you see appropriate +describe 'GetChildInfoApiKeysV3' do + before do + # run before each test + @instance = SibApiV3Sdk::GetChildInfoApiKeysV3.new + end + + after do + # run after each test + end + + describe 'test an instance of GetChildInfoApiKeysV3' do + it 'should create an instance of GetChildInfoApiKeysV3' do + expect(@instance).to be_instance_of(SibApiV3Sdk::GetChildInfoApiKeysV3) + 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 "key"' 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_email_campaign_spec.rb b/spec/models/get_email_campaign_spec.rb index 34264d0..636c5fb 100644 --- a/spec/models/get_email_campaign_spec.rb +++ b/spec/models/get_email_campaign_spec.rb @@ -160,5 +160,17 @@ end end + describe 'test attribute "recipients"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "statistics"' 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_sms_campaign_spec.rb b/spec/models/get_sms_campaign_spec.rb index 3b5ac10..6967787 100644 --- a/spec/models/get_sms_campaign_spec.rb +++ b/spec/models/get_sms_campaign_spec.rb @@ -90,5 +90,17 @@ end end + describe 'test attribute "recipients"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "statistics"' 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/manage_ip_spec.rb b/spec/models/manage_ip_spec.rb index 18d6169..3e61bb2 100644 --- a/spec/models/manage_ip_spec.rb +++ b/spec/models/manage_ip_spec.rb @@ -32,7 +32,7 @@ expect(@instance).to be_instance_of(SibApiV3Sdk::ManageIp) end end - describe 'test attribute "ip_id"' do + describe 'test attribute "ip"' 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/remove_contact_from_list_spec.rb b/spec/models/remove_contact_from_list_spec.rb new file mode 100644 index 0000000..b9da83a --- /dev/null +++ b/spec/models/remove_contact_from_list_spec.rb @@ -0,0 +1,48 @@ +=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 | + +OpenAPI spec version: 3.0.0 +Contact: contact@sendinblue.com +Generated by: https://github.com/swagger-api/swagger-codegen.git +Swagger Codegen version: 2.3.1 + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for SibApiV3Sdk::RemoveContactFromList +# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) +# Please update as you see appropriate +describe 'RemoveContactFromList' do + before do + # run before each test + @instance = SibApiV3Sdk::RemoveContactFromList.new + end + + after do + # run after each test + end + + describe 'test an instance of RemoveContactFromList' do + it 'should create an instance of RemoveContactFromList' do + expect(@instance).to be_instance_of(SibApiV3Sdk::RemoveContactFromList) + end + end + describe 'test attribute "emails"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "all"' 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 67a4d46..25ee349 100644 --- a/spec/models/send_smtp_email_spec.rb +++ b/spec/models/send_smtp_email_spec.rb @@ -92,5 +92,17 @@ end end + describe 'test attribute "template_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 "params"' 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_child_spec.rb b/spec/models/update_child_spec.rb index da29677..912577a 100644 --- a/spec/models/update_child_spec.rb +++ b/spec/models/update_child_spec.rb @@ -62,11 +62,5 @@ end end - describe 'test attribute "ips"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - end