sib-api-v3-sdk 7.5.0 → 9.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile +1 -1
- data/README.md +130 -4
- data/docs/Body.md +9 -0
- data/docs/Body1.md +9 -0
- data/docs/Body10.md +11 -0
- data/docs/{SendTemplateEmail.md → Body11.md} +2 -2
- data/docs/Body12.md +11 -0
- data/docs/Body2.md +11 -0
- data/docs/Body3.md +9 -0
- data/docs/Body4.md +9 -0
- data/docs/Body5.md +11 -0
- data/docs/Body6.md +18 -0
- data/docs/Body7.md +17 -0
- data/docs/Body8.md +13 -0
- data/docs/Body9.md +8 -0
- data/docs/CompaniesApi.md +425 -0
- data/docs/CompaniesList.md +8 -0
- data/docs/Company.md +11 -0
- data/docs/CompanyAttributes.md +7 -0
- data/docs/CompanyAttributesInner.md +12 -0
- data/docs/ContactsApi.md +69 -4
- data/docs/ConversationsApi.md +542 -0
- data/docs/ConversationsMessage.md +17 -0
- data/docs/ConversationsMessageFile.md +12 -0
- data/docs/ConversationsMessageFileImageInfo.md +10 -0
- data/docs/CreateContact.md +1 -1
- data/docs/CreateSmsCampaign.md +1 -0
- data/docs/CreateSubAccount.md +11 -0
- data/docs/CreateSubAccountResponse.md +8 -0
- data/docs/CreateWebhook.md +2 -1
- data/docs/Deal.md +11 -0
- data/docs/DealAttributes.md +7 -0
- data/docs/DealAttributesInner.md +12 -0
- data/docs/DealsApi.md +476 -0
- data/docs/DealsList.md +8 -0
- data/docs/EmailCampaignsApi.md +6 -5
- data/docs/FileData.md +14 -0
- data/docs/FileDownloadableLink.md +8 -0
- data/docs/FileList.md +7 -0
- data/docs/FilesApi.md +318 -0
- data/docs/GetCampaignStats.md +3 -0
- data/docs/GetContactCampaignStats.md +1 -0
- data/docs/GetExtendedContactDetailsStatistics.md +1 -0
- data/docs/GetExtendedContactDetailsStatisticsDelivered.md +9 -0
- data/docs/GetInboundEmailEvents.md +8 -0
- data/docs/GetInboundEmailEventsByUuid.md +15 -0
- data/docs/GetInboundEmailEventsByUuidAttachments.md +11 -0
- data/docs/GetInboundEmailEventsByUuidLogs.md +9 -0
- data/docs/GetInboundEmailEventsEvents.md +11 -0
- data/docs/GetScheduledEmailByBatchId.md +9 -0
- data/docs/GetScheduledEmailByBatchIdBatches.md +10 -0
- data/docs/GetScheduledEmailByMessageId.md +10 -0
- data/docs/GetSsoToken.md +1 -1
- data/docs/InboundParsingApi.md +199 -0
- data/docs/InlineResponse200.md +8 -0
- data/docs/InlineResponse201.md +8 -0
- data/docs/InlineResponse2011.md +8 -0
- data/docs/MasterAccountApi.md +424 -0
- data/docs/MasterDetailsResponse.md +14 -0
- data/docs/MasterDetailsResponseBillingInfo.md +11 -0
- data/docs/MasterDetailsResponseBillingInfoAddress.md +12 -0
- data/docs/MasterDetailsResponseBillingInfoName.md +9 -0
- data/docs/MasterDetailsResponsePlanInfo.md +13 -0
- data/docs/MasterDetailsResponsePlanInfoFeatures.md +12 -0
- data/docs/Note.md +14 -0
- data/docs/NoteData.md +10 -0
- data/docs/NoteId.md +8 -0
- data/docs/NoteList.md +7 -0
- data/docs/NotesApi.md +312 -0
- data/docs/Pipeline.md +8 -0
- data/docs/PipelineStage.md +9 -0
- data/docs/RequestContactExport.md +1 -2
- data/docs/RequestContactImport.md +3 -2
- data/docs/ScheduleSmtpEmail.md +10 -0
- data/docs/SendSmtpEmail.md +6 -4
- data/docs/SendTransacSms.md +1 -0
- data/docs/SsoTokenRequest.md +9 -0
- data/docs/SubAccountDetailsResponse.md +11 -0
- data/docs/SubAccountDetailsResponsePlanInfo.md +10 -0
- data/docs/SubAccountDetailsResponsePlanInfoCredits.md +9 -0
- data/docs/SubAccountDetailsResponsePlanInfoCreditsEmails.md +9 -0
- data/docs/SubAccountDetailsResponsePlanInfoFeatures.md +10 -0
- data/docs/SubAccountDetailsResponsePlanInfoFeaturesInbox.md +9 -0
- data/docs/SubAccountDetailsResponsePlanInfoFeaturesLandingPage.md +9 -0
- data/docs/SubAccountDetailsResponsePlanInfoFeaturesUsers.md +9 -0
- data/docs/SubAccountUpdatePlanRequest.md +9 -0
- data/docs/SubAccountUpdatePlanRequestCredits.md +8 -0
- data/docs/SubAccountUpdatePlanRequestFeatures.md +10 -0
- data/docs/SubAccountsResponse.md +9 -0
- data/docs/SubAccountsResponseSubAccounts.md +11 -0
- data/docs/Task.md +13 -0
- data/docs/TaskList.md +8 -0
- data/docs/TaskReminder.md +10 -0
- data/docs/TaskTypes.md +9 -0
- data/docs/TasksApi.md +376 -0
- data/docs/TransactionalEmailsApi.md +203 -63
- data/docs/UpdateBatchContacts.md +8 -0
- data/docs/UpdateBatchContactsContacts.md +16 -0
- data/docs/UpdateBatchContactsModel.md +9 -0
- data/docs/UpdateContact.md +1 -1
- data/docs/UpdateEmailCampaign.md +1 -1
- data/docs/UpdateSmsCampaign.md +1 -0
- data/docs/UpdateSmtpTemplate.md +1 -1
- data/docs/UpdateWebhook.md +2 -1
- data/docs/UploadImageModel.md +8 -0
- data/lib/sib-api-v3-sdk/api/companies_api.rb +409 -0
- data/lib/sib-api-v3-sdk/api/contacts_api.rb +61 -2
- data/lib/sib-api-v3-sdk/api/conversations_api.rb +504 -0
- data/lib/sib-api-v3-sdk/api/deals_api.rb +454 -0
- data/lib/sib-api-v3-sdk/api/email_campaigns_api.rb +9 -8
- data/lib/sib-api-v3-sdk/api/files_api.rb +313 -0
- data/lib/sib-api-v3-sdk/api/inbound_parsing_api.rb +213 -0
- data/lib/sib-api-v3-sdk/api/master_account_api.rb +416 -0
- data/lib/sib-api-v3-sdk/api/notes_api.rb +308 -0
- data/lib/sib-api-v3-sdk/api/tasks_api.rb +375 -0
- data/lib/sib-api-v3-sdk/api/transactional_emails_api.rb +201 -62
- data/lib/sib-api-v3-sdk/api/webhooks_api.rb +2 -2
- data/lib/sib-api-v3-sdk/models/{send_email_attachment.rb → body.rb} +16 -40
- data/lib/sib-api-v3-sdk/models/body_1.rb +195 -0
- data/lib/sib-api-v3-sdk/models/body_10.rb +225 -0
- data/lib/sib-api-v3-sdk/models/{send_template_email.rb → body_11.rb} +12 -12
- data/lib/sib-api-v3-sdk/models/body_12.rb +215 -0
- data/lib/sib-api-v3-sdk/models/body_2.rb +223 -0
- data/lib/sib-api-v3-sdk/models/body_3.rb +200 -0
- data/lib/sib-api-v3-sdk/models/body_4.rb +195 -0
- data/lib/sib-api-v3-sdk/models/body_5.rb +223 -0
- data/lib/sib-api-v3-sdk/models/body_6.rb +320 -0
- data/lib/sib-api-v3-sdk/models/body_7.rb +281 -0
- data/lib/sib-api-v3-sdk/models/body_8.rb +245 -0
- data/lib/sib-api-v3-sdk/models/body_9.rb +190 -0
- data/lib/sib-api-v3-sdk/models/companies_list.rb +188 -0
- data/lib/sib-api-v3-sdk/models/{send_email.rb → company.rb} +30 -90
- data/lib/sib-api-v3-sdk/models/company_attributes.rb +176 -0
- data/lib/sib-api-v3-sdk/models/company_attributes_inner.rb +223 -0
- data/lib/sib-api-v3-sdk/models/conversations_message.rb +324 -0
- data/lib/sib-api-v3-sdk/models/conversations_message_file.rb +239 -0
- data/lib/sib-api-v3-sdk/models/conversations_message_file_image_info.rb +236 -0
- data/lib/sib-api-v3-sdk/models/create_contact.rb +1 -1
- data/lib/sib-api-v3-sdk/models/create_sms_campaign.rb +16 -4
- data/lib/sib-api-v3-sdk/models/create_sub_account.rb +259 -0
- data/lib/sib-api-v3-sdk/models/create_sub_account_response.rb +190 -0
- data/lib/sib-api-v3-sdk/models/create_webhook.rb +17 -7
- data/lib/sib-api-v3-sdk/models/deal.rb +220 -0
- data/lib/sib-api-v3-sdk/models/deal_attributes.rb +176 -0
- data/lib/sib-api-v3-sdk/models/deal_attributes_inner.rb +223 -0
- data/lib/sib-api-v3-sdk/models/deals_list.rb +188 -0
- data/lib/sib-api-v3-sdk/models/file_data.rb +246 -0
- data/lib/sib-api-v3-sdk/models/file_downloadable_link.rb +190 -0
- data/lib/sib-api-v3-sdk/models/file_list.rb +176 -0
- data/lib/sib-api-v3-sdk/models/get_campaign_stats.rb +36 -1
- data/lib/sib-api-v3-sdk/models/get_contact_campaign_stats.rb +15 -4
- data/lib/sib-api-v3-sdk/models/get_email_event_report_events.rb +2 -2
- data/lib/sib-api-v3-sdk/models/get_extended_contact_details_statistics.rb +16 -4
- data/lib/sib-api-v3-sdk/models/get_extended_contact_details_statistics_delivered.rb +205 -0
- data/lib/sib-api-v3-sdk/models/get_inbound_email_events.rb +186 -0
- data/lib/sib-api-v3-sdk/models/get_inbound_email_events_by_uuid.rb +259 -0
- data/lib/sib-api-v3-sdk/models/get_inbound_email_events_by_uuid_attachments.rb +215 -0
- data/lib/sib-api-v3-sdk/models/get_inbound_email_events_by_uuid_logs.rb +229 -0
- data/lib/sib-api-v3-sdk/models/get_inbound_email_events_events.rb +235 -0
- data/lib/sib-api-v3-sdk/models/get_scheduled_email_by_batch_id.rb +196 -0
- data/lib/sib-api-v3-sdk/models/get_scheduled_email_by_batch_id_batches.rb +254 -0
- data/lib/sib-api-v3-sdk/models/get_scheduled_email_by_message_id.rb +254 -0
- data/lib/sib-api-v3-sdk/models/get_sso_token.rb +1 -1
- data/lib/sib-api-v3-sdk/models/inline_response_200.rb +191 -0
- data/lib/sib-api-v3-sdk/models/inline_response_201.rb +191 -0
- data/lib/sib-api-v3-sdk/models/inline_response_201_1.rb +191 -0
- data/lib/sib-api-v3-sdk/models/master_details_response.rb +243 -0
- data/lib/sib-api-v3-sdk/models/master_details_response_billing_info.rb +214 -0
- data/lib/sib-api-v3-sdk/models/master_details_response_billing_info_address.rb +226 -0
- data/lib/sib-api-v3-sdk/models/master_details_response_billing_info_name.rb +196 -0
- data/lib/sib-api-v3-sdk/models/master_details_response_plan_info.rb +272 -0
- data/lib/sib-api-v3-sdk/models/master_details_response_plan_info_features.rb +225 -0
- data/lib/sib-api-v3-sdk/models/note.rb +283 -0
- data/lib/sib-api-v3-sdk/models/note_data.rb +243 -0
- data/lib/sib-api-v3-sdk/models/note_id.rb +186 -0
- data/lib/sib-api-v3-sdk/models/note_list.rb +176 -0
- data/lib/sib-api-v3-sdk/models/pipeline.rb +188 -0
- data/lib/sib-api-v3-sdk/models/pipeline_stage.rb +196 -0
- data/lib/sib-api-v3-sdk/models/request_contact_export.rb +6 -11
- data/lib/sib-api-v3-sdk/models/request_contact_export_custom_contact_filter.rb +1 -1
- data/lib/sib-api-v3-sdk/models/request_contact_import.rb +15 -3
- data/lib/sib-api-v3-sdk/models/schedule_smtp_email.rb +206 -0
- data/lib/sib-api-v3-sdk/models/send_smtp_email.rb +28 -8
- data/lib/sib-api-v3-sdk/models/send_transac_sms.rb +16 -4
- data/lib/sib-api-v3-sdk/models/sso_token_request.rb +200 -0
- data/lib/sib-api-v3-sdk/models/sub_account_details_response.rb +214 -0
- data/lib/sib-api-v3-sdk/models/sub_account_details_response_plan_info.rb +204 -0
- data/lib/sib-api-v3-sdk/models/sub_account_details_response_plan_info_credits.rb +195 -0
- data/lib/sib-api-v3-sdk/models/sub_account_details_response_plan_info_credits_emails.rb +196 -0
- data/lib/sib-api-v3-sdk/models/sub_account_details_response_plan_info_features.rb +203 -0
- data/lib/sib-api-v3-sdk/models/sub_account_details_response_plan_info_features_inbox.rb +196 -0
- data/lib/sib-api-v3-sdk/models/sub_account_details_response_plan_info_features_landing_page.rb +196 -0
- data/lib/sib-api-v3-sdk/models/sub_account_details_response_plan_info_features_users.rb +196 -0
- data/lib/sib-api-v3-sdk/models/sub_account_update_plan_request.rb +194 -0
- data/lib/sib-api-v3-sdk/models/sub_account_update_plan_request_credits.rb +186 -0
- data/lib/sib-api-v3-sdk/models/sub_account_update_plan_request_features.rb +206 -0
- data/lib/sib-api-v3-sdk/models/sub_accounts_response.rb +196 -0
- data/lib/sib-api-v3-sdk/models/sub_accounts_response_sub_accounts.rb +235 -0
- data/lib/sib-api-v3-sdk/models/task.rb +252 -0
- data/lib/sib-api-v3-sdk/models/task_list.rb +188 -0
- data/lib/sib-api-v3-sdk/models/task_reminder.rb +257 -0
- data/lib/sib-api-v3-sdk/models/task_types.rb +196 -0
- data/lib/sib-api-v3-sdk/models/update_batch_contacts.rb +187 -0
- data/lib/sib-api-v3-sdk/models/update_batch_contacts_contacts.rb +273 -0
- data/lib/sib-api-v3-sdk/models/update_batch_contacts_model.rb +197 -0
- data/lib/sib-api-v3-sdk/models/update_contact.rb +1 -1
- data/lib/sib-api-v3-sdk/models/update_email_campaign.rb +1 -1
- data/lib/sib-api-v3-sdk/models/update_sms_campaign.rb +16 -4
- data/lib/sib-api-v3-sdk/models/update_smtp_template.rb +1 -1
- data/lib/sib-api-v3-sdk/models/update_webhook.rb +15 -5
- data/lib/sib-api-v3-sdk/models/upload_image_model.rb +190 -0
- data/lib/sib-api-v3-sdk/version.rb +1 -1
- data/lib/sib-api-v3-sdk.rb +84 -3
- data/sib-api-v3-sdk.gemspec +2 -1
- data/spec/api/companies_api_spec.rb +119 -0
- data/spec/api/contacts_api_spec.rb +15 -1
- data/spec/api/conversations_api_spec.rb +140 -0
- data/spec/api/deals_api_spec.rb +129 -0
- data/spec/api/email_campaigns_api_spec.rb +1 -1
- data/spec/api/files_api_spec.rb +99 -0
- data/spec/api/inbound_parsing_api_spec.rb +76 -0
- data/spec/api/master_account_api_spec.rb +119 -0
- data/spec/api/notes_api_spec.rb +97 -0
- data/spec/api/tasks_api_spec.rb +113 -0
- data/spec/api/transactional_emails_api_spec.rb +46 -13
- data/spec/models/body_10_spec.rb +59 -0
- data/spec/models/{send_template_email_spec.rb → body_11_spec.rb} +7 -7
- data/spec/models/body_12_spec.rb +59 -0
- data/spec/models/{send_email_attachment_spec.rb → body_1_spec.rb} +8 -8
- data/spec/models/body_2_spec.rb +59 -0
- data/spec/models/body_3_spec.rb +47 -0
- data/spec/models/body_4_spec.rb +47 -0
- data/spec/models/body_5_spec.rb +59 -0
- data/spec/models/body_6_spec.rb +101 -0
- data/spec/models/body_7_spec.rb +95 -0
- data/spec/models/body_8_spec.rb +71 -0
- data/spec/models/body_9_spec.rb +41 -0
- data/spec/models/body_spec.rb +47 -0
- data/spec/models/companies_list_spec.rb +41 -0
- data/spec/models/company_attributes_inner_spec.rb +65 -0
- data/spec/models/company_attributes_spec.rb +35 -0
- data/spec/models/company_spec.rb +59 -0
- data/spec/models/conversations_message_file_image_info_spec.rb +53 -0
- data/spec/models/conversations_message_file_spec.rb +65 -0
- data/spec/models/conversations_message_spec.rb +99 -0
- data/spec/models/create_sms_campaign_spec.rb +6 -0
- data/spec/models/create_sub_account_response_spec.rb +41 -0
- data/spec/models/create_sub_account_spec.rb +63 -0
- data/spec/models/create_webhook_spec.rb +8 -2
- data/spec/models/deal_attributes_inner_spec.rb +65 -0
- data/spec/models/deal_attributes_spec.rb +35 -0
- data/spec/models/deal_spec.rb +59 -0
- data/spec/models/deals_list_spec.rb +41 -0
- data/spec/models/file_data_spec.rb +77 -0
- data/spec/models/file_downloadable_link_spec.rb +41 -0
- data/spec/models/file_list_spec.rb +35 -0
- data/spec/models/get_campaign_stats_spec.rb +18 -0
- data/spec/models/get_contact_campaign_stats_spec.rb +6 -0
- data/spec/models/get_email_event_report_events_spec.rb +1 -1
- data/spec/models/get_extended_contact_details_statistics_delivered_spec.rb +47 -0
- data/spec/models/get_extended_contact_details_statistics_spec.rb +6 -0
- data/spec/models/get_inbound_email_events_by_uuid_attachments_spec.rb +59 -0
- data/spec/models/get_inbound_email_events_by_uuid_logs_spec.rb +51 -0
- data/spec/models/get_inbound_email_events_by_uuid_spec.rb +83 -0
- data/spec/models/get_inbound_email_events_events_spec.rb +59 -0
- data/spec/models/get_inbound_email_events_spec.rb +41 -0
- data/spec/models/get_scheduled_email_by_batch_id_batches_spec.rb +57 -0
- data/spec/models/get_scheduled_email_by_batch_id_spec.rb +47 -0
- data/spec/models/get_scheduled_email_by_message_id_spec.rb +57 -0
- data/spec/models/inline_response_200_spec.rb +41 -0
- data/spec/models/inline_response_201_1_spec.rb +41 -0
- data/spec/models/inline_response_201_spec.rb +41 -0
- data/spec/models/master_details_response_billing_info_address_spec.rb +65 -0
- data/spec/models/master_details_response_billing_info_name_spec.rb +47 -0
- data/spec/models/master_details_response_billing_info_spec.rb +59 -0
- data/spec/models/master_details_response_plan_info_features_spec.rb +65 -0
- data/spec/models/master_details_response_plan_info_spec.rb +75 -0
- data/spec/models/master_details_response_spec.rb +77 -0
- data/spec/models/note_data_spec.rb +53 -0
- data/spec/models/note_id_spec.rb +41 -0
- data/spec/models/note_list_spec.rb +35 -0
- data/spec/models/note_spec.rb +77 -0
- data/spec/models/pipeline_spec.rb +41 -0
- data/spec/models/pipeline_stage_spec.rb +47 -0
- data/spec/models/request_contact_export_spec.rb +0 -6
- data/spec/models/request_contact_import_spec.rb +6 -0
- data/spec/models/schedule_smtp_email_spec.rb +53 -0
- data/spec/models/send_smtp_email_spec.rb +12 -0
- data/spec/models/send_transac_sms_spec.rb +6 -0
- data/spec/models/sso_token_request_spec.rb +47 -0
- data/spec/models/sub_account_details_response_plan_info_credits_emails_spec.rb +47 -0
- data/spec/models/sub_account_details_response_plan_info_credits_spec.rb +47 -0
- data/spec/models/sub_account_details_response_plan_info_features_inbox_spec.rb +47 -0
- data/spec/models/sub_account_details_response_plan_info_features_landing_page_spec.rb +47 -0
- data/spec/models/sub_account_details_response_plan_info_features_spec.rb +53 -0
- data/spec/models/sub_account_details_response_plan_info_features_users_spec.rb +47 -0
- data/spec/models/sub_account_details_response_plan_info_spec.rb +53 -0
- data/spec/models/sub_account_details_response_spec.rb +59 -0
- data/spec/models/sub_account_update_plan_request_credits_spec.rb +41 -0
- data/spec/models/sub_account_update_plan_request_features_spec.rb +53 -0
- data/spec/models/sub_account_update_plan_request_spec.rb +47 -0
- data/spec/models/sub_accounts_response_spec.rb +47 -0
- data/spec/models/sub_accounts_response_sub_accounts_spec.rb +59 -0
- data/spec/models/task_list_spec.rb +41 -0
- data/spec/models/task_reminder_spec.rb +57 -0
- data/spec/models/task_spec.rb +71 -0
- data/spec/models/task_types_spec.rb +47 -0
- data/spec/models/{send_email_spec.rb → update_batch_contacts_contacts_spec.rb} +15 -15
- data/spec/models/update_batch_contacts_model_spec.rb +47 -0
- data/spec/models/update_batch_contacts_spec.rb +41 -0
- data/spec/models/update_sms_campaign_spec.rb +6 -0
- data/spec/models/update_webhook_spec.rb +7 -1
- data/spec/models/upload_image_model_spec.rb +41 -0
- metadata +359 -15
- data/docs/SendEmail.md +0 -16
- data/docs/SendEmailAttachment.md +0 -9
@@ -236,6 +236,59 @@ module SibApiV3Sdk
|
|
236
236
|
end
|
237
237
|
return data, status_code, headers
|
238
238
|
end
|
239
|
+
# Delete scheduled emails by batchId or messageId
|
240
|
+
# Delete scheduled batch of emails by batchId or single scheduled email by messageId
|
241
|
+
# @param identifier The `batchId` of scheduled emails batch (Should be a valid UUIDv4) or the `messageId` of scheduled email.
|
242
|
+
# @param [Hash] opts the optional parameters
|
243
|
+
# @return [nil]
|
244
|
+
def delete_scheduled_email_by_id(identifier, opts = {})
|
245
|
+
delete_scheduled_email_by_id_with_http_info(identifier, opts)
|
246
|
+
nil
|
247
|
+
end
|
248
|
+
|
249
|
+
# Delete scheduled emails by batchId or messageId
|
250
|
+
# Delete scheduled batch of emails by batchId or single scheduled email by messageId
|
251
|
+
# @param identifier The `batchId` of scheduled emails batch (Should be a valid UUIDv4) or the `messageId` of scheduled email.
|
252
|
+
# @param [Hash] opts the optional parameters
|
253
|
+
# @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers
|
254
|
+
def delete_scheduled_email_by_id_with_http_info(identifier, opts = {})
|
255
|
+
if @api_client.config.debugging
|
256
|
+
@api_client.config.logger.debug 'Calling API: TransactionalEmailsApi.delete_scheduled_email_by_id ...'
|
257
|
+
end
|
258
|
+
# verify the required parameter 'identifier' is set
|
259
|
+
if @api_client.config.client_side_validation && identifier.nil?
|
260
|
+
fail ArgumentError, "Missing the required parameter 'identifier' when calling TransactionalEmailsApi.delete_scheduled_email_by_id"
|
261
|
+
end
|
262
|
+
# resource path
|
263
|
+
local_var_path = '/smtp/email/{identifier}'.sub('{' + 'identifier' + '}', identifier.to_s)
|
264
|
+
|
265
|
+
# query parameters
|
266
|
+
query_params = {}
|
267
|
+
|
268
|
+
# header parameters
|
269
|
+
header_params = {}
|
270
|
+
# HTTP header 'Accept' (if needed)
|
271
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
272
|
+
# HTTP header 'Content-Type'
|
273
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
274
|
+
|
275
|
+
# form parameters
|
276
|
+
form_params = {}
|
277
|
+
|
278
|
+
# http body (model)
|
279
|
+
post_body = nil
|
280
|
+
auth_names = ['api-key', 'partner-key']
|
281
|
+
data, status_code, headers = @api_client.call_api(:DELETE, local_var_path,
|
282
|
+
:header_params => header_params,
|
283
|
+
:query_params => query_params,
|
284
|
+
:form_params => form_params,
|
285
|
+
:body => post_body,
|
286
|
+
:auth_names => auth_names)
|
287
|
+
if @api_client.config.debugging
|
288
|
+
@api_client.config.logger.debug "API called: TransactionalEmailsApi#delete_scheduled_email_by_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
289
|
+
end
|
290
|
+
return data, status_code, headers
|
291
|
+
end
|
239
292
|
# Delete an inactive email template
|
240
293
|
# @param template_id id of the template
|
241
294
|
# @param [Hash] opts the optional parameters
|
@@ -288,6 +341,7 @@ module SibApiV3Sdk
|
|
288
341
|
return data, status_code, headers
|
289
342
|
end
|
290
343
|
# Get your transactional email activity aggregated over a period of time
|
344
|
+
# This endpoint will show the aggregated stats for past 90 days by default if `startDate` and `endDate` OR `days` is not passed. The date range can not exceed 90 days
|
291
345
|
# @param [Hash] opts the optional parameters
|
292
346
|
# @option opts [String] :start_date Mandatory if endDate is used. Starting date of the report (YYYY-MM-DD). Must be lower than equal to endDate
|
293
347
|
# @option opts [String] :end_date Mandatory if startDate is used. Ending date of the report (YYYY-MM-DD). Must be greater than equal to startDate
|
@@ -300,6 +354,7 @@ module SibApiV3Sdk
|
|
300
354
|
end
|
301
355
|
|
302
356
|
# Get your transactional email activity aggregated over a period of time
|
357
|
+
# This endpoint will show the aggregated stats for past 90 days by default if `startDate` and `endDate` OR `days` is not passed. The date range can not exceed 90 days
|
303
358
|
# @param [Hash] opts the optional parameters
|
304
359
|
# @option opts [String] :start_date Mandatory if endDate is used. Starting date of the report (YYYY-MM-DD). Must be lower than equal to endDate
|
305
360
|
# @option opts [String] :end_date Mandatory if startDate is used. Ending date of the report (YYYY-MM-DD). Must be greater than equal to startDate
|
@@ -394,6 +449,7 @@ module SibApiV3Sdk
|
|
394
449
|
return data, status_code, headers
|
395
450
|
end
|
396
451
|
# Get all your transactional email activity (unaggregated events)
|
452
|
+
# This endpoint will show the aggregated stats for past 30 days by default if `startDate` and `endDate` OR `days` is not passed. The date range can not exceed 90 days
|
397
453
|
# @param [Hash] opts the optional parameters
|
398
454
|
# @option opts [Integer] :limit Number limitation for the result returned (default to 50)
|
399
455
|
# @option opts [Integer] :offset Beginning point in the list to retrieve from. (default to 0)
|
@@ -413,6 +469,7 @@ module SibApiV3Sdk
|
|
413
469
|
end
|
414
470
|
|
415
471
|
# Get all your transactional email activity (unaggregated events)
|
472
|
+
# This endpoint will show the aggregated stats for past 30 days by default if `startDate` and `endDate` OR `days` is not passed. The date range can not exceed 90 days
|
416
473
|
# @param [Hash] opts the optional parameters
|
417
474
|
# @option opts [Integer] :limit Number limitation for the result returned
|
418
475
|
# @option opts [Integer] :offset Beginning point in the list to retrieve from.
|
@@ -434,8 +491,8 @@ module SibApiV3Sdk
|
|
434
491
|
fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling TransactionalEmailsApi.get_email_event_report, must be smaller than or equal to 100.'
|
435
492
|
end
|
436
493
|
|
437
|
-
if @api_client.config.client_side_validation && opts[:'event'] && !['bounces', 'hardBounces', 'softBounces', 'delivered', 'spam', 'requests', 'opened', 'clicks', 'invalid', 'deferred', 'blocked', 'unsubscribed', 'error'].include?(opts[:'event'])
|
438
|
-
fail ArgumentError, 'invalid value for "event", must be one of bounces, hardBounces, softBounces, delivered, spam, requests, opened, clicks, invalid, deferred, blocked, unsubscribed, error'
|
494
|
+
if @api_client.config.client_side_validation && opts[:'event'] && !['bounces', 'hardBounces', 'softBounces', 'delivered', 'spam', 'requests', 'opened', 'clicks', 'invalid', 'deferred', 'blocked', 'unsubscribed', 'error', 'loadedByProxy'].include?(opts[:'event'])
|
495
|
+
fail ArgumentError, 'invalid value for "event", must be one of bounces, hardBounces, softBounces, delivered, spam, requests, opened, clicks, invalid, deferred, blocked, unsubscribed, error, loadedByProxy'
|
439
496
|
end
|
440
497
|
if @api_client.config.client_side_validation && opts[:'sort'] && !['asc', 'desc'].include?(opts[:'sort'])
|
441
498
|
fail ArgumentError, 'invalid value for "sort", must be one of asc, desc'
|
@@ -482,6 +539,148 @@ module SibApiV3Sdk
|
|
482
539
|
end
|
483
540
|
return data, status_code, headers
|
484
541
|
end
|
542
|
+
# Fetch scheduled emails by batchId
|
543
|
+
# Fetch scheduled batch of emails by batchId (Can retrieve data upto 30 days old)
|
544
|
+
# @param batch_id The batchId of scheduled emails batch (Should be a valid UUIDv4)
|
545
|
+
# @param [Hash] opts the optional parameters
|
546
|
+
# @option opts [Date] :start_date Mandatory if `endDate` is used. Starting date (YYYY-MM-DD) from which you want to fetch the list. Can be maximum 30 days older tha current date.
|
547
|
+
# @option opts [Date] :end_date Mandatory if `startDate` is used. Ending date (YYYY-MM-DD) till which you want to fetch the list. Maximum time period that can be selected is one month.
|
548
|
+
# @option opts [String] :sort Sort the results in the ascending/descending order of record creation. Default order is **descending** if `sort` is not passed (default to desc)
|
549
|
+
# @option opts [String] :status Filter the records by `status` of the scheduled email batch or message.
|
550
|
+
# @option opts [Integer] :limit Number of documents returned per page (default to 100)
|
551
|
+
# @option opts [Integer] :offset Index of the first document on the page (default to 0)
|
552
|
+
# @return [GetScheduledEmailByBatchId]
|
553
|
+
def get_scheduled_email_by_batch_id(batch_id, opts = {})
|
554
|
+
data, _status_code, _headers = get_scheduled_email_by_batch_id_with_http_info(batch_id, opts)
|
555
|
+
data
|
556
|
+
end
|
557
|
+
|
558
|
+
# Fetch scheduled emails by batchId
|
559
|
+
# Fetch scheduled batch of emails by batchId (Can retrieve data upto 30 days old)
|
560
|
+
# @param batch_id The batchId of scheduled emails batch (Should be a valid UUIDv4)
|
561
|
+
# @param [Hash] opts the optional parameters
|
562
|
+
# @option opts [Date] :start_date Mandatory if `endDate` is used. Starting date (YYYY-MM-DD) from which you want to fetch the list. Can be maximum 30 days older tha current date.
|
563
|
+
# @option opts [Date] :end_date Mandatory if `startDate` is used. Ending date (YYYY-MM-DD) till which you want to fetch the list. Maximum time period that can be selected is one month.
|
564
|
+
# @option opts [String] :sort Sort the results in the ascending/descending order of record creation. Default order is **descending** if `sort` is not passed
|
565
|
+
# @option opts [String] :status Filter the records by `status` of the scheduled email batch or message.
|
566
|
+
# @option opts [Integer] :limit Number of documents returned per page
|
567
|
+
# @option opts [Integer] :offset Index of the first document on the page
|
568
|
+
# @return [Array<(GetScheduledEmailByBatchId, Fixnum, Hash)>] GetScheduledEmailByBatchId data, response status code and response headers
|
569
|
+
def get_scheduled_email_by_batch_id_with_http_info(batch_id, opts = {})
|
570
|
+
if @api_client.config.debugging
|
571
|
+
@api_client.config.logger.debug 'Calling API: TransactionalEmailsApi.get_scheduled_email_by_batch_id ...'
|
572
|
+
end
|
573
|
+
# verify the required parameter 'batch_id' is set
|
574
|
+
if @api_client.config.client_side_validation && batch_id.nil?
|
575
|
+
fail ArgumentError, "Missing the required parameter 'batch_id' when calling TransactionalEmailsApi.get_scheduled_email_by_batch_id"
|
576
|
+
end
|
577
|
+
if @api_client.config.client_side_validation && opts[:'sort'] && !['asc', 'desc'].include?(opts[:'sort'])
|
578
|
+
fail ArgumentError, 'invalid value for "sort", must be one of asc, desc'
|
579
|
+
end
|
580
|
+
if @api_client.config.client_side_validation && opts[:'status'] && !['processed', 'inProgress', 'queued'].include?(opts[:'status'])
|
581
|
+
fail ArgumentError, 'invalid value for "status", must be one of processed, inProgress, queued'
|
582
|
+
end
|
583
|
+
if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] > 500
|
584
|
+
fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling TransactionalEmailsApi.get_scheduled_email_by_batch_id, must be smaller than or equal to 500.'
|
585
|
+
end
|
586
|
+
|
587
|
+
# resource path
|
588
|
+
local_var_path = '/smtp/emailStatus/{batchId}'.sub('{' + 'batchId' + '}', batch_id.to_s)
|
589
|
+
|
590
|
+
# query parameters
|
591
|
+
query_params = {}
|
592
|
+
query_params[:'startDate'] = opts[:'start_date'] if !opts[:'start_date'].nil?
|
593
|
+
query_params[:'endDate'] = opts[:'end_date'] if !opts[:'end_date'].nil?
|
594
|
+
query_params[:'sort'] = opts[:'sort'] if !opts[:'sort'].nil?
|
595
|
+
query_params[:'status'] = opts[:'status'] if !opts[:'status'].nil?
|
596
|
+
query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
|
597
|
+
query_params[:'offset'] = opts[:'offset'] if !opts[:'offset'].nil?
|
598
|
+
|
599
|
+
# header parameters
|
600
|
+
header_params = {}
|
601
|
+
# HTTP header 'Accept' (if needed)
|
602
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
603
|
+
# HTTP header 'Content-Type'
|
604
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
605
|
+
|
606
|
+
# form parameters
|
607
|
+
form_params = {}
|
608
|
+
|
609
|
+
# http body (model)
|
610
|
+
post_body = nil
|
611
|
+
auth_names = ['api-key', 'partner-key']
|
612
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path,
|
613
|
+
:header_params => header_params,
|
614
|
+
:query_params => query_params,
|
615
|
+
:form_params => form_params,
|
616
|
+
:body => post_body,
|
617
|
+
:auth_names => auth_names,
|
618
|
+
:return_type => 'GetScheduledEmailByBatchId')
|
619
|
+
if @api_client.config.debugging
|
620
|
+
@api_client.config.logger.debug "API called: TransactionalEmailsApi#get_scheduled_email_by_batch_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
621
|
+
end
|
622
|
+
return data, status_code, headers
|
623
|
+
end
|
624
|
+
# Fetch scheduled email by messageId
|
625
|
+
# Fetch scheduled email by messageId (Can retrieve data upto 30 days old)
|
626
|
+
# @param message_id The messageId of scheduled email
|
627
|
+
# @param [Hash] opts the optional parameters
|
628
|
+
# @option opts [Date] :start_date Mandatory if endDate is used. Starting date (YYYY-MM-DD) from which you want to fetch the list. Can be maximum 30 days older tha current date.
|
629
|
+
# @option opts [Date] :end_date Mandatory if startDate is used. Ending date (YYYY-MM-DD) till which you want to fetch the list. Maximum time period that can be selected is one month.
|
630
|
+
# @return [GetScheduledEmailByMessageId]
|
631
|
+
def get_scheduled_email_by_message_id(message_id, opts = {})
|
632
|
+
data, _status_code, _headers = get_scheduled_email_by_message_id_with_http_info(message_id, opts)
|
633
|
+
data
|
634
|
+
end
|
635
|
+
|
636
|
+
# Fetch scheduled email by messageId
|
637
|
+
# Fetch scheduled email by messageId (Can retrieve data upto 30 days old)
|
638
|
+
# @param message_id The messageId of scheduled email
|
639
|
+
# @param [Hash] opts the optional parameters
|
640
|
+
# @option opts [Date] :start_date Mandatory if endDate is used. Starting date (YYYY-MM-DD) from which you want to fetch the list. Can be maximum 30 days older tha current date.
|
641
|
+
# @option opts [Date] :end_date Mandatory if startDate is used. Ending date (YYYY-MM-DD) till which you want to fetch the list. Maximum time period that can be selected is one month.
|
642
|
+
# @return [Array<(GetScheduledEmailByMessageId, Fixnum, Hash)>] GetScheduledEmailByMessageId data, response status code and response headers
|
643
|
+
def get_scheduled_email_by_message_id_with_http_info(message_id, opts = {})
|
644
|
+
if @api_client.config.debugging
|
645
|
+
@api_client.config.logger.debug 'Calling API: TransactionalEmailsApi.get_scheduled_email_by_message_id ...'
|
646
|
+
end
|
647
|
+
# verify the required parameter 'message_id' is set
|
648
|
+
if @api_client.config.client_side_validation && message_id.nil?
|
649
|
+
fail ArgumentError, "Missing the required parameter 'message_id' when calling TransactionalEmailsApi.get_scheduled_email_by_message_id"
|
650
|
+
end
|
651
|
+
# resource path
|
652
|
+
local_var_path = '/smtp/emailStatus/{messageId}'.sub('{' + 'messageId' + '}', message_id.to_s)
|
653
|
+
|
654
|
+
# query parameters
|
655
|
+
query_params = {}
|
656
|
+
query_params[:'startDate'] = opts[:'start_date'] if !opts[:'start_date'].nil?
|
657
|
+
query_params[:'endDate'] = opts[:'end_date'] if !opts[:'end_date'].nil?
|
658
|
+
|
659
|
+
# header parameters
|
660
|
+
header_params = {}
|
661
|
+
# HTTP header 'Accept' (if needed)
|
662
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
663
|
+
# HTTP header 'Content-Type'
|
664
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
665
|
+
|
666
|
+
# form parameters
|
667
|
+
form_params = {}
|
668
|
+
|
669
|
+
# http body (model)
|
670
|
+
post_body = nil
|
671
|
+
auth_names = ['api-key', 'partner-key']
|
672
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path,
|
673
|
+
:header_params => header_params,
|
674
|
+
:query_params => query_params,
|
675
|
+
:form_params => form_params,
|
676
|
+
:body => post_body,
|
677
|
+
:auth_names => auth_names,
|
678
|
+
:return_type => 'GetScheduledEmailByMessageId')
|
679
|
+
if @api_client.config.debugging
|
680
|
+
@api_client.config.logger.debug "API called: TransactionalEmailsApi#get_scheduled_email_by_message_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
681
|
+
end
|
682
|
+
return data, status_code, headers
|
683
|
+
end
|
485
684
|
# Get your transactional email activity aggregated per day
|
486
685
|
# @param [Hash] opts the optional parameters
|
487
686
|
# @option opts [Integer] :limit Number of documents returned per page (default to 10)
|
@@ -875,66 +1074,6 @@ module SibApiV3Sdk
|
|
875
1074
|
end
|
876
1075
|
return data, status_code, headers
|
877
1076
|
end
|
878
|
-
# Send a template
|
879
|
-
# This endpoint is deprecated. Prefer v3/smtp/email instead.
|
880
|
-
# @param template_id Id of the template
|
881
|
-
# @param send_email
|
882
|
-
# @param [Hash] opts the optional parameters
|
883
|
-
# @return [SendTemplateEmail]
|
884
|
-
def send_template(template_id, send_email, opts = {})
|
885
|
-
data, _status_code, _headers = send_template_with_http_info(template_id, send_email, opts)
|
886
|
-
data
|
887
|
-
end
|
888
|
-
|
889
|
-
# Send a template
|
890
|
-
# This endpoint is deprecated. Prefer v3/smtp/email instead.
|
891
|
-
# @param template_id Id of the template
|
892
|
-
# @param send_email
|
893
|
-
# @param [Hash] opts the optional parameters
|
894
|
-
# @return [Array<(SendTemplateEmail, Fixnum, Hash)>] SendTemplateEmail data, response status code and response headers
|
895
|
-
def send_template_with_http_info(template_id, send_email, opts = {})
|
896
|
-
if @api_client.config.debugging
|
897
|
-
@api_client.config.logger.debug 'Calling API: TransactionalEmailsApi.send_template ...'
|
898
|
-
end
|
899
|
-
# verify the required parameter 'template_id' is set
|
900
|
-
if @api_client.config.client_side_validation && template_id.nil?
|
901
|
-
fail ArgumentError, "Missing the required parameter 'template_id' when calling TransactionalEmailsApi.send_template"
|
902
|
-
end
|
903
|
-
# verify the required parameter 'send_email' is set
|
904
|
-
if @api_client.config.client_side_validation && send_email.nil?
|
905
|
-
fail ArgumentError, "Missing the required parameter 'send_email' when calling TransactionalEmailsApi.send_template"
|
906
|
-
end
|
907
|
-
# resource path
|
908
|
-
local_var_path = '/smtp/templates/{templateId}/send'.sub('{' + 'templateId' + '}', template_id.to_s)
|
909
|
-
|
910
|
-
# query parameters
|
911
|
-
query_params = {}
|
912
|
-
|
913
|
-
# header parameters
|
914
|
-
header_params = {}
|
915
|
-
# HTTP header 'Accept' (if needed)
|
916
|
-
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
917
|
-
# HTTP header 'Content-Type'
|
918
|
-
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
919
|
-
|
920
|
-
# form parameters
|
921
|
-
form_params = {}
|
922
|
-
|
923
|
-
# http body (model)
|
924
|
-
post_body = @api_client.object_to_http_body(send_email)
|
925
|
-
auth_names = ['api-key', 'partner-key']
|
926
|
-
data, status_code, headers = @api_client.call_api(:POST, local_var_path,
|
927
|
-
:header_params => header_params,
|
928
|
-
:query_params => query_params,
|
929
|
-
:form_params => form_params,
|
930
|
-
:body => post_body,
|
931
|
-
:auth_names => auth_names,
|
932
|
-
:return_type => 'SendTemplateEmail')
|
933
|
-
if @api_client.config.debugging
|
934
|
-
@api_client.config.logger.debug "API called: TransactionalEmailsApi#send_template\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
935
|
-
end
|
936
|
-
return data, status_code, headers
|
937
|
-
end
|
938
1077
|
# Send a template to your test list
|
939
1078
|
# @param template_id Id of the template
|
940
1079
|
# @param send_test_email
|
@@ -203,8 +203,8 @@ module SibApiV3Sdk
|
|
203
203
|
if @api_client.config.debugging
|
204
204
|
@api_client.config.logger.debug 'Calling API: WebhooksApi.get_webhooks ...'
|
205
205
|
end
|
206
|
-
if @api_client.config.client_side_validation && opts[:'type'] && !['marketing', 'transactional'].include?(opts[:'type'])
|
207
|
-
fail ArgumentError, 'invalid value for "type", must be one of marketing, transactional'
|
206
|
+
if @api_client.config.client_side_validation && opts[:'type'] && !['marketing', 'transactional', 'inbound'].include?(opts[:'type'])
|
207
|
+
fail ArgumentError, 'invalid value for "type", must be one of marketing, transactional, inbound'
|
208
208
|
end
|
209
209
|
if @api_client.config.client_side_validation && opts[:'sort'] && !['asc', 'desc'].include?(opts[:'sort'])
|
210
210
|
fail ArgumentError, 'invalid value for "sort", must be one of asc, desc'
|
@@ -13,26 +13,26 @@ Swagger Codegen version: 2.4.19
|
|
13
13
|
require 'date'
|
14
14
|
|
15
15
|
module SibApiV3Sdk
|
16
|
-
class
|
17
|
-
#
|
18
|
-
attr_accessor :content
|
19
|
-
|
20
|
-
# Required for content. Name of the attachment
|
16
|
+
class Body
|
17
|
+
# Name of company
|
21
18
|
attr_accessor :name
|
22
19
|
|
20
|
+
# Attributes for company creation
|
21
|
+
attr_accessor :attributes
|
22
|
+
|
23
23
|
# Attribute mapping from ruby-style variable name to JSON key.
|
24
24
|
def self.attribute_map
|
25
25
|
{
|
26
|
-
:'
|
27
|
-
:'
|
26
|
+
:'name' => :'name',
|
27
|
+
:'attributes' => :'attributes'
|
28
28
|
}
|
29
29
|
end
|
30
30
|
|
31
31
|
# Attribute type mapping.
|
32
32
|
def self.swagger_types
|
33
33
|
{
|
34
|
-
:'
|
35
|
-
:'
|
34
|
+
:'name' => :'String',
|
35
|
+
:'attributes' => :'Object'
|
36
36
|
}
|
37
37
|
end
|
38
38
|
|
@@ -44,27 +44,19 @@ module SibApiV3Sdk
|
|
44
44
|
# convert string to symbol for hash key
|
45
45
|
attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
|
46
46
|
|
47
|
-
if attributes.has_key?(:'content')
|
48
|
-
self.content = attributes[:'content']
|
49
|
-
end
|
50
|
-
|
51
47
|
if attributes.has_key?(:'name')
|
52
48
|
self.name = attributes[:'name']
|
53
49
|
end
|
50
|
+
|
51
|
+
if attributes.has_key?(:'attributes')
|
52
|
+
self.attributes = attributes[:'attributes']
|
53
|
+
end
|
54
54
|
end
|
55
55
|
|
56
56
|
# Show invalid properties with the reasons. Usually used together with valid?
|
57
57
|
# @return Array for valid properties with the reasons
|
58
58
|
def list_invalid_properties
|
59
59
|
invalid_properties = Array.new
|
60
|
-
if @content.nil?
|
61
|
-
invalid_properties.push('invalid value for "content", content cannot be nil.')
|
62
|
-
end
|
63
|
-
|
64
|
-
if @content !~ Regexp.new(/^(?:[A-Za-z0-9+\/]{4})*(?:[A-Za-z0-9+\/]{2}==|[A-Za-z0-9+\/]{3}=)?$/)
|
65
|
-
invalid_properties.push('invalid value for "content", must conform to the pattern /^(?:[A-Za-z0-9+\/]{4})*(?:[A-Za-z0-9+\/]{2}==|[A-Za-z0-9+\/]{3}=)?$/.')
|
66
|
-
end
|
67
|
-
|
68
60
|
if @name.nil?
|
69
61
|
invalid_properties.push('invalid value for "name", name cannot be nil.')
|
70
62
|
end
|
@@ -75,33 +67,17 @@ module SibApiV3Sdk
|
|
75
67
|
# Check to see if the all the properties in the model are valid
|
76
68
|
# @return true if the model is valid
|
77
69
|
def valid?
|
78
|
-
return false if @content.nil?
|
79
|
-
return false if @content !~ Regexp.new(/^(?:[A-Za-z0-9+\/]{4})*(?:[A-Za-z0-9+\/]{2}==|[A-Za-z0-9+\/]{3}=)?$/)
|
80
70
|
return false if @name.nil?
|
81
71
|
true
|
82
72
|
end
|
83
73
|
|
84
|
-
# Custom attribute writer method with validation
|
85
|
-
# @param [Object] content Value to be assigned
|
86
|
-
def content=(content)
|
87
|
-
if content.nil?
|
88
|
-
fail ArgumentError, 'content cannot be nil'
|
89
|
-
end
|
90
|
-
|
91
|
-
if content !~ Regexp.new(/^(?:[A-Za-z0-9+\/]{4})*(?:[A-Za-z0-9+\/]{2}==|[A-Za-z0-9+\/]{3}=)?$/)
|
92
|
-
fail ArgumentError, 'invalid value for "content", must conform to the pattern /^(?:[A-Za-z0-9+\/]{4})*(?:[A-Za-z0-9+\/]{2}==|[A-Za-z0-9+\/]{3}=)?$/.'
|
93
|
-
end
|
94
|
-
|
95
|
-
@content = content
|
96
|
-
end
|
97
|
-
|
98
74
|
# Checks equality by comparing each attribute.
|
99
75
|
# @param [Object] Object to be compared
|
100
76
|
def ==(o)
|
101
77
|
return true if self.equal?(o)
|
102
78
|
self.class == o.class &&
|
103
|
-
|
104
|
-
|
79
|
+
name == o.name &&
|
80
|
+
attributes == o.attributes
|
105
81
|
end
|
106
82
|
|
107
83
|
# @see the `==` method
|
@@ -113,7 +89,7 @@ module SibApiV3Sdk
|
|
113
89
|
# Calculates hash code according to all attributes.
|
114
90
|
# @return [Fixnum] Hash code
|
115
91
|
def hash
|
116
|
-
[
|
92
|
+
[name, attributes].hash
|
117
93
|
end
|
118
94
|
|
119
95
|
# Builds the object from hash
|
@@ -0,0 +1,195 @@
|
|
1
|
+
=begin
|
2
|
+
#SendinBlue API
|
3
|
+
|
4
|
+
#SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable |
|
5
|
+
|
6
|
+
OpenAPI spec version: 3.0.0
|
7
|
+
Contact: contact@sendinblue.com
|
8
|
+
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
9
|
+
Swagger Codegen version: 2.4.19
|
10
|
+
|
11
|
+
=end
|
12
|
+
|
13
|
+
require 'date'
|
14
|
+
|
15
|
+
module SibApiV3Sdk
|
16
|
+
class Body1
|
17
|
+
# Name of company
|
18
|
+
attr_accessor :name
|
19
|
+
|
20
|
+
# Attributes for company update
|
21
|
+
attr_accessor :attributes
|
22
|
+
|
23
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
24
|
+
def self.attribute_map
|
25
|
+
{
|
26
|
+
:'name' => :'name',
|
27
|
+
:'attributes' => :'attributes'
|
28
|
+
}
|
29
|
+
end
|
30
|
+
|
31
|
+
# Attribute type mapping.
|
32
|
+
def self.swagger_types
|
33
|
+
{
|
34
|
+
:'name' => :'String',
|
35
|
+
:'attributes' => :'Object'
|
36
|
+
}
|
37
|
+
end
|
38
|
+
|
39
|
+
# Initializes the object
|
40
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
41
|
+
def initialize(attributes = {})
|
42
|
+
return unless attributes.is_a?(Hash)
|
43
|
+
|
44
|
+
# convert string to symbol for hash key
|
45
|
+
attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
|
46
|
+
|
47
|
+
if attributes.has_key?(:'name')
|
48
|
+
self.name = attributes[:'name']
|
49
|
+
end
|
50
|
+
|
51
|
+
if attributes.has_key?(:'attributes')
|
52
|
+
self.attributes = attributes[:'attributes']
|
53
|
+
end
|
54
|
+
end
|
55
|
+
|
56
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
57
|
+
# @return Array for valid properties with the reasons
|
58
|
+
def list_invalid_properties
|
59
|
+
invalid_properties = Array.new
|
60
|
+
invalid_properties
|
61
|
+
end
|
62
|
+
|
63
|
+
# Check to see if the all the properties in the model are valid
|
64
|
+
# @return true if the model is valid
|
65
|
+
def valid?
|
66
|
+
true
|
67
|
+
end
|
68
|
+
|
69
|
+
# Checks equality by comparing each attribute.
|
70
|
+
# @param [Object] Object to be compared
|
71
|
+
def ==(o)
|
72
|
+
return true if self.equal?(o)
|
73
|
+
self.class == o.class &&
|
74
|
+
name == o.name &&
|
75
|
+
attributes == o.attributes
|
76
|
+
end
|
77
|
+
|
78
|
+
# @see the `==` method
|
79
|
+
# @param [Object] Object to be compared
|
80
|
+
def eql?(o)
|
81
|
+
self == o
|
82
|
+
end
|
83
|
+
|
84
|
+
# Calculates hash code according to all attributes.
|
85
|
+
# @return [Fixnum] Hash code
|
86
|
+
def hash
|
87
|
+
[name, attributes].hash
|
88
|
+
end
|
89
|
+
|
90
|
+
# Builds the object from hash
|
91
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
92
|
+
# @return [Object] Returns the model itself
|
93
|
+
def build_from_hash(attributes)
|
94
|
+
return nil unless attributes.is_a?(Hash)
|
95
|
+
self.class.swagger_types.each_pair do |key, type|
|
96
|
+
if type =~ /\AArray<(.*)>/i
|
97
|
+
# check to ensure the input is an array given that the attribute
|
98
|
+
# is documented as an array but the input is not
|
99
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
100
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
101
|
+
end
|
102
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
103
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
104
|
+
end # or else data not found in attributes(hash), not an issue as the data can be optional
|
105
|
+
end
|
106
|
+
|
107
|
+
self
|
108
|
+
end
|
109
|
+
|
110
|
+
# Deserializes the data based on type
|
111
|
+
# @param string type Data type
|
112
|
+
# @param string value Value to be deserialized
|
113
|
+
# @return [Object] Deserialized data
|
114
|
+
def _deserialize(type, value)
|
115
|
+
case type.to_sym
|
116
|
+
when :DateTime
|
117
|
+
DateTime.parse(value)
|
118
|
+
when :Date
|
119
|
+
Date.parse(value)
|
120
|
+
when :String
|
121
|
+
value.to_s
|
122
|
+
when :Integer
|
123
|
+
value.to_i
|
124
|
+
when :Float
|
125
|
+
value.to_f
|
126
|
+
when :BOOLEAN
|
127
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
128
|
+
true
|
129
|
+
else
|
130
|
+
false
|
131
|
+
end
|
132
|
+
when :Object
|
133
|
+
# generic object (usually a Hash), return directly
|
134
|
+
value
|
135
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
136
|
+
inner_type = Regexp.last_match[:inner_type]
|
137
|
+
value.map { |v| _deserialize(inner_type, v) }
|
138
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
139
|
+
k_type = Regexp.last_match[:k_type]
|
140
|
+
v_type = Regexp.last_match[:v_type]
|
141
|
+
{}.tap do |hash|
|
142
|
+
value.each do |k, v|
|
143
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
144
|
+
end
|
145
|
+
end
|
146
|
+
else # model
|
147
|
+
temp_model = SibApiV3Sdk.const_get(type).new
|
148
|
+
temp_model.build_from_hash(value)
|
149
|
+
end
|
150
|
+
end
|
151
|
+
|
152
|
+
# Returns the string representation of the object
|
153
|
+
# @return [String] String presentation of the object
|
154
|
+
def to_s
|
155
|
+
to_hash.to_s
|
156
|
+
end
|
157
|
+
|
158
|
+
# to_body is an alias to to_hash (backward compatibility)
|
159
|
+
# @return [Hash] Returns the object in the form of hash
|
160
|
+
def to_body
|
161
|
+
to_hash
|
162
|
+
end
|
163
|
+
|
164
|
+
# Returns the object in the form of hash
|
165
|
+
# @return [Hash] Returns the object in the form of hash
|
166
|
+
def to_hash
|
167
|
+
hash = {}
|
168
|
+
self.class.attribute_map.each_pair do |attr, param|
|
169
|
+
value = self.send(attr)
|
170
|
+
next if value.nil?
|
171
|
+
hash[param] = _to_hash(value)
|
172
|
+
end
|
173
|
+
hash
|
174
|
+
end
|
175
|
+
|
176
|
+
# Outputs non-array value in the form of hash
|
177
|
+
# For object, use to_hash. Otherwise, just return the value
|
178
|
+
# @param [Object] value Any valid value
|
179
|
+
# @return [Hash] Returns the value in the form of hash
|
180
|
+
def _to_hash(value)
|
181
|
+
if value.is_a?(Array)
|
182
|
+
value.compact.map { |v| _to_hash(v) }
|
183
|
+
elsif value.is_a?(Hash)
|
184
|
+
{}.tap do |hash|
|
185
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
186
|
+
end
|
187
|
+
elsif value.respond_to? :to_hash
|
188
|
+
value.to_hash
|
189
|
+
else
|
190
|
+
value
|
191
|
+
end
|
192
|
+
end
|
193
|
+
|
194
|
+
end
|
195
|
+
end
|